Possible off-by-one error in "ut_string"

From: Gary Strand <strandwg_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 26 2014 - 09:34:01 MDT

A user of CCSM4 CMIP5 data was concerned because the timestamp part of the name of the file didn't match what "ut_string" printed for the ending date of the file. I thought he had a bad file, but I verified that "ut_string" returns an incorrect value.

The cause may be that "time has 'units = "days since 0000-01-01"', which is required by the CMIP5 data specification.

NCL version: 6.1.2
hardware : yellowstone

test file : /glade/scratch/strandwg/NCL/tos_day_CCSM4_historical_r1i1p1_19700101-19891231.nc

For example:

ncl 0> f = addfile("tos_day_CCSM4_historical_r1i1p1_19700101-19891231.nc","r")
ncl 1> time = f->time
ncl 2> load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/ut_string.ncl"
ncl 3> print(ut_string(time(0:30),""))

Variable: unnamed (return)
Type: string
Total Size: 248 bytes
            31 values
Number of Dimensions: 1
Dimensions and sizes: [31]
Coordinates:
Number Of Attributes: 1
  _FillValue : missing
(0) 1200 UTC 1 Jan 1971
(1) 1200 UTC 2 Jan 1971
(2) 1200 UTC 3 Jan 1971
(3) 1200 UTC 4 Jan 1971
(4) 1200 UTC 5 Jan 1971
(5) 1200 UTC 6 Jan 1971
(6) 1200 UTC 7 Jan 1971
(7) 1200 UTC 8 Jan 1971
(8) 1200 UTC 9 Jan 1971
(9) 1200 UTC 10 Jan 1971

In fact, the data (as noted in the filename) begin at 1200 UTC on 01 Jan 1970.

Thanks!

Gary Strand
strandwg@ucar.edu

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 26 09:34:12 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 31 2014 - 11:47:09 MDT