[gradsusr] How to set time attribute in sdfwrite

Charles Seman Charles.Seman at noaa.gov
Tue Jan 18 12:29:52 EST 2011


Zablone,

I'll forward a couple of emails from Jennifer Adams who helped me put a 
time axis on a GrADS sdfwrite netCDF output file (the input netCDF file 
had no Z or T dimension...).  In essence, the solution involved defining 
a data descriptor file to open the input netCDF file to define the time 
axis... I'm not sure what your input dataset attributes look like, so 
I'm guessing here...  If you have questions or want sample code from a 
script, feel free to email me.

Hope this helps,
Chuck

Zablone Owiti wrote:
> Dear users,
>
> I am writting out monthly data from a .nc file using the sdfwrite 
> command. When I open the data I get the following warning:
> *SDF file has no discernable time coordinate -- using default values.
> *and when I q dims  Time = 00z01Jan001 instead of the time for the 
> data extracted i.e  00z01Jul1960. How can I use the *sdfattr* command 
> to force the time attribute. Below is the script I am using to extract 
> the data:
> 'reinit'
> 'sdfopen gcpcr.nc'
> 'set x 0.5 360.5'
> 'set y 1 180'
> 'set time 00z01jul1960'
> 'set sdfwrite r1.nc'
> 'define pcp=r'
> 'sdfwrite pcp'
> 'clear sdfwrite'
>
> Thanks
> */===================================================/*
> */ZABLONE OWITI
> GRADUATE STUDENT
> Nanjing University of Information, Science and Technology
> College of International Education
> Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China
> /*Tel: +86-25-58731402
> Fax: +86-25-58731456
> */Mob. 15077895632/*
> */Website: www.nuist.edu.cn <http://www.nuist.edu.cn/>
> /*/*====================================================
> *
> /"The real art of conversation is not only to say the right thing at 
> the right time, but also to leave unsaid the wrong thing at the 
> tempting moment."///
>  
> /
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>   

-- 

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