Re: read byte values from HDF file QA flag

From: Marston Johnston <shejo284_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 14 2013 - 00:26:07 MDT

Hi Xin,

There is a function called dim_gbits() that can do as you require.

http://www.ncl.ucar.edu/Document/Functions/Built-in/dim_gbits.shtml

/M

On Wed, Aug 14, 2013 at 8:10 AM, Xin Xi <xxi@gatech.edu> wrote:

> Hi,
> The quality assurance (QA) flag in a MODIS HDF file is in 8-bit unsigned
> integer type (valid range 0-254). I want to read bit position 2 and 3,
> which give me a value between 0 and 3. How can I do it? I tried to use
> logical operator but it returns true or false values.
> Thanks,
> Xin
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
Only the fruitful thing is true!

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 14 00:26:20 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 14 2013 - 18:35:09 MDT