MarsRuntimeError when downloading specific dates from reanalysis-era5-complete

MarsRuntimeError when downloading specific dates from reanalysis-era5-complete. Are these dates available or is there something that I am missing in my request?

The specific missing dates from July until Today (19th Sept)

2024-07-04
2024-07-29
2024-07-30
2024-07-31
2024-08-01
2024-08-04
2024-09-02
2024-09-04
2024-09-09

  • Failing using both the old cds and new cds-beta
  • I have tried using a newly created account with different url and keys
  • I have nocache enabled
  • I can successfully download the data for the days in between the above dates
  • I am usually trying to run the cds query for a day at a time but when I tried to run for 3 days with one of the problematic days in the middle (i.e. “date”: “2024-07-03/to/2024-07-05”) the request fails with the same error
  • I was successfully able to download the data for these files last week
  • I am using cdsapi==0.7.2

Example request:

    import cdsapi
    import random

    cds = cdsapi.Client()
    dataset = "reanalysis-era5-complete"
    cds_request = {
        "class": "ea",
        "date": "2024-07-04",
        "expver": "1",
        "levtype": "sfc",
        "param": "167.128",
        "stream": "oper",
        "time": "00/to/23/by/1",
        "type": "an",
        "grid": "N320",
        "nocache": f"{random.randrange(1000):03d}"
    }
    cds_response = cds.retrieve(
        "reanalysis-era5-complete", cds_request, "era_5.grb"
    )

Example API ERROR

response = <Response [400]>

    def cads_raise_for_status(response: requests.Response) -> None:
        if 400 <= response.status_code < 500:
            try:
                error_json = response.json()
            except Exception:
                pass
            else:
                message = "\n".join(
                    [
                        f"{response.status_code} Client Error: {response.reason} for url: {response.url}",
                        error_json_to_message(error_json),
                    ]
                )
>               raise requests.exceptions.HTTPError(message, response=response)
E               requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://cds-beta.climate.copernicus.eu/api/retrieve/v1/jobs/9e108f1e-ca9a-48ec-a533-1abc6a7f0799/results
E               The job has failed.
E               MARS has returned an error, please check your selection.
E               Request submitted to the MARS server:
E               [{'class': ['ea'], 'date': '2024-07-04', 'expver': ['1'], 'grid': 'N320', 'levtype': 'sfc', 'nocache': '088', 'param': '167.128', 'stream': 'oper', 'time': '00/to/23/by/1', 'type': 'an', 'database': 'fdbmarser'}]
E               Full error message:
E               mars - ERROR  - 20240919.142127 - Expected 24, got 0.
E               mars - ERROR  - 20240919.142127 - Request failed
E               mars - ERROR  - 20240919.142127 - Some errors reported (last error -1)
E
E               The job failed with: MarsRuntimeError

Example error from CDS Requests page

MARS has returned an error, please check your selection.
Request submitted to the MARS server:
[{'class': ['ea'], 'date': '2024-07-04', 'expver': ['1'], 'grid': 'N320', 'levtype': 'sfc', 'nocache': '088', 'param': '167.128', 'stream': 'oper', 'time': '00/to/23/by/1', 'type': 'an', 'database': 'fdbmarser'}]
Full error message:
mars - ERROR  - 20240919.142127 - Expected 24, got 0.
mars - ERROR  - 20240919.142127 - Request failed
mars - ERROR  - 20240919.142127 - Some errors reported (last error -1)

I am seeing a similar error frequently and the only recourse is to keep trying - eventually it succeeds. Would be nice if there was an easy way to resubmit the same request directly from the website listing of requests. Here are the specifics of my error. Any feedback for what I can do to reduce/eliminate the occurrence of this error would be appreciated.

Request ID: 54d98a29-63b1-4275-a3aa-13bf4c9129c5
Your user ID:
Trace ID of the error: 2cc70880-8dcd-41a0-a43a-b1195d67c7ba
Catalogue: c3s
Origin: API
Dataset: reanalysis-era5-pressure-levels
Portal: https://cds.climate.copernicus.eu

MARS has returned an error, please check your selection.
Request submitted to the MARS server:

‘levelist’: [‘1’, ‘2’, ‘3’, ‘5’, ‘7’, ‘10’, ‘20’, ‘30’, ‘50’, ‘70’, ‘100’, ‘125’, ‘150’, ‘175’, ‘200’, ‘225’, ‘250’, ‘300’, ‘350’, ‘400’, ‘450’, ‘500’, ‘550’, ‘600’, ‘650’, ‘700’, ‘750’, ‘775’, ‘800’, ‘825’, ‘850’, ‘875’, ‘900’, ‘925’, ‘950’, ‘975’, ‘1000’], ‘dataset’: [‘reanalysis’], ‘time’: [‘00:00:00’, ‘01:00:00’, ‘02:00:00’, ‘03:00:00’, ‘04:00:00’, ‘05:00:00’, ‘06:00:00’, ‘07:00:00’, ‘08:00:00’, ‘09:00:00’, ‘10:00:00’, ‘11:00:00’, ‘12:00:00’, ‘13:00:00’, ‘14:00:00’, ‘15:00:00’, ‘16:00:00’, ‘17:00:00’, ‘18:00:00’, ‘19:00:00’, ‘20:00:00’, ‘21:00:00’, ‘22:00:00’, ‘23:00:00’], ‘param’: [‘129’, ‘157’, ‘133’, ‘130’, ‘131’, ‘132’, ‘135’], ‘class’: [‘ea’], ‘expect’: [‘any’], ‘number’: [‘all’], ‘levtype’: [‘pl’], ‘date’: [‘2025-10-13’, ‘2025-10-14’, ‘2025-10-15’]

Full error message:
mars - ERROR - 20260225.153029 - Failed to write chunked buffer 327596/2076588 (Illegal seek)
mars - ERROR - 20260225.153032 - Mars server task finished in error
mars - ERROR - 20260225.153032 - Double buffer error: Assertion failed: length == buffers_[i].length_ in run, line 292 of /home/deploy/git/mars-server/eckit/src/eckit/io/DblBuffer.cc(RemoteException from Connector[mvr1001,cadsmarsmvr-1001:9701]) [mars]
mars - ERROR - 20260225.153032 - Error code is -2
mars - ERROR - 20260225.153032 - Failed to write chunked header -1/20 (Broken pipe)
mars - ERROR - 20260225.153032 - Last error is -43
mars - ERROR - 20260225.153032 - Failed to write chunked header -1/20 (Broken pipe)
mars - ERROR - 20260225.153032 - Request failed
mars - ERROR - 20260225.153032 - Some errors reported (last error -43)