Index: NEMO/branches/2020/dev_r12512_HPC-04_mcastril_Mixed_Precision_implementation/src/ABL/sbcabl.F90
===================================================================
--- NEMO/branches/2020/dev_r12512_HPC-04_mcastril_Mixed_Precision_implementation/src/ABL/sbcabl.F90	(revision 13135)
+++ NEMO/branches/2020/dev_r12512_HPC-04_mcastril_Mixed_Precision_implementation/src/ABL/sbcabl.F90	(revision 13220)
@@ -71,12 +71,13 @@
          &                 ln_hpgls_frc, ln_geos_winds, nn_dyn_restore,           &
          &                 rn_ldyn_min , rn_ldyn_max, rn_ltra_min, rn_ltra_max,   &
-         &                 nn_amxl, rn_cm, rn_ct, rn_ce, rn_ceps, rn_Rod, rn_Ric, &
+         &                 nn_amxl, rn_Cm, rn_Ct, rn_Ce, rn_Ceps, rn_Rod, rn_Ric, &
          &                 ln_smth_pblh
       !!---------------------------------------------------------------------
 
-      ! Namelist namsbc_abl in reference namelist : ABL parameters
+                                        ! Namelist namsbc_abl in reference namelist : ABL parameters
       READ  ( numnam_ref, namsbc_abl, IOSTAT = ios, ERR = 901 )
 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_abl in reference namelist' )
-      ! Namelist namsbc_abl in configuration namelist : ABL parameters
+      !
+                                        ! Namelist namsbc_abl in configuration namelist : ABL parameters
       READ  ( numnam_cfg, namsbc_abl, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_abl in configuration namelist' )
@@ -165,4 +166,6 @@
       rn_Sch  = rn_ce / rn_cm
       mxl_min = (avm_bak / rn_cm) / sqrt( tke_min )
+      rn_Esfc =  1._wp / SQRT(rn_cm*rn_ceps)
+      rn_Lsfc = vkarmn * SQRT(SQRT(rn_cm*rn_ceps)) / rn_cm
 
       IF(lwp) THEN
@@ -171,5 +174,7 @@
          WRITE(numout,*) '    ~~~~~~~~~~~'
          IF(nn_amxl==0) WRITE(numout,*) 'Deardorff 80 length-scale '
-         IF(nn_amxl==1) WRITE(numout,*) 'length-scale based on the distance to the PBL height '
+         IF(nn_amxl==1) WRITE(numout,*) 'Modified Deardorff 80 length-scale '
+         IF(nn_amxl==2) WRITE(numout,*) 'Bougeault and Lacarrere length-scale '		 
+         IF(nn_amxl==3) WRITE(numout,*) 'Rodier et al. length-scale '	
          WRITE(numout,*) ' Minimum value of atmospheric TKE           = ',tke_min,' m^2 s^-2'
          WRITE(numout,*) ' Minimum value of atmospheric mixing length = ',mxl_min,' m'
@@ -178,4 +183,6 @@
          WRITE(numout,*) ' Constant for Schmidt number                = ',rn_Sch
          WRITE(numout,*) ' Constant for TKE dissipation               = ',rn_Ceps
+         WRITE(numout,*) ' Constant for TKE sfc boundary condition    = ',rn_Esfc
+         WRITE(numout,*) ' Constant for mxl sfc boundary condition    = ',rn_Lsfc
       END IF
 
@@ -202,4 +209,5 @@
       ! ABL timestep
       rDt_abl = nn_fsbc * rn_Dt
+      IF(lwp) WRITE(numout,*) ' ABL timestep = ', rDt_abl,' s'
 
       ! Check parameters for dynamics
@@ -248,7 +256,4 @@
          zcff         = 2._wp * omega * SIN( rad * 90._wp )   !++ fmax
          rest_eq(:,:) = SIN( 0.5_wp*rpi*( (fft_abl(:,:) - zcff) / zcff ) )**8
-         !!GS: alternative shape
-         !rest_eq(:,:) = SIN( 0.5_wp*rpi*(zcff - ABS(ff_t(:,:))) / (zcff - 3.e-5) )**8
-         !WHERE(ABS(ff_t(:,:)).LE.3.e-5) rest_eq(:,:) = 1._wp
       ELSE
          rest_eq(:,:) = 1._wp
@@ -271,6 +276,6 @@
          CALL fld_read( nit000, nn_fsbc, sf ) ! input fields provided at the first time-step
 
-         u_abl(:,:,:,nt_n      ) = sf(jp_wndi)%fnow(:,:,:)
-         v_abl(:,:,:,nt_n      ) = sf(jp_wndj)%fnow(:,:,:)
+          u_abl(:,:,:,nt_n      ) = sf(jp_wndi)%fnow(:,:,:)
+          v_abl(:,:,:,nt_n      ) = sf(jp_wndj)%fnow(:,:,:)
          tq_abl(:,:,:,nt_n,jp_ta) = sf(jp_tair)%fnow(:,:,:)
          tq_abl(:,:,:,nt_n,jp_qa) = sf(jp_humi)%fnow(:,:,:)
@@ -279,5 +284,4 @@
          avm_abl(:,:,:          ) = avm_bak
          avt_abl(:,:,:          ) = avt_bak
-         mxl_abl(:,:,:          ) = mxl_min
          pblh   (:,:            ) = ghw_abl( 3 )  !<-- assume that the pbl contains 3 grid points
          u_abl  (:,:,:,nt_a     ) = 0._wp
@@ -285,4 +289,7 @@
          tq_abl (:,:,:,nt_a,:   ) = 0._wp
          tke_abl(:,:,:,nt_a     ) = 0._wp
+
+         mxlm_abl(:,:,:         ) = mxl_min
+         mxld_abl(:,:,:         ) = mxl_min
       ENDIF
 
@@ -335,4 +342,5 @@
             &                tq_abl(:,:,2,nt_n,jp_ta), tq_abl(:,:,2,nt_n,jp_qa),   &   !   <<= in
             &                sf(jp_slp )%fnow(:,:,1) , sst_m, ssu_m, ssv_m     ,   &   !   <<= in
+            &                sf(jp_uoatm)%fnow(:,:,1), sf(jp_voatm)%fnow(:,:,1),   &   !   <<= in
             &                sf(jp_qsr )%fnow(:,:,1) , sf(jp_qlw )%fnow(:,:,1) ,   &   !   <<= in
             &                tsk_m, zssq, zcd_du, zsen, zevp                       )   !   =>> out
