From 23678c55a90ab8a5bb283b7d66742ca9973d7177 Mon Sep 17 00:00:00 2001 From: Alessandro Amici Date: Tue, 15 May 2018 20:00:12 +0200 Subject: Initial documentation with a real test retrieve. --- README.rst | 24 ++++++++++++++++++++---- 1 file 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: : + 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') + >>> -- cgit v1.2.3