summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorAlessandro Amici <a.amici@bopen.eu>2018-05-15 20:00:12 +0200
committerAlessandro Amici <a.amici@bopen.eu>2018-05-15 20:00:12 +0200
commit23678c55a90ab8a5bb283b7d66742ca9973d7177 (patch)
treeaf0a4998d87d42d5d00cf743810dea100a6d46a2 /README.rst
parenta326de56227dc90b69ad46785d02eb841e2d0335 (diff)
Initial documentation with a real test retrieve.
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst24
1 files changed, 20 insertions, 4 deletions
diff --git a/README.rst b/README.rst
index 3c6d658..3b57a62 100644
--- a/README.rst
+++ b/README.rst
@@ -10,15 +10,31 @@ Install via `pip` with::
Configure
---------
-Get your API key from the CDS portal and write it into the configuration file::
+Get your UID and API key from the CDS portal at the address https://cds-toolbox-test.bopen.eu/user
+and write it into the configuration file, so it looks like::
+
+ $ cat ~/.cdsapirc
+ url: https://cds-toolbox-test.bopen.eu/api/v2
+ key: <UID>:<API key>
+ verify: 0
+
+Remember to agree to the Terms and Conditions of every dataset that you intend to download.
- $ vim ~/.cdsapirc
Test
----
+Perform a small test retrieve of ERA5 data::
+
$ python
>>> import cdsapi
>>> cds = cdsapi.Client()
- >>> cds.retrieve("insitu-glaciers-extent", {}, "target.data")
- ...
+ >>> cds.retrieve('reanalysis-era5-pressure-levels', {
+ "variable": "temperature",
+ "pressure_level": "1000",
+ "product_type": "reanalysis",
+ "date": "2017-12-01/2017-12-31",
+ "time": "12:00",
+ "format": "grib"
+ }, 'download.grib')
+ >>>