Access to specific l2_flags in MODIS SST data
Posted: Tue Feb 27, 2018 6:31 am America/New_York
Hi colleagues,
I have a question regarding the extraction of explicit flag information on a pixel level. I am working with MODIS SST level 2 files and would like to understand the meaning of the flag value which is hard to reconstruct from the coding system. I am aware of the information here https://oceancolor.gsfc.nasa.gov/atbd/ocl2flags/ and had a look into this question https://oceancolor.gsfc.nasa.gov/forum/oceancolor/topic_show.pl?tid=7363. I also read the l2_flags and the associating code values to given flag names:
int geophysical_data/l2_flags[pixels_per_line,number_of_lines] (Chunking: [91,909]) (Compression: shuffle,level 4)
long_name: Level-2 Processing Flags
valid_min: NA
valid_max: 2147483647
flag_masks: 1
flag_masks: 2
flag_masks: 4
flag_masks: 8
flag_masks: 16
flag_masks: 32
flag_masks: 64
flag_masks: 128
flag_masks: 256
flag_masks: 512
flag_masks: 1024
flag_masks: 2048
flag_masks: 4096
flag_masks: 8192
flag_masks: 16384
flag_masks: 32768
flag_masks: 65536
flag_masks: 131072
flag_masks: 262144
flag_masks: 524288
flag_masks: 1048576
flag_masks: 2097152
flag_masks: 4194304
flag_masks: 8388608
flag_masks: 16777216
flag_masks: 33554432
flag_masks: 67108864
flag_masks: 134217728
flag_masks: 268435456
flag_masks: 536870912
flag_masks: 1073741824
flag_masks: NA
flag_meanings: ATMFAIL LAND PRODWARN HIGLINT HILT HISATZEN COASTZ SPARE STRAYLIGHT CLDICE COCCOLITH TURBIDW HISOLZEN SPARE LOWLW CHLFAIL NAVWARN ABSAER SPARE MAXAERITER MODGLINT CHLWARN ATMWARN SPARE SEAICE NAVFAIL FILTER SPARE BOWTIEDEL HIPOL PRODFAIL SPARE
For one SST nc.file (A2002185) I found the following flag values: 1073742624, 1073742384, 1073742368, 1073742352, 1073742592, 1073742336, 1073742416, 1073742354.
Are those codes actually bit values? How to get from there to specific single-flag pixels (e.g. only the cloud-ice-flag)?
Your help is highly appreciated. Thanks a lot!
I have a question regarding the extraction of explicit flag information on a pixel level. I am working with MODIS SST level 2 files and would like to understand the meaning of the flag value which is hard to reconstruct from the coding system. I am aware of the information here https://oceancolor.gsfc.nasa.gov/atbd/ocl2flags/ and had a look into this question https://oceancolor.gsfc.nasa.gov/forum/oceancolor/topic_show.pl?tid=7363. I also read the l2_flags and the associating code values to given flag names:
int geophysical_data/l2_flags[pixels_per_line,number_of_lines] (Chunking: [91,909]) (Compression: shuffle,level 4)
long_name: Level-2 Processing Flags
valid_min: NA
valid_max: 2147483647
flag_masks: 1
flag_masks: 2
flag_masks: 4
flag_masks: 8
flag_masks: 16
flag_masks: 32
flag_masks: 64
flag_masks: 128
flag_masks: 256
flag_masks: 512
flag_masks: 1024
flag_masks: 2048
flag_masks: 4096
flag_masks: 8192
flag_masks: 16384
flag_masks: 32768
flag_masks: 65536
flag_masks: 131072
flag_masks: 262144
flag_masks: 524288
flag_masks: 1048576
flag_masks: 2097152
flag_masks: 4194304
flag_masks: 8388608
flag_masks: 16777216
flag_masks: 33554432
flag_masks: 67108864
flag_masks: 134217728
flag_masks: 268435456
flag_masks: 536870912
flag_masks: 1073741824
flag_masks: NA
flag_meanings: ATMFAIL LAND PRODWARN HIGLINT HILT HISATZEN COASTZ SPARE STRAYLIGHT CLDICE COCCOLITH TURBIDW HISOLZEN SPARE LOWLW CHLFAIL NAVWARN ABSAER SPARE MAXAERITER MODGLINT CHLWARN ATMWARN SPARE SEAICE NAVFAIL FILTER SPARE BOWTIEDEL HIPOL PRODFAIL SPARE
For one SST nc.file (A2002185) I found the following flag values: 1073742624, 1073742384, 1073742368, 1073742352, 1073742592, 1073742336, 1073742416, 1073742354.
Are those codes actually bit values? How to get from there to specific single-flag pixels (e.g. only the cloud-ice-flag)?
Your help is highly appreciated. Thanks a lot!