Esgf-client » History » Revision 3
« Previous |
Revision 3/7
(diff)
| Next »
Herve Caumont, 2013-09-18 12:31
ESGFClient¶
- Table of contents
- ESGFClient
Overview¶
ESGFClient is a Command Line Interface written in C# able to download products from the "ESGF Data Search" getting as input the location of a RDF file or a list of single product's urls.
Installation¶
The user can install the ESGFClient following these easy steps:
yum install esgf-tools
and test the installation with
ESGFClient --help
Usage¶
These are the options given:
Options:
-f, --file=VALUE File RDF to parse
-F, --Force Force the whole rdf's resources
-O, --OpenDAP Download ONLY the OpenDAP resources
-u, --url=VALUE Url to download
-o, --openid=VALUE OpenId used to access.
-p, --password=VALUE Password OpenId used to access.
-b, --bbox=VALUE bounding box to restrict the file search and
the file size (only with OpenDAP service). Use
west, south, east, north .
-s, --dtstart=VALUE the beginning of the time query. YYYY-MM-
DDTHH:mm:ssZ .
-e, --dtend=VALUE the end of the time query. YYYY-MM-DDTHH:mm:ssZ
.
-t, --basetime=VALUE the start of time coverage of the Dataset. YYYY-
MM-DDTHH:mm:ssZ .
-v, --variable=VALUE variable
-h, --help show this message and exit
Download from rdf url¶
The --file option allows the user to automatically parse an rdf response from the ESGFGateway, in order to find all downloadable online resources, HTTP or OpenDAP.
In the case of OpenDAP resources, the Client try to retrieve from the RDF file all the parameters needed for a query: a time start and a time stop (for temporal queries), a bounding box (for spatial queries) and the variable to query.
All these files are protected by OpenID, so the user has to give his credentials by specifying the "--openid" option an --password. If you don't have an OpenID account visit the page https://pcmdi9.llnl.gov/esgf-web-fe/createAccount. Conversely the security certificates are automatically downloaded by the WGET script.
Example:
ESGFClient -f "http://geowow.terradue.com/catalogue/cmip5rcp/zos/rdf?bbox=-111,42,-119,43&startTime=1962-10-01T12:00:00Z&stopTime=1963-01-01T12:00:00Z&startPage=0&count=3" -o "https://pcmdi9.llnl.gov/esgf-idp/openid/username" -p "password" -F
In order to build these correct OpenDAP query, the input bounding box and the time search parameters are converted to a set of indexes needed to make a spatial and temporal query.
Download user defined resources¶
The --url option is used to download a user defined resource, by specifying also the temporal coverage and spatial bounding box.
Example:
HTTP resource:¶
ESGFClient -u "http://bcccsm.cma.gov.cn/thredds/fileServer/cmip5_data/output/BCC/bcc-csm1-1/decadal2005/mon/ocean/zos/r1i1p1/zos_Omon_bcc-csm1-1_decadal2005_r1i1p1_200601-203512.nc" -o "https://pcmdi9.llnl.gov/esgf-idp/openid/username" -p "password"
OpenDAP resource:¶
ESGFClient -u "http://bcccsm.cma.gov.cn/thredds/dodsC/cmip5.output1.BCC.bcc-csm1-1.decadal2005.mon.ocean.Omon.r1i1p1.zos.1.aggregation" --bbox "-111,42,-112,43" --dtstart "2006-02-16T12:00:00Z" --dtend "2006-05-16T12:00:00Z" --basetime "2006-01-16T12:00:00Z" -o "https://pcmdi9.llnl.gov/esgf-idp/openid/username" -p "password"
The download is based on a revised wget script built upon a template called wgetTemplate.sh, filled with the URLs to be gotten.
Then the client run the WGET script, that saves the files into the file system.
The --Force option allows to specify if all the HTTP and OpenDAP online resources from the RDF should be download or simple the first.
Updated by Herve Caumont about 11 years ago · 3 revisions