User's Guide

FIXTIMES

Correct inconsistencies within the AVHRR archive header file.

Function:

Correct inconsistencies within the AVHRR archive header file. If the starting time, ending time, or number of image lines stored within the AVHRR archive header file is inconsistent with the actual archive image file, modify the header file. Also, if the NBS offset stored within the AVHRR archive header file is inconsistent the NBS offset contained within the on-line table, modify the header file.

Parameters:

IN
Input AVHRR archive image. The file name of the AVHRR archive image.

STARTIME
Start time. The acquisition start time as defined in the specified header file. The start time within the header file will be returned in this TAE string parameter with a format of hhmmss.

FIXFLAG
Fix flag. Flag indicating if the AVHRR archive header file was modified. Return value will be "yes" or "no".

LOGFILE(--)
Log file. Name of the log file to which the processing messages will be appended. The default is fixtimes;log in ADAPSLOG.

Example:

  1. LAS> fixtimes in=ah11101092033412 startime=@startime fixflag=@fixflag

    The header file of the specified AVHRR archive image is examined. If inconsistencies exist, the header file is modified and "yes" is returned in FIXFLAG. The acquisition start time as defined in the AVHRR archive header file is returned in STARTIME regardless of whether the header file is modified.

Description/Algorithm:

The specified AVHRR archive header file is read. If the NBS offset in the header file differs from the NBS offset within the on-line table, the offset in the header file will be updated. The starting time of the image is determined by reading the time stamp on the first line of image data. If this starting time differs from the starting time stored in the header file, the header file will be updated. The size of the AVHRR archive image file is used to determine how many lines of data the image contains. If this line count differs with the line count stored within the header file, the header file will be updated. The end time of the scene is computed using the newly acquired start time and line count. If this computed end time differs from the end time stored within the header file, the header file is updated. The start time as defined within the AVHRR archive header file is returned in STARTIME. A flag is returned in FIXFLAG to signify whether the header file was modified.

Nonfatal Error messages:

  1. [fixtimes-nonf] Nonfatal error encountered

    A nonfatal error was encountered. The message displayed preceding this message is the error that was encountered. Processing continues.

  2. [fixtimes-clos] Error closing archive image

    An error was encountered while closing the AVHRR archive image. Verify that the image was not corrupted during processing.

  3. [fixtimes-nbs] NBS offset in header file being updated

    The NBS offset stored in the header differs from the NBS offset interpolated from the on-line time correction table. The header file will be updated to reflect this more accurate value.

  4. [fixtimes-sta] Starting time in header file being updated

    The starting time stored in the header file differs from the starting time derived from the time stamp of the first line of data. The header file will be updated to reflect this more accurate value.

  5. [fixtimes-nln] Line count in header file being updated

    The line count stored in the header file differs from the line count calculated from the size of the AVHRR archive image file. The header file will be updated to reflect this value.

  6. [fixtimes-etm] Ending time in header file being updated

    The ending acquisition time in the AVHRR archive header file differs from the calculated ending time. The header file will be updated to reflect this more accurate value.

  7. [fixtimes-toff] <XXXX> time in header file off significantly

    The starting or ending time in the header file is significantly different than the respective time in the archive file. Re-ingest the image to generate a more accurate header file.

Fatal Error messages:

  1. [fixtimes-fatal] Fatal error encountered

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

  2. [fixtimes-file] Invalid file name specification

    An invalid file name was specified. Check the input file name that was specified in IN and rerun.

  3. [fixtimes-ext] Invalid extension specification

    An invalid extension was specified with the input file name. Either no extension or ";ahdr" must be specified.

  4. [fixtimes-rparm] Error returning parameter to TAE

    An error was encountered while trying to return a parameter to TAE. Contact the system administrator.

  5. [fixtimes-size] Error determining image size

    An error was encountered while seeking to the end of the image to determine its size. Contact the system administrator.

User Notes:

  1. FIXTIMES is meant to be called by other PDFs. It cannot be executed from the command line unless local TAE string variables have been declared to receive the values of STARTIME and FIXFLAG.

  2. If the difference between the acquisition start time in the header file and the start time in the archive image file exceeds 7 seconds, an error will be written to the "badscenes" log file in the ADAPSLOG directory. An error will also be logged if a difference in the ending time is detected.