netcdf 'time' variable type declaration should be 'double'

1 view
Skip to first unread message

Jeremy Cothran

unread,
Mar 11, 2014, 3:51:07 PM3/11/14
to iooste...@googlegroups.com
Just a quick note in case anyone else was having issues with their time values in netcdf  representation.  When I was formatting my netcdf files for ncSOS I mistakenly had my netcdf epoch time in seconds in type units of 'float' which ncgen truncates when converting to exponential notation resulting in the wrong time being reported back.  Declaring time as in the NODC examples like below will preserve the time value correctly.

double time(time) ;
		time:standard_name = "time" ;
		time:long_name = "Time" ;
		time:units = "seconds since 1970-01-01 00:00:00 UTC" ;
		time:axis = "T" ;
		time:ancillary_variables = "" ;
		time:comment = "" ;
		time:ioos_category = "Time" ;
		time:calendar = "standard" ;

Reply all
Reply to author
Forward
0 new messages