          INTEGER FUNCTION SEASON(REPDAT)
C
C**********************************************************************
C
C   NAME- SEASON
C
C   LANGUAGE- FORTRAN 77     TYPE- FUNCTION        COMPUTER- CRAY    
C
C   VERSION- 1.0    DATE- 12/09/88   PROGRAMMER- BHASKAR U. GANTI
C   VERSION- 3.0    DATE- 05/14/96   PROGRAMMER- ALEX POZDNYAK, FDC
C      FOR REHOSTING TO THE CRAY, CHANGED I*2 DECLARATION TO
C      INTEGER.
C 
C   FUNCTION-
C     THIS FUNCTION ACCEPTS REPORT_DATE AND DECIDES THE SEASON TYPE
C     IN WHICH IT FALLS AND RETURNS THE SEASON TYPE NUMBER. THERE
C     ARE FOUR SEASON TYPES. EACH SEASON TYPE IS DESIRED AS
C     A GROUP OF MONTHS. THESE SEASON TYPES ARE:
C
C     SEASON       MONTH NAMES    MONTH NUMBERS        SEASON TYPE
C
C     WINTER     DEC, JAN, FEB      12, 01, 02             1
C     SPRING     MAR, APR, MAY      03, 04, 05             2
C     SUMMER     JUN, JUL, AUG      06, 07, 08             3
C     AUTUMN     SEP, OCT, NOV      09, 10, 11             4
C
C   CALLING SEQUENCE PARAMETERS-
C     VARIABLE           TYPE  I/O    FUNCTION
C     --------           ----  ---    --------
C     REPDAT            CH*6    I     STRING CONTAINING THE DATE
C                                     AS YYMMDD
C
      CHARACTER*6 REPDAT
C
C   LOCAL AREA PARAMETERS-
C     VARIABLE           TYPE          FUNCTION
C     --------           ----          --------
C     CMONTH             CH*2          MONTH RETRIEVED FROM DATE
C     MONTH              INT           MONTH CONVERTED TO INTGER
C
      CHARACTER*2 CMONTH
      INTEGER     MONTH
C
C   SUBPROGRAMS CALLED: NONE
C
C******************************************************************
C
C***   EXTRACT THE MONTH FROM THE REPORT_DATE
C
       CMONTH = REPDAT(3:4)
C
C***   CONVERTING MONTH(CHARACTER) TO INTEGER VALUE
C
       READ(CMONTH,'(I2)')MONTH
C
C***   IF MONTH IS NOT IN BETWEEN 01 AND 12, THEN SET THE SEASON
C***   VALUE AS ZERO.
C
       IF ((MONTH .LT. 01) .OR. (MONTH .GT. 12)) THEN
          SEASON = 0
          RETURN
       ENDIF
C
C***     DECIDE WHICH SEASON TYPE THE MONTH FALLS IN
C
C*** SEASON 1:
C
       IF ((MONTH .EQ. 12) .OR. (MONTH.EQ.1) .OR. (MONTH .EQ.2)) THEN
               SEASON = 1
C
C*** SEASON 2:
C
       ELSEIF ((MONTH.EQ.3).OR.(MONTH.EQ.4).OR.(MONTH.EQ.5)) THEN
               SEASON = 2
C
C*** SEASON 3:
C
       ELSEIF ((MONTH.EQ.6).OR.(MONTH.EQ.7).OR.(MONTH.EQ.8)) THEN
               SEASON = 3
C
C*** SEASON 4:
C
       ELSEIF ((MONTH.EQ.9).OR.(MONTH.EQ.10).OR.(MONTH.EQ.11)) THEN
               SEASON = 4
       ENDIF
C
       RETURN
       END
