Learn R Programming

getCRUCLdata (version 0.1.4)

create_CRU_stack: Download and Create a List of Raster Stack Objects From CRU CL2.0 Climatology Variables

Description

This function automates downloading and importing CRU CL2.0 climatology data into R and creates a list of raster stacks of the data. If requested, minimum and maximum temperature may also be automatically calculated as described in the data readme.txt file. Nomenclature and units from readme.txt:
pre
precipitation (millimetres/month)
cv
cv of precipitation (percent)
rd0
wet-days (no days with >0.1mm rain per month)
tmp
mean temperature (degrees Celsius)
dtr
mean diurnal temperature range (degrees Celsius)
reh
relative humidity (percent)
sunp
sunshine (percent of maximum possible (percent of day length))
frs
ground-frost (number of days with ground-frost per month)
wnd
10 metre windspeed (metres/second)
elv
elevation (automatically converted to metres)
For more information see the description of the data provided by CRU, https://crudata.uea.ac.uk/cru/data/hrg/tmc/readme.txt

Usage

create_CRU_stack(pre = FALSE, pre_cv = FALSE, rd0 = FALSE, tmp = FALSE,
  dtr = FALSE, reh = FALSE, tmn = FALSE, tmx = FALSE, sunp = FALSE,
  frs = FALSE, wnd = FALSE, elv = FALSE)

Arguments

pre
Logical. Fetch precipitation (millimetres/month) from server and return in a raster stack? Defaults to FALSE.
pre_cv
Logical. Fetch cv of precipitation (percent) from server and return in a raster stack? Defaults to FALSE.
rd0
Logical. Fetch wet-days (number days with >0.1 millimetres rain per month) and return in a raster stack? Defaults to FALSE.
tmp
Logical. Fetch temperature (degrees Celsius) and return it in the raster stack? Defaults to FALSE.
dtr
Logical. Fetch mean diurnal temperature range (degrees Celsius) and return it in a raster stack? Defaults to FALSE.
reh
Logical. Fetch relative humidity and return it in a raster stack? Defaults to FALSE.
tmn
Logical. Calculate minimum temperature values (degrees Celsius) and return it in a raster stack? Defaults to FALSE.
tmx
Logical. Calculate maximum temperature (degrees Celsius) and return it in a raster stack? Defaults to FALSE.
sunp
Logical. Fetch sunshine, percent of maximum possible (percent of day length) and return it in raster stack? Defaults to FALSE.
frs
Logical. Fetch ground-frost records (number of days with ground- frost per month) and return it in raster stack? Defaults to FALSE.
wnd
Logical. Fetch 10m wind speed (metres/second) and return it in the raster stack? Defaults to FALSE.
elv
Logical. Fetch elevation (converted to metres) and return it in a raster layer object? Defaults to FALSE.

Details

This function generates a data.frame object in R with the following possible fields as specified by the user:

See Also

create_CRU_df

Examples

Run this code
# Download data and create a raster stack of precipitation and temperature
## Not run: ------------------------------------
# CRU_pre_tmp <- create_CRU_stack(pre = TRUE, tmp = TRUE)
## ---------------------------------------------

Run the code above in your browser using DataLab