User's Guide

AVHRRSTACK

Stack AVHRR archive images to tape.

Function:

Stacks AVHRR archive images to an ANSI labeled tape. If the tape drive is equipped with an automatic tape stacker, this function can stack multiple tapes.

Parameters:

Subcommand -LEVEL0:
Read Level-0 AVHRR archive images and stack them to tape as Level-0 archive images.

PROCOPT
Processing option. The three character Committee on Earth Observing Satellites (CEOS) ID of the station for which the tape is being created. When PROCOPT is set to some off-site station, a shipping form which lists the images on the tape and a free-format tape label are created for each tape. When PROCOPT=sfl, each image has its database record updated in the ADAPSDBTMP directory and a library formatted tape label is created for each tape.

  = esa: European Space Agency
  = sfl: EROS Data Center
  = noa: National Oceanic and
	 Atmospheric Administration

CEOSID
CEOS ID. The three character CEOS ID of the receiving station for which the images are being stacked.

DRIVE
Tape drive. The tape drive to be used. If a drive is specified, the operator will not be prompted to mount a tape. It is assumed that the specified drive has NTAPES tapes mounted and ready for writing. If NULL, the operator will be prompted to mount NTAPES tapes.

NTAPES
Number of tapes. The number of tapes that are to be stacked. If NTAPES is greater than one, it is assumed that DRIVE is equipped with an automatic tape stacker.

TTYPE
Tape type. Type of tape that is to be stacked. The default is defined by the TAE global $TTYPE. The list of valid tape types is defined by the TAE global $TTYPEVAL.

MINBYTES
Minimum megabytes. The minimum number of megabytes that are to be stacked to a tape. If the combined size of all the available images does not exceed this value, AVHRRSTACK will wait until additional images appear in the input directory.

MAXBYTES
Maximum megabytes. The maximum number of megabytes that can be written to a tape.

INFILE(A*)
Input file. Wildcarded root file name defining the images to be stacked to tape. An extension of ;AHDR is assumed.

FILEOPT
File option. Option for deleting or moving the files that are stacked to tape. If set to MOVE, OUTDIR must be specified.


  = DELETE: Delete files after stacking
  = MOVE:   Move files to OUTDIR after stacking

OUTDIR
Output directory. If FILEOPT is set to MOVE, OUTDIR must be the directory where the files will be moved after they have been successfully stacked to tape. If FILEOPT is not set to MOVE, this parameter is ignored.

ADDRESS(--)
Shipping address. This address will be printed on the tape label and the shipping form.

INSTRUCT(--)
Special instructions. Special instructions to be printed on the shipping form.

PRODSUM(NO)
Product summary. Flag indicating whether to generate a product summary listing for each scene:


    YES :  Generate a product summary
    NO  :  Don't generate a summary

LOGFILE(--)
Log file. File where all processing messages will be logged. If NULL, the default is AVHRRSTACK.<xxx>;LOG in the ADAPSLOG directory, where <xxx> is PROCOPT.

SCENEFLG("NO")
Scene print flag. A flag to specify if the scene summaries are to be printed.

= YES: Print out the individual
       scene summaries
= NO:  Do not print the scene
       summaries
Subcommand -LEVEL1B:
Read Level-0 AVHRR archive images and stack them to tape as Level-1B archive images.

PROCOPT
Processing option. The three character Committee on Earth Observing Satellites (CEOS) ID of the station for which the tape is being created. When PROCOPT is set to some off-site station, a shipping form which lists the images on the tape and a free-format tape label are created for each tape. When PROCOPT=sfl, each image has its database record updated in the ADAPSDBTMP directory and a library formatted tape label is created for each tape.

  = esa: European Space Agency
  = sfl: EROS Data Center
  = noa: National Oceanic and
	 Atmospheric Administration

CEOSID
CEOS ID. The three character CEOS ID of the receiving station for which the images are being stacked.

DRIVE
Tape drive. The tape drive to be used. If a drive is specified, the operator will not be prompted to mount a tape. It is assumed that the specified drive has NTAPES tapes mounted and ready for writing. If NULL, the operator will be prompted to mount NTAPES tapes.

NTAPES
Number of tapes. The number of tapes that are to be stacked. If NTAPES is greater than one, it is assumed that DRIVE is equipped with an automatic tape stacker.

TTYPE
Tape type. Type of tape that is to be stacked. The default is defined by the TAE global $TTYPE. The list of valid tape types is defined by the TAE global $TTYPEVAL.

MINBYTES
Minimum megabytes. The minimum number of megabytes that are to be stacked to a tape. If the combined size of all the available images does not exceed this value, AVHRRSTACK will wait until additional images appear in the input directory.

MAXBYTES
Maximum megabytes. The maximum number of megabytes that can be written to a tape.

INFILE(A*)
Input file. Wildcarded root file name defining the images to be stacked to tape. An extension of ;AHDR is assumed.

ACCTNUM
Account number. The account number to which this order will be sent and billed.

ORDERNUM
Order number. The order number that includes this item.

UNITNUM
Unit number. The Level 1b unit number of the specified order.

FILEOPT
File option. Option for deleting or moving the files that are stacked to tape. If set to MOVE, OUTDIR must be specified.


  = DELETE: Delete files after stacking
  = MOVE:   Move files to OUTDIR after stacking

OUTDIR
Output directory. If FILEOPT is set to MOVE, OUTDIR must be the directory where the files will be moved after they have been successfully stacked to tape. If FILEOPT is not set to MOVE, this parameter is ignored.

ADDRESS(--)
Shipping address. This address will be printed on the tape label and the shipping form.

INSTRUCT(--)
Special instructions. Special instructions to be printed on the shipping form.

PRODSUM(NO)
Product summary. Flag indicating whether to generate a product summary listing for each scene:


    YES :  Generate a product summary
    NO  :  Don't generate a summary

LOGFILE(--)
Log file. File where all processing messages will be logged. If NULL, the default is AVHRRSTACK.<xxx>;LOG in the ADAPSLOG directory, where <xxx> is PROCOPT.

SCENEFLG("NO")
Scene print flag. A flag to specify if the scene summaries are to be printed.

= YES: Print out the individual
       scene summaries
= NO:  Do not print the scene
       summaries

Examples:

  1. LAS> avhrrstack-level0 procopt=sfl ceosid=sfl drive=-- ntapes=10 ttype=3480 minbytes=250 maxbytes=270 fileopt=move outdir=[prodgen.save]

    AVHRR archive images will be stacked from the [.sfl.sfl] subdirectory of ADAPSARC. Images matching A* will be stacked. The operator will be prompted to mount ten 3480, ANSI labeled tapes. Each tape will contain between 250 to 270 megabytes of data. All processing messages will be logged in the avhrrstack.sfl;log file in ADAPSLOG. A tape label will be printed for each tape stacked. After each image is stacked to tape, it will be moved into the [prodgen.save] directory, and its database record will be updated to indicate the identification number of the tape to which it was stacked.

  2. LAS> avhrrstack-level1b procopt=esa ceosid=sfl drive=-- ntapes=1 ttype=8lo minbytes=0 maxbytes=2250 infile="[esa]ah*" fileopt=move outdir=[save.sfl]

    AVHRR archive images will be stacked in Level-1B format from the [esa] directory. Images matching AH* will be stacked. The operator will be prompted to mount one 8LO, ANSI labeled tape. The tape will have at most 2250 megabytes of data stacked to it. All processing messages will be logged in the avhrrstack.esa;log file in ADAPSLOG. A tape label and a shipping form will be printed for the tape. After each image is stacked to tape it will be moved into the [save.sfl] directory.

AVHRRSTACK enters a processing loop and executes the following steps for all NTAPES tapes that are to be stacked:

    1. Call ANSISTACK to stack AVHRR images to a single tape.
       If FILEOPT=MOVE, each image will be moved into the
       directory specified by OUTDIR after it has been
       stacked to tape.  If FILEOPT=DELETE, each image will be
       deleted after it has been stacked to tape.

    2. Rename the tape summary file produced by ANSISTACK to a
       standard file name.  See User Note 1.

    3. If PROCOPT=sfl, UPDATEDB is called to update the database
       records for each image with the tape ID.

    4. SHIPFORM is called to create a shipping
       form for the tape that was created.
    
    5. If the stop file exists, exit the loop and do not stack
       the remaining tapes.  See User Note 2.

Nonfatal Error Message:

  1. [avhrrstack-skip] Error writing to tape

    An error was encountered stacking images to a tape. The tape is dismounted and stacking will continue with the next tape if there are additional tapes available in the automatic tape stacker.

Fatal Error Messages:

  1. [avhrrstack-alloc] Error allocating memory

    An error was encountered while dynamically allocating memory. If the error persists, contact the system administrator.

  2. [avhrrstack-fatal] Fatal error encountered

    A fatal error was encountered. The message displayed preceding this message is the error that was encountered. Processing terminates.

  3. [avhrrstack-open] Error opening tape summary file

    An error was encountered opening the tape summary file. Ensure the file and directory permissions are set appropriately. See User Note 1.

  4. [avhrrstack-read] Error reading summary file

    Ensure the tape summary file is valid. If the file is corrupt, the processing messages in LOGFILE can be used to manually correct the errors. See the Users Guide for ANSISTACK for a description of the tape summary file. Once the summary file has been modified, the user must manually run UPDATEDB or SHIPFORM, depending upon the value of PROCOPT.

  5. [avhrrstack-run] AVHRRSTACK already using drive <xxx>

    AVHRRSTACK already has drive <xxx> in use. If another AVHRRSTACK is using the drive, select another tape drive to use. If AVHRRSTACK is not using this tape drive, the appropriate lock file will have to be removed from ADAPSTABLES. The lock file is named AVHRRSTACK.<xxx>;LOCK.

  6. [avhrrstack-sum] Tape summary file does not exist

    ANSISTACK completed successfully; however, the tape summary file was not created. Check the appropriate log file to determine which images were stacked to the tape. Refer to the user's guide for ANSISTACK to determine what the problem may be.

  7. [avhrrstack-tae] Error sending parameter to TAE

    An error was encountered sending a parameter to TAE. If the error persists, contact the system administrator.

  8. [avhrrstack-drv] Error detecting BOT status on drive

    The "beginning of tape" status was not found. If the error persists, contact the system administrator.

User Notes:

  1. A tape summary file called TAPE.SUMMARY<xxx> is created by ANSISTACK for each tape that is stacked, where <xxx> is the value of the TAE global variable $JOB. This file is located in the [.FORMS] subdirectory of ADAPSARC. As each tape is successfully stacked, the tape summary file is renamed to <TAPEID>;LIST and is left in the same directory.

  2. This function will stop stacking images to tape if a file called AVHRRSTACK.<xxx>;STOP exists in the ADAPSTABLES directory, where <xxx> is the tape drive that AVHRRSTACK is using. This file does not need to contain any special information. Its existence is enough to signal the function to stop stacking images. The stop file will be deleted prior to the function completing successfully. ADAPSTOP is used to create this file.

  3. This function is used to stack AVHRR archive images to tape and create the necessary associated products for the valid CEOS IDs of PROCOPT. If AVHRR archive images need to be stacked to a tape for another purpose, the user should use ANSISTACK-AVHRR.

  4. Related functions are ADAPSTOP, ANSISTACK, SHIPFORM, and UPDATEDB.