From: Jeff W. <Jef...@no...> - 2005-11-01 21:58:16
|
Francesc et al: I've written a module that emulates the Scientific.IO.NetCDF API, but saves the data in a pytables hdf5 file. Enclosed is a tarball that contains: 1) NetCDF.py is the Scientific.I0.NetCDF emulator for pytables. It should be installed in <sys.prefix>/lib/pythonX.Y/site-packages/tables. To use, 'import tables.NetCDF'. 2) test.py is a simple test.script. 3) h5.py is a plugin for the python OPeNDAP module, available from http://opendap.oceanografia.org/. Just drop it in the dap/plugins directory before running setup.py. This allows files created with the tables.NetCDF API to be served over http with OPenDAP, as long as the file extension is h5, H5, hdf5 or HDF5. Note: h5.py is pretty much a direct copy of the netcdf plugin (netcdf.py) with only 2 lines changed. 4) nctoh5.py is a new version of the nctoh5 utility that uses the nctoh5 method of a tables.NetCDF.NetCDFFile class instance. Ulimately, I'd like this module to save the data in an hdf5 file that is compatible with netCDF 4 (http://www.unidata.ucar.edu/software/netcdf/netcdf-4/) so that netCDF 4 clients can read it. In the meantime, I think some users who are used to the Scientific.IO.NetCDF interface might find it useful, especially those who are interested in sharing their data over http with OPeNDAP. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/CDC R/CDC1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |