Skip to contents

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.

Usage

input_refmap(dbCon, bbox, reference = "refmap_climatena", cache = TRUE)

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 a SpatRaster. For character, label of the normal baseline to use. Can be obtained from list_refmaps(). For SpatRaster, 36 layers normal climate variables with names PPT01:PPT12, Tmax01:Tmax12 and Tmin01:Tmin12. Defaults to list_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.

See also