Downloads available monthly CMIP5 simulations from ESGF data portal. You need an account at any ESGF node (see http://cmip-pcmdi.llnl.gov/cmip5/data_getting_started.html). This function creates subdirectories for each climate simulation in the specified folder, automatically recieves the bash scripts needed for the partiular simulation-variable-experiment combination and then executes the bash scripts one by one. An external PYTHON script is called for this task. If either data or bash-scripts exist, the download will be skipped. Use this function with care. You need a working internet connection for this function to work.
Directory location for downloading CMIP5 data and bash scripts. ATTENTION: subdirectories for each model-experiment combination will be created!
Short variable names for meteorological parameters of interest (e.g. "tas" for 2m air temperature or "pr" for precipitation amount). See e.g. the IPCC Standard Output from GCMs (http://www-pcmdi.llnl.gov/ipcc/standard_output.html).
Experiment of the climate simulation (e.g. c("historical", "rcp45"), see Taylor (2012) for a detailed description.
Climate simulations to be downloaded. If no models are provided (default), all available simulations will be retrieved. See the "Model" column at http://cmip-pcmdi.llnl.gov/cmip5/availability.html for available simulations. ATTENTION: This is a considerable amount of data, so watch out for your diskspace!
Firstly you need an ESGF account. If you do not have any, start here: http://cmip-pcmdi.llnl.gov/cmip5/data_getting_started.html
This function calls an external python script which
looks for the latest CMIP5 models at ESGF http://pcmdi9.llnl.gov
generates a local directory structure where the data will be stored
receives the corresponding bash files from ESGF
executes the bash files.
You can find the location of the script with
system.file("exec", "CMIP5_downloader.py", package="wux")
This function is an alternative to downloading the corresponding models by point-and-click on the ESGF node (as http://pcmdi9.llnl.gov or http://esgf-data.dkrz.de), as it takes advantage of the ESGF search API mechanism for automated data screening and wget-script generation. For thei nterested user more information on downloading strategies is available at https://github.com/ESGF/esgf.github.io/wiki/ESGF_Data_Download_Strategies.
This function automatically creates new directories on your system, downloads wget scripts, flags them execueable and runs them, which can download quite some data.
Use with care, your harddisk might get stuffed. This tools works on unix platforms only.
Thomas Mendlik [email protected]
Karl E. Taylor, Ronald J. Stouffer, and Gerald A. Meehl, 2012: An Overview of CMIP5 and the Experiment Design. Bull. Amer. Meteor. Soc., 93, 485-498. doi: http://dx.doi.org/10.1175/BAMS-D-11-00094.1
1 2 3 4 5 6 7 8 9 10 11 12
## Not run: ## download temperature fields of two example GCMs (NorESM1-M and ## CanESM2) with the RCP 8.5 and the historical run ## into your temporary directory. This command will create a folder ## "CMIP5" in "~/tmp" with two subfolders for each model again with ## two subfolders for each experiment. CMIP5fromESGF(save.to = "~/tmp/CMIP5/", models = c("NorESM1-M", "CanESM2"), variables = c("tas"), experiments= c("historical", "rcp85")) ## End(Not run)
Loading required package: sp Loading required package: ncdf4 Loading required package: reshape Loading required package: abind Loading required package: fields Loading required package: spam Loading required package: dotCall64 Loading required package: grid Spam version 2.1-1 (2017-07-02) is loaded. Type 'help( Spam)' or 'demo( spam)' for a short introduction and overview of this package. Help for individual functions is also obtained by adding the suffix '.spam' to the function name, e.g. 'help( chol.spam)'. Attaching package: 'spam' The following objects are masked from 'package:base': backsolve, forwardsolve Loading required package: maps WUX runtime version: 2.2-1 sh: 1: python: Permission denied sh: 1: python: Permission denied sh: 1: python: Permission denied sh: 1: python: Permission denied
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.