diff --git a/src/LIB/Python/Panel_Plot.py b/src/LIB/Python/Panel_Plot.py
index dc5cfb6ffbc10fef09b834386192603de5850466..7fb3147dd9a0c45724dbcf80627b318c43bf9a73 100644
--- a/src/LIB/Python/Panel_Plot.py
+++ b/src/LIB/Python/Panel_Plot.py
@@ -56,8 +56,8 @@ class PanelPlot():
         # Grid lines and labels
       if 'PlateCarree' in str(projo):
         gl = ax.gridlines(crs=self.projo, draw_labels=True, linewidth=1, color='gray')
-        gl.xlabels_top = False
-        gl.ylabels_right = False
+        gl.top_labels = False
+        gl.right_labels = False
         
         #  Coastlines
       if self.drawCoastLines and 'GeoAxes' in str(type(ax)):
diff --git a/src/LIB/Python/read_MNHfile.py b/src/LIB/Python/read_MNHfile.py
index 5158f4b67218b64a16fb1e4335f993aed85ed249..375d5effe088b07bbf7331c92c53967154f5685c 100644
--- a/src/LIB/Python/read_MNHfile.py
+++ b/src/LIB/Python/read_MNHfile.py
@@ -38,7 +38,6 @@ def read_BACKUPfile(nameF, ifile, Dvar_input, Dvar_output, path='.', removeHALO=
     #  Read variables
     n_dim = theFile.variables[var].ndim
     name_dim = theFile.variables[var].dimensions
- #   print(var + "  n_dim  = " + str(n_dim))
     
     if (n_dim ==0) or (n_dim == 1 and 'time' in name_dim):  #Scalaires or Variable time
       Dvar_output[ifile][var] = theFile.variables[var][0].data
@@ -178,12 +177,12 @@ def read_TIMESfiles_55(theFile, ifile, Dvar_input, Dvar_output, removeHALO=False
                     else: 
                         raise NameError("Lecture des variables de dimension sup a 2 pas encore implementees pour fichiers .000")
         except KeyError: # NetCDF4 Group not specified by the user
-            if '(cart)' in var_name or '(neb)' in var_name or '(clear)' in var_name or '(cs1)' in var_name or '(cs2)' in var_name or '(cs3)' in var_name:
+            if '(cart)' in var_name or '(neb)' in var_name or '(clear)' in var_name or '(cs1)' in var_name or '(cs2)' in var_name or '(cs3)' in var_name or 'AVEF' in suffix or 'INIF' in suffix or 'ENDF' in suffix:
             # If users specify the complete variable name with averaging type
               group_name = get_group_from_varname(var_name)
             else:
               group_name = var_name
-            read_from_group(theFile, Dvar_output, var, var)
+            read_from_group(theFile, Dvar_output, group_name, var)
         return Dvar_output
 
     def read_from_group(theFile, Dvar_output, group_name, var):
@@ -220,9 +219,9 @@ def read_TIMESfiles_55(theFile, ifile, Dvar_input, Dvar_output, removeHALO=False
         return Dvar_output
     for var in Dvar_input[ifile]: #For each var
         if type(var) == tuple:
-            Dvar_output[ifile] = read_from_group(theFile, Dvar_output, var[0], var[1])
+            Dvar_output[ifile] = read_from_group(theFile, Dvar_output[ifile], var[0], var[1])
         else:
-            Dvar_output[ifile] = read_var(theFile, Dvar_output, var)
+            Dvar_output[ifile] = read_var(theFile, Dvar_output[ifile], var)
     
     return Dvar_output #Return the dic of [files][variables]
 
@@ -249,9 +248,12 @@ def remove_PROC(var):
 
 def get_group_from_varname(var):
     group_name=''
-    for i in range(len(var)):
-      if var[i] is not ' ':
-        group_name+=var[i]
-      else: # As soon as the caracter is a blank, the group variable is set
-        break
+    if '___ENDF' in var or '___INIF' in var or '___AVEF' in var: #Variable CART
+        suff, group_name = remove_PROC(var)
+    else: #Variable with whites in names ex: 'MEAN_TH     (cart)'
+        for i in range(len(var)):
+          if var[i] != ' ':
+            group_name+=var[i]
+          else: # As soon as the caracter is a blank, the group variable is set
+            break
     return group_name 
diff --git a/src/MNH/adv_forcingn.f90 b/src/MNH/adv_forcingn.f90
index 963f453dc3cf601ce480bc3c3236a23227b6f140..b98a9cbe9c7b5ce512a8472cbae43b6c15a05656 100644
--- a/src/MNH/adv_forcingn.f90
+++ b/src/MNH/adv_forcingn.f90
@@ -53,12 +53,6 @@ END MODULE MODI_ADV_FORCING_n
 !!
 !!   NB:   For relaxation forcing, only mask=FIXE has been implemented for simplicity
 !!
-!!   DUMMIES: LDUMMY(2)=T allows ADV forcing
-!!            LDUMMY3=T ------- REL -------
-!!                   with XDUMMY1=lower limit of relaxation (m)
-!!                        XDUMMY2=top limit of relxation (m)
-!!                        XDUMMY3=relaxation timsescale (s)
-!!
 !!    EXTERNAL
 !!    --------
 !!      Temporal_lt function   (compare 2 TYPEd date_and_time data)
@@ -77,7 +71,6 @@ END MODULE MODI_ADV_FORCING_n
 !!        JPVEXT: define the number of marginal points out of the 
 !!        physical domain along the vertical direction.    
 !!      Module MODD_TIME: contains the structure of the TYPEd date_and_time
-!!      Module MODD_BLANK: Uses LDUMMY(2)=T to activate the time varying adv frc 
 !!
 !!    REFERENCE
 !!    ---------
@@ -220,7 +213,6 @@ END IF
 !    2.2 Integration of the  forcing in the source
 !   ------------------------------------------
 
-!    2.2.1 Advective forcing in LDUMMY(2)=T
  DO JK=1,JPVEXT
   ZXADVTHFRC(:,:,JK)    = 0.
   ZXADVRVFRC(:,:,JK)    = 0.
diff --git a/src/MNH/ch_aer_eqm_initn.f90 b/src/MNH/ch_aer_eqm_initn.f90
index acece90b873e701417f00e2f778e8936bca66df6..f08e48cff7b63f9b292d177d60e25dacbe914e74 100644
--- a/src/MNH/ch_aer_eqm_initn.f90
+++ b/src/MNH/ch_aer_eqm_initn.f90
@@ -59,7 +59,6 @@ USE MODD_NSV
 USE MODD_CONF
 USE MODE_ll
 USE MODD_PARAMETERS, ONLY : JPVEXT
-USE MODD_BLANK , ONLY : CDUMMY1
 USE MODD_CST, ONLY :       & 
           XMNH_TINY        &
          ,XAVOGADRO        & ![molec/mol] avogadros number
diff --git a/src/MNH/compute_updraft_hrio.f90 b/src/MNH/compute_updraft_hrio.f90
deleted file mode 100644
index adccc8ca9fe3a2469fb42f78e4b15aa2268aef7a..0000000000000000000000000000000000000000
--- a/src/MNH/compute_updraft_hrio.f90
+++ /dev/null
@@ -1,868 +0,0 @@
-!MNH_LIC Copyright 2004-2019 CNRS, Meteo-France and Universite Paul Sabatier
-!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
-!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
-!MNH_LIC for details. version 1.
-!-----------------------------------------------------------------
-!     ######spl
-     MODULE MODI_COMPUTE_UPDRAFT_HRIO
-!    ###########################
-!
-INTERFACE
-!
-!     #################################################################
-      SUBROUTINE COMPUTE_UPDRAFT_HRIO(KKA,KKB,KKE,KKU,KKL, HFRAC_ICE,   &
-                                 OENTR_DETR,OMIXUV,                &
-                                 ONOMIXLG,KSV_LGBEG,KSV_LGEND,     &
-                                 PZZ,PDZZ,                         &
-                                 PSFTH,PSFRV,                      &
-                                 PPABSM,PRHODREF,PUM,PVM,PTKEM,PWM,&
-                                 PTHM,PRVM,PTHLM,PRTM,             &
-                                 PSVM,PTHL_UP,PRT_UP,              &
-                                 PRV_UP,PRC_UP,PRI_UP,PTHV_UP,     &
-                                 PW_UP,PU_UP, PV_UP, PSV_UP,       &
-                                 PFRAC_UP,PFRAC_ICE_UP,PRSAT_UP,   &
-                                 PTHL_DO, PTHV_DO, PRT_DO,         &
-                                 PU_DO, PV_DO, PSV_DO,             &
-                                 PEMF,PDETR,PENTR,                 &
-                                 PBUO_INTEG,KKLCL,KKETL,KKCTL,     &
-                                 PDEPTH)
-!     #################################################################
-!
-!*                    1.1  Declaration of Arguments
-!
-!
-!
-INTEGER,                INTENT(IN)   :: KKA          ! near ground array index
-INTEGER,                INTENT(IN)   :: KKB          ! near ground physical index
-INTEGER,                INTENT(IN)   :: KKE          ! uppest atmosphere physical index
-INTEGER,                INTENT(IN)   :: KKU          ! uppest atmosphere array index
-INTEGER,                INTENT(IN)   :: KKL          ! +1 if grid goes from ground to atmosphere top, -1 otherwise
-CHARACTER(len=1),       INTENT(IN)   :: HFRAC_ICE    ! partition liquid/ice scheme
-LOGICAL,                INTENT(IN) :: OENTR_DETR! flag to recompute entrainment, detrainment and mass flux
-LOGICAL,                INTENT(IN) :: OMIXUV    ! True if mixing of momentum
-LOGICAL,                INTENT(IN)   :: ONOMIXLG  ! False if mixing of lagrangian tracer
-INTEGER,                INTENT(IN)   :: KSV_LGBEG ! first index of lag. tracer
-INTEGER,                INTENT(IN)   :: KSV_LGEND ! last  index of lag. tracer
-REAL, DIMENSION(:,:), INTENT(IN)   :: PZZ       !  Height at the flux point
-REAL, DIMENSION(:,:), INTENT(IN)   :: PDZZ      !  Metrics coefficient
- 
-REAL, DIMENSION(:),   INTENT(IN)   ::  PSFTH,PSFRV
-! normal surface fluxes of theta,rv,(u,v) parallel to the orography
-!
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PPABSM     ! Pressure at t-dt
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PRHODREF   ! dry density of the
-                                                  ! reference state
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PUM        ! u mean wind
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PVM        ! v mean wind
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PTKEM      ! TKE at t-dt
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PWM        ! w mean wind
-!
-REAL, DIMENSION(:,:),   INTENT(IN)   ::  PTHM           ! liquid pot. temp. at t-dt
-REAL, DIMENSION(:,:),   INTENT(IN)   ::  PRVM           ! vapor mixing ratio at t-dt
-REAL, DIMENSION(:,:),   INTENT(IN)   ::  PTHLM,PRTM     ! cons. var. at t-dt
-
-REAL, DIMENSION(:,:,:), INTENT(IN)   ::  PSVM           ! scalar var. at t-dt
-
-REAL, DIMENSION(:,:),   INTENT(OUT)  ::  PTHL_UP,PRT_UP   ! updraft properties
-REAL, DIMENSION(:,:),   INTENT(OUT)  ::  PU_UP, PV_UP     ! updraft wind components
-REAL, DIMENSION(:,:),   INTENT(INOUT)::  PRV_UP,PRC_UP, & ! updraft rv, rc
-                                         PRI_UP,PTHV_UP,& ! updraft ri, THv
-                                         PW_UP,PFRAC_UP,& ! updraft w, fraction
-                                         PFRAC_ICE_UP,&   ! liquid/solid fraction in updraft
-                                         PRSAT_UP         ! Rsat
-REAL, DIMENSION(:,:),   INTENT(INOUT)::  PTHL_DO,PTHV_DO,PRT_DO,PU_DO,PV_DO
-
-REAL, DIMENSION(:,:,:), INTENT(OUT)  ::  PSV_UP           ! updraft scalar var. 
-REAL, DIMENSION(:,:,:), INTENT(OUT)  ::  PSV_DO           ! downdraft scalar var. 
-                                         
-REAL, DIMENSION(:,:),   INTENT(INOUT)::  PEMF,PDETR,PENTR ! Mass_flux,
-                                                          ! entrainment, detrainment
-REAL, DIMENSION(:,:),   INTENT(INOUT) :: PBUO_INTEG       ! Integrated Buoyancy 
-INTEGER, DIMENSION(:),  INTENT(INOUT)::  KKLCL,KKETL,KKCTL! LCL, ETL, CTL                                           
-REAL, DIMENSION(:),     INTENT(OUT)   :: PDEPTH           ! Deepness of cloud
-
-
-END SUBROUTINE COMPUTE_UPDRAFT_HRIO
-
-END INTERFACE
-!
-END MODULE MODI_COMPUTE_UPDRAFT_HRIO!     ######spl
-      SUBROUTINE COMPUTE_UPDRAFT_HRIO(KKA,KKB,KKE,KKU,KKL,HFRAC_ICE, &
-                                 OENTR_DETR,OMIXUV,                  &
-                                 ONOMIXLG,KSV_LGBEG,KSV_LGEND,       &
-                                 PZZ,PDZZ,                           &
-                                 PSFTH,PSFRV,                        &
-                                 PPABSM,PRHODREF,PUM,PVM,PTKEM,PWM,  &                                      
-                                 PTHM,PRVM,PTHLM,PRTM,               &
-                                 PSVM,PTHL_UP,PRT_UP,                &
-                                 PRV_UP,PRC_UP,PRI_UP,PTHV_UP,       &
-                                 PW_UP,PU_UP, PV_UP, PSV_UP,         &
-                                 PFRAC_UP,PFRAC_ICE_UP,PRSAT_UP,     &
-                                 PTHL_DO, PTHV_DO, PRT_DO, &
-                                 PU_DO, PV_DO, PSV_DO,         &
-                                 PEMF,PDETR,PENTR,                   &
-                                 PBUO_INTEG,KKLCL,KKETL,KKCTL,       &
-                                 PDEPTH )
-!     #################################################################
-!!
-!!****  *COMPUTE_UPDRAFT_HRIO* - calculates caracteristics of the updraft 
-!!                         
-!!
-!!    PURPOSE
-!!    -------
-!!****  The purpose of this routine is to build the updraft model 
-!!
-!
-!!**  METHOD
-!!    ------
-!!
-!!    EXTERNAL
-!!    --------
-!!      
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!
-!!      !!     REFERENCE
-!!     ---------
-!!       Book 1 of Meso-NH documentation (chapter Turbulence)
-!!       Soares et al. 2004 QJ
-!!
-!!     AUTHOR
-!!     ------
-!!     J.Pergaud
-!!     V.Masson : Optimization 07/2010
-!!     S. Riette : 07/2010 : modification for reproducibility  
-!!     S. Riette may 2011: ice added, interface modified
-!!     S. Riette Jan 2012: support for both order of vertical levels
-!!     V.Masson, C.Lac : 02/2011 : SV_UP initialized by a non-zero value
-!!     Q.Rodier  01/2019 : support RM17 mixing length 
-!  P. Wautelet 12/04/2019: replace ABORT and STOP calls by Print_msg
-!! --------------------------------------------------------------------------
-!
-!*      0. DECLARATIONS
-!          ------------
-!
-USE MODD_CST
-USE MODD_PARAM_MFSHALL_n, ONLY : XPRES_UV,XALP_PERT,XCMF,XFRAC_UP_MAX,XA1,XB,&
-                          XC,XBETA1
-!USE MODD_CMFSHALL, ONLY : XPRES_UV,XALP_PERT,XCMF,XFRAC_UP_MAX,XA1,XALPHA_SEUIL,LNORM_RESOL,&
-!                          XCOEF1,XCOEF2,XCOEF3,NBUOY,XB,&
-!                          XC,XBETA1
-USE MODD_GRID_n, ONLY : XDXHAT, XDYHAT
-USE MODD_BLANK
-USE MODD_TURB_n, ONLY :CTURBLEN
-
-use mode_msg
-
-!USE MODI_COMPUTE_ENTR_DETR
-USE MODI_TH_R_FROM_THL_RT_1D
-USE MODI_SHUMAN_MF
-
-USE MODI_COMPUTE_BL89_ML
-
-IMPLICIT NONE
-
-!*                    1.1  Declaration of Arguments
-!
-!
-!
-INTEGER,                INTENT(IN)   :: KKA          ! near ground array index
-INTEGER,                INTENT(IN)   :: KKB          ! near ground physical index
-INTEGER,                INTENT(IN)   :: KKE          ! uppest atmosphere physical index
-INTEGER,                INTENT(IN)   :: KKU          ! uppest atmosphere array index
-INTEGER,                INTENT(IN)   :: KKL          ! +1 if grid goes from ground to atmosphere top, -1 otherwise
-CHARACTER(len=1),       INTENT(IN)   :: HFRAC_ICE    ! partition liquid/ice scheme
-LOGICAL,                INTENT(IN) :: OENTR_DETR! flag to recompute entrainment, detrainment and mass flux
-LOGICAL,                INTENT(IN) :: OMIXUV    ! True if mixing of momentum
-LOGICAL,                INTENT(IN)   :: ONOMIXLG  ! False if mixing of lagrangian tracer
-INTEGER,                INTENT(IN)   :: KSV_LGBEG ! first index of lag. tracer
-INTEGER,                INTENT(IN)   :: KSV_LGEND ! last  index of lag. tracer
-! FAUX dans AROME, mais pas grave dans la paramétrisation
-REAL, DIMENSION(:,:), INTENT(IN)   :: PZZ       !  Height at the flux point
-REAL, DIMENSION(:,:), INTENT(IN)   :: PDZZ      !  Metrics coefficient
- 
-REAL, DIMENSION(:),   INTENT(IN)   ::  PSFTH,PSFRV
-! normal surface fluxes of theta,rv,(u,v) parallel to the orography
-!
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PPABSM     ! Pressure at t-dt
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PRHODREF   ! dry density of the
-                                                  ! reference state
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PUM        ! u mean wind
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PVM        ! v mean wind
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PWM        ! w mean wind
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PTKEM      ! TKE at t-dt
-!
-REAL, DIMENSION(:,:),   INTENT(IN)   ::  PTHM           ! liquid pot. temp. at t-dt
-REAL, DIMENSION(:,:),   INTENT(IN)   ::  PRVM           ! vapor mixing ratio at t-dt
-REAL, DIMENSION(:,:),   INTENT(IN)   ::  PTHLM,PRTM     ! cons. var. at t-dt
-
-REAL, DIMENSION(:,:,:), INTENT(IN)   ::  PSVM           ! scalar var. at t-dt
-
-REAL, DIMENSION(:,:),   INTENT(OUT)  ::  PTHL_UP,PRT_UP   ! updraft properties
-REAL, DIMENSION(:,:),   INTENT(OUT)  ::  PU_UP, PV_UP     ! updraft wind components
-REAL, DIMENSION(:,:),   INTENT(INOUT)::  PRV_UP,PRC_UP, & ! updraft rv, rc
-                                         PRI_UP,PTHV_UP,& ! updraft ri, THv
-                                         PW_UP,PFRAC_UP,& ! updraft w, fraction
-                                         PFRAC_ICE_UP,&   ! liquid/solid fraction in updraft
-                                         PRSAT_UP         ! Rsat
-REAL, DIMENSION(:,:),   INTENT(INOUT)::  PTHL_DO,PTHV_DO,PRT_DO,PU_DO,PV_DO ! environment var.
-
-REAL, DIMENSION(:,:,:), INTENT(OUT)  ::  PSV_UP           ! updraft scalar var. 
-REAL, DIMENSION(:,:,:), INTENT(OUT)  ::  PSV_DO           ! environment scalar var. 
-                                         
-REAL, DIMENSION(:,:),   INTENT(INOUT)::  PEMF,PDETR,PENTR ! Mass_flux,
-                                                          ! detrainment,entrainment
-REAL, DIMENSION(:,:),   INTENT(INOUT) :: PBUO_INTEG       ! Integrated Buoyancy 
-INTEGER, DIMENSION(:),  INTENT(INOUT) :: KKLCL,KKETL,KKCTL! LCL, ETL, CTL
-REAL, DIMENSION(:),     INTENT(OUT)   :: PDEPTH           ! Deepness of cloud
-!                       1.2  Declaration of local variables
-!
-!
-! Mean environment variables at t-dt at flux point
-REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) ::    &
-                        ZTHM_F,ZRVM_F                 ! Theta,rv of
-                                                      ! updraft environnement
-REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) ::    &
-                        ZRTM_F, ZTHLM_F, ZTKEM_F,&    ! rt, thetal,TKE,pressure,
-                        ZUM_F,ZVM_F,ZRHO_F,      &    ! density,momentum
-                        ZPRES_F,ZTHVM_F,ZTHVM,   &    ! interpolated at the flux point
-                        ZG_O_THVREF,             &    ! g*ThetaV ref
-                        ZW_UP2                        ! w**2  of the updraft
-!==================================================================================                        
-REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) :: ZW_UP   ! w  of the updraft
-REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) :: ZWM_M   ! w at mass levels
-
-REAL, DIMENSION(SIZE(PSVM,1),SIZE(PTHM,2),SIZE(PSVM,3)) :: &
-                        ZSVM_F ! scalar variables 
-
-                        
-REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) ::  &
-                        ZTH_UP,                  &    ! updraft THETA 
-                        ZRC_MIX, ZRI_MIX              ! guess of Rc and Ri for KF mixture
-!==================================================================================                        
-REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) :: PTHVREF                       ! THv de référence 
-REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) :: ZBUO                          ! Buoyancy 
-REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) :: ZZDZ                          ! Dz 
-!==================================================================================                        
-
-REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) ::  ZCOEF  ! diminution coefficient for too high clouds 
-                        
-REAL, DIMENSION(SIZE(PSFTH,1) )            ::  ZWTHVSURF  ! Surface w'thetav'
-
-REAL  :: ZRDORV       ! RD/RV
-REAL  :: ZRVORD       ! RV/RD
-
-
-REAL, DIMENSION(SIZE(PTHM,1)) :: ZMIX1,ZMIX2
-
-REAL, DIMENSION(SIZE(PTHM,1)) :: ZLUP         ! Upward Mixing length from the ground
-
-INTEGER  :: ISV                ! Number of scalar variables                               
-INTEGER  :: JK,JI,JSV          ! loop counters
-
-LOGICAL, DIMENSION(SIZE(PTHM,1)) ::  GTEST,GTESTLCL,GTESTETL
-                               ! Test if the ascent continue, if LCL or ETL is reached
-LOGICAL                          ::  GLMIX 
-                               ! To choose upward or downward mixing length
-LOGICAL, DIMENSION(SIZE(PTHM,1))              :: GWORK1
-LOGICAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) :: GWORK2
-
-INTEGER  :: ITEST
-
-REAL, DIMENSION(SIZE(PTHM,1)) :: ZRC_UP, ZRI_UP, ZRV_UP, ZRSATW, ZRSATI
-!==================================================================================                        
-REAL, DIMENSION(SIZE(PTHM,1))              ::  ZWUP_MEAN    ! 
-REAL, DIMENSION(SIZE(PTHM,1))              ::  ZCOE,ZWCOE,ZBUCOE
-REAL, DIMENSION(SIZE(PTHM,1))              ::  ZDETR_BUO, ZDETR_RT
-!==================================================================================                        
-
-REAL  :: ZDEPTH_MAX1, ZDEPTH_MAX2 ! control auto-extinction process
-REAL  :: XFRAC_LIM ! surface maximale du thermique
-
-REAL  :: ZTMAX,ZRMAX, ZEPS  ! control value
-
-REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2)) :: ZSHEAR,ZDUDZ,ZDVDZ ! vertical wind shear
-! pour le calcul de la resolution normalisée
-REAL, DIMENSION(SIZE(PTHM,1))              ::  ZA1, ZRESOL_NORM 
-REAL :: ZRESOL_GRID   
-REAL, DIMENSION(SIZE(PTHM,1)) :: MODIF
-!
-
-INTEGER :: KTCOUNT_MF ! current model time-step
-REAL, DIMENSION (:), ALLOCATABLE :: ZWORK
-!
-!*    0.3    Declaration of namelists
-!            ------------------------
-!
-!----------------------------------------------------------------------------
-
-! Thresholds for the  perturbation of
-! theta_l and r_t at the first level of the updraft
-
-ZTMAX=2.0
-ZRMAX=1.E-3
-ZEPS=1.E-15
-XFRAC_LIM=0.5
-!
-!------------------------------------------------------------------------
-
-!                     INITIALISATION
-
-! Initialisation of the constants   
-ZRDORV   = XRD / XRV   !=0.622
-ZRVORD   = (XRV / XRD) 
-
-ZDEPTH_MAX1=3000. ! clouds with depth inferior to this value are keeped untouched
-ZDEPTH_MAX2=4000. ! clouds with depth superior to this value are suppressed
-
-!                 Local variables, internal domain
-! Internal Domain
-
-!number of scalar variables
-ISV=SIZE(PSVM,3)
-
-IF (OENTR_DETR) THEN
-   ! si on prend en compte la résolution
-   ! dans le calcul de l'entrainement et du détrainement
-   !IF(LNORM_RESOL) THEN
-        !grid resolution in the AROME CASE
-        ZRESOL_GRID=sqrt(XDXHAT(1)*XDYHAT(1))
-   !ENDIF
-
-! Initialisation of intersesting Level :LCL,ETL,CTL
-  KKLCL(:)=KKE
-  KKETL(:)=KKE
-  KKCTL(:)=KKE
-
-  !
-  ! Initialisation
-  !* udraft governing variables
-  PEMF(:,:)=0.
-  PDETR(:,:)=0.
-  PENTR(:,:)=0.
-
-  ! Initialisation
-  !* updraft core variables
-  PRV_UP(:,:)=0.
-  PRC_UP(:,:)=0.
-  PRI_UP(:,:)=0.
-  PW_UP(:,:)=0.
-  ZTH_UP(:,:)=0.
-  PFRAC_UP(:,:)=0.
-  PTHV_UP(:,:)=0.
-
-  PBUO_INTEG=0.
-  ZBUO      =0.
-
-  PFRAC_ICE_UP(:,:)=0.
-  PRSAT_UP(:,:)=PRVM(:,:) ! should be initialised correctly but is (normaly) not used
-
-  !cloud/dry air mixture cloud content
-  ZRC_MIX = 0.
-  ZRI_MIX = 0.
-
-END IF
-
-! Initialisation of environment variables at t-dt
-! variables at flux level
-ZTHLM_F(:,:) = MZM_MF(KKA,KKU,KKL,PTHLM(:,:))
-ZRTM_F (:,:) = MZM_MF(KKA,KKU,KKL,PRTM(:,:))
-ZUM_F  (:,:) = MZM_MF(KKA,KKU,KKL,PUM(:,:))
-ZVM_F  (:,:) = MZM_MF(KKA,KKU,KKL,PVM(:,:))
-ZTKEM_F(:,:) = MZM_MF(KKA,KKU,KKL,PTKEM(:,:))
-
-DO JSV=1,ISV
-  IF (ONOMIXLG .AND. JSV >= KSV_LGBEG .AND. JSV<= KSV_LGEND) CYCLE
-  ZSVM_F(:,:,JSV) = MZM_MF(KKA,KKU,KKL,PSVM(:,:,JSV))
-END DO
-!                     
-!          Initialisation of updraft characteristics 
-PTHL_UP(:,:)=ZTHLM_F(:,:)
-PRT_UP(:,:)=ZRTM_F(:,:)
-PU_UP(:,:)=ZUM_F(:,:)
-PV_UP(:,:)=ZVM_F(:,:)
-PSV_UP(:,:,:)=ZSVM_F(:,:,:)
-PSV_DO(:,:,:)=ZSVM_F(:,:,:)
-PTHL_DO(:,:)=ZTHLM_F(:,:)
-PRT_DO(:,:)=ZRTM_F(:,:)
-PU_DO(:,:)=ZUM_F(:,:)
-PV_DO(:,:)=ZVM_F(:,:)
-PSV_DO(:,:,:)=0.
-
-   ! initiation de l'équation de la dynamique
-        !vertical velocity at mass level
-        ZWM_M(:,:)=MZF_MF(KKA,KKU,KKL,PWM(:,:))
-! Computation or initialisation of updraft characteristics at the KKB level
-! thetal_up,rt_up,thetaV_up, w2,Buoyancy term and mass flux (PEMF)
-
-PTHL_UP(:,KKB)= ZTHLM_F(:,KKB)+MAX(0.,MIN(ZTMAX,(PSFTH(:)/SQRT(ZTKEM_F(:,KKB)))*XALP_PERT))
-PRT_UP(:,KKB) = ZRTM_F(:,KKB)+MAX(0.,MIN(ZRMAX,(PSFRV(:)/SQRT(ZTKEM_F(:,KKB)))*XALP_PERT)) 
-!------------------------
-! print*,OENTR_DETR
-!------------------------
-IF (OENTR_DETR) THEN
-  ZTHM_F (:,:) = MZM_MF(KKA,KKU,KKL,PTHM (:,:))
-  ZPRES_F(:,:) = MZM_MF(KKA,KKU,KKL,PPABSM(:,:))
-  ZRHO_F (:,:) = MZM_MF(KKA,KKU,KKL,PRHODREF(:,:))
-  ZRVM_F (:,:) = MZM_MF(KKA,KKU,KKL,PRVM(:,:))
-
-  ! thetav at mass and flux levels
-  ZTHVM_F(:,:)=ZTHM_F(:,:)*((1.+ZRVORD*ZRVM_F(:,:))/(1.+ZRTM_F(:,:)))
-  ZTHVM(:,:)=PTHM(:,:)*((1.+ZRVORD*PRVM(:,:))/(1.+PRTM(:,:)))
-
-  PTHV_UP(:,:)=ZTHVM_F(:,:)
-
-  ZW_UP2(:,:)=ZEPS
-  ZW_UP2(:,KKB) = MAX(0.0001,(2./3.)*ZTKEM_F(:,KKB))
-
-   ! initiation de l'équation de la dynamique
-        ! initialisation du vent de l'updraft pour la zone grise
-        ZW_UP(:,:)=SQRT(ZW_UP2)
-
-  ! Computation of non conservative variable for the KKB level of the updraft
-  ! (all or nothing ajustement)
-  PRC_UP(:,KKB)=0.
-  PRI_UP(:,KKB)=0.
-  CALL TH_R_FROM_THL_RT_1D(HFRAC_ICE,PFRAC_ICE_UP(:,KKB),ZPRES_F(:,KKB), &
-             PTHL_UP(:,KKB),PRT_UP(:,KKB),ZTH_UP(:,KKB), &
-             PRV_UP(:,KKB),PRC_UP(:,KKB),PRI_UP(:,KKB),ZRSATW(:),ZRSATI(:))
-
-  ! compute updraft thevav and buoyancy term at KKB level
-  PTHV_UP(:,KKB) = ZTH_UP(:,KKB)*((1+ZRVORD*PRV_UP(:,KKB))/(1+PRT_UP(:,KKB)))
-  ! compute mean rsat in updraft
-  PRSAT_UP(:,KKB) = ZRSATW(:)*(1-PFRAC_ICE_UP(:,KKB)) + ZRSATI(:)*PFRAC_ICE_UP(:,KKB)
-                                                            
-  ! Closure assumption for mass flux at KKB level
-  !
-  ! calcul différent de la flottabilité
-  PTHVREF=300.
-  ! c'est la meilleure flottabilité ! 
-  !NBUOY=0.
-   !IF(NBUOY == 0.) THEN
-      ZG_O_THVREF=XG/ZTHVM_F
-   !ELSE
-   !   ! in AROME XTHVREF does not exist ici 300
-   !   ZG_O_THVREF=XG/PTHVREF(1,1) ! on revient à l'état de référence et pas ZTHVM_F
-   !ENDIF
-   ! Calcul de la fermeture de Julien Pergaut comme limite max de PHY
-
-   DO JK=KKB,KKE-KKL,KKL   !  Vertical loop
-    ZZDZ(:,JK)   = MAX(ZEPS,PZZ(:,JK+KKL)-PZZ(:,JK))  ! <== Delta Z between two flux level
-  ENDDO
-
-  ! compute L_up
-  GLMIX=.TRUE.
-  ZTKEM_F(:,KKB)=0.
-  IF(CTURBLEN=='RM17') THEN
-    ZDUDZ = MZF_MF(KKA,KKU,KKL,GZ_M_W_MF(KKA,KKU,KKL,PUM,PDZZ))
-    ZDVDZ = MZF_MF(KKA,KKU,KKL,GZ_M_W_MF(KKA,KKU,KKL,PVM,PDZZ))
-    ZSHEAR = SQRT(ZDUDZ*ZDUDZ + ZDVDZ*ZDVDZ)
-  ELSE
-    ZSHEAR = 0. !no shear in bl89 mixing length
-  END IF  
-  CALL COMPUTE_BL89_ML(KKA,KKB,KKE,KKU,KKL,PDZZ,ZTKEM_F(:,KKB),ZG_O_THVREF(:,KKB), &
-                       ZTHVM_F,KKB,GLMIX,.TRUE.,ZSHEAR,ZLUP)
-  ZLUP(:)=MAX(ZLUP(:),1.E-10)
-
-  ! Compute Buoyancy flux at the ground
-  ZWTHVSURF(:) = (ZTHVM_F(:,KKB)/ZTHM_F(:,KKB))*PSFTH(:)+     &
-                (0.61*ZTHM_F(:,KKB))*PSFRV(:)
-
-  ! Mass flux at KKB level (updraft triggered if PSFTH>0.)
-    !elefant>
-       MODIF(:)=tanh(1.83*sqrt(XDXHAT(1)*XDYHAT(1))/ZLUP)
-      WHERE (ZWTHVSURF(:)>0.)
-        PEMF(:,KKB) = XCMF * MODIF(:) * ZRHO_F(:,KKB) *&
-        ((ZG_O_THVREF(:,KKB))*ZWTHVSURF*ZLUP)**(1./3.)
-        PFRAC_UP(:,KKB)=MIN(PEMF(:,KKB)/(SQRT(ZW_UP2(:,KKB))*ZRHO_F(:,KKB)),XFRAC_UP_MAX)
-        ZW_UP2(:,KKB)=(PEMF(:,KKB)/(PFRAC_UP(:,KKB)*ZRHO_F(:,KKB)))**2
-        GTEST(:)=.TRUE.
-      ELSEWHERE
-        PEMF(:,KKB) =0.
-        GTEST(:)=.FALSE.
-      ENDWHERE
-    !elefant<
-ELSE
-  GTEST(:)=PEMF(:,KKB+KKL)>0.
-END IF
-
-!--------------------------------------------------------------------------
-
-!                        3. Vertical ascending loop
-!                           -----------------------
-!
-! If GTEST = T the updraft starts from the KKB level and stops when GTEST becomes F
-!
-!
-GTESTLCL(:)=.FALSE.
-GTESTETL(:)=.FALSE.
-
-   ! CALCUL DE LA RESOLUTION NORMALISEE
-   
-   !IF(NLES_DTCOUNT .EQ. 0.)THEN        
-   !  print*,"PROBLEME NLES_DTCOUNT"
-   !  print*,"NLES_DTCOUNT doit être 1."   
-   !STOP
-   !ENDIF
-
-       WHERE (GTEST .AND. ZLUP(:)>0. )
-        ! hauteur des thermiques du pas de temps precedent
-        ! dans cette version ZLUP depend du flux de masse dans chaque
-        ! colonne, il serait peut-être plus simple de faire une variable
-        ! globale sur le domaine       
-         ZRESOL_NORM(:)=ZRESOL_GRID/(ZLUP(:))
-       ELSEWHERE
-         ZRESOL_NORM(:)=0.5 ! ARBITRAIRE
-       ENDWHERE
- 
-!       Loop on vertical level
-DO JK=KKB,KKE-KKL,KKL
-
-! IF the updraft top is reached for all column, stop the loop on levels
-  ITEST=COUNT(GTEST)
-  !IF (ITEST==0) print*,"cycle"
-  IF (ITEST==0) CYCLE
-!       Computation of entrainment and detrainment with KF90
-!       parameterization in clouds and LR01 in subcloud layer
-
-
-! to find the LCL (check if JK is LCL or not)
-
-  WHERE ((PRC_UP(:,JK)+PRI_UP(:,JK)>0.).AND.(.NOT.(GTESTLCL)))
-      KKLCL(:) = JK           
-      GTESTLCL(:)=.TRUE.
-  ENDWHERE
-    
-!  Buoyancy is computed on "flux" levels where updraft variables are known
-   !================================================================================
-   ! CALCUL DE LA FLOTTABILITE
-   !================================================================================  
-
-  ! Compute theta_v of updraft at flux level JK    
-    
-    ZRC_UP(:)   =PRC_UP(:,JK) ! guess
-    ZRI_UP(:)   =PRI_UP(:,JK) ! guess 
-    ZRV_UP(:)   =PRV_UP(:,JK)
-    
-    CALL TH_R_FROM_THL_RT_1D(HFRAC_ICE,PFRAC_ICE_UP(:,JK),&
-               PPABSM(:,JK),PTHL_UP(:,JK),PRT_UP(:,JK),&
-               ZTH_UP(:,JK),ZRV_UP,ZRC_UP,ZRI_UP,ZRSATW(:),ZRSATI(:))            
-    
-    WHERE (GTEST)
-      PTHV_UP   (:,JK) = ZTH_UP(:,JK)*(1.+ZRVORD*ZRV_UP(:))/(1.+PRT_UP(:,JK))
-    ENDWHERE ! fin temporaire de GTEST 
-
-   ! test sur le calcul de la flottabilité de 2 manières 
-   ! le calcul de la flottabilité est super important
-   ! c'est ce qui decide de Wup
-   !IF(NBUOY==1) THEN
-   ! !WHERE (GTEST) ! comme dans EDKF, mais c'est toujours positif
-   !               ! du coup le thermique ne s'arrète pas
-   !   ZBUO      (:,JK) = ZG_O_THVREF(:,JK)*(PTHV_UP(:,JK) - PTHVREF(:,JK))    
-   ! !ENDWHERE ! fin temporaire de GTEST 
-   !  IF(LDUMMY1) THEN
-   ! print*,"ZBUO_1(:,",JK,")=",minval(ZBUO(:,JK)),maxval(ZBUO(:,JK))
-   !END IF
-   !ELSEIF(NBUOY==2) THEN
-   ! !WHERE (GTEST)! comme ca devrait être mais trop restrictif, le thermique
-   ! !s'arrete d'emblée
-   !   ZBUO      (:,JK) = ZG_O_THVREF(:,JK)*(PTHV_UP(:,JK) -2.*ZTHVM_F(:,JK) + PTHVREF(:,JK))
-   ! !ENDWHERE ! fin temporaire de GTEST 
-   ! IF(LDUMMY1) THEN 
-   ! print*,"ZBUO_2(:,",JK,")=",minval(ZBUO(:,JK)),maxval(ZBUO(:,JK))
-   !END IF
-  !ELSEIF(NBUOY==3) THEN
-   ! !WHERE (GTEST) ! un peu plus rigoureux que celle du dessus, mais trop restrictif, le thermique
-   ! !s'arrete d'emblée 
-   !   ZBUO      (:,JK) = XG/ZTHVM_F(:,JK)*(PTHV_UP(:,JK)-ZTHVM_F(:,JK))-&
-   !                      XG/PTHVREF(:,JK)*(ZTHVM_F(:,JK)-PTHVREF(:,JK))    
-   ! !ENDWHERE ! fin temporaire de GTEST 
-   !IF(LDUMMY1) THEN
-   ! print*,"ZBUO_3(:,",JK,")=",minval(ZBUO(:,JK)),maxval(ZBUO(:,JK))
-   !END IF
-   !ELSEIF(NBUOY==4) THEN
-   ! devrait être plus proche de EDKF que NBUOY==0, mais ce n'est pas le cas. 
-   ! IF(JK/=KKB) THEN
-   !   ZRC_MIX(:,JK) = ZRC_MIX(:,JK-KKL) ! guess of Rc of mixture
-   !   ZRI_MIX(:,JK) = ZRI_MIX(:,JK-KKL) ! guess of Ri of mixture
-   ! ENDIF
-   ! CALL COMPUTE_ENTR_DETR(JK,KKB,KKE,KKL,GTEST,GTESTLCL,HFRAC_ICE,PFRAC_ICE_UP(:,JK),&
-   !                        PPABSM(:,:),PZZ(:,:),PDZZ(:,:),ZTHVM(:,:),  &
-   !                        PTHLM(:,JK),PRTM(:,JK),ZW_UP2(:,:),         &
-   !                        PTHL_UP(:,JK),PRT_UP(:,JK),ZLUP(:),         &
-   !                        PRC_UP(:,JK),PRI_UP(:,JK),ZRC_MIX(:,JK),ZRI_MIX(:,JK),                 &
-   !                        PENTR(:,JK),PDETR(:,JK),ZBUO(:,JK)    )
-   !
-
-   !IF(LDUMMY1) THEN
-   ! print*,"ZBUO_4(:,",JK,")=",minval(PBUO_INTEG(:,JK)),maxval(PBUO_INTEG(:,JK))
-   !END IF
-
-   !ELSE
-    !WHERE (GTEST) ! une dernière possibilité
-      ZBUO      (:,JK) = ZG_O_THVREF(:,JK)*(PTHV_UP(:,JK) - ZTHVM_F(:,JK))    
-    !ENDWHERE ! fin temporaire de GTEST 
-   !IF(LDUMMY1) THEN
-   ! print*,"ZBUO_0(:,",JK,")=",minval(ZBUO(:,JK)),maxval(ZBUO(:,JK))
-   !END IF
-   !ENDIF
-
-    !WHERE (GTEST)      
-      ! anomalie de flottabilité * DZ
-       PBUO_INTEG(:,JK) = ZBUO(:,JK)*(PZZ(:,JK+KKL)-PZZ(:,JK))      
-      ! uniquement pour le calcul de l'ancienne vitesse verticale 
-    !ENDWHERE ! fin temporaire de GTEST
- 
-   !================================================================================
-   ! CALCUL DE ZA1
-   !================================================================================  
-
-   ! si on a besoin d'un calcul spécifique de ZA1 vs XA1 (constante)
-   ! - LNORM_RESOL = calcul de ZA1 en prenant en compte la résolution normalisée
-
-      ZA1(:)=XA1    
-      !IF (LNORM_RESOL) THEN
-      ! WHERE (GTEST)
-      !   ZA1(:)=XCOEF1+XCOEF2*ZRESOL_NORM(:)**(-1*XCOEF3)
-      ! ENDWHERE
-      !ELSEIF (.NOT. XDUMMY1 == 0. ) THEN 
-      ! WHERE (GTEST)
-      !   ZA1(:)=XDUMMY1
-      ! ENDWHERE
-      !END IF
-       !
-      
-   !================================================================================
-   ! EQUATION DE LA DYNAMIQUE  
-   !================================================================================  
-      ! on calcule le vent vertical du thermique dans la zone grise
-      ! ZA1 depend de la méthode utilisée
-      ALLOCATE(ZWORK(SIZE(ZW_UP,1)))
-       ZWORK(:)=0.
-       !WHERE (GTEST .AND. PFRAC_UP(:,JK)>0 .AND. PFRAC_UP(:,JK)<=XFRAC_LIM)
-       WHERE (GTEST .AND. PFRAC_UP(:,JK)>0 )
-         !hypothse => alpha(k)=alpha(k+1)
-         ZWCOE(:)  = (1.-PFRAC_UP(:,JK))/(1.-PFRAC_UP(:,JK)+XBETA1) 
-         ZBUCOE(:) = 2.*ZWCOE(:)*ZA1
-         ZWORK(:)=(ZW_UP(:,JK)-(1.-ZWCOE(:))*PWM(:,JK)-ZWCOE(:)*ZWM_M(:,JK))*&
-                  (ZW_UP(:,JK)-(1.-ZWCOE(:))*PWM(:,JK)-ZWCOE(:)*ZWM_M(:,JK))+&
-                   ZBUCOE(:)*PBUO_INTEG(:,JK)
-       ELSEWHERE
-        ZWORK(:)=0
-       ENDWHERE        
-       !
-       WHERE (GTEST)    
-       WHERE(ZWORK>=0.)
-         ! il s'agit bien de Wu et non pas de Wu-Wm
-         ZW_UP(:,JK+KKL)=(1.-ZWCOE(:))*PWM(:,JK+KKL)+ZWCOE(:)*ZWM_M(:,JK)+SQRT(ZWORK(:))
-       ELSEWHERE
-         ZW_UP(:,JK+KKL)=0.
-       ENDWHERE   
-        ZW_UP2(:,JK+KKL) = MAX(0.,ZW_UP(:,JK+KKL)*ZW_UP(:,JK+KKL))
-        ZWUP_MEAN(:)     = MAX(ZEPS,0.5*(ZW_UP(:,JK+KKL)+ZW_UP(:,JK))-ZWM_M(:,JK))
-       ENDWHERE
-      DEALLOCATE(ZWORK)
-   !
-   !================================================================================
-   ! CALCUL DE L ENTRAINEMENT ET DU DETRAINEMENT  
-   !================================================================================  
-   ! Hypothèse alpha jk= alpha point de masse
-       !WHERE (GTEST .AND. PFRAC_UP(:,JK)>0. .AND. PFRAC_UP(:,JK)<XFRAC_LIM )
-       WHERE (GTEST .AND. PFRAC_UP(:,JK)>0. .AND. ZWUP_MEAN(:)>0 )
-   ! ZWUP_MEAN est Wu-Wm au point de masse
-        PENTR(:,JK)  = MAX(0., ((1.-PFRAC_UP(:,JK))*XBETA1)/(1.-PFRAC_UP(:,JK)+XBETA1)*(ZA1*ZBUO(:,JK)/&
-                               (ZWUP_MEAN(:)*ZWUP_MEAN(:))&
-                              - XB &
-                              - 1./(ZWUP_MEAN(:))*(PWM(:,JK+KKL)-PWM(:,JK))/(PZZ(:,JK+KKL)-PZZ(:,JK)))&
-                          )
-        ZDETR_BUO(:) = MAX(0., -((1.-PFRAC_UP(:,JK))*XBETA1)/(1.-PFRAC_UP(:,JK)+XBETA1)*(ZA1*ZBUO(:,JK)/&
-                                (ZWUP_MEAN(:)*ZWUP_MEAN(:))))
-        ZDETR_RT(:)  = XC*SQRT(MAX(0.,(PRT_UP(:,JK) - ZRTM_F(:,JK)))/MAX(ZEPS,ZRTM_F(:,JK))/ ZWUP_MEAN(:))
-        PDETR(:,JK)  = ZDETR_RT(:)+ZDETR_BUO(:)
-       ENDWHERE
-!
-   !================================================================================
-   ! VARIABLES THERMODYNAMIQUES   
-   !================================================================================  
-   ! computation of the updraft characteritics at jk+1
-   ! WHERE (GTEST .AND. PFRAC_UP(:,JK)>0. .AND. PFRAC_UP(:,JK)<XFRAC_LIM)
-    WHERE (GTEST .AND. PFRAC_UP(:,JK)>0.)
-     ZMIX2(:) = (PZZ(:,JK+KKL)-PZZ(:,JK))*PENTR(:,JK)/(1.-PFRAC_UP(:,JK)) !&
-    ELSEWHERE
-     ZMIX2(:) = 0. !&
-    ENDWHERE  ! GTEST
-
-
-! If the updraft did not stop, compute cons updraft characteritics at jk+KKL
-   WHERE (GTEST)  
-    PTHL_UP(:,JK+KKL)=(PTHL_UP(:,JK)*(1.-0.5*ZMIX2(:)) + PTHLM(:,JK)*ZMIX2(:)) &
-                          /(1.+0.5*ZMIX2(:))   
-    PRT_UP(:,JK+KKL) =(PRT_UP (:,JK)*(1.-0.5*ZMIX2(:)) + PRTM(:,JK)*ZMIX2(:))  &
-                          /(1.+0.5*ZMIX2(:))
-  ENDWHERE
-  
-
-  IF(OMIXUV) THEN
-    IF(JK/=KKB) THEN
-      WHERE(GTEST)
-        PU_UP(:,JK+KKL) = (PU_UP (:,JK)*(1-0.5*ZMIX2(:)) + PUM(:,JK)*ZMIX2(:)+ &
-                          0.5*XPRES_UV*(PZZ(:,JK+KKL)-PZZ(:,JK))*&
-                          ((PUM(:,JK+KKL)-PUM(:,JK))/PDZZ(:,JK+KKL)+&
-                           (PUM(:,JK)-PUM(:,JK-KKL))/PDZZ(:,JK))        )   &
-                          /(1+0.5*ZMIX2(:))
-        PV_UP(:,JK+KKL) = (PV_UP (:,JK)*(1-0.5*ZMIX2(:)) + PVM(:,JK)*ZMIX2(:)+ &
-                          0.5*XPRES_UV*(PZZ(:,JK+KKL)-PZZ(:,JK))*&
-                          ((PVM(:,JK+KKL)-PVM(:,JK))/PDZZ(:,JK+KKL)+&
-                           (PVM(:,JK)-PVM(:,JK-KKL))/PDZZ(:,JK))    )   &
-                          /(1+0.5*ZMIX2(:))
-      ENDWHERE
-    ELSE
-      WHERE(GTEST)
-        PU_UP(:,JK+KKL) = (PU_UP (:,JK)*(1-0.5*ZMIX2(:)) + PUM(:,JK)*ZMIX2(:)+ &
-                          0.5*XPRES_UV*(PZZ(:,JK+KKL)-PZZ(:,JK))*&
-                          ((PUM(:,JK+KKL)-PUM(:,JK))/PDZZ(:,JK+KKL))        )   &
-                          /(1+0.5*ZMIX2(:))
-        PV_UP(:,JK+KKL) = (PV_UP (:,JK)*(1-0.5*ZMIX2(:)) + PVM(:,JK)*ZMIX2(:)+ &
-                          0.5*XPRES_UV*(PZZ(:,JK+KKL)-PZZ(:,JK))*&
-                          ((PVM(:,JK+KKL)-PVM(:,JK))/PDZZ(:,JK+KKL))    )   &
-                          /(1+0.5*ZMIX2(:))
-      ENDWHERE
-
-    ENDIF
-  ENDIF
-  DO JSV=1,ISV 
-     IF (ONOMIXLG .AND. JSV >= KSV_LGBEG .AND. JSV<= KSV_LGEND) CYCLE
-      WHERE(GTEST) 
-           PSV_UP(:,JK+KKL,JSV) = (PSV_UP (:,JK,JSV)*(1-0.5*ZMIX2(:)) + &
-                        PSVM(:,JK,JSV)*ZMIX2(:))  /(1+0.5*ZMIX2(:))
-      ENDWHERE                        
-  END DO  
-  
-! Compute non cons. var. at level JK+KKL
-  ZRC_UP(:)=PRC_UP(:,JK) ! guess = level just below
-  ZRI_UP(:)=PRI_UP(:,JK) ! guess = level just below
-  CALL TH_R_FROM_THL_RT_1D(HFRAC_ICE,PFRAC_ICE_UP(:,JK+KKL),ZPRES_F(:,JK+KKL), &
-          PTHL_UP(:,JK+KKL),PRT_UP(:,JK+KKL),ZTH_UP(:,JK+KKL),              &
-          ZRV_UP(:),ZRC_UP(:),ZRI_UP(:),ZRSATW(:),ZRSATI(:))
-  WHERE(GTEST)
-    PRC_UP(:,JK+KKL)=ZRC_UP(:)
-    PRV_UP(:,JK+KKL)=ZRV_UP(:)
-    PRI_UP(:,JK+KKL)=ZRI_UP(:)
-    PRSAT_UP(:,JK+KKL) = ZRSATW(:)*(1-PFRAC_ICE_UP(:,JK+KKL)) + ZRSATI(:)*PFRAC_ICE_UP(:,JK+KKL)
-  ENDWHERE
-  
-
-! Compute the updraft theta_v, buoyancy and w**2 for level JK+KKL
-  WHERE(GTEST)
-      PTHV_UP(:,JK+KKL) = ZTH_UP(:,JK+KKL)*((1+ZRVORD*PRV_UP(:,JK+KKL))/(1+PRT_UP(:,JK+KKL)))
- ENDWHERE
-   !================================================================================
-   ! CALCUL DU FLUX DE MASSE   
-   !================================================================================
- ZMIX1(:)=0.
- WHERE(GTEST)
-   ! identique dans Rio, EDKF ou dans la zone grise      
-    ZMIX1(:)=ZZDZ(:,JK)*(PENTR(:,JK)-PDETR(:,JK))
-    PEMF(:,JK+KKL)=PEMF(:,JK)*EXP(ZMIX1(:))
- ENDWHERE  
-   !================================================================================
-   ! FRACTION DE THERMIQUE   
-   !================================================================================
-        ! on cherche à savoir s'il y a des vitesses verticales non définies
-        ! je n'utilise que ZW_UP2 pour pouvoir avoir une valeur si ZW_UP
-        ! n'est pas défini 
-IF (maxval(ZW_UP2(:,JK+KKL)) .NE. maxval(ZW_UP2(:,JK+KKL))) &
-  call Print_msg( NVERB_FATAL, 'GEN', 'COMPUTE_UPDRAFT_HRIO', 'maxval(ZW_UP2(:,JK+KKL)) /= maxval(ZW_UP2(:,JK+KKL))' )
-! si on est dans la zone grise la définition du flux de masse change
-! donc celle de alpha aussi
-WHERE(GTEST)
-       !attention je ne suis pas au point de masse
-WHERE ((SQRT(ZW_UP2(:,JK+KKL))-PWM(:,JK+KKL))>ZEPS)
-  PFRAC_UP(:,JK+KKL)=PEMF(:,JK+KKL)/((SQRT(ZW_UP2(:,JK+KKL))-PWM(:,JK+KKL))*ZRHO_F(:,JK+KKL))
-ELSEWHERE
-  PFRAC_UP(:,JK+KKL)=0.
-ENDWHERE
-  PFRAC_UP(:,JK+KKL)=MIN(PFRAC_UP(:,JK+KKL),XFRAC_LIM)
-ENDWHERE
-
-
-! calcul des termes environmentaux au point de flux
-  WHERE(GTEST) 
-     !WHERE(PFRAC_UP(:,JK+KKL)>0 .AND. PFRAC_UP(:,JK+KKL)< XFRAC_LIM) 
-     WHERE( PFRAC_UP(:,JK+KKL)>0 ) 
-     PTHL_DO(:,JK+KKL)=((PTHLM(:,JK)+PTHLM(:,JK+KKL))*0.5-PFRAC_UP(:,JK+KKL)*PTHL_UP(:,JK+KKL)) &
-                         /(1.-PFRAC_UP(:,JK+KKL))
-     PRT_DO(:,JK+KKL) =((PRTM(:,JK)+PRTM(:,JK+KKL))*0.5-PFRAC_UP(:,JK+KKL)*PRT_UP(:,JK+KKL)) &
-                         /(1.-PFRAC_UP(:,JK+KKL))
-     PU_DO(:,JK+KKL)  = ((PUM(:,JK)+PUM(:,JK+KKL))*0.5-PFRAC_UP(:,JK+KKL)*PU_UP(:,JK+KKL)) &
-                         /(1.-PFRAC_UP(:,JK+KKL))
-     PV_DO(:,JK+KKL)  = ((PVM(:,JK)+PVM(:,JK+KKL))*0.5-PFRAC_UP(:,JK+KKL)*PV_UP(:,JK+KKL)) &
-                         /(1.-PFRAC_UP(:,JK+KKL))
-     PTHV_DO(:,JK+KKL)=(ZTHVM_F(:,JK+KKL)-PFRAC_UP(:,JK+KKL)*PTHV_UP(:,JK+KKL))&
-                          /(1.-PFRAC_UP(:,JK+KKL))
-    ENDWHERE  
-  ENDWHERE  
-  DO JSV=1,ISV 
-     IF (ONOMIXLG .AND. JSV >= KSV_LGBEG .AND. JSV<= KSV_LGEND) CYCLE
-      WHERE(GTEST) 
-      !WHERE(PFRAC_UP(:,JK+KKL)>0 .AND. PFRAC_UP(:,JK+KKL)<= XFRAC_LIM) 
-      WHERE(PFRAC_UP(:,JK+KKL)>0 ) 
-           PSV_DO(:,JK+KKL,JSV) = ((PSVM(:,JK,JSV)+PSVM(:,JK+1,JSV))*0.5-PFRAC_UP(:,JK+KKL)*PSV_UP(:,JK+KKL,JSV))&
-                                  /(1.-PFRAC_UP(:,JK+KKL))
-      ENDWHERE  
-      ENDWHERE                        
-  ENDDO  
-
-  WHERE(GTEST) 
-  PFRAC_UP(:,JK+KKL)=MIN(XFRAC_UP_MAX,PFRAC_UP(:,JK+KKL))
-  ENDWHERE  
-! Test if the updraft has reach the ETL
-  GTESTETL(:)=.FALSE.
-  WHERE (GTEST.AND.(PBUO_INTEG(:,JK)<=0.))
-      KKETL(:) = JK+KKL
-      GTESTETL(:)=.TRUE.
-  ENDWHERE
-
-! Test is we have reached the top of the updraft
-
-!  WHERE (GTEST.AND.((ZW_UP2(:,JK+KKL)<=ZEPS).OR.(PEMF(:,JK+KKL)<=ZEPS) .OR. PFRAC_UP(:,JK+KKL)<= XALPHA_SEUIL))
-  WHERE ( GTEST .AND. ( (ZW_UP2(:,JK+KKL)<=10E-5) .OR. (PEMF(:,JK+KKL)<=10E-5)) )
-      ZW_UP2   (:,JK+KKL)=0.
-      PEMF     (:,JK+KKL)=0.
-      GTEST    (:)       =.FALSE.
-      PTHL_UP  (:,JK+KKL)=ZTHLM_F(:,JK+KKL)
-      PRT_UP   (:,JK+KKL)=ZRTM_F(:,JK+KKL)
-      PRC_UP   (:,JK+KKL)=0.
-      PRI_UP   (:,JK+KKL)=0.
-      PRV_UP   (:,JK+KKL)=ZRVM_F (:,JK+KKL)
-      PTHV_UP  (:,JK+KKL)=ZTHVM_F(:,JK+KKL)
-      
-      PFRAC_UP (:,JK+KKL)=0.
-      KKCTL    (:)       =JK+KKL
-      PTHL_DO  (:,JK+KKL)=ZTHLM_F(:,JK+KKL)
-      PRT_DO   (:,JK+KKL)=ZRTM_F(:,JK+KKL)
-      PTHV_DO  (:,JK+KKL)=ZTHVM_F(:,JK+KKL)
-  ENDWHERE
-
-ENDDO ! boucle JK
-!STOP
-  PW_UP(:,:)=SQRT(ZW_UP2(:,:))
-
-  PEMF(:,KKB) =0.
-
-! Limits the shallow convection scheme when cloud heigth is higher than 3000m.
-! To do this, mass flux is multiplied by a coefficient decreasing linearly
-! from 1 (for clouds of ZDEPTH_MAX1 m of depth) to 0 (for clouds of ZDEPTH_MAX2 m of depth).
-! This way, all MF fluxes are diminished by this amount.
-! Diagnosed cloud fraction is also multiplied by the same coefficient.
-!
-  DO JI=1,SIZE(PTHM,1) 
-     PDEPTH(JI) = MAX(0., PZZ(JI,KKCTL(JI)) -  PZZ(JI,KKLCL(JI)) )
-  END DO
-
-GWORK1(:)= (GTESTLCL(:) .AND. (PDEPTH(:) > ZDEPTH_MAX1) )
-GWORK2(:,:) = SPREAD( GWORK1(:), DIM=2, NCOPIES=MAX(KKU,KKA) )
-ZCOEF(:,:) = SPREAD( (1.-(PDEPTH(:)-ZDEPTH_MAX1)/(ZDEPTH_MAX2-ZDEPTH_MAX1)), DIM=2, NCOPIES=SIZE(ZCOEF,2))
-! print*,"je sors de compute_updraft"
-
-END SUBROUTINE COMPUTE_UPDRAFT_HRIO
diff --git a/src/MNH/default_desfmn.f90 b/src/MNH/default_desfmn.f90
index 141b9d4277a21b2f28f315993257c29e41b8acc0..e460a683600a397cb7a0eec78a68182a9c6f07a6 100644
--- a/src/MNH/default_desfmn.f90
+++ b/src/MNH/default_desfmn.f90
@@ -88,7 +88,7 @@ END MODULE MODI_DEFAULT_DESFM_n
 !!      Module MODD_BUDGET : CBUTYPE,NBUMOD,XBULEN,NBUKL, NBUKH,LBU_KCP,XBUWRI
 !!         NBUIL, NBUIH,NBUJL, NBUJH,LBU_ICP,LBU_JCP,NBUMASK
 !!
-!!      Module MODD_BLANK :
+!!      Module MODD_BLANK_n :
 !!
 !!          XDUMMYi, NDUMMYi, LDUMMYi, CDUMMYi
 !!
@@ -235,7 +235,7 @@ USE MODD_PARAM_RAD_n
 #ifdef MNH_ECRAD
 USE MODD_PARAM_ECRAD_n
 #endif
-USE MODD_BLANK
+USE MODD_BLANK_n
 USE MODD_FRC
 USE MODD_PARAM_ICE
 USE MODD_PARAM_C2R2
@@ -674,50 +674,44 @@ XCLOUD_FRAC_STD = 1.0_JPRB ! change to 0.75 for more realistic distribution
 #endif
 !-------------------------------------------------------------------------------
 !
-!*      14.   SET DEFAULT VALUES FOR MODD_BLANK :
+!*      14.   SET DEFAULT VALUES FOR MODD_BLANK_n :
 !             -----------------------------------
 !
-IF (KMI == 1) THEN
-  XDUMMY1       = 0.
-  XDUMMY2       = 0.
-  XDUMMY3       = 0.
-  XDUMMY4       = 0.
-  XDUMMY5       = 0.
-  XDUMMY6       = 0.
-  XDUMMY7       = 0.
-  XDUMMY8       = 0.
-  XDUMMY=0.
-!
-  NDUMMY1       = 0
-  NDUMMY2       = 0
-  NDUMMY3       = 0
-  NDUMMY4       = 0
-  NDUMMY5       = 0
-  NDUMMY6       = 0
-  NDUMMY7       = 0
-  NDUMMY8       = 0
-  NDUMMY=0
-!
-  LDUMMY1       = .TRUE.
-  LDUMMY2       = .TRUE.
-  LDUMMY3       = .TRUE.
-  LDUMMY4       = .TRUE.
-  LDUMMY5       = .TRUE.
-  LDUMMY6       = .TRUE.
-  LDUMMY7       = .TRUE.
-  LDUMMY8       = .TRUE.
-  LDUMMY=.TRUE.
-!
-  CDUMMY1       = ' '
-  CDUMMY2       = ' '
-  CDUMMY3       = ' '
-  CDUMMY4       = ' '
-  CDUMMY5       = ' '
-  CDUMMY6       = ' '
-  CDUMMY7       = ' '
-  CDUMMY8       = ' '
-  CDUMMY= ' '
-END IF
+XDUMMY1       = 0.
+XDUMMY2       = 0.
+XDUMMY3       = 0.
+XDUMMY4       = 0.
+XDUMMY5       = 0.
+XDUMMY6       = 0.
+XDUMMY7       = 0.
+XDUMMY8       = 0.
+!
+NDUMMY1       = 0
+NDUMMY2       = 0
+NDUMMY3       = 0
+NDUMMY4       = 0
+NDUMMY5       = 0
+NDUMMY6       = 0
+NDUMMY7       = 0
+NDUMMY8       = 0
+!
+LDUMMY1       = .TRUE.
+LDUMMY2       = .TRUE.
+LDUMMY3       = .TRUE.
+LDUMMY4       = .TRUE.
+LDUMMY5       = .TRUE.
+LDUMMY6       = .TRUE.
+LDUMMY7       = .TRUE.
+LDUMMY8       = .TRUE.
+!
+CDUMMY1       = ' '
+CDUMMY2       = ' '
+CDUMMY3       = ' '
+CDUMMY4       = ' '
+CDUMMY5       = ' '
+CDUMMY6       = ' '
+CDUMMY7       = ' '
+CDUMMY8       = ' '
 !
 !------------------------------------------------------------------------------
 !
diff --git a/src/MNH/forc_squall_line.f90 b/src/MNH/forc_squall_line.f90
index 87ac9643848aa61edaec46d037aabca9461bbab3..511522866b3f0ebbd2389e9742c3389d6fdd64ed 100644
--- a/src/MNH/forc_squall_line.f90
+++ b/src/MNH/forc_squall_line.f90
@@ -37,7 +37,7 @@ END MODULE MODI_FORC_SQUALL_LINE
 !!
 !!    IMPLICIT ARGUMENTS
 !!    ------------------
-!!      Module MODD_BLANK
+!!      Module MODD_BLANKn
 !!
 !!    REFERENCE
 !!    ---------
@@ -55,7 +55,7 @@ END MODULE MODI_FORC_SQUALL_LINE
 !              ------------
 !
 USE MODD_PARAMETERS
-USE MODD_BLANK, ONLY : XDUMMY1,    & ! cooling rate (K/s)
+USE MODD_BLANK_n, ONLY : XDUMMY1,    & ! cooling rate (K/s)
                        XDUMMY2,    & ! vertical size of the disturbance
                        XDUMMY3,    & ! horizontal size of the disturbance
                        XDUMMY4,    & ! left border of the disturbance
diff --git a/src/MNH/goto_model_wrapper.f90 b/src/MNH/goto_model_wrapper.f90
index 6246b73a4e2dd7cf3dd5244b3d5ffc6db3b523a3..eb943082f866b2a7049e9c7e71327e8667d44719 100644
--- a/src/MNH/goto_model_wrapper.f90
+++ b/src/MNH/goto_model_wrapper.f90
@@ -32,6 +32,7 @@ SUBROUTINE GOTO_MODEL_WRAPPER(KFROM, KTO, ONOFIELDLIST)
 ! all USE modd*_n modules
 USE MODD_ADV_n
 USE MODD_BIKHARDT_n
+USE MODD_BLANK_n
 USE MODD_CH_AERO_n
 USE MODD_CH_FLX_n
 USE MODD_CH_JVALUES_n
@@ -145,6 +146,7 @@ END IF
 !
 CALL ADV_GOTO_MODEL(KFROM, KTO)
 CALL BIKHARDT_GOTO_MODEL(KFROM, KTO)
+CALL BLANK_GOTO_MODEL(KFROM,KTO)
 CALL CH_AERO_GOTO_MODEL(KFROM,KTO)
 CALL CH_FLX_GOTO_MODEL(KFROM, KTO)
 CALL CH_JVALUES_GOTO_MODEL(KFROM, KTO)
diff --git a/src/MNH/init_aerosol_concentration.f90 b/src/MNH/init_aerosol_concentration.f90
index 3ff2fef9b18ac18ceebf057ed9de7835d3b2330e..d9db784b207f56edeba45e332def7a44de45b982 100644
--- a/src/MNH/init_aerosol_concentration.f90
+++ b/src/MNH/init_aerosol_concentration.f90
@@ -23,7 +23,7 @@ END MODULE MODI_INIT_AEROSOL_CONCENTRATION
 !!    Define the aerosol distributions
 !! 
 !!
-!!      MODD_BLANK :
+!!      MODD_BLANKn :
 !!      CDUMMY2 : CCN ou IFN pour le panache
 !!      NDUMMY1 : hauteur base du panache
 !!      NDUMMY2 : hauteur sommet du panache
@@ -53,7 +53,7 @@ USE MODD_PARAM_LIMA, ONLY : LWARM, LACTI, NMOD_CCN, LSCAV, LAERO_MASS,      &
                             LCOLD, LNUCL, NMOD_IFN, LMEYERS,                &
                             XIFN_CONC, LIFN_HOM
 USE MODD_PARAMETERS, ONLY : JPVEXT
-USE MODD_BLANK,      ONLY : CDUMMY2, NDUMMY1, NDUMMY2, XDUMMY8
+USE MODD_BLANK_n,      ONLY : CDUMMY2, NDUMMY1, NDUMMY2, XDUMMY8
 !
 IMPLICIT NONE
 !
diff --git a/src/MNH/modd_blank.f90 b/src/MNH/modd_blank.f90
deleted file mode 100644
index 64e2eda86cd827987744006b326ab2f9f93499b9..0000000000000000000000000000000000000000
--- a/src/MNH/modd_blank.f90
+++ /dev/null
@@ -1,66 +0,0 @@
-!MNH_LIC Copyright 1996-2019 CNRS, Meteo-France and Universite Paul Sabatier
-!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
-!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
-!MNH_LIC for details. version 1.
-!-----------------------------------------------------------------
-!     #################
-      MODULE MODD_BLANK
-!     #################
-!
-!!****  *MODD_BLANK* -  Declarative module for MesoNH developpers namelist
-!!
-!!    PURPOSE
-!!    -------
-!!
-!!      Offer dummy real, integer, logical and character variables for
-!!    test and debugging purposes.
-!!
-!!**  METHOD
-!!    ------
-!!
-!!      Eight dummy real, integer, logical and character*80 variables are
-!!    defined and passed through the namelist read operations. None of the
-!!    MesoNH routines uses any of those variables. When a developper choses
-!!    to introduce temporarily a parameter to some subroutine, he has to
-!!    introduce a USE MODD_BLANK statement into that subroutine. Then he
-!!    can use any of the variables defined here and change them easily via
-!!    the namelist input.
-!!
-!!    REFERENCE
-!!    ---------
-!!      None
-!!
-!!    AUTHOR
-!!    ------
-!!      K. Suhre   *Laboratoire d'Aerologie*
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!
-!!    Original 25/04/96
-!!      updated     17/11/00  (P Jabouille) Use dummy array
-!!
-!-------------------------------------------------------------------------------
-!
-!*       0.   DECLARATIONS
-!             ------------
-!
-USE MODD_PARAMETERS, ONLY : JPDUMMY
-!
-IMPLICIT NONE
-!
-REAL, SAVE         :: XDUMMY1, XDUMMY2, XDUMMY3, XDUMMY4, &
-                      XDUMMY5, XDUMMY6, XDUMMY7, XDUMMY8
-INTEGER, SAVE      :: NDUMMY1, NDUMMY2, NDUMMY3, NDUMMY4, &
-                      NDUMMY5, NDUMMY6, NDUMMY7, NDUMMY8
-LOGICAL, SAVE      :: LDUMMY1, LDUMMY2, LDUMMY3, LDUMMY4, &
-                      LDUMMY5, LDUMMY6, LDUMMY7, LDUMMY8
-CHARACTER(len=80), SAVE :: CDUMMY1, CDUMMY2, CDUMMY3, CDUMMY4, &
-                           CDUMMY5, CDUMMY6, CDUMMY7, CDUMMY8
-!
-REAL,    SAVE, DIMENSION(JPDUMMY) :: XDUMMY
-INTEGER, SAVE, DIMENSION(JPDUMMY) :: NDUMMY
-LOGICAL, SAVE, DIMENSION(JPDUMMY) :: LDUMMY
-CHARACTER(len=80), SAVE, DIMENSION(JPDUMMY) :: CDUMMY
-!
-END MODULE MODD_BLANK
diff --git a/src/MNH/modd_blankn.f90 b/src/MNH/modd_blankn.f90
new file mode 100644
index 0000000000000000000000000000000000000000..74c0d8b1607783964152f357a44502f38df75d96
--- /dev/null
+++ b/src/MNH/modd_blankn.f90
@@ -0,0 +1,173 @@
+!MNH_LIC Copyright 1996-2019 CNRS, Meteo-France and Universite Paul Sabatier
+!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
+!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
+!MNH_LIC for details. version 1.
+!-----------------------------------------------------------------
+!     #################
+      MODULE MODD_BLANK_n
+!     #################
+!
+!!****  *MODD_BLANK$n* -  Declarative module for MesoNH developpers namelist
+!!
+!!    PURPOSE
+!!    -------
+!!
+!!      Offer dummy real, integer, logical and character variables for
+!!    test and debugging purposes.
+!!
+!!**  METHOD
+!!    ------
+!!
+!!      Eight dummy real, integer, logical and character*80 variables are
+!!    defined and passed through the namelist read operations. None of the
+!!    MesoNH routines uses any of those variables. When a developper choses
+!!    to introduce temporarily a parameter to some subroutine, he has to
+!!    introduce a USE MODD_BLANK statement into that subroutine. Then he
+!!    can use any of the variables defined here and change them easily via
+!!    the namelist input.
+!!
+!!    REFERENCE
+!!    ---------
+!!      None
+!!
+!!    AUTHOR
+!!    ------
+!!      K. Suhre   *Laboratoire d'Aerologie*
+!!
+!!    MODIFICATIONS
+!!    -------------
+!!
+!!    Original 25/04/96
+!!      updated     17/11/00  (P Jabouille) Use dummy array
+!!      updated     26/10/21  (Q.Rodier) Use for n model (grid-nesting)
+!-------------------------------------------------------------------------------
+!
+!*       0.   DECLARATIONS
+!             ------------
+!
+USE MODD_PARAMETERS, ONLY : JPDUMMY, JPMODELMAX
+!
+IMPLICIT NONE
+!
+TYPE BLANK_t
+!
+  LOGICAL :: LDUMMY1
+  LOGICAL :: LDUMMY2
+  LOGICAL :: LDUMMY3
+  LOGICAL :: LDUMMY4
+  LOGICAL :: LDUMMY5
+  LOGICAL :: LDUMMY6
+  LOGICAL :: LDUMMY7
+  LOGICAL :: LDUMMY8
+!
+  CHARACTER(len=80) :: CDUMMY1
+  CHARACTER(len=80) :: CDUMMY2
+  CHARACTER(len=80) :: CDUMMY3
+  CHARACTER(len=80) :: CDUMMY4
+  CHARACTER(len=80) :: CDUMMY5
+  CHARACTER(len=80) :: CDUMMY6
+  CHARACTER(len=80) :: CDUMMY7
+  CHARACTER(len=80) :: CDUMMY8
+!
+  INTEGER :: NDUMMY1
+  INTEGER :: NDUMMY2
+  INTEGER :: NDUMMY3
+  INTEGER :: NDUMMY4
+  INTEGER :: NDUMMY5
+  INTEGER :: NDUMMY6
+  INTEGER :: NDUMMY7
+  INTEGER :: NDUMMY8
+!
+  REAL :: XDUMMY1
+  REAL :: XDUMMY2
+  REAL :: XDUMMY3
+  REAL :: XDUMMY4
+  REAL :: XDUMMY5
+  REAL :: XDUMMY6
+  REAL :: XDUMMY7
+  REAL :: XDUMMY8
+!
+END TYPE BLANK_t
+!
+TYPE(BLANK_t), DIMENSION(JPMODELMAX), TARGET, SAVE :: BLANK_MODEL
+!
+LOGICAL, POINTER :: LDUMMY1=>NULL()
+LOGICAL, POINTER :: LDUMMY2=>NULL()
+LOGICAL, POINTER :: LDUMMY3=>NULL()
+LOGICAL, POINTER :: LDUMMY4=>NULL()
+LOGICAL, POINTER :: LDUMMY5=>NULL()
+LOGICAL, POINTER :: LDUMMY6=>NULL()
+LOGICAL, POINTER :: LDUMMY7=>NULL()
+LOGICAL, POINTER :: LDUMMY8=>NULL()
+!
+CHARACTER(len=80), POINTER :: CDUMMY1=>NULL()
+CHARACTER(len=80), POINTER :: CDUMMY2=>NULL()
+CHARACTER(len=80), POINTER :: CDUMMY3=>NULL()
+CHARACTER(len=80), POINTER :: CDUMMY4=>NULL()
+CHARACTER(len=80), POINTER :: CDUMMY5=>NULL()
+CHARACTER(len=80), POINTER :: CDUMMY6=>NULL()
+CHARACTER(len=80), POINTER :: CDUMMY7=>NULL()
+CHARACTER(len=80), POINTER :: CDUMMY8=>NULL()
+!
+INTEGER, POINTER :: NDUMMY1=>NULL()
+INTEGER, POINTER :: NDUMMY2=>NULL()
+INTEGER, POINTER :: NDUMMY3=>NULL()
+INTEGER, POINTER :: NDUMMY4=>NULL()
+INTEGER, POINTER :: NDUMMY5=>NULL()
+INTEGER, POINTER :: NDUMMY6=>NULL()
+INTEGER, POINTER :: NDUMMY7=>NULL()
+INTEGER, POINTER :: NDUMMY8=>NULL()
+!
+REAL, POINTER :: XDUMMY1=>NULL()
+REAL, POINTER :: XDUMMY2=>NULL()
+REAL, POINTER :: XDUMMY3=>NULL()
+REAL, POINTER :: XDUMMY4=>NULL()
+REAL, POINTER :: XDUMMY5=>NULL()
+REAL, POINTER :: XDUMMY6=>NULL()
+REAL, POINTER :: XDUMMY7=>NULL()
+REAL, POINTER :: XDUMMY8=>NULL()
+!
+CONTAINS
+!
+SUBROUTINE BLANK_GOTO_MODEL(KFROM,KTO)
+INTEGER, INTENT(IN) :: KFROM, KTO
+!    
+LDUMMY1=>BLANK_MODEL(KTO)%LDUMMY1
+LDUMMY2=>BLANK_MODEL(KTO)%LDUMMY2
+LDUMMY3=>BLANK_MODEL(KTO)%LDUMMY3
+LDUMMY4=>BLANK_MODEL(KTO)%LDUMMY4
+LDUMMY5=>BLANK_MODEL(KTO)%LDUMMY5
+LDUMMY6=>BLANK_MODEL(KTO)%LDUMMY6
+LDUMMY7=>BLANK_MODEL(KTO)%LDUMMY7
+LDUMMY8=>BLANK_MODEL(KTO)%LDUMMY8
+
+CDUMMY1=>BLANK_MODEL(KTO)%CDUMMY1
+CDUMMY2=>BLANK_MODEL(KTO)%CDUMMY2
+CDUMMY3=>BLANK_MODEL(KTO)%CDUMMY3
+CDUMMY4=>BLANK_MODEL(KTO)%CDUMMY4
+CDUMMY5=>BLANK_MODEL(KTO)%CDUMMY5
+CDUMMY6=>BLANK_MODEL(KTO)%CDUMMY6
+CDUMMY7=>BLANK_MODEL(KTO)%CDUMMY7
+CDUMMY8=>BLANK_MODEL(KTO)%CDUMMY8
+!
+NDUMMY1=>BLANK_MODEL(KTO)%NDUMMY1
+NDUMMY2=>BLANK_MODEL(KTO)%NDUMMY2
+NDUMMY3=>BLANK_MODEL(KTO)%NDUMMY3
+NDUMMY4=>BLANK_MODEL(KTO)%NDUMMY4
+NDUMMY5=>BLANK_MODEL(KTO)%NDUMMY5
+NDUMMY6=>BLANK_MODEL(KTO)%NDUMMY6
+NDUMMY7=>BLANK_MODEL(KTO)%NDUMMY7
+NDUMMY8=>BLANK_MODEL(KTO)%NDUMMY8
+!
+XDUMMY1=>BLANK_MODEL(KTO)%XDUMMY1
+XDUMMY2=>BLANK_MODEL(KTO)%XDUMMY2
+XDUMMY3=>BLANK_MODEL(KTO)%XDUMMY3
+XDUMMY4=>BLANK_MODEL(KTO)%XDUMMY4
+XDUMMY5=>BLANK_MODEL(KTO)%XDUMMY5
+XDUMMY6=>BLANK_MODEL(KTO)%XDUMMY6
+XDUMMY7=>BLANK_MODEL(KTO)%XDUMMY7
+XDUMMY8=>BLANK_MODEL(KTO)%XDUMMY8
+!
+END SUBROUTINE BLANK_GOTO_MODEL
+!
+END MODULE MODD_BLANK_n
diff --git a/src/MNH/modeln.f90 b/src/MNH/modeln.f90
index 8bb020452e47bdad3b85ec4056f4aa7830b32920..3ae4c24cab15fcd04948ff3a2aafb90575db8707 100644
--- a/src/MNH/modeln.f90
+++ b/src/MNH/modeln.f90
@@ -279,7 +279,7 @@ USE MODD_ADV_n
 USE MODD_AIRCRAFT_BALLOON
 USE MODD_BAKOUT
 USE MODD_BIKHARDT_n
-USE MODD_BLANK
+USE MODD_BLANK_n
 USE MODD_BLOWSNOW
 USE MODD_BLOWSNOW_n
 use modd_budget,          only: cbutype, lbu_ru, lbu_rv, lbu_rw, lbudget_u, lbudget_v, lbudget_w, lbudget_sv, lbu_enable, &
diff --git a/src/MNH/modn_blank.f90 b/src/MNH/modn_blank.f90
deleted file mode 100644
index d80e6894fd99b9be4c81efe21f8185ac4667307d..0000000000000000000000000000000000000000
--- a/src/MNH/modn_blank.f90
+++ /dev/null
@@ -1,61 +0,0 @@
-!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
-!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
-!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt  
-!MNH_LIC for details. version 1.
-!-----------------------------------------------------------------
-!--------------- special set of characters for RCS information
-!-----------------------------------------------------------------
-! $Source$ $Revision$
-! MASDEV4_7 modn 2006/05/18 13:07:25
-!-----------------------------------------------------------------
-!     #################
-      MODULE MODN_BLANK
-!     #################
-!
-!!****  *MODN_BLANK* -  Namelist module for MesoNH developpers namelist
-!!
-!!    PURPOSE
-!!    -------
-!!
-!!       The purpose of this module is to specify the namelist NAM_BLANK
-!!      which offer dummy real, integer, logical and character variables for
-!!      test and debugging purposes.
-!!
-!!**  IMPLICIT ARGUMENTS
-!!    ------------------
-!!      Module MODD_BLANK : contains declaration of dummy variables
-!!
-!!    REFERENCE
-!!    ---------
-!!      None
-!!
-!!    AUTHOR
-!!    ------
-!!	K. Suhre   *Laboratoire d'Aerologie*
-!!
-!!    MODIFICATIONS
-!!    -------------
-!! 
-!!    Original 25/04/96
-!!    Modification 14/12/00 (P.Jabouille) add dummy arrays
-!!                    
-!-------------------------------------------------------------------------------
-!
-!*       0.   DECLARATIONS
-!             ------------
-!
-USE MODD_BLANK
-!
-IMPLICIT NONE
-!
-NAMELIST /NAM_BLANK/ XDUMMY1, XDUMMY2, XDUMMY3, XDUMMY4, &
-                     XDUMMY5, XDUMMY6, XDUMMY7, XDUMMY8, &
-                     NDUMMY1, NDUMMY2, NDUMMY3, NDUMMY4, &
-                     NDUMMY5, NDUMMY6, NDUMMY7, NDUMMY8, &
-                     LDUMMY1, LDUMMY2, LDUMMY3, LDUMMY4, &
-                     LDUMMY5, LDUMMY6, LDUMMY7, LDUMMY8, &
-                     CDUMMY1, CDUMMY2, CDUMMY3, CDUMMY4, &
-                     CDUMMY5, CDUMMY6, CDUMMY7, CDUMMY8, &
-                     XDUMMY,NDUMMY,LDUMMY,CDUMMY
-!
-END MODULE MODN_BLANK
diff --git a/src/MNH/modn_blankn.f90 b/src/MNH/modn_blankn.f90
new file mode 100644
index 0000000000000000000000000000000000000000..4a060461035968635ab1c79d5c3b6d4de9bcb20a
--- /dev/null
+++ b/src/MNH/modn_blankn.f90
@@ -0,0 +1,181 @@
+!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
+!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
+!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt  
+!MNH_LIC for details. version 1.
+!-----------------------------------------------------------------
+!--------------- special set of characters for RCS information
+!-----------------------------------------------------------------
+! $Source$ $Revision$
+! MASDEV4_7 modn 2006/05/18 13:07:25
+!-----------------------------------------------------------------
+!     #################
+      MODULE MODN_BLANK_n
+!     #################
+!
+!!****  *MODN_BLANK$n* -  Namelist module for MesoNH developpers namelist
+!!
+!!    PURPOSE
+!!    -------
+!!
+!!       The purpose of this module is to specify the namelist NAM_BLANKn
+!!      which offer dummy real, integer, logical and character variables for
+!!      test and debugging purposes.
+!!
+!!**  IMPLICIT ARGUMENTS
+!!    ------------------
+!!      Module MODD_BLANKn : contains declaration of dummy variables
+!!
+!!    REFERENCE
+!!    ---------
+!!      None
+!!
+!!    AUTHOR
+!!    ------
+!!	K. Suhre   *Laboratoire d'Aerologie*
+!!
+!!    MODIFICATIONS
+!!    -------------
+!! 
+!!    Original 25/04/96
+!!    Modification 14/12/00 (P.Jabouille) add dummy arrays
+!!    Modification 26/10/21 (Q.Rodier) Use for n model (grid-nesting)
+!!                    
+!-------------------------------------------------------------------------------
+!
+!*       0.   DECLARATIONS
+!             ------------
+!
+USE MODD_BLANK_n, ONLY:&
+        LDUMMY1_n => LDUMMY1, &
+        LDUMMY2_n => LDUMMY2, &
+        LDUMMY3_n => LDUMMY3, &
+        LDUMMY4_n => LDUMMY4, &
+        LDUMMY5_n => LDUMMY5, &
+        LDUMMY6_n => LDUMMY6, &
+        LDUMMY7_n => LDUMMY7, &
+        LDUMMY8_n => LDUMMY8, &
+        XDUMMY1_n => XDUMMY1, &
+        XDUMMY2_n => XDUMMY2, &
+        XDUMMY3_n => XDUMMY3, &
+        XDUMMY4_n => XDUMMY4, &
+        XDUMMY5_n => XDUMMY5, &
+        XDUMMY6_n => XDUMMY6, &
+        XDUMMY7_n => XDUMMY7, &
+        XDUMMY8_n => XDUMMY8, &
+        CDUMMY1_n => CDUMMY1, &
+        CDUMMY2_n => CDUMMY2, &
+        CDUMMY3_n => CDUMMY3, &
+        CDUMMY4_n => CDUMMY4, &
+        CDUMMY5_n => CDUMMY5, &
+        CDUMMY6_n => CDUMMY6, &
+        CDUMMY7_n => CDUMMY7, &
+        CDUMMY8_n => CDUMMY8, &
+        NDUMMY1_n => NDUMMY1, &
+        NDUMMY2_n => NDUMMY2, &
+        NDUMMY3_n => NDUMMY3, &
+        NDUMMY4_n => NDUMMY4, &
+        NDUMMY5_n => NDUMMY5, &
+        NDUMMY6_n => NDUMMY6, &
+        NDUMMY7_n => NDUMMY7, &
+        NDUMMY8_n => NDUMMY8
+
+!
+IMPLICIT NONE
+LOGICAL, SAVE :: LDUMMY1, LDUMMY2, LDUMMY3, LDUMMY4,&
+                 LDUMMY5, LDUMMY6, LDUMMY7, LDUMMY8
+CHARACTER*80, SAVE :: CDUMMY1, CDUMMY2, CDUMMY3, CDUMMY4,&
+                 CDUMMY5, CDUMMY6, CDUMMY7, CDUMMY8
+INTEGER, SAVE :: NDUMMY1, NDUMMY2, NDUMMY3, NDUMMY4,&
+                 NDUMMY5, NDUMMY6, NDUMMY7, NDUMMY8
+REAL, SAVE    :: XDUMMY1, XDUMMY2, XDUMMY3, XDUMMY4,&
+                 XDUMMY5, XDUMMY6, XDUMMY7, XDUMMY8
+
+!
+NAMELIST/NAM_BLANKn/XDUMMY1,XDUMMY2,XDUMMY3,XDUMMY4,&
+                     XDUMMY5,XDUMMY6,XDUMMY7,XDUMMY8,&
+                     NDUMMY1,NDUMMY2,NDUMMY3,NDUMMY4,&
+                     NDUMMY5,NDUMMY6,NDUMMY7,NDUMMY8,&
+                     LDUMMY1,LDUMMY2,LDUMMY3,LDUMMY4,&
+                     LDUMMY5,LDUMMY6,LDUMMY7,LDUMMY8,&
+                     CDUMMY1,CDUMMY2,CDUMMY3,CDUMMY4,&
+                     CDUMMY5,CDUMMY6,CDUMMY7,CDUMMY8
+!
+CONTAINS
+!
+SUBROUTINE INIT_NAM_BLANKn
+  XDUMMY1 = XDUMMY1_n
+  XDUMMY2 = XDUMMY2_n
+  XDUMMY3 = XDUMMY3_n
+  XDUMMY4 = XDUMMY4_n
+  XDUMMY5 = XDUMMY5_n
+  XDUMMY6 = XDUMMY6_n
+  XDUMMY7 = XDUMMY7_n
+  XDUMMY8 = XDUMMY8_n
+!
+  NDUMMY1 = NDUMMY1_n
+  NDUMMY2 = NDUMMY2_n
+  NDUMMY3 = NDUMMY3_n
+  NDUMMY4 = NDUMMY4_n
+  NDUMMY5 = NDUMMY5_n
+  NDUMMY6 = NDUMMY6_n
+  NDUMMY7 = NDUMMY7_n
+  NDUMMY8 = NDUMMY8_n
+!
+  CDUMMY1 = CDUMMY1_n
+  CDUMMY2 = CDUMMY2_n
+  CDUMMY3 = CDUMMY3_n
+  CDUMMY4 = CDUMMY4_n
+  CDUMMY5 = CDUMMY5_n
+  CDUMMY6 = CDUMMY6_n
+  CDUMMY7 = CDUMMY7_n
+  CDUMMY8 = CDUMMY8_n
+!
+  LDUMMY1 = LDUMMY1_n
+  LDUMMY2 = LDUMMY2_n
+  LDUMMY3 = LDUMMY3_n
+  LDUMMY4 = LDUMMY4_n
+  LDUMMY5 = LDUMMY5_n
+  LDUMMY6 = LDUMMY6_n
+  LDUMMY7 = LDUMMY7_n
+  LDUMMY8 = LDUMMY8_n
+END SUBROUTINE INIT_NAM_BLANKn
+!
+SUBROUTINE UPDATE_NAM_BLANKn
+ XDUMMY1_n = XDUMMY1
+ XDUMMY2_n = XDUMMY2
+ XDUMMY3_n = XDUMMY3
+ XDUMMY4_n = XDUMMY4
+ XDUMMY5_n = XDUMMY5
+ XDUMMY6_n = XDUMMY6
+ XDUMMY7_n = XDUMMY7
+ XDUMMY8_n = XDUMMY8
+!
+ NDUMMY1_n = NDUMMY1
+ NDUMMY2_n = NDUMMY2
+ NDUMMY3_n = NDUMMY3
+ NDUMMY4_n = NDUMMY4
+ NDUMMY5_n = NDUMMY5
+ NDUMMY6_n = NDUMMY6
+ NDUMMY7_n = NDUMMY7
+ NDUMMY8_n = NDUMMY8
+!
+ CDUMMY1_n = CDUMMY1
+ CDUMMY2_n = CDUMMY2
+ CDUMMY3_n = CDUMMY3
+ CDUMMY4_n = CDUMMY4
+ CDUMMY5_n = CDUMMY5
+ CDUMMY6_n = CDUMMY6
+ CDUMMY7_n = CDUMMY7
+ CDUMMY8_n = CDUMMY8
+!
+ LDUMMY1_n = LDUMMY1
+ LDUMMY2_n = LDUMMY2
+ LDUMMY3_n = LDUMMY3
+ LDUMMY4_n = LDUMMY4
+ LDUMMY5_n = LDUMMY5
+ LDUMMY6_n = LDUMMY6
+ LDUMMY7_n = LDUMMY7
+ LDUMMY8_n = LDUMMY8
+END SUBROUTINE UPDATE_NAM_BLANKn
+
+END MODULE MODN_BLANK_n
diff --git a/src/MNH/phys_paramn.f90 b/src/MNH/phys_paramn.f90
index 2395c174c3bfaa5274a99963c41754b34493b672..921afbd475c9005f1a2b21261aaf63b281a1418f 100644
--- a/src/MNH/phys_paramn.f90
+++ b/src/MNH/phys_paramn.f90
@@ -242,7 +242,6 @@ END MODULE MODI_PHYS_PARAM_n
 !
 USE MODD_ADV_n,            ONLY : XRTKEMS
 USE MODD_ARGSLIST_ll, ONLY : LIST_ll
-USE MODD_BLANK
 use modd_budget,            only: lbudget_th, lbudget_rv, lbudget_rc, lbudget_ri, lbudget_sv,  &
                                   NBUDGET_TH, NBUDGET_RV, NBUDGET_RC, NBUDGET_RI, NBUDGET_SV1, &
                                   tbudgets, xtime_bu_process
diff --git a/src/MNH/prep_ideal_case.f90 b/src/MNH/prep_ideal_case.f90
index 3fc3e4c856039e02a8c58dab7c6af66f9d387b6a..eb0e3b6b60b22abd910df50ddba69e388fc2ebf5 100644
--- a/src/MNH/prep_ideal_case.f90
+++ b/src/MNH/prep_ideal_case.f90
@@ -357,7 +357,7 @@ USE MODD_CONF_n
 USE MODD_NSV,       ONLY: NSV
 use modd_precision, only: LFIINT, MNHREAL_MPI, MNHTIME
 !
-USE MODN_BLANK
+USE MODN_BLANK_n
 !
 USE MODE_THERMO
 USE MODE_POS
@@ -691,8 +691,8 @@ CALL POSNAM(NLUPRE,'NAM_GRIDH_PRE',GFOUND,NLUOUT)
 IF (GFOUND) READ(UNIT=NLUPRE,NML=NAM_GRIDH_PRE)
 CALL POSNAM(NLUPRE,'NAM_VPROF_PRE',GFOUND,NLUOUT)
 IF (GFOUND) READ(UNIT=NLUPRE,NML=NAM_VPROF_PRE)
-CALL POSNAM(NLUPRE,'NAM_BLANK',GFOUND,NLUOUT)
-IF (GFOUND) READ(UNIT=NLUPRE,NML=NAM_BLANK)
+CALL POSNAM(NLUPRE,'NAM_BLANKn',GFOUND,NLUOUT)
+IF (GFOUND) READ(UNIT=NLUPRE,NML=NAM_BLANKn)
 CALL READ_PRE_IDEA_NAM_n(NLUPRE,NLUOUT)
 CALL POSNAM(NLUPRE,'NAM_AERO_PRE',GFOUND,NLUOUT)
 IF (GFOUND) READ(UNIT=NLUPRE,NML=NAM_AERO_PRE)
diff --git a/src/MNH/read_chem_data_netcdf_case.f90 b/src/MNH/read_chem_data_netcdf_case.f90
index a33a405bcb9b36950f8043001d4eaf173e0c3a78..c15b8e4b1aa735b70a7f7865b8e5ead669b85245 100644
--- a/src/MNH/read_chem_data_netcdf_case.f90
+++ b/src/MNH/read_chem_data_netcdf_case.f90
@@ -92,7 +92,7 @@ END MODULE MODI_READ_CHEM_DATA_NETCDF_CASE
 !*      0. DECLARATIONS
 !------------
 !
-USE MODD_BLANK
+USE MODD_BLANK_n, ONLY: CDUMMY1
 USE MODD_CH_AEROSOL, ONLY: CORGANIC, NCARB, NSOA, NSP, LORILAM,&
                            JPMODE, LVARSIGI, LVARSIGJ,CAERONAMES
 USE MODD_CH_M9_n,    ONLY: NEQ ,  CNAMES
diff --git a/src/MNH/read_desfmn.f90 b/src/MNH/read_desfmn.f90
index b32584f8eb7bfa280d4b4400076f5dcfc1c62149..4fc913e4bb8b99074775dcd262c3629fc4c8b96e 100644
--- a/src/MNH/read_desfmn.f90
+++ b/src/MNH/read_desfmn.f90
@@ -222,7 +222,7 @@ USE MODN_LBC_n
 USE MODN_NUDGING_n
 USE MODN_TURB_n
 USE MODN_FRC
-USE MODN_BLANK
+USE MODN_BLANK_n
 USE MODN_CH_SOLVER_n
 USE MODN_CH_MNHC_n
 USE MODN_PARAM_C2R2, ONLY : HPARAM_CCN_C2R2=>HPARAM_CCN,HINI_CCN_C2R2=>HINI_CCN, &
@@ -542,8 +542,8 @@ IF (KMI == 1) THEN
   IF (GFOUND) READ(UNIT=ILUDES,NML=NAM_LES)
   CALL POSNAM(ILUDES,'NAM_PDF',GFOUND)
   IF (GFOUND) READ(UNIT=ILUDES,NML=NAM_PDF)
-  CALL POSNAM(ILUDES,'NAM_BLANK',GFOUND)
-  IF (GFOUND) READ(UNIT=ILUDES,NML=NAM_BLANK)
+  CALL POSNAM(ILUDES,'NAM_BLANKn',GFOUND)
+  IF (GFOUND) READ(UNIT=ILUDES,NML=NAM_BLANKn)
   CALL POSNAM(ILUDES,'NAM_FRC',GFOUND)
   IF (GFOUND) READ(UNIT=ILUDES,NML=NAM_FRC)
   CALL POSNAM(ILUDES,'NAM_PARAM_ICE',GFOUND)
@@ -695,7 +695,10 @@ IF (NVERB >= 10) THEN
   WRITE(UNIT=ILUOUT,NML=NAM_CH_SOLVERn)
 !
   WRITE(UNIT=ILUOUT,FMT="('********** BLOWSNOWn *******************')")
-  WRITE(UNIT=ILUOUT,NML=NAM_BLOWSNOWn)  
+  WRITE(UNIT=ILUOUT,NML=NAM_BLOWSNOWn)
+!
+    WRITE(UNIT=ILUOUT,FMT="('************ BLANKn ****************************')")
+    WRITE(UNIT=ILUOUT,NML=NAM_BLANKn)  
 !  
   IF (KMI==1) THEN
     WRITE(UNIT=ILUOUT,FMT="(/,'PART OF INITIAL FILE COMMON TO ALL THE MODELS')")
@@ -755,9 +758,6 @@ IF (NVERB >= 10) THEN
 !
     WRITE(UNIT=ILUOUT,FMT="('************ PDF ******************************')")
     WRITE(UNIT=ILUOUT,NML=NAM_PDF)
-!
-    WRITE(UNIT=ILUOUT,FMT="('************ BLANK ****************************')")
-    WRITE(UNIT=ILUOUT,NML=NAM_BLANK)
 !    
     WRITE(UNIT=ILUOUT,FMT="('************ FORCING **************************')")
     WRITE(UNIT=ILUOUT,NML=NAM_FRC)
diff --git a/src/MNH/read_exsegn.f90 b/src/MNH/read_exsegn.f90
index cd9d6ea125770025a819d9386f65d5fb2eba176b..170904e6019807d2d4e856d4ee487613e53e3a42 100644
--- a/src/MNH/read_exsegn.f90
+++ b/src/MNH/read_exsegn.f90
@@ -298,6 +298,7 @@ END MODULE MODI_READ_EXSEG_n
 !  P. Wautelet 09/03/2021: simplify allocation of scalar variable names
 !  P. Wautelet 09/03/2021: move some chemistry initializations to ini_nsv
 !  P. Wautelet 10/03/2021: move scalar variable name initializations to ini_nsv
+!  R. Honnert  23/04/2021: add ADAP mixing length and delete HRIO and BOUT from CMF_UPDRAFT
 !------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
@@ -337,7 +338,7 @@ USE MODI_TEST_NAM_VAR
 USE MODN_2D_FRC
 USE MODN_ADV_n      ! The final filling of these modules for the model n is
 USE MODN_BACKUP
-USE MODN_BLANK
+USE MODN_BLANK_n
 USE MODN_BLOWSNOW
 USE MODN_BLOWSNOW_n
 USE MODN_BUDGET
@@ -478,6 +479,7 @@ CALL INIT_NAM_PARAM_MFSHALLN
 CALL INIT_NAM_LBCN
 CALL INIT_NAM_NUDGINGN
 CALL INIT_NAM_TURBN
+CALL INIT_NAM_BLANKN
 CALL INIT_NAM_DRAGN
 CALL INIT_NAM_CH_MNHCN
 CALL INIT_NAM_CH_SOLVERN
@@ -519,6 +521,8 @@ CALL POSNAM(ILUSEG,'NAM_CH_SOLVERN',GFOUND,ILUOUT)
 IF (GFOUND) READ(UNIT=ILUSEG,NML=NAM_CH_SOLVERn)
 CALL POSNAM(ILUSEG,'NAM_SERIESN',GFOUND,ILUOUT)
 IF (GFOUND) READ(UNIT=ILUSEG,NML=NAM_SERIESn)
+CALL POSNAM(ILUSEG,'NAM_BLANKN',GFOUND,ILUOUT)
+IF (GFOUND) READ(UNIT=ILUSEG,NML=NAM_BLANKn)
 CALL POSNAM(ILUSEG,'NAM_BLOWSNOWN',GFOUND,ILUOUT)
 IF (GFOUND) READ(UNIT=ILUSEG,NML=NAM_BLOWSNOWn)
 CALL POSNAM(ILUSEG,'NAM_DRAGTREEN',GFOUND,ILUOUT)
@@ -771,8 +775,6 @@ IF (KMI == 1) THEN
   IF (GFOUND) READ(UNIT=ILUSEG,NML=NAM_MEAN)
   CALL POSNAM(ILUSEG,'NAM_PDF',GFOUND,ILUOUT)
   IF (GFOUND) READ(UNIT=ILUSEG,NML=NAM_PDF)
-  CALL POSNAM(ILUSEG,'NAM_BLANK',GFOUND,ILUOUT)
-  IF (GFOUND) READ(UNIT=ILUSEG,NML=NAM_BLANK)
   CALL POSNAM(ILUSEG,'NAM_FRC',GFOUND,ILUOUT)
   IF (GFOUND) READ(UNIT=ILUSEG,NML=NAM_FRC)
   CALL POSNAM(ILUSEG,'NAM_PARAM_ICE',GFOUND,ILUOUT)
@@ -856,7 +858,7 @@ CALL TEST_NAM_VAR(ILUOUT,'CLBCY(1)',CLBCY(1),'CYCL','WALL','OPEN')
 CALL TEST_NAM_VAR(ILUOUT,'CLBCY(2)',CLBCY(2),'CYCL','WALL','OPEN')
 !
 CALL TEST_NAM_VAR(ILUOUT,'CTURBDIM',CTURBDIM,'1DIM','3DIM')
-CALL TEST_NAM_VAR(ILUOUT,'CTURBLEN',CTURBLEN,'DELT','BL89','RM17','DEAR','BLKR')
+CALL TEST_NAM_VAR(ILUOUT,'CTURBLEN',CTURBLEN,'DELT','BL89','RM17','DEAR','BLKR','ADAP')
 CALL TEST_NAM_VAR(ILUOUT,'CTOM',CTOM,'NONE','TM06')
 CALL TEST_NAM_VAR(ILUOUT,'CSUBG_AUCV',CSUBG_AUCV,'NONE','CLFR','SIGM','PDF')
 !
@@ -877,8 +879,7 @@ CALL TEST_NAM_VAR(ILUOUT,'CTURBLEN_CLOUD',CTURBLEN_CLOUD,'NONE','DEAR','DELT','B
 !
 !   The test on the mass flux scheme for shallow convection
 !
-CALL TEST_NAM_VAR(ILUOUT,'CMF_UPDRAFT',CMF_UPDRAFT,'NONE','EDKF','RHCJ',&
-                   'HRIO','BOUT')
+CALL TEST_NAM_VAR(ILUOUT,'CMF_UPDRAFT',CMF_UPDRAFT,'NONE','EDKF','RHCJ')
 CALL TEST_NAM_VAR(ILUOUT,'CMF_CLOUD',CMF_CLOUD,'NONE','STAT','DIRE')
 !
 !   The test on the CSOLVER name is made elsewhere
@@ -1566,7 +1567,7 @@ ELSE
   END IF
 END IF
 !
-IF(CTURBLEN=='RM17') THEN
+IF(CTURBLEN=='RM17' .OR. CTURBLEN=='ADAP') THEN
   XCEDIS=0.34
 ELSE
   XCEDIS=0.84
@@ -2913,6 +2914,7 @@ CALL UPDATE_NAM_PARAM_MFSHALLN
 CALL UPDATE_NAM_LBCN
 CALL UPDATE_NAM_NUDGINGN
 CALL UPDATE_NAM_TURBN
+CALL UPDATE_NAM_BLANKN
 CALL UPDATE_NAM_CH_MNHCN
 CALL UPDATE_NAM_CH_SOLVERN
 CALL UPDATE_NAM_SERIESN
diff --git a/src/MNH/read_ver_grid.f90 b/src/MNH/read_ver_grid.f90
index fb5ee72d1c296ff35af91332ed411b137b151bb0..a78e3b77778b890aa68aa4f9652daa50146b541c 100644
--- a/src/MNH/read_ver_grid.f90
+++ b/src/MNH/read_ver_grid.f90
@@ -114,7 +114,7 @@ USE MODE_POS
 !
 USE MODI_DEFAULT_SLEVE
 !
-USE MODN_BLANK
+USE MODN_BLANK_n
 !
 IMPLICIT NONE
 !
@@ -194,8 +194,8 @@ XLEN2_n  = XLEN2
 !
 IF (CPROGRAM=='REAL  ') THEN
   IF (ASSOCIATED (XZHAT) ) DEALLOCATE(XZHAT)
-  CALL POSNAM(IPRE_REAL1,'NAM_BLANK',GFOUND,ILUOUT0)
-  IF (GFOUND) READ(UNIT=IPRE_REAL1,NML=NAM_BLANK)
+  CALL POSNAM(IPRE_REAL1,'NAM_BLANKn',GFOUND,ILUOUT0)
+  IF (GFOUND) READ(UNIT=IPRE_REAL1,NML=NAM_BLANKn)
 END IF 
 !
 IKB=JPVEXT+1
diff --git a/src/MNH/shallow_mf.f90 b/src/MNH/shallow_mf.f90
index 4017b49d7540651b21d3d4040afd68f57418de68..26b53e19d7778582162b2f6d076be2f350d2e890 100644
--- a/src/MNH/shallow_mf.f90
+++ b/src/MNH/shallow_mf.f90
@@ -169,6 +169,7 @@ END MODULE MODI_SHALLOW_MF
 !!      Q.Rodier  01/2019 : support RM17 mixing length
 !!      R.Honnert 1/2019  : remove SURF 
 !  P. Wautelet 10/04/2019: replace ABORT and STOP calls by Print_msg
+!       R.Honnert 04/2021: remove HRIO and BOUT schemes
 !! --------------------------------------------------------------------------
 !
 !*      0. DECLARATIONS
@@ -183,7 +184,6 @@ USE MODI_THL_RT_FROM_TH_R_MF
 USE MODI_COMPUTE_UPDRAFT
 USE MODI_COMPUTE_UPDRAFT_RHCJ10
 USE MODI_COMPUTE_UPDRAFT_RAHA
-USE MODI_COMPUTE_UPDRAFT_HRIO
 USE MODI_MF_TURB
 USE MODI_MF_TURB_EXPL
 USE MODI_MF_TURB_GREYZONE
@@ -308,8 +308,7 @@ IKB=KKA+KKL*JPVEXT
 IKE=KKU-KKL*JPVEXT
 
 ! updraft governing variables
-IF (HMF_UPDRAFT == 'EDKF' .OR. HMF_UPDRAFT == 'HRIO' .OR. &
-    HMF_UPDRAFT == 'RHCJ' .OR. HMF_UPDRAFT == 'BOUT') THEN
+IF (HMF_UPDRAFT == 'EDKF'  .OR. HMF_UPDRAFT == 'RHCJ') THEN
   PENTR      = 1.E20
   PDETR      = 1.E20
   PEMF       = 1.E20
@@ -337,7 +336,7 @@ ZTHVM(:,:) = PTHM(:,:)*((1.+XRV / XRD *PRM(:,:,1))/(1.+ZRTM(:,:)))
 !!! 2. Compute updraft
 !!!    ---------------
 !
-IF (HMF_UPDRAFT == 'EDKF' .OR. HMF_UPDRAFT == 'BOUT') THEN
+IF (HMF_UPDRAFT == 'EDKF') THEN
   GENTR_DETR = .TRUE.
   CALL COMPUTE_UPDRAFT(KKA,IKB,IKE,KKU,KKL,HFRAC_ICE,GENTR_DETR,OMIXUV,&
                        ONOMIXLG,KSV_LGBEG,KSV_LGEND,             &
@@ -378,22 +377,6 @@ ELSEIF (HMF_UPDRAFT == 'RAHA') THEN
                        ZDEPTH )
 ELSEIF (HMF_UPDRAFT == 'DUAL') THEN
   !Updraft characteristics are already computed and received by interface
-ELSEIF (HMF_UPDRAFT == 'HRIO') THEN
-  GENTR_DETR = .TRUE.
-  ! ma version avec l'entrainement de Rio et al.
-  CALL COMPUTE_UPDRAFT_HRIO(KKA,IKB,IKE,KKU,KKL,HFRAC_ICE,GENTR_DETR,OMIXUV,                   &
-                       ONOMIXLG,KSV_LGBEG,KSV_LGEND,             &
-                       PZZ,PDZZ,                                 &
-                       PSFTH,PSFRV,PPABSM,PRHODREF,              &
-                       PUM,PVM,PTKEM,PWM,                        &                                                 
-                       PTHM,PRM(:,:,1),ZTHLM,ZRTM, PSVM,         &
-                       PTHL_UP,PRT_UP,PRV_UP,PRC_UP,PRI_UP,      &
-                       PTHV_UP,PW_UP, PU_UP, PV_UP, ZSV_UP,      &
-                       PFRAC_UP,ZFRAC_ICE_UP,ZRSAT_UP,           &
-                       PTHL_DO, PTHV_DO, PRT_DO,                 &
-                       PU_DO, PV_DO, ZSV_DO,                     &
-                       PEMF,PDETR,                               &
-                       PENTR,ZBUO_INTEG,KKLCL,KKETL,KKCTL,ZDEPTH )
 ELSE
   call Print_msg( NVERB_FATAL, 'GEN', 'SHALLOW_MF', 'no updraft model for EDKF: CMF_UPDRAFT='//trim(HMF_UPDRAFT) )
 ENDIF
@@ -417,7 +400,7 @@ CALL COMPUTE_MF_CLOUD(KKA,IKB,IKE,KKU,KKL,KRR,KRRL,KRRI,&
 !!!    ------------------------------------------------------------------------
 !
 ZEMF_O_RHODREF=PEMF/PRHODREF
-      IF(HMF_UPDRAFT == 'EDKF' .OR. HMF_UPDRAFT == 'RHCJ'.OR. HMF_UPDRAFT == 'BOUT') THEN
+IF(HMF_UPDRAFT == 'EDKF' .OR. HMF_UPDRAFT == 'RHCJ') THEN
    IF ( PIMPL_MF > 1.E-10 ) THEN  
        CALL MF_TURB(KKA, IKB, IKE, KKU, KKL, OMIXUV,                     &
                 ONOMIXLG,KSV_LGBEG,KSV_LGEND,                            &
@@ -429,66 +412,17 @@ ZEMF_O_RHODREF=PEMF/PRHODREF
                 ZEMF_O_RHODREF,PTHL_UP,PTHV_UP,PRT_UP,PU_UP,PV_UP,ZSV_UP,&
                 PFLXZTHMF,PFLXZTHVMF,PFLXZRMF,PFLXZUMF,PFLXZVMF,         &
                 ZFLXZSVMF                                                )
-ELSE
-  CALL MF_TURB_EXPL(KKA, IKB, IKE, KKU, KKL, OMIXUV,                     &
+  ELSE
+      CALL MF_TURB_EXPL(KKA, IKB, IKE, KKU, KKL, OMIXUV,                 &
            PRHODJ,                                                       &
            ZTHLM,ZTHVM,ZRTM,PUM,PVM,                                     &
            PDTHLDT_MF,PDRTDT_MF,PDUDT_MF,PDVDT_MF,                       &
            ZEMF_O_RHODREF,PTHL_UP,PTHV_UP,PRT_UP,PU_UP,PV_UP,            &
            PFLXZTHMF,PFLXZTHVMF,PFLXZRMF,PFLXZUMF,PFLXZVMF)
-ENDIF
-      ELSEIF (HMF_UPDRAFT == 'HRIO') THEN
-       CALL MF_TURB_GREYZONE(KKA, IKB, IKE, KKU, KKL,OMIXUV,             &
-                ONOMIXLG,KSV_LGBEG,KSV_LGEND,                            &
-                PIMPL_MF, PTSTEP,                                        &
-                PDZZ,                                                    &
-                PRHODJ,                                                  &
-                ZTHLM,ZTHVM,ZRTM,PUM,PVM,PSVM,                           &
-                PDTHLDT_MF,PDRTDT_MF,PDUDT_MF,PDVDT_MF,PDSVDT_MF,        &
-                ZEMF_O_RHODREF,PTHL_UP,PTHV_UP,PRT_UP,PU_UP,PV_UP,ZSV_UP,&
-                PTHL_DO,PTHV_DO,PRT_DO,PU_DO,PV_DO,ZSV_DO,               &
-                PFLXZTHMF,PFLXZTHVMF,PFLXZRMF,PFLXZUMF,PFLXZVMF,         &
-                ZFLXZSVMF                                                )
-       ELSE
-         call Print_msg( NVERB_FATAL, 'GEN', 'SHALLOW_MF', 'no updraft model for EDKF: CMF_UPDRAFT='//trim(HMF_UPDRAFT) )
-       END IF
-
-     IF (HMF_UPDRAFT == 'BOUT') THEN
-      !! calcul de la hauteur de la couche limite ou de L_up
-      DO JK=1,IKE-KKL
-       PTHVREF(:,JK)=RESHAPE(XTHVREF(:,:,JK),(/SIZE(PTHM,1)*SIZE(PTHM,2)/) )
-      ENDDO
-      ZG_O_THVREF=XG/PTHVREF
-      GLMIX=.TRUE.
-      IF(CTURBLEN=='RM17') THEN
-       ZDUDZ = MZF_MF(KKA,KKU,KKL,GZ_M_W_MF(KKA,KKU,KKL,PUM,PDZZ))
-       ZDVDZ = MZF_MF(KKA,KKU,KKL,GZ_M_W_MF(KKA,KKU,KKL,PVM,PDZZ))
-       ZSHEAR = SQRT(ZDUDZ*ZDUDZ + ZDVDZ*ZDVDZ)
-      ELSE
-       ZSHEAR = 0. !no shear in bl89 mixing length
-      END IF  
-      CALL COMPUTE_BL89_ML(KKA,IKB,IKE,KKU,KKL,PDZZ,PTKEM(:,IKB)  ,ZG_O_THVREF(:,IKB),ZTHVM,IKB,GLMIX,.TRUE.,ZSHEAR,ZLUP)
-      !! calcul de Dx/(h+hc)
-      DO JI=1,SIZE(XDXHAT)
-       DO JJ=1,SIZE(XDYHAT)
-          ZRESOL_GRID((JJ-1)*SIZE(XDXHAT)+JI)=SQRT(XDXHAT(JI)*XDYHAT(JJ))
-       ENDDO
-      ENDDO
-      ZRESOL_NORM=ZRESOL_GRID/ZLUP
-      !! P=loi pour MF, on utilise la même loi à chaque fois
-      ZPLAW=(ZRESOL_NORM*ZRESOL_NORM+0.19*ZRESOL_NORM**(2./3.))/ &
-      (ZRESOL_NORM*ZRESOL_NORM+0.15*ZRESOL_NORM**(2./3.)+0.33)
-      !! reduction des flux a posteriori
-      !! MF=P*MF en première approximation, on oublie w'f' (Kgrad) et w'f'resol (nul avec ce flux)
-      !  
-      DO JK=1,IKE-KKL
-       PFLXZTHMF(:,JK)=PFLXZTHMF(:,JK)*ZPLAW
-       PFLXZTHVMF(:,JK)=PFLXZTHVMF(:,JK)*ZPLAW
-       PFLXZRMF(:,JK)=PFLXZRMF(:,JK)*ZPLAW
-       PFLXZUMF(:,JK)=PFLXZUMF(:,JK)*ZPLAW
-       PFLXZVMF(:,JK)=PFLXZVMF(:,JK)*ZPLAW
-      ENDDO
-     END IF
+  ENDIF
+ELSE
+  call Print_msg( NVERB_FATAL, 'GEN', 'SHALLOW_MF', 'no updraft model for EDKF: CMF_UPDRAFT='//trim(HMF_UPDRAFT) )
+END IF
   
 ! security in the case HMF_UPDRAFT = 'DUAL'
 ! to be modified if 'DUAL' is evolving (momentum mixing for example)
diff --git a/src/MNH/spawning.f90 b/src/MNH/spawning.f90
index 3392212b137d81ff30a2cb66d643f683f69d52e1..2a6fafdf72898138004ab73feef23302c6335403 100644
--- a/src/MNH/spawning.f90
+++ b/src/MNH/spawning.f90
@@ -94,7 +94,7 @@ USE MODD_LUNIT
 USE MODD_PARAMETERS
 USE MODD_REF
 USE MODD_SPAWN
-USE MODN_BLANK
+USE MODN_BLANK_n
 USE MODD_NSV
 USE MODN_CONFZ
 !  
@@ -192,8 +192,8 @@ CALL INIT_NMLVAR
 CALL POSNAM(ILUSPA,'NAM_SPAWN_SURF',GFOUND)
 IF (GFOUND) READ(UNIT=ILUSPA,NML=NAM_SPAWN_SURF)
 CALL UPDATE_MODD_FROM_NMLVAR
-CALL POSNAM(ILUSPA,'NAM_BLANK',GFOUND)
-IF (GFOUND) READ(UNIT=ILUSPA,NML=NAM_BLANK)
+CALL POSNAM(ILUSPA,'NAM_BLANKn',GFOUND)
+IF (GFOUND) READ(UNIT=ILUSPA,NML=NAM_BLANKn)
 CALL POSNAM(ILUSPA,'NAM_CONFZ',GFOUND)
 IF (GFOUND) READ(UNIT=ILUSPA,NML=NAM_CONFZ)
 CALL POSNAM(ILUSPA,'NAM_CONF_SPAWN',GFOUND)
diff --git a/src/MNH/turb.f90 b/src/MNH/turb.f90
index 8969a939e0c888375df7f9eaa0773d7fa229f7cc..d569258fe885d9eda14c752b56c487d0e792e57a 100644
--- a/src/MNH/turb.f90
+++ b/src/MNH/turb.f90
@@ -344,6 +344,7 @@ END MODULE MODI_TURB
 !  P. Wautelet 11/06/2020: bugfix: correct PRSVS array indices
 !  P. Wautelet + Benoit Vié 06/2020: improve removal of negative scalar variables + adapt the corresponding budgets
 !  P. Wautelet 30/06/2020: move removal of negative scalar variables to Sources_neg_correct
+!  R. Honnert/V. Masson 02/2021: new mixing length in the grey zone
 ! --------------------------------------------------------------------------
 !
 !*      0. DECLARATIONS
@@ -502,6 +503,7 @@ REAL, ALLOCATABLE, DIMENSION(:,:,:) ::&
           ZEXN,                       &  ! EXN at t-1
           ZT,                         &  ! T at t-1
           ZLOCPEXNM,                  &  ! Lv/Cp/EXNREF at t-1
+          ZLMW,                       &  ! Turbulent mixing length (work array)
           ZLEPS,                      &  ! Dissipative length
           ZTRH,                       &  ! Dynamic and Thermal Production of TKE
           ZATHETA,ZAMOIST,            &  ! coefficients for s = f (Thetal,Rnp)
@@ -541,8 +543,10 @@ INTEGER             :: IKTB,IKTE    ! start, end of k loops in physical domain
 INTEGER             :: JRR,JK,JSV   ! loop counters
 INTEGER             :: JI,JJ        ! loop counters
 REAL                :: ZL0          ! Max. Mixing Length in Blakadar formula
-REAL                :: ZALPHA       ! proportionnality constant between Dz/2 and 
-!                                   ! BL89 mixing length near the surface
+REAL                :: ZALPHA       ! work coefficient : 
+                                    ! - proportionnality constant between Dz/2 and 
+!                                   !   BL89 mixing length near the surface
+                                    ! - and coefficient to reduce DELT in ADAP
 !
 REAL :: ZTIME1, ZTIME2
 REAL, DIMENSION(SIZE(PUT,1),SIZE(PUT,2),SIZE(PUT,3)):: ZTT,ZEXNE,ZLV,ZLS,ZCPH,ZCOR
@@ -555,6 +559,7 @@ ALLOCATE (                                                        &
           ZEXN(SIZE(PTHLT,1),SIZE(PTHLT,2),SIZE(PTHLT,3)),        &  
           ZT(SIZE(PTHLT,1),SIZE(PTHLT,2),SIZE(PTHLT,3)),          &  
           ZLOCPEXNM(SIZE(PTHLT,1),SIZE(PTHLT,2),SIZE(PTHLT,3)),   & 
+          ZLMW(SIZE(PTHLT,1),SIZE(PTHLT,2),SIZE(PTHLT,3)),        & 
           ZLEPS(SIZE(PTHLT,1),SIZE(PTHLT,2),SIZE(PTHLT,3)),       &  
           ZTRH(SIZE(PTHLT,1),SIZE(PTHLT,2),SIZE(PTHLT,3)),        &  
           ZATHETA(SIZE(PTHLT,1),SIZE(PTHLT,2),SIZE(PTHLT,3)),     &
@@ -759,19 +764,37 @@ SELECT CASE (HTURBLEN)
     ZSHEAR = SQRT(ZDUDZ*ZDUDZ + ZDVDZ*ZDVDZ)
     CALL BL89(KKA,KKU,KKL,PZZ,PDZZ,PTHVREF,ZTHLM,KRR,ZRM,PTKET,ZSHEAR,PLEM)
 !
-!*      3.3 Delta mixing length
+!*      3.3 Grey-zone combined RM17 & Deardorff mixing lengths 
+!           --------------------------------------------------
+
+  CASE ('ADAP')
+    ZDUDZ = MXF(MZF(GZ_U_UW(PUT,PDZZ)))
+    ZDVDZ = MYF(MZF(GZ_V_VW(PVT,PDZZ)))
+    ZSHEAR = SQRT(ZDUDZ*ZDUDZ + ZDVDZ*ZDVDZ)
+    CALL BL89(KKA,KKU,KKL,PZZ,PDZZ,PTHVREF,ZTHLM,KRR,ZRM,PTKET,ZSHEAR,PLEM)
+
+    CALL DELT(ZLMW,ODZ=.FALSE.)
+    ! The minimum mixing length is chosen between Horizontal grid mesh (not taking into account the vertical grid mesh) and RM17.
+    ! For large horizontal grid meshes, this is equal to RM17
+    ! For LES grid meshes, this is equivalent to Deardorff : the base mixing lentgh is the horizontal grid mesh, 
+    !                      and it is limited by a stability-based length (RM17), as was done in Deardorff length (but taking into account shear as well)
+    ! For grid meshes in the grey zone, then this is the smaller of the two.
+    ZALPHA=0.50
+    PLEM = MIN(PLEM,ZALPHA*ZLMW)
+!
+!*      3.4 Delta mixing length
 !           -------------------
 !
   CASE ('DELT')
-    CALL DELT(PLEM)
+    CALL DELT(PLEM,ODZ=.TRUE.)
 !
-!*      3.4 Deardorff mixing length
+!*      3.5 Deardorff mixing length
 !           -----------------------
 !
   CASE ('DEAR')
     CALL DEAR(PLEM)
 !
-!*      3.5 Blackadar mixing length
+!*      3.6 Blackadar mixing length
 !           -----------------------
 !
   CASE ('BLKR')
@@ -1411,7 +1434,7 @@ REAL, DIMENSION(SIZE(PEXN,1),SIZE(PEXN,2),SIZE(PEXN,3)) :: ZDRVSATDT
 END SUBROUTINE COMPUTE_FUNCTION_THERMO
 !
 !     ####################
-      SUBROUTINE DELT(PLM)
+      SUBROUTINE DELT(PLM,ODZ)
 !     ####################
 !!
 !!****  *DELT* routine to compute mixing length for DELT case
@@ -1433,6 +1456,7 @@ END SUBROUTINE COMPUTE_FUNCTION_THERMO
 !*       0.1   Declarations of dummy arguments 
 !
 REAL, DIMENSION(:,:,:), INTENT(OUT)   :: PLM
+LOGICAL,                INTENT(IN)    :: ODZ
 !
 !*       0.2   Declarations of local variables
 !
@@ -1440,18 +1464,32 @@ REAL                :: ZD           ! distance to the surface
 !
 !-------------------------------------------------------------------------------
 !
-DO JK = IKTB,IKTE ! 1D turbulence scheme
-  PLM(:,:,JK) = PZZ(:,:,JK+KKL) - PZZ(:,:,JK)
-END DO
-PLM(:,:,KKU) = PLM(:,:,IKE)
-PLM(:,:,KKA) = PZZ(:,:,IKB) - PZZ(:,:,KKA)
-IF ( HTURBDIM /= '1DIM' ) THEN  ! 3D turbulence scheme
-  IF ( L2D) THEN
-    PLM(:,:,:) = SQRT( PLM(:,:,:)*MXF(PDXX(:,:,:)) ) 
-  ELSE
-    PLM(:,:,:) = (PLM(:,:,:)*MXF(PDXX(:,:,:))*MYF(PDYY(:,:,:)) ) ** (1./3.)
+IF (ODZ) THEN
+  ! Dz is take into account in the computation
+  DO JK = IKTB,IKTE ! 1D turbulence scheme
+    PLM(:,:,JK) = PZZ(:,:,JK+KKL) - PZZ(:,:,JK)
+  END DO
+  PLM(:,:,KKU) = PLM(:,:,IKE)
+  PLM(:,:,KKA) = PZZ(:,:,IKB) - PZZ(:,:,KKA)
+  IF ( HTURBDIM /= '1DIM' ) THEN  ! 3D turbulence scheme
+    IF ( L2D) THEN
+      PLM(:,:,:) = SQRT( PLM(:,:,:)*MXF(PDXX(:,:,:)) ) 
+    ELSE
+      PLM(:,:,:) = (PLM(:,:,:)*MXF(PDXX(:,:,:))*MYF(PDYY(:,:,:)) ) ** (1./3.)
+    END IF
+  END IF
+ELSE
+  ! Dz not taken into account in computation to assure invariability with vertical grid mesh
+  PLM=1.E10
+  IF ( HTURBDIM /= '1DIM' ) THEN  ! 3D turbulence scheme
+    IF ( L2D) THEN
+      PLM(:,:,:) = MXF(PDXX(:,:,:))
+    ELSE
+      PLM(:,:,:) = (MXF(PDXX(:,:,:))*MYF(PDYY(:,:,:)) ) ** (1./2.)
+    END IF
   END IF
 END IF
+
 !
 !  mixing length limited by the distance normal to the surface 
 !  (with the same factor as for BL89)
@@ -1483,7 +1521,7 @@ END SUBROUTINE DELT
       SUBROUTINE DEAR(PLM)
 !     ####################
 !!
-!!****  *DELT* routine to compute mixing length for DEARdorff case
+!!****  *DEAR* routine to compute mixing length for DEARdorff case
 !
 !!    AUTHOR
 !!    ------
@@ -1708,14 +1746,14 @@ ELSE
 !
 !*         3.1 BL89 mixing length
 !           ------------------
-  CASE ('BL89','RM17')
+  CASE ('BL89','RM17','ADAP')
     ZSHEAR=0.
     CALL BL89(KKA,KKU,KKL,PZZ,PDZZ,PTHVREF,ZTHLM,KRR,ZRM,PTKET,ZSHEAR,ZLM_CLOUD)
 !
 !*         3.2 Delta mixing length
 !           -------------------
   CASE ('DELT')
-    CALL DELT(ZLM_CLOUD)
+    CALL DELT(ZLM_CLOUD,ODZ=.TRUE.)
 !
 !*         3.3 Deardorff mixing length
 !           -----------------------
diff --git a/src/MNH/turb_ver.f90 b/src/MNH/turb_ver.f90
index c4e3511ee0ed94c49e2b466b01ae0a6ab392fbe3..fce78c562131d968b5d3d307a70f25d06c226716 100644
--- a/src/MNH/turb_ver.f90
+++ b/src/MNH/turb_ver.f90
@@ -323,7 +323,6 @@ USE MODD_IO,             ONLY: TFILEDATA
 USE MODD_PARAMETERS
 USE MODD_LES
 USE MODD_NSV,            ONLY: NSV
-USE MODD_BLANK
 !
 USE MODI_PRANDTL
 USE MODI_EMOIST
diff --git a/src/MNH/write_desfmn.f90 b/src/MNH/write_desfmn.f90
index f91e265294da2ac821b13220e02d7e43421421c6..c01d74a29d2327fdbba21ef72936691caef8a8cf 100644
--- a/src/MNH/write_desfmn.f90
+++ b/src/MNH/write_desfmn.f90
@@ -1,4 +1,4 @@
-!MNH_LIC Copyright 1994-2018 CNRS, Meteo-France and Universite Paul Sabatier
+!MNH_LIC Copyright 1994-2021 CNRS, Meteo-France and Universite Paul Sabatier
 !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
 !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt  
 !MNH_LIC for details. version 1.
@@ -94,7 +94,7 @@ END MODULE MODI_WRITE_DESFM_n
 !!
 !!      Module MODN_LES  : contains declaration of the control parameters
 !!                                for Large Eddy Simulations' storages
-!!      Module MODN_BLANK: contains declaration of MesoNH developper variables
+!!      Module MODN_BLANK_n : contains declaration of MesoNH developper variables
 !!                                for test and debugging purposes.
 !!           
 !!
@@ -176,7 +176,7 @@ USE MODN_LUNIT_n
 USE MODN_LBC_n
 USE MODN_NUDGING_n
 USE MODN_TURB_n
-USE MODN_BLANK
+USE MODN_BLANK_n
 USE MODN_FRC
 USE MODN_CH_MNHC_n
 USE MODN_CH_SOLVER_n
@@ -344,6 +344,9 @@ WRITE(UNIT=ILUSEG,NML=NAM_NUDGINGn)
 CALL INIT_NAM_TURBn
 IF(CTURB /= 'NONE') WRITE(UNIT=ILUSEG,NML=NAM_TURBn)
 !
+CALL INIT_NAM_BLANKn
+WRITE(UNIT=ILUSEG,NML=NAM_BLANKn)
+!
 !IF (CPROGRAM/='MESONH') THEN
 !  LUSECHEM   = .FALSE.
 !  LORILAM    = .FALSE.
@@ -408,7 +411,7 @@ IF(LBU_RRH) WRITE(UNIT=ILUSEG,NML=NAM_BU_RRH)
 IF(LBU_RSV) WRITE(UNIT=ILUSEG,NML=NAM_BU_RSV)
 IF(LLES_MEAN .OR. LLES_RESOLVED .OR. LLES_SUBGRID .OR. LLES_UPDRAFT  &
 .OR. LLES_DOWNDRAFT .OR. LLES_SPECTRA) WRITE(UNIT=ILUSEG,NML=NAM_LES)
-WRITE(UNIT=ILUSEG,NML=NAM_BLANK)
+WRITE(UNIT=ILUSEG,NML=NAM_BLANKn)
 IF(LFORCING .OR. LTRANS) WRITE(UNIT=ILUSEG,NML=NAM_FRC)
 IF(CCLOUD(1:3) == 'ICE')  WRITE(UNIT=ILUSEG,NML=NAM_PARAM_ICE)
 IF(CCLOUD == 'C2R2' .OR. CCLOUD == 'C3R5' .OR. CCLOUD == 'KHKO') &
@@ -483,6 +486,9 @@ IF (NVERB >= 5) THEN
 !  
   WRITE(UNIT=ILUOUT,FMT="('********** BLOWING SNOW SCHEME ****************')")
   WRITE(UNIT=ILUOUT,NML=NAM_BLOWSNOWn)
+!
+  WRITE(UNIT=ILUOUT,FMT="('********** BLANKn *****************************')")
+  WRITE(UNIT=ILUOUT,NML=NAM_BLANKn)
 !
   IF (KMI==1) THEN
     WRITE(UNIT=ILUOUT,FMT="(/,'PART OF SEGMENT FILE COMMON TO ALL THE MODELS')")
@@ -560,9 +566,6 @@ IF (NVERB >= 5) THEN
 !    
     WRITE(UNIT=ILUOUT,FMT="('************ LES ******************************')")
     WRITE(UNIT=ILUOUT,NML=NAM_LES)
-!    
-    WRITE(UNIT=ILUOUT,FMT="('************ BLANK ****************************')")
-    WRITE(UNIT=ILUOUT,NML=NAM_BLANK)
 !    
     WRITE(UNIT=ILUOUT,FMT="('************ FORCING **************************')")
     WRITE(UNIT=ILUOUT,NML=NAM_FRC)
diff --git a/src/Makefile.MESONH.mk b/src/Makefile.MESONH.mk
index 1cc335d2d02d6f6102c5f1f3138271be82af9d0a..6c397c8646b31f54249993aa52decfba6e2b450f 100644
--- a/src/Makefile.MESONH.mk
+++ b/src/Makefile.MESONH.mk
@@ -495,7 +495,7 @@ ifeq "$(VER_CDF)" "CDFAUTO"
 DIR_CDFC?=${SRC_MESONH}/src/LIB/netcdf-c-${VERSION_CDFC}
 DIR_CDFCXX?=${SRC_MESONH}/src/LIB/netcdf-cxx4-${VERSION_CDFCXX}
 DIR_CDFF?=${SRC_MESONH}/src/LIB/netcdf-fortran-${VERSION_CDFF}
-CDF_PATH?=${SRC_MESONH}/src/LIB/netcdf-${ARCH}-R${MNH_REAL}I${MNH_INT}
+CDF_PATH?=${OBJDIR_MASTER}/NETCDF-${VERSION_CDFF}
 CDF_MOD?=${CDF_PATH}/include/netcdf.mod
 #
 INC_NETCDF     ?= -I${CDF_PATH}/include