Download climate data sets from SNAP.

climdata(id, area, set = NULL, time_scale = "monthly", decavg = FALSE,
  variable = NULL)

Arguments

id

character, data set ID. See climate_collections for available data sets.

area

character, region or point location of interest. See climate_locations.

set

character or NULL, The set/group that area belongs to. Can be ignored, but should be provided in rare cases where area name is not unique (a warning is thrown). See climate_locations.

time_scale

character, "monthly", "seasonal", "annual".

decavg

logical, if TRUE, return decadal means of annual statistics. See details.

variable

NULL or character: "tas", "tasmin", "tasmax" or "pr". See details.

Value

a data frame.

Details

This function downloads climate data sets from Scenarios Network for Alaska and Arctic Planning based on the data set id and specification of the region or point location of interest.

For regional climate data, annual statistics with a temporal resolution of monthly, 3-month seasonal and full annual period are based on regional spatial climate variable distribution samples at the respective resolution.

Statistics include:

  • mean

  • standard deviation

  • minimum

  • maximum

  • quantiles: 0.025, 0.05, 0.10, 0.25, 0.50 (median), 0.75, 0.90, 0.95 and 0.975.

Comparatively, point location data sets do not include statistics regarding the surrounding spatial distribution of values. Only the Mean column is retained in these tables.

Seasonal and annual aggregate statistics represent means for temperature variables and totals for precipitation. Note that decadal averages are strictly as their name suggests: decadal means of each statistic at the respective intra-annual time steps. E.g., decavg = TRUE returns a data frame including the mean of ten annual 95th percentile values, not the 95th percentile of the spatial climate variable distribution at a decadal resolution. For something like the latter, this can be computed from raw distribution data.

Data sets are retrieved for specific locations. For the smaller, decadal resolution data sets, there is an option to download all point locations in one table with area = "points" (requires decavg = TRUE), but in this case it must be requested for a specific climate variable to further reduce the download size to no more than 24 MB compressed for all 3,867 point locations. In general, if variable = NULL, all available climate variables are retained. In the case of area = "points", a specific climate variable must be provided or it will default to temperature (tas).

Examples

climdata("ar5stats", "AK-CAN")
#> # A tibble: 101,400 x 20 #> RCP Model Var Group Region Year Month Mean SD Min Max Pct_025 #> <fct> <fct> <fct> <chr> <chr> <int> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 Hist~ CRU ~ pr AK-C~ AK-CAN 1901 Jan 57 97.5 1.3 1048. 7.7 #> 2 Hist~ CRU ~ pr AK-C~ AK-CAN 1901 Feb 45.6 77.8 0.4 674. 4.5 #> 3 Hist~ CRU ~ pr AK-C~ AK-CAN 1901 Mar 51.3 83.7 2.3 943 6.4 #> 4 Hist~ CRU ~ pr AK-C~ AK-CAN 1901 Apr 48 81.3 3.5 771. 8 #> 5 Hist~ CRU ~ pr AK-C~ AK-CAN 1901 May 51.5 47.6 0.2 592. 6.9 #> 6 Hist~ CRU ~ pr AK-C~ AK-CAN 1901 Jun 80.7 52.9 5.7 493. 15.5 #> 7 Hist~ CRU ~ pr AK-C~ AK-CAN 1901 Jul 71.1 53.5 0.8 640. 4.4 #> 8 Hist~ CRU ~ pr AK-C~ AK-CAN 1901 Aug 65.4 73.7 0 900 3.7 #> 9 Hist~ CRU ~ pr AK-C~ AK-CAN 1901 Sep 80.5 79 4.3 1063. 10.9 #> 10 Hist~ CRU ~ pr AK-C~ AK-CAN 1901 Oct 73.7 132. 2.1 1376. 5.5 #> # ... with 101,390 more rows, and 8 more variables: Pct_05 <dbl>, Pct_10 <dbl>, #> # Pct_25 <dbl>, Pct_50 <dbl>, Pct_75 <dbl>, Pct_90 <dbl>, Pct_95 <dbl>, #> # Pct_975 <dbl>