[NARCCAP-discuss] time discrepancy

Seth McGinnis mcginnis at ucar.edu
Sat Aug 25 09:25:29 MDT 2012


Hi Shane,

It's the calendar.  CCSM uses a 365-day or "noleap" calendar, in which every
year has 365 days and there are no leap years ever.  The date calculation
functions in Excel use the standard Gregorian calendar, which does have leap
years.  

If you count up the leap days between the base time (1968/01/01) and the start
of your file (1996/01/01), there are seven of them, which is the difference
between your expected start date and the start date you're seeing in the Excel
calculations.  (And then there's another one in 1996, so the discrepancy for
the end dates is 8 days.)

Cheers,

--Seth

On Fri, 24 Aug 2012 11:13:44 -0400
 Shane Brennan <sbren006 at odu.edu> wrote:
>Hi,
>
>I am writing a C# program to parse and manipulate NARCCAP data. I
>wanted to verify the missing data values to make sure I was handling
>them correctly so I checked out:
>
>http://www.narccap.ucar.edu/data/missing/CRCM_ccsm-current_table3_missing.txt
>
>to find where I could look for missing values. In the URL above, it
>states that evps in the file evps_CRCM_ccsm_1996010103.nc has missing
>values for 1999-12-01 03:00 through 2000-01-01 00:00.
>
>I would expect the time series for the entire file to run from
>1996-01-01 03:00 to 2000-01-01 00:00. However, when I parse this file
>with my program and then use excel to calculate the times from
>1/1/1968 (the start date returned from ncdump for this file), I get a
>time series that runs from 12/25/1995 03:00 to 12/24/1999 00:00. In
>this file, my missing values run from 11/23/1999 03:00 to 12/24/1999
>00:00.
>
>Naturally, I became concerned that I had a bug in my program. However,
>when I use nc2text.exe using the instructions detailed in the ASCII
>HowTo, I get the same results.
>
>In Excel I calculate the offset date by entering 1/1/1968 into a cell,
>and calculating a new field as that cell value added to each time
>value (for example, if the cell for 1/1/1968 is G1, then my formula
>for the first cell is "=$G$1 + a1". I then copy this formula all the
>way down).
>
>Does anyone know what is going on? Perhaps there is some issue with
>leap years or DST?
>
>Shane
>_______________________________________________
>narccap-discuss mailing list
>narccap-discuss at mailman.ucar.edu
>http://mailman.ucar.edu/mailman/listinfo/narccap-discuss



More information about the narccap-discuss mailing list