Modified CLAVR-1 and CLAVR-x
Cloud Masking Algorithm for
AVHRR Single Scenes and Composites
Software Requirements Specification

Dave Lloyd
Development and Maintenance Directorate
Archive Software Department

May 6, 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 6, 2003 Document created
2 May 14, 2003 Corrections and additions from peer review
3 May 20, 2003  Added satellite number input parameter requirement. Added reference to channel 3b to albedo code. 
4 Jun 5, 2003 Updated requirements traceability matrix to reflect design and code elements. 
5    
6    


Contents

INTRODUCTION

There is a need to implement a better cloud screening algorithm for AVHRR data. Currently, statistical measures are determined from data deemed cloud free, when in fact they are not, resulting in statistics that skew end results. The current cloud screening technique involves a simple threshold which has a tendency to underclassify clouds. To overcome this drawback the threshold has been modified on a per composite basis. This modification is time consuming and not entirely accurate. After studying two existing algorithms, NOAA CLAVR and CCRS CECANT, the NOAA CLAVR algorithm was chosen for implementation to replace the current method used by Data Production.

The NOAA CLAVR algorithm uses a series of tests on 2x2 arrays of pixels. These tests use a variety of channel data including: albedo, temperature, viewing angle geometry and location. The process involves testing each pixel of the array and making a cloud/no cloud decision based on a vote. For example, the Reflectance Gross Cloud Test (RGCT) test compares a 4-pixel array of channel 1 values. If all four values are less than the RGCT threshold the test result is TRUE. However, if any value is greater than the threshold, the test result is FALSE. Some tests are TRUE if at least two pixels are above or below the threshold. There are also spatial tests that compare the maximum or minimum of the four values for the test. Because of the nature of our composites, CLAVR must be reduced to single pixel tests only. This is because adjoining pixels may have come from different scenes with differing viewing angles and illumination invalidating all spatial comparisons. During testing of the prototype, it was found that eliminating spatial tests that relied on minimum or maximum of four values and reducing the remaining tests to single pixel tests produced acceptable results.

The original CLAVR-1 algorithm was implemented for the first generation of NOAA AVHRR sensors, TIROS-N through NOAA-14. The second generation, or KLM series, satellites have slightly different spectral responses in channel 1 and 2, a new channel 3A and a channel 3B which is equivalent to channel 3 of pre-KLM satellites. Since five channels are still the limit, the data stream will either contain channel 3A or 3B so tests involving channel 3 need to be modified. An experimental algorithm, CLAVR-x, was used to determine channel 3 albedo thresholds for KLM series satellites.

Another problem that surfaced during the prototype investigation was the over classification of cloud in winter scenes. When cold bare ground was encountered the tests using channel 4 temperature were failing and classifying the cold ground as cloud. Empirical results showed that a channel 4 temperature of 273K was sufficient for scenes in December. This will be implemented as a optional change to the threshold and will be user supplied so that further study can be done.

Identification

This document identifies the software requirements 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 composites 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 software requirements, test cases and traceability matrix for the modified CLAVR algorithm.

REFERENCED DOCUMENTS

Applicable Documents

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 is 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/CLAVR1 directory

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


REQUIREMENTS

The following sections outline the requirements for modified CLAVR. The numbered sub-section headings are not specific requirements. The sections have been numbered to make it easier to identify the type of requirement. For example items beginning with 2 are interface output parameter requirements.

Interface Requirements

  1. Input Parameters
    1. Input image. Parameter name shall be IN and is the name of the AVHRR image that the cloud mask is to be generated for.
      1. Parameter shall be a string value.
      2. Image shall be a LAS image. Image ddr will be checked to insure that input is a LAS image.

    2. Scaling type. Parameter name shall be SCALING and is the type of scaling that has been applied to the input image. In most composite images the data has been shifted and scaled to BYTE data type to allow for mask values to be reserved and storage constraints. If data has been scaled it must be unscaled using ADAPS routines to return the scaled values to their original values.
      1. Parameter shall be a string value.
      2. Valid parameter values shall be: "NONE", "US" and "GLOBAL".

    3. Acquisition date. Parameter name shall be ACQDATE and is the acquisition date for single scene input images or the median acquisition date for composite images.
      1. Parameter shall be a three-value integer array.
      2. Value shall be entered as: month, day and 4-digit year.

    4. Threshold file. Parameter name shall be THRESHOLD and is the name of a file containing alternate threshold values for use in the CLAVR algorithm.
      1. Parameter shall be a string value.
      2. Parameter is an optional input.
      3. Default value is NULL.

    5. Barren mask file. Parameter name shall be BARREN and is the name of a file containing a barren mask. A barren mask is a LAS image that has a value of one for each pixel that is deemed barren.
      1. Parameter shall be a string value.
      2. Parameter is an optional input.
      3. Default value is NULL.
    6. Satellite number. Parameter name shall be SATNUM and is the satellite number of the input file.
      1. Parameter shall be an integer value.
      2. Valid parameter values shall be: 11, 12, 14, 15, 16 and 17.

  2. Output Parameters
    1. Output image. Parameter name shall be OUT and is the name of the output image. If output image is not specified the cloud mask will be added to the input image as the last band.
      1. Parameter shall be a string value.
      2. Parameter is an optional input.
      3. Default value is NULL.

  3. User Help Requirements
    1. Process pdf file shall contain Level 1 and Level 2 help for all parameters.
    2. Process pdf file shall contain a Description/Algorithm section.
    3. Process pdr file shall contain an Example section.
    4. Process pdf file shall contain a User Notes section. Within this section an example of a user supplied threshold file containing all valid test names shall be included.


Functional Requirements

  1. Input Image
  2. Two types of AVHRR input images will be allowed as input: single scene and composite. Although they cannot be confirmed, the input image is expected to have the following properties:

    1. Channel values will be calibrated using AVHRRCAL without illumination correction.
    2. Band 1 is AVHRR channel 1 reflectance.
    3. Band 2 is AVHRR channel 2 reflectance.
    4. For pre-KLM satellites band 3 is AVHRR channel 3 temperature.
    5. For KLM satellites band 3 is either AVHRR channel 3A reflectance or channel 3B temperature.
    6. Band 4 is AVHRR channel 4 temperature.
    7. Band 5 is AVHRR channel 5 temperature.
    8. For composite images band 7 is satellite zenith angle.
    9. For composite images band 8 is solar zenith angle.
    10. For composite images band 9 is relative azimuth angle.

    Following are the requirements that will be confirmed:

    1. The input image shall be considered a single scene if the following requirements are met:
      1. Single scene image will have an associated file, .addr extension, containing the AVHRR satellite model information. The existence of a valid addr file shall be checked to determine if input is a single scene image.
      2. Single scene image will have an associated file, .mnr extension, containing the AVHRR minor frame information. The minor frame file will be a LAS label services file. The existence of a valid minor frame file shall also be checked to determine if input is a single scene image.
      3. Single scene image will contain a total of 5 bands. The image ddr shall be checked for confirmation.

    2. The input image shall be considered a composite image if the following requirements are met:
      1. Composite image will contain 13 bands. The image ddr shall be checked for confirmation.
      2. Composite image will contain valid projection information. The image ddr shall be checked for confirmation.

    3. Input data may be unscaled or scaled. The input parameter Scaling type shall be checked to determine input scaling.
    4. Input data shall be unscaled, if necessary, using ADAPS routine c_getscale to retrieve the unscaling coefficients and the Macro UNSCALE to perform the unscaling.
    5. Input data may be of any valid LAS data type. The input image ddr shall be checked to determine data type. input is a LAS image.
    6. If input image type cannot be confirmed as single scene or composite a fatal error shall be issued and process terminated.

  3. Threshold file
  4. The threshold file is an input file containing CLAVR test names and threshold values associated with the test.

    1. Threshold file shall be an ASCII file.
    2. Each line of the Threshold file shall contain the CLAVR test name and threshold value separated by white space.
    3. CLAVR test names shall be case insensitive.
    4. CLAVR test name value pairs may be in any order.
    5. Duplicate CLAVR test name value pairs shall be allowed. The last pair encountered shall take precedence and a warning message issued.
    6. Valid CLAVR test names and example threshold values are:
      1. RGCT 44.0
      2. TGCR1 293.0
      3. C3AR 3.0
      4. C3AR_KLM 5.0
      5. Gamma 50.0
      6. RRCT_min 0.9
      7. RRCT_max 1.1
      8. TGCR2 293.0
      9. C3AT 6.0
      10. TGCT 249.0
      11. LAT_max 60.0
      12. LAT_min -60.0

    7. In the absence of a test name, the default value for that test shall be used.
    8. If an invalid test name is encountered, a fatal error shall be issued and the program terminated.
    9. If a test name is encountered without a threshold value, a fatal error shall be issued and the program terminated.
    10. If Threshold file parameter is specified the values it contains will be used in place of the default threshold values.
    11. Twelve default threshold files shall reside in the ADAPSTABLES directory.
      1. Default threshold files shall be named CLAVR_threshold_MM.dat, where MM is a 2-digit value indicating the month of year.
      2. Default threshold files shall contain all test name value pairs.


    12. If Threshold parameter is not specified, one of the ADAPSTABLES threshold files shall be used. The file shall be chosen based on the month from the Acquisition date parameter.

  5. Barren mask file
  6. The barren mask file is an input file containing a mask values of pixels deemed to be barren.

    1. Barren mask file shall be a LAS image file.
    2. Barren mask file shall be the same size and in the same projection as the input image. The ddr's for input image and barren mask image will be compared for confirmation. If ddr's are not the same, a fatal error message shall be issued and program terminated.
    3. Barren mask file is an optional input.
    4. Barren mask file shall contain the value 1 for barren pixels and 0 for non-barren pixels. If values outside the range are encountered, a fatal error message shall be issued and program terminated.
    5. If barren mask file is specified and input image is a single scene, a warning message shall be issued stating the barren mask file is ignored for single scene images and processing shall continue without using the barren mask.

  7. Output Image
  8. The output cloud mask will either be a separate image or a new band added to the input image. If the output file is specified another image will be created. If the output file is not specified the cloud code band will be added, as the last band, to the input image.

    1. If Output image parameter is specified:
      1. Output image shall be a LAS image.
      2. Output image data type shall be byte.
      3. Output image ddr shall have the same projection information as the input image.

    2. If Output image parameter is not specified:
      1. Output shall be added as the last band of the input image.
      2. Output data type shall be the same as input data type.

    3. Output image or band shall be the same size, number of lines and samples, as the input image.
    4. Output image or band shall contain the cloud codes from the CLAVR algorithm as indicated in section 8.8 and App. A.

  9. Modified CLAVR
  10. These are the requirements for the modified CLAVR algorithm. Inputs to the algorithm are:

    1. Latitude and longitude for each pixel shall be determined.
      1. For single scene input image the AVHRR model and c_ls2ll routine shall be used.
      2. For composite input image the LAS routine c_trans shall be used.

    2. Viewing angles for each pixel shall be determined. The viewing angles are solar zenith, satellite zenith and relative azimuth.
      1. Viewing angles units shall be degrees.
      2. For single scene input image, the AVHRR model and c_ls2ll routine shall be used. The c_ls2ll routine has an optional parameter that can be used to return the viewing angles.
      3. For composite input image, bands 7 (satellite zenith) , 8 (solar zenith) and 9 (relative azimuth) shall be used.

    3. Gamma angle for each pixel shall be computed in degrees as:

      gamma = acos[ cos(solz)cos(satz) + sin(solz)sin(satz)cos(relaz)]

      where:

      solz is solar zenith angle
      satz is satellite zenith angle
      relaz is relative azimuth angle

    4. If input image is pre-KLM, channel 3 albedo for each pixel shall be determined using the Triple Minus Split (TMS) algorithm. The TMS reference code is located in CLAVR-1 source file tms3.f and constants file inc/inclav.f.
    5. If input image is KLM, for each pixel containing channel 3B temperature, a reflectance value shall be computed using temperature to radiance conversion and radiance to reflectance formulas contained in Section 7.1.2.4 of NOAA KLM User's Guide and algorithm contained in CLAVR-x source file avhrr_mod.f90 function CH3B_ALB.
    6. For each reflectance value from channels 1, 2 and 3A, an illumination correction shall be applied using:

      albedo = reflectance * cos(solz) / ausq

      where:

      solz is solar zenith angle
      ausq is the mean sun/earth distance in AU's squared

    7. For each input pixel a cloud code shall be determined. The diagram in Attachment A shall be used for determining cloud codes.
    8. A unique cloud code shall be assigned for each path through the algorithm.
      1. Clear and restored clear values shall be in the range [1...99].
      2. Cloudy values shall be in the range [100...250].

    9. The Four-Minus-Five Test (FMFT) shall be compared to the pre-defined function f(T4). The function is defined in CLAVR-1 file inc/bclav.f from 200-320K and is listed in the following table:

          C...FMFT THRESHOLD LOOK UP TABLES (200-320K) FOR LAND AND OCEAN
          C
          DATA FMFLND/ 0.00,
          201 1    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
          211 2    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
          221 3    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
          231 4    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
          241 5    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
          251 6    0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
          261 7    0.01, 0.03, 0.05, 0.08, 0.11, 0.14, 0.18, 0.23, 0.28, 0.34,
          271 8    0.41, 0.48, 0.57, 0.66, 0.76, 0.87, 1.00, 1.13, 1.27, 1.42,
          281 9    1.59, 1.76, 1.94, 2.14, 2.34, 2.55, 2.77, 3.00, 3.24, 3.48,
          291 A    3.73, 3.99, 4.26, 4.52, 4.80, 5.08, 5.35, 5.64, 5.92, 6.20,
          301 B    6.48, 6.76, 7.03, 7.30, 7.80, 7.80, 7.80, 7.80, 7.80, 7.80,
          311 C    7.80, 7.80, 7.80, 7.80, 7.80, 7.80, 7.80, 7.80, 7.80, 7.80/
      
      Example of usage: channel 4 temperature T4 = 291K, f(T4) = 3.73
    10. In the modified CLAVR algorithm the boolean value Desert is used in a decision box. The value of Desert shall be determined based on latitude and longitude of the pixel.
      1. Desert shall be TRUE within the area 10-35 degrees North, 20-30 degrees East.
      2. Desert shall be TRUE within the area 5-50 degrees North, 30-60 degrees East.
      3. Desert shall be TRUE within the area 25-50 degrees North, 60-110 degrees East.
      4. Desert shall be TRUE within the area 19-31 degrees South, 121-141 degrees East.
      5. Desert shall be FALSE outside of the areas listed above.

Performance Requirements


Operational Requirements

  1. Process execution
    1. Execution of the process shall be from a TAE session.


Other Requirements

NOTES

ACRONYMS




ADAPS AVHRR Data Acquisition and Production System
ASCII American Standard Coded Information Interchange
AVHRR Advanced Very High Resolution Radiometer
CCRS Canada Centre for Remote Sensing
CECANT Cloud Elimination from Composites using Albedo and NDVI Trend
CLAVR Clear/Cloud Classification for AVHRR
KLM Not an acronym
LAS Land Analysis System
NDVI Normalized Difference Vegetation Index
NOAA National and Oceanic Atmospheric Administration
TAE Transportable Applications Environment
TIROS Television InfraRed Observation Satellite
TMS Triple Minus Split
   



TEST CASES

For testing purposes there are four input scenes and their cloud code output files. These scenes are located in the modules TEST directory. They consist of a pre-KLM single scene, ah140615961911, a KLM single scene, ah16121202200443, a pre-KLM summer composite for June 1996, and a pre-KLM winter composite for December 1998. Also contained within the directory are a barren mask, test threshold files, output cloud code files and others.
Test Number Requirement Numbers  Description
1a 1.1, 1.1.1, 1.4.1, 1.4.3, 1.5, 1.5.1, 1.5.3, 2.1, 2.1.1, 2.1.3, 9.1  In a TAE session create a local string variable and assign a string value. Tutor process with IN=@string_variable. Process should start up in tutor mode with variable assigned to the IN parameter. Exit the tutor session and create a local integer value and assign a value. Tutor process with IN=@integer_variable. A TAE-BADTYPE error should be returned. Repeat the steps for parameters THRESHOLD, BARREN and OUT 
1b 1.2, 1.2.1, 1.2.2 In a TAE session create a local string and assign value "NONE". Tutor process with SCALE=@string_variable. Process should start in tutor mode with variable assigned to SCALE. Repeat test with variable values of "US" and "GLOBAL", variable assignment should be accepted. Assign some random value to string_variable and tutor process. A TAE-INVSTR should be returned. Create a local integer variable and assign a value. Tutor process with SCALE=@integer_variable. A TAE-BADTYPE error should be returned. 
1c 1.3, 1.3.1, 1.3.2 In a TAE session create a three-value integer variable and assign it a valid date as (month day 4-digit_year). Tutor process with ACQDATE=@integer_array_variable. Process should start in tutor mode with values assigned to ACQDATE. Exit and assign a 2-digit year. Tutor process again and a TAE-RANGE error should be returned. Repeat test using invalid month values of 0 and 13, invalid day values of 0 and 32 (Note: each test should only have one invalid value at a time. Also invalid dates such as (2 30 2004) or (2 29 2003) cannot be tested at this level.) Create a local string variable and assign a value. Tutor process with ACQDATE=@string_variable. A TAE-BADTYPE error should be returned. 
1d 1.4, 1.4.2, 1.5.2, 2.1, 2.1.2 In a TAE session tutor process with THRESHOLD=-- BARREN=-- and OUT=--. Process should start in tutor mode with all three parameters containing null values. 
1e 1.6, 1.6.1, 1.6.2 In a TAE session tutor process with SATNUM=9. A TAE-RANGE error should be returned.
3a 3.1, 3.2, 3.3, 3.4 In a TAE session tutor process. Check that there is level 1 help for all input parameters. Type 'help IN' and check that there is level 2 help for the IN parameter. Repeat for all other parameters. Type 'help *' and insure that there are Description/Algorithm, Examples and User Notes sections.
4a 4.1, 4.1.1, 4.1.2, 4.1.3, 4.2.2 Copy one of the single scene test cases to a test directory and remove the addr file. Run process. A fatal error message stating invalid projection parameters in ddr should be issued. (Since addr is missing input is assumed to be a composite). Replace the addr and remove the mnr file. Run process. A fatal error message stating the minor frame file is missing should be issued. Replace the ddr file and edit the ddr by changing number of bands to 3. Run process. A fatal error stating number of bands for single scene must be 5. 
4b 1.1.2, 4.2, 4.2.1, 4.6 Copy one of the composite test cases to a test directory and remove the ddr. Run process. A fatal error message stating input image must be a LAS image should be issued. Replace ddr and edit the ddr by changing the number of bands to 14. Run process. A fatal error message stating a composite must have 13 bands. 
4c 4.3, 4.4 Copy one of the single scenes arch, ahdr and cal.par files to a test directory. Run AVHRRCAL using the par file and specifying SCALOPT="NONE". Run process using AVHRRCAL output file as the input with SCALE="NONE", correct acquisition date and specify an output file. Compare output .img file with cloud code .img file in the test directory. Files should match exactly. Repeat with AVHRRCAL SCALOPT values of "US" and "GLOBAL". In each case the output should match the test directory file exactly.
4d 4.5 Copy one of the single scenes arch, ahdr and cal.par files to a test directory. Run AVHRRCAL using the par file and specifying ODTYPE as byte and SCALOPT="NONE". Run process using AVHRRCAL output file as the input with SCALE="NONE", correct acquisition date and specify and output file. Compare output .img file with cloud code .img file in the test directory. Files should match exactly. Repeat with AVHRRCAL ODTYPEs of I*2, I*4 and R*4. In each case the output should match the test directory file exactly.
5a 5.1, 5.3, 5.7 Create a threshold file containing the single line "Rgct 44.0". Copy one of the test images to a test directory and run process specifying the newly created threshold file. Run process and compare output with test case output. Files should be exact.  
5b 5.5 Create a threshold file containing two lines "RGCT 1.0" and "RGCT 44.0". Run process as in test 5a. Output files should be exact. 
5c 5.2, 5.8, 5.10 Create a threshold file containing the single line "RRRR 1.0". Run process as in test 5a. A fatal error message stating invalid threshold name in threshold file should be issued. Repeat with threshold file containing the single line "LAT_min-60.0". The same fatal error message should be issued. 
5d 5.4, 5.6, 5.6.1, 5.6.2, 5.6.3, 5.6.4, 5.6.5, 5.6.6, 5.6.7, 5.6.8, 5.6.9, 5.6.10, 5.6.11, 5.6.12, Create a threshold file containing the 12 test name value pairs listed in requirements 5.6.1 through 5.6.12. Run process as in test 5a. Output files should be exact. Sort the threshold file is some other order and repeat test. Output files should be exact.
5e 5.9 Create a threshold file containing the single line "C3AT". Run process as in test 5a. A fatal error message stating value for C3AT test is missing. 
5f 5.11, 5.11.1, 5.11.2, 5.12 Check that the 12 files CLAVR_threshold_01.dat through CLAVR_threshold_12.dat exist in ADAPSTABLES. Edit the CLAVR_threshold_06.dat file and remove the TGCT line. Copy the June 1996 single scene to a test directory and run process without specifying a threshold file. A fatal error stating test TGCT missing from ADAPSTABLES/CLAVR_threshold_06.dat should be issued. Remove the CLAVR_threshold_06.dat file and rerun test. A fatal error message stating ADAPSTABLES/CLAVR_threshold_06.dat is missing should be issued. 
6a 6.1, 6.5 Copy a single scene to a test directory and the barren mask. Remove the barren mask ddr and run process. A fatal error message stating barren mask file is not a LAS image should be issued. Replace the ddr and run the test again. A warning message stating barren mask cannot be used with a single scene input should be issued and process should run to completion. 
6b 6.2 Copy a composite scene to a test directory and the barren mask. Edit the barren mask ddr by changing the number of lines or number of samples to some other value. Run process. A fatal error stating barren mask must be same size as input image should be issued. Restore the original barren mask ddr and edit it by changing one of the projection parameters. Run process. A fatal error stating the barren mask projection must be the same as input should be issued. 
6c 6.3, 6.4 Copy a composite scene to a test directory and the barren mask. Map the mask values (the ones) in the barren mask to some value other than zero. Run process without specifying any barren mask. Process should run and output cloud code file will not match the test barren output file. Rerun the test specifying the mapped barren mask. A fatal error stating values out of range encountered in barren mask should be issued. 
7a 7.1, 7.1.1, 7.1.2, 7.1.3, 7.3 Copy a single scene and a composite scene to a test directory. Run process with each input image specifying output images. Inspect each input and output ddr. Ouput ddr must be a LAS image of BYTE data type and projection information must be the same as the input image. Output ddr must have the same number of lines and samples as input image ddr.  
7b 7.2, 7.2.1, 7.2.2, 7.4 Copy a single scene and a composite scene to a test directory. Run process without specifying an output image. Inspect the input image ddr's. Both image will contain an additional band, six for single scene and 14 for composite. Perform a PIXCOUNT on band six of single scene and band 14 of composite. Values must be in the set of values contained in the Clear Pixel and Cloud Pixel hexagonal boxes in App. A - Modified CLAVR Algorithm 
8a 8.1, 8.1.1, 8.2, 8.2.1, 8.2.2, 8.3, 8.4, 8.6 Copy a pre-KLM single scene to a test directory. Run process. Compare output with test output. Files should be the same. 
8b 8.1.2, 8.2.3, 8.5
8.7, 8.8, 8.8.1, 8.8.2, 8.9, 8.10, 8.10.1, 8.10.2, 8.10.3, 8.10.4, 8.10.5
Copy a KLM composite image to a test directory. Run process. Compare output with test output. Files should be the same. 
     
     
     
     
 

REQUIREMENTS TRACEABILITY

Requirement Number Test Number Design Code
1.1 1a  1.1  clavr.pdf 
1.1.1 1a 1.1  clavr.pdf 
1.1.2 4b getpar.c 
1.2 1b  1.3  clavr.pdf 
1.2.1 1b 1.3  clavr.pdf 
1.2.2 1b 1.3  clavr.pdf 
1.3  1c  1.4  clavr.pdf 
1.3.1 1c 1.4  clavr.pdf 
1.3.2 1c getpar.c 
1.4  1d  1.5  clavr.pdf 
1.4.1 1a 1.5  clavr.pdf 
1.4.2 1d 1.5, 5  clavr.pdf, getpar.c 
1.4.3  1a  1.5  clavr.pdf 
1.5  1a  1.6  clavr.pdf 
1.5.1 1a 1.6  clavr.pdf 
1.5.2 1d 1.6, 5  clavr.pdf, getpar.c 
1.5.3  1a  1.6  clavr.pdf 
1.6  1e  1.2  clavr.pdf 
1.6.1  1e  1.2  clavr.pdf 
1.6.2  1e  1.2, 5, 13  clavr.pdf, getpar.c, getconstants.c 
1.7  1a  2.1, 4  clavr.pdf, combine_images.c 
1.7.1  1a  2.1  clavr.pdf 
1.7.2  1a  2.1, 5  clavr.pdf, getpar.c 
1.7.3  1a  2.1  clavr.pdf 
2.1  1a  2.1, 4  clavr.pdf, combine_images.c 
2.1.1 1a 2.1  clavr.pdf 
2.1.2 1d 2.1, 5  clavr.pdf, getpar.c 
2.1.3  1a  2.1  clavr.pdf 
3.1  3a  3.1, 3.2  clavr.pdf 
3.2  3a  3.3  clavr.pdf 
3.3  3a  3.4  clavr.pdf 
3.4  3a  3.5  clavr.pdf 
4.1  4a  getpar.c 
4.1.1 4a getpar.c 
4.1.2 4a getpar.c 
4.1.3 4a getpar.c 
4.2  4b  getpar.c 
4.2.1 4b getpar.c 
4.2.2 4a getpar.c 
4.3 4c 5, 9  getpar.c, process.c 
4.4 4c getpar.c 
4.5 4d getpar.c 
5.1 5a getthresh.c 
5.2 5c getthresh.c 
5.3 5a getthresh.c 
5.4 5d getthresh.c 
5.5 5b getthresh.c 
5.6  5d  getthresh.c 
5.6.1 5d getthresh.c 
5.6.2 5d getthresh.c 
5.6.3 5d getthresh.c 
5.6.4 5d getthresh.c 
5.6.5 5d getthresh.c 
5.6.6 5d getthresh.c 
5.6.7 5d getthresh.c 
5.6.8 5d getthresh.c 
5.6.9 5d getthresh.c 
5.6.10 5d getthresh.c 
5.6.11 5d getthresh.c 
5.6.12 5d getthresh.c 
5.7 5a getthresh.c 
5.8 5c getthresh.c 
5.9 5e getthresh.c 
5.10 5c getthresh.c 
5.11  5f  getthresh.c 
5.11.1 5f getthresh.c 
5.11.2 5f getthresh.c 
5.12 5f getthresh.c 
6.1 6a getpar.c 
6.2 6b getpar.c 
6.3 6c 1.6  clavr.pdf 
6.4 6c getpar.c 
6.5 6a getpar.c 
7.1  7a  5, 7  getpar.c, open_images.c 
7.1.1 7a open_images.c 
7.1.2 7a open_images.c 
7.1.3 7a open_images.c 
7.2  7b  5, 4  getpar.c, clavr.c, combine_images.c 
7.2.1 7b combine_images.c 
7.2.2 7b open_images.c 
7.3 7a open_images.c 
7.4 7b 10  clavr_code.c 
8.1  8a  process.c 
8.1.1 8a process.c 
8.1.2 8b process.c 
8.2  8a  process.c 
8.2.1 8a process.c 
8.2.2 8a process.c   
8.2.3 8b process.c 
8.3 8a process.c 
8.4 8a 9, 11  process.c, chan3temp2alb.c 
8.5 8b 9, 12  process.c, klm_chan3temp2alb.c 
8.6 8a process.c 
8.7 8b 9, 10  process.c, clavr_code.c 
8.8  8b  10  clavr_code.c 
8.8.1 8b 10  clavr_code.c 
8.8.2 8b 10  clavr_code.c 
8.9  8b  10  clavr_code.c 
8.10  8b  10  clavr_code.c 
8.10.1  8b  10  clavr_code.c 
8.10.2  8b  10  clavr_code.c 
8.10.3  8b  10  clavr_code.c 
8.10.4  8b  10  clavr_code.c 
8.10.5  8b  10  clavr_code.c 
9.1 1a 1, 2, 3, 4  clavr.pdf, clavr.c 
       
       

Appendix A

Modified CLAVR Algorithm



2001-05-17