FUNCTION qualify_fov(ifov) c============================================================================ c PROCEDURE NAME: _qualify_fov c PROCEDURE TYPE: _logical function c VERSION DATE: _98.5 c c PURPOSE: c Before any processing takes place and eats up cycles, we pre-qualify c the fov to make sure the flags are "desired" values. c c CALLING PARAMETERS: c Name Type i/o units Description c -------- ---- --- ----- -------------- c ifov i4 i Field of view number (data are in c the common blocks) c qualify_fov l o True/False return value c c EXTERNAL ROUTINES REQUIRED: c c NOTES & CAVEATS: c c REVISION HISTORY: c c============================================================================ IMPLICIT NONE c---------------------------------------------------------------------------- c Compile parameters c INCLUDE "ovpindex.prm" c---------------------------------------------------------------------------- c Calling parameters c LOGICAL qualify_fov INTEGER*4 ifov c---------------------------------------------------------------------------- c Common blocks c INCLUDE "ovpindex.cmn" INCLUDE "tomsframe.cmn" INCLUDE "instdata.cmn" c---------------------------------------------------------------------------- c Local variables c INTEGER*4 flag, adflg LOGICAL passed c c YOU CAN CONTROL THE BEHAVIOR OF THE ROUTINE BY SETTING THE DATA c INITIALIZATIONS IN THE FOLLOWING. c c List of possible values for errflg, and whether each value is allowed c or not. This has two parts: The 10s place indicates ascending or c descending. c c--- c Set the following to .TRUE. to allow both ascending and descending legs. c Set it to .FALSE. to allow only the sun-side leg. c LOGICAL allow_ad /.FALSE./ c--- c The next part is the 1s place of the error flag c LOGICAL allow_errflg(0:5) / & .TRUE., ! (0) good data & .TRUE., ! (1) good data, but high sza & .FALSE., ! (2) large pair residue & .FALSE., ! (3) large triplet residue & .FALSE., ! (4) High SOI & .FALSE. / ! (5) Fatal, abs of some residue is larger than 12.5 c============================================================================ passed= .TRUE. c--check for an allowed error flag. flag= errflg(ifov) adflg= flag/10 flag= flag - adflg*10 IF(adflg .GT. 1 .OR. flag .GT. 5) THEN passed=.FALSE. ELSE passed= (allow_ad .OR. & ((adflg .EQ. 1) .XOR. (i_useleg .EQ. 'A'))) .AND. & allow_errflg(flag) END IF c--check the solar zenith angle against value that had been read c from the input file. IF (sza(ifov) .GT. acceptsza) passed= .FALSE. c--check for a fill value for the ozone. IF (o3bst(ifov) .GT. 700.) passed= .FALSE. qualify_fov= passed RETURN END