# cdsapi: regular download bugs with cdsapi

**URL:** <https://forum.ecmwf.int/t/cdsapi-regular-download-bugs-with-cdsapi/13582>\
**Category:** Access and Login\
**Tags:** cds, era5-land\
**Created:** [22 June 2025 18:40 UTC](https://forum.ecmwf.int/t/cdsapi-regular-download-bugs-with-cdsapi/13582 "2025-06-22T18:40:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastien\_biner](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@sebastien\_biner](https://forum.ecmwf.int/u/sebastien_biner)\
**Post date:** [22 June 2025 18:40 UTC](https://forum.ecmwf.int/t/cdsapi-regular-download-bugs-with-cdsapi/13582/1 "2025-06-22T18:40:58Z")

</div>

Hi, I use `csdapi`since years to download ERA5-Land data daily. I did not notice any major problem previously but since a while I have regular problems which results in retrieving only part of the time available for a given variable.

For example, the following code gives me the wanted variable for june 1st to june 4 only:

```auto
dataset = "reanalysis-era5-land"
request = {
    "variable": ["snow_depth_water_equivalent"],
    "year": "2025",
    "month": "06",
    "day": [
        "01",
        "02",
        "03",
        "04",
        "05",
        "06",
        "07",
        "08",
        "09",
        "10",
        "11",
        "12",
        "13",
        "14",
        "15",
        "16",
        "17",
        "18",
        "19",
        "20",
        "21",
        "22",
        "23",
        "24",
        "25",
        "26",
        "27",
        "28",
        "29",
        "30",
        "31",
    ],
    "time": ["00:00"],
    "data_format": "grib",
    "download_format": "unarchived",
    "area": [56.4, -82.4, 42.7, -61.1],
    # [70, -90, 40, -50],
}

target = "test.grib"
client = cdsapi.Client()
client.retrieve(dataset, request, target)

```

while the following command (just using a limited day array) gives me a file that goes from june 1st to june 14.

```auto
dataset = "reanalysis-era5-land"
request = {
    "variable": ["snow_depth_water_equivalent"],
    "year": "2025",
    "month": "06",
    "day": [
        "01",
        "02",
        "03",
        "04",
        "05",
        "06",
        "07",
        "08",
        "09",
        "10",
        "11",
        "12",
        "13",
        "14",
        # "15",
        # "16",
        # "17",
        # "18",
        # "19",
        # "20",
        # "21",
        # "22",
        # "23",
        # "24",
        # "25",
        # "26",
        # "27",
        # "28",
        # "29",
        # "30",
        # "31",
    ],
    "time": ["00:00"],
    "data_format": "grib",
    "download_format": "unarchived",
    "area": [56.4, -82.4, 42.7, -61.1],
    # [70, -90, 40, -50],
}
target = "test2.grib"
client = cdsapi.Client()
client.retrieve(dataset, request, target)

```

This is just an example of a request that worked previously and that suddenly does not. In the recent months I had other similar stories, for example I had to go from `"month": "6"` to `"month": "06"` or else I had incomplete dataset.

I can live with the fact that a “bad” request does give a “bad” result, but the unstability of the results of cdsapi requests (i.e. it worked but does not anymore) is a problem for me and did take me quite some time to deal with.

I wonder if other users had similar experience and if I am missing something with my way of using `cdsapi`

FYI : I am using python 3.9 and cdsapi 0.7.6

---

<div class="post-metadata">

**Author:** ![Kevin\_Marsh](https://forum.ecmwf.int/user_avatar/forum.ecmwf.int/kevin_marsh/32/368_2.png) [@Kevin\_Marsh](https://forum.ecmwf.int/u/Kevin_Marsh)\
**Post date:** [23 June 2025 09:42 UTC](https://forum.ecmwf.int/t/cdsapi-regular-download-bugs-with-cdsapi/13582/2 "2025-06-23T09:42:44Z")

</div>

Hi Sebastien, I suspect this is the CDS cache, whereby if you run the same request in a short period of time, you will get the same data (regardless of if new data has become available in the meantime) - see [How to avoid the CDS cache issue](https://forum.ecmwf.int/t/how-to-avoid-the-cds-cache-issue/905)  
Thanks,  
Kevin

---

<div class="post-metadata">

**Author:** ![sebastien\_biner](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@sebastien\_biner](https://forum.ecmwf.int/u/sebastien_biner)\
**Post date:** [26 June 2025 20:10 UTC](https://forum.ecmwf.int/t/cdsapi-regular-download-bugs-with-cdsapi/13582/3 "2025-06-26T20:10:48Z")

</div>

Thanks a lot for this help.

A first test gives promising results. I will come back in a few days to document if this seems to take care of the problem “permanently” or not.

Cheers.

---

<div class="post-metadata">

**Author:** ![sebastien\_biner](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@sebastien\_biner](https://forum.ecmwf.int/u/sebastien_biner)\
**Post date:** [2 July 2025 17:55 UTC](https://forum.ecmwf.int/t/cdsapi-regular-download-bugs-with-cdsapi/13582/4 "2025-07-02T17:55:45Z")

</div>

Hi,

I just want to confirm that this solution seems to fix my problem. The download has been going fine in the last few days which is a first since quite a while.

Many thanks for the help.

Cheers.
