I am working with some non-standard MERIS and OLCI "Level 2" imagery that I have wrapped into the l2gen format so that they can be input to SeaDAS. I am hoping to get advice on how (if possible) to include non-standard L2 flags I have generated for my products alongside the standard L2 flags (which will be used to omit pixels from spatial/temporal binning).
An approach I've taken that appears to be successful is to set a standard L2 flag when one of my non-standard flags is set. However, I don't believe this is ideal, as it introduces ambiguity for why a pixel is masked.
I'm currently considering using the "spare" standard L2 flags for the non-standard flags I have generated. Is this recommended? If so, is it possible to change the names of the spare flags (so that they can be distinguished and have a name matching my flags), and will this impact any downstream SeaDAS processing dependencies? Is there a better way that I should consider?
- User Services
- Posts: 1292
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 1 time
Your approach is exactly how I would do it. The flag names are primarily for human readability. The binner uses them when setting up the bitwise value to run a logical and against, but reads them from the L2 file (the flag_meanings attribute of the l2_flags variable). If you rename one of the SPARE flags and set its bit when your product flag is tripped, then you can use that flag name in the flaguse parameter of l2bin. ...it should work... Let me know how it goes.
BTW, avoid flag #24 (bit 8388608) - it's already reserved for a new flag in the upcoming reprocessing