<html><body><div style="color:#000; background-color:#fff, font-family:garamond, new york, times, serif;font-size:14pt"><SPAN style="RIGHT: auto"><VAR id=yui-ie-cursor></VAR>Dear Charles,<BR>Thanks for the explanation and the earlier emails. I wrote a .ctl file(see bellow) to read the original data (via xdfopen command), but I get the following error (on the z dimension) which I have failed to figure out how to correct : <BR> <STRONG>Scanning Descriptor File: gcpcr.ctl<BR>gadsdf: Lev dimension z is not an SDF dimension.<BR>SDF Descriptor file gcpcr.ctl was not successfully opened & parsed.<BR></STRONG><BR>The gcpcr.ctl is: <BR><SPAN style="RIGHT: auto" lang=EN>
<div>dset ^gcpcr.nc</div>
<div>dtype netcdf</div>
<div>title Test File</div>
<div>undef 1e+20</div>
<div>xdef longitude 360 linear 0.5 1.0</div>
<div>ydef latitude 180 linear -89.5 1.0</div>
<div>zdef z 1 levels 0</div>
<div>tdef t 674 linear 0Z1jan1948 1mo</div>
<div>vars 1</div>
<div style="RIGHT: auto">r=>r 1 99 Precipitation (mm/day)</div>
<div>endvars</div></SPAN><BR>Further, the <STRONG>q dims</STRONG> results for the original data file (gcpcr.nc) when opened with sdfopen command are:<BR style="RIGHT: auto" class=yui-cursor></SPAN>
<DIV></DIV>
<DIV style="RIGHT: auto">Default file number is: 1<BR>X is varying Lon = 0 to 360 X = 0.5 to 360.5<BR>Y is varying Lat = -89.5 to 89.5 Y = 1 to 180<BR>Z is fixed Lev = 0 Z = 1<BR>T is fixed Time = 00Z01JAN1948 T = 1<BR>E is fixed Ens = 1 E = 1<BR style="RIGHT: auto"><BR>Thanks </DIV>
<DIV id=RTEContent>
<DIV>
<DIV><B><EM>===================================================</EM></B></DIV>
<DIV><B><EM><FONT color=#007f40 face="lucida console, sans-serif">ZABLONE OWITI<BR></FONT><FONT face="garamond, new york, times, serif">GRADUATE STUDENT<BR>Nanjing University of Information, Science and Technology<BR>College of International Education<BR>Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China<BR></FONT></EM></B><FONT color=#333333 face="garamond, new york, times, serif">Tel: +86-25-58731402<BR>Fax: +86-25-58731456</FONT></DIV>
<DIV><B><EM><FONT face="garamond, new york, times, serif">Mob. 15077895632</FONT></EM></B></DIV>
<DIV><B><EM>Website: <A href="http://www.nuist.edu.cn/" rel=nofollow target=_blank>www.nuist.edu.cn</A><BR></EM></B><I><STRONG>====================================================<BR></STRONG><SPAN style="FONT-STYLE: italic; FONT-FAMILY: inherit" class=ms__id853>
<div class=MsoNormal><I><SPAN style="COLOR: #e36c0a; FONT-SIZE: 12pt">"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."</SPAN></I><I><SPAN style="COLOR: #e36c0a; FONT-SIZE: 12pt"></SPAN></I></div>
<div class=MsoNormal> </div></SPAN></I><BR></DIV></DIV></DIV>
<DIV style="FONT-FAMILY: inherit; FONT-SIZE: 14pt"><BR>
<DIV style="FONT-FAMILY: inherit; FONT-SIZE: 12pt"><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr contentEditable=false readonly="true"></DIV><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Charles Seman <Charles.Seman@noaa.gov><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Zablone Owiti <zablonowiti@yahoo.com>; GrADS Users Forum <gradsusr@gradsusr.org><BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, 19 January 2011 1:29 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [gradsusr] How to set time attribute in sdfwrite<BR></FONT><BR>Zablone,<BR><BR>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.<BR><BR>Hope this helps,<BR>Chuck<BR><BR>Zablone Owiti wrote:<BR>> Dear users,<BR>> <BR>> I am writting out monthly data from a .nc file using the sdfwrite command. When I open the data I get the following warning:<BR>> *SDF file has no discernable time coordinate -- using default values.<BR>> *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:<BR>> 'reinit'<BR>> 'sdfopen gcpcr.nc'<BR>> 'set x 0.5 360.5'<BR>> 'set y
1 180'<BR>> 'set time 00z01jul1960'<BR>> 'set sdfwrite r1.nc'<BR>> 'define pcp=r'<BR>> 'sdfwrite pcp'<BR>> 'clear sdfwrite'<BR>> <BR>> Thanks<BR>> */===================================================/*<BR>> */ZABLONE OWITI<BR>> GRADUATE STUDENT<BR>> Nanjing University of Information, Science and Technology<BR>> College of International Education<BR>> Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China<BR>> /*Tel: +86-25-58731402<BR>> Fax: +86-25-58731456<BR>> */Mob. 15077895632/*<BR>> */Website: www.nuist.edu.cn <<A href="http://www.nuist.edu.cn/" target=_blank>http://www.nuist.edu.cn/</A>><BR>> /*/*====================================================<BR>> *<BR>> /"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."///<BR>> /<BR>> <BR>>
------------------------------------------------------------------------<BR>> <BR>> _______________________________________________<BR>> gradsusr mailing list<BR>> <A href="mailto:gradsusr@gradsusr.org" ymailto="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</A><BR>> <A href="http://gradsusr.org/mailman/listinfo/gradsusr" target=_blank>http://gradsusr.org/mailman/listinfo/gradsusr</A><BR>> <BR><BR>-- <BR>Please note that <A href="mailto:Charles.Seman@noaa.gov" ymailto="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</A> should be considered my NOAA<BR>email address, not <A href="mailto:cjs@gfdl.noaa.gov" ymailto="mailto:cjs@gfdl.noaa.gov">cjs@gfdl.noaa.gov</A>.<BR><BR>********************************************************************<BR>Charles Seman <A href="mailto:Charles.Seman@noaa.gov"
ymailto="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</A><BR>U.S. Department of Commerce / NOAA / OAR<BR>Geophysical Fluid Dynamics Laboratory voice: (609) 452-6547<BR>201 Forrestal Road fax: (609) 987-5063<BR>Princeton, NJ 08540-6649 <A href="http://www.gfdl.noaa.gov/~cjs/" target=_blank>http://www.gfdl.noaa.gov/~cjs/</A><BR>********************************************************************<BR><BR>"The contents of this message are mine personally and do not reflect any<BR>official or unofficial position of the United States Federal Government,<BR>the United States Department of Commerce, or NOAA."<BR><BR><BR><BR></DIV></DIV></div><br></body></html>