Provides functions that automate downloading and importing University of East Anglia Climate Research Unit ('CRU') 'CL' v. 2.0 climatology data, facilitates the calculation of minimum temperature and maximum temperature and formats the data into a tidy data frame as a 'tibble' or a list of 'raster' 'stack' objects for use. 'CRU' 'CL' v. 2.0 data are a gridded climatology of 1961-1990 monthly means released in 2002 and cover all land areas (excluding Antarctica) at 10 arcminutes (0.1666667 degree) resolution. For more information see the description of the data provided by the University of East Anglia Climate Research Unit, < https://crudata.uea.ac.uk/cru/data/hrg/tmc/readme.txt>.
Author/Maintainer: Adam Sparks
The getCRUCLdata package provides functions that automate importing
CRU CL v. 2.0 climatology data into R, facilitate the calculation of
minimum temperature and maximum temperature, and formats the data into a
tidy data frame as a
tibble::tibble()
or a
list()
of
raster::stack()
objects for use in an R session.
CRU CL v. 2.0 data are a gridded climatology of 1961-1990 monthly means released in 2002 and cover all land areas (excluding Antarctica) at 10 arcminutes (0.1666667 degree) resolution. For more information see the description of the data provided by the University of East Anglia Climate Research Unit (CRU), https://crudata.uea.ac.uk/cru/data/hrg/tmc/readme.txt.
This package automatically converts elevation values from kilometres to metres.
This package crops all spatial outputs to an extent of ymin = -60, ymax = 85, xmin = -180, xmax = 180. Note that the original wind data include land area for parts of Antarctica.
A stable version of getCRUCLdata is available from CRAN.
install.packages("getCRUCLdata")
A development version is available from from GitHub. If you wish to install the development version that may have new features (but also may not work properly), install the devtools package, available from CRAN. I strive to keep the master branch on GitHub functional and working properly, although this may not always happen.
if (!require("remotes")) {install.packages("remotes")}install_github("ropensci/getCRUCLdata", build_vignettes = TRUE)
For complete documentation see the package website: https://ropensci.github.io/getCRUCLdata/
A high-resolution data set of surface climate over global land areas Climate Research, 2000, Vol 21, pg 1-25
- School of Geography and the Environment, University of Oxford, Mansfield Road, Oxford OX1 3TB, United Kingdom
- Climatic Research Unit, and (3) Tyndall Centre for Climate Change Research, both at School of Environmental Sciences, University of East Anglia, Norwich NR4 7TJ, United Kingdom
- International Water Management Institute, PO Box 2075, Colombo, Sri Lanka
ABSTRACT: We describe the construction of a 10-minute latitude/longitude data set of mean monthly surface climate over global land areas, excluding Antarctica. The climatology includes 8 climate elements - precipitation, wet-day frequency, temperature, diurnal temperature range, relative humidity,sunshine duration, ground frost frequency and windspeed - and was interpolated from a data set of station means for the period centred on 1961 to 1990. Precipitation was first defined in terms of the parameters of the Gamma distribution, enabling the calculation of monthly precipitation at any given return period. The data are compared to an earlier data set at 0.5 degrees latitude/longitude resolution and show added value over most regions. The data will have many applications in applied climatology, biogeochemical modelling, hydrology and agricultural meteorology and are available through the School of Geography Oxford (http://www.geog.ox.ac.uk), the International Water Management Institute “World Water and Climate Atlas” (http://www.iwmi.org) and the Climatic Research Unit (http://www.cru.uea.ac.uk).
Please report any issues or bugs.
License: MIT
Get citation information for getCRUCLdata in R typing
citation(package = "getCRUCLdata")
Please note that the getCRUCLdata project is released with a Contributor Code of Conduct. By participating in the getCRUCLdata project you agree to abide by its terms.
Removes startup message, instead placing information in CITATION file
Reorganises internal functions consolidating functions all in a single file and following a standard naming scheme for all internal functions
Fix bug where tmp
and dtr
could not be returned with tmn
or tmx
raster
stacks
Move rappdirs
to SUGGESTS to fix NOTEs on
https://cran.rstudio.com/web/checks/check_results_getCRUCLdata.html
Fix documentation formatting issues
Enhance stop
messages for user, just print message, not the function that
called it to clarify
rappdirs
plyr
in testsFix ORCID entry in DESCRIPTION per CRAN maintainer's request
Remove Scott as contributor, the code contributed has been removed
Use hoardr for managing cached files
Fixed a bug where the file cache was not in the proper subdirectory. The file
cache has moved to the proper location in a R/getCRUCLdata
location rather
than getCRUCLdata
. You may wish to move files externally to R in order to keep
them in the cache where the package will find them
Use lapply
in place of purrr::map
, purrr is no longer imported
CRU_cache_list()
now superceded bymanage_cache$list()
CRU_cache_details()
now superceded by manage_cache$details()
CRU_cache_delete()
now superceded by manage_cache$delete()
CRU_cache_delete_all()
now superceded by manage_cache$delete_all()
Add startup message regarding data source, use and citation
Include Scott Chamberlain as copyright holder and contributor for file caching functionality
Fix bug where cache
was not specified in internal function, .set_cache()
,
this caused either of the functions fetching data from CRU to fail
Fix bug where cache
directory could not be created on Windows OS machines
Fix bug where tmx was returned when either tmn or tmx was requested for data frame, tmn now returned when requested and tmx now returned when requested. Raster stacks were not affected by this bug
for f in 1:length()
with for f in seq_along()
for better
programming practicesfile.path
in place of paste0
rappdirs::user_config_dir()
was incorrectly used in place of
rappdirs::user_cache_dir()
Use purrr in place of plyr functions
Update DESCRIPTION file to be more complete
Remove use of "%>%" in functions and remove magrittr import
Fix bugs in CITATION file
Format NEWS.md to be more markdown standards compliant
create_CRU_stack()
and create_CRU_df()
now only work with locally
available files. If you need to fetch and create a data frame or raster stack
of the data, please use the new functions, get_CRU_stack()
and
get_CRU_stack()
R >=3.2.0 now required
Data can be cached using either get_CRU_stack()
or get_CRU_df()
for later
use
Improved documentation with examples on mapping and graphing and more detail regarding the data itself
Change the method in which files are downloaded to use httr::GET()
Ingest data using data.table::fread
to decrease the amount of time necessary
to run the functions
Functions check to see if data file(s) have already been downloaded during current R session, if so data file(s) are not requested for download again
Months are returned as a factor object in the tidy data frame
Correct fix bug in raster object generation where the objects were incorrectly cropped
Update documentation with ROxygen 6.0.0
Minor edits to documentation for clarity
Correct documentation to read that the data resolution is 10 minute, not 10 seconds
Correct URLs in DESCRIPTION file
Add required version for PURRR
Add required version for R
Corrected URL pointing to CRU readme.txt file
Renamed to getCRUdata as suggested by CRAN maintainers
Revised description file as requested by CRAN maintainers
Enhanced vignette