Modified CLAVR-1 and CLAVR-x
Cloud Masking Algorithm for
AVHRR Single Scenes and Composite
Design Document

Dave Lloyd
Development and Maintenance Directorate
Archive Software Department

May 13, 2003

Signatures




Prepared by: Dave Lloyd                                                                                                               
  Software Engineer,
  SAIC
Concurred by: Deb Labahn                                                                                                               
  Software Project Lead,
  SAIC
Approved by: Mike Benson                                                                                                             
  Project Manager,
  USGS

Document History




Number Date and Sections Notes
1 May 13, 2003 Document Created
2    
3    
4    
5    
6    


Contents

INTRODUCTION

Identification

This document identifies the design for the module CLAVR.

System Overview

CLAVR is a LAS implementation of the CLAVR-1 and CLAVR-x algorithms modified for use at EROS Data Center on AVHRR single scene and composite images in LAS image format. The primary user will be Digital Data Production personnel for creating a cloud code band to accompany the US and Alaska composites. The interface is through the LAS function CLAVR.

Document Overview

This document contains the design for the modified CLAVR algorithm.

REFERENCED DOCUMENTS

Applicable Documents

Modified CLAVR-1 and CLAVR-x Cloud Masking Algorithm for AVHRR Single Scenes and Composites Software Requirements Specification, May 6, 2003. Maintained in clavr/DOCS directory.

Scientific Basis and Initial Evaluation of the CLAVR-1 Global Clear/Cloud Classification Algorithm for the Advanced Very High Resolution Radiometer, Stowe, Larry L., et al. Journal of Atmospheric and Oceanic Technology, Vol 16, June 99, pp 656-681. Hard copy maintained in ADAPS files.

NOAA KLM User's Guide. http://www2.ncdc.noaa.gov/docs/klm/index.htm

Reference Documents

CLAVR-1 source code obtained from Andrew Heidinger, NOAA. Source is maintained in clavr/CLAVR/CLAVR1 directory.

CLAVR-x source code obtained from Andrew Heidinger, NOAA. Source is maintained in clavr/CLAVR/CLAVRX directory.

DESIGN

Interface Design

The user interface is via TAE and consists of a PDF file containing the definition of the parameters and executable as well as the user help.

  1. Input Parameters
    1. IN
        Input file name. String value of maximum TAE length with no default value.
    2. SATNUM
        Satellite number. Integer value with no default. Valid values are: 11, 12, 14, 15, 16 and 17.
    3. SCALING
        Input file scaling type. String value of length 6 with no default value. Valid values are "NONE", "US" and "GLOBAL".
    4. ACQDATE
        Input file acquisition date for a single scene input file or the median acquisition date of all scenes in a composite. Integer array of three values arranged as month, day and 4-digit year with no default value.
    5. THRESHOLD
        Optional threshold file. String value of maximum TAE length. Parameter is nullable with default value of NULL.
    6. BARREN
        Optional barren mask image. String value of maximum TAE length. Parameter is nullable with default value of NULL.

  2. Output Parameters
    1. OUT
        Optional output image. String value of maximum TAE length. Parameter is nullable with default value of NULL.

  3. User Help
    1. Level 1 help for each parameter.
      1. IN - Input image
      2. SATNUM - Satellite number
      3. SCALING - Input scaling type
      4. ACQDATE - Input acquisition date
      5. THRESHOLD - Threshold file
      6. BARREN - Barren mask image
      7. OUT - Output image

    2. Level 2 help for each parameter.
      1. IN - Input image. The input image can either be a single-scene AVHRR image or a composite AVHRR image. Single scene image must be a 5-band LAS image created by running AVHRRIN and calibrated using AVHRRCAL. Composite image must be a 13-band composite of single scene images. (See User Notes for expected band order and descriptions).
      2. SATNUM - Satellite number. The 2-digit satellite number assigned by NOAA. Valid:
          10
          11
          12
          14
          15
          16
          17
      3. SCALING - Input scaling type. The scaling type that was applied to the input image by AVHRRCAL. Valid:
          US
          GLOBAL
          NONE
      4. ACQDATE - Input acquisition date. The date is entered as month, day and 4-digit year. For single scene input images this is the acquisition date of the image. For composite input images this is the mean acquisition date of individual scenes that went into the composite.
      5. THRESHOLD - Threshold file. File containing alternate threshold values for the various CLAVR tests. (See User Notes for example file).
      6. BARREN - Barren mask image. A binary image where pixels deemed to be void of vegetation (barren) have the value 1 and all others 0. The image must be the same size and space as the composite input image. If input image is a single scene this parameter is ignored.
      7. OUT - Output image. If supplied, the output image will contain the cloud codes for the input image. If left NULL, the cloud codes will be added as the last band to the input image.

    3. Description/Algorithm section. The input parameters are obtained and checked for validity. The type of input is determined. If a valid addr and mnr file exist the input scene is considered a single scene. Tf the addr and mnr file exist, but are not valid, a fatal error occurs. If the addr and mnr do not exist then the input is considered a composite. All input files are opened and checked for validity. The cloud codes are determined by subjecting each pixel in the input image to a series of tests. The tests were derived from the NOAA CLAVR-1 and CLAVR-x algorithms. The output cloud codes are written to a user supplied image or added as the 6th or 14th band of the input image.

    4. Examples section. Provide three examples: single scene, composite and user supplied threshold file.

    5. User Notes section. User Note 1 will contain an example of a user supplied threshold file.
          RGCT 44.0
          TGCR1 293.0
          C3AR 3.0
          C3AR_KLM 5.0
          Gamma 50.0
          RRCT_min 0.9
          RRCT_max 1.1
          TGCR2 293.0
          C3AT 6.0
          TGCT 249.0
          LAT_max 60.0
          LAT_min -60.0
      


Function Design

  1. main
  2. Input:
    Output:
    Returns:
    Algorithm:

  3. getpar
  4. Input: Output:
    RETURNS:
    Algorithm:

  5. getthresh
  6. INPUT:
    OUTPUT:
    RETURNS:
    Algorithm:

  7. open_images
  8. INPUT:
    OUTPUT:
    RETURNS:
    Algorithm:

  9. close_images
  10. INPUT:
    OUTPUT:
    RETURNS:
    Algorithm:

  11. process
  12. INPUT:
    OUTPUT:
    RETURNS:
    Algorithm:

  13. clavr
  14. INPUT: OUTPUT: RETURNS: Algorithm:

  15. chan3temp2alb (aka TMS)
  16. INPUT: OUTPUT: RETURNS: Algorithm:

  17. klm_chan3Btemp2alb
  18. INPUT: OUTPUT: RETURNS: Algorithm:

  19. getconstants
  20. INPUT: OUTPUT: RETURNS: Algorithm:



ACRONYMS


ADAPS AVHRR Data Acquisition and Production System
AVHRR Advanced Very High Resolution Radiometer
CLAVR Clear/Cloud Classification for AVHRR
KLM Not an acronym
LAS Land Analysis System
NOAA National and Oceanic Atmospheric Administration
TAE Transportable Applications Environment
TMS Triple Minus Split
   


Appendices

Appendix A - Modified CLAVR Algorithm



2001-05-17