
Download CHELSA-TraCE21k for past periods, optionally for a region only
Source:R/trace21k.R
download_chelsa_trace21k.RdDownloads the files of CHELSA-TraCE21k V1.0 (Karger et al. 2023): the
climate of every century of the last 22,000 years at about 1 km,
downscaled from the TraCE-21ka simulation with changing ice sheets and
sea level. By default the monthly maximum and minimum temperature and
precipitation of the chosen time steps, from which climate_indices()
computes the same derived variables as for the present; with vars = "bio" the 19 bioclimatic variables. As in download_chelsa_monthly(),
with extent only that region is read from the global files over the
internet, existing files are kept, and an interrupted download
continues when run again.
Usage
download_chelsa_trace21k(
path,
vars = c("tasmax", "tasmin", "pr"),
kyr_bp = NULL,
time_id = NULL,
months = 1:12,
extent = NULL,
overwrite = FALSE
)Arguments
- path
Folder for the files (created if needed).
- vars
Monthly variables (
"tasmax","tasmin","pr") and/or bioclimatic variables ("bio01"to"bio19", or"bio"for all 19).- kyr_bp
Time in thousands of years before present, 0 to 22 (e.g.
21for the Last Glacial Maximum,12for the Younger Dryas,6for the mid-Holocene); rounded to the century.- time_id
Time ids, to convert them back: give either
kyr_bportime_id.- months
Months of the monthly variables.
- extent
Optional region, as in
download_chelsa_monthly().- overwrite
Download again files that exist.
Details
Units. Check them once after downloading (terra::rast(file)): the
data set stores temperatures in tenths of Kelvin, which
climate_indices() recognises and converts (temp_units = "auto"), and
precipitation in kg m-2 per month (= mm/month). Some bioclimatic layers
are stored multiplied by 10; sample_environment() with fix_scale = TRUE detects layers whose scale differs between data sets. The data set
has no monthly mean temperature; climate_indices() then uses
(tmax + tmin) / 2. Compare past with present from the same source
(time step 0 ka BP of this data set, or an anomaly, see
sample_environment()) so that differences between sources are not
read as climate change.
References
Karger, D.N., Nobis, M.P., Normand, S., Graham, C.H., Zimmermann, N.E. (2023) CHELSA-TraCE21k: high-resolution (1 km) downscaled transient temperature and precipitation data since the Last Glacial Maximum. Climate of the Past 19, 439-456. doi:10.5194/cp-19-439-2023
Examples
if (FALSE) { # \dontrun{
# monthly climate of the Alps at the Last Glacial Maximum and today
download_chelsa_trace21k("trace_alps", kyr_bp = c(0, 21),
extent = c(5, 17, 43, 49))
# the files of one time step are told apart by its time id (-190)
f <- function(v) monthly_files("trace_alps", v, must_contain = "_-190_V1")
lgm <- climate_indices(f("tasmax"), f("tasmin"), f("pr"),
path = "indices", prefix = "TraCE_21ka_")
# bioclimatic variables of three periods
download_chelsa_trace21k("trace_alps", vars = "bio", kyr_bp = c(0, 12, 21),
extent = c(5, 17, 43, 49))
} # }