You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Current »
Hello,
I have noticed that when we retrieve data from the climate data store or from the API, netCDF files use the CF-1.6 conventions. However, when we want to retrieve data from the CDS Toolbox it uses the CF - 1.7 conventions.
Example :
File from the form of the CDS or a CDS API request : <xarray.Dataset> Dimensions: (longitude: 1440, latitude: 721, time: 1) Coordinates: * longitude (longitude) float32 0.0 0.25 0.5 0.75 ... 359.0 359.2 359.5 359.8 * latitude (latitude) float32 90.0 89.75 89.5 89.25 ... -89.5 -89.75 -90.0 * time (time) datetime64[ns] 2021-01-02 Data variables: t (time, latitude, longitude) float32 ... Attributes: Conventions: CF-1.6 history: 2023-04-05 12:53:19 GMT by grib_to_netcdf-2.25.1: /opt/ecmw...
File from the CDS Toolbox :
<xarray.Dataset> Dimensions: (lat: 721, lon: 1440) Coordinates: realization int64 ... time datetime64[ns] ... * lat (lat) float64 -90.0 -89.75 -89.5 ... 89.75 90.0 * lon (lon) float64 -180.0 -179.8 -179.5 ... 179.5 179.8 experimentVersionNumber object ... Data variables: t2m (lat, lon) float32 ... Attributes: Conventions: CF-1.7 institution: European Centre for Medium-Range Weather Forecasts history: 2022-08-10T11:59 GRIB to CDM+CF via cfgrib-0.9.9.1/ecCodes-... source: ECMWF
|
---|
There are some differences on these conventions which are disruptive when you want to automate some scripts : the longitude is from 0 to 360 in CF - 1.6 and lon is from -180 to 180 in CF -1.7, the level dimension is in hPa in CF - 1.6 and plev dimension is in Pa in CF - 1.7...
We are currently developing a tool which uses the CDS API, so we're using the CF - 1.6 conventions. Our tool could not work in the future because of a potential change of conventions. I'm pretty sure that we're not the only ones concerned about this.
So my questions are :
Will the CDS API use other conventions ?
If the answer is yes :
Could we choose the conventions in the API requests ? :
c = cdsapi.Client() c.retrieve( 'reanalysis-era5-pressure-levels', { 'product_type': 'reanalysis', 'format': 'netcdf', 'conventions': 'CF-1.6', 'variable': [ 'u_component_of_wind', 'v_component_of_wind', ], 'pressure_level': '1', 'year': [ '1992', '1993', '1994' ], 'month': '01', 'day': [ '01', ], 'time': [ '00:00' ], }, 'download.nc') |
---|
|
---|
Is there a tool that we can use to change the conventions ?
Kind regards,
Daniel Kuester