R/cmcc_bioclim.R
cmcc_bioclim.Rd
Parse historic CMCC-BioClimInd bioclimatic indicators optionally with a setting of boundary and a few other options.
cmcc_bioclim(bry = NULL, path = NULL, nm_mark = "clip", return_stack = TRUE)
(sf
or sp
) The boundary to mask the
downloaded original data. If NULL
, it would get global map.
If not NULL
, it can take sf
,
sfc
, SpatialPolygonsDataFrame
, SpatialPolygons
,
etc.
The default is NULL
.
(character
) The path to save the downloaded imagery.
If NULL
, it would use the current working directory.
The default is NULL
.
(character
) the name mark of clipped images.
The default is "clip". It would be ignored if bry
is NULL
.
(logical
) if TRUE
, stack the imagery
together and return.
If the area is large and resolution is high, it is better not to stack them.
The default is TRUE
.
if return_stack
is TRUE
, the images would be
returned as a stars
. Otherwise, nothing to return, but the user
would receive a message of where the images are.
The function is experimental at the moment, because the download server
of this dataset is not as stable as Worldclim yet. If it fails due to slow
internet, try to set a larger timeout option,
e.g., using options(timeout = 1e3)
.
Noce, Sergio, Luca Caporaso, and Monia Santini."A new global dataset of bioclimatic indicators. "Scientific data 7.1 (2020): 1-12. doi:10.1038/s41597-020-00726-5