Create record dimension in PyNIO?

From: Seth McGinnis <mcginnis_at_nyahnyahspammersnyahnyah>
Date: Tue, 19 Aug 2008 16:38:05 -0600

How do I create a record dimension in a NetCDF file using
PyNGL/PyNIO?

I'm converting some ascii-formatted files into NetCDF using
PyNGL. Here's a chunk of code that creates a longitude
dimension and associated coordinate variable:

# create NetCDF file

fname = "test.nc"
os.system("/bin/rm -f "+fname)
ofile = Nio.open_file(fname, "c")

ofile.create_dimension("lon",nx)
lon = ofile.create_variable("lon","f",("lon",))
lon.standard_name = "longitude"
lon.long_name = "longitude"
lon.axis = "X"
lon.units = "degrees_east"

lon[:] = Ngl.fspan(minlon, maxlon, nx)

When I do the same thing for the time coordinate, I need to
make it an unlimited record dimension. If I were using
NCL, I'd use "filedimdef(ofile,"time",-1,True)". What's
the equivalent in PyNGL/PyNIO?

Thanks.

----
Seth McGinnis
Associate Scientist
ISSE / NCAR
----
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 19 2008 - 16:38:05 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 25 2008 - 15:23:45 MDT