see: http://www.pyngl.ucar.edu/Examples/Scripts/nio04.py
file.create_dimension("time", None) # unlimited dimension
==
You should post PyNIO email list.
Good luck
D
==================================
Seth McGinnis wrote:
> 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
>
-- ====================================================== Dennis J. Shea tel: 303-497-1361 | P.O. Box 3000 fax: 303-497-1333 | Climate Analysis Section | Climate & Global Dynamics Div. | National Center for Atmospheric Research | Boulder, CO 80307 | USA email: shea 'at' ucar.edu | ====================================================== _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Tue Aug 19 2008 - 17:00:43 MDT
This archive was generated by hypermail 2.2.0 : Mon Aug 25 2008 - 15:23:45 MDT