Index: /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/IOM/iom.F90
===================================================================
--- /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/IOM/iom.F90	(revision 15423)
+++ /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/IOM/iom.F90	(revision 15424)
@@ -926,4 +926,5 @@
       CHARACTER(LEN=1)                                ::   cldmspc   !
       LOGICAL                                         ::   llxios
+      REAL(wp)        , DIMENSION(1)                  ::   pvartmp
       !
       llxios = .FALSE.
@@ -953,5 +954,6 @@
          IF(lwp) WRITE(numout,*) 'XIOS RST READ (0D): ', trim(cdvar)
          CALL iom_swap( TRIM(crxios_context) )
-         CALL xios_recv_field( trim(cdvar), pvar)
+         pvartmp(:) = pvar 
+         CALL xios_recv_field( trim(cdvar), pvartmp)
          CALL iom_swap( TRIM(cxios_context) )
 #else
Index: /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/LBC/lib_mpp.F90
===================================================================
--- /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/LBC/lib_mpp.F90	(revision 15423)
+++ /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/LBC/lib_mpp.F90	(revision 15424)
@@ -673,4 +673,8 @@
       !!
       !!----------------------------------------------------------------------
+#if defined key_oasis3 
+      USE mod_oasis      ! coupling routines 
+#endif
+
       LOGICAL, OPTIONAL, INTENT(in) :: ld_abort    ! source process number
       LOGICAL ::   ll_abort
@@ -684,9 +688,16 @@
          CALL mpi_abort( MPI_COMM_WORLD )
       ELSE
+#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
-#endif
-      IF( ll_abort ) STOP 123
+#endif 
+      ENDIF 
+#endif 
+      IF( ll_abort ) CALL ctl_stop ('STOP', 'NEMO abort mppstop')
       !
    END SUBROUTINE mppstop
Index: /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/SBC/sbccpl.F90
===================================================================
--- /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/SBC/sbccpl.F90	(revision 15423)
+++ /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/SBC/sbccpl.F90	(revision 15424)
@@ -236,5 +236,7 @@
       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,nn_cplmodel) , STAT=ierr(3) )     
+      ! Hardwire three models as nn_cplmodel has not been read in from the namelist yet.     
+      ALLOCATE( xcplmask(jpi,jpj,0:3) , STAT=ierr(3) )
 #if defined key_si3 || defined key_cice
       ALLOCATE( a_i_last_couple(jpi,jpj,jpl) , STAT=ierr(4) )
@@ -354,5 +356,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' )
      
       ! ================================ !
Index: /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/SBC/sbcice_cice.F90
===================================================================
--- /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/SBC/sbcice_cice.F90	(revision 15423)
+++ /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/SBC/sbcice_cice.F90	(revision 15424)
@@ -269,4 +269,7 @@
       ENDIF
       !
+      ! In coupled mode get extra fields from CICE for passing back to atmosphere   
+      IF ( ksbc == jp_purecpl ) CALL cice_sbc_hadgam(nit000)   
+      !
    END SUBROUTINE cice_sbc_init
 
@@ -664,9 +667,4 @@
       !!---------------------------------------------------------------------
       !
-      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: /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/SBC/sbcmod.F90
===================================================================
--- /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/SBC/sbcmod.F90	(revision 15423)
+++ /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/SBC/sbcmod.F90	(revision 15424)
@@ -303,6 +303,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: /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/nemogcm.F90
===================================================================
--- /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/nemogcm.F90	(revision 15423)
+++ /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/nemogcm.F90	(revision 15424)
@@ -87,4 +87,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
@@ -192,5 +193,17 @@
             ENDIF
             
+            IF (lk_oasis) CALL sbc_cpl_snd( istp )  ! Coupling to atmos
             CALL stp        ( istp ) 
+            ! 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.
             istp = istp + 1
 
@@ -499,4 +512,8 @@
       !
       IF(lwp) WRITE(numout,cform_aaa)           ! Flag AAAAAAA
+      ! 
+      IF (nstop > 0) THEN   
+        CALL CTL_STOP('STOP','Critical errors in NEMO initialisation')   
+      END IF
       !
       IF( ln_timing    )   CALL timing_stop( 'nemo_init')
Index: /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/step.F90
===================================================================
--- /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/step.F90	(revision 15423)
+++ /NEMO/branches/UKMO/r14075_coupling_sequence/src/OCE/step.F90	(revision 15424)
@@ -286,4 +286,8 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                          CALL stp_ctl      ( kstp )
+
+      IF( nstop > 0  ) THEN 
+                         CALL ctl_stop('STOP','NEMO failure in stp') 
+      ENDIF
                          
 #if defined key_agrif
@@ -311,5 +315,5 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 !!gm why lk_oasis and not lk_cpl ????
-      IF( lk_oasis .AND. nstop == 0 )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges
+!      IF( lk_oasis .AND. nstop == 0 )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges
       !
 #if defined key_iomput
