Hi everyone,
I’m experiencing some discrepancies while downloading the ERA5 pressure level data using both the new and old licenses.
Here’s the code snippet I’m using:
import cdsapi
client = cdsapi.Client(url="url", key="secret-key")
dataset = 'reanalysis-era5-pressure-levels'
request = {'product_type': 'reanalysis', 'format': 'netcdf', 'grid': ['0.25', '0.25'], 'date': ['2024-05-05'],
'time': ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17',
'18', '19', '20', '21', '22', '23'], 'variable': ['geopotential'], 'pressure_level': ['1']}
target = 'download_new.grib'
result = client.retrieve(dataset, request, target)
When I use the CDS API (old license) in the above code, the data I receive contains:
- Variable:
z
(geopotential) only - Coordinates:
longitude, latitude, time
- Attributes:
Conventions
andhistory
However, when using the CDS-Beta API (new license) in the above code, the data output changes to:
- Variables:
number, expver, z
(geopotential) - Coordinates:
pressure_level, longitude, latitude, valid_time
- More attributes, including:
GRIB_centre, GRIB_centreDescription, GRIB_subCentre, Conventions, institution, history
I’m trying to understand how I can get the same output from the CDS-Beta that I currently get from the CDS. Any guidance or suggestions would be greatly appreciated!
Thank you in advance!