      SUBROUTINE MONSAV(ISMON,IDAY,DELT)
C
C     * APR 01/2005 - M.LAZARE. NEW ROUTINE TO CALCULATE NUMBER OF
C     *                         TIMESTEPS IN A MONTH.
C
C     * DAYSINMON = NUMBER OF DAYS IN THE CURRENT MONTH.
C     * DELT      = MODEL TIMESTEP LENGTH (SECONDS). 
C     * IDAY      = DAY OF THE YEAR
C     * ISMON     = NUMBER OF TIMESTEPS IN A MONTH.
C     * MONTH     = CURRENT MONTH (3-CHARACTER NAME).
C
      IMPLICIT NONE

      INTEGER ISMON,IDAY,MDUM,DAYSINMON
      REAL DELT
      CHARACTER*3 MONTH
C-------------------------------------------------------------------- 
C     * GET CURRENT MONTH. MDUM IS A DUMMY RETURNED ARGUMENT NOT USED.
C     * ABORT IF MONTH.EQ.'XXX'.
C 
      CALL IDATEC(MONTH,MDUM,IDAY) 
      IF(MONTH.EQ.'XXX')   CALL XIT('MONSAV',-1)
C 
C     * DETERMINE THE NUMBER OF DAYS IN THE MONTH.
C 
      IF(MONTH.EQ.'JAN' .OR. MONTH.EQ.'MAR' .OR. MONTH.EQ.'MAY' .OR.
     1   MONTH.EQ.'JUL' .OR. MONTH.EQ.'AUG' .OR. MONTH.EQ.'OCT' .OR.            
     2   MONTH.EQ.'DEC')                               THEN
        DAYSINMON=31
      ELSE IF(MONTH.EQ.'APR' .OR. MONTH.EQ.'JUN' .OR. 
     1        MONTH.EQ.'SEP' .OR. MONTH.EQ.'NOV')      THEN
        DAYSINMON=30
      ELSE IF(MONTH.EQ.'FEB')                          THEN
        DAYSINMON=28
      ELSE
        CALL XIT('MONSAV',-2)
      ENDIF 
C
C     * FINALLY, DETERMINE NUMBER OF TIMESTEPS IN MONTH, FOR NORMALIZTION
C     * FACTOR OF MONTHLY ACCUMULATED OUTPUT FIELDS.
C
      ISMON=DAYSINMON*NINT(86400./DELT)
    
      RETURN
C-------------------------------------------------------------------- 
      END 
