AUTHOR: D. Lloyd
MKLEVEL1B creates Level 1b files from Level 0 archive images. Multiple Level 1b files may be written. Output may be written to disk of tape. Three windowing options are available: LINE, LAT/LONG and LAT/RANGE. The MKLEVEL1B executable may be called from the unix command line with the LINE windowing option.
This design document was created during a complete rewrite of the original MKLEVEL1B module.
This module was rewritten for two main reasons: 1) to utilize the Level 1b support routines that have recently been written; and 2) to make the executable unix callable. Level 1b support routines were written to eliminate differences in output from the three main Level 1b modules: MKLEVEL1B, INGEST1B, and WINDOW1B. Enhancements such as multiple input files and standardized input parameters were also needed among the three modules. The need to be unix callable stems from the confusing and roundabout procedures that ANSISTACK must utilize to call MKLEVEL1B.
1. Current production requirements must be met. 2. Output must match the current production MKLEVEL1B output. 3. Callable from unix command line. 4. Multiple input files. 5. Utilize Level 1b support routines.
1. Input limited to disk. 2. Unix call only supports the LINE windowing option. 3. Output scenes will not be split across tapes.
MKLEVEL1B creates Level 1b images from Level 0 archive images. Output may be to disk or tape (input limited to disk). Three windowing options are available: LINE, LATLONG and LATRANGE. The input image is opened and a windowed model is created. Two data headers, the terabit memory (TBM) and data set header (DSH), are created. The output file is opened, the headers are written. Each line in the window is read from input and converted to Level 1b format and written to the output. Product summary listings may be printed. For tape output, a tape label and shipping memo are created. Input and output files are closed. If multiple input files are specified, processing continues until all input are exhausted.
All parameters are checked for completeness and correctness. If more than one input is specified and window and/or channel parameters are defaulted, they are expanded for all input files. If output is to tape, the tape is mounted and checked for ANSI labeling and a logical tape end is determined. For each input file the MKLEVEL1B executable is called. The returned product summary file name is saved. If logical tape end was reached and multiple tapes are allowed, a new tape is mounted and the current file is written to the new tape. When all files are written, a tape label and shipping memo are created (tape output only). Product summary files are printed if desired. If tape was used the tape drive is released.
Common parameters:
INFILE List of Level 0 files COMMENT Tape mount comment OUTFILE List of Level 1b files CHANS Channel specification for each input file NCHANS Number of channels for each input file PACKFLG Flag to pack 5 channel output ACCTNUM Account number ORDERNUM Order number UNITNUM Unit number MVOLFLG Multi-volume flag SUMFLG Summary flag TAPEDENS Tape density TTYPE Tape type PRODESC Product description MAXBYTES Maximum number of Mbytes to write to tape ADDRESS Shipping address -LINE parameters SL List of starting line numbers NL List of number lines -LATLONG SLAT List of starting latitudes SLONG List of starting longitudes ELAT List of ending latitudes ELONG List of ending longitudes -LATRANGE SLAT List of starting latitudes ELAT List of ending latitudes QUADNUM List of quadrant numbers AREAOPT List of area options OUTPUT: Level 1b files either to disk or tape Tape label and shipping memo if output is tape Product summaries if specified
A check is made to determine if MKLEVEL1B was called from unix or TAE and parameters are retrieved. The input file is opened and header information is used to fill the model. A windowed model is created from which the TBM and DSH records are made. The output file is opened and the header records are written. Each line in the output window is read and converted to Level 1b format and written to the output file. Finally a product summary file is created and files are closed.
- COMMENT
- INPUT: Tape mount comment
- DRIVE
- INPUT/OUTPUT: Drive that tape is mounted on
- INFILE
- INPUT: Level 0 input file name
- OUTFILE
- INPUT: Level 1b output file name
- SL
- INPUT: Starting line number
- NL
- INPUT: Number of lines
- CHANS
- INPUT: Channel specification
- NCHANS
- INPUT: Number of channels in CHANS
- PACKFLG
- INPUT: Flag to pack 5-channel output
- ACCTNUM
- INPUT: Account number
- UNITNUM
- INPUT: Unit number
- ORDERNUM
- INPUT: Order number
- PRODESC
- INPUT: Product description
- MVOLFLG
- INPUT: Multi-volume flag
- TAPEDENS
- INPUT: Tape density
- TTYPE
- INPUT: Tape type
- NVOLS
- OUTPUT: Number of volumes in tape set
- MAXBYTES
- INPUT: Maximum number of Mbytes to write to tape
- NBYTES
- INPUT/OUTPUT: Number of Mbytes written to tape
- SUMFILE
- INPUT: Product summary report file name
- OUTNAME
- OUTPUT: Actual output file name created
- SLAT
- INPUT: Starting latitude
- SLONG
- INPUT: Starting longitude
- ELAT
- INPUT: Ending latitude
- ELONG
- INPUT: Ending longitude
- QUADNUM
- INPUT: Quadrant number
- AREAOPT
- INPUT: Area option
Testing for the MKLEVEL1B rewrite will mainly consist of creating a Level 1b output file with current production code and rewritten code and using unix diff to compare the two output files. For tape testing, files will be written to tape then retrieved from tape using unix dd and again unix diff will be used to compare files. For windowed cases, both an ascending and descending scene will be usedThe following test cases will be run:
1. Full LAC and GAC image
2. 5-band packed
3. 5-band unpacked
4. 4-band
5. 3-band
6. 2-band
7. 1-band
8. Repeat of cases 1-7 to tape
9. Multiple input scenes
10. Multiple input scenes to tape with MVOLFLG=YES
MAXBYTES set to a small enough value to force spanning
11. Multiple input scenes to tape with MVOLFLG=NO
MAXBYTES set to a small enough value to force spanning
12. Cases 1 and 10 from unix command line
13. Line windowing, both SL and NL specified
14. Lat/long windowing
15. Lat/range windowing
16. MKLEVEL1B called directly from STACK_GROUP (part of
ANSISTACK and called from AUTOL1B)
17. Test that improper/incomplete/invalid parameters are
trapped
18. Test all tape types and densities