[gradsusr] sdfwrite and noleap calendar

Charles Seman charles.seman at noaa.gov
Tue Sep 25 15:15:12 EDT 2012


Dear GrADS Users Forum,

An xdfopen data descriptor file was used to open a model source netCDF 
time series file with a "noleap" calendar, some variables were defined 
using variables from this source netCDF file, and then were written out 
using sdfwrite (one derived variable per sdfwrite netCDF file).  Each 
variable written out contained 300 monthly time levels for a 25 year 
time series spanning several leap years.  NCO utilities were used to 
merge these individual variable time series files into a single time 
series file (let's call it "all_ts.nc"), rename "missing_value" to 
"_FillValue", and make the time dimension a record dimension.

The individual sdfwrite variable time series files did not contain the 
calendar attribute "noleap".

The resulting "all_ts.nc" file was viewed using "ncview"; without the 
"-calendar noleap" option the last time level in the time series had 
"drifted" backwards from the middle of the month.  When a 'time:calendar 
= "noleap"' attribute was added in the "all_ts.nc" file (using NCO 
utility "ncatted"), then "ncview" did not require the "-calendar noleap" 
to prevent the last time level in the time series from "drifting" 
backwards from the middle of the month.

Is there a way to tell GrADS sdfwrite to put a 'calendar = "noleap"' 
attribute in the sdfwrite netCDF output file if the source netCDF file 
has a noleap calendar?

Thanks for your time and help with this,
Chuck
-- 

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
  Charles Seman                                Charles.Seman at noaa.gov
  U.S. Department of Commerce / NOAA / OAR
  Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
  201 Forrestal Road                              fax: (609) 987-5063
  Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not reflect any
official or unofficial position of the United States Federal Government,
the United States Department of Commerce, or NOAA."



More information about the gradsusr mailing list