summaryrefslogtreecommitdiff
path: root/example-era5.py
diff options
context:
space:
mode:
Diffstat (limited to 'example-era5.py')
-rwxr-xr-xexample-era5.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/example-era5.py b/example-era5.py
index bafd5a0..d078c5d 100755
--- a/example-era5.py
+++ b/example-era5.py
@@ -10,11 +10,9 @@
import cdsapi
-
c = cdsapi.Client()
-
-c.retrieve("reanalysis-era5-pressure-levels",
+r = c.retrieve("reanalysis-era5-pressure-levels",
{
"variable": "temperature",
"pressure_level": "250",
@@ -22,5 +20,8 @@ c.retrieve("reanalysis-era5-pressure-levels",
"date": "2017-12-01/2017-12-31",
"time": "12:00",
"format": "grib"
- },
- "dowload.grib")
+ })
+
+r.download("dowload.grib")
+print(r)
+r.delete()