User's Guide

GETATM

Create an image containing atmospheric correction values.

Function:

Create an image containing atmospheric correction values. The image will be the same size and in the same projection as the input image. One to nine bands will be created depending on input parameters. The bands can be: water vapor, elevation, ozone, quality control, satellite zenith angle, solar zenith angle, relative azimuth angle or geographic line and sample.

Parameters:

IN
Input image. A LAS image of AVHRR data that has an associated ADDR file or a LAS image with valid projection information in the DDR.

OUT
Output image. The output image is a one to nine band image the same size and in the same projection as the input image.

ELEV(--)
Elevation image. A single band image containing elevation in kilometers. The image must be in geographic projection with units of degrees.

OZONE(--)
Ozone image. A single band image containing ozone values in centimeters. The image must be in geographic projection with units of degrees.

WATER(--)
Water vapor image. A single band image containing water vapor values in centimeters. The image must be in geographic projection with units of degrees. This image is associated with the QC image (see User Note 3).

QC(--)
Quality Control band image. A single band image of qualitiy control flags. The image must be in geographic projection with units of degrees. This image is associated with the WATER image (see User Note 3).

ANGFLG(YES)
Generate angles bands flag. If this flag is specified as YES, solar zenith, satellite, zenith and relative azimuth angles are calculated and written to the output image (see User Note 5).

INTERPFLG(NN)
Interpolation flag. Indicates the type of interpolation desired. Two types of interpolation are available (see User Notes 1 and 6):

    NN = nearest neighbor
    BL = bi-linear

LINEGRID
Line gridsize. The line sub-sampling interval for the input image.

SAMPGRID
Samples gridsize. The sample sub-sampling interval for each sub-sampled line in the image.

LSBFLG(NO)
Line Sample band flag. If this flag is set to YES, the line and sample bands are created. These values are for a 180 by 360 image in Geographic projection.

ANGSCALE(NONE)
Angles scale. Scaling method used to store ANGLES. The data type indicated in the image's DDR will be used to determine the scaling factors and offset values to use when unscaling the data.

    = GLOBAL: Global scaling
    = NONE:   No scaling
    = US:     US scaling

Examples:

  1. LAS> getatm in=ah14060399123456 out=ah14060399123456atm water=wv14060399 qc=wv14060399qc ozone=ozone elev=gtopo30 linegrid=30 sampgrid=30

    A 7-band image ah14060399123456atm is created using the model information from ah14060399123456 and values from the images: wv14060399, wv14060399qc, ozone and gtopo30. The three angles bands are created since the ANGFLG defaults to YES. The input images are sampled at every 30 lines and samples.

  2. LAS> getatm in=us_232245 out=us_232245atm elev=gtopo30 linegrid=40 sampgrid=50 lsbflg=yes

    A 3-band image us_232245atm is created using the projection information from the DDR of image us_232245 and the values from the gtopo30 image. The three angles bands will not be created (see User Note 5). The input image is sampled at every 40 lines and every 50 samples.

Description/Algorithm:

GETATM uses a sub-sampling technique to create an output image the same size and in the same space as the input image. This is done to reduce the number of times the AVHRR satellite model or the GCTP routines are used to compute latitude and longitude. The sub-sampling intervals are variable so that the user can arrive at a good compromise between computation time and output image accuracy.

The TAE parameters are retrieved and input images are opened. An attemp is made to open the image ADDR. If successful, the satellite model is initialized, otherwise the image DDR is opened and the projection parameters are checked for validity. At the specified gridpoints the latitude and longitude, as well as the angles, are calculated. The corresponding line and sample are computed for each input image and values at those locations are obtained. The pixels between the gridpoints are filled in with interpolated values to create the output image. Two types of interpolation are used: nearest neighbor and bi-linear interpolation (see User Note 1 and 6).

Nonfatal Error Message:

  1. [getatm-angles] Can't generate angles without a MODEL resetting ANGFLG to NO

    The input image did not have a valid ADDR or the ADDR was not present. If angles are desired, insure the ADDR exists and rerun the process.

Fatal Error Messages:

  1. [getatm-alloc] Error allocating memory

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

  2. [getatm-bands] No output bands specified

    No bands were specified for the output image. Insure that at least one of the following is specified: WATER, OZONE, or ELEV images, or that ANGFLG=YES.

  3. [getatm-bddr] Error updating DDR for band XX

    An error occurred updating the DDR for the specified band. Check that the user has write priveledges and that sufficient disk space is available.

  4. [getatm-getddr] Error reading image DDR

    An error occurred while trying to read the image DDR. Insure the DDR exists and rerun the process.

  5. [getatm-noproj] Projection information not available from DDR

    The projection information was not in the DDR. If the user intended to use DDR projection information, insure the DDR is valid. If the ADDR was to be used, see error message [getatm-getaddr].

  6. [getatm-proj] XXX projection code must be geographic

    The projection code for the XXX image was not geographic. Insure the image is in geographic projection.

  7. [getatm-projunit] Incorrect projection units in DDR

    The projection units in the DDR did not match any of the accepted units that the GCTP routines expect. Make sure the units are one of: radians, feet, meters, seconds of arc, degrees of arc or packed DMS.

  8. [getatm-transinit] Error initializing projection transformation

    An error occurred initializing the GCTP projection transformation routine. The error message preceding this one indicates the specific error encountered.

  9. [getatm-units] XXX projection units must be degrees

    The projection units for the XXX image was not in degrees. Insure the image projection units are degrees.

  10. [getatm-fatal] Fatal error encountered

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

User Notes:

  1. Several bands will always use nearest neighbor interpolation method regardless of the value of INTERPFLG. The following are the affected bands:

      QC        - a bi-linear interpolation on the flags would corrupt their
                  vaues and invalidate their meaning.  
      WATER     - the QC flags indicate where the water vapor values originated so
                  water values must be interpolated in the same manner as the flags.
      ELEVATION - the invalid value flags in the image would bias the interpolation.
      LINE      - the invalid value flags in the image would bias the interpolation.
      SAMPLE    - the invalid value flags in the image would bias the interpolation.
    

  2. The values used for LINEGRID and SAMPGRID directly affect the quality, in terms of number of interpolated values, of the output image and execution time. Smaller grid sizes decrease the number of interpolations and increase the execution time. The relationship between grid size and execution time is roughly linear -- halving the grid size doubles the execution time. The relationship between grid size and number of interpolations in exponetial -- the number of interpolations is approximately the square of the grid size.

  3. The QC image contains information about the origin of the values in the WATER image. This image is created when a water vapor daily observation is filled with values from climatologies. Running the associated applications GETWATER or FILLTOVS will create the QC image as well as giving a complete WATER image for input to this routine.

  4. The input images WATER, ELEV, OZONE, and QC must be single-band images due to the constraints of underlying image support routines.

  5. Since the satellite information is not available when using the image DDR, the viewing angles can not be computed. Therefore, if the ANGFLG=YES and the ADDR is not available the ANGFLG will be reset to NO and the user will be notified that angles will not be computed.

  6. The nearest neighbor interpolation routine ignores invalid data points, those values less than zero, and returns the nearest valid neighbor.

  7. The output image may contain one to nine bands depending on user input specifications. Users can determine what each band contains from the Data Source field in the Band DDR. If this information is needed prior to creation of the DDR, the output bands will always be ordered as follows:

      Water Vapor
      Elevation
      Ozone
      Quality Control
      Satellite Zenith
      Solar Zenith
      Relative Azimuth
      Geo Line
      Geo Sample
    
    Bands not specifed by the user are omitted from the list e.g. if an elevation image is specified and LSBFLG=YES, the 3-band output image would be:

      Band 1 - Elevation
      Band 2 - Geo Line
      Band 3 - Geo Sample