Index: NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 10797)
+++ NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 10803)
@@ -26,7 +26,8 @@
    
    !                                !!* namsbc_apr namelist (Atmospheric PRessure) *
+   LOGICAL, PUBLIC ::   cpl_mslp = .FALSE. ! Presure is passed via coupling
    LOGICAL, PUBLIC ::   ln_apr_obc   !: inverse barometer added to OBC ssh data 
    LOGICAL, PUBLIC ::   ln_ref_apr   !: ref. pressure: global mean Patm (F) or a constant (F)
-   REAL(wp)        ::   rn_pref      !  reference atmospheric pressure   [N/m2]
+   REAL(wp),PUBLIC ::   rn_pref      !  reference atmospheric pressure   [N/m2]
 
    REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   ssh_ib    ! Inverse barometer now    sea surface height   [m]
@@ -34,6 +35,6 @@
    REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   apr       ! atmospheric pressure at kt                 [N/m2]
    
-   REAL(wp) ::   tarea                ! whole domain mean masked ocean surface
-   REAL(wp) ::   r1_grau              ! = 1.e0 / (grav * rau0)
+   REAL(wp), PUBLIC ::   tarea       ! whole domain mean masked ocean surface
+   REAL(wp), PUBLIC ::   r1_grau     ! = 1.e0 / (grav * rau0)
    
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_apr   ! structure of input fields (file informations, fields read)
@@ -82,16 +83,22 @@
          IF(lwm) WRITE ( numond, namsbc_apr )
          !
-         ALLOCATE( sf_apr(1), STAT=ierror )           !* allocate and fill sf_sst (forcing structure) with sn_sst
-         IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_apr: unable to allocate sf_apr structure' )
-         !
-         CALL fld_fill( sf_apr, (/ sn_apr /), cn_dir, 'sbc_apr', 'Atmospheric pressure ', 'namsbc_apr' )
-                                ALLOCATE( sf_apr(1)%fnow(jpi,jpj,1)   )
-         IF( sn_apr%ln_tint )   ALLOCATE( sf_apr(1)%fdta(jpi,jpj,1,2) )
-                                ALLOCATE( ssh_ib(jpi,jpj) , ssh_ibb(jpi,jpj) )
-                                ALLOCATE( apr (jpi,jpj) )
+         IF( .NOT. cpl_mslp ) THEN 
+            ALLOCATE( sf_apr(1), STAT=ierror )           !* allocate and fill sf_sst (forcing structure) with sn_sst
+            IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_apr: unable to allocate sf_apr structure' )
+            !
+            CALL fld_fill( sf_apr, (/ sn_apr /), cn_dir, 'sbc_apr', 'Atmospheric pressure ', 'namsbc_apr' )
+                                   ALLOCATE( sf_apr(1)%fnow(jpi,jpj,1)   )
+            IF( sn_apr%ln_tint )   ALLOCATE( sf_apr(1)%fdta(jpi,jpj,1,2) )
+         ENDIF
+                                   ALLOCATE( ssh_ib(jpi,jpj) , ssh_ibb(jpi,jpj) )
+                                   ALLOCATE( apr (jpi,jpj) )
          !
          IF(lwp) THEN                                 !* control print
             WRITE(numout,*)
-            WRITE(numout,*) '   Namelist namsbc_apr : Atmospheric PRessure as extrenal forcing'
+            IF( cpl_mslp ) THEN 
+               WRITE(numout,*) '   Namelist namsbc_apr : Atmospheric Pressure as extrenal coupling' 
+            ELSE 
+               WRITE(numout,*) '   Namelist namsbc_apr : Atmospheric Pressure as extrenal forcing' 
+            ENDIF 
             WRITE(numout,*) '      ref. pressure: global mean Patm (T) or a constant (F)  ln_ref_apr = ', ln_ref_apr
          ENDIF
@@ -115,42 +122,44 @@
       ENDIF
 
-      !                                         ! ========================== !
-      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN      !    At each sbc time-step   !
-         !                                      ! ===========+++============ !
-         !
-         IF( kt /= nit000 )   ssh_ibb(:,:) = ssh_ib(:,:)    !* Swap of ssh_ib fields
-         !
-         CALL fld_read( kt, nn_fsbc, sf_apr )               !* input Patm provided at kt + nn_fsbc/2
-         !
-         !                                                  !* update the reference atmospheric pressure (if necessary)
-         IF( ln_ref_apr )   rn_pref = glob_sum( sf_apr(1)%fnow(:,:,1) * e1e2t(:,:) ) / tarea
-         !
-         !                                                  !* Patm related forcing at kt
-         ssh_ib(:,:) = - ( sf_apr(1)%fnow(:,:,1) - rn_pref ) * r1_grau    ! equivalent ssh (inverse barometer)
-         apr   (:,:) =     sf_apr(1)%fnow(:,:,1)                        ! atmospheric pressure
-         !
-         CALL iom_put( "ssh_ib", ssh_ib )                   !* output the inverse barometer ssh
-      ENDIF
-
-      !                                         ! ---------------------------------------- !
-      IF( kt == nit000 ) THEN                   !   set the forcing field at nit000 - 1    !
-         !                                      ! ---------------------------------------- !
-         !                                            !* Restart: read in restart file
-         IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN 
-            IF(lwp) WRITE(numout,*) 'sbc_apr:   ssh_ibb read in the restart file'
-            CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb )   ! before inv. barometer ssh
+      IF( .NOT. cpl_mslp ) THEN
+         !                                         ! ========================== !
+         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN      !    At each sbc time-step   !
+            !                                      ! ===========+++============ !
             !
-         ELSE                                         !* no restart: set from nit000 values
-            IF(lwp) WRITE(numout,*) 'sbc_apr:   ssh_ibb set to nit000 values'
-            ssh_ibb(:,:) = ssh_ib(:,:)
+            IF( kt /= nit000 )   ssh_ibb(:,:) = ssh_ib(:,:)    !* Swap of ssh_ib fields
+            !
+            CALL fld_read( kt, nn_fsbc, sf_apr )               !* input Patm provided at kt + nn_fsbc/2
+            !
+            !                                                  !* update the reference atmospheric pressure (if necessary)
+            IF( ln_ref_apr )   rn_pref = glob_sum( sf_apr(1)%fnow(:,:,1) * e1e2t(:,:) ) / tarea
+            !
+            !                                                  !* Patm related forcing at kt
+            ssh_ib(:,:) = - ( sf_apr(1)%fnow(:,:,1) - rn_pref ) * r1_grau    ! equivalent ssh (inverse barometer)
+            apr   (:,:) =     sf_apr(1)%fnow(:,:,1)                        ! atmospheric pressure
+            !
+            CALL iom_put( "ssh_ib", ssh_ib )                   !* output the inverse barometer ssh
          ENDIF
-      ENDIF
-      !                                         ! ---------------------------------------- !
-      IF( lrst_oce ) THEN                       !      Write in the ocean restart file     !
-         !                                      ! ---------------------------------------- !
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'sbc_apr : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp
-         IF(lwp) WRITE(numout,*) '~~~~'
-         CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib )
+    
+         !                                         ! ---------------------------------------- !
+         IF( kt == nit000 ) THEN                   !   set the forcing field at nit000 - 1    !
+            !                                      ! ---------------------------------------- !
+            !                                            !* Restart: read in restart file
+            IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN 
+               IF(lwp) WRITE(numout,*) 'sbc_apr:   ssh_ibb read in the restart file'
+               CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb )   ! before inv. barometer ssh
+               !
+            ELSE                                         !* no restart: set from nit000 values
+               IF(lwp) WRITE(numout,*) 'sbc_apr:   ssh_ibb set to nit000 values'
+               ssh_ibb(:,:) = ssh_ib(:,:)
+            ENDIF
+         ENDIF
+         !                                         ! ---------------------------------------- !
+         IF( lrst_oce ) THEN                       !      Write in the ocean restart file     !
+            !                                      ! ---------------------------------------- !
+            IF(lwp) WRITE(numout,*)
+            IF(lwp) WRITE(numout,*) 'sbc_apr : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp
+            IF(lwp) WRITE(numout,*) '~~~~'
+            CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib )
+         ENDIF
       ENDIF
       !
Index: NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 10797)
+++ NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 10803)
@@ -182,7 +182,4 @@
 
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   albedo_oce_mix    ! ocean albedo sent to atmosphere (mix clear/overcast sky)
-
-   REAL(wp) ::   rpref = 101000._wp   ! reference atmospheric pressure[N/m2] 
-   REAL(wp) ::   r1_grau              ! = 1.e0 / (grav * rau0) 
 
    INTEGER , ALLOCATABLE, SAVE, DIMENSION(    :) ::   nrcvinfo           ! OASIS info argument
@@ -535,6 +532,9 @@
       !                                                      ! Mean Sea Level Pressure   ! 
       !                                                      ! ------------------------- ! 
-      srcv(jpr_mslp)%clname = 'O_MSLP'     ;   IF( TRIM(sn_rcv_mslp%cldes  ) == 'coupled' )    srcv(jpr_mslp)%laction = .TRUE. 
-
+      srcv(jpr_mslp)%clname = 'O_MSLP' 
+      IF( TRIM(sn_rcv_mslp%cldes  ) == 'coupled' ) THEN 
+         srcv(jpr_mslp)%laction = .TRUE. 
+         cpl_mslp = .TRUE. 
+      ENDIF
       !                                                      ! ------------------------- !
       !                                                      !   topmelt and botmelt     !   
@@ -975,4 +975,6 @@
       !!----------------------------------------------------------------------
       USE zdf_oce,  ONLY : ln_zdfqiao
+      USE sbcssm ,  ONLY : sbc_ssm_cpl 
+      USE lib_fortran     ! distributed memory computing library
 
       IMPLICIT NONE
@@ -1138,9 +1140,34 @@
           IF( kt /= nit000 )   ssh_ibb(:,:) = ssh_ib(:,:)    !* Swap of ssh_ib fields 
 
-          r1_grau = 1.e0 / (grav * rau0)               !* constant for optimization 
-          ssh_ib(:,:) = - ( frcv(jpr_mslp)%z3(:,:,1) - rpref ) * r1_grau    ! equivalent ssh (inverse barometer) 
-          apr   (:,:) =     frcv(jpr_mslp)%z3(:,:,1)                         !atmospheric pressure 
-    
-          IF( kt == nit000 ) ssh_ibb(:,:) = ssh_ib(:,:)  ! correct this later (read from restart if possible) 
+          !                                                  !* update the reference atmospheric pressure (if necessary) 
+          IF( ln_ref_apr )  rn_pref = glob_sum( frcv(jpr_mslp)%z3(:,:,1) * e1e2t(:,:) ) / tarea
+
+          ssh_ib(:,:) = - ( frcv(jpr_mslp)%z3(:,:,1) - rn_pref ) * r1_grau  ! equivalent ssh (inverse barometer) 
+          apr   (:,:) =     frcv(jpr_mslp)%z3(:,:,1)                        !atmospheric pressure 
+          !
+          CALL iom_put( "ssh_ib", ssh_ib )                                  !* output the inverse barometer ssh
+          !                                         ! ---------------------------------------- ! 
+          IF( kt == nit000 ) THEN                   !   set the forcing field at nit000 - 1    ! 
+             !                                      ! ---------------------------------------- ! 
+             !* Restart: read in restart file 
+             IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN 
+                IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb read in the restart file' 
+                CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb )   ! before inv. barometer ssh 
+             ELSE                                         !* no restart: set from nit000 values 
+                IF(lwp) WRITE(numout,*) 'sbc_cpl:   ssh_ibb set to nit000 values' 
+                ssh_ibb(:,:) = ssh_ib(:,:) 
+             ENDIF 
+          ENDIF 
+          !                                         ! ---------------------------------------- ! 
+          IF( lrst_oce ) THEN                       !      Write in the ocean restart file     ! 
+             !                                      ! ---------------------------------------- ! 
+             IF(lwp) WRITE(numout,*) 
+             IF(lwp) WRITE(numout,*) 'sbc_cpl : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp 
+             IF(lwp) WRITE(numout,*) '~~~~' 
+             CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib ) 
+          ENDIF 
+     
+          ! Update mean ssh 
+          CALL sbc_ssm_cpl( kt )
       END IF 
       !
Index: NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 10797)
+++ NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 10803)
@@ -357,4 +357,7 @@
       !!              - updte the ice fraction : fr_i
       !!----------------------------------------------------------------------
+      USE sbcapr, ONLY: sbc_apr
+      USE bdydta, ONLY: bdy_dta
+      !
       INTEGER, INTENT(in) ::   kt   ! ocean time step
       !
@@ -385,4 +388,7 @@
       !                                            !        forcing field computation         !
       !                                            ! ---------------------------------------- !
+      !
+      IF( ln_apr_dyn ) CALL sbc_apr( kt )                ! atmospheric pressure provided at kt+0.5*nn_fsbc
+                                                         ! (caution called before sbc_ssm)
       !
       ll_sas = nn_components == jp_iam_sas               ! component flags
@@ -420,5 +426,6 @@
       END IF
       IF( ln_mixcpl )          CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice )   ! forced-coupled mixed formulation after forcing
-
+      IF( ln_bdy )             CALL bdy_dta ( kt, time_offset=+1 )          ! update dynamic & tracer data at open boundaries
+                                                                            ! (caution called after sbc_ssm[_cpl] and before ice)
       !
       !                                            !==  Misc. Options  ==!
Index: NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
===================================================================
--- NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 10797)
+++ NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 10803)
@@ -27,4 +27,5 @@
 
    PUBLIC   sbc_ssm        ! routine called by step.F90
+   PUBLIC   sbc_ssm_cpl    ! routine called by sbccpl.F90
    PUBLIC   sbc_ssm_init   ! routine called by sbcmod.F90
 
@@ -75,6 +76,8 @@
          sss_m(:,:) = zts(:,:,jp_sal)
          !                          ! removed inverse barometer ssh when Patm forcing is used (for sea-ice dynamics)
-         IF( ln_apr_dyn ) THEN   ;   ssh_m(:,:) = sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) )
-         ELSE                    ;   ssh_m(:,:) = sshn(:,:)
+         IF( .NOT. cpl_mslp ) THEN
+            IF( ln_apr_dyn ) THEN   ;   ssh_m(:,:) = sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) )
+            ELSE                    ;   ssh_m(:,:) = sshn(:,:)
+            ENDIF
          ENDIF
          !
@@ -98,6 +101,8 @@
             sss_m(:,:) = zcoef * zts(:,:,jp_sal)
             !                          ! removed inverse barometer ssh when Patm forcing is used (for sea-ice dynamics)
-            IF( ln_apr_dyn ) THEN   ;   ssh_m(:,:) = zcoef * ( sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) ) )
-            ELSE                    ;   ssh_m(:,:) = zcoef * sshn(:,:)
+            IF( .NOT. cpl_mslp ) THEN
+               IF( ln_apr_dyn ) THEN   ;   ssh_m(:,:) = zcoef * ( sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) ) )
+               ELSE                    ;   ssh_m(:,:) = zcoef * sshn(:,:)
+               ENDIF
             ENDIF
             !
@@ -112,5 +117,5 @@
             sst_m(:,:) = 0._wp
             sss_m(:,:) = 0._wp
-            ssh_m(:,:) = 0._wp
+            IF( .NOT. cpl_mslp ) ssh_m(:,:) = 0._wp
             e3t_m(:,:) = 0._wp
             frq_m(:,:) = 0._wp
@@ -126,6 +131,8 @@
          sss_m(:,:) = sss_m(:,:) + zts(:,:,jp_sal)
          !                          ! removed inverse barometer ssh when Patm forcing is used (for sea-ice dynamics)
-         IF( ln_apr_dyn ) THEN   ;   ssh_m(:,:) = ssh_m(:,:) + sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) )
-         ELSE                    ;   ssh_m(:,:) = ssh_m(:,:) + sshn(:,:)
+         IF( .NOT. cpl_mslp ) THEN
+            IF( ln_apr_dyn ) THEN   ;   ssh_m(:,:) = ssh_m(:,:) + sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) )
+            ELSE                    ;   ssh_m(:,:) = ssh_m(:,:) + sshn(:,:)
+            ENDIF
          ENDIF
          !
@@ -142,5 +149,5 @@
             ssu_m(:,:) = ssu_m(:,:) * zcoef     ! mean suface current  [m/s]
             ssv_m(:,:) = ssv_m(:,:) * zcoef     !
-            ssh_m(:,:) = ssh_m(:,:) * zcoef     ! mean SSH             [m]
+            IF( .NOT. cpl_mslp ) ssh_m(:,:) = ssh_m(:,:) * zcoef     ! mean SSH             [m]
             e3t_m(:,:) = e3t_m(:,:) * zcoef     ! mean vertical scale factor [m]
             frq_m(:,:) = frq_m(:,:) * zcoef     ! mean fraction of solar net radiation absorbed in the 1st T level [-]
@@ -160,5 +167,5 @@
             CALL iom_rstput( kt, nitrst, numrow, 'sst_m'  , sst_m  )
             CALL iom_rstput( kt, nitrst, numrow, 'sss_m'  , sss_m  )
-            CALL iom_rstput( kt, nitrst, numrow, 'ssh_m'  , ssh_m  )
+            IF( .NOT. cpl_mslp ) CALL iom_rstput( kt, nitrst, numrow, 'ssh_m'  , ssh_m  )
             CALL iom_rstput( kt, nitrst, numrow, 'e3t_m'  , e3t_m  )
             CALL iom_rstput( kt, nitrst, numrow, 'frq_m'  , frq_m  )
@@ -180,4 +187,66 @@
    END SUBROUTINE sbc_ssm
 
+   SUBROUTINE sbc_ssm_cpl( kt ) 
+      !!--------------------------------------------------------------------- 
+      !!                   ***  ROUTINE sbc_ssm_cpl  *** 
+      !!                      
+      !! ** Purpose :   provide ocean surface variable to sea-surface boundary 
+      !!                condition computation when pressure is read from coupling 
+      !!                 
+      !! ** Method  :   The inverse barometer ssh (i.e. ssh associated with Patm) 
+      !!                is added to ssh_m when ln_apr_dyn = T. Required for sea-ice dynamics. 
+      !!--------------------------------------------------------------------- 
+      INTEGER, INTENT(in) ::   kt   ! ocean time step 
+      ! 
+      REAL(wp) ::   zcoef       ! local scalar 
+      !!--------------------------------------------------------------------- 
+      ! 
+      IF( nn_fsbc == 1 ) THEN                             !      Instantaneous surface fields        ! 
+         !                                                ! ---------------------------------------- ! 
+         IF( ln_apr_dyn ) THEN   ;   ssh_m(:,:) = sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) ) 
+         ELSE                    ;   ssh_m(:,:) = sshn(:,:) 
+         ENDIF 
+      ELSE 
+         !                                                ! ----------------------------------------------- ! 
+         IF( kt == nit000 .AND. .NOT. l_ssm_mean ) THEN   !   Initialisation: 1st time-step, no input means ! 
+            !                                             ! ----------------------------------------------- ! 
+            IF(lwp) WRITE(numout,*) 
+            IF(lwp) WRITE(numout,*) '~~~~~~~   mean ssh field initialised to instantaneous values' 
+            zcoef = REAL( nn_fsbc - 1, wp ) 
+            zcoef = REAL( nn_fsbc - 1, wp ) 
+            IF( ln_apr_dyn ) THEN    ;  ssh_m(:,:) = zcoef * ( sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) ) ) 
+            ELSE                     ;  ssh_m(:,:) = zcoef * sshn(:,:) 
+            ENDIF 
+            !                                             ! ---------------------------------------- ! 
+         ELSEIF( MOD( kt - 2 , nn_fsbc ) == 0 ) THEN      !   Initialisation: New mean computation   ! 
+            !                                             ! ---------------------------------------- ! 
+            ssh_m(:,:) = 0.e0 
+         ENDIF 
+   
+         IF( ln_apr_dyn ) THEN   ;   ssh_m(:,:) = ssh_m(:,:) + sshn(:,:) - 0.5 * ( ssh_ib(:,:) + ssh_ibb(:,:) ) 
+         ELSE                    ;   ssh_m(:,:) = ssh_m(:,:) + sshn(:,:) 
+         ENDIF 
+         !                                                ! ---------------------------------------- ! 
+         IF( MOD( kt - 1 , nn_fsbc ) == 0 ) THEN          !   Mean value at each nn_fsbc time-step   ! 
+            !                                             ! ---------------------------------------- ! 
+            zcoef = 1. / REAL( nn_fsbc, wp ) 
+            ssh_m(:,:) = ssh_m(:,:) * zcoef           ! mean SSH [m] 
+         ENDIF 
+         !                                                ! ---------------------------------------- ! 
+         IF( lrst_oce ) THEN                              !      Write in the ocean restart file     ! 
+            !                                             ! ---------------------------------------- ! 
+            IF(lwp) WRITE(numout,*) 
+            IF(lwp) WRITE(numout,*) 'sbc_ssm_cpl : ssh mean field written in ocean restart file ',   & 
+               &                    'at it= ', kt,' date= ', ndastp 
+            IF(lwp) WRITE(numout,*) '~~~~~~~' 
+            CALL iom_rstput( kt, nitrst, numrow, 'ssh_m'  , ssh_m  ) 
+         ENDIF 
+      ENDIF 
+      ! 
+      IF( MOD( kt - 1 , nn_fsbc ) == 0 ) THEN          !   Mean value at each nn_fsbc time-step   ! 
+         CALL iom_put( 'ssh_m', ssh_m ) 
+      ENDIF 
+      ! 
+   END SUBROUTINE sbc_ssm_cpl
 
    SUBROUTINE sbc_ssm_init
Index: NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 10797)
+++ NEMO/branches/UKMO/r8395_cpl-pressure/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 10803)
@@ -106,6 +106,4 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
       IF( ln_tide    )   CALL sbc_tide( kstp )                   ! update tide potential
-      IF( ln_apr_dyn )   CALL sbc_apr ( kstp )                   ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib) 
-      IF( ln_bdy     )   CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries
                          CALL sbc     ( kstp )                   ! Sea Boundary Condition (including sea-ice)
 
