Retrieve reference period climate maps
input_refmap.Rd
This function downloads (or retrieves from cache) monthly Tmin, Tmax, and PPT climatologies (maps of long-term average climate)
from a specified data source for the specified bounding box.
It is intended for use with downscale_core()
, but can also be used as stand-alone raster data.
Arguments
- dbCon
A db connection object created by
data_connect
.- bbox
numeric. Vector of length 4 giving bounding box of study region, in the order ymax,ymin,xmax,xmin. In general this is created by
get_bb()
, but can also be user-defined.- reference
A
character
or aSpatRaster
. For character, label of the normal baseline to use. Can be obtained fromlist_refmaps()
. ForSpatRaster
, 36 layers normal climate variables with names PPT01:PPT12, Tmax01:Tmax12 and Tmin01:Tmin12. Defaults tolist_refmaps()[1]
.- cache
logical. Specifying whether to cache new data locally or no. Defaults to
TRUE
.
Value
A SpatRaster
containing reference period climatologies, lapse rates
and digital elevation model layers, that can be used with downscale_core()
.
Details
The first 36 layers of the output raster correspond with the actual climate variables. The raster also contains lapse rates for each variable, and a corresponding digital elevation model.