      SUBROUTINE INIMON
C***********************************************************************
C
C   NAME- INIMON
C
C   LANGUAGE- FORTRAN 77     TYPE- SUBROUTINE      COMPUTER- CRAY   
C
C   VERSION- 1.0    DATE- 03/25/93    PROGRAMMER- CARLA NEIGH (SMSRC)
C   VERSION- 2.0    DATE- 05/17/95    PROGRAMMER- ALEX POZDNYAK (SMSRC)
C      ATOVS-113:   CHANGE TO INITIALIZE ALL VALUES IN THE UPDATED
C                   /MONSTA/ COMMON BLOCK.
C   VERSION- 2.1    DATE- 07/21/95    PROGRAMMER- ALEX POZDNYAK (SMSRC)
C      ATOVS-134:   ADDED VARIABLES TOTCNT AND FAILCT FOR STABILITY
C                   DEPARTURE STATISTICS.
C   VERSION- 2.2    DATE- 11/09/95    PROGRAMMER- CARLA NEIGH (SMSRC)
C      ATOVS-243:   ADDED INITIALIZATION OF VARIABLES HFOVPR, AFOVPR,
C                   BFOVPR, HFOVNP, AFOVNP, BFOVNP, LNDRET, SEARET,
C                   CSTRET, ICERET, SNORET, HCNFRG, ACNFRG, BCNFRG,
C                   HDGDWL, ADGDWL, BDGDWL, BTPRET, HNERVW, HFLQCK,
C                   AFLQCK, BFLQCK, HPDFIL, APDFIL, BPDFIL, NCTDON,
C                   AND NCTFAL.
C   VERSION- 3.0    DATE- 04/22/96    PROGRAMMER- ALEX POZDNYAK (FDC)  
C      MODIFIED TO RUN ON THE CRAY.  REPLACED I*4 WITH INT.
C   VERSION- 3.1    DATE- 03/26/98    PROGRAMMER- LEAH WILSON (RAYTHEON
C                                                 STX)
C      ADD GACDO_NOT,GACTIMER,GACCALER.
C   VERSION- 3.2    DATE- 04/20/98    PROGRAMMER- LEAH WILSON (RAYTHEON
C                                                 STX)
C      ADD BINRET0, RETRETSPT, LBRETSPT, LBRETPTH, LBRETNO, RETRETNEG.
C   VERSION- 3.3    DATE- 06/26/98    PROGRAMMER- LEAH WILSON (RSTX)   
C      ADD NBBHIR AND NBBAMA.
C   VERSION- 3.4    DATE- 10/12/99    PROGRAMMER- LEAH WILSON (RAYTHEON)
C      ADD BINRET00,RETRETSP00,LBRETSPT0,LBRETPTH0,LBRETNO0,RETRETNG0.
C
C
C   FUNCTION- THIS SUBROUTINE INITIALIZES THE CONTENTS OF THE COMMON
C             BLOCK /MONSTA/.
C
C   COMMON AREA PARAMETERS- MONSTA
C
C   LOCAL PARAMETERS-
C   NAME    TYPE   DESCRIPTION
C   ----    ----   -----------
C   I,J     INT    DO LOOP COUNTERS.
C
C   EXIT STATES- NONE
C***********************************************************************
C
      INTEGER   I, J
C
      INCLUDE'MONSTA'
C
C  INITIALIZE...
C  THE DATA SET START TIME,
C
      BEGTIM = 0
C
C  THE DATA SET END DATE,
C
      ENDATE = 0
C
C  THE SYSTEM TIME WHEN ORBITAL PROCESSING ENDED,
C
      LASTIM = 0
C
C  THE NUMBER OF RETRIEVALS THAT WERE RAIN CONTAMINATED,
C
      RCTAIM = 0
C
C  THE SYSTEM DATE WHEN ORBITAL PROCESSING BEGAN,
C
      STRDAY = 0
C
C  THE TOTAL NUMBER OF SUPERADIABATIC RETRIEVALS PER ORBIT,
C
      TOTSUA = 0
C
C  THE TOTAL NUMBER OF AMSU-A SCAN LINES PROCESSED,
C
      TOTALN = 0
C
C  THE TOTAL NUMBER OF AMSU-B SCAN LINES PROCESSED,
C
      TOTBLN = 0
C
C  THE TOTAL NUMBER OF HIRS SCAN LINES PROCESSED,
C
      TOTHLN = 0
C
C  THE TOTAL NUMBER OF CLOUDY SPOTS PER ORBIT,
C
      TOTCLD = 0
C
C  THE TOTAL NUMBER OF CLEAR SPOTS PER ORBIT,
C
      TOTCLR = 0
C
C  THE TOTAL NUMBER OF CLOUD-CLEARED SPOTS PER ORBIT,
C
      TOTNS  = 0
C
C  THE TOTAL NUMBER OF SPOTS FOR THE ORBIT THAT DID NOT HAVE ANY
C  CLOUD TESTS PERFORMED,
C
      TOTNOT = 0
C
C  THE TOTAL NUMBER OF CLOUDY RETRIEVALS MADE,
C
      TRCLDY = 0
C
C  THE TOTAL NUMBER OF CLEAR RETRIEVALS MADE,
C
      TRCLER = 0
C
C  THE NUMBER OF N* RETRIEVALS MADE,
C
      TRNSTR = 0
C
C  SET THE TOTAL NUMBER OF REDUNDANT RETRIEVALS TO ZERO.
C
      TRRET = 0
C
C  SET THE TOTAL NUMBER OF RETRIEVALS PER ORBIT TO ZERO.
C
      TFRRET = 0
C
C  SET THE TOTAL NUMBER OF GOOD RETRIEVALS TO ZERO.
C
      TGRET = 0
C
C  SET THE NUMBER OF QUESTIONABLE RETRIEVALS TO ZERO.
C
      TQRET = 0
C
C  SET THE TOTAL NUMBER OF BAD RETRIEVALS TO ZERO.
C
      TBRET = 0
C
C  SET INSTRUMENT CONFIGURATION FLAG TO ZERO.
C
      INSCFG = 0
C
C  THE TOTAL NUMBER OF OF HIRS RETRIEVALS.
C
      TRNOHR = 0
C
C  TOTAL NUMBER OF SPOTS FOR WHICH THE STABILITY DEPARTURE CALCULATIONS
C  WERE ATTEMPTED.
C
      TOTCNT = 0
C
C  LOOP THRU TWENTY-EIGHT FRAMES AND PERFORM THE FOLLOWING...
C
      DO 30 I = 1, 28
C
C     INITIALIZE THE FRAME PROCESSED FLAG TO FALSE (SIGNIFIES NOT
C     PREVIOUSLY PROCESSED).
C
         FPROC(I) = .FALSE.
C
C     INITIALIZE TO INTEGER ZERO THE FOLLOWING FIELDS:
C     THE NUMBER OF RETRIEVALS PER FRAME,
C
         NFRRET(I) = 0
C
C     THE NUMBER OF CYCLES PER FRAME,
C
         NFRCYC(I) = 0
C
C     THE NUMBER OF SUPERADIABATIC PER FRAME,
C
         SUPADI(I) = 0
C
C     THE NUMBER OF RETRIEVALS REJECTED PER FRAME,
C
         TOTFRR(I) = 0
C
C     THE NUMBER CLOUDY SPOTS PER FRAME,
C
         NMCLDY(I) = 0
C
C     THE NUMBER OF CLEAR SPOTS PER FRAME,
C
         NUMCLR(I) = 0
C
C     THE NUMBER OF SUCCESSFULLY CLOUD-CLEARED SPOTS PER DATA FRAME,
C
         NUMNS(I)  = 0
C
C     THE NUMBER OF SPOTS PER DATA FRAME THAT DID NOT HAVE ANY CLOUD
C     TESTS,
C
         NOTEST(I) = 0
C
C     IF THE INDEX IS LESS THEN TWO THEN, INITALIZE THE ORBIT START
C     TIME AND THE ORBIT END TIME.
C
         IF (I .LE. 2) THEN
              ORBSTM(I) = 0
              ORBETM(I) = 0
         ENDIF
C
C     IF THE INDEX IS LESS THEN THREE THEN, INITIALIZE THE COUNT OF
C     THE FRAMES WHICH DO NOT MEET THE GOOD LINE LIMIT PER
C     INSTRUMENT (HIRS, AMSU-A, AND AMSU-B).
C
         IF (I .LE. 3) ADJSCT(I) = 0
C
C     INITIALIZE THE FRAME COUNTERS FOR RODF RECORDS WITH NO RETRIEVAL INFORMATION
C 
        BINRET00(I) = 0
        RETRETSP00(I) = 0
        LBRETSPT0(I) = 0
        LBRETPTH0(I) = 0
        LBRETNO0(I) = 0
        RETRETNG0(I) = 0
C
C     INITIALIZE THE LATITUDE VERTICES AND THE LONGITUDE VERTICES.
C
         DO 10 J = 1, 4
            LATVER(J,I) = 0
            LONVER(J,I) = 0
   10    CONTINUE
C
         DO 20 J = 1, 20
C
C         INITIALIZE THE COUNTER FOR FOR THE NUMBER OF BAD RADIANCES
C         FOUND IN EACH HIRS CHANNEL.
C
            NBRHIR(I,J) = 0
            NBBHIR(I,J) = 0
C
C         INITIALIZE THE COUNTER FOR FOR THE NUMBER OF BAD RADIANCES
C         FOUND IN EACH AMSU-A CHANNEL.
C
            IF (J.LE.15) NBRAMA(I,J) = 0
            IF (J.LE.15) NBBAMA(I,J) = 0
C
C         INITIALIZE THE COUNTER FOR FOR THE NUMBER OF BAD RADIANCES
C         FOUND IN EACH AMSU-B CHANNEL.
C
            IF (J.LE.5) NBRAMB(I,J) = 0
C
   20    CONTINUE
   30 CONTINUE
C
C  THE STABILITY DEPARTURE TEST FAILURE COUNTS AND THE NUMBER OF GAC
C  FOVS THAT EXCEEDED THE GROSS LIMITS CHECK IN FLLBUF.
C
      DO 40 I = 1, 5
         FAILCT(I) = 0
         NBRAMG(I) = 0
   40 CONTINUE
      NBRAMG(6) = 0
C
C   INITIALIZE NUMBER OF HIRS, AMSU-A AND AMSU-B FOVS PROCESSED TO
C   ZERO.
C
      HFOVPR = 0
      AFOVPR = 0
      BFOVPR = 0
C
C   INITIALIZE NUMBER OF HIRS, AMSU-A AND AMSU-B FOVS NOT PROCESSED
C   TO ZERO.  
C
      HFOVNP = 0
      AFOVNP = 0
      BFOVNP = 0
C 
C   INTIALIZE NUMBER OF LAND, SEA, COAST, ICE AND SNOW RETRIEVALS
C   TO ZERO.
C
      LNDRET = 0
      SEARET = 0
      CSTRET = 0
      ICERET = 0
      SNORET = 0
C
C   INITIALIZE HIRS, AMSU-A AND AMSU-B FOV CONFIDENCE PERCENTAGE
C   BREAKDOWNS TO ZERO.
C
      DO 50 I = 1, 4
        HCNFRG(I) = 0
        ACNFRG(I) = 0
        BCNFRG(I) = 0
   50 CONTINUE 
C 
C   INITIALIZE NUMBER OF HIRS, AMSU-A AND AMSU-B LINES WITH DATA
C   GAP DUE TO DWELL TO ZERO.
C
      HDGDWL = 0
      ADGDWL = 0
      BDGDWL = 0
C
C   INITIALIZE NUMBER OF RETRIEVALS WITH BAD TEMPERATURE VALUES
C   FOR EACH CLASS AND PATH TO ZERO.
C
      DO 70 J = 1, 23
         DO 60 I = 1, 3
            BTPRET(I,J) = 0
   60    CONTINUE
   70 CONTINUE
C   
C   INITIALIZE NUMBER OF HIRS SCAN LINES THAT ARE NON-EARTH-VIEW
C   TO ZERO.
C
      HNERVW = 0
C
C   INITIALIZE NUMBER OF HIRS, AMSU-A AND AMSU-B SCAN LINES THAT
C   FAILED QUALITY CHECKS TO ZERO.
C
      HFLQCK = 0
      AFLQCK = 0
      BFLQCK = 0 
C
C   INITIALIZE NUMBER OF HIRS, AMSU-A AND AMSU-B SCAN LINES WITH
C   PARTIAL DATA FILL TO ZERO.
C
      HPDFIL = 0
      APDFIL = 0
      BPDFIL = 0
C
C   INITIALIZE ARRAY OF NUMBER OF HIRS FOVS THAT EACH CLOUD TEST WAS 
C   PERFORMED ON AND ARRAY OF HIRS FOVS THAT EACH CLOUD TEST
C   FAILED.      
C
      DO 80 I = 1, 20
         NCTDON = 0
         NCTFAL = 0
   80 CONTINUE
C  
C    INITIALIZE VARIABLES RELATING TO 3 FLAGS EXTRACTED FROM A 
C    GAC 1B* RECORD IN SUBROUTINE INPCTL AND FROM THE SCAN_TYPE
C    CHECKED IN SUBROUTINE INHIRS.
C
      GACDO_NOT = 0
      GACTIMER = 0
      GACCALER = 0
C
C    INITIALIZE NUMBER OF RETRIEVALS WHOSE RETRIEVAL FLAG (RETANC(X,Y,5)
C    WAS SET TO 0 BECAUSE BINDVR THOUGHT THEY WERE NO-HIRS.
C
      BINRET0 = 0 
C
C    INITIALIZE NUMBER OF RETRIEVALS WHOSE RETRIEVAL FLAG WAS SET TO 0
C    BECAUSE RETDVR FLAGGED A MISSING FORECAST SUFRACE POTENTIAL TEMP.
C    FOR A CLOUDY.
C
      RETRETSPT = 0
C
C    INITIALIZE NUMBER OF RETRIEVALS WHOSE RETRIEVAL FLAG WAS SET TO 0
C    BECAUSE LBSRCH FLAGGED A MISSING FORECAST SUFRACE POTENTIAL TEMP.
C    FOR A CLOUDY.
C
      LBRETSPT = 0
C 
C    INITIALIZE NUMBER OF RETRIEVALS WHOSE RETRIEVAL FLAG WAS SET TO 0
C    BECAUSE LBSRCH FLAGGED IT AS NO-HIRS.
C
      LBRETPTH = 0
C 
C    INITIALIZE NUMBER OF RETRIEVALS WHOSE RETRIEVAL FLAG WAS SET TO 0
C    BECAUSE LBSRCH FOUND NO FIRST GUESS.
C
      LBRETNO = 0
C 
C    INITIALIZE NUMBER OF RETRIEVALS WHOSE RETRIEVAL FLAG WAS SET TO 0
C    BECAUSE RETDVR FOUND NEGATIVE RETRIEVAL TEMPERATURES.
C
      RETRETNEG = 0
C
      RETURN
      END
