On Fri, Jun 2, 2017 at 8:15 AM, s.dehnavi@xxxxxxxxxxxxxxxxxxxx <
s.dehnavi@xxxxxxxxxxxxxxxxxxxx> wrote:
> Dear Sir/Madam;
> I have some netcdf (.nc) data and I am trying to convert them into the .h5
> format. Would you please let me
> know if I can go through this conversion or not?
> Someone told me that the netcdf-4 is exactly the same as .hdf5.
>
yes, netcdf4 Is HDF-5
However the netcdf4 library can also read and write netcdf3, which is a
different format. So if your files are netcdf3, they will need to be
converted.
the ncdump utility should be able to tell you:
ncdump -k the_file.nc
If it doesn't say"netCDF-4",then you need to convert.
The sccopy utility can convert, this should do it:
nccopy -k netCDF-4 the_input_file.nc the_ouput_file.nc
However, I have a code in IDL programming language.
This code was prepared for some HDF data few years ago. I want to still run
> the same code for my new data. However, my code doesn't work with this new
> data.
> I wish to check if I can convert my netcdf data to hdf? Is there any
> software, etc. to do the conversion?
>
That software may be expecting the data arranged in a particular way, which
would be another issue.
but try the above and see how far you get.
-CHB
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@xxxxxxxx