Index: /branches/UKMO/dev_r5518_GO6_fix_zemp_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_fix_zemp_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 10919)
+++ /branches/UKMO/dev_r5518_GO6_fix_zemp_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 10920)
@@ -124,5 +124,6 @@
 #if defined key_lim2 || defined key_cice
    ! already defined in ice.F90 for LIM3
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i                ! Sea ice fraction on categories
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i_last_couple    ! Sea ice fraction on categories at the last coupling point
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  ht_i, ht_s
 #endif
Index: /branches/UKMO/dev_r5518_GO6_fix_zemp_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_fix_zemp_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 10919)
+++ /branches/UKMO/dev_r5518_GO6_fix_zemp_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 10920)
@@ -54,4 +54,13 @@
    USE lib_fortran, ONLY: glob_sum
 
+#if defined key_oasis3
+   USE mod_oasis, ONLY : OASIS_Sent, OASIS_ToRest, OASIS_SentOut, OASIS_ToRestOut
+#else
+   INTEGER                    ::   OASIS_Sent        = -1
+   INTEGER                    ::   OASIS_SentOut     = -1
+   INTEGER                    ::   OASIS_ToRest      = -1
+   INTEGER                    ::   OASIS_ToRestOut   = -1
+#endif
+
    IMPLICIT NONE
    PRIVATE
@@ -200,5 +209,5 @@
       !!             ***  FUNCTION sbc_cpl_alloc  ***
       !!----------------------------------------------------------------------
-      INTEGER :: ierr(3)
+      INTEGER :: ierr(4)
       !!----------------------------------------------------------------------
       ierr(:) = 0
@@ -212,5 +221,8 @@
       ! Hardwire only two models as nn_cplmodel has not been read in
       ! from the namelist yet.
-      ALLOCATE( xcplmask(jpi,jpj,0:2) , STAT=ierr(3) )   
+      ALLOCATE( xcplmask(jpi,jpj,0:2) , STAT=ierr(3) ) 
+#if defined key_cice
+      ALLOCATE( a_i_last_couple(jpi,jpj,jpl) , STAT=ierr(4) ) 
+#endif
       !
       sbc_cpl_alloc = MAXVAL( ierr )
@@ -1760,5 +1772,5 @@
             zemp_ice(:,:) = - frcv(jpr_snow)%z3(:,:,1) * zicefr(:,:)
             DO jl=1,jpl
-               zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) * a_i(:,:,jl)
+               zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) * a_i_last_couple(:,:,jl)
             ENDDO
             ! latent heat coupled for each category in CICE
@@ -2269,4 +2281,15 @@
          END SELECT
          IF( ssnd(jps_fice)%laction )   CALL cpl_snd( jps_fice, isec, ztmp3, info )
+
+         ! If this coupling was successful then save ice fraction for use between coupling points.
+         ! This is needed for some calculations where the ice fraction at the last coupling point
+         ! is needed.
+         IF( info == OASIS_Sent     .OR. info == OASIS_ToRest .OR.   &
+                     & info == OASIS_SentOut  .OR. info == OASIS_ToRestOut ) THEN
+           IF ( sn_snd_thick%clcat == 'yes' ) THEN
+             a_i_last_couple(:,:,:) = a_i(:,:,:)
+           ENDIF
+         ENDIF
+         
       ENDIF
       
Index: /branches/UKMO/dev_r5518_GO6_fix_zemp_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_fix_zemp_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 10919)
+++ /branches/UKMO/dev_r5518_GO6_fix_zemp_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 10920)
@@ -395,5 +395,5 @@
          ELSE IF (ksbc == jp_purecpl) THEN
             DO jl=1,ncat
-               ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i(:,:,jl)
+               ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i_last_couple(:,:,jl)
             ENDDO
 	 ELSE
@@ -408,5 +408,5 @@
 !  Convert to GBM
             IF (ksbc == jp_flx .OR. ksbc == jp_purecpl) THEN
-               ztmp(:,:) = botmelt(:,:,jl)*a_i(:,:,jl)
+               ztmp(:,:) = botmelt(:,:,jl)*a_i_last_couple(:,:,jl)
             ELSE
                ztmp(:,:) = botmelt(:,:,jl)
@@ -417,5 +417,5 @@
 !  Convert to GBM
             IF (ksbc == jp_flx .OR. ksbc == jp_purecpl) THEN
-               ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl) 
+               ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i_last_couple(:,:,jl) 
             ELSE
                ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))
