Index: /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90
===================================================================
--- /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 9566)
+++ /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 9567)
@@ -311,5 +311,5 @@
             ztaevbk = ztatm * ztatm3 * zcldeff * ( 0.39 - 0.05 * zevsqr ) 
             !
-            zqlw(ji,jj) = - emic * stefan * ( ztaevbk + 4. * ztatm3 * ( zsst - ztatm ) ) 
+            zqlw(ji,jj) = - emic * stefan * ( ztaevbk + 4. * ztatm3 * ( zsst - ztatm ) ) * tmask(ji,jj,1) 
 
             !--------------------------------------------------
@@ -365,8 +365,8 @@
 
             ! sensible heat flux
-            zqsb(ji,jj) = zrhova * zcsho * 1004.0  * ( zsst - ztatm )  
+            zqsb(ji,jj) = zrhova * zcsho * 1004.0  * ( zsst - ztatm ) * tmask(ji,jj,1) 
          
             ! latent heat flux (bounded by zero)
-            zqla(ji,jj) = MAX(  0.e0, zrhova * zcleo * 2.5e+06 * ( zqsato - zqatm )  )
+            zqla(ji,jj) = MAX(  0.e0, zrhova * zcleo * 2.5e+06 * ( zqsato - zqatm )  ) * tmask(ji,jj,1)
             !               
          END DO
@@ -550,6 +550,6 @@
             zmt2  = ( 272.0 - ztatm(ji,jj) ) / 38.0   ;   zind2 = MAX( 0.e0, SIGN( 1.e0, zmt2 ) )
             zmt3  = ( 281.0 - ztatm(ji,jj) ) / 18.0   ;   zind3 = MAX( 0.e0, SIGN( 1.e0, zmt3 ) )
-            sprecip(ji,jj) = sf(jp_prec)%fnow(ji,jj,1) / rday   &      ! rday = converte mm/day to kg/m2/s
-               &         * (          zind1      &                   ! solid  (snow) precipitation [kg/m2/s]
+            sprecip(ji,jj) = sf(jp_prec)%fnow(ji,jj,1) / rday * tmask(ji,jj,1)  &      ! rday = converte mm/day to kg/m2/s
+               &         * (          zind1      &                                     ! solid  (snow) precipitation [kg/m2/s]
                &            + ( 1.0 - zind1 ) * (          zind2   * ( 0.5 + zmt2 )   &
                &                                 + ( 1.0 - zind2 ) *  zind3 * zmt3  )   ) 
@@ -591,5 +591,5 @@
                ztaevbk = ztatm3 * ztatm(ji,jj) * zcldeff * ( 0.39 - 0.05 * zevsqr(ji,jj) ) 
                !
-               z_qlw(ji,jj,jl) = - emic * stefan * ( ztaevbk + 4. * ztatm3 * ( ptsu(ji,jj,jl) - ztatm(ji,jj) ) ) 
+               z_qlw(ji,jj,jl) = - emic * stefan * ( ztaevbk + 4. * ztatm3 * ( ptsu(ji,jj,jl) - ztatm(ji,jj) ) ) * tmask(ji,jj,1)
 
                !----------------------------------------
@@ -618,8 +618,8 @@
             
                !  sensible heat flux
-               z_qsb(ji,jj,jl) = zrhovacshi * ( ptsu(ji,jj,jl) - ztatm(ji,jj) )
+               z_qsb(ji,jj,jl) = zrhovacshi * ( ptsu(ji,jj,jl) - ztatm(ji,jj) ) * tmask(ji,jj,1)
             
                !  latent heat flux 
-               qla_ice(ji,jj,jl) = MAX(  0.e0, zrhovaclei * ( zqsati - zqatm(ji,jj) )  )
+               qla_ice(ji,jj,jl) = MAX(  0.e0, zrhovaclei * ( zqsati - zqatm(ji,jj) )  ) * tmask(ji,jj,1)
               
                !  sensitivity of non solar fluxes (dQ/dT) (long-wave, sensible and latent fluxes)
@@ -643,5 +643,5 @@
       qns_ice(:,:,:) = z_qlw (:,:,:) - z_qsb (:,:,:) - qla_ice (:,:,:)      ! Downward Non Solar flux
 !CDIR COLLAPSE
-      tprecip(:,:)   = sf(jp_prec)%fnow(:,:,1) / rday                     ! total precipitation [kg/m2/s]
+      tprecip(:,:)   = sf(jp_prec)%fnow(:,:,1) / rday * tmask(:,:,1)        ! total precipitation [kg/m2/s]
       !
       ! ----------------------------------------------------------------------------- !
Index: /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 9566)
+++ /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 9567)
@@ -394,5 +394,6 @@
          &     * ( sf(jp_tair)%fnow(:,:,1) - rt0 ) * rcp                          &
          &     + sf(jp_snow)%fnow(:,:,1) * rn_pfac                                &   ! add solid  precip heat content at min(Tair,Tsnow)
-         &     * ( MIN( sf(jp_tair)%fnow(:,:,1), rt0_snow ) - rt0 ) * cpic * tmask(:,:,1)
+         &     * ( MIN( sf(jp_tair)%fnow(:,:,1), rt0_snow ) - rt0 ) * cpic
+      qns(:,:) = qns(:,:) * tmask(:,:,1)
       !
 #if defined key_lim3
@@ -409,6 +410,6 @@
          CALL iom_put( "qsr_oce" ,   qsr  )                 ! output downward solar heat over the ocean
          CALL iom_put( "qt_oce"  ,   qns+qsr )              ! output total downward heat over the ocean
-         tprecip(:,:) = sf(jp_prec)%fnow(:,:,1) * rn_pfac   ! output total precipitation [kg/m2/s]
-         sprecip(:,:) = sf(jp_snow)%fnow(:,:,1) * rn_pfac   ! output solid precipitation [kg/m2/s]
+         tprecip(:,:) = sf(jp_prec)%fnow(:,:,1) * rn_pfac * tmask(:,:,1) ! output total precipitation [kg/m2/s]
+         sprecip(:,:) = sf(jp_snow)%fnow(:,:,1) * rn_pfac * tmask(:,:,1) ! output solid precipitation [kg/m2/s]
          CALL iom_put( 'snowpre', sprecip * 86400. )        ! Snow
          CALL iom_put( 'precip' , tprecip * 86400. )        ! Total precipitation
@@ -608,6 +609,6 @@
       END DO
       !
-      tprecip(:,:) = sf(jp_prec)%fnow(:,:,1) * rn_pfac      ! total precipitation [kg/m2/s]
-      sprecip(:,:) = sf(jp_snow)%fnow(:,:,1) * rn_pfac      ! solid precipitation [kg/m2/s]
+      tprecip(:,:) = sf(jp_prec)%fnow(:,:,1) * rn_pfac * tmask(:,:,1)  ! total precipitation [kg/m2/s]
+      sprecip(:,:) = sf(jp_snow)%fnow(:,:,1) * rn_pfac * tmask(:,:,1)  ! solid precipitation [kg/m2/s]
       CALL iom_put( 'snowpre', sprecip * 86400. )                  ! Snow precipitation
       CALL iom_put( 'precip' , tprecip * 86400. )                  ! Total precipitation
Index: /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90
===================================================================
--- /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 9566)
+++ /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 9567)
@@ -461,11 +461,11 @@
       !!----------------------------------------------------------------------
 
-            esre  = shms(ji,jj) - shnow(ji,jj)   ! --- calculates the term : qs(Ta)-qa(t2d)
-
-            cseep = ce(ji,jj) * wndm(ji,jj) * esre     ! --- calculates the term : Ce*|V|*[qs(Ts)-qa(t2d)]
-
-            evap(ji,jj) = (cseep * rhom(ji,jj))  ! in [kg/m2/sec] !! --- calculates the EVAPORATION RATE [m/yr]
-
-            elat(ji,jj) = rhom(ji,jj) * cseep * heatlat(sst(ji,jj))
+            esre  = shms(ji,jj) - shnow(ji,jj) * tmask(ji,jj,1)   ! --- calculates the term : qs(Ta)-qa(t2d)
+
+            cseep = ce(ji,jj) * wndm(ji,jj) * esre * tmask(ji,jj,1)     ! --- calculates the term : Ce*|V|*[qs(Ts)-qa(t2d)]
+
+            evap(ji,jj) = (cseep * rhom(ji,jj)) * tmask(ji,jj,1)  ! in [kg/m2/sec] !! --- calculates the EVAPORATION RATE [m/yr]
+
+            elat(ji,jj) = rhom(ji,jj) * cseep * heatlat(sst(ji,jj)) * tmask(ji,jj,1)
 
       !!----------------------------------------------------------------------
@@ -635,8 +635,8 @@
 
           IF(cldnow(ji,jj).LT.0.3) THEN
-             qsw(ji,jj) = qtot * (1.-albedo)
+             qsw(ji,jj) = qtot * (1.-albedo) * tmask(ji,jj,1)
           ELSE
              qsw(ji,jj) = qtot*(1.-0.62*cldnow(ji,jj)              &
-                                + .0019*sunbet)*(1.-albedo)
+                                + .0019*sunbet)*(1.-albedo) * tmask(ji,jj,1)
           ENDIF
 
Index: /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 9566)
+++ /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 9567)
@@ -120,5 +120,5 @@
       IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN
          !
-         IF( .NOT. l_rnfcpl )   rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) )       ! updated runoff value at time step kt
+         IF( .NOT. l_rnfcpl )   rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1)  ! updated runoff value at time step kt
          !
          !                                                     ! set temperature & salinity content of runoffs
Index: /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 9566)
+++ /branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 9567)
@@ -97,5 +97,5 @@
                DO jj = 1, jpj
                   DO ji = 1, jpi
-                     zqrp = rn_dqdt * ( sst_m(ji,jj) - sf_sst(1)%fnow(ji,jj,1) )
+                     zqrp = rn_dqdt * ( sst_m(ji,jj) - sf_sst(1)%fnow(ji,jj,1) ) * tmask(ji,jj,1)
                      qns(ji,jj) = qns(ji,jj) + zqrp
                      qrp(ji,jj) = zqrp
@@ -111,5 +111,5 @@
                   DO ji = 1, jpi
                      zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) )   &      ! No damping in vicinity of river mouths
-                        &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) ) 
+                        &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) ) * tmask(ji,jj,1)
                      sfx(ji,jj) = sfx(ji,jj) + zerp                 ! salt flux
                      erp(ji,jj) = zerp / MAX( sss_m(ji,jj), 1.e-20 ) ! converted into an equivalent volume flux (diagnostic only)
@@ -126,5 +126,5 @@
                      zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) )   &      ! No damping in vicinity of river mouths
                         &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) )   &
-                        &        / MAX(  sss_m(ji,jj), 1.e-20   )
+                        &        / MAX(  sss_m(ji,jj), 1.e-20   ) * tmask(ji,jj,1)
                      IF( ln_sssr_bnd )   zerp = SIGN( 1., zerp ) * MIN( zerp_bnd, ABS(zerp) )
                      emp(ji,jj) = emp (ji,jj) + zerp
