netcdf and hdf together [message #49690] |
Mon, 07 August 2006 15:50  |
queiny
Messages: 15 Registered: November 2005
|
Junior Member |
|
|
I am trying to read in data from a HDF file and put the results input a
NetCDF file. The NetCDF file has one dimension and it is unlimited.
While I only have ~5000 data points, the output NetCDF has 7474 records
as shown by 'ncdump -h'. And the data in the NetCDF file look
reasonable, I just don't know where the extra data are from. I printed
out the # of record when writing, it is correct.
I have tried debug the program for a while. Can anyone point me to the
right track? Or can anyone answer me the following wild questions.
Can we use both HDF and NetCDF in the same file? I used different file
id and variable id for NetCDF and HDF files.
Can a NetCDF file has only one dimension and it is unlimited? ( I have
done this in FORTRAN.)
Do I need to use long integer for the dimension, or turns on other
compile options?
Many thanks,
Q
|
|
|
Re: netcdf and hdf together [message #49707 is a reply to message #49690] |
Fri, 11 August 2006 03:29  |
Maarten[1]
Messages: 176 Registered: November 2005
|
Senior Member |
|
|
liamgumley@gmail.com wrote:
> Finally, it's not all that difficult to work with HDF4 files in IDL,
> particularly the 'Scientific Data Set' variant. However with HDF5, all
> bets are off.
With IDL 6.2 reading HDF5 just works, and with IDL 6.3 both reading and
writing work just fine, IME.
Since the variety of data set types in HDF5 has been reduced
drastically, I think you're less likely to encounter trouble with HDF5
than with HDF4: the format is in some ways simpler.
Maarten
|
|
|