Hi, I am using the cdsapi python package to load era5 data.

I am basically doing


cds_client = cdsapi.Client(quiet=False, url=url, key=key, verify=True)
params = {'product_type': 'reanalysis',
'time': ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'],
'format': 'netcdf',
'grid': [0.25, 0.25],
'variable': 'total_precipitation',
'dates': ['2022-11-10'],
'area': [x, x, x, x]}
fl = cds_client.retrieve("reanalysis-era5-single-levels", params)

(I replaced the area data by x's)

leading to

Welcome to the CDS
Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels
Request is queued
Request is failed
Message: the request you have submitted is not valid
Reason: None of the data you have requested is available yet, please revise the period requested. The latest date available for this dataset is: 2022-12-31 11:21:12.432616
Traceback (most recent call last):
File "/opt/cdstoolbox/cdscompute/cdscompute/cdshandlers/services/handler.py", line 59, in handle_request
result = cached(context.method, proc, context, context.args, context.kwargs)
File "/opt/cdstoolbox/cdscompute/cdscompute/caching.py", line 108, in cached
result = proc(context, *context.args, **context.kwargs)
File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 124, in __call__
return p(*args, **kwargs)
File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 60, in __call__
return self.proc(context, *args, **kwargs)
File "/home/cds/cdsservices/services/mars/mars.py", line 52, in internal
return mars(context, request, **kwargs)
File "/home/cds/cdsservices/services/mars/mars.py", line 18, in mars
requests, info = preprocess_request(context, request, temp, **kwargs)
File "/home/cds/cdsservices/services/mars/preprocess_request.py", line 31, in preprocess_request
requests, fullconfig.get('embargo'), cacheable
File "/home/cds/cdsservices/services/mars/preprocess_request.py", line 105, in implement_embargo
f'The latest date available for this dataset is: {embargo_datetime}', ''
cdsinf.exceptions.BadRequestException: None of the data you have requested is available yet, please revise the period requested. The latest date available for this dataset is: 2022-12-31 11:21:12.432616


This exact procedure worked before. The last time it worked for me was on the 5th of December. Does someone have an idea what is going wrong?
Thanks a lot in advance!




3 Comments

  1. After some experimenting I found the issue: In the parameters, if I replace 'dates': ['2022-11-10'] with 'year': 2020, 'day': '10', 'month': '11', everything works nicely.

    It seems like there was an update on the 5th of December on the server that broke the ability to query with the 'dates' parameter, which also raises a weird error message.

  2. Hello,

    Thank you for the message. I have the same issue with "dates".

    My script was working but 

     r = c.retrieve(
            'reanalysis-era5-single-levels',
            {
                'variable': ['10m_u_component_of_wind', '10m_v_component_of_wind', '2m_dewpoint_temperature',
                             '2m_temperature', 'total_cloud_cover'],
                'product_type': 'reanalysis',
                "dates": "2022-01-01/to/2022-01-05",
                'area': cg.africa_zone,
                'time': [
                    '00:00',
                    '03:00',
                    '06:00',
                    '09:00',
                    '12:00',
                    '15:00',
                    '18:00',
                    '21:00',
                ],
                'grid': '0.25/0.25',
                'format': 'netcdf'
            })


     "dates": "2022-01-01/to/2022-01-05", is not working. How to put a period now.

     Error message: 2023-04-03 17:34:38,232 ERROR Reason:  None of the data you have requested is available yet, please revise the period requested. The latest date available for this dataset is: 2023-03-29 16:34:04.153407
    Exception: the request you have submitted is not valid. None of the data you have requested is available yet, please revise the period requested. The latest date available for this dataset is: 2023-03-29 16:34:04.153407.

  3. Hi Tim, Henri

    Its best to use the keywords as shown on the CDS download page for a given dataset - in this case  'year', 'day', 'month', is the best form to use for specifying dates,

    Thanks,

    Kevin