User's Guide

AVHRRDB

Generate an AVHRR database record

Function:

Generates an AVHRR database file from the AVHRR data descriptor record (ADDR) associated with the specified LAS image. The database file contains the image's scene ID, AVHRR data type (HRPT, LAC, or GAC), satellite number, acquire date, acquire start time, acquire end time, day/night indicator, pass direction, equatorial crossing, orbit number, pass duration pass in minutes, number of lines, archive tape ID, number of bands, AVHRR channel numbers, receiving station, scene latitude and longitude locations, and the associated browse image's time code.

Parameters:

IN
Input image. The input AVHRR LAS image must have an accompanying ADDR file from which header information is extracted.

TSTAMP
Time stamp. The time that the image's associated browse image was created. This time is written to the database file and is used to identify and match the browse, facsimile, microfiche, and database information. The time is formatted as HHMMSS, where HH is hours, MM is minutes, and SS is seconds.

TAPEID(--)
Tape ID. The storage location assigned to the tape on which the image is archived. If TAPEID is NULL, the database file will be created in the ADAPSDBTMP directory; otherwise, it will be created in the ADAPSDB directory.

Examples:

  1. LAS> avhrrdb in=faximg1 tstamp=(012413)

    The information from the ADDR associated with the LAS image FAXIMG1 is used to generate a database file. The time that the browse file was created (012413) will also be written to the database file. The database file is created in the ADAPSDBTMP directory with the archive tape ID field left blank.

  2. LAS> avhrrdb in=ascend tstamp=(124354) tapeid=007546

    The information from the ADDR associated with the LAS image ASCEND is used to generate a database file. The time that the browse file was created (124354) will also be written to the database file. Since the TAPEID is known, the file is created in the daily database directory ADAPSDB.

Description/Algorithm:

The information from the ADDR associated with the LAS image is read and a database file is generated. The database file contains the image's scene ID, AVHRR data type (HRPT, LAC, or GAC), satellite number, acquire date, acquire start time, acquire end time, day/night indicator, direction of the pass, equatorial crossing, orbit number, duration of the pass in minutes, number of lines, archive tape ID, number of bands, channel numbers, receiving station, and scene latitude and longitude locations. The time the browse was created is also added to this information to uniquely identify and match the browse, facsimile, microfiche, and database information. The database file will be named based on the image's scene ID built from the ADDR and TSTAMP.

When the TAPEID is not known, the database information is written to a file in the temporary database directory (ADAPSDBTMP). The archive tape ID field in the file is left blank. When the archive tape for the image is created, the temporary database file is updated with the archive tape ID and is moved to the daily database directory. The daily database files are transferred and used to update the production database each night. See User Note 1.

When the TAPEID is known, the database information is written to a file in the daily database directory (ADAPSDB). The daily database files are transferred and used to update the production database each night.

Nonfatal error messages:

    None.

Fatal Error Messages:

  1. [avhrrdb-fatal] Fatal error encountered

    The error message displayed immediately preceding this message is the specific error encountered. Processing is terminated.

  2. [avhrrdb-time] Invalid time stamp

    The specified time stamp is not a valid time or does not contain six characters (HHMMSS). Respecify the time stamp and rerun.

  3. [avhrrdb-getenv] Error getting the database directory environment name

    An error occurred when retrieving the database directory environment variable. Make sure the ADAPSDBTMP and ADAPSDB environment variables exist, and that they point to existing directories.

  4. [avhrrdb-open] Error opening database file

    An error occurred opening the database file. Disk space, protections, and the existence of the the ADAPSDBTMP and ADAPSDB directories should be checked.

User Note:

  1. Functions related to this program are AVHRRSTACK, UPDATEDB, and DBTRANS. The AVHRRSTACK function creates the archive tape and retrieves the tape storage location. UPDATEDB uses the tape storage location to update the files in the temporary database directory and then moves the files to the daily database directory. Each night the files in the daily database directory are transferred with the DBTRANS function.