reading hdf format files

Lee HanSoo hslee at RCDE.DPRI.KYOTO-U.AC.JP
Fri Jun 10 10:28:14 EDT 2005


Hi grads users

I have two hdf files and a fortran program to read the hdf files.
When I tried to read one of the files with the fortran program, I have
errors from the compiling process of the fortran program about hdf
library.
But I have hdf library installed corrently since I can handle with the
other hdf file in GrADS and with hdfdump and ncgen to make .nc file.

I attached hdfdump info. of the file below. It is strange also that one
file is ok with hdfdump while the other gave just header info. without
data. You can see it below. So one of the file was ok to make .nc but the
other had an error to make .nc file.

I am working on Linux RH9.0 with GrADS 1.9b4.
Thanks for any help.

Lee HanSoo

hdfdump info. and fortran error message.
--------------------------------------------------------------------------
netcdf 1994001h09da-adm {
dimensions:
 Longitude = 4096 ;
 Latitude = 2048 ;
 fakeDim2 = 4096 ;
 fakeDim3 = 2048 ;
 fakeDim4 = 4096 ;
 fakeDim5 = 2048 ;

variables:
 byte Sea_Surface_Temperature(Longitude, Latitude) ;
  Sea_Surface_Temperature:scale_factor =
0.1500000059604645 ;
  Sea_Surface_Temperature:scale_factor_err = 0. ;
  Sea_Surface_Temperature:add_offset = -3. ;
  Sea_Surface_Temperature:add_offset_err = 0. ;
  Sea_Surface_Temperature:calibrated_nt = 20 ;
  Sea_Surface_Temperature:Slope = 0.15000001f ;
  Sea_Surface_Temperature:Intercept = -3.f ;
  Sea_Surface_Temperature:Unit = "Degree in Celsius" ;
  Sea_Surface_Temperature:Equation = "SST (Celsius) = DN
* .15 - 3.0" ;
 byte Pixel_Quality_per_Bin__3_Best__2_Mediocre_1_Bad_0_Very_Bad_
(fakeDim2, fakeDim3) ;

 Pixel_Quality_per_Bin__3_Best__2_Mediocre_1_Bad_0_Very_Bad_:Band_N
ame = "Pixel Quality per Bin (3=Best; 2=Mediocre;1=Bad;0=Very Bad)" ;
 byte Number_of_Observations_per_Bin(fakeDim4, fakeDim5) ;
  Number_of_Observations_per_Bin:Band_Name = "Number of
Observations per Bin" ;

// global attributes:
  :Title = "AVHRR Oceans Pathfinder Equal Angle" ;
  :Data_Center = "NASA/PO.DAAC AVHRR Oceans Pathfinder" ;
  :Station = "NOAA/NESDIS" ;
  :Mission = "AVHRR Oceans Pathfinder" ;
  :Mission_Characteristics = "NOAA/NASA AVHRR Oceans
Pathfinder" ;
  :Sensor = "NOAA polar orbiter data" ;
  :Sensor_Characteristics = "National Oceanic and
Atmospheric Administration Polar Orbiter" ;
  :Product_name = "Equal Angle Map HDF" ;
  :Quality_type = "All pixel SST" ;
  :Binning_period = "DAILY" ;
  :Pass = "Ascending" ;
  :Processing_control = "Algorithm: V4.2 pathfinder
flagtree 14oct97" ;
  :Data_start_time = "1/1/1994 00:00:00" ;
  :Data_end_time = "1/1/1994 23:59:59" ;
  :Data_processing_time = "Wed Jul 14 18:20:30 1999" ;
  :Start_year = 1994s ;
  :End_year = 1994s ;
  :Start_day = 1s ;
  :End_day = 1s ;
  :Start_millisec = 72032 ;
  :End_millisec = 72032 ;
  :Number_of_rows = 2048 ;
  :Number_of_columns = 4096 ;
  :Map_projection = "Equirectangular projection" ;
  :Parameter_name = "Sea Surface Temperature" ;
  :Orbit = 27178.f ;
  :Maximum_Latitude = 89.956055f ;
  :Minimum_Latitude = -89.956055f ;
  :Maximum_Longitude = 179.95605f ;
  :Minimum_Longitude = -179.95605f ;

data:
}

---------------------------------------------------------------------------
f77 read_pfsst_data.o -L/usr/lib -ldf -o read_pfsst_data
/usr/lib/libdf.a(cdeflate.o)(.text+0x439): In function
`HCIcdeflate_decode':
: undefined reference to `inflate'
/usr/lib/libdf.a(cdeflate.o)(.text+0x4c5): In function
`HCIcdeflate_encode':
: undefined reference to `deflate'
/usr/lib/libdf.a(cdeflate.o)(.text+0x594): In function `HCIcdeflate_term':
: undefined reference to `deflate'
/usr/lib/libdf.a(cdeflate.o)(.text+0x5f3): In function `HCIcdeflate_term':
: undefined reference to `deflateEnd'
/usr/lib/libdf.a(cdeflate.o)(.text+0x650): In function `HCIcdeflate_term':
: undefined reference to `inflateEnd'
/usr/lib/libdf.a(cdeflate.o)(.text+0x7da): In function
`HCIcdeflate_staccess2':
: undefined reference to `deflateInit_'
/usr/lib/libdf.a(cdeflate.o)(.text+0x835): In function
`HCIcdeflate_staccess2':
: undefined reference to `inflateInit_'
/usr/lib/libdf.a(dfjpeg.o)(.text+0x5c): In function `DFCIjpeg':
: undefined reference to `jpeg_std_error'
/usr/lib/libdf.a(dfjpeg.o)(.text+0x6e): In function `DFCIjpeg':
: undefined reference to `jpeg_CreateCompress'
/usr/lib/libdf.a(dfjpeg.o)(.text+0x12a): In function `DFCIjpeg':
: undefined reference to `jpeg_set_defaults'
/usr/lib/libdf.a(dfjpeg.o)(.text+0x13c): In function `DFCIjpeg':
: undefined reference to `jpeg_set_quality'
/usr/lib/libdf.a(dfjpeg.o)(.text+0x146): In function `DFCIjpeg':
: undefined reference to `jpeg_start_compress'
/usr/lib/libdf.a(dfjpeg.o)(.text+0x16d): In function `DFCIjpeg':
: undefined reference to `jpeg_write_scanlines'
/usr/lib/libdf.a(dfjpeg.o)(.text+0x184): In function `DFCIjpeg':
: undefined reference to `jpeg_finish_compress'
/usr/lib/libdf.a(dfjpeg.o)(.text+0x18c): In function `DFCIjpeg':
: undefined reference to `jpeg_destroy_compress'
/usr/lib/libdf.a(dfunjpeg.o)(.text+0x189): In function `jpeg_HDF_src':
: undefined reference to `jpeg_resync_to_restart'
/usr/lib/libdf.a(dfunjpeg.o)(.text+0x250): In function `DFCIunjpeg':
: undefined reference to `jpeg_std_error'
/usr/lib/libdf.a(dfunjpeg.o)(.text+0x262): In function `DFCIunjpeg':
: undefined reference to `jpeg_CreateDecompress'
/usr/lib/libdf.a(dfunjpeg.o)(.text+0x291): In function `DFCIunjpeg':
: undefined reference to `jpeg_read_header'
/usr/lib/libdf.a(dfunjpeg.o)(.text+0x299): In function `DFCIunjpeg':
: undefined reference to `jpeg_start_decompress'
/usr/lib/libdf.a(dfunjpeg.o)(.text+0x2b6): In function `DFCIunjpeg':
: undefined reference to `jpeg_read_scanlines'
/usr/lib/libdf.a(dfunjpeg.o)(.text+0x2db): In function `DFCIunjpeg':
: undefined reference to `jpeg_finish_decompress'
/usr/lib/libdf.a(dfunjpeg.o)(.text+0x2e3): In function `DFCIunjpeg':
: undefined reference to `jpeg_destroy_decompress'
collect2: ld returned 1 exit status
make: *** [read_pfsst_data] Error 1



More information about the gradsusr mailing list