Project

General

Profile

Time Values - Convert from 4,5,6.. to increments of one year beginning 1976-4-16 12:00:00

Added by Sarah O'Keefe about 5 years ago

Hi - I am hoping there is a super easy fix to this...I am trying to convert the time values in the following. I can't figure out how to do it. Please help!

netcdf eldoretApr7618 {
dimensions:
TIME = UNLIMITED ; // (43 currently)
variables:
double TIME ;
TIME:standard_name = "time" ;
TIME:units = "years since 1972-04-01 00:00:00" ;
TIME:calendar = "standard" ;
TIME:axis = "T" ;
float PRECIP ;
PRECIP:long_name = "PRECIP" ;
PRECIP:_FillValue = -1.e+34f ;
PRECIP:missing_value = -1.e+34f ;
PRECIP:history = "From eldoretApr.dat" ;

// global attributes:
:CDI = "Climate Data Interface version ?? (http://mpimet.mpg.de/cdi)" ;
:Conventions = "CF-1.0" ;
:history = "Sat Mar 09 12:28:16 2019: cdo selyear,1976/2018 eldoretApr7218.nc eldoretApr7618.nc\n",
"FERRET V6.9 8-Mar-19" ;
:CDO = "Climate Data Operators version 1.9.3 (http://mpimet.mpg.de/cdo)" ;
data:

TIME = 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 ;
PRECIP = 77, 380.9, 37.4, 185.8, 169.8, 175.2, 214.7, 178.6, 88.4, 193.6,
137.6, 118.2, 192.1, 159, 128.7, 50.1, 202.1, 23.5, 188.5, 193.1, 58.5,
285.1, 74, 108.8, 38.5, 167.2, 88.3, 276.7, 226.3, 61.2, 108.3, 86, 76,
89.4, 87.7, 68.8, 306.4, 262.9, 24.9, 171.1, 291.5, 104.1, 320.1 ;
}

Replies (2)

RE: Time Values - Convert from 4,5,6.. to increments of one year beginning 1976-4-16 12:00:00 - Added by Karin Meier-Fleischer about 5 years ago

Hi Sarah,

you can use the showtimestamp operator to show the more readable times

cdo showtimestamp infile

-Karin

RE: Time Values - Convert from 4,5,6.. to increments of one year beginning 1976-4-16 12:00:00 - Added by Ralf Mueller about 5 years ago

and btw: How do you want to convert them?? I mean: into what?

cheers
ralf

    (1-2/2)