ecmwf / ecmwf-opendata

A package to download ECMWF open data
Apache License 2.0
174 stars 27 forks source link

Change of file paths - Client.Retrive does not work anymore #43

Open CalipsoAdara opened 5 months ago

CalipsoAdara commented 5 months ago

Hello, it appears that ECMWF recently changed the file paths by adding new folders, so the "client.retrieve" function is not able to find the correct files.

Previous path (example) https://data.ecmwf.int/forecasts/20240425/00z/0p4-beta/enfo/20240425000000-174h-enfo-ef.index

New path: (with new IFS folder) https://data.ecmwf.int/forecasts/20240425/00z/ifs/0p4-beta/enfo/20240425000000-174h-enfo-ef.index

This change was made around the 23 of April, 2024.

malmistry commented 2 months ago

Any update on this? I am also not able to re-run my earlier script that was working fine.

from ecmwf.opendata import Client

client = Client(source="ecmwf")

print(client.latest( type="fc", step=24, param=["2t", "msl"], target="data.grib2", ))

gives an error

ValueError: Cannot establish latest date for {'date': ['2024-07-11 18:00:00'], 'resol': ['0p4-beta'], 'stream': ['oper'], 'type': ['fc'], 'step': ['24'], '_url': ['https://data.ecmwf.int/forecasts']}

malmistry commented 2 months ago

The above error is resolved by updating the ecmwf-opendata package to the latest version. I had to uninstall and install using pip. The file paths are automatically handled correctly by source = 'ecmwf'

client = Client(source="ecmwf")

print(client.latest( type="fc", step=24, param=["2t", "msl"], target="data.grib2", ))