Date coordinate in monthly ERA5 netcdf - new converter

Monthly mean netCDF files contain a date coordinate instead of a CF-compliant time coordinate. The date coordinate is an integer representing days, months, and year in the units, hundreds and ten-thousands.

variables:
         int64 date(date) ;
                date:long_name = "original GRIB coordinate for key: date(date)" ;
                date:units = "1" ;
  date = 20230101, ...

So it’s human-readable but not handled as a date by most netCDF tools, which generally work with time coordinates recommended by CF conventions (e.g. 4.4. Time Coordinate). The legacy grid-to-netCDF converter produced a CF-compliant time coordinate, such as

variables:
        int time(time) ;
                time:units = "hours since 1900-01-01 00:00:00.0" ;
                time:long_name = "time" ;
                time:calendar = "gregorian" ;

Please could a CF-compliant time coordinate be provided before the legacy converter is retired? The deprecation message produced when using the legacy netCDF converter indicates that CF compliance is desirable.

To aid in replication, my CDS API request is copied below:

request = {
        "product_type": "monthly_averaged_reanalysis",
        "variable": ["total_precipitation",],
        "year": 2023,
        "month": ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", ],
        "time": "00:00",
        "format": "netcdf",
        "download_format": "unarchived",
    }

client = cdsapi.Client()
dataset = "reanalysis-era5-single-levels-monthly-means"
client.retrieve(dataset, request).download()
2 Likes

Related but separate issue: in both the new and old formats, the date for monthly mean fields is the first day of each month. Presumably this represents the start date of each mean field. It would be useful to make this explicit in the attributes of the coordinate variable.

CF provides a mechanism to specify the bounds and mid-point of a coordinate, but even if this is not used, a free-text attribute (e.g. long_name) stating that the coordinate defines the mean start date would make this explicit and not require an assumption by the user.