| esgf_query {epwshiftr} | R Documentation |
Query CMIP6 data using ESGF search RESTful API
Description
Query CMIP6 data using ESGF search RESTful API
Usage
esgf_query(
activity = "ScenarioMIP",
variable = c("tas", "tasmax", "tasmin", "hurs", "hursmax", "hursmin", "pr", "rsds",
"rlds", "psl", "sfcWind", "clt"),
frequency = "day",
experiment = c("ssp126", "ssp245", "ssp370", "ssp585"),
source = c("AWI-CM-1-1-MR", "BCC-CSM2-MR", "CESM2", "CESM2-WACCM", "EC-Earth3",
"EC-Earth3-Veg", "GFDL-ESM4", "INM-CM4-8", "INM-CM5-0", "MPI-ESM1-2-HR",
"MRI-ESM2-0"),
variant = "r1i1p1f1",
replica = FALSE,
latest = TRUE,
resolution = c("100 km", "50 km"),
type = "Dataset",
limit = 10000L,
data_node = NULL
)
Arguments
activity |
A character vector indicating activity identifiers. Default:
|
variable |
A character vector indicating variable identifiers. The 12
most related variables for EPW are set as defaults. If
|
frequency |
A character vector of sampling frequency. If
|
experiment |
A character vector indicating root experiment identifiers.
The Tier-1 experiment of activity ScenarioMIP are set as defaults.
If |
source |
A character vector indicating model identifiers. Defaults are
set to 11 sources which give outputs of all 4 experiment of activity
ScenarioMIP with daily frequency, i.e. |
variant |
A character vector indicating label constructed from 4
indices stored as global attributes in format
|
replica |
Whether the record is the "master" copy, or a replica. Use
|
latest |
Whether the record is the latest available version, or a
previous version. Use |
resolution |
A character vector indicating approximate horizontal
resolution. Default: |
type |
A single string indicating the intrinsic type of the record.
Should be either |
limit |
An integer indicating the maximum of matched records to return.
Should be <= 10,000. Default: |
data_node |
A character vector indicating data nodes to be queried.
Default to |
Details
The Earth System Grid Federation (ESGF) is an international collaboration for the software that powers most global climate change research, notably assessments by the Intergovernmental Panel on Climate Change (IPCC).
The ESGF search service exposes a RESTful URL that can be used by clients to
query the contents of the underlying search index, and return results
matching the given constraints. With the distributed capabilities of the ESGF
search, the URL at any Index Node can be used to query that Node only, or all
Nodes in the ESGF system. esgf_query() uses the
LLNL (Lawrence Livermore National Laboratory) Index Node.
The core Controlled Vocabularies (CVs) for use in CMIP6, including all activities, experiment, sources (GCMs), frequencies can be found at the WCRP-CMIP/CMIP6_CVs GitHub repo.
Value
A data.table::data.table with an attribute named response which
is a list converted from json response. If no matched data is found, an empty
data.table is returned. Otherwise, the columns of returned data varies based
on the type:
If
"Dataset", returned columns are:No. Column Type Description 1 dataset_idCharacter Dataset universal identifier 2 mip_eraCharacter Activity's associated CMIP cycle. Will always be "CMIP6"3 activity_drsCharacter Activity DRS (Data Reference Syntax) 4 institution_idCharacter Institution identifier 5 source_idCharacter Model identifier 6 experiment_idCharacter Root experiment identifier 7 member_idCharacter A compound construction from sub_experiment_idandvariant_label8 table_idCharacter Table identifier, i.e. sampling frequency identifier 9 frequencyCharacter Sampling frequency 10 grid_labelCharacter Grid identifier 11 versionCharacter Approximate date of model output file 12 nominal_resolutionCharacter Approximate horizontal resolution 13 variable_idCharacter Variable identifier 14 variable_long_nameCharacter Variable long name 15 variable_unitsCharacter Units of variable 16 data_nodeCharacter Data node to download the model output file 17 dataset_pidCharacter A unique string that helps identify the dataset If
"File", returned columns are:No. Column Type Description 1 file_idCharacter Model output file universal identifier 2 dataset_idCharacter Dataset universal identifier 3 mip_eraCharacter Activity's associated CMIP cycle. Will always be "CMIP6"4 activity_drsCharacter Activity DRS (Data Reference Syntax) 5 institution_idCharacter Institution identifier 6 source_idCharacter Model identifier 7 experiment_idCharacter Root experiment identifier 8 member_idCharacter A compound construction from sub_experiment_idandvariant_label9 table_idCharacter Table identifier, i.e. sampling frequency identifier 10 frequencyCharacter Sampling frequency 11 grid_labelCharacter Grid identifier 12 versionCharacter Approximate date of model output file 13 nominal_resolutionCharacter Approximate horizontal resolution 14 variable_idCharacter Variable identifier 15 variable_long_nameCharacter Variable long name 16 variable_unitsCharacter Units of variable 17 datetime_startPOSIXct Start date and time of simulation 18 datetime_endPOSIXct End date and time of simulation 19 file_sizeCharacter Model output file size in Bytes 20 data_nodeCharacter Data node to download the model output file 21 file_urlCharacter Model output file download url from HTTP server 22 tracking_idCharacter A unique string that helps identify the output file
References
https://github.com/ESGF/esgf.github.io/wiki/ESGF_Search_REST_API
Examples
## Not run:
esgf_query(variable = "rss", experiment = "ssp126", resolution = "100 km", limit = 1)
esgf_query(variable = "rss", experiment = "ssp126", type = "File", limit = 1)
## End(Not run)