      SUBROUTINE INTGTIO2(GTROW,  GTROL, GCROW, 
     1                    IL1,IL2,ILG,DELT,GMT,IDAY,MDAY,IMASK)
C
C     * APR 29/03 - M.LAZARE. 1,LON -> IL1,IL2.
C     * OCT 16/97 - M.LAZARE. PREVIOUS VERSION INTGTIO.
C
C     * GTROW  = GROUND TEMPERATURE    FOR PREVIOUS TIMESTEP. 
C     * GTROL  = GROUND TEMPERATURE    AT NEXT PHYSICS TIME.
C     * GCROW  = GROUND COVER (-1.,0,+1.).
C
C     * IL1    = START LONGITUDE INDEX.
C     * IL2    = END   LONGITUDE INDEX.
C     * ILG    = DIMENSION OF LONGITUDE ARRAYS.
C     * DELT   = MODEL TIMESTEP IN SECONDS. 
C     * GMT    = NUMBER OF SECONDS IN CURRENT DAY.
C     * IDAY   = CURRENT JULIAN DAY.  
C     * MDAY   = DATE OF TARGET SST.
C     * IMASK  = SWITCH TO ONLY DO BASED ON GCROW MASK (IMASK=1) OR
C     *          TO NOT USE AS MASK, I.E. FOR TRACER SOURCES (IMASK=0).
C
      IMPLICIT REAL   (A-H,O-Z),
     +INTEGER (I-N)                                         
 
      REAL     GTROW(ILG),  GTROL(ILG),  GCROW(ILG)
C-------------------------------------------------------------------- 
C     * COMPUTE THE NUMBER OF TIMESTEPS FROM HERE TO MDAY. 
C
      DAY=REAL(IDAY)+GMT/86400. 
      FMDAY=REAL(MDAY) 
      IF(FMDAY.LT.DAY) FMDAY=FMDAY+365. 
      DAYSM=FMDAY-DAY 
      STEPSM=DAYSM*86400./DELT
C 
C     * INTERPOLATE NEW GT ONLY OVER SEA (WHERE GC=0.) FOR IMASK=1.
C     * GENERAL INTERPLATION FOR IMASK=0.
C 
      DO 210 I=IL1,IL2
        IF(IMASK.EQ.1)                                             THEN        
         IF(GCROW(I).EQ.0.) THEN
          GTROW  (I) = ((STEPSM-1.) * GTROW  (I) + GTROL  (I)) / STEPSM
         ENDIF
        ELSE
         GTROW  (I)  = ((STEPSM-1.) * GTROW  (I) + GTROL  (I)) / STEPSM      
       ENDIF  
  210 CONTINUE
C 
      RETURN
      END 
