From 0ba60c9550ee759123d17fdbaa510a8615293c4c Mon Sep 17 00:00:00 2001
From: Quentin Rodier <quentin.rodier@meteo.fr>
Date: Mon, 7 Mar 2022 15:48:13 +0100
Subject: [PATCH] Quentin 07/03/2022: bugfix (missing ,) in aro_turb_mnh + move
 LHARAT declaration from modd_cturb to modd_turbn

---
 src/arome/ext/aro_turb_mnh.F90 |  2 +-
 src/arome/ext/aroini_turb.F90  | 78 ++++++++++++++++++++++++++++++++++
 src/common/aux/modd_turbn.F90  |  1 +
 3 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 src/arome/ext/aroini_turb.F90

diff --git a/src/arome/ext/aro_turb_mnh.F90 b/src/arome/ext/aro_turb_mnh.F90
index 80e069a48..65bfcf844 100644
--- a/src/arome/ext/aro_turb_mnh.F90
+++ b/src/arome/ext/aro_turb_mnh.F90
@@ -442,7 +442,7 @@ HCLOUD="ICE3"
 CALL TURB (CST,CSTURB,TBUCONF,KLEV+2,1,KKL,IMI, KRR, KRRL, KRRI, HLBCX, HLBCY,&
    & ISPLIT,IMI, KSV, KSV_LGBEG, KSV_LGEND, &
    & HPROGRAM, O2D, ONOMIXLG, OFLAT, & 
-   & OTURB_FLX,OTURB_DIAG,OSUBG_COND,ORMC01,OOCEAN,LDHARATU    &
+   & OTURB_FLX,OTURB_DIAG,OSUBG_COND,ORMC01,OOCEAN,LDHARATU,    &
    & HTURBDIM,HTURBLEN,'NONE','NONE','LIMA',           &
    & ZIMPL,                                    &
    & 2*PTSTEP,ZTFILE,                                      &
diff --git a/src/arome/ext/aroini_turb.F90 b/src/arome/ext/aroini_turb.F90
new file mode 100644
index 000000000..8d5046c68
--- /dev/null
+++ b/src/arome/ext/aroini_turb.F90
@@ -0,0 +1,78 @@
+!     ######spl
+SUBROUTINE AROINI_TURB(PLINI,OHARATU)
+USE PARKIND1, ONLY : JPRB
+USE YOMHOOK , ONLY : LHOOK, DR_HOOK
+!**** *INI_TURB*   - Initialize common meso_NH MODD_ used in Turbulence scheme
+!                    for AROME
+!     Purpose.
+!     --------
+!           Initialize MODD_LES and  MODD_TKE
+!           parameters used in AROME turbulence scheme 
+
+!**   Interface.
+!     ----------
+!        *CALL* *INI_TURB
+
+!        Explicit arguments :
+!        --------------------
+!        None
+
+!        Implicit arguments :
+!        --------------------
+!        
+
+!     Method.
+!     -------
+!        See documentation
+
+!     Externals.
+!     ----------
+
+!     Reference.
+!     ----------
+!        Documentation AROME 
+
+!     Author.
+!     -------
+!        Y. Seity 
+
+!     Modifications.
+!     --------------
+!        Original : 03-12-12
+!     ------------------------------------------------------------------
+
+USE MODD_LES,   ONLY : LLES, LLES_CALL
+USE MODD_CTURB, ONLY : XLINI
+USE MODD_TURB_n, ONLY: LHARAT
+USE MODI_INI_CTURB
+
+IMPLICIT NONE
+!
+!*       0.1   Declarations of dummy arguments :
+!
+!
+REAL,   INTENT(IN) :: PLINI ! minimum bl89 mixing length
+LOGICAL,INTENT(IN) :: OHARATU ! switch HARATU
+!
+!     ------------------------------------------------------------------
+
+!         1. Set implicit default values for MODD_CTURB
+
+REAL(KIND=JPRB) :: ZHOOK_HANDLE
+IF (LHOOK) CALL DR_HOOK('AROINI_TURB',0,ZHOOK_HANDLE)
+CALL INI_CTURB
+
+!         1bis. Modification of MODD_CTURB values
+XLINI=PLINI
+LHARAT=OHARATU
+
+!         2. Set implicit default values for MODD_LES
+
+LLES=.FALSE.
+LLES_CALL=.FALSE.
+
+
+!     ------------------------------------------------------------------
+IF (LHOOK) CALL DR_HOOK('AROINI_TURB',1,ZHOOK_HANDLE)
+RETURN
+END SUBROUTINE AROINI_TURB
diff --git a/src/common/aux/modd_turbn.F90 b/src/common/aux/modd_turbn.F90
index 03cb317eb..cbef6ae00 100644
--- a/src/common/aux/modd_turbn.F90
+++ b/src/common/aux/modd_turbn.F90
@@ -71,6 +71,7 @@ IMPLICIT NONE
   LOGICAL            :: LSIGMAS   ! Switch for using Sigma_s from turbulence scheme
   LOGICAL            :: LSIG_CONV ! Switch for computing Sigma_s due to convection
 !
+  LOGICAL            :: LHARAT
   LOGICAL            :: LRMC01    ! Switch for computing separate mixing
 !                                    ! and dissipative length in the SBL
 !                                    ! according to Redelsperger, Mahe &
-- 
GitLab