Closed Figas23 closed 2 weeks ago
Hi there,
Looks like it's a breaking change in the new CDS. It works fine if you cast the year value to string. I.e., do this:
collection_id = "satellite-land-cover"
requests = [
{
"variable": "all",
"format": "zip",
"version": "v2_0_7cds" if year < 2016 else "v2_1_1",
"year": str(year),
}
for year in years
]
I will report this to ECMWF in case it's a bug, but the snippet above should allow you to access the data. Let me know if it works fine.
(I had a typo in my previous message. Make sure you cast the year to string: str(year)
)
Hey there
Thank you for your help. It worked.
Kind regards, Luis
Notebook description
Hello. I am having an error downloading the "satellite-land-cover" dataset in the beginning of my notebook.
Years to download
years = [1992, 2020]
Region of interest (Iberian Peninsula)
lon_slice = slice(-10, 4) lat_slice = slice(45, 35)
List of requests to retrieve data
collection_id = "satellite-land-cover" requests = [ { "variable": "all", "format": "zip", "version": "v2_0_7cds" if year < 2016 else "v2_1_1", "year": year, } for year in years ]
Download and regionalize by AoI
ds = download.download_and_transform( collection_id, requests, transform_func=utils.regionalise, transform_func_kwargs={"lon_slice": lon_slice, "lat_slice": lat_slice}, ) ds = ds.assign_coords(year=ds["time"].dt.year).swap_dims(time="year").drop("time")
But when I try to run the cell I get this error:
I don't seem to understand what the problem might be since I have accepted all the licences required to download this dataset and I have been able to download other datasets such as E-OBS. I would appreciate the help on this matter.
Kind regards
Notebook link or upload
C3S2_D520.5.3.2b_Quality_Assessment_User_Questions_LULC_UQ1.zip
Anything else we need to know?
No response
Environment