API download ERA5 data from "reanalysis" product type, however, the downloaded data is from "ensemble members"

Dear all,

I recently tried using the new API beta version to download “reanalysis-era5-single-levels” from the “reanalysis” product type. However, the downloaded data was actually from the “ensemble members.” Is there any error in the data storage link?
Below, please find the code for download:

import cdsapi
import os

os.chdir(“/total_precipitation”)

dataset = “reanalysis-era5-single-levels”
request = {
‘product_type’: [‘reanalysis’],
‘variable’: [‘total_precipitation’],
‘year’: [‘2022’],
‘month’: [‘01’],
‘day’: [‘01’],
‘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’],
‘data_format’: ‘netcdf’,
# ‘download_format’: ‘unarchived’
}
target = ‘era5_20220101_total_precipitation.nc’

client = cdsapi.Client()
client.retrieve(dataset, request, target)

Hi, I ran your request and got:
% ncdump -v number era5_20220101_total_precipitation.nc
netcdf era5_20220101_total_precipitation {
dimensions:
valid_time = 24 ;
latitude = 721 ;
longitude = 1440 ;
variables:
int64 number ;
string number:long_name = “ensemble member numerical id” ;
string number:units = “1” ;
string number:standard_name = “realization” ;
int64 valid_time(valid_time) ;
string valid_time:long_name = “time” ;
string valid_time:standard_name = “time” ;
string valid_time:units = “seconds since 1970-01-01” ;
string valid_time:calendar = “proleptic_gregorian” ;
double latitude(latitude) ;
latitude:_FillValue = NaN ;
string latitude:units = “degrees_north” ;
string latitude:standard_name = “latitude” ;
string latitude:long_name = “latitude” ;
string latitude:stored_direction = “decreasing” ;
double longitude(longitude) ;
longitude:_FillValue = NaN ;
string longitude:units = “degrees_east” ;
string longitude:standard_name = “longitude” ;
string longitude:long_name = “longitude” ;
string expver(valid_time) ;
float tp(valid_time, latitude, longitude) ;
tp:_FillValue = NaNf ;
tp:GRIB_paramId = 228LL ;
string tp:GRIB_dataType = “fc” ;
tp:GRIB_numberOfPoints = 1038240LL ;
string tp:GRIB_typeOfLevel = “surface” ;
tp:GRIB_stepUnits = 1LL ;
string tp:GRIB_stepType = “accum” ;
string tp:GRIB_gridType = “regular_ll” ;
tp:GRIB_uvRelativeToGrid = 0LL ;
tp:GRIB_NV = 0LL ;
tp:GRIB_Nx = 1440LL ;
tp:GRIB_Ny = 721LL ;
string tp:GRIB_cfName = “unknown” ;
string tp:GRIB_cfVarName = “tp” ;
string tp:GRIB_gridDefinitionDescription = “Latitude/Longitude Grid” ;
tp:GRIB_iDirectionIncrementInDegrees = 0.25 ;
tp:GRIB_iScansNegatively = 0LL ;
tp:GRIB_jDirectionIncrementInDegrees = 0.25 ;
tp:GRIB_jPointsAreConsecutive = 0LL ;
tp:GRIB_jScansPositively = 0LL ;
tp:GRIB_latitudeOfFirstGridPointInDegrees = 90. ;
tp:GRIB_latitudeOfLastGridPointInDegrees = -90. ;
tp:GRIB_longitudeOfFirstGridPointInDegrees = 0. ;
tp:GRIB_longitudeOfLastGridPointInDegrees = 359.75 ;
tp:GRIB_missingValue = 3.40282346638529e+38 ;
string tp:GRIB_name = “Total precipitation” ;
string tp:GRIB_shortName = “tp” ;
tp:GRIB_totalNumber = 0LL ;
string tp:GRIB_units = “m” ;
string tp:long_name = “Total precipitation” ;
string tp:units = “m” ;
string tp:standard_name = “unknown” ;
tp:GRIB_surface = 0. ;
string tp:coordinates = “number valid_time latitude longitude expver” ;

// global attributes:
string :GRIB_centre = “ecmf” ;
string :GRIB_centreDescription = “European Centre for Medium-Range Weather Forecasts” ;
:GRIB_subCentre = 0LL ;
string :Conventions = “CF-1.7” ;
string :institution = “European Centre for Medium-Range Weather Forecasts” ;
string :history = “2024-09-17T16:26 GRIB to CDM+CF via cfgrib-0.9.14.0/ecCodes-2.36.0 with {"source": "data.grib", "filter_by_keys": {"stream": ["oper"]}, "encode_cf": ["parameter", "time", "geography", "vertical"]}” ;
data:

number = 0 ;
}

in this case, the ‘number’ is just a introduced by default by the netCDF conversion (value = 0 ) and the data are indeed from the reanalysis.

Hi Kevin,

For the reanalysis data I downloaded before using the old API version (from 1979 to 2021), the info on the total precipitation file is shown below; that’s why I was confused.
I downloaded data from 2022 to 2023 using the new API beta version.
So, can I treat these data as the same and proceed with the data time series analysis?

Best regards,
Aifang


dimensions:
longitude = 1440 ;
latitude = 721 ;
time = 24 ;
variables:
float longitude(longitude) ;
longitude:units = “degrees_east” ;
longitude:long_name = “longitude” ;
float latitude(latitude) ;
latitude:units = “degrees_north” ;
latitude:long_name = “latitude” ;
int time(time) ;
time:units = “hours since 1900-01-01 00:00:00.0” ;
time:long_name = “time” ;
time:calendar = “gregorian” ;
short tp(time, latitude, longitude) ;
tp:scale_factor = 4.80220633376922e-07 ;
tp:add_offset = 0.0157349092732282 ;
tp:_FillValue = -32767s ;
tp:missing_value = -32767s ;
tp:units = “m” ;
tp:long_name = “Total precipitation” ;

// global attributes:
:Conventions = “CF-1.6” ;
:history = “2024-09-17 05:16:22 GMT by grib_to_netcdf-2.28.1: /opt/ecmwf/mars-client/bin/grib_to_netcdf -S param -o /cache/data4/adaptor.mars.internal-1726550182.0790002-15586-18-0cd9ee98-8d4d-45f2-bac6-b53e184c9cca.nc /cache/tmp/0cd9ee98-8d4d-45f2-bac6-b53e184c9cca-adaptor.mars.internal-1726550177.7818952-15586-4-tmp.grib” ;

Hi Aifang,
Yes, thats correct; also the CDS ERA5 ensemble data are on a 0.5 degree grid (rather than 0.25 degrees) and are only available every 3 hours on the CDS - see “Temporal Frequency” on ERA5: data documentation, so you would not get ensemble data for each hour of the day.
Hope that helps!

Hi Kevin,

Thank you very much for your explanation.

Best regards,
Aifang