<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Might be the same deal, i.e., need dimensions on time. Try
something<br>
like "days since 1999-1-1 00:00:00" or whatever is appropriate.<br>
<br>
Jim<br>
<br>
<div class="moz-cite-prefix">On 1/15/15 12:12 PM, Thomas Robinson
wrote:<br>
</div>
<blockquote
cite="mid:CABa1TPgjiWJai9eoZ=pN17EV2tX2HThQme2TUjzc7SjgfANsZQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Thank you for the reply. </div>
I added:
<div>
<div>istatus = nf90_def_var(ncid,"lat", nf90_float, ila, ilat
)</div>
<div> write (6,*) trim(nf90_strerror(istatus))</div>
<div>i<b>status = nf90_put_att(ncid, ilat, 'units',
'degrees_north')</b></div>
<div>istatus = nf90_def_var(ncid,"lon", nf90_float, ilo, ilon
)</div>
<div> write (6,*) trim(nf90_strerror(istatus))</div>
<div><b>istatus = nf90_put_att(ncid, ilon, 'units',
'degrees_east')</b></div>
</div>
<div><br>
</div>
<div>To give units to the latitude and longitude. Now I have a
new error:</div>
<div>
<div><br>
</div>
<div>ga-> sdfopen <a moz-do-not-send="true"
href="http://foo.nc">foo.nc</a> </div>
<div>Scanning self-describing file: <a moz-do-not-send="true"
href="http://foo.nc">foo.nc</a></div>
<div>SDF file has no discernable time coordinate -- using
default values.</div>
<div>gadsdf: SDF file does not have any non-coordinate
variables.</div>
</div>
<div><br>
</div>
<div>What does that mean? </div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Jan 15, 2015 at 11:53 AM, James
T. Potemra <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:jimp@hawaii.edu" target="_blank">jimp@hawaii.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hi Tom,<br>
<br>
I think you'll need to add attributes to your variables,
specifically the units. For lat and lon these<br>
should be "degrees_north" and "degrees_east". <br>
<br>
Jim
<div>
<div class="h5"><br>
<br>
<div>On 1/15/15 11:38 AM, Thomas Robinson wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">Aloha Grads Users,
<div><br>
</div>
<div>I am bringing in some data and running
calculations using fortran 90. I want to output
the data as a netCDF file, and I would like it
to be readable by grads. I have no problem
creating a file called <a
moz-do-not-send="true" href="http://foo.nc"
target="_blank">foo.nc</a> and putting my lat,
lon, and ref variables in the file. The problem
is if I go to grads and type 'sdfopen <a
moz-do-not-send="true" href="http://foo.nc"
target="_blank">foo.nc</a>', it says </div>
<div>
<div>ga-> sdfopen <a moz-do-not-send="true"
href="http://foo.nc" target="_blank">foo.nc</a> </div>
<div>Scanning self-describing file: <a
moz-do-not-send="true" href="http://foo.nc"
target="_blank">foo.nc</a></div>
<div>gadsdf: SDF file has no discernable X
coordinate.</div>
<div> To open this file with GrADS, use a
descriptor file with an XDEF entry.</div>
<div> Documentation is at <a
moz-do-not-send="true"
href="http://iges.org/grads/gadoc/SDFdescriptorfile.html"
target="_blank">http://iges.org/grads/gadoc/SDFdescriptorfile.html</a></div>
</div>
<div>What do I need to add to make the file self
describing?</div>
<div> I'm not sure what I need to add to get this
to work. Here is what I have so far:</div>
<div><br>
</div>
<div>
<div>istatus = nf90_create(path = "<a
moz-do-not-send="true" href="http://foo.nc"
target="_blank">foo.nc</a>", cmode =
nf90_noclobber, ncid = ncid)</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
<div><br>
</div>
<div>istatus
=nf90_def_dim(ncid,'latitude',ny,ila)</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
<div>istatus
=nf90_def_dim(ncid,'longitude',nx,ilo)</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
<div>istatus =nf90_def_dim(ncid,'time',1,itt)</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
<div><br>
</div>
<div>iids = (/ilo,ila,itt/)</div>
<div><br>
</div>
<div>istatus = nf90_def_var(ncid,"ref",
nf90_float, iids, iref )</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
<div>istatus = nf90_def_var(ncid,"lat",
nf90_float, ila, ilat )</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
<div>istatus = nf90_def_var(ncid,"lon",
nf90_float, ilo, ilon )</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
<div>istatus = nf90_enddef(ncid)</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
<div><br>
</div>
<div>istatus = nf90_put_var(ncid,iref,ref)</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
<div>istatus = nf90_put_var(ncid,ilat,latrad)</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
<div>istatus = nf90_put_var(ncid,ilon,lonref)</div>
<div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
</div>
<div>
<div><br>
</div>
<div>istatus = nf90_close(ncid)</div>
<div> write (6,*)
trim(nf90_strerror(istatus))</div>
</div>
<div><br>
</div>
-- <br>
<div>
<div dir="ltr">
<div>
<div dir="ltr">Tom Robinson<br>
Treasurer - Graduate Student
Organization <br>
Secretary - Student Athletic Fee
Committee <br>
Graduate Student - Department of
Atmospheric Science <br>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
gradsusr mailing list
<a moz-do-not-send="true" href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a moz-do-not-send="true" href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a moz-do-not-send="true"
href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a moz-do-not-send="true"
href="http://gradsusr.org/mailman/listinfo/gradsusr"
target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">Tom Robinson<br>
Treasurer - Graduate Student Organization <br>
Secretary - Student Athletic Fee Committee <br>
Graduate Student - Department of Atmospheric Science <br>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<br>
</body>
</html>