ecmwf / cdsapi

Python API to access the Copernicus Climate Data Store (CDS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to request snow cover and lack ice depth of ERA5-Land

chenyangkang opened this issue · comments

What happened?

I got this when requesting the snow cover and lack ice depth layers:

2024-03-28 19:18:10,448 INFO Welcome to the CDS
2024-03-28 19:18:10,449 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels
2024-03-28 19:18:10,749 INFO Request is queued
2024-03-28 20:35:44,810 INFO Request is failed
2024-03-28 20:35:44,810 ERROR Message: the request you have submitted is not valid
2024-03-28 20:35:44,811 ERROR Reason: Ambiguous : snow_cover could be SNOW EVAPORATION or SNOW EVAPORATION VARIABLE RESOLUTION; Ambiguous : lack_ice_depth could be LEAF AREA INDEX LOW VEGETATION or LEAF AREA INDEX HIGH VEGETATION; No request
2024-03-28 20:35:44,811 ERROR Traceback (most recent call last):
2024-03-28 20:35:44,811 ERROR File "/opt/cdstoolbox/cdscompute/cdscompute/cdshandlers/services/handler.py", line 59, in handle_request
2024-03-28 20:35:44,812 ERROR result = cached(context.method, proc, context, context.args, context.kwargs)
2024-03-28 20:35:44,812 ERROR File "/opt/cdstoolbox/cdscompute/cdscompute/caching.py", line 108, in cached
2024-03-28 20:35:44,812 ERROR result = proc(context, *context.args, **context.kwargs)
2024-03-28 20:35:44,812 ERROR File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 124, in call
2024-03-28 20:35:44,813 ERROR return p(*args, **kwargs)
2024-03-28 20:35:44,813 ERROR File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 60, in call
2024-03-28 20:35:44,813 ERROR return self.proc(context, *args, **kwargs)
2024-03-28 20:35:44,813 ERROR File "/home/cds/cdsservices/services/mars/mars.py", line 48, in internal
2024-03-28 20:35:44,814 ERROR return mars(context, request, **kwargs)
2024-03-28 20:35:44,814 ERROR File "/home/cds/cdsservices/services/mars/mars.py", line 20, in mars
2024-03-28 20:35:44,814 ERROR execute_mars(context, requests, info)
2024-03-28 20:35:44,814 ERROR File "/home/cds/cdsservices/services/mars/execute_mars.py", line 20, in execute_mars
2024-03-28 20:35:44,815 ERROR exception=MarsException)
2024-03-28 20:35:44,815 ERROR File "/opt/cdstoolbox/cdscompute/cdscompute/context.py", line 209, in run_command
2024-03-28 20:35:44,815 ERROR raise exception(call, proc.returncode, output)
2024-03-28 20:35:44,815 ERROR home.cds.cdsservices.services.mars.init.py.exceptions.MarsException: Ambiguous : snow_cover could be SNOW EVAPORATION or SNOW EVAPORATION VARIABLE RESOLUTION; Ambiguous : lack_ice_depth could be LEAF AREA INDEX LOW VEGETATION or LEAF AREA INDEX HIGH VEGETATION; No request
Traceback (most recent call last):
File "/beegfs/store4/chenyangkang/06.ebird_data/53.EnvArray_data/EnvArray/test_download_ERA.py", line 15, in
get_ERA5_data(start_date, end_date, time_interval, spatial_resolution, os.path.join(output_folder, 'ERA5'))
File "/beegfs/store4/chenyangkang/06.ebird_data/53.EnvArray_data/EnvArray/EnvArray/download/ERA5/request.py", line 60, in get_ERA5_data
get_data(year,month,subsub,output_folder)
File "/beegfs/store4/chenyangkang/06.ebird_data/53.EnvArray_data/EnvArray/EnvArray/download/ERA5/request.py", line 24, in get_data
c.retrieve(
File "/beegfs/store4/chenyangkang/miniconda3/lib/python3.9/site-packages/cdsapi/api.py", line 348, in retrieve
result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
File "/beegfs/store4/chenyangkang/miniconda3/lib/python3.9/site-packages/cdsapi/api.py", line 506, in _api
raise Exception(
Exception: the request you have submitted is not valid. Ambiguous : snow_cover could be SNOW EVAPORATION or SNOW EVAPORATION VARIABLE RESOLUTION; Ambiguous : lack_ice_depth could be LEAF AREA INDEX LOW VEGETATION or LEAF AREA INDEX HIGH VEGETATION; No request.

What are the steps to reproduce the bug?

Code:

    c=cdsapi.Client()
    c.retrieve(
        'reanalysis-era5-single-levels',
        {   
            'product_type': 'reanalysis',
            'format': 'netcdf',
            'variable':[
               '10m_u_component_of_wind', '10m_v_component_of_wind', '2m_temperature',
               'surface_pressure', 'total_cloud_cover', 'total_precipitation','snow_cover','lack_ice_depth'
            ],
            'year':str(year),
            'month':month,
            'day':list(subsub.day.values),
            'time':['00:00','01:00','02:00','03:00','04:00','05:00','06:00','07:00','08:00',
                    '09:00','10:00','11:00','12:00','13:00','14:00','15:00','16:00',
                    '17:00','18:00','19:00','20:00','21:00','22:00','23:00'],
        },
        os.path.join(output_folder, f'download_{year}_{month}.nc')
    )

Version

Can't find the version

Platform (OS and architecture)

redhat

Relevant log output

No response

Accompanying data

No response

Organisation

No response

Just realize I should query reanalysis-era5-land rather than reanalysis-era5-single-levels