[Numpy-discussion] what python module to modify NetCDF data?

Chao YUE chaoyuejoy@gmail....
Sun Oct 9 04:48:17 CDT 2011


Thanks for all for very useful discussions. I am just on the beginning of
modeling and for now I only use netCDF4 data.
I think it might be a good idea to try
netcdf4-python<http://code.google.com/p/netcdf4-python/>first. I think
whitaker will continue to develop this package.
But it gave me a good idea what python package people are using for netCDF
data.

Chao

2011/10/9 Konrad Hinsen <konrad.hinsen@fastmail.net>

> On 8 oct. 11, at 17:57, Vicente Sole wrote:
>
> > I have never seen myself a NetCDF file but if your NetCDF file is
> > using HDF5 as format (possible since NetCDF 4 if I am not mistaken),
> > you should be able to use h5py or PyTables to access and or modify it.
>
> I haven't tried this, but I don't think it's a good plan. PyTables can
> read arbitrary HDF5 files, but writes only a subset. The HDF5-based
> netCDF 4 format is also a subset of valid HDF5 files. It is unlikely
> that those two subsets are compatible, meaning that sooner or later
> PyTables will produce a file that netCDF 4 will not accept. h5py would
> be a better choice for an HDF5-based approach.
>
> However, there are two reasons for using a specific netCDF interface
> rather than HDF5:
>
> 1) There are still plenty of non-HDF5 netCDF files around, and netCDF4
> continues to support them.
> 2) The netCDF interface is simpler than the HDF5 interface, and
> therefore easier to use, even if that difference is much less
> important in Python than in C or Fortran.
>
> A full netCDF interface has been available for many years as part of
> the ScientificPython package:
>
>
> http://dirac.cnrs-orleans.fr/ScientificPython/ScientificPythonManual/
>
> Recent versions fully support netCDF4, including the HDF5-based formats.
>
> There are other Python interfaces to the netCDF libraries, but I
> haven't used them.
>
> Konrad.
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20111009/c89245fd/attachment.html 


More information about the NumPy-Discussion mailing list