How to download 10m u/v wind

,

I want to download 10m u/v wind from 'reanalysis-era5-complete', and I set the aera,codes are below,it runs with some errors

#!/usr/bin/env python
import cdsapi
c = cdsapi.Client()
c.retrieve('reanalysis-era5-complete', { # Requests follow MARS syntax
# Keywords 'expver' and 'class' can be dropped. They are obsolete
# since their values are imposed by 'reanalysis-era5-complete'
'date' : '2022-12-30', # The hyphens can be omitted
'levelist': '1/to/137', # 1 is top level, 137 the lowest model level in ERA5. Use '/' to separate values.
'levtype' : 'ml',
'param' : [
'165', '166',
], # Full information at https://apps.ecmwf.int/codes/grib/param-db/
# The native representation for temperature is spherical harmonics 130-T129-H157-RH
'stream' : 'oper', # Denotes ERA5. Ensemble members are selected by 'enda'
'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',
], # You can drop :00:00 and use MARS short-hand notation, instead of '00/06/12/18'
'type' : 'fc',(here I tried an,but failed either)
'area' : '21/105/4/118', # North, West, South, East. Default: global
'grid' : '0.25/0.25', # Latitude/longitude. Default: spherical harmonics or reduced Gaussian grid
'format' : 'grib', # Output needs to be regular lat-lon, so only works in combination with 'grid'!

}, '20221229.grib') # Output file. Adapt as you wish.


 

And the result is

2023-12-28 09:50:27,233 INFO Request is queued
2023-12-28 11:03:55,690 INFO Request is failed
2023-12-28 11:03:55,690 ERROR Message: the request you have submitted is not valid
2023-12-28 11:03:55,690 ERROR Reason:  Expected 6576, got 0.; Request failed; Some errors reported (last error -1)
2023-12-28 11:03:55,691 ERROR   Traceback (most recent call last):
2023-12-28 11:03:55,691 ERROR     File "/opt/cdstoolbox/cdscompute/cdscompute/cdshandlers/services/handler.py", line 59, in handle_request
2023-12-28 11:03:55,691 ERROR       result = cached(context.method, proc, context, context.args, context.kwargs)
2023-12-28 11:03:55,692 ERROR     File "/opt/cdstoolbox/cdscompute/cdscompute/caching.py", line 108, in cached
2023-12-28 11:03:55,692 ERROR       result = proc(context, *context.args, **context.kwargs)
2023-12-28 11:03:55,692 ERROR     File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 124, in __call__
2023-12-28 11:03:55,692 ERROR       return p(*args, **kwargs)
2023-12-28 11:03:55,692 ERROR     File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 60, in __call__
2023-12-28 11:03:55,692 ERROR       return self.proc(context, *args, **kwargs)
2023-12-28 11:03:55,692 ERROR     File "/home/cds/cdsservices/services/mars/mars.py", line 53, in external
2023-12-28 11:03:55,692 ERROR       return mars(context, request, **kwargs)
2023-12-28 11:03:55,692 ERROR     File "/home/cds/cdsservices/services/mars/mars.py", line 20, in mars
2023-12-28 11:03:55,692 ERROR       execute_mars(context, requests, info)
2023-12-28 11:03:55,692 ERROR     File "/home/cds/cdsservices/services/mars/execute_mars.py", line 20, in execute_mars
2023-12-28 11:03:55,692 ERROR       exception=MarsException)
2023-12-28 11:03:55,692 ERROR     File "/opt/cdstoolbox/cdscompute/cdscompute/context.py", line 209, in run_command
2023-12-28 11:03:55,692 ERROR       raise exception(call, proc.returncode, output)
2023-12-28 11:03:55,692 ERROR   home.cds.cdsservices.services.mars.__init__.py.exceptions.MarsException: Expected 6576, got 0.; Request failed; Some errors reported (last error -1)
Traceback (most recent call last):
  File "F:\test\downloadERA5.py", line 4, in <module>
    c.retrieve('reanalysis-era5-complete', { # Requests follow MARS syntax
  File "E:\Anconda\Lib\site-packages\cdsapi\api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Anconda\Lib\site-packages\cdsapi\api.py", line 519, in _api
    raise Exception(
Exception: the request you have submitted is not valid. Expected 6576, got 0.; Request failed; Some errors reported (last error -1).

Hi,

the variables available at model levels are available here: ERA5: data documentation#Table12

You can also build the API script for ERA5 model levels data using the catalogue available here: MARS ERA5 catalogue

Thanks

Thanks Michela