Aerosol correction is not working for Sentinel 2 MSI data

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
dilip9443
Posts: 3
Joined: Wed May 04, 2022 2:26 am America/New_York
Answers: 0

Aerosol correction is not working for Sentinel 2 MSI data

by dilip9443 » Wed Mar 01, 2023 6:03 am America/New_York

Hi there.
I am processing Sentinel-2 MSI data using Seadas software in the command line with l2gen command. Aerosol correction is not happening while processing. But, no error is shown. The processing is getting completed without any errors. The L2 products show NaN values. Same is repeated when performing via GUI. Kindly help me rectify this problem.
More details:
Seadas version 8.3
OCSSW tag - V2022.3

Below is the command prompt lines while processing the Sentinel2 data:
Starting to process images in S2A_MSIL1C_20230227T055811_N0509_R091_T42QVK_20230227T073322.SAFE folder.
Selecting Safe file: manifest.safe

Loading default parameters from /home/dilip/seadas/ocssw/share/common/msl12_defaults.par
Found MSI Sentinel-2A product: SENTINEL-2 MSI Level-1C User Product

Loading characteristics for MSIS2A
Opening sensor information file /home/dilip/seadas/ocssw/share/msi/s2a/msl12_sensor_info.dat
Bnd Lam Fo Tau_r k_oz k_no2 t_co2 awhite aw bbw
0 443.000 188.435 2.356e-01 2.900e-03 5.053e-19 1.000e+00 0.000e+00 7.153e-03 2.177e-03
1 492.000 196.026 1.558e-01 2.619e-02 2.829e-19 1.000e+00 0.000e+00 2.120e-02 1.407e-03
2 560.000 182.272 9.055e-02 1.054e-01 8.709e-20 1.000e+00 0.000e+00 6.319e-02 8.094e-04
3 665.000 151.287 4.498e-02 5.067e-02 8.855e-21 1.000e+00 0.000e+00 4.156e-01 3.954e-04
4 704.000 142.480 3.553e-02 2.043e-02 3.789e-21 1.000e+00 0.000e+00 7.014e-01 3.107e-04
5 740.000 128.687 2.897e-02 1.100e-02 1.666e-21 1.000e+00 0.000e+00 2.727e+00 2.522e-04
6 783.000 116.205 2.316e-02 7.081e-03 5.087e-22 1.000e+00 0.000e+00 2.620e+00 2.006e-04
7 835.000 104.186 1.853e-02 3.590e-03 1.866e-22 1.000e+00 0.000e+00 3.504e+00 1.579e-04
8 865.000 95.608 1.549e-02 2.180e-03 2.890e-23 1.000e+00 0.000e+00 4.612e+00 1.331e-04
9 945.000 81.291 1.083e-02 7.479e-04 0.000e+00 1.000e+00 0.000e+00 2.414e+01 9.233e-05
10 1613.000 24.558 1.269e-03 0.000e+00 0.000e+00 1.000e+00 0.000e+00 7.396e+02 1.040e-05
11 2200.000 8.525 3.679e-04 0.000e+00 0.000e+00 1.000e+00 0.000e+00 2.206e+03 2.948e-06


Loading default parameters for MSIS2A from /home/dilip/seadas/ocssw/share/msi/msl12_defaults.par
Loading default sub-sensor parameters for MSIS2A from /home/dilip/seadas/ocssw/share/msi/s2a/msl12_defaults.par
Loading parameters for suite OC from /home/dilip/seadas/ocssw/share/msi/s2a/msl12_defaults_OC.par
Loading command line parameters

Loading user parameters for MSIS2A

Internal data compression requested at compression level: 4
Reading Thuillier_F0.dat
Input file: MSI Level-1C manifest.safe
-E- /home/dshea/focs/oel_hdf4/libl1/l1c_msi.cpp line 585: unable read detector footprint file for MSI dataset GRANULE/L1C_T42QVK_A040128_20230227T061210/QI_DATA/MSK_DETFOO_B07.jp2
MSI file 0: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B01.jp2
MSI file 1: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B02.jp2
MSI file 2: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B03.jp2
MSI file 3: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B04.jp2
MSI file 4: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B05.jp2
MSI file 5: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B06.jp2
MSI file 6: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B07.jp2
MSI file 7: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B08.jp2
MSI file 8: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B09.jp2
MSI file 9: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B10.jp2
MSI file 10: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B11.jp2
MSI file 11: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B12.jp2
MSI file 12: GRANULE/L1C_T42QVK_A040128_20230227T061210/IMG_DATA/T42QVK_20230227T055811_B8A.jp2
Allocated 7570758 bytes in L1 record.
Allocated 3118320 bytes in L2 record.

Opening: Processed.L2_LAC
The following products will be included in Processed.L2_LAC.
0 Rrs_443
1 Rrs_492
2 Rrs_560
3 Rrs_665
4 Rrs_704
5 Rrs_740
6 Rrs_783
7 Rrs_835
8 Rrs_865
9 Rrs_945
10 Rrs_1613
11 Rrs_2200
13 chl_abi
14 l2_flags

Begin l2gen Version 9.6.0-HEAD-HASH-NOTFOUND Processing
Sensor is MSIS2A
Sensor ID is 22
Sensor has 12 reflective bands
Sensor has 0 emissive bands
Number of along-track detectors per band is 1
Number of input pixels per scan is 5490
Processing pixels 1 to 5490 by 1
Processing scans 1 to 5490 by 1
Ocean processing enabled
Land processing enabled
Atmospheric correction enabled

Begin MSl12 processing at 2023060155249000

Allocated 7570758 bytes in L1 record.
Allocated 7570758 bytes in L1 record.
Allocated 7570758 bytes in L1 record.
Loading land mask information from /home/dilip/seadas/ocssw/share/common/gebco_ocssw_v2020.nc
Loading DEM information from /home/dilip/seadas/ocssw/share/common/gebco_ocssw_v2020.nc
Loading ice mask file from /home/dilip/seadas/ocssw/share/common/ice_climatology.hdf
Loaded monthly NSIDC ice climatology HDF file.
Loading DEM info from /home/dilip/seadas/ocssw/share/common/gebco_ocssw_v2020.nc
Loading climatology file /home/dilip/seadas/ocssw/share/common/sst_climatology.hdf
Loading SSS reference from Climatology file: /home/dilip/seadas/ocssw/share/common/sss_climatology_woa2009.hdf

Opening meteorological files.
met1 = /home/dilip/seadas/ocssw/share/common/met_climatology_v2014.hdf
met2 =
met3 =
ozone1 = /home/dilip/seadas/ocssw/share/common/ozone_climatology_v2014.hdf
ozone2 =
ozone3 =
no2 = /home/dilip/seadas/ocssw/share/common/no2_climatology_v2013.hdf

Opening ozone file /home/dilip/seadas/ocssw/share/common/ozone_climatology_v2014.hdf
Opening NO2 file /home/dilip/seadas/ocssw/share/common/no2_climatology_v2013.hdf
Opening NO2 frac file /home/dilip/seadas/ocssw/share/common/trop_f_no2_200m.hdf

Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_443_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_492_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_560_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_665_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_704_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_740_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_783_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_835_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_865_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_945_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_1613_iqu.hdf
Loading Rayleigh LUT /home/dilip/seadas/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_2200_iqu.hdf

Using 2200.0 nm channel for cloud flagging over water.
Using 443.0 nm channel for cloud flagging over land.

Processing scan # 0 (1 of 5490) after 17 seconds
Calculating chl_abi using 443.00 492.00 560.00
Processing scan # 50 (51 of 5490) after 56 seconds
Processing scan # 100 (101 of 5490) after 96 seconds
Processing scan # 150 (151 of 5490) after 137 seconds
Processing scan # 200 (201 of 5490) after 179 seconds
Processing scan # 250 (251 of 5490) after 219 seconds
Processing scan # 300 (301 of 5490) after 259 seconds
Processing scan # 350 (351 of 5490) after 301 seconds
Processing scan # 400 (401 of 5490) after 343 seconds

Filters:

OB General Science - guoqingw
Subject Matter Expert
Subject Matter Expert
Posts: 79
Joined: Fri Jun 03, 2022 10:54 am America/New_York
Answers: 0
Location: NASA GSFC
Been thanked: 1 time
Contact:

Re: Aerosol correction is not working for Sentinel 2 MSI data

by OB General Science - guoqingw » Fri Mar 17, 2023 12:26 pm America/New_York

Hello,

Sorry for the delayed response. Have you tried again? Do you still have the same problem?

dilip9443
Posts: 3
Joined: Wed May 04, 2022 2:26 am America/New_York
Answers: 0

Re: Aerosol correction is not working for Sentinel 2 MSI data

by dilip9443 » Sat Mar 25, 2023 6:02 am America/New_York

Hi.
Yes, I am still facing the same issue.

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 660
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Been thanked: 2 times

Re: Aerosol correction is not working for Sentinel 2 MSI data

by OB SeaDAS - xuanyang02 » Mon Mar 27, 2023 10:19 am America/New_York

MSI_S2A L1 file for 2023 has a new format compared to 2021, we need to figure out a way to read the L1 file with the new format for l2gen to work right and we will update here once we do.

alsahli
Posts: 11
Joined: Wed May 03, 2006 6:27 am America/New_York
Answers: 0

Re: Aerosol correction is not working for Sentinel 2 MSI data

by alsahli » Sat Aug 05, 2023 8:26 am America/New_York

Hi there,
Any update on this issue? I face the same problem.
I need to process the S2A L1C image to L2, but I end up with NaNs values as described by the other users above.

Best,
Mohammad

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 660
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Been thanked: 2 times

Re: Aerosol correction is not working for Sentinel 2 MSI data

by OB SeaDAS - xuanyang02 » Mon Aug 07, 2023 1:10 pm America/New_York

Our code needs some posList information from gml files, e.g. GRANULE/L1C_T33VUF_A031236_20210615T102244/QI_DATA/
MSK_DETFOO_B07.gml in the MSI_S2A L1 files with the old format, but we are not able to find the information from the MSI_S2A L1 files with the new format, certainly not GRANULE/L1C_T42QVK_A040128_20230227T061210/QI_DATA/MSK_DETFOO_B07.jp2

We seem to be stuck unless we can find those posList information...

Post Reply