Interpreting floating-point QC values from OPeNDAP MOD21A1D

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
kodiologist
Posts: 8
Joined: Wed Oct 07, 2020 9:09 am America/New_York
Answers: 0

Interpreting floating-point QC values from OPeNDAP MOD21A1D

by kodiologist » Thu Jan 27, 2022 10:33 am America/New_York

With MOD11 data from OPeNDAP, and with MOD21A1D HDF files from EarthData Search, I've been able to interpret values of the `QC` variable with bitwise operations and the appropriate user guide. In these cases, `QC` is provided as integers. But in the case of MOD21A1D data from OPeNDAP, `QC` is given as floating-point numbers (`Float32` in OPeNDAP parlance), and I can't see how it's meant to represent the bit patterns described in the user guide (Table 10 on pages 24-26 of [link] ://lpdaac.usgs.gov/documents/620/MOD21_User_Guide_V61.pdf ).

For example, in the file `MOD21A1D.A2003001.h12v04.061.2020084062741.hdf` I got from EarthData Search, the first five `QC` values are all 54 (hexadecimal 36). The corresponding values from OPeNDAP, available at [link] ://opendap.cr.usgs.gov/opendap/hyrax/MOD21A1D.061/h12v04.ncml.ascii?QC%5B766:1:766%5D%5B0:1:0%5D%5B0:1:4%5D , are all -0.509091 (hexadecimal 86b56fbf in 32-bit IEEE floating point). So how can I interpret the OPeNDAP version?

Filters:

LP DAAC - afriesz
Subject Matter Expert
Subject Matter Expert
Posts: 59
Joined: Tue Nov 12, 2019 4:02 pm America/New_York
Answers: 2
Been thanked: 2 times

Re: Interpreting floating-point QC values from OPeNDAP MOD21A1D

by LP DAAC - afriesz » Tue Feb 01, 2022 12:40 pm America/New_York

@kodiologist ,

Thank you for pointing out this issue. The OPeNDAP URL you are accessing is one that is configured to automatically apply scale factors and offsets to the science datasets. This issue was unknown to us. We will investigate this behavior for that OPeNDAP URL. We do have another OPeNDAP URL that is configured to not apply the scale factors and offsets. That endpoint is, in fact, returning correct data for the QC layer. The following link will provide correct, unscaled data for M*D21A1D and M*D21A1N: https://opendap.cr.usgs.gov/opendap/uns/MOD21A1D.061/h12v04.ncml.html

Post Reply