Re: reading raw calipso data in NCL

From: H. Joe Lee <hyoklee_at_nyahnyahspammersnyahnyah>
Date: Fri Feb 14 2014 - 09:20:24 MST

Hi, Matt!

  Finally, I added the CALIPSO VFM NCL example here:

  http://hdfeos.org/zoo/index_openLaRC_Examples.php#CALIPSO

  It uses "dim_gbits" function that Mary suggested.

  Regards,

--
Are your big (Earth) data in HDF(-EOS)?
On Tue, Jul 23, 2013 at 10:57 PM, Matthew Fearon <Matthew.Fearon@dri.edu> wrote:
> Hi Mary,
>
> Thanks for the examples you sent; "dim_gbits" and hdfeos example page. I'll
> take a look. In the meantime, I uploaded an hdf Calipso VFM, Vertical
> Feature Mask, to ftp.cgd.ucar.edu/incoming. The file name is:
>
> CAL_LID_L2_VFM-ValStage1-V3-02.2011-12-31T23-18-11ZD.hdf
>
> I'm trying to correctly unpack the variable 'Feature_Classification_Flags'
> which should be a one digit value. A discussion of the bit arrangement can
> be found here:
>
> http://www-calipso.larc.nasa.gov/resources/calipso_users_guide/data_summaries/vfm/index.php
>
> It would be great to add an example of this to the applications page. I
> believe it would help many users in the future.
>
> thank you in advance,
> Matt
>
>
> ________________________________
> From: Mary Haley [haley@ucar.edu]
> Sent: Tuesday, July 23, 2013 8:45 PM
> To: Matthew Fearon
> Cc: H. Joe Lee; ncl-talk@ucar.edu
>
> Subject: Re: reading raw calipso data in NCL
>
> Hi Matt (and Joe),
>
> I didn't see this message before I sent you the other response.
>
> I think you want to check out our "dim_gbits" function, which allows you to
> extract bits from an NCL data variable.
>
> After reading the description below, maybe Joe will have a better idea of
> how to extract the bits that you need. We might be able to add some examples
> of this on our applications page.
>
> Please look at example "hdf4eos_5.ncl" at:
>
> http://www.ncl.ucar.edu/Applications/HDF.shtml
>
> This example shows how to extra the bits you want and generate a contour
> plot.
>
> Here's the "dim_gbits" function documentation:
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/dim_gbits.shtml
>
> The dim_gbits function requires that you know how the bits are written.
>
> If you do an ncl_filedump on the HDF file, you should see a description of
> how
> the bits are laid out. The description looks something like this:
>
> % ncl_filedump MOD05_L2.A2002161.1830.004.2003221153410.hdf | less
>
> . . .
>
>       byte Cloud_Mask_QA ( Cell_Along_Swath_1km_mod05,
> Cell_Across_Swath_1km_mod05 )
>          long_name :    MODIS Cloud Mask, First Byte
>          unit : none
>          scale_factor :    1
>          add_offset :      0
>          Parameter_Type :       MODIS Input
>          Cell_Along_Swath_Sampling :    ( 1, 2030, 1 )
>          Cell_Across_Swath_Sampling :   ( 1, 1354, 1 )
>          Geolocation_Pointer :  External MODIS geolocation product
>          description :
>
>  bit field   Description                     Key
>  ---------   -----------                     ---
>
>  0           Cloud Mask Flag                 0 = not determined
>                                              1 = determined
>
>  1-2         Unobstructed FOV Quality Flag   00 = cloud
>                                              01 = 66% prob.
>                                                     clear
>                                              10 = 95% prob.
>                                                     clear
>                                              11 = 99% prob.
>                                                     clear
>              PROCESSING PATH FLAGS
>              ---------------------
>  3           Day / Night Flag                0 = Night / 1 = Day
>  4           Sunglint Flag                   0 = Yes / 1 = No
>  5           Snow / Ice Background Flag      0 = Yes / 1 = No
>  6-7         Land / Water Flag               00=Water/01=Coastal
>                                              10=Desert/11=Land
>          valid_range :  ( 0, -1 )
>          _FillValue :   0
>          hdf_name :     Cloud_Mask_QA
> . . .
>
>
> --Mary
>
> On Jul 23, 2013, at 9:10 PM, Matthew Fearon <Matthew.Fearon@dri.edu> wrote:
>
> Hi, Joe
> Thanks for your reply. At this time, I'm most interested in Calipso Vertical
> Feature Mask (VFM) and reading the associated variable
> 'Feature_Classification_Flags' from the hdf file, eg.,
> CAL_LID_L2_VFM-ValStage1-V3-02.2011-12-31T23-18-11ZD.hdf . NCL reads this
> variable as an unsigned short. However, in order to extract the correct
> flag, which should be a single value, it appears the data need to be bit
> interpreted. I'm not sure how to do this correctly in NCL. If you have any
> luck unpacking and or plotting up the data in NCL, please let me know. Right
> now, I'm trying to setup a temporary workaround with Matlab, via the code
> released by NASA, to extract the data correctly -- not an ideal solution.
>
> thanks again,
> Matt
>
>
> ________________________________________
> From: H. Joe Lee [hyoklee@hdfgroup.org]
> Sent: Tuesday, July 23, 2013 7:13 PM
> To: Matthew Fearon
> Subject: Re: reading raw calipso data in NCL
>
> Hi, Matt!
>
>  I'm also interested in plotting HDF CALIPSO data and post it under
> our website [1]  but I'm wondering if you could provide the specific
> NASA HDF product name (e.g.,
> CAL_IIR_L1-Prov-V1-11.2008-08-20T01-40-12ZD.hdf) that you're mostly
> interested in.
>
> Thanks,
>
>
> [1]  http://hdfeos.org/zoo
> --
> HDF: Software that Powers Science
>
>
> On Mon, Jul 22, 2013 at 2:56 PM, Matthew Fearon <Matthew.Fearon@dri.edu>
> wrote:
>
> Dear NCL users:
>
> Just curious if anyone has developed an NCL script to read raw Calipso data,
> particularly vertical feature mask, in hdf format and make a plot? I see
> there are a couple examples here:
> http://www.ncl.ucar.edu/Applications/calipso.shtml , but they are using a
> processed form of the data. Any assistance would be much appreciated.
>
> thanks,
> Matt
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Feb 14 09:21:12 2014

This archive was generated by hypermail 2.1.8 : Wed Feb 19 2014 - 15:58:35 MST