OceanColor Banner Image

l2bin

Description: The SeaDAS l2bin program performs spatial binning of SeaWiFs, MODIS, and OCTS Level-2 data files. Currently, Level-2 GAC, LAC and HRPT files can be used as input to the l2bin program, however the output binned files are limited to fixed bin resolutions of 500m, 1km, 2km, 4km, 9km, or 36km (9km is the default). Spatial binning must first be performed on the Level-2 files before temporal binning can be performed. Both the Level-3 spatially and temporally binned output files have the same logical data format, although the Level-3 binned files can store the geophysical data values in separate physical files (*.x01, *.x02, etc), or all in one single file.

Spatial binning: Level-3 spatial binning is performed on Level-2 files. Each Level-2 data file must first be spatially binned to an equal-area grid before being temporally binned. Usually a Level-2 data file will generate a single Level-3 binned file, however some Level-2 SeaWiFS files will split into two Level-3 binned files if the Level-2 data crosses the international dateline or either pole.

See the SeaWiFS Technical Memorandum (TM) series volume 32 (abstracts online on seawifs.gsfc.nasa.gov) for further details on the spatial and temporal binning design.

[Command Mode][Interactive Mode]


Command Mode:

Usage:
     l2bin, ifile="ifile", ofile="ofile", resolve=resolve, flaguse="flaguse", l3bprod="l3bprod",
             prodmins=prodmins, noext=noext, logfile=logfile

     l2bin, ifile="ifile", ofile="ofile"  (minimum command)

 OR
     l2bin, par="pfile"
 

Example:

      l2bin, ifile="$SDSDEMO/L2_lac1.hdf", ofile="L3.hdf", flaguse="ATMFAIL, LAND, HIGLINT,
           STRAYLIGHT, CLDICE",  l3bprod="chlor_a, nLw_412",prodmins=[0.01,0.0], noext=1, resolve=4
 
 

Arguments/Keywords
 
ifile The name of a single Level-2 input file, or a text filename containing a list of Level-2 input files.
ofile The output HDF file name.
l3bprod  A list of product names to l2bin.  The default behavior is to process all products in the input files. This keyword should be used in place of the 'out_parm' keyword when used for time-binning. 
Log file The output file name to keep the process log.
par Input parameter file to be used in the specific command mode 'l2bin, par="pfile"'.  Parfile entries do not need to be bounded by single or double quotes. The parfile contains a list of keywords, one keyword per line, of the form KEYWORD=value.

l2bin optional inputs:
 
resolve Resolution of a bin in kilometers.  The currently supported options are H, 1, 2, 4, 9 and 36. (The default is 9. H = 0.5)
flaguse List of flags and masks names designating the l2_flags bits of the input L2 file to use for exclusion during binning. If the flag or mask name is listed, then if the corresponding bit of a pixel's l2_flags value is set, that pixel is not binned. Bits of l2_flags for which the algorithm name is not listed are ignored. Default is: ATMFAIL, LAND, HILT, HISATZEN, STRAYLIGHT, CLDICE, COCCOLITH, HISOLZEN, LOWLW, CHLFAIL, NAVWARN, ABSAER, MAXAERITER, ATMWARN and DARKPIXEL. Type string array or a single string delimited by commas.
prodmins  A list of numbers for each output product specified. These values denote the minimum value that will be included in a bin.  Type floating array, string array or single string delimited by commas. The default minimum values are:
 
angstrom_510 -1.0
all others 0.0
noext Specifies whether to have geophysical products in subordinates files(*.x01, *.x02, etc.), or whether to output just a single file with all data contained in the single file. The default is to use a single file. Specify noext=1 to use a single file, and noext=0 to use subordinate files.


Interactive Mode:
 
 

Main Widget:
 

The main_widget can be accessed by selecting "l2bin" from the Process-SeaWiFS/MODIS/OCTS pull down menu in SeaDAS main menu or from the command line mode by typing: "l2bin".

Input items :

Input file(s) The input file(s) to be used for binning.
Select (for Input file(s)) To display the file selection widget.
Options for l2bin Once a file is selected in the Input file(s) listing, the corresponding Day Start,Day End and Output filename fields are loaded for the user.  The default initial values for those fields are derived from each file in the input filename/filelist.
 
Resolution 500m, 1km, 2km, 4km, 9km(default), or 36km. The resolution of an output bin.
Set Products Select the desired output products for l2bin.  You can also specify the desired minimum value at which to bin for each product.
Set Flags Set the flags designating the conditions under which to exclude data from being binned. (See flaguse keyword in command mode above for default values.)  This opens the flags widget to show a list of masks and flags that are to be used for binning.  It allows you to select flags from the list so that items that have been masked or flagged will not be binned.  It is therefore also possible to attempt to bin unbinnable data.  When this is attempted, warnings such as "invalid data" will be shown during the binning run.  The TM series have more detail on masks and flags.
Subordinates Choose whether the output file has subordinates for each product, or a single output file.
Day Start/End Non-editable start/end data days in the format of YYYYDDD.

Output filename
The output file name is determined from the Input file.
Working directory The directory for the l2bin'ed output file.  Note this is only used when the output filename does not have the 'path' specified.
Select (for Working directory) To display the File Selection Widget for selecting the working directory. The directory selected will be displayed in the corresponding field.
Create (for SeaDAS script file) To create the SeaDAS script file based on the selections/options in the input screen.
SeaDAS script file The output script file to be created when the Create button is pressed. This is a SeaDAS script file and can only be executed under SeaDAS or IDL command mode.
Log file The output file name for the processing log if the user selects Submit.
Action items:
 
Run To run this program with selections/options in the input screen.
Submit To run this program as a background process with the selections/options in the input screen.
Help Displays the IDL version of online help on this widget.
Quit To quit this program.

 

l2bin Products Widget:

 

l2bin Flags Widget:
File Selection Widget:
Input items:
 
Path The directory from which the subdirectories and files are listed for selection.
Filter The string for filtering the files in the Path directory and displayed in the Files List for selection.
Subdirectories Listing of all the subdirectories under the Path directory.  The listing will be updated if the field Path got updated.
Files Listing of all the files that are under the Path directory and match the Filter strings.  The listing will be updated if fields Path, Filter, or Subdirectories got updated.  If the left mouse button was used to click on any file, that file will be listed in the Selection field.
Selection The file to be selected when the OK button is clicked.  If this field is empty, the directory in the Path field is returned.

Action items:
 
OK Returns the selected file list in the Selection field (or Path field, if Selection field is blank), and quits the File Selection Widget.
Cancel Cancels and quits the File Selection Widget.  No file is selected.
Help Displays the IDL version of online help on this widget.


Curator: OceanColor Webmaster

Authorized by: gene carl feldman

NASA logo

Privacy Policy and Important Notices

Updated: 10 November 2008