2009/9/25 David Huard <david.hu...@gmail.com>: > Hi George, > > On Fri, Sep 25, 2009 at 6:55 AM, George Nurser <gnur...@googlemail.com> > wrote: >> >> Hi, >> I hope this is the right place to ask this. >> I've found the MFDataset works well in reading NetCDF3 files, but it >> appears that it doesn't work at present for NetCDF4 files. >> > > It works on my side for netCDF4 files. What error are you getting ? > >> >> Is this an inherent problem with the NetCDF4 file structure, or would >> it be possible to implement the MFDataset for NetCDF4 files sometime? >> It would be very useful. >> > > From the docstring: > > Datasets must be in C{NETCDF4_CLASSIC, NETCDF3_CLASSIC or NETCDF3_64BIT} > format (C{NETCDF4} Datasets won't work). > > I suspect your files are not in CLASSIC mode.
I haven't tried it yet:) I was just trusting the documentation (which I've found to be very good). Doing ncdump -k on my files gives 'netCDF-4' so I guess the files are indeed not in CLASSIC mode. > NETCDF4 datasets are allowed > to have a more complex hierarchy than the CLASSIC mode, and I think this is > what makes concatenation difficult to implement. That is, there would be no > simple rule to determine which fields should be concatenated. > > David Ok. I suspected it was something like that. If the netCDF-4 CLASSIC mode allows data compression and chunking, which I think it is supposed to do, perhaps I can persuade the guys running the model to produce files in netCDF-4 CLASSIC mode. Many thanks. George. _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion