Cmd('git') failed due to: exit code(128)

Hi Brent,

The values for "realm" and  "project" were changed after the documentation was produced, so you just need to change the values for "realm" and  "project" in your script i.e.:


import cdsapi

c = cdsapi.Client()

MONTHS = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]

for month in MONTHS:

    result = c.service("tool.toolbox.orchestrator.workflow",

    params= {"realm": "user-apps", "project": "app-c3s-daily-era5-statistics", "version": "master",

    "kwargs": {"dataset": "reanalysis-era5-single-levels", "product_type": "reanalysis","variable": "2m_temperature","statistic": "daily_mean","year": "2020","month": month,"time_zone": "UTC+00:0","frequency": "1-hourly","grid": "2.5/2.5","area": {"lat": [-90, 90], "lon": [-180, 180]}

            },

            "workflow_name": "application"

    })

    c.download(result)

% python3 era5_daily_via_cdsapi_forum_180423.py

2023-04-18 16:10:07,271 INFO Welcome to the CDS

2023-04-18 16:10:07,271 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/tasks/services/tool/toolbox/orchestrator/workflow/clientid-fbb3f759881246c08d9f9ef64416cbd4

2023-04-18 16:10:07,390 INFO Request is queued

2023-04-18 16:18:26,966 INFO Request is completed

2023-04-18 16:18:26,970 INFO Downloading https://download-0019.copernicus-climate.eu/cache-compute-0019/cache/data8/052b32c4-cf41-424c-9f79-e01fd6dec194.nc to 052b32c4-cf41-424c-9f79-e01fd6dec194.nc (1.3M)

2023-04-18 16:18:27,680 INFO Download rate 1.8M/s


 % ncdump -h 052b32c4-cf41-424c-9f79-e01fd6dec194.nc

netcdf \052b32c4-cf41-424c-9f79-e01fd6dec194 {

dimensions:

time = 31 ;

lat = 73 ;

lon = 144 ;

variables:

int64 time(time) ;

time:long_name = "time" ;

time:standard_name = "time" ;

time:axis = "T" ;

time:stored_direction = "increasing" ;

time:type = "double" ;

time:units = "days since 2020-01-01" ;

time:calendar = "proleptic_gregorian" ;

int64 realization ;

realization:long_name = "realization" ;

realization:units = "1" ;

realization:standard_name = "realization" ;

realization:stored_direction = "increasing" ;

realization:type = "integer" ;

double lat(lat) ;

lat:_FillValue = NaN ;

lat:units = "degrees_north" ;

lat:standard_name = "latitude" ;

lat:long_name = "latitude" ;

lat:stored_direction = "decreasing" ;

lat:axis = "Y" ;

lat:positive = "up" ;

lat:type = "double" ;

lat:valid_max = 90. ;

lat:valid_min = -90. ;

double lon(lon) ;

lon:_FillValue = NaN ;

lon:units = "degrees_east" ;

lon:standard_name = "longitude" ;

lon:long_name = "longitude" ;

lon:axis = "X" ;

lon:positive = "up" ;

lon:type = "double" ;

lon:valid_max = 360. ;

lon:valid_min = -180. ;

float t2m(time, lat, lon) ;

t2m:_FillValue = NaNf ;

t2m:long_name = "2 metre temperature" ;

t2m:units = "K" ;

t2m:standard_name = "air_temperature" ;

t2m:comment = "near-surface (usually, 2 meter) air temperature" ;

t2m:cds_magics_style_name = "near-surface-air-temperature" ;

t2m:type = "real" ;

t2m:coordinates = "realization" ;


// global attributes:

:Conventions = "CF-1.7" ;

:institution = "European Centre for Medium-Range Weather Forecasts" ;

:history = "2023-04-18T15:18 GRIB to CDM+CF via cfgrib-0.9.9.1/ecCodes-2.27.0 with {\"source\": \"/nfs/compute-0019/data1/adaptor.mars.internal-1681831066.585602-8010-6-cc816243-dc94-442d-9747-037c4ce046e3.grib\", \"filter_by_keys\": {}, \"encode_cf\": [\"parameter\", \"time\", \"geography\", \"vertical\"]}" ;

:source = "ECMWF" ;

}


This page has more information and examples:

Retrieve daily ERA5/ERA5-Land data using the CDS API


Thanks,

Kevin