[ncl-talk] help reading hdf file

Dennis Shea shea at ucar.edu
Wed Sep 18 14:57:21 MDT 2019


This type of question has been asked numerous time on ncl-talk. These *CloudSat
*files are *HDF-EOS*. The golden rule of data processing is "Look at the
data!"


%>* ncl_filedump*
<https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml>
2010024150054_19911_CS_2B-FLXHR-LIDAR_GRANULE_P2_R04_E03.hdf

Variable: f
Type: file
filename:       2010024150054_19911_CS_2B-FLXHR-LIDAR_GRANULE_P2_R04_E03
path:   2010024150054_19911_CS_2B-FLXHR-LIDAR_GRANULE_P2_R04_E03.hdf
   file global attributes:
      *HDFEOSVersion : HDFEOS_V2.5*
 ---------

As noted in previous ncl-talk responses, append .*he2  *

*%> ncl_filedump
<https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml> *
2010024150054_19911_CS_2B-FLXHR-LIDAR_GRANULE_P2_R04_E03.hdf*.he2*

The .he2 extension tell NCL to use HDFEOS software to provide value-added
information.

The .he2  flattens the file. It makes it look like a standard netCDF file.
It appends a name extension for assorted reasons.

%>* ncl_filedump*
<https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml>
2010024150054_19911_CS_2B-FLXHR-LIDAR_GRANULE_P2_R04_E03.hdf

The variables will have a 2B_FLXHR_LIDAR appended

f = addfile("2010024150054_19911_CS_2B-FLXHR-LIDAR_GRANULE_P2_R04_E03.hdf
*.he2"*,"r")

height = f->Height_2B_FLXHR_LIDAR
lon     = f->Longitude_2B_FLXHR_LIDAR
FD_NA = f->FD_NA_2B_FLXHR_LIDAR
FD = FD_2B_FLXHR_LIDAR



On Wed, Sep 18, 2019 at 12:53 PM Manisha Ganeshan via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hello,
>
> I'm trying to read the attached hdf file using the addfile function.
> I'm able to read the variables (Height, FD, FD_NC, and so on) directly
> from the file, but I also need to read the 11 GeoFields and 39 DataFields
> listed under groups. Any thoughts on how I can read these fields?
>
> I've tried the following, that doesn't seem to work.
>
> g = f=>GeoField
>
> When I type printVarSummary(g), I get the following output indicating that
> no variables are read.
>
> Variable: g
>
> Type: file
>
> File path:
> /data10/mganesha/CloudSat/2010024150054_19911_CS_2B-FLXHR-LIDAR_GRANULE_P2_R04_E03.hdf
>
> Number of global attributes: 2
>
> Number of dimensions: 7
>
> Number of variables: 0
>
> Could you advice on how to proceed?
>
> Thanks,
> Nisha
>  2010024150054_19911_CS_2B-FLXHR-LIDAR_GRANULE_P...
> <https://drive.google.com/file/d/12rdpMVRppvIlgb3zSBOmAS0nmi78C83X/view?usp=drive_web>
>
>
> --
> Dr. Manisha Ganeshan
> Universities Space Research Association
> Maryland, U.S.A.
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190918/57e7cae0/attachment.html>


More information about the ncl-talk mailing list