Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm currently working with MODIS data and i've been having some trouble with several aspects of the steps I need to take.

For example, I need to make a cloud mask from a daily MOD09GQK image, and i'm confused on how to do it. I have the QC_250m layer in a tif, but I don't understand the pixel values. I know I should convert, say 4096 to bits and get: 100000010010110, where the 3rd and 4th bits would represent the 00 'clear' flag.

enter image description here

But my main doubt is why do I get the same value where the image is cloudy and where the image is clear?

Help, please?

Thanks a lot

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I got your email. Sadly I don't have experience creating MODIS cloud masks. I've used the MOD35 cloud mask data, but I've never done the calculations myself.

That being said, I believe that MOD09 reflectance data are already corrected for cloudcover. There is a 2-bit word in the MOD09 QA layer for "Cloud state" that can be either Clear, Cloudy, Mixed, or Unknown. If your task is just to read these bits, then let me know and I can help you with that.

If you truly have to create your own cloud mask from scratch, you may have to use lower-level radiance data (MOD02).

share|improve this answer
    
Thank you! My task is just to read those bits... I have the QC_250m layer in a tif, but I don't understand the pixel values. I know I should convert, say 4096 to bits and get: 100000010010110, where the 3rd and 4th bits would represent the 00 'clear' flag. But this appears where I'm seeing clouds... –  vascobnunes May 7 '12 at 16:19
    
Try acc6.its.brooklyn.cuny.edu/~gurwitz/core5/nav2tool.html as decimal to bitpattern converter. You will find the QA bit patterns explained in modis-atmos.gsfc.nasa.gov/reference_atbd.html --> Cloud Mask --> PDF, see pp. 14+15. –  markusN May 7 '12 at 19:14
    
@vascobnunes The MODIS data QA layers use big-endian reference, which means the "first" bit is the farthest to the right and the "last" bit is the farthest to the left. So bits 3 and 4 from 100000010010110 are (in bold) 10000001001 01 10. Although bits are numbered right to left, bit words are still read left to right, so you would not reverse "01" to "10". The meaning of "01" is cloudy. The LPDAAC recently published this useful guide about how to use MODIS QA bands. –  dmahr May 7 '12 at 19:36
    
That's a very important info I didn't know of - I studied earth sciences not computer science, though I enjoy it a lot :) related to the QA layer, I still have some doubts because, I get the same value where the image is cloudy and where the image is clear... –  vascobnunes May 8 '12 at 9:15
    
@vascobnunes I figured it out! According to the MOD09 QA website "The cloud flags in MOD09Q1 are deliberately not populated. Users are directed to use the data state flag from MOD09A1 in to obtain a cloud mask for use with MOD09Q1 data." You're using a slightly different product, but it looks like this still applies. Try using the MOD09GA product to get the cloud mask. –  dmahr May 8 '12 at 13:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.