Sentinel-2 with l2gen

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
m_alsahli
Posts: 6
Joined: Wed Aug 03, 2022 4:06 pm America/New_York
Answers: 0

Re: Sentinel-2 with l2gen

by m_alsahli » Sat Aug 06, 2022 11:33 am America/New_York

Thank you for helping me figure out how to process Sentinel-2A images.
Now, I am able to process the image. I wrote a parameter file as you suggested. It includes:
aer_opt=-10
ifile=/home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/manifest.safe
iop_opt=3
ofile=/home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631.L2.OC.nc

when I recall it in the terminal, I got this:
alsahli@alsahli-U47A:~$ l2gen par=/home/alsahli/Landsat8/Test/Sentinel-2A/l2gen-tmpParFile.par
Loading default parameters from /home/alsahli/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/alsahli/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/alsahli/SeaDAS/ocssw/share/msi/msl12_defaults.par
Loading default sub-sensor parameters for MSIS2A from /home/alsahli/SeaDAS/ocssw/share/msi/s2a/msl12_defaults.par
Loading parameters for suite OC from /home/alsahli/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 /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/manifest.safe
-E- /home/dshea/focs/oel_hdf4/libl1/l1c_msi.cpp line 585: unable read detector footprint file for MSI dataset /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/QI_DATA/MSK_DETFOO_B07.jp2
MSI file 0: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B01.jp2
MSI file 1: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B02.jp2
MSI file 2: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B03.jp2
MSI file 3: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B04.jp2
MSI file 4: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B05.jp2
MSI file 5: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B06.jp2
MSI file 6: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B07.jp2
MSI file 7: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B08.jp2
MSI file 8: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B09.jp2
MSI file 9: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B10.jp2
MSI file 10: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B11.jp2
MSI file 11: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B12.jp2
MSI file 12: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B8A.jp2
Allocated 7570758 bytes in L1 record.
Allocated 3118320 bytes in L2 record.

Opening: /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631.L2.OC.nc


The following products will be included in /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631.L2.OC.nc.
0 aot_865
1 angstrom
2 Rrs_443
3 Rrs_492
4 Rrs_560
5 Rrs_665
6 Rrs_704
7 chlor_a
8 Kd_490
9 l2_flags



Begin l2gen Version 9.5.1-V2022.0 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 2022218174542000

Allocated 7570758 bytes in L1 record.
Allocated 7570758 bytes in L1 record.
Allocated 7570758 bytes in L1 record.
Loading land mask file from /home/alsahli/SeaDAS/ocssw/share/common/landmask_GMT15ARC.nc
Loading bathymetry mask file from /home/alsahli/SeaDAS/ocssw/share/common/watermask.dat
Loading ice mask file from /home/alsahli/SeaDAS/ocssw/share/common/ice_climatology.hdf
Loaded monthly NSIDC ice climatology HDF file.
Loading elevation file from /home/alsahli/SeaDAS/ocssw/share/common/ETOPO1_ocssw.nc
Loading DEM info from /home/alsahli/SeaDAS/ocssw/share/common/ETOPO1_ocssw.nc
Loading climatology file /home/alsahli/SeaDAS/ocssw/share/common/sst_climatology.hdf
Loading SSS reference from Climatology file: /home/alsahli/SeaDAS/ocssw/share/common/sss_climatology_woa2009.hdf


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


Opening ozone file /home/alsahli/SeaDAS/ocssw/share/common/ozone_climatology_v2014.hdf


Opening NO2 file /home/alsahli/SeaDAS/ocssw/share/common/no2_climatology_v2013.hdf


Opening NO2 frac file /home/alsahli/SeaDAS/ocssw/share/common/trop_f_no2_200m.hdf


Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_443_iqu.hdf
Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_492_iqu.hdf
Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_560_iqu.hdf
Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_665_iqu.hdf
Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_704_iqu.hdf
Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_740_iqu.hdf
Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_783_iqu.hdf
Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_835_iqu.hdf
Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_865_iqu.hdf
Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_945_iqu.hdf
Loading Rayleigh LUT /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_1613_iqu.hdf
Loading Rayleigh LUT /home/alsahli/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 11 seconds
QAA v6 processing for 5 bands
get_qaa: missing minimum required wavelengths (need 440,490,555,670).
get_qaa: qaa_wave[1] =0, qaa_wave[2] =0, qaa_wave[3] = 0, qaa_wave[4] = 0.

Does this mean I can not use QAA because these bands are missing?
Sentinel-2 has bands with wavelengths of 443, 490, 560, and 665 nm. Can these be equivalent to 440, 490, 555, and 670 bands?

I am not sure what the issue is.

Tags:

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

Re: Sentinel-2 with l2gen

by OB General Science - guoqingw » Mon Aug 08, 2022 3:04 pm America/New_York

Hi,
The error happens because Sentinel 2A MSI lacks a band around 412nm, which means QAA (https://www.ioccg.org/groups/software.html) is not applicable to MSI. It requires 5 bands in total (412,443,490,555, and 670 nm) but MSI only has 4 of them. My suggestion is changing the iop_opt=3 to iop_opt=7
This will use GIOP algorithm for IOPs instead (https://oceancolor.gsfc.nasa.gov/atbd/giop/).

Guoqing

ayelen
Posts: 4
Joined: Mon Jul 15, 2019 10:51 am America/New_York
Answers: 0

Re: Sentinel-2 with l2gen

by ayelen » Tue Aug 09, 2022 11:04 am America/New_York

m_alsahli wrote:
> Thank you for helping me figure out how to process Sentinel-2A images.
> Now, I am able to process the image. I wrote a parameter file as you
> suggested. It includes:
> aer_opt=-10
>
> ifile=/home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/manifest.safe
> iop_opt=3
>
> ofile=/home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631.L2.OC.nc
>
> when I recall it in the terminal, I got this:
> alsahli@alsahli-U47A:~$ l2gen
> par=/home/alsahli/Landsat8/Test/Sentinel-2A/l2gen-tmpParFile.par
> Loading default parameters from
> /home/alsahli/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/alsahli/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/alsahli/SeaDAS/ocssw/share/msi/msl12_defaults.par
> Loading default sub-sensor parameters for MSIS2A from
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/msl12_defaults.par
> Loading parameters for suite OC from
> /home/alsahli/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
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/manifest.safe
> -E- /home/dshea/focs/oel_hdf4/libl1/l1c_msi.cpp line 585: unable read
> detector footprint file for MSI dataset
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/QI_DATA/MSK_DETFOO_B07.jp2
> MSI file 0:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B01.jp2
> MSI file 1:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B02.jp2
> MSI file 2:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B03.jp2
> MSI file 3:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B04.jp2
> MSI file 4:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B05.jp2
> MSI file 5:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B06.jp2
> MSI file 6:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B07.jp2
> MSI file 7:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B08.jp2
> MSI file 8:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B09.jp2
> MSI file 9:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B10.jp2
> MSI file 10:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B11.jp2
> MSI file 11:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B12.jp2
> MSI file 12:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/GRANULE/L1C_T39RTN_A036511_20220619T073159/IMG_DATA/T39RTN_20220619T072631_B8A.jp2
> Allocated 7570758 bytes in L1 record.
> Allocated 3118320 bytes in L2 record.
>
> Opening:
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631.L2.OC.nc
>
>
> The following products will be included in
> /home/alsahli/Landsat8/Test/Sentinel-2A/S2A_MSIL1C_20220619T072631.L2.OC.nc.
> 0 aot_865
> 1 angstrom
> 2 Rrs_443
> 3 Rrs_492
> 4 Rrs_560
> 5 Rrs_665
> 6 Rrs_704
> 7 chlor_a
> 8 Kd_490
> 9 l2_flags
>
>
>
> Begin l2gen Version 9.5.1-V2022.0 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 2022218174542000
>
> Allocated 7570758 bytes in L1 record.
> Allocated 7570758 bytes in L1 record.
> Allocated 7570758 bytes in L1 record.
> Loading land mask file from
> /home/alsahli/SeaDAS/ocssw/share/common/landmask_GMT15ARC.nc
> Loading bathymetry mask file from
> /home/alsahli/SeaDAS/ocssw/share/common/watermask.dat
> Loading ice mask file from
> /home/alsahli/SeaDAS/ocssw/share/common/ice_climatology.hdf
> Loaded monthly NSIDC ice climatology HDF file.
> Loading elevation file from
> /home/alsahli/SeaDAS/ocssw/share/common/ETOPO1_ocssw.nc
> Loading DEM info from
> /home/alsahli/SeaDAS/ocssw/share/common/ETOPO1_ocssw.nc
> Loading climatology file
> /home/alsahli/SeaDAS/ocssw/share/common/sst_climatology.hdf
> Loading SSS reference from Climatology file:
> /home/alsahli/SeaDAS/ocssw/share/common/sss_climatology_woa2009.hdf
>
>
> Opening meteorological files.
> met1 =
> /home/alsahli/SeaDAS/ocssw/share/common/met_climatology_v2014.hdf
> met2 =
> met3 =
> ozone1 =
> /home/alsahli/SeaDAS/ocssw/share/common/ozone_climatology_v2014.hdf
> ozone2 =
> ozone3 =
> no2 =
> /home/alsahli/SeaDAS/ocssw/share/common/no2_climatology_v2013.hdf
>
>
> Opening ozone file
> /home/alsahli/SeaDAS/ocssw/share/common/ozone_climatology_v2014.hdf
>
>
> Opening NO2 file
> /home/alsahli/SeaDAS/ocssw/share/common/no2_climatology_v2013.hdf
>
>
> Opening NO2 frac file
> /home/alsahli/SeaDAS/ocssw/share/common/trop_f_no2_200m.hdf
>
>
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_443_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_492_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_560_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_665_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_704_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_740_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_783_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_835_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_865_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_945_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/SeaDAS/ocssw/share/msi/s2a/rayleigh/rayleigh_msis2a_1613_iqu.hdf
> Loading Rayleigh LUT
> /home/alsahli/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 11 seconds
> QAA v6 processing for 5 bands
> get_qaa: missing minimum required wavelengths (need 440,490,555,670).
> get_qaa: qaa_wave[1] =0, qaa_wave[2] =0, qaa_wave[3] = 0, qaa_wave[4] = 0.
>
> Does this mean I can not use QAA because these bands are missing?
> Sentinel-2 has bands with wavelengths of 443, 490, 560, and 665 nm. Can
> these be equivalent to 440, 490, 555, and 670 bands?
>
> I am not sure what the issue is.

Hi m_alsahli, did you run on bash terminal?
I never process from the console, always on the Gui.
What is the complete command line to run l2gen from the console (i'm a bit lost).

Thank you!

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

Re: Sentinel-2 with l2gen

by OB SeaDAS - xuanyang02 » Tue Aug 09, 2022 12:27 pm America/New_York

Hi ayelen,

You need to install msis2a processor first

Code: Select all

install_ocssw --install_dir $OCSSWROOT --tag V2022.0 --msis2a
And then

Code: Select all

l2gen ifile=*/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/manifest.safe
Bing

ayelen
Posts: 4
Joined: Mon Jul 15, 2019 10:51 am America/New_York
Answers: 0

Re: Sentinel-2 with l2gen

by ayelen » Tue Aug 09, 2022 1:19 pm America/New_York

Thanks Bing!
I already installed the msi2a processor.
ayelen@ayelen-Lenovo-G580:~/SeaDAS$ sudo ./install_ocssw --install_dir=$home/ayelen/SeaDAS/ocssw --tag V2022.0 --msis2a
[sudo] contraseña para ayelen:
Installing (1 of 2) - msi
Installing (2 of 2) - msis2a
Done

(i run as administrator due to system configuration).
Now, my basic question (I dont have much experience in processing with commands), how do i run l2gen from here?

Thank u :)
Last edited by ayelen on Tue Aug 09, 2022 1:23 pm America/New_York, edited 2 times in total.

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

Re: Sentinel-2 with l2gen

by OB SeaDAS - xuanyang02 » Tue Aug 09, 2022 2:14 pm America/New_York

Hi ayelen,

Here is the command line help for l2gen -- https://seadas.gsfc.nasa.gov/help-8.2.0/processors/ProcessL2gen.html#COMMAND_LINE_HELP

To run l2gen, you can do

Code: Select all

l2gen ifile=input_L1_file_name
For msis2a, input_L1_file_name is manifest.safe, for example, /home/*/Sentinel-2A/S2A_MSIL1C_20220619T072631_N0400_R049_T39RTN_20220619T081751.SAFE/manifest.safe.

You can add other argument such as l2prod= ofile= aer_opt= as needed

Bing
Last edited by OB SeaDAS - xuanyang02 on Tue Aug 09, 2022 6:33 pm America/New_York, edited 1 time in total.

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

Re: Sentinel-2 with l2gen

by OB SeaDAS - xuanyang02 » Tue Aug 09, 2022 2:33 pm America/New_York

If you are used to do l2gen on GUI, you might be able to find par files like l2gen-tmpParFile*.par in your data directory. You can use vi or emacs to edit the par file and then do

Code: Select all

l2gen par=l2gen-tmpParFile*.par

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

Re: Sentinel-2 with l2gen

by OB SeaDAS - xuanyang02 » Thu Dec 15, 2022 1:33 pm America/New_York

SeaDAS 8.3.0 was released, which can process MSI_S2A on GUI.

Post Reply