[Numpy-discussion] what python module to modify NetCDF data?
Sat Oct 8 11:25:20 CDT 2011
On Saturday, October 8, 2011, Kiko <email@example.com> wrote:
> Quoting Chao YUE <firstname.lastname@example.org>:
>> > Dear all,
>> > I want to change some variable values in a series of NetCDF file. Did
>> > anybody else did this before using python?
>> > Now I use pupynere for reading data from NetCDF files and making plots.
>> > the document of pupynere for writing data to NetCDF file is quite
>> > I still feel difficult to do this with pupynere.
>> > the NetCDF file I want to change is a global data (0.5X0.5d resolution,
>> > 360X720grid with 12 time steps) and have approx. 10 variables. I just
>> > to change some points for a specific
>> > variable for all 12 time steps. I know it's possible use NCO ncap2
>> > to do the job. but now I have some problem in using ncap2 within a
>> > script.
>> > I guess there is some easy way to use some python module to do the job?
>> > mainly altering the data that need to change while let the others
>> > intact?
>> > Any idea will be greatly appreciated. I will all a good weekend,
>> > Chao
> Have a look to  and .
>  http://code.google.com/p/netcdf4-python/
>  http://www.scipy.org/doc/api_docs/SciPy.io.netcdf.html
Just a caveat about scipy.io.netcdf, it only reads and writes. It does not
modify. So, what one has to do with that module is to load up all data,
modify some of it, and then save it all back to a new file.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion