I try to create March daily climatology from ERA5 hourly data. However the "dayofyear" is always equal to 32 and not 31. In NCL I can shift the time value due to averaging process, but I don't know how to do it in CDS. Is there any way to solve my issue?
Thank you,
data1 = ct.catalogue.retrieve(
'reanalysis-era5-single-levels',
{
'variable': 'total_precipitation',
'product_type': 'reanalysis',
'year': list(range(1979, 2020 + 1)),
'month': [
'03',
],
'day': [
'01', '02', '03', '04', '05', '06',
'07', '08', '09', '10', '11', '12',
'13', '14', '15', '16', '17', '18',
'19', '20', '21', '22', '23', '24',
'25', '26', '27', '28', '29', '30',
'31'
],
'time': [
'00:00', '03:00', '06:00',
'09:00', '12:00', '15:00',
'18:00', '21:00',
],
'area': [
15, 89, -19,
156,
],
'grid': [0.25, 0.25],
}
)
daily_clim1 = ct.climate.climatology_mean(
data = data1,
start = '1980',
stop = '2020',
frequency = 'dayofyear',
# closed='right'
)print(daily_clim1)
<xarray.DataArray 'tprate_climatology_mean' (dayofyear: 32, lat: 137, lon: 269)>
[1179296 values with dtype=float32]
Coordinates:
realization int64 ...
* lat (lat) float64 -19.0 -18.75 -18.5 -18.25 ... 14.5 14.75 15.0
* lon (lon) float64 89.0 89.25 89.5 89.75 ... 155.2 155.5 155.8 156.0
* dayofyear (dayofyear) int64 60 61 62 63 64 65 66 ... 85 86 87 88 89 90 91
Attributes:
long_name: Total precipitation rate climatological mean
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-07-18T04:41 GRIB to CDM+CF via cfgrib-0.9.9....
GLOBAL_source: ECMWF