User's Guide

ATMOCOR

Apply atmospheric correction to an AVHRR LAS image.

Function:

Applies a Rayleigh scattering correction technique to a LAS image containing calibrated reflectance data from the NOAA AVHRR visible bands. The image data is corrected using a series of look-up tables (LUTs); a LAS image containing satellite zenith, solar zenith, and relative azimuth angle information; a LAS image containing elevation data; and, optionally, LAS images containing ozone and water vapor correction information.

Parameters:

IN
Input image. IN must specify two bands of AVHRR data of any data type. The only acceptable bands are AVHRR channel 1 and AVHRR channel 2. The image may be subwindowed. One or two images may be specified. The values contained within IN must represent percent reflectance or radiance for calibrated AVHRR data, such as those produced by AVHRRCAL. See User Notes 3 and 4.

BANDSEQ(1 2)
Sequence of bands in IN. This must contain two values indicating the order of the AVHRR cahnnels specified in the parameter IN.

INSCALE
Input scale. Scaling method used to store IN. The data type indicated in the image's DDR will be used to determine the scaling factor and offset value to use when unscaling the data.


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

ANGLES
Angles image. The image containing the necessary view angles. Three bands are expected, the first band being satellite zenith angles, the second band being solar zenith angles, and the third band being relative azimuth angles. This image may be generated using ANGINTERP. This image must be the same size and projection as IN. Subwindowing will be ignored; instead, the window specified in IN will be used. See User Notes 3 and 4.

ANGSCALE
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

ELEV
Elevation image. The image supplying the elevation in meters for each pixel of the output image. This image must be the same size and projection as IN. Subwindowing will be ignored; instead, the window specified in IN will be used.

OUT
Output image. The output image is the same size as the input image specification. The data type is specified by ODTYPE. Output values are expressed as a percentage of surface reflectance with atmospheric correction applied.

OUTSCALE
Output scale. Scaling method to be used to store OUT. ODTYPE will be used to determine the scaling factor and offset value to use when scaling the output data.


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

SATNUM
Satellite number. The number of the satellite that acquired the image data. A TAE 'help' on this parameter will display the valid values available (14 designates NOAA-14, etc.)

JDATE
Julian date. The Julian date is entered as the number of the day in the year the data was acquired. This date will be used to calculate the sun-earth distance.

ODTYPE(SAME)
Output data type. The data type of the output image. The output values will be scaled to fit within the range of the specified data type.


  = SAME:  Same as input
  = BYTE:  BYTE
  = I*2:   INTEGER*2
  = I*4:   INTEGER*4
  = R*4:   REAL*4

OZONE(--)
Ozone image. The image supplying the ozone measurements for each pixel of the output image. This image must be the same size and projection as IN. Subwindowing will be ignored; instead, the window specified in IN will be used. If an image is not specified, an average ozone correction will be applied.

WATER
Water vapor image. The image supplying the water vapor measurements for each pixel of the output image. This image must be the same size and projection as IN. Subwindowing will be ignored; instead, the window specified in IN will be used. If an image is not specified, no water vapor correction will be applied.

RADOPT(RADIANCE)
Radiance flag. Flag to indicate if IN contains radiance or reflectance values.


  = RADIANCE:    Input radiance
  = REFLECTANCE: Input reflectance

Examples:

  1. LAS> atmocor in="us01901 + us01900" bandseq=(2 1) inscale=us angles="atm_us019(:5 6 7)" elev="atm_us019(:2)" water="atm_us019(:1)" ozone="atm_us019(:2)" out=cor_us019 outscale=us satnum=14 jdate=155 odtype=i*2 radopt=reflectance

    Atmospheric correction will be applied to the two images us01901 and us01900. Image us01901 contains AVHRR channel 2 and us01900 contains AVHRR channel 1. This is specified in the parameter BANDSEQ. All associated data are contained in the atm_us019 image.

  2. LAS> atmocor in=inimg bandseq=(1 2) inscale=global angles=angimg angscale=global elev=dem out=outimg outscale=global satnum=11 jdate=247 odtype=i*2 ozone=oz2 water=h20 radopt=reflectance

    Atmospheric correction will be applied to INIMG, which contains percent reflectance values scaled using the global AVHRR scaling scheme. The satellite zenith, solar zenith, and relative azimuth angles are stored in ANGIMG. These angle values are scaled using the global AVHRR scaling scheme. Elevation data for INIMG is stored in the LAS image DEM. The atmospherically corrected values will be written to OUTIMG using the global AVHRR scaling scheme. The output image data type will be I*2. Data in INIMG was received by NOAA-11 on the 247th day of the year. OZ2 and H20 will provide measurements for ozone and water vapor correction, respectively.

  3. LAS> atmocor in="ny(1,1,1000,1000:1,2)" bandseq=(1 2) inscale=none angles="angimg(:1,2,3)" angscale=none elev=etopo5 out=outimg outscale=none satnum=11 jdate=70

    Atmospheric correction will be applied to a window of the unscaled LAS image NY. The view angles for this image are stored in the first three bands of the unscaled LAS image, ANGIMG. The elevation values for each pixel are contained in the LAS image ETOPO5. OUTIMG contains two bands, each 1000 lines by 1000 samples. The first band of the image is AVHRR channel 1 data and the second band is AVHRR channel 2 data. The data type of OUTIMG is the same as NY and the data will be unscaled.

Description/Algorithm:

The satelliate zenith, solar zenith, and relative azimuth angles are read from the ANGLES image. The elevation values are read from the ELEV Digital Elevation Model (DEM) image. Using these angles and elevation, the A, B, and S coefficients are interpolated from the appropriate look-up tables. If the input image contains reflectance values, they are first converted to radiance. Atmospheric correction is applied to the input radiance values, and the results are converted to percent reflectance to be written to the output image. The actual equation follows:

    P = 100.0 * Y / (100.0 + Y * S)

    For channel 1:

	Y = A / Tg * D * L + B

    For channel 2:

	Y = A * D * L + B


    P  = Percent surface reflectance with atmospheric correction
	 applied.

    S  = Atmospheric spherical albedo which is a function of the
         elevation and the satellite platform, interpolated from
         the S LUT.

    A  = A coefficient dependent on the satellite zenith, solar
         zenith, and elevation, interpolated from the A LUT.
    
    Tg = Tau(g) is the atmospheric transmittance due to gaseous
	 absorption.  If no light is absorbed by gases, Tg = 1.0
	 (100% of light gets through the gases); if all light is
	 absorbed, Tg = 0.0.  Tg is used to designate
	 transmittance due only to ozone in channel 1.

    D  = Square of the distance between the earth and sun in
	 astronomical units, calculated based on JDATE.
    
    L  = Input radiance value (calibrated satellite reading).

    B  = B coefficient dependent on the satellite zenith, solar
	 zenith, relative azimuth, and elevation, interpolated
	 from the B LUT.
Refer to User Note 5 for references on the above equations.

Nonfatal Error Message:

  1. [atmocor-close] Error closing the image file

    An error occurred while trying to close one of the image files. The file will automatically be closed when ATMOCOR terminates.

  2. [atmocor-ddr] Error updating DDR

    An error occurred when ATMOCOR attempted to update the output image's DDR to indicate that each output band contains atmospherically-corrected AVHRR channel 1 or channel 2 data. The user may update this information in the DDR using EDITDDR if necessary.

  3. [atmocor-nonfatal] Nonfatal error encountered

    A nonfatal error was encountered during processing. The error message that is displayed immediately preceding this message is the specific error that was encountered. Processing will continue.

Fatal Error Messages:

  1. [atmocor-alloc] Error allocating dynamic memory

    An error occurred while trying to allocate dynamic memory. Rerun when more system resources are available.

  2. [atmocor-badbnd] Invalid number of input bands specified

    Only one or two input bands may be specified in IN. Re-enter IN, specifying either one or two bands.

  3. [atmocor-badimg] Invalid number of input images specified

    Only one image may be specified in IN. Re-enter IN, specifying one image.

  4. [atmocor-bndcnt] <XXX> band <YYY> image not specified

    The correct number of bands <XXX> was not specified for the indicated image <YYY>. The ANGLES image requires three bands, and the ELEV, OZONE, and WATER images each require one band. Respecify the indicated image with the correct number of bands.

  5. [atmocor-env] Error retrieving ADAPSTABLES

    An error occurred retrieving the value of the ADAPSTABLES environment variable. Ensure ADAPSTABLES is set to the directory where the atmospheric correction tables are located.

  6. [atmocor-fatal] Fatal error encountered

    A fatal error was encountered during processing. Processing is terminated. The error message that is displayed immediately preceding this message is the specific error that was encountered.

  7. [atmocor-open] Error opening <XXX>

    An error occurred attempting to open the specified file. Ensure the A, B, and S look-up tables exist for read access in the ADAPSTABLES directory, the input image exists for read access, and the output image does not exist.

  8. [atmocor-read] Error reading <XXX> LUT

    An error occurred attempting to read the specified look-up table. Contact the system administrator to verify the format of the file.

  9. [atmocor-sat] No atmospheric correction for NOAA <XX>

    ATMOCOR will process data for NOAA satellites for which tables have been generated. Verify the correct satellite number was entered in SATNUM.

User Notes:

  1. ATMOCOR rounds (not truncates) when converting from a higher (REAL*4) to a lower (BYTE) data type.

  2. Only the visible bands of calibrated AVHRR data should be used as input to ATMOCOR.

  3. Related routines:

    	- AVHRRCAL may be used to convert the visible
    	  AVHRR channels to percent reflectance.
    	- ANGINTERP may be used to calculate an image of satellite
    	  zenith, solar zenith, and relative azimuth angles.
    	- GETATM may be used to calculate all the associated
    	  input image files: angles, ozone, water vapor and
    	  elevation.
    
  4. Refer to the ADAPS overviews for explanations of global and US scaling. INSCALE, ANGSCALE and the data types of the IN and ANGLES images are used to determine how the angles and image data are scaled.

  5. References: Tanre, D., Deroo, C., Duhaut, P., et al. (1986), Simulation of the Satellite Signal in the Solar Spectrum (5S), User's Guide. Laboratoire d'Optique Atmospherique, Universite des Sciences et Techniques de Lille, 58655 Villeneuve d'Ascq Cedex, France, 343 pp.

    Teillet, P.M. (1992) "An Algorithm for the Radiometric and Atmospheric Correction of AVHRR Data in the Solar Reflective Channels", Remote Sensing of the Environment. 41:185-195.