Page 1 of 1

l2gen atmospheric correction with mask

Posted: Thu Mar 09, 2023 8:51 am America/New_York
by longest
When I used the GUI interface of OCSSW for atmospheric correction of MODIS and Landsat images with the l2gen procedure, I made the land and cloud mask options turn off, but there were still only water pixels. I wonder why? How can I get all the pixels after atmospheric correction?

Re: l2gen atmospheric correction with mask

Posted: Thu Mar 09, 2023 10:47 am America/New_York
by OB SeaDAS - xuanyang02
Could you provide the name of the MODIS L1 file you are working on?

Did you try l2gen with the default setting, which has maskland and maskcloud checked?
Screen Shot 2023-03-09 at 10.50.16 AM.png
Screen Shot 2023-03-09 at 10.50.16 AM.png (242.46 KiB) Not viewed yet

Re: l2gen atmospheric correction with mask

Posted: Thu Mar 09, 2023 7:40 pm America/New_York
by gnwiii
longest wrote: Thu Mar 09, 2023 8:51 am America/New_York When I used the GUI interface of OCSSW for atmospheric correction of MODIS and Landsat images with the l2gen procedure, I made the land and cloud mask options turn off, but there were still only water pixels. I wonder why? How can I get all the pixels after atmospheric correction?
Are you interested in land, ocean/water , or both? Atmospheric correction is generally more demanding for water pixels because the are dark, so a larger fraction of light reaching the sensor comes from the atmosphere, but atmosphere over land may have more dust/smoke, etc than open ocean, so ancillary data requirements for land differ from ocean requirements.

Re: l2gen atmospheric correction with mask

Posted: Thu Mar 09, 2023 9:47 pm America/New_York
by longest
CRY

Re: l2gen atmospheric correction with mask

Posted: Thu Mar 09, 2023 9:51 pm America/New_York
by longest
gnwiii wrote:
> [quote=longest post_id=14297 time=1678369879 user_id=4238]
> When I used the GUI interface of OCSSW for atmospheric correction of MODIS
> and Landsat images with the l2gen procedure, I made the land and cloud mask
> options turn off, but there were still only water pixels. I wonder why? How
> can I get all the pixels after atmospheric correction?
> [/quote]
>
> Are you interested in land, ocean/water , or both? Atmospheric correction
> is generally more demanding for water pixels because the are dark, so a
> larger fraction of light reaching the sensor comes from the atmosphere, but
> atmosphere over land may have more dust/smoke, etc than open ocean, so
> ancillary data requirements for land differ from ocean requirements.
I'm interested in water pixels, but there are many missing pixels of inshore waters after l2gen atmospheric correction, as shown in the image, which bothers me. So I'm looking for all the pixels of the l2gen atmospheric correction.

Re: l2gen atmospheric correction with mask

Posted: Thu Mar 09, 2023 9:55 pm America/New_York
by longest
OB SeaDAS - xuanyang02 wrote:
> Could you provide the name of the MODIS L1 file you are working on?
>
> Did you try l2gen with the default setting, which has maskland and
> maskcloud checked?Screen Shot 2023-03-09 at 10.50.16 AM.png
The L1 file I used and the modified GUI interface are shown below. I changed the mask option, but it doesn't seem to work, which makes me very anxious. I really want your help.

Re: l2gen atmospheric correction with mask

Posted: Fri Mar 10, 2023 2:29 pm America/New_York
by gnwiii
longest wrote: Thu Mar 09, 2023 9:51 pm America/New_York I'm interested in water pixels, but there are many missing pixels of inshore waters after l2gen atmospheric correction, as shown in the image, which bothers me. So I'm looking for all the pixels of the l2gen atmospheric correction.
Inland waters are the hardest case as you can have high levels of sediment in the water as well as "dirty" air, so you may be asking for something l2gen can't handle.

You may get some insights by looking at the flags set for missing missing inshore water pixels.

Re: l2gen atmospheric correction with mask

Posted: Sat Mar 11, 2023 9:03 pm America/New_York
by longest
gnwiii wrote:
> [quote=longest post_id=14310 time=1678416693 user_id=4238]
> I'm interested in water pixels, but there are many missing pixels of
> inshore waters after l2gen atmospheric correction, as shown in the image,
> which bothers me. So I'm looking for all the pixels of the l2gen
> atmospheric correction.
> [/quote]
>
> Inland waters are the hardest case as you can have high levels of sediment
> in the water as well as "dirty" air, so you may be asking for
> something l2gen can't handle.
>
> You may get some insights by looking at the flags set for missing missing
> inshore water pixels.
For some reason, different bands lose different pixels.

Re: l2gen atmospheric correction with mask

Posted: Tue Mar 14, 2023 12:33 pm America/New_York
by OB SeaDAS - xuanyang02
If you want to do l2gen with resolution=250, you need two L1B files
MYD02QKM.A2016059.0235.061.2018055181559.hdf (resolution=250m)
MYD02HKM.A2016059.0235.061.2018055181559.hdf (resolution=500m)
in the same directory with
MYD021KM.A2016059.0235.061.2018055181559.hdf.

I did l2gen on MYD021KM.A2016059.0235.061.2018055181559.hdf with

maskcloud=0
maskhilt=0
maskland=0
resolution=250

This is what I got for chlor_a --
L2_QKM.png
L2_QKM.png (457.11 KiB) Not viewed yet
This is the same image with the land mask on.
L2_QKM_w_mask_on.png
L2_QKM_w_mask_on.png (462.74 KiB) Not viewed yet
You can see pixels at the upper right corner in the 1st image that are masked by the brown landmask in the 2nd image.

Re: l2gen atmospheric correction with mask

Posted: Tue Mar 14, 2023 1:23 pm America/New_York
by gnwiii
longest wrote: Sat Mar 11, 2023 9:03 pm America/New_York.
For some reason, different bands lose different pixels.
It is not unusual to get invalid results (e.g., negative values for bands where water is “dark” but atmospheric contribution is high) for some but not all bands.