This repository was archived by the owner on Nov 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -16,32 +16,30 @@ Draft Python API:
16
16
>> > client = cads_api_client.ApiClient()
17
17
>> > assert client.check_authentication()
18
18
19
- >> > collection = client.get_collection(" reanalysis-era5-pressure-levels" )
19
+ >> > collection_id = " reanalysis-era5-pressure-levels"
20
+ >> > collection = client.get_collection(collection_id)
20
21
>> > collection.end_datetime
21
22
datetime.datetime(... )
22
23
24
+ >> > request = {
25
+ ... " product_type" : " reanalysis" ,
26
+ ... " variable" : " temperature" ,
27
+ ... " year" : " 2022" ,
28
+ ... " month" : " 01" ,
29
+ ... " day" : " 01" ,
30
+ ... " level" : " 1000" ,
31
+ ... " time" : " 00:00" ,
32
+ ... }
23
33
>> > client.retrieve(
24
34
... collection_id = " reanalysis-era5-pressure-levels" ,
25
- ... product_type = " reanalysis" ,
26
- ... variable = " temperature" ,
27
- ... year = " 2022" ,
28
- ... month = " 01" ,
29
- ... day = " 01" ,
30
- ... level = " 1000" ,
31
- ... time = " 00:00" ,
35
+ ... ** request,
32
36
... target = " tmp1-era5.grib" ,
33
37
... ) # blocks
34
38
' tmp1-era5.grib'
35
39
36
40
>> > remote = client.submit(
37
41
... collection_id = " reanalysis-era5-pressure-levels" ,
38
- ... variable = " temperature" ,
39
- ... product_type = " reanalysis" ,
40
- ... year = " 2021" ,
41
- ... month = " 01" ,
42
- ... day = " 02" ,
43
- ... time = " 00:00" ,
44
- ... level = " 1000" ,
42
+ ... ** request,
45
43
... ) # doesn't block
46
44
>> > remote.request_uid
47
45
' ...'
You can’t perform that action at this time.
0 commit comments