MODIS L1C for C2RCC
MODIS L1C for C2RCC
Good Day.
I need MODIS L1C data as input for C2RCC. I read that I need to use l2gen in SeaDAS in order to generate said data. However, when I tried to process using l2gen, the only output I can produce is L2 data.
Do I need to change some parameters in order to generate L1C with l2gen. Or if not possible, how can I produce MODIS L1C data?
Thank you.
I need MODIS L1C data as input for C2RCC. I read that I need to use l2gen in SeaDAS in order to generate said data. However, when I tried to process using l2gen, the only output I can produce is L2 data.
Do I need to change some parameters in order to generate L1C with l2gen. Or if not possible, how can I produce MODIS L1C data?
Thank you.
Filters:
-
- Subject Matter Expert
- Posts: 711
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 9 times
Re: MODIS L1C for C2RCC
As Sean pointed out in another post: "As the name implies, l2gen generates L2 files. We currently do not have an L1C processor."
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Re: MODIS L1C for C2RCC
Please provide more context... *where* did you read that you need to use l2gen for this purpose? Are you trying to replicate some other work? We might be able to point you in the right direction if we better understood what you are trying to accomplish.
Sean
Re: MODIS L1C for C2RCC
Hello.
Below is the link telling that C2RCC needs L1C data for MODIS:
https://seadas.gsfc.nasa.gov/help/8.0.0 ... ption.html
And here is the link titled "Create MODIS L1C Data" mentioning l2gen:
https://seadas.gsfc.nasa.gov/help/8.0.0 ... S_L1C.html
Below is the link telling that C2RCC needs L1C data for MODIS:
https://seadas.gsfc.nasa.gov/help/8.0.0 ... ption.html
And here is the link titled "Create MODIS L1C Data" mentioning l2gen:
https://seadas.gsfc.nasa.gov/help/8.0.0 ... S_L1C.html
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Re: MODIS L1C for C2RCC
Ah, I see.
This is just using l2gen to reformat the MODIS L1B data, which it will happily do for you.
That page tells you exactly what to do:
l2gen ifile=<inputFilePath> geofile=<gelocationFilePath>Y ofile=<outputFilePath>.L1C.nc
gain=1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
l2prod="rhot_nnn polcor_nnn sena senz sola solz latitude longitude"
Whoever wrote that mislead the user, that's not an L1C file, it's just a L2 file with TOA reflectance and a few geometric bits. In some communities, L1C would be a L1B file that has been gridded.
L1C isn't 'officially' recognized as a processing level, see:
https://earthdata.nasa.gov/collaborate/ ... ata-levels
and:
https://science.nasa.gov/earth-science/ ... a-products
Although the term is "used" - even eventually by the OB.DAAC when the PACE mission starts generating data- without context (since it's not official (yet?)) you can see my confusion
Sean
This is just using l2gen to reformat the MODIS L1B data, which it will happily do for you.
That page tells you exactly what to do:
l2gen ifile=<inputFilePath> geofile=<gelocationFilePath>Y ofile=<outputFilePath>.L1C.nc
gain=1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
l2prod="rhot_nnn polcor_nnn sena senz sola solz latitude longitude"
Whoever wrote that mislead the user, that's not an L1C file, it's just a L2 file with TOA reflectance and a few geometric bits. In some communities, L1C would be a L1B file that has been gridded.
L1C isn't 'officially' recognized as a processing level, see:
https://earthdata.nasa.gov/collaborate/ ... ata-levels
and:
https://science.nasa.gov/earth-science/ ... a-products
Although the term is "used" - even eventually by the OB.DAAC when the PACE mission starts generating data- without context (since it's not official (yet?)) you can see my confusion

Sean
Re: MODIS L1C for C2RCC
Hello.
I fully understand where the confusion came from. Thank you for the clarification.
[quote]
l2gen ifile=<inputFilePath> geofile=<gelocationFilePath>Y ofile=<outputFilePath>.L1C.nc
gain=1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
l2prod="rhot_nnn polcor_nnn sena senz sola solz latitude longitude"
[/quote]
I tried with the said parameters, however I encounter this error:
[code]
execution exception: java.io.IOException: l2gen failed with exit code 1.
Check log for more details.
Input file /home/torres609/Downloads/A2009023054500.L1B_LAC is MODIS Aqua Level-1B HDF-EOS product.
Loading default parameters from /home/torres609/SeaDAS/ocssw/share/common/msl12_defaults.par
Loading default parameters for MODISA from /home/torres609/SeaDAS/ocssw/share/modis/msl12_defaults.par
Loading default sub-sensor parameters for MODISA from /home/torres609/SeaDAS/ocssw/share/modis/aqua/msl12_defaults.par
Loading parameters for suite OC from /home/torres609/SeaDAS/ocssw/share/modis/msl12_defaults_OC.par
Loading command line parameters
Loading user parameters for MODISA
Loading characteristics for MODISA
Opening sensor information file /home/torres609/SeaDAS/ocssw/share/modis/aqua/msl12_sensor_info.dat
Bnd Lam Fo Tau_r k_oz k_no2 t_co2 awhite aw bbw
0 412.000 172.912 3.099e-01 1.987e-03 5.814e-19 1.000e+00 1.000e+00 2.030e-02 2.884e-03
1 443.000 187.622 2.367e-01 3.189e-03 4.985e-19 1.000e+00 1.000e+00 1.110e-02 2.181e-03
2 469.000 205.878 1.914e-01 8.745e-03 3.938e-19 1.000e+00 1.000e+00 1.034e-02 1.749e-03
3 488.000 194.933 1.592e-01 2.032e-02 2.878e-19 1.000e+00 1.000e+00 1.676e-02 1.447e-03
4 531.000 185.747 1.126e-01 6.838e-02 1.525e-19 1.000e+00 1.000e+00 4.494e-02 1.014e-03
5 547.000 186.539 9.906e-02 8.622e-02 1.194e-19 1.000e+00 1.000e+00 5.491e-02 8.886e-04
6 555.000 183.869 9.432e-02 9.553e-02 9.445e-20 1.000e+00 1.000e+00 5.839e-02 8.443e-04
7 645.000 157.811 5.082e-02 7.382e-02 1.382e-20 1.000e+00 9.133e-01 3.458e-01 4.469e-04
8 667.000 152.255 4.443e-02 4.890e-02 7.065e-21 1.000e+00 8.921e-01 4.923e-01 3.900e-04
9 678.000 148.052 4.146e-02 3.787e-02 8.304e-21 1.000e+00 8.783e-01 5.116e-01 3.634e-04
10 748.000 128.065 2.849e-02 1.235e-02 2.157e-21 1.000e+00 7.832e-01 2.800e+00 2.470e-04
11 859.000 97.174 1.613e-02 2.347e-03 6.212e-23 1.000e+00 6.519e-01 4.396e+00 1.384e-04
12 869.000 95.824 1.540e-02 1.936e-03 7.872e-23 1.000e+00 6.403e-01 4.727e+00 1.320e-04
13 1240.000 45.467 3.617e-03 0.000e+00 0.000e+00 9.994e-01 0.000e+00 1.147e+02 3.021e-05
14 1640.000 23.977 1.219e-03 0.000e+00 0.000e+00 9.890e-01 0.000e+00 6.689e+02 1.000e-05
15 2130.000 9.885 4.286e-04 0.000e+00 0.000e+00 9.696e-01 0.000e+00 2.810e+03 3.465e-06
Bnd Lam
16 3750.000
17 3959.000
18 4050.000
19 6715.000
20 7325.000
21 8550.000
22 11000.000
23 12000.000
Internal data compression requested at compression level: 4
Opening filter file /home/torres609/SeaDAS/ocssw/share/modis/msl12_filter.dat
Setting 7 x 5 straylight filter on HILT mask
Filter Kernel
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
Minimum fill set to 1 pixels
Setting 7 x 5 straylight filter on CLDICE mask
Filter Kernel
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
Minimum fill set to 1 pixels
Reading Thuillier_F0.dat
Processing at 1000 meter resolution.
1000-meter file: /home/torres609/Downloads/A2009023054500.L1B_LAC
Allocated 2365502 bytes in L1 record.
Allocated 920720 bytes in L2 record.
Opening: /home/torres609/Downloads/test/A2009023054500.L1C.nc
The following products will be included in /home/torres609/Downloads/test/A2009023054500.L1C.nc.
0 latitude
1 polcor_3750
2 polcor_3959
3 polcor_4050
4 polcor_6715
5 polcor_7325
6 polcor_8550
7 polcor_11000
8 polcor_12000
9 polcor_412
10 polcor_443
11 polcor_469
12 polcor_488
13 polcor_531
14 polcor_547
15 polcor_555
16 polcor_645
17 polcor_667
18 polcor_678
19 sena
20 senz
21 sola
22 solz
23 l2_flags
-E- /home/seadas/ocssw/src/l2gen/l2_generic.c line 458: product polcor_3750 not found.
-E- l2gen: Error opening /home/torres609/Downloads/test/A2009023054500.L1C.nc for writing.
[/code]
Did I forgot to install something maybe the src? Apologies if I asked first for confirmation as I'm afraid to disrupt my directories if I installed incorrectly.
I fully understand where the confusion came from. Thank you for the clarification.
[quote]
l2gen ifile=<inputFilePath> geofile=<gelocationFilePath>Y ofile=<outputFilePath>.L1C.nc
gain=1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
l2prod="rhot_nnn polcor_nnn sena senz sola solz latitude longitude"
[/quote]
I tried with the said parameters, however I encounter this error:
[code]
execution exception: java.io.IOException: l2gen failed with exit code 1.
Check log for more details.
Input file /home/torres609/Downloads/A2009023054500.L1B_LAC is MODIS Aqua Level-1B HDF-EOS product.
Loading default parameters from /home/torres609/SeaDAS/ocssw/share/common/msl12_defaults.par
Loading default parameters for MODISA from /home/torres609/SeaDAS/ocssw/share/modis/msl12_defaults.par
Loading default sub-sensor parameters for MODISA from /home/torres609/SeaDAS/ocssw/share/modis/aqua/msl12_defaults.par
Loading parameters for suite OC from /home/torres609/SeaDAS/ocssw/share/modis/msl12_defaults_OC.par
Loading command line parameters
Loading user parameters for MODISA
Loading characteristics for MODISA
Opening sensor information file /home/torres609/SeaDAS/ocssw/share/modis/aqua/msl12_sensor_info.dat
Bnd Lam Fo Tau_r k_oz k_no2 t_co2 awhite aw bbw
0 412.000 172.912 3.099e-01 1.987e-03 5.814e-19 1.000e+00 1.000e+00 2.030e-02 2.884e-03
1 443.000 187.622 2.367e-01 3.189e-03 4.985e-19 1.000e+00 1.000e+00 1.110e-02 2.181e-03
2 469.000 205.878 1.914e-01 8.745e-03 3.938e-19 1.000e+00 1.000e+00 1.034e-02 1.749e-03
3 488.000 194.933 1.592e-01 2.032e-02 2.878e-19 1.000e+00 1.000e+00 1.676e-02 1.447e-03
4 531.000 185.747 1.126e-01 6.838e-02 1.525e-19 1.000e+00 1.000e+00 4.494e-02 1.014e-03
5 547.000 186.539 9.906e-02 8.622e-02 1.194e-19 1.000e+00 1.000e+00 5.491e-02 8.886e-04
6 555.000 183.869 9.432e-02 9.553e-02 9.445e-20 1.000e+00 1.000e+00 5.839e-02 8.443e-04
7 645.000 157.811 5.082e-02 7.382e-02 1.382e-20 1.000e+00 9.133e-01 3.458e-01 4.469e-04
8 667.000 152.255 4.443e-02 4.890e-02 7.065e-21 1.000e+00 8.921e-01 4.923e-01 3.900e-04
9 678.000 148.052 4.146e-02 3.787e-02 8.304e-21 1.000e+00 8.783e-01 5.116e-01 3.634e-04
10 748.000 128.065 2.849e-02 1.235e-02 2.157e-21 1.000e+00 7.832e-01 2.800e+00 2.470e-04
11 859.000 97.174 1.613e-02 2.347e-03 6.212e-23 1.000e+00 6.519e-01 4.396e+00 1.384e-04
12 869.000 95.824 1.540e-02 1.936e-03 7.872e-23 1.000e+00 6.403e-01 4.727e+00 1.320e-04
13 1240.000 45.467 3.617e-03 0.000e+00 0.000e+00 9.994e-01 0.000e+00 1.147e+02 3.021e-05
14 1640.000 23.977 1.219e-03 0.000e+00 0.000e+00 9.890e-01 0.000e+00 6.689e+02 1.000e-05
15 2130.000 9.885 4.286e-04 0.000e+00 0.000e+00 9.696e-01 0.000e+00 2.810e+03 3.465e-06
Bnd Lam
16 3750.000
17 3959.000
18 4050.000
19 6715.000
20 7325.000
21 8550.000
22 11000.000
23 12000.000
Internal data compression requested at compression level: 4
Opening filter file /home/torres609/SeaDAS/ocssw/share/modis/msl12_filter.dat
Setting 7 x 5 straylight filter on HILT mask
Filter Kernel
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
Minimum fill set to 1 pixels
Setting 7 x 5 straylight filter on CLDICE mask
Filter Kernel
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
Minimum fill set to 1 pixels
Reading Thuillier_F0.dat
Processing at 1000 meter resolution.
1000-meter file: /home/torres609/Downloads/A2009023054500.L1B_LAC
Allocated 2365502 bytes in L1 record.
Allocated 920720 bytes in L2 record.
Opening: /home/torres609/Downloads/test/A2009023054500.L1C.nc
The following products will be included in /home/torres609/Downloads/test/A2009023054500.L1C.nc.
0 latitude
1 polcor_3750
2 polcor_3959
3 polcor_4050
4 polcor_6715
5 polcor_7325
6 polcor_8550
7 polcor_11000
8 polcor_12000
9 polcor_412
10 polcor_443
11 polcor_469
12 polcor_488
13 polcor_531
14 polcor_547
15 polcor_555
16 polcor_645
17 polcor_667
18 polcor_678
19 sena
20 senz
21 sola
22 solz
23 l2_flags
-E- /home/seadas/ocssw/src/l2gen/l2_generic.c line 458: product polcor_3750 not found.
-E- l2gen: Error opening /home/torres609/Downloads/test/A2009023054500.L1C.nc for writing.
[/code]
Did I forgot to install something maybe the src? Apologies if I asked first for confirmation as I'm afraid to disrupt my directories if I installed incorrectly.
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Re: MODIS L1C for C2RCC
Odd...it worked for me, but then it didn't expand polcor_nnn beyond the vis/nir/swir bands for me. polcor is not valid for the IR bands, so it shouldn't be trying to do them. Did you use the GUI to select the l2 products? If you did, make sure polcor (and rhot) do not go in the IR bands (any beyond 2130nm)
Sean
Sean
Re: MODIS L1C for C2RCC
I see what's happening now. When I typed in polcor_nnn and rhot_nnn in the command line in the GUI, they always expands to polcor_iii and polcor_vvv, and rhot_iii and rhot_vvv, respectively. I erased rhot_iii and polcor_iii while retaining polcor_vvv and rhot_vvv, and it worked!
Thank you for your help, highly appreciate it.
Thank you for your help, highly appreciate it.
Re: MODIS L1C for C2RCC
Hi Sean,
I was just looking into your forum to find out something about this issue. Because in our forum we have the discussion too. :-)
https://forum.step.esa.int/t/modis-l1c- ... 2rcc/29608
Regarding naming the product as L1C. I think it is due to the different convention of Levels ESA and NASA have. This was done by the ESA OC-CCI project.
The actual problem is that SNAP fails to read start and stop time from the created product. Has something changed in l2gen in this direction?
We will try to replicate this issue. Maybe we find something out wihch sheds some light on it.
Ciao
Marco
I was just looking into your forum to find out something about this issue. Because in our forum we have the discussion too. :-)
https://forum.step.esa.int/t/modis-l1c- ... 2rcc/29608
Regarding naming the product as L1C. I think it is due to the different convention of Levels ESA and NASA have. This was done by the ESA OC-CCI project.
The actual problem is that SNAP fails to read start and stop time from the created product. Has something changed in l2gen in this direction?
We will try to replicate this issue. Maybe we find something out wihch sheds some light on it.
Ciao
Marco
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Re: MODIS L1C for C2RCC
Marco,
There shouldn't be any changes in the L2 output. I was able to follow the process and get the CRCC processor to run on a MODIS "L1C" in both SNAP 8 and SeaDAS 8 (it had time information, but the derived rhow were all NaN...maybe it was a bad file to use it was in my 'testing' directory afterall

BTW, I realized that if you add atmocor=0 to the l2gen call for the L1C generation, it'll go faster - no need to exercise the aerosol code when you're just outputting TOA values.
Sean