      SUBROUTINE GETSIC6(NF,SICPAK,SICPAL,NPPS,NLON,NLAT,IDAY,LDAY,GG,
     1                   INCD,KOUNT,ICEMOD) 
C
C     * MAY 23/95 - M.LAZARE. - INCLUDE OPTION "MYRSSTI" VIA COMMON
C     *                         BLOCK "KEEPTYM", TO DO AMIP-LIKE RUNS. 
C     *                         SIMILARILY OPTION "ISAVDTS" TO SAVE
C     *                         GCM OUTPUT IN "yyyymmddhh" FORMAT.
C     * JUL 31/88 - M.LAZARE. - PREVIOUS VERSION GETSIC5.
C
C     * REPLACE THE SEA ICE AMOUNT FIELD IN THE GCM,
C     * WHENEVER A REQUEST IS MADE TO UPDATE THE PHYSICS FIELDS.
C     * ALSO GENERATE "TARGET" SEA ICE AMOUNT FIELD TO INTERPOLATE
C     * TO IN TIME, IF NOT RUNNING SEA-ICE MODEL. 
C     * THIS WILL HAPPEN AT THE START OF A SIMULATION WHEN KOUNT=0, 
C     * AND WHEN THE CURRENT DATE (IDAY) REACHES THE NEXT 
C     * PHYSICS DATE (LDAY). IF AN ICE MODEL IS INCLUDED THEN THE 
C     * SEA ICE AMOUNT IS A PROGNOSTIC VARIABLE AND THE CLIMATOLOGICAL
C     * VALUES WILL ONLY BE USED AT MODEL START-UP. 
C 
C     * NOTE THAT THIS ROUTINE MUST BE CALLED AFTER GETGC6, SINCE THE 
C     * LATTER ESTABLISHES THE VALUE OF LDAY. 
C 
      IMPLICIT REAL (A-H,O-Z),
     +INTEGER (I-N)

      REAL SICPAK(1),SICPAL(1),GG(1)
      COMMON /KEEPTIM/ IYEAR,IYMDH,MYRSSTI,ISAVDTS
C---------------------------------------------------------------------- 
C     * VALUE TO SEARCH FOR IN IBUF(2) IS DEPENDANT ON WHETHER RUN
C     * IS USING STANDARD BOUNDARY FORCING OR MULTI-YEAR CONDITIONS.
C 
      IF(MYRSSTI.EQ.0)     THEN
        IBUF2=IDAY
        LBUF2=LDAY
      ELSE
        IBUF2=IYMDH
        IMO=(IYMDH-(1000000*IYEAR))/10000
        IF(IMO.NE.12)                          THEN
          IMOT=IMO+1
          IYRMOT=1000000*IYEAR + 10000*IMOT + 100
        ELSE
          IMOT=1
          IYRMOT=(IYEAR+1)*1000000 + 10000*IMOT + 100
        ENDIF
        LBUF2=IYRMOT
      ENDIF
C
      IF(INCD.EQ.0) THEN
C       * 
C       * MODEL IS STATIONARY.
C       * ABORT IF RUNNING AMIP-LIKE EXPERIMENT.
C
        IF(MYRSSTI.NE.0)           CALL XIT('GETSIC6',-1)
        IF(KOUNT.EQ.0) THEN 
C         * 
C         * START-UP TIME. READ-IN SEA-ICE FOR BEGINNING OF MONTH.
C         * SICPAL IS ALSO INITIALIZED TO THIS BUT NOT USED AFTER.
C         * 
          LDAY=IDAY 
          CALL GETAGB(SICPAK,NPPS,NC4TO8(" SIC"),NF,NLON,NLAT,IDAY,GG)
          CALL GETAGB(SICPAL,NPPS,NC4TO8(" SIC"),NF,NLON,NLAT,IDAY,GG)
        ELSE
C         * 
C         * NOT A NEW INTEGRATION. NO NEW FIELD REQUIRED. 
C         * 
        ENDIF 
      ELSE
C       * 
C       * THE MODEL IS MOVING.
C       * 
        IF(KOUNT.EQ.0.OR.ICEMOD.EQ.0) THEN
C         * 
C         * START-UP TIME, OR FIRST-OF-MONTH FOR NON-INTERACTIVE ICE
C         * MODEL.
C         * GET SEA-ICE FOR CURRENT DAY AND FOLLOWING FIRST-OF-MONTH. 
C         * SICPAL IS ALSO INITIALIZED TO THE LATTER BUT NOT USED AFTER 
C         * IF USING AN INTERACTIVE ICE-OCEAN MODEL.
C         * 
          CALL GETAGB(SICPAK,NPPS,NC4TO8(" SIC"),NF,NLON,NLAT,IBUF2,GG)
          CALL GETAGB(SICPAL,NPPS,NC4TO8(" SIC"),NF,NLON,NLAT,LBUF2,GG)
        ENDIF 
      ENDIF 
C---------------------------------------------------------------------
      RETURN
      END 
