Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/BENCH/MY_SRC/usrdef_sbc.F90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/BENCH/MY_SRC/usrdef_sbc.F90	(revision 14197)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/BENCH/MY_SRC/usrdef_sbc.F90	(revision 14644)
@@ -30,7 +30,7 @@
    PRIVATE
 
-   PUBLIC   usrdef_sbc_oce      ! routine called in sbcmod module
-   PUBLIC   usrdef_sbc_ice_tau  ! routine called by sbcice_lim.F90 for ice dynamics
-   PUBLIC   usrdef_sbc_ice_flx  ! routine called by sbcice_lim.F90 for ice thermo
+   PUBLIC   usrdef_sbc_oce      ! routine called by sbcmod.F90 for sbc ocean
+   PUBLIC   usrdef_sbc_ice_tau  ! routine called by icestp.F90 for ice dynamics
+   PUBLIC   usrdef_sbc_ice_flx  ! routine called by icestp.F90 for ice thermo
 
    !! * Substitutions
@@ -83,5 +83,4 @@
          !
       ENDIF
-      
       !
    END SUBROUTINE usrdef_sbc_oce
@@ -97,7 +96,6 @@
       INTEGER, INTENT(in) ::   kt   ! ocean time step
       !
-      REAL(wp), DIMENSION(jpi,jpj) ::   z2d   ! 2D workspace
+      REAL(wp) ::   zztmp
       INTEGER  ::   ji, jj
-      INTEGER  ::   igloi, igloj   ! to be removed in the future, see comment bellow
       !!---------------------------------------------------------------------
 #if defined key_si3
@@ -106,19 +104,11 @@
       ! define unique value on each point. z2d ranging from 0.05 to -0.05
       !
-      ! WARNING: to keep compatibility with the trunk that was including periodocity into the input data, 
-      ! we must define z2d as bellow.
-      ! Once we decide to forget trunk compatibility, we must simply define z2d as:
-!!$      DO_2D( 0, 0, 0, 0 )
-!!$         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) )
-!!$      END_2D
-      igloi = Ni0glo + 2 * COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) )
-      igloj = Nj0glo + 2 * COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) + 1 * COUNT( (/ jperio >= 4 .AND. jperio <= 6 /) )
       DO_2D( 0, 0, 0, 0 )
-         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * igloi, wp ) / REAL( igloi * igloj, wp ) )
+         zztmp = 0.1 * ( 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) )
+         utau_ice(ji,jj) = 0.1_wp + zztmp
+         vtau_ice(ji,jj) = 0.1_wp + zztmp
       END_2D
-      utau_ice(:,:) = 0.1_wp + z2d(:,:)
-      vtau_ice(:,:) = 0.1_wp + z2d(:,:)
 
-      CALL lbc_lnk_multi( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. )
+      CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. )
 #endif
       !
@@ -130,6 +120,5 @@
       !!                     ***  ROUTINE usrdef_sbc_ice_flx  ***
       !!
-      !! ** Purpose :   provide the surface boundary (flux) condition over
-      !sea-ice
+      !! ** Purpose :   provide the surface boundary (flux) condition over sea-ice
       !!---------------------------------------------------------------------
       INTEGER, INTENT(in) ::   kt   ! ocean time step
@@ -139,6 +128,6 @@
       REAL(wp), DIMENSION(jpi,jpj) ::   zsnw   ! snw distribution after wind blowing
       !!---------------------------------------------------------------------
+#if defined key_si3
       !
-#if defined key_si3
       IF( kt==nit000 .AND. lwp)   WRITE(numout,*)' usrdef_sbc_ice : BENCH case: NO flux forcing'
       !
@@ -146,10 +135,11 @@
       emp_oce (:,:)   = 0._wp   ! uniform value for freshwater budget (E-P)
       qsr_oce (:,:)   = 0._wp   ! uniform value for     solar radiation
-      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar radiation
+      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar heat flux
 
       ! ice variables
       alb_ice (:,:,:) = 0.7_wp  ! useless
       qsr_ice (:,:,:) = 0._wp   ! uniform value for     solar radiation
-      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar radiation
+      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar heat flux
+      dqns_ice(:,:,:) = 0._wp   ! uniform value for non solar heat flux sensitivity for ice
       sprecip (:,:)   = 0._wp   ! uniform value for snow precip
       evap_ice(:,:,:) = 0._wp   ! uniform value for sublimation
@@ -157,6 +147,5 @@
       ! ice fields deduced from above
       zsnw(:,:) = 1._wp
-      !!CALL lim_thd_snwblow( at_i_b, zsnw )  ! snow distribution over ice after
-      !wind blowing 
+      !!CALL lim_thd_snwblow( at_i_b, zsnw )  ! snow distribution over ice after wind blowing 
       emp_ice  (:,:)   = SUM( a_i_b(:,:,:) * evap_ice(:,:,:), dim=3 ) - sprecip(:,:) * zsnw(:,:)
       emp_oce  (:,:)   = emp_oce(:,:) - sprecip(:,:) * (1._wp - zsnw(:,:) )
@@ -173,5 +162,4 @@
       ! --- shortwave radiation transmitted thru the surface scattering layer (W/m2) --- !
       qtr_ice_top(:,:,:) = 0._wp
-
 #endif
 
