Index: /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 8877)
+++ /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 8878)
@@ -1070,4 +1070,9 @@
       ENDIF
 #endif
+
+      IF (cdfile_name == "output.abort") THEN
+         CALL ctl_stop('STOP', 'NEMO abort from dia_wri_state')
+      END IF
+       
       ! 
    END SUBROUTINE dia_wri_state
Index: /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
===================================================================
--- /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 8877)
+++ /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 8878)
@@ -2406,4 +2406,7 @@
 
    SUBROUTINE mppstop
+   
+   USE mod_oasis      ! coupling routines
+
       !!----------------------------------------------------------------------
       !!                  ***  routine mppstop  ***
@@ -2415,6 +2418,19 @@
       !!----------------------------------------------------------------------
       !
+      
+#if defined key_oasis3
+      ! If we're trying to shut down cleanly then we need to consider the fact
+      ! that this could be part of an MPMD configuration - we don't want to
+      ! leave other components deadlocked.
+
+      CALL oasis_abort(nproc,"mppstop","NEMO initiated abort")
+
+
+#else
+      
       CALL mppsync
       CALL mpi_finalize( info )
+#endif
+
       !
    END SUBROUTINE mppstop
@@ -4333,5 +4349,5 @@
          ENDIF
          CALL FLUSH(kout) 
-         STOP 'ctl_opn bad opening'
+         CALL ctl_stop ('STOP', 'NEMO abort ctl_opn bad opening')
       ENDIF
       !
Index: /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90
===================================================================
--- /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90	(revision 8877)
+++ /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90	(revision 8878)
@@ -42,4 +42,15 @@
    PUBLIC   cpl_freq
    PUBLIC   cpl_finalize
+#if defined key_mpp_mpi
+   INCLUDE 'mpif.h'
+#endif
+   
+   INTEGER, PARAMETER         :: localRoot  = 0
+   LOGICAL                    :: commRank            ! true for ranks doing OASIS communication
+#if defined key_cpl_rootexchg
+   LOGICAL                    :: rootexchg =.true.   ! logical switch 
+#else
+   LOGICAL                    :: rootexchg =.false.  ! logical switch 
+#endif 
 
    INTEGER, PUBLIC            ::   OASIS_Rcv  = 1    !: return code if received field
@@ -83,5 +94,6 @@
 
    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   exfld   ! Temporary buffer for receiving
-
+   INTEGER, PUBLIC :: localComm 
+      
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -121,4 +133,5 @@
       IF ( nerror /= OASIS_Ok ) &
          CALL oasis_abort (ncomp_id, 'cpl_init','Failure in oasis_get_localcomm' )
+      localComm = kl_comm 
       !
    END SUBROUTINE cpl_init
@@ -373,5 +386,5 @@
             IF( srcv(kid)%nid(jc,jm) /= -1 ) THEN
 
-               CALL oasis_get ( srcv(kid)%nid(jc,jm), kstep, exfld, kinfo )         
+               CALL oasis_get ( srcv(kid)%nid(jc,jm), kstep, exfld, kinfo )   
                
                llaction =  kinfo == OASIS_Recvd   .OR. kinfo == OASIS_FromRest .OR.   &
@@ -463,7 +476,7 @@
          CALL oasis_get_freqs(id, mop, 1, itmp, info)
 #else
-         CALL oasis_get_freqs(id,      1, itmp, info)
-#endif
-         cpl_freq = itmp(1)
+!         CALL oasis_get_freqs(id,      1, itmp, info)
+         cpl_freq = namflddti( id )
+#endif
       ENDIF
       !
Index: /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/geo2ocean.F90
===================================================================
--- /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/geo2ocean.F90	(revision 8877)
+++ /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/geo2ocean.F90	(revision 8878)
@@ -27,4 +27,5 @@
    PRIVATE
 
+   PUBLIC   repcmo    ! called in sbccpl
    PUBLIC   rot_rep   ! called in sbccpl, fldread, and cyclone
    PUBLIC   geo2oce   ! called in sbccpl
@@ -51,4 +52,45 @@
    !!----------------------------------------------------------------------
 CONTAINS
+
+   SUBROUTINE repcmo ( pxu1, pyu1, pxv1, pyv1,   &
+                       px2 , py2 , kchoix  )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE repcmo  ***
+      !!
+      !! ** Purpose :   Change vector componantes from a geographic grid to a
+      !!      stretched coordinates grid.
+      !!
+      !! ** Method  :   Initialization of arrays at the first call.
+      !!
+      !! ** Action  : - px2 : first  componante (defined at u point)
+      !!              - py2 : second componante (defined at v point)
+      !!----------------------------------------------------------------------
+      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   pxu1, pyu1   ! geographic vector componantes at u-point
+      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   pxv1, pyv1   ! geographic vector componantes at v-point
+      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   px2          ! i-componante (defined at u-point)
+      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   py2          ! j-componante (defined at v-point)
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT( IN ) ::   &
+         kchoix   ! type of transformation
+                  ! = 1 change from geographic to model grid.
+                  ! =-1 change from model to geographic grid
+      !!----------------------------------------------------------------------
+ 
+      SELECT CASE (kchoix)
+      CASE ( 1)
+        ! Change from geographic to stretched coordinate
+        ! ----------------------------------------------
+     
+        CALL rot_rep( pxu1, pyu1, 'U', 'en->i',px2 )
+        CALL rot_rep( pxv1, pyv1, 'V', 'en->j',py2 )
+      CASE (-1)
+       ! Change from stretched to geographic coordinate
+       ! ----------------------------------------------
+     
+       CALL rot_rep( pxu1, pyu1, 'U', 'ij->e',px2 )
+       CALL rot_rep( pxv1, pyv1, 'V', 'ij->n',py2 )
+     END SELECT
+     
+   END SUBROUTINE repcmo
 
    SUBROUTINE rot_rep ( pxin, pyin, cd_type, cdtodo, prot )
Index: /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 8877)
+++ /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 8878)
@@ -210,5 +210,8 @@
       ALLOCATE( a_i(jpi,jpj,1) , STAT=ierr(2) )  ! used in sbcice_if.F90 (done here as there is no sbc_ice_if_init)
 #endif
-      ALLOCATE( xcplmask(jpi,jpj,0:nn_cplmodel) , STAT=ierr(3) )
+      !ALLOCATE( xcplmask(jpi,jpj,0:nn_cplmodel) , STAT=ierr(3) )
+      ! 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) )   
       !
       IF( .NOT. ln_apr_dyn ) ALLOCATE( ssh_ib(jpi,jpj), ssh_ibb(jpi,jpj), apr(jpi, jpj), STAT=ierr(4) ) 
@@ -318,5 +321,5 @@
 
       !                                   ! allocate sbccpl arrays
-      IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' )
+      !IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' )
      
       ! ================================ !
@@ -382,5 +385,9 @@
          srcv(jpr_otx2:jpr_otz2)%clgrid  = 'V'        !           and           V-point
          srcv(jpr_itx1:jpr_itz1)%clgrid  = 'F'        ! ice components given at F-point
-         srcv(jpr_otx1:jpr_otz2)%laction = .TRUE.     ! receive oce components on grid 1 & 2
+         !srcv(jpr_otx1:jpr_otz2)%laction = .TRUE.     ! receive oce components on grid 1 & 2
+! Currently needed for HadGEM3 - but shouldn't affect anyone else for the moment
+         srcv(jpr_otx1)%laction = .TRUE. 
+         srcv(jpr_oty1)%laction = .TRUE.
+!
          srcv(jpr_itx1:jpr_itz1)%laction = .TRUE.     ! receive ice components on grid 1 only
       CASE( 'T,I' ) 
@@ -984,5 +991,6 @@
       LOGICAL  ::   llnewtx, llnewtau      ! update wind stress components and module??
       INTEGER  ::   ji, jj, jn             ! dummy loop indices
-      INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdt did not change since nit000)
+      INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdttra did not change since nit000)
+      INTEGER  ::   ikchoix
       REAL(wp) ::   zcumulneg, zcumulpos   ! temporary scalars     
       REAL(wp) ::   zcoef                  ! temporary scalar
@@ -990,10 +998,10 @@
       REAL(wp) ::   zcdrag = 1.5e-3        ! drag coefficient
       REAL(wp) ::   zzx, zzy               ! temporary variables
-      REAL(wp), POINTER, DIMENSION(:,:) ::   ztx, zty, zmsk, zemp, zqns, zqsr
+      REAL(wp), POINTER, DIMENSION(:,:) ::   ztx, zty, zmsk, zemp, zqns, zqsr, ztx2, zty2
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 )   CALL timing_start('sbc_cpl_rcv')
       !
-      CALL wrk_alloc( jpi,jpj,   ztx, zty, zmsk, zemp, zqns, zqsr )
+      CALL wrk_alloc( jpi,jpj, ztx, zty, zmsk, zemp, zqns, zqsr, ztx2, zty2 )
       !
       IF( ln_mixcpl )   zmsk(:,:) = 1. - xcplmask(:,:,0)
@@ -1033,12 +1041,34 @@
             IF( TRIM( sn_rcv_tau%clvor ) == 'eastward-northward' ) THEN   ! 2 components oriented along the local grid
                !                                                       ! (geographical to local grid -> rotate the components)
-               CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->i', ztx )   
-               IF( srcv(jpr_otx2)%laction ) THEN
-                  CALL rot_rep( frcv(jpr_otx2)%z3(:,:,1), frcv(jpr_oty2)%z3(:,:,1), srcv(jpr_otx2)%clgrid, 'en->j', zty )   
-               ELSE
-                  CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->j', zty )  
+               IF( srcv(jpr_otx1)%clgrid == 'U' .AND. (.NOT. srcv(jpr_otx2)%laction) ) THEN
+                  ! Temporary code for HadGEM3 - will be removed eventually.
+		  ! Only applies when we have only taux on U grid and tauy on V grid
+ 	          DO jj=2,jpjm1
+ 	             DO ji=2,jpim1
+ 	                  ztx(ji,jj)=0.25*vmask(ji,jj,1)                &
+ 	                     *(frcv(jpr_otx1)%z3(ji,jj,1)+frcv(jpr_otx1)%z3(ji-1,jj,1)    &
+ 	                     +frcv(jpr_otx1)%z3(ji,jj+1,1)+frcv(jpr_otx1)%z3(ji-1,jj+1,1))
+ 	                  zty(ji,jj)=0.25*umask(ji,jj,1)                &
+ 	                     *(frcv(jpr_oty1)%z3(ji,jj,1)+frcv(jpr_oty1)%z3(ji+1,jj,1)    &
+ 	                     +frcv(jpr_oty1)%z3(ji,jj-1,1)+frcv(jpr_oty1)%z3(ji+1,jj-1,1))
+ 	             ENDDO
+ 	          ENDDO
+ 	                
+ 	          ikchoix = 1
+ 	          CALL repcmo (frcv(jpr_otx1)%z3(:,:,1),zty,ztx,frcv(jpr_oty1)%z3(:,:,1),ztx2,zty2,ikchoix)
+ 	          CALL lbc_lnk (ztx2,'U', -1. )
+ 	          CALL lbc_lnk (zty2,'V', -1. )
+ 	          frcv(jpr_otx1)%z3(:,:,1)=ztx2(:,:)
+ 	          frcv(jpr_oty1)%z3(:,:,1)=zty2(:,:)
+ 	       ELSE
+ 	          CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->i', ztx )   
+ 	          frcv(jpr_otx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid
+ 	          IF( srcv(jpr_otx2)%laction ) THEN
+ 	             CALL rot_rep( frcv(jpr_otx2)%z3(:,:,1), frcv(jpr_oty2)%z3(:,:,1), srcv(jpr_otx2)%clgrid, 'en->j', zty )   
+ 	          ELSE
+ 	             CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->j', zty ) 
+ 	          ENDIF
+          frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 2nd grid  
                ENDIF
-               frcv(jpr_otx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid
-               frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 2nd grid
             ENDIF
             !                              
@@ -1311,5 +1341,5 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi,jpj,   ztx, zty, zmsk, zemp, zqns, zqsr )
+      CALL wrk_dealloc( jpi,jpj, ztx, zty, zmsk, zemp, zqns, zqsr, ztx2, zty2 )
       !
       IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_rcv')
@@ -1978,4 +2008,5 @@
       !
       INTEGER ::   ji, jj, jl   ! dummy loop indices
+      INTEGER ::   ikchoix
       INTEGER ::   isec, info   ! local integer
       REAL(wp) ::   zumax, zvmax
@@ -2156,5 +2187,5 @@
          !                                                  j+1   j     -----V---F
          ! surface velocity always sent from T point                     !       |
-         !                                                        j      |   T   U
+         ! [except for HadGEM3]                                   j      |   T   U
          !                                                               |       |
          !                                                   j    j-1   -I-------|
@@ -2168,10 +2199,20 @@
             SELECT CASE( TRIM( sn_snd_crt%cldes ) )
             CASE( 'oce only'             )      ! C-grid ==> T
-               DO jj = 2, jpjm1
-                  DO ji = fs_2, fs_jpim1   ! vector opt.
-                     zotx1(ji,jj) = 0.5 * ( un(ji,jj,1) + un(ji-1,jj  ,1) )
-                     zoty1(ji,jj) = 0.5 * ( vn(ji,jj,1) + vn(ji  ,jj-1,1) ) 
+               IF ( TRIM( sn_snd_crt%clvgrd ) == 'T' ) THEN
+                  DO jj = 2, jpjm1
+                     DO ji = fs_2, fs_jpim1   ! vector opt.
+                        zotx1(ji,jj) = 0.5 * ( un(ji,jj,1) + un(ji-1,jj  ,1) )
+                        zoty1(ji,jj) = 0.5 * ( vn(ji,jj,1) + vn(ji  ,jj-1,1) ) 
+                     END DO
                   END DO
-               END DO
+               ELSE
+! Temporarily Changed for UKV
+                  DO jj = 2, jpjm1
+                     DO ji = 2, jpim1
+                        zotx1(ji,jj) = un(ji,jj,1)
+                        zoty1(ji,jj) = vn(ji,jj,1)
+                     END DO
+                  END DO
+               ENDIF 
             CASE( 'weighted oce and ice' )   
                SELECT CASE ( cp_ice_msh )
@@ -2232,14 +2273,28 @@
                   END DO
                CASE( 'F' )                      ! Ocean on C grid, Ice on F-point (B-grid) ==> T
-                  DO jj = 2, jpjm1
-                     DO ji = 2, jpim1   ! NO vector opt.
-                        zotx1(ji,jj) = 0.5  * ( un(ji,jj,1)      + un(ji-1,jj  ,1) ) * zfr_l(ji,jj)   &   
-                           &         + 0.25 * ( u_ice(ji-1,jj-1) + u_ice(ji,jj-1)                     &
-                           &                  + u_ice(ji-1,jj  ) + u_ice(ji,jj  )  ) *  fr_i(ji,jj)
-                        zoty1(ji,jj) = 0.5  * ( vn(ji,jj,1)      + vn(ji  ,jj-1,1) ) * zfr_l(ji,jj)   & 
-                           &         + 0.25 * ( v_ice(ji-1,jj-1) + v_ice(ji,jj-1)                     &
-                           &                  + v_ice(ji-1,jj  ) + v_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                  IF ( TRIM( sn_snd_crt%clvgrd ) == 'T' ) THEN
+                     DO jj = 2, jpjm1
+                        DO ji = 2, jpim1   ! NO vector opt.
+                           zotx1(ji,jj) = 0.5  * ( un(ji,jj,1)      + un(ji-1,jj,1) ) * zfr_l(ji,jj)   &   
+                                &         + 0.25 * ( u_ice(ji-1,jj-1) + u_ice(ji,jj-1)                     &
+                                &                  + u_ice(ji-1,jj  ) + u_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                           zoty1(ji,jj) = 0.5  * ( vn(ji,jj,1)      + vn(ji,jj-1,1) ) * zfr_l(ji,jj)   &
+                                &         + 0.25 * ( v_ice(ji-1,jj-1) + v_ice(ji,jj-1)                     &
+                                &                  + v_ice(ji-1,jj  ) + v_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                        END DO
                      END DO
-                  END DO
+#if defined key_cice
+                  ELSE
+! Temporarily Changed for HadGEM3
+                     DO jj = 2, jpjm1
+                        DO ji = 2, jpim1   ! NO vector opt.
+                           zotx1(ji,jj) = (1.0-fr_iu(ji,jj)) * un(ji,jj,1)             &
+                                &              + fr_iu(ji,jj) * 0.5 * ( u_ice(ji,jj-1) + u_ice(ji,jj) ) 
+                           zoty1(ji,jj) = (1.0-fr_iv(ji,jj)) * vn(ji,jj,1)             &
+                                &              + fr_iv(ji,jj) * 0.5 * ( v_ice(ji-1,jj) + v_ice(ji,jj) ) 
+                        END DO
+                     END DO
+#endif
+                  ENDIF
                END SELECT
             END SELECT
@@ -2251,14 +2306,38 @@
          IF( TRIM( sn_snd_crt%clvor ) == 'eastward-northward' ) THEN             ! Rotation of the components
             !                                                                     ! Ocean component
-            CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->e', ztmp1 )       ! 1st component 
-            CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->n', ztmp2 )       ! 2nd component 
-            zotx1(:,:) = ztmp1(:,:)                                                   ! overwrite the components 
-            zoty1(:,:) = ztmp2(:,:)
-            IF( ssnd(jps_ivx1)%laction ) THEN                                     ! Ice component
-               CALL rot_rep( zitx1, zity1, ssnd(jps_ivx1)%clgrid, 'ij->e', ztmp1 )    ! 1st component 
-               CALL rot_rep( zitx1, zity1, ssnd(jps_ivx1)%clgrid, 'ij->n', ztmp2 )    ! 2nd component 
-               zitx1(:,:) = ztmp1(:,:)                                                ! overwrite the components 
-               zity1(:,:) = ztmp2(:,:)
-            ENDIF
+            IF ( TRIM( sn_snd_crt%clvgrd ) == 'T' ) THEN
+               CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->e', ztmp1 )       ! 1st component
+               CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->n', ztmp2 )       ! 2nd component
+               zotx1(:,:) = ztmp1(:,:)                                                   ! overwrite the components
+               zoty1(:,:) = ztmp2(:,:)
+               IF( ssnd(jps_ivx1)%laction ) THEN                                  ! Ice component
+                  CALL rot_rep( zitx1, zity1, ssnd(jps_ivx1)%clgrid, 'ij->e', ztmp1 )    ! 1st component
+                  CALL rot_rep( zitx1, zity1, ssnd(jps_ivx1)%clgrid, 'ij->n', ztmp2 )    ! 2nd component
+                  zitx1(:,:) = ztmp1(:,:)                                                ! overwrite the components
+                  zity1(:,:) = ztmp2(:,:)
+               ENDIF
+            ELSE
+               ! Temporary code for HadGEM3 - will be removed eventually.
+               ! Only applies when we want uvel on U grid and vvel on V grid
+               ! Rotate U and V onto geographic grid before sending.
+
+               DO jj=2,jpjm1
+                  DO ji=2,jpim1
+                     ztmp1(ji,jj)=0.25*vmask(ji,jj,1)                  &
+                          *(zotx1(ji,jj)+zotx1(ji-1,jj)    &
+                          +zotx1(ji,jj+1)+zotx1(ji-1,jj+1))
+                     ztmp2(ji,jj)=0.25*umask(ji,jj,1)                  &
+                          *(zoty1(ji,jj)+zoty1(ji+1,jj)    &
+                          +zoty1(ji,jj-1)+zoty1(ji+1,jj-1))
+                  ENDDO
+               ENDDO
+               
+               ! Ensure any N fold and wrap columns are updated
+               CALL lbc_lnk(ztmp1, 'V', -1.0)
+               CALL lbc_lnk(ztmp2, 'U', -1.0)
+               
+               ikchoix = -1
+               CALL repcmo (zotx1,ztmp2,ztmp1,zoty1,zotx1,zoty1,ikchoix)
+           ENDIF
          ENDIF
          !
Index: /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 8877)
+++ /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 8878)
@@ -286,4 +286,8 @@
       CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 )
       !
+      ! In coupled mode get extra fields from CICE for passing back to atmosphere
+ 
+      IF ( ksbc == jp_purecpl ) CALL cice_sbc_hadgam(nit000)
+      ! 
       IF( nn_timing == 1 )  CALL timing_stop('cice_sbc_init')
       !
@@ -708,9 +712,4 @@
       IF( nn_timing == 1 )  CALL timing_start('cice_sbc_hadgam')
       !
-      IF( kt == nit000 )  THEN
-         IF(lwp) WRITE(numout,*)'cice_sbc_hadgam'
-         IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' )
-      ENDIF
-
       !                                         ! =========================== !
       !                                         !   Prepare Coupling fields   !
Index: /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 8877)
+++ /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 8878)
@@ -290,6 +290,9 @@
       !                             !* OASIS initialization
       !
-      IF( lk_oasis )   CALL sbc_cpl_init( nn_ice )   ! Must be done before: (1) first time step
-      !                                              !                      (2) the use of nn_fsbc
+      IF( lk_oasis ) THEN
+         IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' ) 
+         CALL sbc_cpl_init( nn_ice )   ! Must be done before: (1) first time step
+                                       !                      (2) the use of nn_fsbc
+      ENDIF
       !     nn_fsbc initialization if OPA-SAS coupling via OASIS
       !     SAS time-step has to be declared in OASIS (mandatory) -> nn_fsbc has to be modified accordingly
Index: /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
===================================================================
--- /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 8877)
+++ /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 8878)
@@ -90,4 +90,5 @@
    USE lbcnfd , ONLY  : isendto, nsndto, nfsloop, nfeloop   ! Setup of north fold exchanges 
    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
+   USE sbccpl 
 #if defined key_iomput
    USE xios           ! xIOserver
@@ -181,5 +182,17 @@
 #else
             IF ( .NOT. ln_diurnal_only ) THEN 
+               IF (lk_oasis) CALL sbc_cpl_snd( istp )  ! Coupling to atmos
                CALL stp( istp )                 ! standard time stepping 
+               ! We don't couple on the final timestep because
+               ! our restart file has already been written
+               ! and contains all the necessary data for a
+               ! restart. sbc_cpl_snd could be called here
+               ! but it would require
+               ! a) A test to ensure it was not performed
+               !    on the very last time-step
+               ! b) the presence of another call to
+               !    sbc_cpl_snd call prior to the main DO loop
+               ! This solution produces identical results
+               ! with fewer lines of code. 
             ELSE 
                CALL stp_diurnal( istp )        ! time step only the diurnal SST 
@@ -304,5 +317,5 @@
       IF( Agrif_Root() ) THEN
          IF( lk_oasis ) THEN
-            CALL cpl_init( "oceanx", ilocal_comm )                               ! nemo local communicator given by oasis
+            CALL cpl_init( "toyoce", ilocal_comm )                     ! nemo local communicator given by oasis
             CALL xios_initialize( "not used"       ,local_comm= ilocal_comm )    ! send nemo communicator to xios
          ELSE
@@ -315,5 +328,5 @@
       IF( lk_oasis ) THEN
          IF( Agrif_Root() ) THEN
-            CALL cpl_init( "oceanx", ilocal_comm )          ! nemo local communicator given by oasis
+            CALL cpl_init( "toyoce", ilocal_comm )                      ! nemo local communicator given by oasis
          ENDIF
          ! Nodes selection (control print return in cltxt)
@@ -516,4 +529,9 @@
                             CALL dia_tmb_init  ! TMB outputs
                             CALL dia_25h_init  ! 25h mean  outputs
+      
+      IF (nstop > 0) THEN
+        CALL CTL_STOP('STOP','Critical errors in NEMO initialisation')
+      END IF
+
       !
    END SUBROUTINE nemo_init
Index: /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 8877)
+++ /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 8878)
@@ -328,4 +328,5 @@
                          CALL ctl_stop( 'step: indic < 0' )
                          CALL dia_wri_state( 'output.abort', kstp )
+                               CALL ctl_stop('STOP','NEMO failure in stp')
       ENDIF
       IF( kstp == nit000 ) THEN
@@ -339,6 +340,5 @@
       ! Coupled mode
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-!!gm why lk_oasis and not lk_cpl ????
-      IF( lk_oasis   )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges
+      !IF( lk_oasis         )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges
       !
 #if defined key_iomput
Index: /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90
===================================================================
--- /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90	(revision 8877)
+++ /branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90	(revision 8878)
@@ -453,4 +453,5 @@
    SUBROUTINE wrk_allocbase( kidim , kjdim , kkdim , kldim , kisrt , kjsrt , kksrt , klsrt ,   &
       &                      kwrk1d, kwrk2d, kwrk3d, kwrk4d, pwrk1d, pwrk2d, pwrk3d, pwrk4d    )
+   USE in_out_manager, ONLY: numout
       INTEGER                              , INTENT(in   )           :: kidim, kjdim, kkdim, kldim
       INTEGER                              , INTENT(in   )           :: kisrt, kjsrt, kksrt, klsrt
@@ -483,5 +484,10 @@
          &      .AND. SUM( tree(ii)%ishape ) /= 0 )
          ii = ii + 1
-         IF (ii > jparray) STOP   ! increase the value of jparray (should not be needed as already very big!)
+         IF (ii > jparray) THEN
+            WRITE(numout,*) "E R R O R: NEMO aborted wrk_allocbase"
+            FLUSH(numout)
+            STOP 'Increase the value of jparray'
+                           ! increase the value of jparray (should not be needed as already very big!)
+         END IF
       END DO
       
