Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbcblk_algo_ncar.F90
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbcblk_algo_ncar.F90	(revision 11631)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbcblk_algo_ncar.F90	(revision 11845)
@@ -42,7 +42,7 @@
    PRIVATE
 
-   PUBLIC ::   TURB_NCAR   ! called by sbcblk.F90
-   
-   INTEGER , PARAMETER ::   nb_itt = 4        ! number of itterations
+   PUBLIC :: TURB_NCAR   ! called by sbcblk.F90
+
+   INTEGER , PARAMETER ::   nb_itt = 5        ! number of itterations
 
    !!----------------------------------------------------------------------
@@ -52,5 +52,5 @@
       &                  Cd, Ch, Ce, t_zu, q_zu, U_blk,      &
       &                  Cdn, Chn, Cen                       )
-      !!----------------------------------------------------------------------------------
+      !!----------------------------------------------------------------------
       !!                      ***  ROUTINE  turb_ncar  ***
       !!
@@ -64,10 +64,10 @@
       !! -------
       !!    *  zt   : height for temperature and spec. hum. of air            [m]
-      !!    *  zu   : height for wind speed (generally 10m)                   [m]
-      !!    *  U_zu : scalar wind speed at 10m                                [m/s]
-      !!    *  sst  : SST                                                     [K]
+      !!    *  zu   : height for wind speed (usually 10m)                     [m]
+      !!    *  sst  : bulk SST                                                [K]
       !!    *  t_zt : potential air temperature at zt                         [K]
       !!    *  ssq  : specific humidity at saturation at SST                  [kg/kg]
       !!    *  q_zt : specific humidity of air at zt                          [kg/kg]
+      !!    *  U_zu : scalar wind speed at zu                                 [m/s]
       !!
       !!
@@ -79,5 +79,5 @@
       !!    *  t_zu   : pot. air temperature adjusted at wind height zu       [K]
       !!    *  q_zu   : specific humidity of air        //                    [kg/kg]
-      !!    *  U_blk  : bulk wind speed at 10m                                [m/s]
+      !!    *  U_blk  : bulk wind speed at zu                                 [m/s]
       !!
       !!
@@ -89,5 +89,5 @@
       REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   t_zt     ! potential air temperature              [Kelvin]
       REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   ssq      ! sea surface specific humidity           [kg/kg]
-      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   q_zt     ! specific air humidity                   [kg/kg]
+      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   q_zt     ! specific air humidity at zt             [kg/kg]
       REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   U_zu     ! relative wind module at zu                [m/s]
       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   Cd       ! transfer coefficient for momentum         (tau)
@@ -96,5 +96,5 @@
       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   t_zu     ! pot. air temp. adjusted at zu               [K]
       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   q_zu     ! spec. humidity adjusted at zu           [kg/kg]
-      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   U_blk    ! bulk wind at 10m                          [m/s]
+      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   U_blk    ! bulk wind speed at zu                     [m/s]
       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   Cdn, Chn, Cen ! neutral transfer coefficients
       !
@@ -111,5 +111,5 @@
       !
       l_zt_equal_zu = .FALSE.
-      IF( ABS(zu - zt) < 0.01 )   l_zt_equal_zu = .TRUE.    ! testing "zu == zt" is risky with double precision
+      IF( ABS(zu - zt) < 0.01_wp )   l_zt_equal_zu = .TRUE.    ! testing "zu == zt" is risky with double precision
 
       U_blk = MAX( 0.5_wp , U_zu )   !  relative wind speed at zu (normally 10m), we don't want to fall under 0.5 m/s
@@ -143,6 +143,6 @@
       t_zu = t_zt   ;   q_zu = q_zt
 
-      !!  * Now starting iteration loop
-      DO j_itt=1, nb_itt
+      !! ITERATION BLOCK
+      DO j_itt = 1, nb_itt
          !
          ztmp1 = t_zu - sst   ! Updating air/sea differences
@@ -217,7 +217,7 @@
          Ce  = Cx_n10*ztmp2 / ztmp1  ! L&Y 2004 eq. (10c)
          ENDIF
-         !
-      END DO
-      !
+
+      END DO !DO j_itt = 1, nb_itt
+
    END SUBROUTINE turb_ncar
 
@@ -265,17 +265,16 @@
       !! Universal profile stability function for momentum
       !!    !! Psis, L&Y 2004 eq. (8c), (8d), (8e)
-      !!     
-      !! pzet0 : stability paramenter, z/L where z is altitude measurement                                          
+      !!
+      !! pzeta : stability paramenter, z/L where z is altitude measurement
       !!         and L is M-O length
       !!
-      !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://github.com/brodeau/aerobulk/)
-      !!----------------------------------------------------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   pzeta
-      REAL(wp), DIMENSION(jpi,jpj)             ::   psi_m
-      !
-      INTEGER  ::   ji, jj         ! dummy loop indices
+      !! ** Author: L. Brodeau, June 2016 / AeroBulk (https://github.com/brodeau/aerobulk/)
+      !!----------------------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj) :: psi_m
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pzeta
+      !
+      INTEGER  ::   ji, jj    ! dummy loop indices
       REAL(wp) :: zx2, zx, zstab   ! local scalars
       !!----------------------------------------------------------------------------------
-      !
       DO jj = 1, jpj
          DO ji = 1, jpi
@@ -291,5 +290,4 @@
          END DO
       END DO
-      !
    END FUNCTION psi_m
 
@@ -300,13 +298,13 @@
       !!    !! Psis, L&Y 2004 eq. (8c), (8d), (8e)
       !!
-      !! pzet0 : stability paramenter, z/L where z is altitude measurement                                          
+      !! pzeta : stability paramenter, z/L where z is altitude measurement
       !!         and L is M-O length
       !!
-      !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://github.com/brodeau/aerobulk/)
-      !!----------------------------------------------------------------------------------
+      !! ** Author: L. Brodeau, June 2016 / AeroBulk (https://github.com/brodeau/aerobulk/)
+      !!----------------------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj) :: psi_h
       REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pzeta
-      REAL(wp), DIMENSION(jpi,jpj)             :: psi_h
-      !
-      INTEGER  ::   ji, jj    ! dummy loop indices
+      !
+      INTEGER  ::   ji, jj     ! dummy loop indices
       REAL(wp) :: zx2, zstab  ! local scalars
       !!----------------------------------------------------------------------------------
@@ -323,5 +321,4 @@
          END DO
       END DO
-      !
    END FUNCTION psi_h
 
