how to identify unlimited NetCDF dimensions in PyNIO?

From: Michael Decker <m.decker_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 18 2010 - 05:05:09 MDT

Hi all,

I found no way so far to find out which dimension of a given NetCDF file
might be unlimited. That would be rather important for me to know
though, as I'm producing new files based on that information. And
according to documentation, it is possible to create unlimited
dimensions using PyNIO. So it would be logical to be able to read them
as well.

The only access to dimension information I know of so far is the
dimensions-dict in the NIO file object. But unfortunately it only shows
the current size of the unlimited dimension.
NIO obviously knows the information I want to have: When converting a
NIO file object to string (for example by using print on it), PyNIO
1.4.0 shows something like this:
[...]
dimensions:
       lat = 2
       lon = 2
       lev = 2
       time = 2 // unlimited
[...]
I would like to avoid having to pull that information out of the string
by force with some messy/ugly code. Is there any nicer way to get Nio to
tell me which (if any) dimension is unlimited?

Thanks,
Michael

-- 
Michael Decker
Forschungszentrum Jülich
ICG-2: Troposphäre
E-Mail: m.decker@fz-juelich.de

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

Received on Wed Aug 18 05:05:16 2010

This archive was generated by hypermail 2.1.8 : Sun Aug 22 2010 - 22:06:33 MDT