[Thread Prev][Thread Next][Index]

Re: [ferret_users] How to fix error in reading hdf data?



Hi -
Ferret links with the HDF5 libraries which do not read HDF4 files.  The Ferret lis linked with the NetCDF library and  the HDF5 library, and it's NetCDF that is issuing that error message. It isn't a very helpful message, is it?

Ansley

On 11/24/2010 10:59 AM, cshaji@xxxxxxxxxxxxxxxxxxxxx wrote:
Dear Ansley&  All:
Nice to see all the discussions regarding reading hdf data file.
Please note that I have taken my data file from the following URL.

ftp://podaac.jpl.nasa.gov/pub/sea_surface_temperature/avhrr/pathfinder/data_v5/monthly/night/04km/1985/bsst/

I downloaded the following file and tried it in my 64-bit linux running machine having Ferret version 6.64.
-rw-r--r--    1 ftp      ftp       7165044 Jun 15  2009 198501.s04m1pfv50-bsst-16b.hdf
But I ended up with the following error. I understand that this is hdf version 4.

[cshaji@circulation dataver5]$ ferret
         NOAA/PMEL TMAP
         FERRET v6.64
         Linux(gfortran) 2.6.9-89.0.20.ELsmp - 09/16/10
         25-Nov-10 11:25

yes? use 198501.s04m1pfv50-bsst-16b.hdf
  **netCDF error
              Attempt to use feature that was not turned on when netCDF was built. (OPeNDAP/netCDF Error code -128)
              Data set: ./198501.s04m1pfv50-bsst-16b.hdf

I will also follow your suggestions in reading hdf 4 file in Ferret 6.64.

Best regards

Shaji.

----- Original Message -----
Hi Ansley,

I used this other link (seems the wrong one) :

http://www.hdfgroup.org/hdf-java-html/samples/

Yes, yours works fine. Anyway, I will follow your advice and take a look on the TDS server. I will love to read the modis data (oceancolour) directly into ferret.

Best regards, and thanks!

Antonio


2010/11/24 Ansley Manke<  Ansley.B.Manke@xxxxxxxx>



Hi Antonio,
Which files are you trying? I downloaded some files from www.hdfgroup.org , from the first and second links here,

http://www.hdfgroup.org/HDF5/hdf5-files.html





and they open successfully with Ferret v6.6 and higher (both our 64-bit and 32-bit executables)



NOAA/PMEL TMAP
FERRET v6.64
Linux rh5 (gfortran) 2.6.18-164.11.1.el5 - 09/09/10
24-Nov-10 09:48

yes? use h5ex_d_compact.h5
yes? show data
currently SET data sets:
1>  ./h5ex_d_compact.h5 (default)
name title I J K L
DS1 1:7 1:4 ... ...

yes? list ds1
VARIABLE : DS1
FILENAME : h5ex_d_compact.h5
SUBSET : 7 by 4 points (X-Y)
1 2 3 4 5 6 7
1 2 3 4 5 6 7
1 / 1: 0.00 -1.00 -2.00 -3.00 -4.00 -5.00 -6.00
2 / 2: 0.00 0.00 0.00 0.00 0.00 0.00 0.00
3 / 3: 0.00 1.00 2.00 3.00 4.00 5.00 6.00
4 / 4: 0.00 2.00 4.00 6.00 8.00 10.00 12.00

For hdf4 files, there is a possible roundabout solution which is to install a TDS server, put your files there, and then ferret could read them via their thredds URL. This is something I have done, and it's not too difficult. The software and instructions are here,
http://www.unidata.ucar.edu/projects/THREDDS/


On 11/24/2010 8:48 AM, Antonio Rodríguez wrote:

Hi,

I've found very frustrating the task of reading a hdf file in ferret (v6.64). I've tried with samples from the hdfgroupc but with any of them I get the same message:




**netCDF error
Attempt to use feature that was not turned on when netCDF was built. (OPeNDAP/netCDF Error code -128)


or with other type of data (i.e: oceancolour datasets: modis aqua)

I get:

**netCDF error
Can't open HDF5 attribute (OPeNDAP/netCDF Error code -107)

In this last case I know that they are hdf4 so I do not complain ;-) (I tried to convert to hdf5 with h4toh5 tools, but no way) The point is that the first examples above (hdfgroup) are hdf5 files

Do you know any hdf data source readable by ferret? Just to make a couple of tests

Best regards!

Antonio


2010/11/24 Ansley Manke<  ansley.b.manke@xxxxxxxx>



hi-
Well, Ferret was built with a NetCDF library that we built ourselves specifically with HDF reading enabled, and have passed the tests that are part of the process of building those libraries. But we have not had a variety of files to test with. The library reads HDF-5 files and not HDF-4. Yogesh and Shaji, do you know what version of HDF was used to write the files you are trying to use?

Ansley


On 11/23/2010 2:44 PM, Yogesh Tiwari wrote:


Hi Ansley,

I am also getting similar error as below Shaji gets. I am using ferret v6.64 on linux.
I was trying to read hdf CO2 files from AIRS retrievals.

Thanks,

Regards,
Yogesh



On Tue, Nov 23, 2010 at 1:54 PM,<  cshaji@xxxxxxxxxxxxxxxxxxxxx>  wrote:



Dear Ansley:


Thanks for your above suggestion. I was in fact using Ferret version 6.2. But after getting your reply, I installed Ferret version 6.6 and tried the same hdf file. Now I get a different error with version 6.6 as follows.

[cshaji@circulation dataver5]$ ferret
NOAA/PMEL TMAP
FERRET v6.64
Linux(gfortran) 2.6.9-89.0.20.ELsmp - 09/16/10
24-Nov-10 13:14

yes? use "/work/data/sst/dataver5/198501.s04m1pfv50-bsst-16b.hdf"
**netCDF error
Attempt to use feature that was not turned on when netCDF was built. (OPeNDAP/netCDF Error code -128)
Data set: /work/data/sst/dataver5/198501.s04m1pfv50-bsst-16b.hdf

Perhaps this can this be a problem with the hdf data file itself while its creation? If so, any way to fix it?
Please give me a reply.

Best regards,






On 11/23/2010 2:39 AM, cshaji@xxxxxxxxxxxxxxxxxxxxx wrote:
Dear All:
I am trying to read an hdf sst data file in Ferret. I get the following error.

yes? use "/work/data/sst/dataver5/198510.s04m1pfv50-bsst-16b.hdf"
**netCDF error
NetCDF: Unknown file format (OPeNDAP/netCDF Error code -51)
Data set: /work/data/sst/dataver5/198510.s04m1pfv50-bsst-16b.hdf

What is Error code 51 means and how to fix it in Ferret?

Can somebody give me a good suggestion?

Regards

Shaji.





[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement