Esgf¶
The search syntax is defined here: http://www.esgf.org/wiki/ESGF_Search_REST_API
It has been simplified to be used from the command line and resemble find_files as closer as possible. But the two command rely on different backends which have different query possibilities.
If you need some files my advise is to first check they are there and how many they are:
$ esgf project=CMIP5 experiment=decadal{1960..1965} variable=tas distrib=false latest=true | wc -l 278
You can check those urls by just not piping the result to wc
(word count)
$ esgf project=CMIP5 experiment=decadal{1960..1965} variable=tas distrib=false latest=true http://cmip3.dkrz.de/thredds/fileServer/cmip5/output1/CCCma/CanCM4/decadal1965/day/atmos/day/r10i1p1/v20120531/tas/tas_day_CanCM4_decadal1965_r10i1p1_19660101-19751231.nc http://cmip3.dkrz.de/thredds/fileServer/cmip5/output1/CCCma/CanCM4/decadal1965/day/atmos/day/r10i2p1/v20120531/tas/tas_day_CanCM4_decadal1965_r10i2p1_19660101-19751231.nc ...
And you can get the wget script, a bash script written around wget to simplify data download using this:
$ esgf --download-script /tmp/scrip.wget project=CMIP5 experiment=decadal{1960..1965} variable=tas distrib=false latest=true Download script successfully saved to /tmp/scrip.wget
By the way, the search looked for all files stored locally at DKRZ (distrib=false
) holding the latest version (latest=true
) of the variable tas (variable=tas
) for the experiments decadal1960 to decadal1965 (this is a bash construct and not part of the search api!)
help¶
$ esgf --help esgf [opt] query opt: -d, --debug : Turn on debuging info --show-facet : <list> List all values for the given facet (might be defined multiple times). The results show the possible values of the selected facet according to the given constraints and the number of *datasets* (not files) that selecting such value as a constraint will result (faceted search) --datasets : List the name of the datasets instead of showing the urls. --opendap : Show Opendap endpoints instead of the http default ones (or skip them if none found) --gridftp : Show Gridftp endpoints instead of the http default ones (or skip them if none found) --download-script : <file> Download wget_script for getting the files instead of displaying anything (only http) --query : <list> Display results from <list> queried fields -h, --help : Show this help The query is of the form key=value. the key might be repeated and/or negated with the '_not_' suffix (e.g. model_not_=MPI-ESM-LR experiment=decadal2000 experiment=decadal2001) Simple query: esgf model=MPI-ESM-LR experiment=decadal2001 variable=tas distrib=False The search API is described here: http://www.esgf.org/wiki/ESGF_Search_REST_API Some special query keys: distrib: (*true*, false) search globally or only at DKRZ (MPI data and replicas) latest : (true, false, *unset*) search for the latest version, older ones or all. replica: (true, false, *unset*) search only for replicas, non-replicas, or all.