From: Jeff W. <js...@fa...> - 2010-10-30 13:08:58
|
On 10/30/10 3:41 AM, John wrote: > I've searched through the netcdf4-python trunk, but I find no > reference of NetCDFFile as in how the basemap or Scientific.IO.NetCDF > modules use it. > > For compatibility with my old scripts, is it safe to simply: > > from netCDF4 import Dataset as NetCDFFile > > ?? > > Thanks, > john > John: Neither basemap or Scientific.IO.NetCDF uses it. What gave you the impression they did? There is a 'NetCDFFile' in function in basemap, but it is based on the pure-python netCDF module pupynere. It doesn't support netcdf-4 and I only recommend using it for the occasional light use. The netcdf4-python API is mostly compatible with Scientific.IO.NetCDF, so if you have old script that use the latter, you can try: from netCDF4 import Dataset as NetCDFFile The docs for netcdf4-python are at http://netcdf4-python.googlecode.com/svn/trunk/docs/netCDF4-module.html -Jeff |