      SUBROUTINE PHSIL6 (  GTROW,  GTROL,  GTROM,
     1                    SICROW, SICROL, SICROM,
     2                   SICNROW,SICNROL,SICNROM,
     3                   MASKROW,  GCROW,DSICROW,
     4                   ILG,IL1,IL2,DELT,GMT,IDAY,MDAY,SICN_CRT)
C
C     * APR 23/10 - M.LAZARE. NEW VERSION FOR GCM15I:
C     *                       - SET GTROW=GTROL WHEN END INTERPOLATION
C     *                         TARGET DATE IS REACHED, FOR TRANSITION
C     *                         FROM SEAICE TO WATER, TO AVOID ROUNDOFF
C     *                         ERROR.
C     * APR 02/08 - M.LAZARE. REVISED (COSMETIC) VERSION PHSIL5 
C     *                       FOR GCM15F/G/H:
C     *                       - INITIALIZE DSICROW TO ZERO!
C     * JUN 15/06 - M.LAZARE. PREVIOUS VERSION PHSIL5 FOR GCM15F:
C     *                       - "ZERO","ONE" DATA CONSTANTS ADDED AND
C     *                         USED IN CALLS TO INTRINSICS.
C     * NOV 01/04 - M.LAZARE. PEVIOUS VERSION PHSIL4 UP TO AND INCL GCM15E.
C     *                       -  COSMETIC CHANGE: FORCE SICN=0. OVER LAND.
C     * JUN 10/03 - MLAZARE.  CHANGE 1,LON TO IL1,IL2 (PASSED IN).  
C     * MAR 17/99 - M.LAZARE. PREVIOUS VERSION PHSIL3.
C
C     * GTROW  = GROUND TEMPERATURE    FOR PREVIOUS TIMESTEP. 
C     * GTROL  = GROUND TEMPERATURE    AT NEXT PHYSICS TIME.
C     * GTROM  = GROUND TEMPERATURE    AT PREVIOUS PHYSICS TIME.
C     * SICROW = SEA-ICE MASS          FOR PREVIOUS TIMESTEP.
C     * SICROL = SEA-ICE MASS          AT NEXT PHYSICS TIME.
C     * SICROM = SEA-ICE MASS          AT PREVIOUS PHYSICS TIME.
C     * SICNROW= SEA-ICE CONCENTRATION FOR PREVIOUS TIMESTEP.
C     * SICNROL= SEA-ICE CONCENTRATION AT NEXT PHYSICS TIME.
C     * SICNROM= SEA-ICE CONCENTRATION AT PREVIOUS PHYSICS TIME.
C     * MASKROW= LAND MASK (INVARIANT; -1=LAND, 0 OTHERWISE). 
C     * GCROW  = GROUND COVER (-1.,0,+1.).
C     * DSICROW= CHANGE IN SEA-ICE MASS OVER TIMESTEP, TO BE
C     *          USED IN CALCULATION OF ENERGY BALANCE AT
C     *          BOTTOM OF SEA-ICE IN ROUTINE OIFPST3.
C
C     * ILG    = SIZE OF LONGITUDE SLICE.
C     * IL1    = START OF LONGITUDE SLICE.
C     * IL2    = END OF LONGITUDE SLICE.
C     * DELT   = MODEL TIMESTEP IN SECONDS. 
C     * GMT    = NUMBER OF SECONDS IN CURRENT DAY.
C     * IDAY   = CURRENT JULIAN DAY.  
C     * DAY    = CURRENT TIME (IDAY PLUS TIME OF DAY).  
C     * MDAY   = DATE OF NEXT      MID-MONTH PHYSICS. 
C     * MDAYM  = DATE OF PREVIOUS  MID-MONTH PHYSICS. 
C     * SICN_CRT=THRESHOLD OF SEA-ICE FRACTION ABOVE WHICH POINT IS 
C     *          CONSIDERED TO BE ICE-COVERED. 
C 
      IMPLICIT REAL   (A-H,O-Z),
     +INTEGER (I-N)

      REAL     GTROW(ILG),  GTROL(ILG),  GTROM(ILG)
      REAL    SICROW(ILG), SICROL(ILG), SICROM(ILG)
      REAL   SICNROW(ILG),SICNROL(ILG),SICNROM(ILG)
      REAL   MASKROW(ILG),  GCROW(ILG),DSICROW(ILG)
C
      INTEGER MMD(12) 
C
      COMMON /PARAM3/ CSNO,   CPACK, GTFSW,  RKHI, SBC,  SNOMAX
      COMMON /PARAM5/ CONI,   DENI,  SIC_MIN,DFSIC,CONF
C
      DATA  MMD/ 16, 46, 75,106,136,167,197,228,259,289,320,350/
      DATA ZERO,ONE / 0., 1. /
C-------------------------------------------------------------------- 
      M=0
      DO 150 N=1,12
       IF(MDAY.EQ.MMD(N))M=N
  150 CONTINUE
      IF(M.EQ.0)CALL XIT('PHSIL6',-1)
      MM1=M-1
      IF(MM1.EQ.0)MM1=12
      MDAYM=MMD(MM1)
C
C     * COMPUTE THE TIME DIFFERENCES.
C
      DAY=REAL(IDAY)+(GMT+DELT)/86400.0
      DT1=DAY-REAL(MDAYM)
      DT2=REAL(MDAY)-DAY
      DT3=REAL(MDAY-MDAYM)
      IF(DT1.LT.0.0)DT1=DT1+365.0
      IF(DT2.LT.0.0)DT2=DT2+365.0
      IF(DT3.LT.0.0)DT3=DT3+365.0
C
      DO 210 I=IL1,IL2
C                         
C     * CASE 1: OVER LAND (NOTE: FORCE SEA-ICE CONCENTRATIONS TO ZERO)
C                         
       IF(MASKROW(I).LT.-0.5)THEN
        GCROW(I)=-1.0 
        SICNROW(I)=0.          
        DSICROW(I)=0.
       ELSE      
C
C     * CASE 2: OVER OCEAN/ICE.
C
C     * INTERPOLATE SICN TO PRESENT TIME AND INSURE A SMOOTH TRANSITION
C
        DSICROW(I)=0.
        SICNROW(I)=SICNROM(I)+(SICNROL(I)-SICNROM(I))*DT1/DT3
        SICNROW(I)=MAX (ZERO , MIN(SICNROW(I),ONE) ) 
C
C     * DETERMINE GC ACCORDING TO SICN > = < SICN_CRT, AND THEN
C     * INTERPOLATE GT AND SIC
C
C     * CASE 2.A: SICN > SICN_CRT
C
        IF(SICNROW(I).GT.SICN_CRT)THEN
         GCROW(I)=1.0
         SICOLD=SICROW(I)
C
C     * CASE 2.A.1: CONTINUOUS ICE
C
         IF(SICNROM(I).GT.SICN_CRT.AND.SICNROL(I).GT.SICN_CRT)THEN
          SICROW(I)=SICROM(I)+(SICROL(I)-SICROM(I))*DT1/DT3
C
C     * CASE 2.A.2: TRANSITION FROM WATER TO ICE
C
         ELSEIF(SICNROM(I).LE.SICN_CRT.AND.SICNROL(I).GT.SICN_CRT)THEN
          DAYS=DT3*(SICNROL(I)-SICN_CRT)/(SICNROL(I)-SICNROM(I))
          SICROW(I)=SICROL(I)+DT2*(SIC_MIN-SICROL(I))/DAYS
C
C     * CASE 2.A.3: TRANSITION FROM ICE TO WATER
C
         ELSEIF(SICNROM(I).GT.SICN_CRT.AND.SICNROL(I).LE.SICN_CRT)THEN
          DAYS=DT3*(SICNROM(I)-SICN_CRT)/(SICNROM(I)-SICNROL(I))
          SICROW(I)=SICROM(I)+DT1*(SIC_MIN-SICROM(I))/DAYS
         ENDIF
         SICROW(I)=MAX(SICROW(I),SIC_MIN)
         DSICROW(I)=SICROW(I)-SICOLD

        ELSE
C 
C     * CASE 2.B: SICN = < SICN_CRT
C
         GCROW(I)=0.0
C
C     * CASE 2.B.1: CONTINUOUS WATER
C
         IF(SICNROM(I).LE.SICN_CRT.AND.SICNROL(I).LE.SICN_CRT)THEN
          GTROW(I)=GTROM(I)+(GTROL(I)-GTROM(I))*DT1/DT3
C
C     * CASE 2.B.2: TRANSITION FROM ICE TO WATER
C
         ELSEIF(SICNROM(I).GT.SICN_CRT.AND.SICNROL(I).LE.SICN_CRT)THEN
          DAYS=DT3-DT3*(SICNROM(I)-SICN_CRT)/(SICNROM(I)-SICNROL(I))
           IF(DT2.EQ.0.) THEN
             GTROW(I)=GTROL(I)
           ELSE
             GTROW(I)=GTROL(I)+DT2*(GTFSW-GTROL(I))/DAYS
           ENDIF 
C
C     * CASE 2.B.3: TRANSITION FROM WATER TO ICE
C
         ELSEIF(SICNROM(I).LE.SICN_CRT.AND.SICNROL(I).GT.SICN_CRT)THEN
          DAYS=DT3-DT3*(SICNROL(I)-SICN_CRT)/(SICNROL(I)-SICNROM(I))
          GTROW(I)=GTROM(I)+DT1*(GTFSW-GTROM(I))/DAYS
         ENDIF  
         GTROW(I)=MAX(GTROW(I),GTFSW)
        ENDIF
       ENDIF
  210 CONTINUE
C
      RETURN
      END 
