Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 6004)
@@ -16,12 +16,13 @@
    USE dom_oce        ! ocean space and time domain
    USE phycst         ! physical constant
+   USE sbc_oce        ! surface boundary conditions : fields
+   USE geo2ocean      ! for vector rotation on to model grid
+   !
    USE in_out_manager ! I/O manager
    USE iom            ! I/O manager library
-   USE geo2ocean      ! for vector rotation on to model grid
+   USE ioipsl  , ONLY : ymds2ju, ju2ymds   ! for calendar
    USE lib_mpp        ! MPP library
    USE wrk_nemo       ! work arrays
    USE lbclnk         ! ocean lateral boundary conditions (C1D case)
-   USE ioipsl, ONLY   : ymds2ju, ju2ymds   ! for calendar
-   USE sbc_oce
    
    IMPLICIT NONE
@@ -134,6 +135,5 @@
       !                                                     !   kt_offset = +1 => fields at "after"  time level
       !                                                     !   etc.
-      !
-      INTEGER  ::   itmp         ! temporary variable
+      INTEGER  ::   itmp         ! local variable
       INTEGER  ::   imf          ! size of the structure sd
       INTEGER  ::   jf           ! dummy indices
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/geo2ocean.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/geo2ocean.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/geo2ocean.F90	(revision 6004)
@@ -113,4 +113,5 @@
          END SELECT
       CASE DEFAULT   ;   CALL ctl_stop( 'rot_rep: Syntax Error in the definition of cdtodo' )
+      !
       END SELECT
       !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 6004)
@@ -12,6 +12,6 @@
    USE dom_oce         ! ocean space and time domain
    USE sbc_oce         ! surface boundary condition
-   USE dynspg_oce      ! surface pressure gradient variables
    USE phycst          ! physical constants
+   !
    USE fldread         ! read input fields
    USE in_out_manager  ! I/O manager
@@ -110,7 +110,6 @@
             IF(lwp) WRITE(numout,*) '         Inverse barometer added to OBC ssh data'
          ENDIF
-         IF( ( ln_apr_obc ) .AND. .NOT. lk_dynspg_ts )   &
-            CALL ctl_stop( 'sbc_apr: use inverse barometer ssh at open boundary ONLY possible with time-splitting' )
-         IF( ( ln_apr_obc ) .AND. .NOT. ln_apr_dyn   )   &
+!jc: stop below should rather be a warning 
+         IF( ln_apr_obc .AND. .NOT.ln_apr_dyn   )   &
             CALL ctl_stop( 'sbc_apr: use inverse barometer ssh at open boundary ONLY requires ln_apr_dyn=T' )
       ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 6004)
@@ -19,36 +19,37 @@
 
    !!----------------------------------------------------------------------
-   !!   sbc_blk_core    : bulk formulation as ocean surface boundary condition (forced mode, CORE bulk formulea)
-   !!   blk_oce_core    : computes momentum, heat and freshwater fluxes over ocean
-   !!   blk_ice_core    : computes momentum, heat and freshwater fluxes over ice
-   !!   turb_core_2z    : Computes turbulent transfert coefficients
-   !!   cd_neutral_10m  : Estimate of the neutral drag coefficient at 10m
-   !!   psi_m           : universal profile stability function for momentum
-   !!   psi_h           : universal profile stability function for temperature and humidity
+   !!   sbc_blk_core  : bulk formulation as ocean surface boundary condition (forced mode, CORE bulk formulea)
+   !!   blk_oce_core  : computes momentum, heat and freshwater fluxes over ocean
+   !!   blk_ice_core  : computes momentum, heat and freshwater fluxes over ice
+   !!   turb_core_2z  : Computes turbulent transfert coefficients
+   !!   cd_neutral_10m: Estimate of the neutral drag coefficient at 10m
+   !!   psi_m         : universal profile stability function for momentum
+   !!   psi_h         : universal profile stability function for temperature and humidity
    !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers
-   USE dom_oce         ! ocean space and time domain
-   USE phycst          ! physical constants
-   USE fldread         ! read input fields
-   USE sbc_oce         ! Surface boundary condition: ocean fields
-   USE cyclone         ! Cyclone 10m wind form trac of cyclone centres
-   USE sbcdcy          ! surface boundary condition: diurnal cycle
-   USE iom             ! I/O manager library
-   USE in_out_manager  ! I/O manager
-   USE lib_mpp         ! distribued memory computing library
-   USE wrk_nemo        ! work arrays
-   USE timing          ! Timing
-   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE prtctl          ! Print control
-   USE sbcwave, ONLY   :  cdn_wave ! wave module
-   USE sbc_ice         ! Surface boundary condition: ice fields
-   USE lib_fortran     ! to use key_nosignedzero
+   USE oce            ! ocean dynamics and tracers
+   USE dom_oce        ! ocean space and time domain
+   USE phycst         ! physical constants
+   USE fldread        ! read input fields
+   USE sbc_oce        ! Surface boundary condition: ocean fields
+   USE cyclone        ! Cyclone 10m wind form trac of cyclone centres
+   USE sbcdcy         ! surface boundary condition: diurnal cycle
+   USE sbcwave , ONLY :   cdn_wave ! wave module
+   USE sbc_ice        ! Surface boundary condition: ice fields
+   USE lib_fortran    ! to use key_nosignedzero
 #if defined key_lim3
-   USE ice, ONLY       : u_ice, v_ice, jpl, pfrld, a_i_b
-   USE limthd_dh       ! for CALL lim_thd_snwblow
+   USE ice     , ONLY :   u_ice, v_ice, jpl, pfrld, a_i_b
+   USE limthd_dh      ! for CALL lim_thd_snwblow
 #elif defined key_lim2
-   USE ice_2, ONLY     : u_ice, v_ice
-   USE par_ice_2
+   USE ice_2   , ONLY :   u_ice, v_ice
+   USE par_ice_2      ! LIM-2 parameters
 #endif
+   !
+   USE iom            ! I/O manager library
+   USE in_out_manager ! I/O manager
+   USE lib_mpp        ! distribued memory computing library
+   USE wrk_nemo       ! work arrays
+   USE timing         ! Timing
+   USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
+   USE prtctl         ! Print control
 
    IMPLICIT NONE
@@ -84,5 +85,5 @@
    REAL(wp), PARAMETER ::   albo =    0.066       ! ocean albedo assumed to be constant
 
-   !                                  !!* Namelist namsbc_core : CORE bulk parameters
+   !                        !!* Namelist namsbc_core : CORE bulk parameters
    LOGICAL  ::   ln_taudif   ! logical flag to use the "mean of stress module - module of mean stress" data
    REAL(wp) ::   rn_pfac     ! multiplication factor for precipitation
@@ -148,7 +149,7 @@
       TYPE(FLD_N) ::   sn_tdif                                 !   "                                 "
       NAMELIST/namsbc_core/ cn_dir , ln_taudif, rn_pfac, rn_efac, rn_vfac,  &
-         &                  sn_wndi, sn_wndj, sn_humi  , sn_qsr ,           &
-         &                  sn_qlw , sn_tair, sn_prec  , sn_snow,           &
-         &                  sn_tdif, rn_zqt,  rn_zu
+         &                  sn_wndi, sn_wndj  , sn_humi, sn_qsr ,           &
+         &                  sn_qlw , sn_tair  , sn_prec, sn_snow,           &
+         &                  sn_tdif, rn_zqt   ,  rn_zu
       !!---------------------------------------------------------------------
       !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 6004)
@@ -8,21 +8,22 @@
 
    !!----------------------------------------------------------------------
-   !!   sbc_blk_mfs  : bulk formulation as ocean surface boundary condition
+   !!   sbc_blk_mfs   : bulk formulation as ocean surface boundary condition
    !!                   (forced mode, mfs bulk formulae)
-   !!   blk_oce_mfs  : ocean: computes momentum, heat and freshwater fluxes
+   !!   blk_oce_mfs   : ocean: computes momentum, heat and freshwater fluxes
    !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers
-   USE dom_oce         ! ocean space and time domain
-   USE phycst          ! physical constants
-   USE fldread         ! read input fields
-   USE sbc_oce         ! Surface boundary condition: ocean fields
-   USE iom             ! I/O manager library
-   USE in_out_manager  ! I/O manager
-   USE lib_mpp         ! distribued memory computing library
-   USE wrk_nemo        ! work arrays
-   USE timing          ! Timing
-   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE prtctl          ! Print control
-   USE sbcwave,ONLY : cdn_wave !wave module
+   USE oce            ! ocean dynamics and tracers
+   USE dom_oce        ! ocean space and time domain
+   USE phycst         ! physical constants
+   USE fldread        ! read input fields
+   USE sbc_oce        ! Surface boundary condition: ocean fields
+   USE sbcwave  ,ONLY :   cdn_wave !wave module
+   !
+   USE iom            ! I/O manager library
+   USE in_out_manager ! I/O manager
+   USE lib_mpp        ! distribued memory computing library
+   USE wrk_nemo       ! work arrays
+   USE timing         ! Timing
+   USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
+   USE prtctl         ! Print control
 
    IMPLICIT NONE
@@ -48,7 +49,5 @@
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
-
 
    SUBROUTINE sbc_blk_mfs( kt )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 6004)
@@ -18,29 +18,23 @@
    !!   sbc_cpl_snd     : send     fields to the atmosphere
    !!----------------------------------------------------------------------
-   USE dom_oce         ! ocean space and time domain
-   USE sbc_oce         ! Surface boundary condition: ocean fields
-   USE sbc_ice         ! Surface boundary condition: ice fields
-   USE sbcapr
-   USE sbcdcy          ! surface boundary condition: diurnal cycle
-   USE phycst          ! physical constants
+   USE dom_oce        ! ocean space and time domain
+   USE sbc_oce        ! Surface boundary condition: ocean fields
+   USE sbc_ice        ! Surface boundary condition: ice fields
+   USE sbcapr         ! Stochastic param. : ???
+   USE sbcdcy         ! surface boundary condition: diurnal cycle
+   USE phycst         ! physical constants
 #if defined key_lim3
-   USE ice             ! ice variables
+   USE ice            ! ice variables
 #endif
 #if defined key_lim2
-   USE par_ice_2       ! ice parameters
-   USE ice_2           ! ice variables
+   USE par_ice_2      ! ice parameters
+   USE ice_2          ! ice variables
 #endif
-   USE cpl_oasis3      ! OASIS3 coupling
-   USE geo2ocean       ! 
+   USE cpl_oasis3     ! OASIS3 coupling
+   USE geo2ocean      ! 
    USE oce   , ONLY : tsn, un, vn, sshn, ub, vb, sshb, fraqsr_1lev
-   USE albedo          !
-   USE in_out_manager  ! I/O manager
-   USE iom             ! NetCDF library
-   USE lib_mpp         ! distribued memory computing library
-   USE wrk_nemo        ! work arrays
-   USE timing          ! Timing
-   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE eosbn2
-   USE sbcrnf   , ONLY : l_rnfcpl
+   USE albedo         ! 
+   USE eosbn2         ! 
+   USE sbcrnf  , ONLY : l_rnfcpl
 #if defined key_cpl_carbon_cycle
    USE p4zflx, ONLY : oce_co2
@@ -50,126 +44,132 @@
 #endif
 #if defined key_lim3
-   USE limthd_dh       ! for CALL lim_thd_snwblow
+   USE limthd_dh      ! for CALL lim_thd_snwblow
 #endif
+   !
+   USE in_out_manager ! I/O manager
+   USE iom            ! NetCDF library
+   USE lib_mpp        ! distribued memory computing library
+   USE wrk_nemo       ! work arrays
+   USE timing         ! Timing
+   USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
 
    IMPLICIT NONE
    PRIVATE
 
-   PUBLIC   sbc_cpl_init       ! routine called by sbcmod.F90
-   PUBLIC   sbc_cpl_rcv        ! routine called by sbc_ice_lim(_2).F90
-   PUBLIC   sbc_cpl_snd        ! routine called by step.F90
-   PUBLIC   sbc_cpl_ice_tau    ! routine called by sbc_ice_lim(_2).F90
-   PUBLIC   sbc_cpl_ice_flx    ! routine called by sbc_ice_lim(_2).F90
-   PUBLIC   sbc_cpl_alloc      ! routine called in sbcice_cice.F90
-
-   INTEGER, PARAMETER ::   jpr_otx1   =  1            ! 3 atmosphere-ocean stress components on grid 1
-   INTEGER, PARAMETER ::   jpr_oty1   =  2            ! 
-   INTEGER, PARAMETER ::   jpr_otz1   =  3            ! 
-   INTEGER, PARAMETER ::   jpr_otx2   =  4            ! 3 atmosphere-ocean stress components on grid 2
-   INTEGER, PARAMETER ::   jpr_oty2   =  5            ! 
-   INTEGER, PARAMETER ::   jpr_otz2   =  6            ! 
-   INTEGER, PARAMETER ::   jpr_itx1   =  7            ! 3 atmosphere-ice   stress components on grid 1
-   INTEGER, PARAMETER ::   jpr_ity1   =  8            ! 
-   INTEGER, PARAMETER ::   jpr_itz1   =  9            ! 
-   INTEGER, PARAMETER ::   jpr_itx2   = 10            ! 3 atmosphere-ice   stress components on grid 2
-   INTEGER, PARAMETER ::   jpr_ity2   = 11            ! 
-   INTEGER, PARAMETER ::   jpr_itz2   = 12            ! 
-   INTEGER, PARAMETER ::   jpr_qsroce = 13            ! Qsr above the ocean
-   INTEGER, PARAMETER ::   jpr_qsrice = 14            ! Qsr above the ice
+   PUBLIC   sbc_cpl_init      ! routine called by sbcmod.F90
+   PUBLIC   sbc_cpl_rcv       ! routine called by sbc_ice_lim(_2).F90
+   PUBLIC   sbc_cpl_snd       ! routine called by step.F90
+   PUBLIC   sbc_cpl_ice_tau   ! routine called by sbc_ice_lim(_2).F90
+   PUBLIC   sbc_cpl_ice_flx   ! routine called by sbc_ice_lim(_2).F90
+   PUBLIC   sbc_cpl_alloc     ! routine called in sbcice_cice.F90
+
+   INTEGER, PARAMETER ::   jpr_otx1   =  1   ! 3 atmosphere-ocean stress components on grid 1
+   INTEGER, PARAMETER ::   jpr_oty1   =  2   ! 
+   INTEGER, PARAMETER ::   jpr_otz1   =  3   ! 
+   INTEGER, PARAMETER ::   jpr_otx2   =  4   ! 3 atmosphere-ocean stress components on grid 2
+   INTEGER, PARAMETER ::   jpr_oty2   =  5   ! 
+   INTEGER, PARAMETER ::   jpr_otz2   =  6   ! 
+   INTEGER, PARAMETER ::   jpr_itx1   =  7   ! 3 atmosphere-ice   stress components on grid 1
+   INTEGER, PARAMETER ::   jpr_ity1   =  8   ! 
+   INTEGER, PARAMETER ::   jpr_itz1   =  9   ! 
+   INTEGER, PARAMETER ::   jpr_itx2   = 10   ! 3 atmosphere-ice   stress components on grid 2
+   INTEGER, PARAMETER ::   jpr_ity2   = 11   ! 
+   INTEGER, PARAMETER ::   jpr_itz2   = 12   ! 
+   INTEGER, PARAMETER ::   jpr_qsroce = 13   ! Qsr above the ocean
+   INTEGER, PARAMETER ::   jpr_qsrice = 14   ! Qsr above the ice
    INTEGER, PARAMETER ::   jpr_qsrmix = 15 
-   INTEGER, PARAMETER ::   jpr_qnsoce = 16            ! Qns above the ocean
-   INTEGER, PARAMETER ::   jpr_qnsice = 17            ! Qns above the ice
+   INTEGER, PARAMETER ::   jpr_qnsoce = 16   ! Qns above the ocean
+   INTEGER, PARAMETER ::   jpr_qnsice = 17   ! Qns above the ice
    INTEGER, PARAMETER ::   jpr_qnsmix = 18
-   INTEGER, PARAMETER ::   jpr_rain   = 19            ! total liquid precipitation (rain)
-   INTEGER, PARAMETER ::   jpr_snow   = 20            ! solid precipitation over the ocean (snow)
-   INTEGER, PARAMETER ::   jpr_tevp   = 21            ! total evaporation
-   INTEGER, PARAMETER ::   jpr_ievp   = 22            ! solid evaporation (sublimation)
-   INTEGER, PARAMETER ::   jpr_sbpr   = 23            ! sublimation - liquid precipitation - solid precipitation
-   INTEGER, PARAMETER ::   jpr_semp   = 24            ! solid freshwater budget (sublimation - snow)
-   INTEGER, PARAMETER ::   jpr_oemp   = 25            ! ocean freshwater budget (evap - precip)
-   INTEGER, PARAMETER ::   jpr_w10m   = 26            ! 10m wind
-   INTEGER, PARAMETER ::   jpr_dqnsdt = 27            ! d(Q non solar)/d(temperature)
-   INTEGER, PARAMETER ::   jpr_rnf    = 28            ! runoffs
-   INTEGER, PARAMETER ::   jpr_cal    = 29            ! calving
-   INTEGER, PARAMETER ::   jpr_taum   = 30            ! wind stress module
+   INTEGER, PARAMETER ::   jpr_rain   = 19   ! total liquid precipitation (rain)
+   INTEGER, PARAMETER ::   jpr_snow   = 20   ! solid precipitation over the ocean (snow)
+   INTEGER, PARAMETER ::   jpr_tevp   = 21   ! total evaporation
+   INTEGER, PARAMETER ::   jpr_ievp   = 22   ! solid evaporation (sublimation)
+   INTEGER, PARAMETER ::   jpr_sbpr   = 23   ! sublimation - liquid precipitation - solid precipitation
+   INTEGER, PARAMETER ::   jpr_semp   = 24   ! solid freshwater budget (sublimation - snow)
+   INTEGER, PARAMETER ::   jpr_oemp   = 25   ! ocean freshwater budget (evap - precip)
+   INTEGER, PARAMETER ::   jpr_w10m   = 26   ! 10m wind
+   INTEGER, PARAMETER ::   jpr_dqnsdt = 27   ! d(Q non solar)/d(temperature)
+   INTEGER, PARAMETER ::   jpr_rnf    = 28   ! runoffs
+   INTEGER, PARAMETER ::   jpr_cal    = 29   ! calving
+   INTEGER, PARAMETER ::   jpr_taum   = 30   ! wind stress module
    INTEGER, PARAMETER ::   jpr_co2    = 31
-   INTEGER, PARAMETER ::   jpr_topm   = 32            ! topmeltn
-   INTEGER, PARAMETER ::   jpr_botm   = 33            ! botmeltn
-   INTEGER, PARAMETER ::   jpr_sflx   = 34            ! salt flux
-   INTEGER, PARAMETER ::   jpr_toce   = 35            ! ocean temperature
-   INTEGER, PARAMETER ::   jpr_soce   = 36            ! ocean salinity
-   INTEGER, PARAMETER ::   jpr_ocx1   = 37            ! ocean current on grid 1
-   INTEGER, PARAMETER ::   jpr_ocy1   = 38            !
-   INTEGER, PARAMETER ::   jpr_ssh    = 39            ! sea surface height
-   INTEGER, PARAMETER ::   jpr_fice   = 40            ! ice fraction          
-   INTEGER, PARAMETER ::   jpr_e3t1st = 41            ! first T level thickness 
-   INTEGER, PARAMETER ::   jpr_fraqsr = 42            ! fraction of solar net radiation absorbed in the first ocean level
-   INTEGER, PARAMETER ::   jprcv      = 42            ! total number of fields received
-
-   INTEGER, PARAMETER ::   jps_fice   =  1            ! ice fraction sent to the atmosphere
-   INTEGER, PARAMETER ::   jps_toce   =  2            ! ocean temperature
-   INTEGER, PARAMETER ::   jps_tice   =  3            ! ice   temperature
-   INTEGER, PARAMETER ::   jps_tmix   =  4            ! mixed temperature (ocean+ice)
-   INTEGER, PARAMETER ::   jps_albice =  5            ! ice   albedo
-   INTEGER, PARAMETER ::   jps_albmix =  6            ! mixed albedo
-   INTEGER, PARAMETER ::   jps_hice   =  7            ! ice  thickness
-   INTEGER, PARAMETER ::   jps_hsnw   =  8            ! snow thickness
-   INTEGER, PARAMETER ::   jps_ocx1   =  9            ! ocean current on grid 1
-   INTEGER, PARAMETER ::   jps_ocy1   = 10            !
-   INTEGER, PARAMETER ::   jps_ocz1   = 11            !
-   INTEGER, PARAMETER ::   jps_ivx1   = 12            ! ice   current on grid 1
-   INTEGER, PARAMETER ::   jps_ivy1   = 13            !
-   INTEGER, PARAMETER ::   jps_ivz1   = 14            !
+   INTEGER, PARAMETER ::   jpr_topm   = 32   ! topmeltn
+   INTEGER, PARAMETER ::   jpr_botm   = 33   ! botmeltn
+   INTEGER, PARAMETER ::   jpr_sflx   = 34   ! salt flux
+   INTEGER, PARAMETER ::   jpr_toce   = 35   ! ocean temperature
+   INTEGER, PARAMETER ::   jpr_soce   = 36   ! ocean salinity
+   INTEGER, PARAMETER ::   jpr_ocx1   = 37   ! ocean current on grid 1
+   INTEGER, PARAMETER ::   jpr_ocy1   = 38   !
+   INTEGER, PARAMETER ::   jpr_ssh    = 39   ! sea surface height
+   INTEGER, PARAMETER ::   jpr_fice   = 40   ! ice fraction          
+   INTEGER, PARAMETER ::   jpr_e3t1st = 41   ! first T level thickness 
+   INTEGER, PARAMETER ::   jpr_fraqsr = 42   ! fraction of solar net radiation absorbed in the first ocean level
+   INTEGER, PARAMETER ::   jprcv      = 42   ! total number of fields received
+
+   INTEGER, PARAMETER ::   jps_fice   =  1   ! ice fraction sent to the atmosphere
+   INTEGER, PARAMETER ::   jps_toce   =  2   ! ocean temperature
+   INTEGER, PARAMETER ::   jps_tice   =  3   ! ice   temperature
+   INTEGER, PARAMETER ::   jps_tmix   =  4   ! mixed temperature (ocean+ice)
+   INTEGER, PARAMETER ::   jps_albice =  5   ! ice   albedo
+   INTEGER, PARAMETER ::   jps_albmix =  6   ! mixed albedo
+   INTEGER, PARAMETER ::   jps_hice   =  7   ! ice  thickness
+   INTEGER, PARAMETER ::   jps_hsnw   =  8   ! snow thickness
+   INTEGER, PARAMETER ::   jps_ocx1   =  9   ! ocean current on grid 1
+   INTEGER, PARAMETER ::   jps_ocy1   = 10   !
+   INTEGER, PARAMETER ::   jps_ocz1   = 11   !
+   INTEGER, PARAMETER ::   jps_ivx1   = 12   ! ice   current on grid 1
+   INTEGER, PARAMETER ::   jps_ivy1   = 13   !
+   INTEGER, PARAMETER ::   jps_ivz1   = 14   !
    INTEGER, PARAMETER ::   jps_co2    = 15
-   INTEGER, PARAMETER ::   jps_soce   = 16            ! ocean salinity
-   INTEGER, PARAMETER ::   jps_ssh    = 17            ! sea surface height
-   INTEGER, PARAMETER ::   jps_qsroce = 18            ! Qsr above the ocean
-   INTEGER, PARAMETER ::   jps_qnsoce = 19            ! Qns above the ocean
-   INTEGER, PARAMETER ::   jps_oemp   = 20            ! ocean freshwater budget (evap - precip)
-   INTEGER, PARAMETER ::   jps_sflx   = 21            ! salt flux
-   INTEGER, PARAMETER ::   jps_otx1   = 22            ! 2 atmosphere-ocean stress components on grid 1
-   INTEGER, PARAMETER ::   jps_oty1   = 23            ! 
-   INTEGER, PARAMETER ::   jps_rnf    = 24            ! runoffs
-   INTEGER, PARAMETER ::   jps_taum   = 25            ! wind stress module
-   INTEGER, PARAMETER ::   jps_fice2  = 26            ! ice fraction sent to OPA (by SAS when doing SAS-OPA coupling)
-   INTEGER, PARAMETER ::   jps_e3t1st = 27            ! first level depth (vvl)
-   INTEGER, PARAMETER ::   jps_fraqsr = 28            ! fraction of solar net radiation absorbed in the first ocean level
-   INTEGER, PARAMETER ::   jpsnd      = 28            ! total number of fields sended
-
-   !                                                         !!** namelist namsbc_cpl **
-   TYPE ::   FLD_C
-      CHARACTER(len = 32) ::   cldes                  ! desciption of the coupling strategy
-      CHARACTER(len = 32) ::   clcat                  ! multiple ice categories strategy
-      CHARACTER(len = 32) ::   clvref                 ! reference of vector ('spherical' or 'cartesian')
-      CHARACTER(len = 32) ::   clvor                  ! orientation of vector fields ('eastward-northward' or 'local grid')
-      CHARACTER(len = 32) ::   clvgrd                 ! grids on which is located the vector fields
+   INTEGER, PARAMETER ::   jps_soce   = 16   ! ocean salinity
+   INTEGER, PARAMETER ::   jps_ssh    = 17   ! sea surface height
+   INTEGER, PARAMETER ::   jps_qsroce = 18   ! Qsr above the ocean
+   INTEGER, PARAMETER ::   jps_qnsoce = 19   ! Qns above the ocean
+   INTEGER, PARAMETER ::   jps_oemp   = 20   ! ocean freshwater budget (evap - precip)
+   INTEGER, PARAMETER ::   jps_sflx   = 21   ! salt flux
+   INTEGER, PARAMETER ::   jps_otx1   = 22   ! 2 atmosphere-ocean stress components on grid 1
+   INTEGER, PARAMETER ::   jps_oty1   = 23   ! 
+   INTEGER, PARAMETER ::   jps_rnf    = 24   ! runoffs
+   INTEGER, PARAMETER ::   jps_taum   = 25   ! wind stress module
+   INTEGER, PARAMETER ::   jps_fice2  = 26   ! ice fraction sent to OPA (by SAS when doing SAS-OPA coupling)
+   INTEGER, PARAMETER ::   jps_e3t1st = 27   ! first level depth (vvl)
+   INTEGER, PARAMETER ::   jps_fraqsr = 28   ! fraction of solar net radiation absorbed in the first ocean level
+   INTEGER, PARAMETER ::   jpsnd      = 28   ! total number of fields sended
+
+   !                                  !!** namelist namsbc_cpl **
+   TYPE ::   FLD_C                     !   
+      CHARACTER(len = 32) ::   cldes      ! desciption of the coupling strategy
+      CHARACTER(len = 32) ::   clcat      ! multiple ice categories strategy
+      CHARACTER(len = 32) ::   clvref     ! reference of vector ('spherical' or 'cartesian')
+      CHARACTER(len = 32) ::   clvor      ! orientation of vector fields ('eastward-northward' or 'local grid')
+      CHARACTER(len = 32) ::   clvgrd     ! grids on which is located the vector fields
    END TYPE FLD_C
-   ! Send to the atmosphere                           !
+   !                                   ! Send to the atmosphere  
    TYPE(FLD_C) ::   sn_snd_temp, sn_snd_alb, sn_snd_thick, sn_snd_crt, sn_snd_co2                        
-   ! Received from the atmosphere                     !
+   !                                   ! Received from the atmosphere
    TYPE(FLD_C) ::   sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau, sn_rcv_dqnsdt, sn_rcv_qsr, sn_rcv_qns, sn_rcv_emp, sn_rcv_rnf
    TYPE(FLD_C) ::   sn_rcv_cal, sn_rcv_iceflx, sn_rcv_co2                        
-   ! Other namelist parameters                        !
-   INTEGER     ::   nn_cplmodel            ! Maximum number of models to/from which NEMO is potentialy sending/receiving data
-   LOGICAL     ::   ln_usecplmask          !  use a coupling mask file to merge data received from several models
-                                           !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel)
+   !                                   ! Other namelist parameters
+   INTEGER     ::   nn_cplmodel           ! Maximum number of models to/from which NEMO is potentialy sending/receiving data
+   LOGICAL     ::   ln_usecplmask         !  use a coupling mask file to merge data received from several models
+                                         !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel)
    TYPE ::   DYNARR     
       REAL(wp), POINTER, DIMENSION(:,:,:)    ::   z3   
    END TYPE DYNARR
 
-   TYPE( DYNARR ), SAVE, DIMENSION(jprcv) ::   frcv                      ! all fields recieved from the atmosphere
-
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   albedo_oce_mix     ! ocean albedo sent to atmosphere (mix clear/overcast sky)
-
-   INTEGER , ALLOCATABLE, SAVE, DIMENSION(    :) ::   nrcvinfo           ! OASIS info argument
+   TYPE( DYNARR ), SAVE, DIMENSION(jprcv) ::   frcv                     ! all fields recieved from the atmosphere
+
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   albedo_oce_mix    ! ocean albedo sent to atmosphere (mix clear/overcast sky)
+
+   INTEGER , ALLOCATABLE, SAVE, DIMENSION(    :) ::   nrcvinfo          ! OASIS info argument
 
    !! Substitution
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2015)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
   
@@ -208,9 +208,8 @@
       !!              * initialise the OASIS coupler
       !!----------------------------------------------------------------------
-      INTEGER, INTENT(in) ::   k_ice       ! ice management in the sbc (=0/1/2/3)
-      !!
-      INTEGER ::   jn   ! dummy loop index
-      INTEGER ::   ios  ! Local integer output status for namelist read
-      INTEGER ::   inum 
+      INTEGER, INTENT(in) ::   k_ice   ! ice management in the sbc (=0/1/2/3)
+      !
+      INTEGER ::   jn          ! dummy loop index
+      INTEGER ::   ios, inum   ! Local integer
       REAL(wp), POINTER, DIMENSION(:,:) ::   zacs, zaos
       !!
@@ -221,21 +220,21 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_init')
-      !
-      CALL wrk_alloc( jpi,jpj, zacs, zaos )
+      IF( nn_timing == 1 )   CALL timing_start('sbc_cpl_init')
+      !
+      CALL wrk_alloc( jpi,jpj,   zacs, zaos )
 
       ! ================================ !
       !      Namelist informations       !
       ! ================================ !
-
+      !
       REWIND( numnam_ref )              ! Namelist namsbc_cpl in reference namelist : Variables for OASIS coupling
       READ  ( numnam_ref, namsbc_cpl, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in reference namelist', lwp )
-
+901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_cpl in reference namelist', lwp )
+      !
       REWIND( numnam_cfg )              ! Namelist namsbc_cpl in configuration namelist : Variables for OASIS coupling
       READ  ( numnam_cfg, namsbc_cpl, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist', lwp )
+902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist', lwp )
       IF(lwm) WRITE ( numond, namsbc_cpl )
-
+      !
       IF(lwp) THEN                        ! control print
          WRITE(numout,*)
@@ -373,5 +372,5 @@
          srcv(jpr_ity1)%clgrid = 'V'                  ! i.e. it is always at U- & V-points for i- & j-comp. resp.
       ENDIF
-       
+      !
       !                                                      ! ------------------------- !
       !                                                      !    freshwater budget      !   E-P
@@ -395,5 +394,5 @@
       CASE default              ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_emp%cldes' )
       END SELECT
-
+      !
       !                                                      ! ------------------------- !
       !                                                      !     Runoffs & Calving     !   
@@ -409,5 +408,5 @@
       !
       srcv(jpr_cal   )%clname = 'OCalving'   ;   IF( TRIM( sn_rcv_cal%cldes ) == 'coupled' )   srcv(jpr_cal)%laction = .TRUE.
-
+      !
       !                                                      ! ------------------------- !
       !                                                      !    non solar radiation    !   Qns
@@ -784,7 +783,7 @@
       ncpl_qsr_freq = 86400 / ncpl_qsr_freq
 
-      CALL wrk_dealloc( jpi,jpj, zacs, zaos )
-      !
-      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_init')
+      CALL wrk_dealloc( jpi,jpj,   zacs, zaos )
+      !
+      IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_init')
       !
    END SUBROUTINE sbc_cpl_init
@@ -836,7 +835,7 @@
       !!                        emp          upward mass flux [evap. - precip. (- runoffs) (- calving)] (ocean only case)
       !!----------------------------------------------------------------------
-      INTEGER, INTENT(in)           ::   kt          ! ocean model time step index
-      INTEGER, INTENT(in)           ::   k_fsbc      ! frequency of sbc (-> ice model) computation 
-      INTEGER, INTENT(in)           ::   k_ice       ! ice management in the sbc (=0/1/2/3)
+      INTEGER, INTENT(in) ::   kt       ! ocean model time step index
+      INTEGER, INTENT(in) ::   k_fsbc   ! frequency of sbc (-> ice model) computation 
+      INTEGER, INTENT(in) ::   k_ice    ! ice management in the sbc (=0/1/2/3)
 
       !!
@@ -852,7 +851,7 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_rcv')
-      !
-      CALL wrk_alloc( jpi,jpj, ztx, zty, zmsk, zemp, zqns, zqsr )
+      IF( nn_timing == 1 )   CALL timing_start('sbc_cpl_rcv')
+      !
+      CALL wrk_alloc( jpi,jpj,   ztx, zty, zmsk, zemp, zqns, zqsr )
       !
       IF( ln_mixcpl )   zmsk(:,:) = 1. - xcplmask(:,:,0)
@@ -1103,10 +1102,9 @@
          IF( srcv(jpr_fice )%laction )   fr_i(:,:) = frcv(jpr_fice )%z3(:,:,1)
          !
-
-      ENDIF
-      !
-      CALL wrk_dealloc( jpi,jpj, ztx, zty, zmsk, zemp, zqns, zqsr )
-      !
-      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_rcv')
+      ENDIF
+      !
+      CALL wrk_dealloc( jpi,jpj,   ztx, zty, zmsk, zemp, zqns, zqsr )
+      !
+      IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_rcv')
       !
    END SUBROUTINE sbc_cpl_rcv
@@ -1149,12 +1147,12 @@
       REAL(wp), INTENT(out), DIMENSION(:,:) ::   p_tauj   ! at I-point (B-grid) or U & V-point (C-grid)
       !!
-      INTEGER ::   ji, jj                          ! dummy loop indices
-      INTEGER ::   itx                             ! index of taux over ice
+      INTEGER ::   ji, jj   ! dummy loop indices
+      INTEGER ::   itx      ! index of taux over ice
       REAL(wp), POINTER, DIMENSION(:,:) ::   ztx, zty 
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_ice_tau')
-      !
-      CALL wrk_alloc( jpi,jpj, ztx, zty )
+      IF( nn_timing == 1 )   CALL timing_start('sbc_cpl_ice_tau')
+      !
+      CALL wrk_alloc( jpi,jpj,   ztx, zty )
 
       IF( srcv(jpr_itx1)%laction ) THEN   ;   itx =  jpr_itx1   
@@ -1164,5 +1162,4 @@
       ! do something only if we just received the stress from atmosphere
       IF(  nrcvinfo(itx) == OASIS_Rcv ) THEN
-
          !                                                      ! ======================= !
          IF( srcv(jpr_itx1)%laction ) THEN                      !   ice stress received   !
@@ -1317,7 +1314,7 @@
       ENDIF
       !   
-      CALL wrk_dealloc( jpi,jpj, ztx, zty )
-      !
-      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_ice_tau')
+      CALL wrk_dealloc( jpi,jpj,   ztx, zty )
+      !
+      IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_ice_tau')
       !
    END SUBROUTINE sbc_cpl_ice_tau
@@ -1364,11 +1361,11 @@
       !!                   sprecip             solid precipitation over the ocean  
       !!----------------------------------------------------------------------
-      REAL(wp), INTENT(in   ), DIMENSION(:,:)   ::   p_frld     ! lead fraction                [0 to 1]
+      REAL(wp), INTENT(in   ), DIMENSION(:,:)             ::   p_frld  ! lead fraction            [0 to 1]
       ! optional arguments, used only in 'mixed oce-ice' case
-      REAL(wp), INTENT(in   ), DIMENSION(:,:,:), OPTIONAL ::   palbi      ! all skies ice albedo 
-      REAL(wp), INTENT(in   ), DIMENSION(:,:  ), OPTIONAL ::   psst       ! sea surface temperature     [Celsius]
-      REAL(wp), INTENT(in   ), DIMENSION(:,:,:), OPTIONAL ::   pist       ! ice surface temperature     [Kelvin]
-      !
-      INTEGER ::   jl         ! dummy loop index
+      REAL(wp), INTENT(in   ), DIMENSION(:,:,:), OPTIONAL ::   palbi   ! all skies ice albedo 
+      REAL(wp), INTENT(in   ), DIMENSION(:,:  ), OPTIONAL ::   psst    ! sea surface temperature  [Celsius]
+      REAL(wp), INTENT(in   ), DIMENSION(:,:,:), OPTIONAL ::   pist    ! ice surface temperature  [Kelvin]
+      !
+      INTEGER ::   jl   ! dummy loop index
       REAL(wp), POINTER, DIMENSION(:,:  ) ::   zcptn, ztmp, zicefr, zmsk
       REAL(wp), POINTER, DIMENSION(:,:  ) ::   zemp_tot, zemp_ice, zsprecip, ztprecip, zqns_tot, zqsr_tot
@@ -1377,8 +1374,8 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_ice_flx')
-      !
-      CALL wrk_alloc( jpi,jpj,     zcptn, ztmp, zicefr, zmsk, zemp_tot, zemp_ice, zsprecip, ztprecip, zqns_tot, zqsr_tot )
-      CALL wrk_alloc( jpi,jpj,jpl, zqns_ice, zqsr_ice, zdqns_ice )
+      IF( nn_timing == 1 )   CALL timing_start('sbc_cpl_ice_flx')
+      !
+      CALL wrk_alloc( jpi,jpj,       zcptn, ztmp, zicefr, zmsk, zemp_tot, zemp_ice, zsprecip, ztprecip, zqns_tot, zqsr_tot )
+      CALL wrk_alloc( jpi,jpj,jpl,   zqns_ice, zqsr_ice, zdqns_ice )
 
       IF( ln_mixcpl )   zmsk(:,:) = 1. - xcplmask(:,:,0)
@@ -1553,6 +1550,6 @@
       CALL wrk_dealloc( jpi,jpj, zevap, zsnw, zqns_oce, zqprec_ice, zqemp_oce ) 
 #else
-
-      ! clem: this formulation is certainly wrong... but better than it was...
+      !
+      ! clem: this formulation is certainly wrong... but better than it was before...
       zqns_tot(:,:) = zqns_tot(:,:)                       &            ! zqns_tot update over free ocean with:
          &          - ztmp(:,:)                           &            ! remove the latent heat flux of solid precip. melting
@@ -1570,7 +1567,6 @@
          qns_ice(:,:,:) = zqns_ice(:,:,:)
       ENDIF
-
+      !
 #endif
-
       !                                                      ! ========================= !
       SELECT CASE( TRIM( sn_rcv_qsr%cldes ) )                !      solar heat fluxes    !   (qsr)
@@ -1681,8 +1677,8 @@
       fr2_i0(:,:) = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice )
 
-      CALL wrk_dealloc( jpi,jpj,     zcptn, ztmp, zicefr, zmsk, zemp_tot, zemp_ice, zsprecip, ztprecip, zqns_tot, zqsr_tot )
-      CALL wrk_dealloc( jpi,jpj,jpl, zqns_ice, zqsr_ice, zdqns_ice )
-      !
-      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_ice_flx')
+      CALL wrk_dealloc( jpi,jpj,       zcptn, ztmp, zicefr, zmsk, zemp_tot, zemp_ice, zsprecip, ztprecip, zqns_tot, zqsr_tot )
+      CALL wrk_dealloc( jpi,jpj,jpl,   zqns_ice, zqsr_ice, zdqns_ice )
+      !
+      IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_ice_flx')
       !
    END SUBROUTINE sbc_cpl_ice_flx
@@ -1707,8 +1703,8 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_snd')
-      !
-      CALL wrk_alloc( jpi,jpj, zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 )
-      CALL wrk_alloc( jpi,jpj,jpl, ztmp3, ztmp4 )
+      IF( nn_timing == 1 )   CALL timing_start('sbc_cpl_snd')
+      !
+      CALL wrk_alloc( jpi,jpj,       zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 )
+      CALL wrk_alloc( jpi,jpj,jpl,   ztmp3, ztmp4 )
 
       isec = ( kt - nit000 ) * NINT(rdttra(1))        ! date of exchanges
@@ -2019,8 +2015,8 @@
       IF( ssnd(jps_taum  )%laction )  CALL cpl_snd( jps_taum  , isec, RESHAPE ( taum, (/jpi,jpj,1/) ), info )
 
-      CALL wrk_dealloc( jpi,jpj, zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 )
-      CALL wrk_dealloc( jpi,jpj,jpl, ztmp3, ztmp4 )
-      !
-      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_snd')
+      CALL wrk_dealloc( jpi,jpj,       zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 )
+      CALL wrk_dealloc( jpi,jpj,jpl,   ztmp3, ztmp4 )
+      !
+      IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_snd')
       !
    END SUBROUTINE sbc_cpl_snd
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 6004)
@@ -12,20 +12,20 @@
 
    !!----------------------------------------------------------------------
-   !!   sbc_fwb      : freshwater budget for global ocean configurations
-   !!                  in free surface and forced mode
-   !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers
-   USE dom_oce         ! ocean space and time domain
-   USE sbc_oce         ! surface ocean boundary condition
-   USE phycst          ! physical constants
-   USE sbcrnf          ! ocean runoffs
-   USE sbcisf          ! ice shelf melting contribution
-   USE sbcssr          ! SS damping terms
-   USE in_out_manager  ! I/O manager
-   USE lib_mpp         ! distribued memory computing library
-   USE wrk_nemo        ! work arrays
-   USE timing          ! Timing
-   USE lbclnk          ! ocean lateral boundary conditions
-   USE lib_fortran
+   !!   sbc_fwb       : freshwater budget for global ocean configurations (free surface & forced mode)
+   !!----------------------------------------------------------------------
+   USE oce            ! ocean dynamics and tracers
+   USE dom_oce        ! ocean space and time domain
+   USE sbc_oce        ! surface ocean boundary condition
+   USE phycst         ! physical constants
+   USE sbcrnf         ! ocean runoffs
+   USE sbcisf         ! ice shelf melting contribution
+   USE sbcssr         ! Sea-Surface damping terms
+   !
+   USE in_out_manager ! I/O manager
+   USE lib_mpp        ! distribued memory computing library
+   USE wrk_nemo       ! work arrays
+   USE timing         ! Timing
+   USE lbclnk         ! ocean lateral boundary conditions
+   USE lib_fortran    ! 
 
    IMPLICIT NONE
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 6004)
@@ -25,5 +25,5 @@
    USE thd_ice         ! LIM-3: thermodynamical variables
    USE dom_ice         ! LIM-3: ice domain
-
+   !
    USE sbc_oce         ! Surface boundary condition: ocean fields
    USE sbc_ice         ! Surface boundary condition: ice   fields
@@ -32,5 +32,5 @@
    USE sbccpl          ! Surface boundary condition: coupled interface
    USE albedo          ! ocean & ice albedo
-
+   !
    USE phycst          ! Define parameters for the routines
    USE eosbn2          ! equation of state
@@ -47,19 +47,18 @@
    USE limupdate2      ! update of global variables
    USE limvar          ! Ice variables switch
-
+   USE limctl          ! 
    USE limmsh          ! LIM mesh
    USE limistate       ! LIM initial state
    USE limthd_sal      ! LIM ice thermodynamics: salinity
-
+   !
    USE c1d             ! 1D vertical configuration
+   USE in_out_manager  ! I/O manager
+   USE iom             ! I/O manager library
+   USE prtctl          ! Print control
+   USE lib_fortran     ! 
    USE lbclnk          ! lateral boundary condition - MPP link
    USE lib_mpp         ! MPP library
    USE wrk_nemo        ! work arrays
    USE timing          ! Timing
-   USE iom             ! I/O manager library
-   USE in_out_manager  ! I/O manager
-   USE prtctl          ! Print control
-   USE lib_fortran     ! 
-   USE limctl
 
 #if defined key_bdy 
@@ -81,6 +80,4 @@
    !!----------------------------------------------------------------------
 CONTAINS
-
-   !!======================================================================
 
    SUBROUTINE sbc_ice_lim( kt, kblk )
@@ -269,9 +266,9 @@
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   via Louvain la Neuve Ice Model (LIM-3) time stepping'
       !
-                                       ! Open the reference and configuration namelist files and namelist output file 
+      !                                ! Open the reference and configuration namelist files and namelist output file 
       CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
       CALL ctl_opn( numnam_ice_cfg, 'namelist_ice_cfg',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp )
       IF(lwm) CALL ctl_opn( numoni, 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 )
-
+      !
       CALL ice_run                     ! set some ice run parameters
       !
@@ -347,11 +344,10 @@
       REWIND( numnam_ice_ref )              ! Namelist namicerun in reference namelist : Parameters for ice
       READ  ( numnam_ice_ref, namicerun, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicerun in reference namelist', lwp )
-
+901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namicerun in reference namelist', lwp )
+      !
       REWIND( numnam_ice_cfg )              ! Namelist namicerun in configuration namelist : Parameters for ice
       READ  ( numnam_ice_cfg, namicerun, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicerun in configuration namelist', lwp )
-      IF(lwm) WRITE ( numoni, namicerun )
-      !
+902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namicerun in configuration namelist', lwp )
+      IF(lwm) WRITE( numoni, namicerun )
       !
       IF(lwp) THEN                        ! control print
@@ -404,11 +400,10 @@
       REWIND( numnam_ice_ref )              ! Namelist namiceitd in reference namelist : Parameters for ice
       READ  ( numnam_ice_ref, namiceitd, IOSTAT = ios, ERR = 903)
-903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceitd in reference namelist', lwp )
-
+903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namiceitd in reference namelist', lwp )
+      !
       REWIND( numnam_ice_cfg )              ! Namelist namiceitd in configuration namelist : Parameters for ice
       READ  ( numnam_ice_cfg, namiceitd, IOSTAT = ios, ERR = 904 )
-904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceitd in configuration namelist', lwp )
-      IF(lwm) WRITE ( numoni, namiceitd )
-      !
+904   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namiceitd in configuration namelist', lwp )
+      IF(lwm) WRITE( numoni, namiceitd )
       !
       IF(lwp) THEN                        ! control print
@@ -416,8 +411,8 @@
          WRITE(numout,*) 'ice_itd : ice cat distribution'
          WRITE(numout,*) ' ~~~~~~'
-         WRITE(numout,*) '   shape of ice categories distribution                          nn_catbnd = ', nn_catbnd
-         WRITE(numout,*) '   mean ice thickness in the domain (only active if nn_catbnd=2) rn_himean = ', rn_himean
+         WRITE(numout,*) '   shape of ice categories distribution                     nn_catbnd = ', nn_catbnd
+         WRITE(numout,*) '   mean ice thickness in the domain (used if nn_catbnd=2)   rn_himean = ', rn_himean
       ENDIF
-
+      !
       !----------------------------------
       !- Thickness categories boundaries 
@@ -426,42 +421,35 @@
       IF(lwp) WRITE(numout,*) 'lim_itd_init : Initialization of ice cat distribution '
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
-
+      !
       hi_max(:) = 0._wp
-
-      SELECT CASE ( nn_catbnd  )       
-                                   !----------------------
-         CASE (1)                  ! tanh function (CICE)
-                                   !----------------------
+      !
+      SELECT CASE ( nn_catbnd  )    ! type of ice categories distribution
+      !
+      CASE (1)                            !==  tanh function (CICE)  ==!
          zc1 =  3._wp / REAL( jpl, wp )
          zc2 = 10._wp * zc1
          zc3 =  3._wp
-
          DO jl = 1, jpl
             zx1 = REAL( jl-1, wp ) / REAL( jpl, wp )
             hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1._wp + TANH( zc3 * (zx1 - 1._wp ) ) )
          END DO
-
-                                   !----------------------
-         CASE (2)                  ! h^(-alpha) function
-                                   !----------------------
-         zalpha = 0.05             ! exponent of the transform function
-
-         zhmax  = 3.*rn_himean
-
+         !
+      CASE (2)                            !==  h^(-alpha) function  ==!
+         zalpha = 0.05_wp
+         zhmax  = 3._wp * rn_himean
          DO jl = 1, jpl 
             znum = jpl * ( zhmax+1 )**zalpha
-            zden = ( jpl - jl ) * ( zhmax+1 )**zalpha + jl
+            zden = REAL( jpl-jl , wp ) * ( zhmax + 1._wp )**zalpha + REAL( jl , wp )
             hi_max(jl) = ( znum / zden )**(1./zalpha) - 1
          END DO
-
+         !
       END SELECT
-
-      DO jl = 1, jpl
+      !
+      DO jl = 1, jpl                ! mean thickness by category
          hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) * 0.5_wp
       END DO
-
-      ! Set hi_max(jpl) to a big value to ensure that all ice is thinner than hi_max(jpl)
-      hi_max(jpl) = 99._wp
-
+      !
+      hi_max(jpl) = 99._wp          ! set to a big value to ensure that all ice is thinner than hi_max(jpl)
+      !
       IF(lwp) WRITE(numout,*) ' Thickness category boundaries '
       IF(lwp) WRITE(numout,*) ' hi_max ', hi_max(0:jpl)
@@ -470,5 +458,6 @@
 
    
-   SUBROUTINE ice_lim_flx( ptn_ice, palb_ice, pqns_ice, pqsr_ice, pdqn_ice, pevap_ice, pdevap_ice, k_limflx )
+   SUBROUTINE ice_lim_flx( ptn_ice , palb_ice, pqns_ice ,    &
+      &                    pqsr_ice, pdqn_ice, pevap_ice, pdevap_ice, k_limflx )
       !!---------------------------------------------------------------------
       !!                  ***  ROUTINE ice_lim_flx  ***
@@ -482,5 +471,5 @@
       !!---------------------------------------------------------------------
       INTEGER                   , INTENT(in   ) ::   k_limflx   ! =-1 do nothing; =0 average ; 
-                                                                ! =1 average and redistribute ; =2 redistribute
+      !                                                         ! =1 average and redistribute ; =2 redistribute
       REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   ptn_ice    ! ice surface temperature 
       REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   palb_ice   ! ice albedo
@@ -502,7 +491,6 @@
       REAL(wp), POINTER, DIMENSION(:,:) :: z_devap_m ! Mean d(evap)/dT over all categories
       !!----------------------------------------------------------------------
-
+      !
       IF( nn_timing == 1 )  CALL timing_start('ice_lim_flx')
-      !
       !
       SELECT CASE( k_limflx )                              !==  averaged on all ice categories  ==!
@@ -528,5 +516,5 @@
          CALL wrk_dealloc( jpi,jpj, z_qsr_m, z_qns_m, z_evap_m, z_dqn_m, z_devap_m)
       END SELECT
-
+      !
       SELECT CASE( k_limflx )                              !==  redistribution on all ice categories  ==!
       CASE( 1 , 2 )
@@ -547,4 +535,5 @@
       !
    END SUBROUTINE ice_lim_flx
+
 
    SUBROUTINE sbc_lim_bef
@@ -563,6 +552,7 @@
       u_ice_b(:,:)     = u_ice(:,:)
       v_ice_b(:,:)     = v_ice(:,:)
-      
+      !      
    END SUBROUTINE sbc_lim_bef
+
 
    SUBROUTINE sbc_lim_diag0
@@ -579,5 +569,5 @@
       sfx_bom(:,:) = 0._wp   ;   sfx_sum(:,:) = 0._wp
       sfx_res(:,:) = 0._wp
-      
+      !
       wfx_snw(:,:) = 0._wp   ;   wfx_ice(:,:) = 0._wp
       wfx_sni(:,:) = 0._wp   ;   wfx_opw(:,:) = 0._wp
@@ -586,5 +576,5 @@
       wfx_res(:,:) = 0._wp   ;   wfx_sub(:,:) = 0._wp
       wfx_spr(:,:) = 0._wp   ;   
-      
+      !
       hfx_thd(:,:) = 0._wp   ;   
       hfx_snw(:,:) = 0._wp   ;   hfx_opw(:,:) = 0._wp
@@ -595,11 +585,11 @@
       hfx_err(:,:) = 0._wp   ;   hfx_err_rem(:,:) = 0._wp
       hfx_err_dif(:,:) = 0._wp   ;
-
+      !
       afx_tot(:,:) = 0._wp   ;
       afx_dyn(:,:) = 0._wp   ;   afx_thd(:,:) = 0._wp
-
+      !
       diag_heat(:,:) = 0._wp ;   diag_smvi(:,:) = 0._wp ;
       diag_vice(:,:) = 0._wp ;   diag_vsnw(:,:) = 0._wp ;
-      
+      !
    END SUBROUTINE sbc_lim_diag0
 
@@ -633,5 +623,4 @@
    END FUNCTION fice_ice_ave
 
-
 #else
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 6004)
@@ -12,50 +12,51 @@
 
    !!----------------------------------------------------------------------
-   !!   sbc_rnf      : monthly runoffs read in a NetCDF file
-   !!   sbc_rnf_init : runoffs initialisation
-   !!   rnf_mouth    : set river mouth mask
+   !!   sbc_rnf       : monthly runoffs read in a NetCDF file
+   !!   sbc_rnf_init  : runoffs initialisation
+   !!   rnf_mouth     : set river mouth mask
    !!----------------------------------------------------------------------
-   USE dom_oce         ! ocean space and time domain
-   USE phycst          ! physical constants
-   USE sbc_oce         ! surface boundary condition variables
-   USE sbcisf          ! PM we could remove it I think
-   USE closea          ! closed seas
-   USE fldread         ! read input field at current time step
-   USE in_out_manager  ! I/O manager
-   USE iom             ! I/O module
-   USE lib_mpp         ! MPP library
-   USE eosbn2
-   USE wrk_nemo        ! Memory allocation
+   USE dom_oce        ! ocean space and time domain
+   USE phycst         ! physical constants
+   USE sbc_oce        ! surface boundary condition variables
+   USE sbcisf         ! PM we could remove it I think
+   USE closea         ! closed seas
+   USE eosbn2         ! Equation Of State
+   !
+   USE in_out_manager ! I/O manager
+   USE fldread        ! read input field at current time step
+   USE iom            ! I/O module
+   USE lib_mpp        ! MPP library
+   USE wrk_nemo       ! Memory allocation
 
    IMPLICIT NONE
    PRIVATE
 
-   PUBLIC   sbc_rnf       ! routine called in sbcmod module
-   PUBLIC   sbc_rnf_div   ! routine called in divhor module
-   PUBLIC   sbc_rnf_alloc ! routine called in sbcmod module
-   PUBLIC   sbc_rnf_init  ! routine called in sbcmod module
+   PUBLIC   sbc_rnf       ! called in sbcmod module
+   PUBLIC   sbc_rnf_div   ! called in divhor module
+   PUBLIC   sbc_rnf_alloc ! called in sbcmod module
+   PUBLIC   sbc_rnf_init  ! called in sbcmod module
    
-   !                                                     !!* namsbc_rnf namelist *
-   CHARACTER(len=100)         ::   cn_dir          !: Root directory for location of rnf files
+   !                                                !!* namsbc_rnf namelist *
+   CHARACTER(len=100)         ::   cn_dir            !: Root directory for location of rnf files
    LOGICAL                    ::   ln_rnf_depth      !: depth       river runoffs attribute specified in a file
-   LOGICAL                    ::   ln_rnf_depth_ini  !: depth       river runoffs  computed at the initialisation
-   REAL(wp)                   ::   rn_rnf_max        !: maximum value of the runoff climatologie ( ln_rnf_depth_ini = .true )
-   REAL(wp)                   ::   rn_dep_max        !: depth over which runoffs is spread ( ln_rnf_depth_ini = .true )
-   INTEGER                    ::   nn_rnf_depth_file !: create (=1) a runoff depth file or not (=0)
-   LOGICAL                    ::   ln_rnf_tem      !: temperature river runoffs attribute specified in a file
-   LOGICAL           , PUBLIC ::   ln_rnf_sal      !: salinity    river runoffs attribute specified in a file
-   TYPE(FLD_N)       , PUBLIC ::   sn_rnf          !: information about the runoff file to be read
-   TYPE(FLD_N)                ::   sn_cnf          !: information about the runoff mouth file to be read
-   TYPE(FLD_N)                ::   sn_s_rnf        !: information about the salinities of runoff file to be read
-   TYPE(FLD_N)                ::   sn_t_rnf        !: information about the temperatures of runoff file to be read
-   TYPE(FLD_N)                ::   sn_dep_rnf      !: information about the depth which river inflow affects
-   LOGICAL           , PUBLIC ::   ln_rnf_mouth    !: specific treatment in mouths vicinity
-   REAL(wp)                   ::   rn_hrnf         !: runoffs, depth over which enhanced vertical mixing is used
-   REAL(wp)          , PUBLIC ::   rn_avt_rnf      !: runoffs, value of the additional vertical mixing coef. [m2/s]
-   REAL(wp)                   ::   rn_rfact        !: multiplicative factor for runoff
-
-   LOGICAL           , PUBLIC ::   l_rnfcpl = .false.       ! runoffs recieved from oasis
-
-   INTEGER , PUBLIC  ::   nkrnf = 0         !: nb of levels over which Kz is increased at river mouths
+   LOGICAL                    ::      ln_rnf_depth_ini  !: depth       river runoffs  computed at the initialisation
+   REAL(wp)                   ::      rn_rnf_max        !: maximum value of the runoff climatologie (ln_rnf_depth_ini =T)
+   REAL(wp)                   ::      rn_dep_max        !: depth over which runoffs is spread       (ln_rnf_depth_ini =T)
+   INTEGER                    ::      nn_rnf_depth_file !: create (=1) a runoff depth file or not (=0)
+   LOGICAL                    ::   ln_rnf_tem        !: temperature river runoffs attribute specified in a file
+   LOGICAL           , PUBLIC ::   ln_rnf_sal        !: salinity    river runoffs attribute specified in a file
+   TYPE(FLD_N)       , PUBLIC ::   sn_rnf            !: information about the runoff file to be read
+   TYPE(FLD_N)                ::   sn_cnf            !: information about the runoff mouth file to be read
+   TYPE(FLD_N)                ::   sn_s_rnf          !: information about the salinities of runoff file to be read
+   TYPE(FLD_N)                ::   sn_t_rnf          !: information about the temperatures of runoff file to be read
+   TYPE(FLD_N)                ::   sn_dep_rnf        !: information about the depth which river inflow affects
+   LOGICAL           , PUBLIC ::   ln_rnf_mouth      !: specific treatment in mouths vicinity
+   REAL(wp)                   ::   rn_hrnf           !: runoffs, depth over which enhanced vertical mixing is used
+   REAL(wp)          , PUBLIC ::   rn_avt_rnf        !: runoffs, value of the additional vertical mixing coef. [m2/s]
+   REAL(wp)                   ::   rn_rfact          !: multiplicative factor for runoff
+
+   LOGICAL , PUBLIC ::   l_rnfcpl = .false.   !: runoffs recieved from oasis
+   INTEGER , PUBLIC ::   nkrnf = 0            !: nb of levels over which Kz is increased at river mouths
+   
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   rnfmsk              !: river mouth mask (hori.)
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)     ::   rnfmsk_z            !: river mouth mask (vert.)
@@ -211,5 +212,13 @@
       !
       IF( ln_rnf_depth .OR. ln_rnf_depth_ini ) THEN      !==   runoff distributed over several levels   ==!
-         IF( .NOT.ln_linssh ) THEN     ! variable volume case
+         IF( ln_linssh ) THEN    !* constant volume case : just apply the runoff input flow
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  DO jk = 1, nk_rnf(ji,jj)
+                     phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rau0 / h_rnf(ji,jj)
+                  END DO
+               END DO
+            END DO
+         ELSE                    !* variable volume case
             DO jj = 1, jpj                   ! update the depth over which runoffs are distributed
                DO ji = 1, jpi
@@ -224,17 +233,7 @@
                END DO
             END DO
-         ELSE                          ! constant volume case : just apply the runoff input flow
-            DO jj = 1, jpj
-               DO ji = 1, jpi
-                  DO jk = 1, nk_rnf(ji,jj)
-                     phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rau0 / h_rnf(ji,jj)
-                  END DO
-               END DO
-            END DO
          ENDIF
       ELSE                       !==   runoff put only at the surface   ==!
-         IF( .NOT.ln_linssh ) THEN              ! variable volume case
-            h_rnf(:,:) = e3t_n(:,:,1)   ! recalculate h_rnf to be depth of top box
-         ENDIF
+         h_rnf (:,:)   = e3t_n (:,:,1)        ! update h_rnf to be depth of top box
          phdivn(:,:,1) = phdivn(:,:,1) - ( rnf(:,:) + rnf_b(:,:) ) * zfact * r1_rau0 / e3t_n(:,:,1)
       ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 6004)
@@ -6,27 +6,28 @@
    !! History :  9.0  ! 2006-07  (G. Madec)  Original code
    !!            3.3  ! 2010-10  (C. Bricaud, G. Madec)  add the Patm forcing for sea-ice
-   !!----------------------------------------------------------------------
-
-   !!----------------------------------------------------------------------
-   !!   sbc_ssm        : calculate sea surface mean currents, temperature,  
-   !!                    and salinity over nn_fsbc time-step
-   !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers
-   USE dom_oce         ! ocean space and time domain
-   USE sbc_oce         ! surface boundary condition: ocean fields
-   USE sbcapr          ! surface boundary condition: atmospheric pressure
-   USE eosbn2          ! equation of state and related derivatives
+   !!            3.7  ! 2015-11  (G. Madec)  non linear free surface by default: e3t_m always computed
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   sbc_ssm       : calculate sea surface mean currents, temperature,  
+   !!                   and salinity over nn_fsbc time-step
+   !!----------------------------------------------------------------------
+   USE oce            ! ocean dynamics and tracers
+   USE dom_oce        ! ocean space and time domain
+   USE sbc_oce        ! surface boundary condition: ocean fields
+   USE sbcapr         ! surface boundary condition: atmospheric pressure
+   USE eosbn2         ! equation of state and related derivatives
    !
-   USE in_out_manager  ! I/O manager
-   USE prtctl          ! Print control
-   USE iom             ! IOM library
+   USE in_out_manager ! I/O manager
+   USE prtctl         ! Print control
+   USE iom            ! IOM library
 
    IMPLICIT NONE
    PRIVATE
 
-   PUBLIC   sbc_ssm         ! routine called by step.F90
-   PUBLIC   sbc_ssm_init    ! routine called by sbcmod.F90
-
-   LOGICAL, SAVE  ::   l_ssm_mean = .FALSE.       ! keep track of whether means have been read from restart file
+   PUBLIC   sbc_ssm        ! routine called by step.F90
+   PUBLIC   sbc_ssm_init   ! routine called by sbcmod.F90
+
+   LOGICAL, SAVE ::   l_ssm_mean = .FALSE.   ! keep track of whether means have been read from restart file
    
    !!----------------------------------------------------------------------
@@ -56,5 +57,5 @@
       REAL(wp), DIMENSION(jpi,jpj,jpts) :: zts
       !!---------------------------------------------------------------------
-
+      !
       !                                        !* surface T-, U-, V- ocean level variables (T, S, depth, velocity)
       DO jj = 1, jpj
@@ -78,5 +79,5 @@
          ENDIF
          !
-         IF( .NOT.ln_linssh )   e3t_m(:,:) = e3t_n(:,:,1)
+         e3t_m(:,:) = e3t_n(:,:,1)
          !
          frq_m(:,:) = fraqsr_1lev(:,:)
@@ -100,5 +101,5 @@
             ENDIF
             !
-            IF( .NOT.ln_linssh )   e3t_m(:,:) = zcoef * e3t_n(:,:,1)
+            e3t_m(:,:) = zcoef * e3t_n(:,:,1)
             !
             frq_m(:,:) = zcoef * fraqsr_1lev(:,:)
@@ -111,5 +112,5 @@
             sss_m(:,:) = 0._wp
             ssh_m(:,:) = 0._wp
-            IF( .NOT.ln_linssh )   e3t_m(:,:) = 0._wp
+            e3t_m(:,:) = 0._wp
             frq_m(:,:) = 0._wp
          ENDIF
@@ -128,7 +129,7 @@
          ENDIF
          !
-         IF( .NOT.ln_linssh )   e3t_m(:,:) = e3t_m(:,:) + e3t_n(:,:,1)
-         !
-         frq_m(:,:) =   frq_m(:,:) + fraqsr_1lev(:,:)
+         e3t_m(:,:) = e3t_m(:,:) + e3t_n(:,:,1)
+         !
+         frq_m(:,:) = frq_m(:,:) + fraqsr_1lev(:,:)
 
          !                                                ! ---------------------------------------- !
@@ -136,11 +137,11 @@
             !                                             ! ---------------------------------------- !
             zcoef = 1. / REAL( nn_fsbc, wp )
-            sst_m(:,:) = sst_m(:,:) * zcoef           ! mean SST             [Celcius]
-            sss_m(:,:) = sss_m(:,:) * zcoef           ! mean SSS             [psu]
-            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.ln_linssh )   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 [-]
+            sst_m(:,:) = sst_m(:,:) * zcoef     ! mean SST             [Celcius]
+            sss_m(:,:) = sss_m(:,:) * zcoef     ! mean SSS             [psu]
+            ssu_m(:,:) = ssu_m(:,:) * zcoef     ! mean suface current  [m/s]
+            ssv_m(:,:) = ssv_m(:,:) * zcoef     !
+            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 [-]
             !
          ENDIF
@@ -159,5 +160,5 @@
             CALL iom_rstput( kt, nitrst, numrow, 'sss_m'  , sss_m  )
             CALL iom_rstput( kt, nitrst, numrow, 'ssh_m'  , ssh_m  )
-            IF( .NOT.ln_linssh )   CALL iom_rstput( kt, nitrst, numrow, 'e3t_m'  , e3t_m  )
+            CALL iom_rstput( kt, nitrst, numrow, 'e3t_m'  , e3t_m  )
             CALL iom_rstput( kt, nitrst, numrow, 'frq_m'  , frq_m  )
             !
@@ -172,9 +173,10 @@
          CALL iom_put( 'sss_m', sss_m )
          CALL iom_put( 'ssh_m', ssh_m )
-         IF( .NOT.ln_linssh )   CALL iom_put( 'e3t_m', e3t_m )
+         CALL iom_put( 'e3t_m', e3t_m )
          CALL iom_put( 'frq_m', frq_m )
       ENDIF
       !
    END SUBROUTINE sbc_ssm
+
 
    SUBROUTINE sbc_ssm_init
@@ -186,7 +188,7 @@
       !! ** Action  : - read parameters
       !!----------------------------------------------------------------------
-      REAL(wp) ::   zcoef, zf_sbc       ! local scalar
+      REAL(wp) ::   zcoef, zf_sbc   ! local scalar
       !!----------------------------------------------------------------------
-
+      !
       IF( nn_fsbc == 1 ) THEN
          !
@@ -203,11 +205,11 @@
          IF( ln_rstart .AND. iom_varid( numror, 'nn_fsbc', ldstop = .FALSE. ) > 0 ) THEN
             l_ssm_mean = .TRUE.
-            CALL iom_get( numror               , 'nn_fsbc', zf_sbc )   ! sbc frequency of previous run
-            CALL iom_get( numror, jpdom_autoglo, 'ssu_m'  , ssu_m  )   ! sea surface mean velocity    (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'ssv_m'  , ssv_m  )   !   "         "    velocity    (V-point)
-            CALL iom_get( numror, jpdom_autoglo, 'sst_m'  , sst_m  )   !   "         "    temperature (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'sss_m'  , sss_m  )   !   "         "    salinity    (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'ssh_m'  , ssh_m  )   !   "         "    height      (T-point)
-            IF( .NOT.ln_linssh )   CALL iom_get( numror, jpdom_autoglo, 'e3t_m', e3t_m )
+            CALL iom_get( numror               , 'nn_fsbc', zf_sbc )    ! sbc frequency of previous run
+            CALL iom_get( numror, jpdom_autoglo, 'ssu_m'  , ssu_m  )    ! sea surface mean velocity    (U-point)
+            CALL iom_get( numror, jpdom_autoglo, 'ssv_m'  , ssv_m  )    !   "         "    velocity    (V-point)
+            CALL iom_get( numror, jpdom_autoglo, 'sst_m'  , sst_m  )    !   "         "    temperature (T-point)
+            CALL iom_get( numror, jpdom_autoglo, 'sss_m'  , sss_m  )    !   "         "    salinity    (T-point)
+            CALL iom_get( numror, jpdom_autoglo, 'ssh_m'  , ssh_m  )    !   "         "    height      (T-point)
+            CALL iom_get( numror, jpdom_autoglo, 'e3t_m'  , e3t_m  )    ! 1st level thickness          (T-point)
             ! fraction of solar net radiation absorbed in 1st T level
             IF( iom_varid( numror, 'frq_m', ldstop = .FALSE. ) > 0 ) THEN
@@ -226,5 +228,5 @@
                sss_m(:,:) = zcoef * sss_m(:,:)
                ssh_m(:,:) = zcoef * ssh_m(:,:)
-               IF( .NOT.ln_linssh )   e3t_m(:,:) = zcoef * e3t_m(:,:)
+               e3t_m(:,:) = zcoef * e3t_m(:,:)
                frq_m(:,:) = zcoef * frq_m(:,:)
             ELSE
@@ -242,7 +244,7 @@
          ELSE                    ;   sst_m(:,:) = tsn(:,:,1,jp_tem)
          ENDIF
-         sss_m(:,:) = tsn(:,:,1,jp_sal)
-         ssh_m(:,:) = sshn(:,:)
-         IF( .NOT.ln_linssh )   e3t_m(:,:) = e3t_n(:,:,1)
+         sss_m(:,:) = tsn  (:,:,1,jp_sal)
+         ssh_m(:,:) = sshn (:,:)
+         e3t_m(:,:) = e3t_n(:,:,1)
          frq_m(:,:) = 1._wp
          !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 6004)
@@ -19,6 +19,6 @@
    !
    USE fldread        ! read input fields
+   USE in_out_manager ! I/O manager
    USE iom            ! I/O manager
-   USE in_out_manager ! I/O manager
    USE lib_mpp        ! distribued memory computing library
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 6004)
@@ -6,15 +6,14 @@
    !! History :  9.0  !  2007  (O. Le Galloudec)  Original code
    !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers variables
-   USE dom_oce         ! ocean space and time domain
-   USE phycst
-   USE daymod
-   USE dynspg_oce
-   USE tideini
+   USE oce            ! ocean dynamics and tracers variables
+   USE dom_oce        ! ocean space and time domain
+   USE phycst         ! physical constant
+   USE daymod         ! calandar
+   USE tideini        ! 
    !
-   USE iom
-   USE in_out_manager  ! I/O units
-   USE ioipsl          ! NetCDF IPSL library
-   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE in_out_manager ! I/O units
+   USE iom            ! xIOs server
+   USE ioipsl         ! NetCDF IPSL library
+   USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
 
    IMPLICIT NONE
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 6004)
@@ -6,15 +6,14 @@
    !! History :  1.0  !  2007  (O. Le Galloudec)  Original code
    !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers variables
-   USE dom_oce         ! ocean space and time domain
-   USE phycst
-   USE daymod
-   USE dynspg_oce
-   USE tide_mod
+   USE oce            ! ocean dynamics and tracers variables
+   USE dom_oce        ! ocean space and time domain
+   USE phycst         ! physical constant
+   USE daymod         ! calandar
+   USE tide_mod       ! 
    !
-   USE iom
-   USE in_out_manager  ! I/O units
-   USE ioipsl          ! NetCDF IPSL library
-   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE in_out_manager ! I/O units
+   USE iom            ! xIOs server
+   USE ioipsl         ! NetCDF IPSL library
+   USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
 
    IMPLICIT NONE
@@ -28,7 +27,7 @@
    LOGICAL , PUBLIC ::   ln_tide_pot     !:
    LOGICAL , PUBLIC ::   ln_tide_ramp    !:
-   INTEGER , PUBLIC ::   nb_harmo                 !:
-   INTEGER , PUBLIC ::   kt_tide                  !:
-   REAL(wp), PUBLIC ::   rdttideramp              !:
+   INTEGER , PUBLIC ::   nb_harmo        !:
+   INTEGER , PUBLIC ::   kt_tide         !:
+   REAL(wp), PUBLIC ::   rdttideramp     !:
    
    INTEGER , PUBLIC, ALLOCATABLE, DIMENSION(:) ::   ntide   !:
@@ -41,76 +40,68 @@
 CONTAINS
    
-  SUBROUTINE tide_init ( kt )
-    !!----------------------------------------------------------------------
-    !!                 ***  ROUTINE tide_init  ***
-    !!----------------------------------------------------------------------      
-    !! * Local declarations
-    INTEGER  :: ji, jk
-    INTEGER, INTENT( in ) ::   kt     ! ocean time-step
-    CHARACTER(LEN=4), DIMENSION(jpmax_harmo) :: clname
-    INTEGER  ::   ios                 ! Local integer output status for namelist read
-    !
-    NAMELIST/nam_tide/ln_tide_pot, ln_tide_ramp, rdttideramp, clname
-    !!----------------------------------------------------------------------
-
-    IF ( kt == nit000 ) THEN
-       !
-       IF(lwp) THEN
-          WRITE(numout,*)
-          WRITE(numout,*) 'tide_init : Initialization of the tidal components'
-          WRITE(numout,*) '~~~~~~~~~ '
-       ENDIF
-       !
-       CALL tide_init_Wave
-       !
-       ! Read Namelist nam_tide
-       REWIND( numnam_ref )              ! Namelist nam_tide in reference namelist : Tides
-       READ  ( numnam_ref, nam_tide, IOSTAT = ios, ERR = 901)
-901    IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_tide in reference namelist', lwp )
-
-       REWIND( numnam_cfg )              ! Namelist nam_tide in configuration namelist : Tides
-       READ  ( numnam_cfg, nam_tide, IOSTAT = ios, ERR = 902 )
-902    IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_tide in configuration namelist', lwp )
-       IF(lwm) WRITE ( numond, nam_tide )
-       !
-       nb_harmo=0
-       DO jk = 1, jpmax_harmo
-          DO ji = 1,jpmax_harmo
-             IF( TRIM(clname(jk)) == Wave(ji)%cname_tide )   nb_harmo = nb_harmo + 1
-          END DO
-       END DO
-       !       
-       ! Ensure that tidal components have been set in namelist_cfg
-       IF( nb_harmo .EQ. 0 ) CALL ctl_stop( 'tide_init : No tidal components set in nam_tide' )
-       !
-       IF(lwp) THEN
-          WRITE(numout,*) '   Namelist nam_tide'
-          WRITE(numout,*) '      Apply astronomical potential : ln_tide_pot  =', ln_tide_pot
-          WRITE(numout,*) '                                     nb_harmo     = ', nb_harmo
-          WRITE(numout,*) '                                     ln_tide_ramp = ', ln_tide_ramp 
-          WRITE(numout,*) '                                     rdttideramp  = ', rdttideramp
-       ENDIF
-       IF( ln_tide_ramp.AND.((nitend-nit000+1)*rdt/rday < rdttideramp) )   &
-          &   CALL ctl_stop('rdttideramp must be lower than run duration')
-       IF( ln_tide_ramp.AND.(rdttideramp<0.) ) &
-          &   CALL ctl_stop('rdttideramp must be positive')
-       !
-       IF( .NOT. lk_dynspg_ts )   CALL ctl_warn( 'sbc_tide : use of time splitting is recommended' )
-       !
-       ALLOCATE( ntide(nb_harmo) )
-       DO jk = 1, nb_harmo
-          DO ji = 1, jpmax_harmo
-             IF( TRIM(clname(jk)) .eq. Wave(ji)%cname_tide ) THEN
-                ntide(jk) = ji
-                EXIT
-             END IF
-          END DO
-       END DO
-       !
-       ALLOCATE( omega_tide(nb_harmo), v0tide    (nb_harmo),   &
-          &      utide     (nb_harmo), ftide     (nb_harmo)  )
-       kt_tide = kt
-       !
+   SUBROUTINE tide_init
+      !!----------------------------------------------------------------------
+      !!                 ***  ROUTINE tide_init  ***
+      !!----------------------------------------------------------------------      
+      INTEGER  :: ji, jk
+      CHARACTER(LEN=4), DIMENSION(jpmax_harmo) :: clname
+      INTEGER  ::   ios                 ! Local integer output status for namelist read
+      !
+      NAMELIST/nam_tide/ln_tide_pot, ln_tide_ramp, rdttideramp, clname
+      !!----------------------------------------------------------------------
+      !
+      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) 'tide_init : Initialization of the tidal components'
+         WRITE(numout,*) '~~~~~~~~~ '
       ENDIF
+      !
+      CALL tide_init_Wave
+      !
+      ! Read Namelist nam_tide
+      REWIND( numnam_ref )              ! Namelist nam_tide in reference namelist : Tides
+      READ  ( numnam_ref, nam_tide, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_tide in reference namelist', lwp )
+      !
+      REWIND( numnam_cfg )              ! Namelist nam_tide in configuration namelist : Tides
+      READ  ( numnam_cfg, nam_tide, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_tide in configuration namelist', lwp )
+      IF(lwm) WRITE ( numond, nam_tide )
+      !
+      nb_harmo=0
+      DO jk = 1, jpmax_harmo
+         DO ji = 1,jpmax_harmo
+            IF( TRIM(clname(jk)) == Wave(ji)%cname_tide )   nb_harmo = nb_harmo + 1
+         END DO
+      END DO
+      !       
+      ! Ensure that tidal components have been set in namelist_cfg
+      IF( nb_harmo == 0 )   CALL ctl_stop( 'tide_init : No tidal components set in nam_tide' )
+      !
+      IF(lwp) THEN
+         WRITE(numout,*) '   Namelist nam_tide'
+         WRITE(numout,*) '      Apply astronomical potential : ln_tide_pot  =', ln_tide_pot
+         WRITE(numout,*) '                                     nb_harmo     = ', nb_harmo
+         WRITE(numout,*) '                                     ln_tide_ramp = ', ln_tide_ramp 
+         WRITE(numout,*) '                                     rdttideramp  = ', rdttideramp
+      ENDIF
+      IF( ln_tide_ramp.AND.((nitend-nit000+1)*rdt/rday < rdttideramp) )   &
+         &   CALL ctl_stop('rdttideramp must be lower than run duration')
+      IF( ln_tide_ramp.AND.(rdttideramp<0.) ) &
+         &   CALL ctl_stop('rdttideramp must be positive')
+      !
+      ALLOCATE( ntide(nb_harmo) )
+      DO jk = 1, nb_harmo
+         DO ji = 1, jpmax_harmo
+            IF( TRIM(clname(jk)) == Wave(ji)%cname_tide ) THEN
+               ntide(jk) = ji
+               EXIT
+            ENDIF
+         END DO
+      END DO
+      !
+      ALLOCATE( omega_tide(nb_harmo), v0tide    (nb_harmo),   &
+         &      utide     (nb_harmo), ftide     (nb_harmo)  )
+      kt_tide = nit000
       !
    END SUBROUTINE tide_init
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90	(revision 5883)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90	(revision 6004)
@@ -4,5 +4,5 @@
    !! Initialization of tidal forcing
    !!======================================================================
-   !! History :  9.0  !  07  (O. Le Galloudec)  Original code
+   !! History :  9.0  !  2007  (O. Le Galloudec)  Original code
    !!----------------------------------------------------------------------
 #if defined key_tide
@@ -10,12 +10,12 @@
    !!   'key_tide' :                                        tidal potential
    !!----------------------------------------------------------------------
-   !!   upd_tide       : update tidal potential
+   !!   upd_tide      : update tidal potential
    !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers variables
-   USE dom_oce         ! ocean space and time domain
-   USE in_out_manager  ! I/O units
-   USE phycst          ! physical constant
-   USE sbctide         ! tide potential variable
-   USE tideini, ONLY: ln_tide_ramp, rdttideramp
+   USE oce            ! ocean dynamics and tracers variables
+   USE dom_oce        ! ocean space and time domain
+   USE in_out_manager ! I/O units
+   USE phycst         ! physical constant
+   USE sbctide        ! tide potential variable
+   USE tideini  , ONLY:   ln_tide_ramp, rdttideramp
 
    IMPLICIT NONE
@@ -45,5 +45,5 @@
       INTEGER, INTENT(in), OPTIONAL ::   kbaro   ! number of sub-time-step           (lk_dynspg_ts=T only)
       INTEGER, INTENT(in), OPTIONAL ::   koffset ! time offset in number 
-                                                 ! of sub-time-steps                 (lk_dynspg_ts=T only)
+      !                                          ! of sub-time-steps                 (lk_dynspg_ts=T only)
       !
       INTEGER  ::   joffset      ! local integer
@@ -93,5 +93,4 @@
     WRITE(*,*) 'upd_tide: You should not have seen this print! error?', kt
   END SUBROUTINE upd_tide
-
 #endif
 
