Re: appending data to existing Netcdf file

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed, 15 Aug 2007 16:23:00 -0600

Hi Gary,
It's pretty straightforward to append data to a variable that has an
unlimited dimension in PyNIO.
You simply assign to the variable, referencing the index you want to
append to. If you reference an index that is greater than
the last existing index plus one, then the intervening elements will
be created and filled with whatever is the _FillValue.

I am attaching a little script that creates a file with an unlimited
dimension, defines a variable and assigns some
values, then closes it, reopens it, and assigns more elements along
the unlimited dimension.
  -dave

On Aug 14, 2007, at 2:38 PM, Gary Bates wrote:

> hi,
> Does anyone have a PyNGL example in which data is appended to an
> existing Netcdf file (along UNLIMITED time axis)?
>
> For example, I have a file containing daily precip data from 1 Jan
> to 31 July 2007 and would like to update with 1-13 Aug data.
>
> Thanks,
> Gary
> _______________________________________________
> pyngl-talk mailing list
> pyngl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

Received on Wed Aug 15 2007 - 16:23:00 MDT

This archive was generated by hypermail 2.2.0 : Thu Aug 16 2007 - 09:44:03 MDT