Project

General

Profile

Esgf-client » History » Version 5

Herve Caumont, 2013-11-05 16:46

1 1 Herve Caumont
h1. ESGFClient
2
3 2 Herve Caumont
{{>toc}}
4
5 1 Herve Caumont
h2. Overview
6
7 5 Herve Caumont
ESGFClient is a Command Line tool 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.
8 1 Herve Caumont
9
h2. Installation
10
11
The user can install the ESGFClient following these easy steps:
12
13
<pre><code class="XML">
14
yum install esgf-tools
15
</code></pre>
16
17
and test the installation with
18
19
<pre><code class="XML">
20
ESGFClient --help
21
</code></pre>
22
23
h2. Usage
24
25
These are the options given:
26
<pre><code class="XML">
27
Options:
28 5 Herve Caumont
  -u, --uri=VALUE            RDF's URI to parse and download
29
  -o, --output=VALUE         Output folder
30
  -r, --resource=VALUE       Resource to download
31
  -O, --openid=VALUE         OpenId used to access.
32
  -p, --password=VALUE       Password for OpenId used to access.
33
  -s, --dtstart=VALUE        The beginning of the time query  to restrict
34
                               the subset of data to download. YYYY-MM-
35
                               DDTHH:mm:ssZ.
36
  -e, --dtend=VALUE          The end of the time query  to restrict the
37
                               subset of data to download. YYYY-MM-DDTHH:mm:ssZ.
38
  --zM, --zmax=VALUE         Maximum level (z)
39
  --zm, --zmin=VALUE         Minimum level (z). By default it's equal to 0
40
  -h, --help                 Show this message and exit 
41 1 Herve Caumont
</code></pre>
42
43
h2. Download from rdf url
44
45 5 Herve Caumont
The Client allows the user to download only the OpenDAP online resources.
46
It tries to retrieve from the RDF file all the parameters needed for a query: a time start and a time stop (for temporal queries), the level range (z dimension if it's provided by the variable) and the variable to query.
47 1 Herve Caumont
48
Example:
49
<pre><code class="XML">
50 5 Herve Caumont
ESGFClient -u "http://geowow.terradue.com/catalogue/esgf/thetao/rdf?time_frequency=mon&experiment=rcp85&ensemble=r1i1p1&institute=MRI&count=1" -O "https://pcmdi9.llnl.gov/esgf-idp/openid/user" -p password -s 2006-01-17 -e 2008-12-16 -zmin 500 -zmax 700 -o "./tmp/"
51 1 Herve Caumont
</code></pre>
52
53 5 Herve Caumont
In order to build these correct OpenDAP query, the time search and level parameters are converted to a set of indexes needed to make a spatial and temporal query.
54 1 Herve Caumont
55 5 Herve Caumont
The download is based on a revised wget script built upon a template called *wgetTemplate.sh*, filled with the URLs to be gotten.
56 1 Herve Caumont
57 5 Herve Caumont
Then the client run the WGET script, that saves the files into the file system.
58 1 Herve Caumont
59 5 Herve Caumont
All these files are protected by OpenID, so the user has to give his credentials by specifying the "--openid" option an --password. Conversely the security certificates are automatically downloaded by the WGET script.
60 1 Herve Caumont
61 5 Herve Caumont
After the .dods file is downloaded, an internal script converts it to a NetCDF file, according with the .das description file too.
62 1 Herve Caumont
63 5 Herve Caumont
h2. OpenDAP limits
64 1 Herve Caumont
65 5 Herve Caumont
Since this version of the ESGFClient is exclusively based on the OpenDAP servers, there is a size limit for every download. It is set to 500 MByte and if the query reaches this limit, the server returns a 403 error and the download fails. This limit can be respected by setting the right temporal and level slices of your sub-datasets.