Project

General

Profile

monmean question

Added by James Kossin about 2 years ago

I have a netCDF file with daily data from 2015/01/01 to 2099/12/31 (31,411 days). The time data are provided as shown below as "days-since-2015-01-01 12:00:00", and the time variable goes from 0 to 31,410.

When I run cdo monmean test_file.nc outfile.nc, I get "Warning (splitTimevalue): Reset wrong date/time to 0000-00-01 00:00:00!" and some strange results. I'm wondering if this is because the days-since units are non-standard or the file itself is not compliant, or is there some other requirement that I'm not correctly addressing? Any guidance would be appreciated.

netcdf test_file {
dimensions:
time = 31411 ;
variables:
int time(time) ;
time:units = "days-since-2015-01-01 12:00:00" ;
time:long_name = "time" ;
float tasmax(time) ;
tasmax:units = "K" ;
tasmax:missing_value = 1.e+20f ;
tasmax:longitude = 0.125f ;
tasmax:latitude = -40.125f ;
data:

time = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
etc.

Replies (2)

RE: monmean question - Added by Uwe Schulzweida about 2 years ago

Yes, the non-standard days-since units is the problem. Remove the minus signs then it will work:

 time:units = "days since 2015-01-01 12:00:00" ;

RE: monmean question - Added by James Kossin about 2 years ago

Thanks so much Ewe. That solved the problem. Very much appreciated.

    (1-2/2)