Re: reading variable attributes

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 18 2012 - 13:54:28 MDT

   f = addfile("foo.nc", "r")

   Q_MinMax = f->Q@min_max

On 7/18/12 1:36 PM, David B. Reusch wrote:
> Hello all,
>
> I have this idea that by adding min/max values for variables as
> attributes in the netCDF file I might be able to save time later when
> trying to create consistent colorbars/contouring, i.e., my script just
> reads the attribute instead of crunching through all the data. Some
> experience has suggested I won't actually be saving anything since it
> seems to be taking just as long to read the attributes as it does to
> read the whole var (though it will still be nice to have the stats
> easily viewable as attributes...). Hence my actual question: does NCL
> have to read the whole var to get its attributes? I wouldn't have
> thought the netCDF data model would require this but I'm not an expert.
> And it's also possible something else is still slowing it down, I
> haven't had a chance to really dig into this much.
>
> Thanks,
> Dave
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 18 13:54:40 2012

This archive was generated by hypermail 2.1.8 : Wed Jul 18 2012 - 14:33:00 MDT