Official announcement of the following changes in the default behaviour of the Toolbox

WHEN?

After the release of a new upgrade of the CDS software infrastructure on the 8th/December/2021

  • The system session to implement this is planned to happen between 10:00-12:00 GMT
WHAT?

The default behaviour of the Toolbox will change. Non-backwards-compatible changes will be introduced that will require modification of some existing Toolbox workflows. 

Affected datasets:

  • reanalysis-era5-single-levels
  • reanalysis-era5-pressure-levels
  • reanalysis-era5-single-levels-monthly-means
  • reanalysis-era5-pressure-levels-monthly-means

Affected variables:

  • Total precipitation
  • Snowfall
  • Evaporation
  • Surface solar radiation downwards
  • Surface runoff
  • Surface solar radiation downwards assuming clear sky
  • Total incoming solar radiation

Can previous behaviour be reproduced?

Yes, by including the following keyword in the retrieval of the affected workflows you will be able to reproduce the existing behaviour prior to this change (see examples below)

    '_rate_type' : 'rate'
WHY?In the context of the developments for a new feature to convert data stored by the CDS in GRIB format into NetCDF following the CDS Common Data Model used by the CDS Toolbox, it was necessary to remove this legacy conversion of accumulated variables to rates

EXAMPLES


CDS Toolbox codeCDS Toolbox Console outputCDS Toolbox output
Before 8/Dec/2021

data = ct.catalogue.retrieve(
  'reanalysis-era5-single-levels',
  {
      'product_type': 'reanalysis',
      'variable': 'total_precipitation',
      'year': '2021',
      'month': '11',
      'day': ['01',],
      'time': ['{:02d}:00'.format(hh) for hh in range(24)],
  }
)

print(data)

data2 = ct.cube.select(data, lat=[42.,42.1], lon=[-10.1,-10.])
fig=ct.chart.line(data2)
<xarray.DataArray 'tprate' (time: 24, lat: 721, lon: 1440)>
dask.array<xarray-tprate, shape=(24, 721, 1440), dtype=float32, chunksize=(24, 721, 1440), chunktype=numpy.ndarray>
Coordinates:
    realization              int64 ...
  * time                     (time) datetime64[ns] 2021-11-01 ... 2021-11-01T...
  * 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  (time) object dask.array<chunksize=(24,), meta=np.ndarray>
Attributes:
    long_name:              Total precipitation rate
    units:                  m s-1
    standard_name:          lwe_precipitation_rate
    cds_magics_style_name:  precipitation-rate
    type:                   real
    GLOBAL_Conventions:     CF-1.7
    GLOBAL_institution:     European Centre for Medium-Range Weather Forecasts
    GLOBAL_history:         2021-12-07T15:07 GRIB to CDM+CF via cfgrib-0.9.9....
    GLOBAL_source:          ECMWF

After 8/Dec/2021
 

data = ct.catalogue.retrieve(
'reanalysis-era5-single-levels',
{
    'product_type': 'reanalysis',
    'variable': 'total_precipitation',
    'year': '2021',
    'month': '11',
    'day': ['01',],
    'time': ['{:02d}:00'.format(hh) for hh in range(24)],
}
)

print(data)

data2 = ct.cube.select(data, lat=[42.,42.1], lon=[-10.1,-10.])
fig=ct.chart.line(data2)
<xarray.DataArray 'tp' (time: 24, lat: 721, lon: 1440)>
dask.array<xarray-tp, shape=(24, 721, 1440), dtype=float32, chunksize=(24, 721, 1440), chunktype=numpy.ndarray>
Coordinates:
    realization              int64 ...
  * time                     (time) datetime64[ns] 2021-11-01 ... 2021-11-01T...
  * 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  (time) object dask.array<chunksize=(24,), meta=np.ndarray>
Attributes:
    long_name:           Thickness of the liquid water equivalent total preci...
    units:               m
    standard_name:       lwe_thickness_of_precipitation_amount
    comment:             The construction lwe_thickness_of_X_amount or _conte...
    type:                real
    accumulated_since:   start of timestep
    GLOBAL_Conventions:  CF-1.7
    GLOBAL_institution:  European Centre for Medium-Range Weather Forecasts
    GLOBAL_history:      2021-12-07T15:14 GRIB to CDM+CF via cfgrib-0.9.9.1/e...
    GLOBAL_source:       ECMWF

After 8/Dec/2021

data = ct.catalogue.retrieve(
'reanalysis-era5-single-levels',
{
'product_type': 'reanalysis',
'variable': 'total_precipitation',
'year': '2021',
'month': '11',
'day': ['01',],
'time': ['{:02d}:00'.format(hh) for hh in range(24)],
'_rate_type' : 'rate',
}
)

print(data)

data2 = ct.cube.select(data, lat=[42.,42.1], lon=[-10.1,-10.])
fig=ct.chart.line(data2)
<xarray.DataArray 'tprate' (time: 24, lat: 721, lon: 1440)>
dask.array<xarray-tprate, shape=(24, 721, 1440), dtype=float32, chunksize=(24, 721, 1440), chunktype=numpy.ndarray>
Coordinates:
    realization              int64 ...
  * time                     (time) datetime64[ns] 2021-11-01 ... 2021-11-01T...
  * 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  (time) object dask.array<chunksize=(24,), meta=np.ndarray>
Attributes:
    long_name:              Total precipitation rate
    units:                  m s-1
    standard_name:          lwe_precipitation_rate
    cds_magics_style_name:  precipitation-rate
    type:                   real
    GLOBAL_Conventions:     CF-1.7
    GLOBAL_institution:     European Centre for Medium-Range Weather Forecasts
    GLOBAL_history:         2021-12-07T15:07 GRIB to CDM+CF via cfgrib-0.9.9....
    GLOBAL_source:          ECMWF