
Monthly climate normals for an arbitrary period from climr
Source:R/wet_climr_normals.R
wet_climr_normals.RdDownscales climr's reference climatology onto an elevation grid, shifted to
the mean of an observed time series over years. climr expresses each
observed year as an anomaly on its 1961-1990 reference period: a ratio for
precipitation and an offset for temperature. Both are linear, so averaging
the anomalies before downscaling gives the same normal as downscaling each
year and averaging, at a thirtieth of the cost.
Arguments
- dem
Path to a one-layer elevation raster (m, EPSG:4326), or a
SpatRaster. Its grid is the output grid.- years
Integer vector of years to average.
- dataset
climr observed time series:
"mswx.blend"(default),"climatena"or"cru.gpcc". The ClimateNA series isNAover coastal islands (Haida Gwaii, northern Vancouver Island) on its 1-degree grid, so averaging its anomalies leaves those islands without normals; the 0.5-degree MSWX blend covers them.- vars
climr variable codes to return: monthly
PPT_MM,Tave_MM,Tmax_MM,Tmin_MM, andMAP,MAT. Derived variables that are not linear in the anomalies (degree days, PAS, CMD) are refused, since averaging anomalies first would bias them.- dir
Cache directory.
- overwrite
Logical. Rebuild even when cached.