[Python] Atlite Cutout Function Fails with HTTPError 404 (ERA5 Data Not Found)

Discussão em 'Python' iniciado por Stack, Fevereiro 2, 2025.

  1. Stack

    Stack Membro Participativo

    I am using Atlite to download weather data for a specific region using a shapefile. My shapefile is correct (as I plotted it), and it has the required CRS (EPSG:4326). However, when I run the cutout function, I receive the error below:


    Error: HTTPError Traceback (most recent call last)

    File c:\Users\Khizar Musharaf\anaconda3\envs\esm-ws-24-25\Lib\site-packages\cdsapi\api.py:459, in Client._api(self, url, request, method) 458 try: --> 459 result.raise_for_status() 460 reply = result.json()

    File c:\Users\Khizar Musharaf\anaconda3\envs\esm-ws-24-25\Lib\site-packages\requests\models.py:1024, in Response.raise_for_status(self) 1023 if http_error_msg: -> 1024 raise HTTPError(http_error_msg, response=self)

    HTTPError: 404 Client Error: Not Found for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels

    During handling of the above exception, another exception occurred:

    Exception Traceback (most recent call last) Cell In[60], line 1 ----> 1 cutout.prepare()

    File c:\Users\Khizar Musharaf\anaconda3\envs\esm-ws-24-25\Lib\site-packages\atlite\data.py:115, in maybe_remove_tmpdir..wrapper(*args, **kwargs)

    113 kwargs["tmpdir"] = mkdtemp()
    114 try:
    --> 115 res = func(*args, **kwargs)
    116 finally:
    117 rmtree(kwargs["tmpdir"])
    ...
    --> 481 raise Exception(error)
    482 else:
    483 raise


    Exception: Not Found
    ​

    What I've checked so far:

    • The .cdsapirc file is correctly placed in my Users folder.
    • My UID and Key are correct.
    • I have accepted the license on the CDS website.
    • Both Atlite and CDS API are updated.
    • I tried downloading the data manually using the API request code, but I still get the same error.

    Continue reading...

Compartilhe esta Página