l2gen products

Please enter here to ask a question about any NASA Science related topics!
avmehta
Posts: 165
Joined: Mon Feb 03, 2020 10:27 am America/New_York

l2gen products

by avmehta » Tue Apr 07, 2020 9:34 am America/New_York

Hello,
  I have a few  questions about processing MSI and OLI, converting L1 to L2 with l2gen on a Linux machine.  I have used SeaDAS/OCSSW from the GUI so far to get chlor-a from MODIS and OLI and have recently moved to using Linux - with command-line options. This is because I want to use MSI data.
-  I have installed processors for MSI (2a and 2b) and OLI.
- I was able to convert OLI L1 to L2 with default parameters.
    My questions:
  1) How can I find out what default processing options were used? I am want to know what option was used for aer_opt.
    Also, is there a sample par file I can use? It should be a .txt file right?
  2) On the GUI there is an option to choose 'Get Ancillary' -- is that the default?
  3) in the GUI  I use Rrs but also see rhos in the Product Selector:Radiance/Reflectance -- both are surface reflectances I believe - how are they
different? I tried look at the ATBD doc but am not clear!
  4) Are the available products defined in some document (of course some are self-explanatory bu some are not to me)?
      Lt, L_u, L_q,Lr, La,  Zeu (_ee and _morel), zhl_morel, Zsd etc?
  5) How do I get TOA reflectances?

Thanks so much for your help.
Amita

Tags:

OB.DAAC - SeanBailey
User Services
User Services
Posts: 1223
Joined: Wed Sep 18, 2019 6:15 pm America/New_York
Answers: 1

l2gen products

by OB.DAAC - SeanBailey » Fri Apr 10, 2020 12:18 pm America/New_York

1) $OCDATAROOT/<sensor[/platform]>/msl12_defaults.par
The default  files are hierarchical, lowest common denominator is the $OCDATAROOT/common/msl12_defaults.par
They are ASCII text files

2) no, get ancillary  is not run by default,  but you should use it to get the appropriate ancillary data, otherwise climatologies are used

3) rhos is Rayliegh subtracted surface reflectance,  it still includes aerosols. 

4)The "L"s are TOA radiance components,  Lt is the total, u and q are the polarized components of Rayliegh radiance,  which is "r".  "a" is aerosols.   The "Z"s are various light penetration depths. "eu" is euphotic  depth.  "sd" is Secchi depth.

5) rhot_nnn

avmehta
Posts: 165
Joined: Mon Feb 03, 2020 10:27 am America/New_York

l2gen products

by avmehta » Fri Apr 10, 2020 5:33 pm America/New_York

Hi Sean,
  Thank you  so very much for your help!
Amita

avmehta
Posts: 165
Joined: Mon Feb 03, 2020 10:27 am America/New_York

l2gen products

by avmehta » Tue Apr 14, 2020 10:55 am America/New_York

Hi Sean,
    I ran l2gen for OLI - but I am sure it used the climatology data. On the GUI it is simple to select 'Get Ancillary' but I do not see how to set this  in command line parameters.
Thanks.
Amita

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 219
Joined: Thu Mar 05, 2009 10:25 am America/New_York

l2gen products

by OB SeaDAS - dshea » Tue Apr 14, 2020 11:37 am America/New_York

It is easy on the command line also.  Assume you want to run l2gen with ifile=A2008080195500.L1B_LAC

getanc.py A2008080195500.L1B_LAC

which will create the file A2008080195500.L1B_LAC.anc  Now use the ancillary files in l2gen:

l2gen ifile=A2008080195500.L1B_LAC geofile=A2008080195500.GEO ofile=A2008080195500.L2 par=A2008080195500.L1B_LAC.anc par=<your_par_file>

don

avmehta
Posts: 165
Joined: Mon Feb 03, 2020 10:27 am America/New_York

l2gen products

by avmehta » Tue Apr 14, 2020 3:00 pm America/New_York

Hi Don,
   Great! thanks very much for your reply. It worked fine.

  Another question I have is about re-projection of l2gen output. I want to get the output file (which is .nc by default I believe) in WGS84/Geographic projection. In the GUI I just use the reproject option.   How to do this in command line?

Thanks.
Amita

gnwiii
Posts: 642
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2

l2gen products

by gnwiii » Tue Apr 14, 2020 5:43 pm America/New_York

There is l2mapgen but it only produces gray scale PGM or color PPM files.    Closer to what is done in the GUI is gpt.sh Reproject

avmehta
Posts: 165
Joined: Mon Feb 03, 2020 10:27 am America/New_York

l2gen products

by avmehta » Tue Apr 14, 2020 6:25 pm America/New_York

Hello,
Thank you for the link to the 'gpt cookbook'! I have never used this before!
I am wondering what projection does the l2gen output file have. There are lat-lon values with each pixel.
For gpt.sh I am trying to follow Example 1  shown in the 'gpt cookbook'.  I am not sure if there is anything I need to specify other than the resolution (pixelsize in .par file). Also, can I specify the output file to be a (.nc) file? is the (.dim) output file in NetCDF?
Thanks a lot for your help.
Amita

gnwiii
Posts: 642
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2

l2gen products

by gnwiii » Tue Apr 14, 2020 8:45 pm America/New_York

The l2gen output is a "satellite" projection which differs with every granule.  You might find figure 6 in level-3 binning document helpful.

Keep reading the cookbook.   You can combine operators to build elaborate workflows that have all the elements you need.

OB.DAAC - SeanBailey
User Services
User Services
Posts: 1223
Joined: Wed Sep 18, 2019 6:15 pm America/New_York
Answers: 1

l2gen products

by OB.DAAC - SeanBailey » Wed Apr 15, 2020 8:50 am America/New_York

Another option is to use l2bin followed by l3mapgen.  It has many advantages over both the old (and deprecated) l2mapgen code and the Reproject tool (although both should still work).
The next release of SeaDAS will include a more polished version of a python script that is in the current release (cleverly called l2mapgen.py) that used the l2bin/l3mapgen approach.
I had a recent exchange on this forum with another user with a similar question.  It might help you as well :smile:

Sean

Post Reply