l2gen_aquarius |

### l2gen_aquarius

Creates a Level 2 file from an input Level 1 file.

#### Location

SeaDAS-OCSSW -> l2gen_aquarius

#### Documentation

All key documentation for the the Aquarius products supported by SeaDAS including format documents, User Guide, ATBD's and Data Quality Analysis report can be found at:
ftp://podaac-ftp.jpl.nasa.gov/allData/aquarius/docs/v2/

#### Data Access

Aquarius v2.0 digital data sets are archived and distributed via the JPL/PO.DAAC's public ftp site:
ftp://podaac-ftp.jpl.nasa.gov/allData/aquarius/ and via the public data portal:
https://podaac.jpl.nasa.gov/datasetlist?search=aquarius

#### General information regarding Aquarius/SAC-D mission

https://aquarius.nasa.gov
https://podaac.jpl.nasa.gov/aquarius

#### Details

For the command line version of help run l2gen_aquarius -help

The l2gen_aquarius GUI is dynamically created based on the selected IFILE. Once the IFILE is specified, l2gen_aquarius is run in the background in a special mode in order to obtain and populate all the parameters and defaults for l2gen_aquarius GUI. This means that if a new version of l2gen_aquarius comes out, with new parameters, defaults, etc., your current version of SeaDAS will automatically support these parameters. Note that because of this l2gen_aquarius dependency on the building of the GUI, SeaDAS 7 requires l2gen_aquarius version 2.02 or later.

All l2gen_aquarius parameters are contained within a series of categorized tabs:

- THE MAIN TAB
- THE PRODUCTS TAB
- THE PROCESSING OPTIONS TAB

Non-Defaults Selected Indicator (*)
When a parameter is chosen to be a non-default value, that parameter will show up in the parfile textarea of the MAIN tab. As an aid to help direct the user to tabs containing at least one parameter set to a non-default value, an asterix (*) will appear at the top of the tab. Also within the tab, an asterix will appear next to each parameter which is a non-default value.

#### THE MAIN TAB

Selecting the IFILE The SeaDAS l2gen_aquarius GUI requires as it's initial input, a correctly formatted, non-corrupt IFILE. All tabs and fields within the l2gen_aquarius GUI are disabled until the IFILE is specified. If a product is currently loaded and enabled in SeaDAS, then the IFILE of this product will automatically appear in the GUI as the selected IFILE and all the GUI parameters will be built. Once this IFILE has been specified, the mission and data level are obtained from this file. If the IFILE data level matches the expected input data level of l2gen_aquarius, the GUI will then retrieve all the needed ancillary files. Selecting the OFILE A default OFILE is determined based on the specified IFILE. If the IFILE is not an absolute filename but is a relative filename, then the OFILE default will be relative as well. Note that in this case, the OFILE is expected to be in the same directory as the IFILE. You need not use these defaults and are free to choose your own OFILE name. Parfile Textarea This textarea contains all of the currently selected parameters which are not the l2gen_aquarius default value. You can either export this to a file or import an external file. It's useful to note that when you are editing text in the parfile textarea you can click "Apply". This will cause the text to update all the GUI parameters. The parfile textarea will automatically be reformatted in a consistent way, so be aware that the order of your hand-entered parameters may change due to this. Clicking on another field or another tab will also have the same effect as clicking the "Apply" button. To reset all parameters within a given tab to the default, click the button at the bottom of the panel. To reset all parameters within all tabs, no button as of yet exists but you can simply delete the entire parfile textarea in the main tab, and this will restore everything to default.

#### THE PRODUCTS TAB

The l2gen_aquarius product parameter L2PROD is initially set to the default value (l2prod=''). At any time L2PROD can be restored to the default value by clicking 'Restore Defaults' at the bottom of this tab. L2PROD can be specified in a multitude of ways. Note that a change within any of one these product specifier controls will automatically update the others. Note that the default value l2prod='' is currently all the products. Product Selector The products are grouped into logical categories within this tree-based selector. Any branch may be fully unwound and an individual product may then be selected. Selection at any parent level will result in the selection of all the child level products. By default, checking/unchecking a parent behaves in a dual state manner, respectively checking/unchecking all of it's children. Selected Products Textarea This textfield displays the current selection of L2PROD and is fully editable.

### Command line example

    1. Run getanc_aquarius:
    % getanc_aquarius Q2014006082500.L1A_SCI

    2. Copy step 1 output params to parfile called "l2gen.par":
    l2_uncertainties_file=/seadas/installations/7.5.1/ocssw/var/anc/2014/006/PERT_L2_2014006_13843_V5.0.dat
    rim_file=/seadas/installations/7.5.1/ocssw/var/anc/2014/006/RIM_CFRSL_20140106_06_CMORPH_V1.2.h5
    sif_file=/seadas/installations/7.5.1/ocssw/var/anc/2014/006/SIF2014006082500.L2.h5
    sss_matchup_file=/seadas/installations/7.5.1/ocssw/var/anc/2014/006/N2014006082500_L2_MATCHUP_V2.h5
    suite=V5.0.0
    xrayfile1=/seadas/installations/7.5.1/ocssw/var/anc/2014/006/N201400600_XRAY_GOES_24h.h5
    yancfile1=y2014010606.h5
    yancfile2=y2014010612.h5

    3. Run l2gen_aquarius (via ocssw_runner):
    % ocssw_runner l2gen_aquarius ifile=Q2014006082500.L1A_SCI ofile=Q2014006081500.L2_SCI_V5.0.0 par=l2gen.par

### l2gen_aquarius Help (Command Line Version)

    l2gen_aquarius 5.06 (Jun  4 2018 09:56:37)
       par (ifile) = input parameter file
       ifile (ifile) = input L1 file name
       ofile (ofile) = output L2 file name,

       l2prod (string) = L2 products to be included in ofile
       l2prod = L2 products to be included in ofile
       yancfile1 (ifile) = radiometer ancillary file 1
       yancfile2 (ifile) = radiometer ancillary file 2
       yancfile3 (ifile) = radiometer ancillary file 3
       xrayfile2 (ifile) = radiometer xray ancillary file 2