From 3931cbba7a8a402832e3f099341aae865ce59602 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Riette?= <sebastien.riette@meteo.fr>
Date: Thu, 3 Feb 2022 16:12:27 +0100
Subject: [PATCH] =?UTF-8?q?S=C3=A9bastien=20Riette=2003/02/2022=20micro=20?=
 =?UTF-8?q?directories=20cleaning?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Some merging
Move some modules in aux directory
---
 docs/TODO                                     |  10 +-
 src/arome/aux/ini_budget.F90                  |   2 -
 src/arome/{micro => aux}/modd_dyn.F90         |   0
 src/arome/{micro => aux}/modd_lunit.F90       |   0
 src/arome/{micro => aux}/modd_parameters.F90  |  19 +-
 .../modd_refaro.F90 => aux/modd_ref.F90}      |   0
 .../{micro => dead_code}/mode_fmbidon.F90     |   0
 .../{micro => dead_code}/mode_fmwritbidon.F90 |   0
 src/arome/gmkpack_ignored_files               |   9 +
 src/arome/micro/ini_lima_cold_mixed.F90       |   1 -
 src/arome/micro/ini_rain_ice.F90              |  44 +-
 src/arome/micro/lima_adjust.F90               |   2 -
 src/arome/micro/lima_warm.F90                 |   3 -
 src/arome/turb/mode_thermo_mono.F90           |   4 -
 src/{arome/micro => common/aux}/modd_conf.F90 |  20 +-
 src/{arome/micro => common/aux}/modd_les.F90  |  37 +-
 src/{arome/micro => common/aux}/modd_nsv.F90  |  54 ++-
 src/mesonh/{micro => aux}/modd_dyn.f90        |   0
 src/mesonh/{micro => aux}/modd_lunit.f90      |   0
 src/mesonh/{micro => aux}/modd_parameters.f90 |  12 +-
 src/mesonh/micro/ini_rain_ice.f90             |  12 +-
 src/mesonh/micro/modd_conf.f90                | 127 -----
 src/mesonh/micro/modd_les.f90                 | 458 ------------------
 src/mesonh/micro/modd_nsv.f90                 | 253 ----------
 24 files changed, 152 insertions(+), 915 deletions(-)
 rename src/arome/{micro => aux}/modd_dyn.F90 (100%)
 rename src/arome/{micro => aux}/modd_lunit.F90 (100%)
 rename src/arome/{micro => aux}/modd_parameters.F90 (75%)
 rename src/arome/{micro/modd_refaro.F90 => aux/modd_ref.F90} (100%)
 rename src/arome/{micro => dead_code}/mode_fmbidon.F90 (100%)
 rename src/arome/{micro => dead_code}/mode_fmwritbidon.F90 (100%)
 rename src/{arome/micro => common/aux}/modd_conf.F90 (84%)
 rename src/{arome/micro => common/aux}/modd_les.F90 (95%)
 rename src/{arome/micro => common/aux}/modd_nsv.F90 (82%)
 rename src/mesonh/{micro => aux}/modd_dyn.f90 (100%)
 rename src/mesonh/{micro => aux}/modd_lunit.f90 (100%)
 rename src/mesonh/{micro => aux}/modd_parameters.f90 (97%)
 delete mode 100644 src/mesonh/micro/modd_conf.f90
 delete mode 100644 src/mesonh/micro/modd_les.f90
 delete mode 100644 src/mesonh/micro/modd_nsv.f90

diff --git a/docs/TODO b/docs/TODO
index 0faeb9d6f..80ae0c6f4 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -51,10 +51,18 @@ Ce répertoire devra être vidé à la fin du phasage, les modifications nécess
 
 Budgets/DDH
 - Le code dans budget_DDH devra être transféré dans mode_budget
-- les routines arome specifiques aux budgets sont dans mpa/micro, il faudrait les mettre ailleurs
+- Le module modd_dyn n'est utilisé que pour les budgets, voir s'il peut être supprimé
+- Le code des budgets devrait être revu: pas en phase avec celui de Méso-NH et phasage a priori
+  inutile car très peu de code semble réellement utile pour AROME
 
 SPP
 - modd_spp_type est pour l'instant dans mpa/micro/externals mais n'est pas de la microphysique
 
 Nettoyage apl_arome non fait (pb a la compilation) ==> 4 arguments dans aro_turb_mnh supprimés (non utilisés)
 turb.F90 : il reste un CALL à SOURCES_NEG_CORRECT à ajouter. Besoin de récupérer CCLOUD dans apl_arome : comment ?
+
+Regarder s'il ne serait pas possible/souhaitable de supprimer modd_lunit de PHYEX. On pourrait se contentner de recevoir le numero d'unité logique
+
+Faire quelque chose de mesonh/micro/modd_blankn.f90: le déplacer dans common ou le supprimer
+
+Nettoyage des répertoires aux nécessaire
diff --git a/src/arome/aux/ini_budget.F90 b/src/arome/aux/ini_budget.F90
index 20100d5b4..9506cd1df 100644
--- a/src/arome/aux/ini_budget.F90
+++ b/src/arome/aux/ini_budget.F90
@@ -83,8 +83,6 @@
 !*       0.    DECLARATIONS
 !              ------------
 !
-USE MODE_FM
-!
 USE MODD_PARAMETERS
 USE MODD_BUDGET
 USE MODD_DYN
diff --git a/src/arome/micro/modd_dyn.F90 b/src/arome/aux/modd_dyn.F90
similarity index 100%
rename from src/arome/micro/modd_dyn.F90
rename to src/arome/aux/modd_dyn.F90
diff --git a/src/arome/micro/modd_lunit.F90 b/src/arome/aux/modd_lunit.F90
similarity index 100%
rename from src/arome/micro/modd_lunit.F90
rename to src/arome/aux/modd_lunit.F90
diff --git a/src/arome/micro/modd_parameters.F90 b/src/arome/aux/modd_parameters.F90
similarity index 75%
rename from src/arome/micro/modd_parameters.F90
rename to src/arome/aux/modd_parameters.F90
index 931c6fb58..45a4d73ae 100644
--- a/src/arome/micro/modd_parameters.F90
+++ b/src/arome/aux/modd_parameters.F90
@@ -1,4 +1,9 @@
-!     ######spl
+!MNH_LIC Copyright 1994-2020 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_PARAMETERS
 !     ######################
 !
@@ -50,15 +55,21 @@ INTEGER, PARAMETER :: JPBUPROMAX = 60 ! Maximum of allowed processes for all
 INTEGER, PARAMETER :: JPRIMMAX = 6    ! Maximum number of points for the
                        ! horizontal relaxation for the outermost verticals
 INTEGER, PARAMETER :: JPSVMAX  = 200  ! Maximum number of scalar variables
+INTEGER, PARAMETER :: JPSVNAMELGTMAX = 10 ! Maximum length of a scalar variable name (do not set to less than 10)
 !
 !
 REAL,    PARAMETER :: XUNDEF = 1.E+20   ! default value for undefined or unused
-!                                     ! field.
-INTEGER, PARAMETER :: NUNDEF = 1E+9    ! default value for undefined or unused
-!                                     ! field.
+!                                       ! field.
+REAL,    PARAMETER :: XNEGUNDEF = -999. ! default value for undefined or unused
+!                                       ! field (negative value guaranteed)
+INTEGER, PARAMETER :: NUNDEF = 1E+9     ! default value for undefined or unused
+!                                       ! field.
+INTEGER, PARAMETER :: NNEGUNDEF = -999  ! default value for undefined or unused
+!                                       ! field (negative value guaranteed)
 INTEGER, PARAMETER :: JPDUMMY  = 20   ! Size of dummy array
 !
 INTEGER, PARAMETER :: JPOUTMAX = 192 ! Maximum allowed number of OUTput files
+INTEGER, PARAMETER :: JPOUTVARMAX = 192 ! Maximum allowed number of variables in an output file
 !
 INTEGER, PARAMETER :: NBUNAMELGTMAX  = 32  ! Maximum length of a budget name
 INTEGER, PARAMETER :: NCOMMENTLGTMAX = 100 ! Maximum length of a comment
diff --git a/src/arome/micro/modd_refaro.F90 b/src/arome/aux/modd_ref.F90
similarity index 100%
rename from src/arome/micro/modd_refaro.F90
rename to src/arome/aux/modd_ref.F90
diff --git a/src/arome/micro/mode_fmbidon.F90 b/src/arome/dead_code/mode_fmbidon.F90
similarity index 100%
rename from src/arome/micro/mode_fmbidon.F90
rename to src/arome/dead_code/mode_fmbidon.F90
diff --git a/src/arome/micro/mode_fmwritbidon.F90 b/src/arome/dead_code/mode_fmwritbidon.F90
similarity index 100%
rename from src/arome/micro/mode_fmwritbidon.F90
rename to src/arome/dead_code/mode_fmwritbidon.F90
diff --git a/src/arome/gmkpack_ignored_files b/src/arome/gmkpack_ignored_files
index 155b80f82..1be988ba1 100644
--- a/src/arome/gmkpack_ignored_files
+++ b/src/arome/gmkpack_ignored_files
@@ -155,3 +155,12 @@ phyex/turb/th_r_from_thl_rt_3d.F90
 phyex/turb/thl_rt_from_th_r_mf.F90
 phyex/turb/bl_depth_diag_3d.F90
 phyex/turb/bl_depth_diag_1d.F90
+phyex/micro/modd_conf.F90
+phyex/micro/modd_dyn.F90
+phyex/micro/modd_les.F90
+phyex/micro/modd_lunit.F90
+phyex/micro/modd_parameters.F90
+phyex/micro/modd_nsv.F90
+phyex/micro/modd_refaro.F90
+phyex/micro/mode_fmbidon.F90
+phyex/micro/mode_fmwritbidon.F90
diff --git a/src/arome/micro/ini_lima_cold_mixed.F90 b/src/arome/micro/ini_lima_cold_mixed.F90
index 79d0d993b..2e2aae3d8 100644
--- a/src/arome/micro/ini_lima_cold_mixed.F90
+++ b/src/arome/micro/ini_lima_cold_mixed.F90
@@ -40,7 +40,6 @@ END MODULE MODI_INI_LIMA_COLD_MIXED
 !*       0.    DECLARATIONS
 !              ------------
 !
-USE MODE_FM
 USE MODD_CST
 USE MODD_REF
 USE MODD_PARAM_LIMA
diff --git a/src/arome/micro/ini_rain_ice.F90 b/src/arome/micro/ini_rain_ice.F90
index 023e0e268..4068a1ab9 100644
--- a/src/arome/micro/ini_rain_ice.F90
+++ b/src/arome/micro/ini_rain_ice.F90
@@ -1,7 +1,10 @@
+!MNH_LIC Copyright 1995-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
       SUBROUTINE INI_RAIN_ICE ( KLUOUT, PTSTEP, PDZMIN, KSPLITR, HCLOUD )
-      USE PARKIND1, ONLY : JPRB
-      USE YOMHOOK , ONLY : LHOOK, DR_HOOK
 !     ###########################################################
 !
 !!****  *INI_RAIN_ICE * - initialize the constants necessary for the warm and
@@ -24,7 +27,7 @@
 !!    sedimentation is fulfilled for a Raindrop maximal fall velocity equal
 !!    VTRMAX. The parameters defining the collection kernels are read and are
 !!    checked against the new ones. If any change occurs, these kernels are
-!!    recomputed and their numerical values are written in the output listiing.
+!!    recomputed and their numerical values are written in the output listing.
 !!
 !!    EXTERNAL
 !!    --------
@@ -74,13 +77,14 @@
 !!                  24/03/01 Update XCRIAUTI for cirrus cases
 !!      J.-P. Pinty 24/11/01 Update ICE3/ICE4 options
 !!      S. Riette 2016-11: new ICE3/ICE4 options
-!!
+!!      P. Wautelet 22/01/2019 bug correction: incorrect write
+!  P. Wautelet 26/04/2019: replace non-standard FLOAT function by REAL function
+!
 !-------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
 !              ------------
 !
-USE MODE_FM
 USE MODD_CST
 USE MODD_LUNIT
 USE MODD_PARAMETERS
@@ -101,6 +105,9 @@ USE MODE_READ_XKER_SWETH, ONLY: READ_XKER_SWETH
 USE MODE_READ_XKER_GWETH, ONLY: READ_XKER_GWETH
 USE MODE_READ_XKER_RWETH, ONLY: READ_XKER_RWETH
 !
+USE PARKIND1, ONLY : JPRB
+USE YOMHOOK , ONLY : LHOOK, DR_HOOK
+!
 IMPLICIT NONE
 !
 !*       0.1   Declarations of dummy arguments :
@@ -164,8 +171,11 @@ REAL     :: PDRYLBDAG_MAX,PDRYLBDAS_MAX,PDRYLBDAG_MIN,PDRYLBDAS_MIN
 REAL     :: PDRYLBDAR_MAX,PDRYLBDAR_MIN
 REAL     :: PWETLBDAS_MAX,PWETLBDAG_MAX,PWETLBDAS_MIN,PWETLBDAG_MIN
 REAL     :: PWETLBDAR_MAX,PWETLBDAH_MAX,PWETLBDAR_MIN,PWETLBDAH_MIN
+!
+REAL(KIND=JPRB) :: ZHOOK_HANDLE
 !-------------------------------------------------------------------------------
 !
+IF (LHOOK) CALL DR_HOOK('INI_RAIN_ICE',0,ZHOOK_HANDLE)
 !
 !*       0.     FUNCTION STATEMENTS
 !               -------------------
@@ -180,8 +190,6 @@ REAL     :: PWETLBDAR_MAX,PWETLBDAH_MAX,PWETLBDAR_MIN,PWETLBDAH_MIN
 !
 !*       1.1    Set the hailstones maximum fall velocity
 !
-REAL(KIND=JPRB) :: ZHOOK_HANDLE
-IF (LHOOK) CALL DR_HOOK('INI_RAIN_ICE',0,ZHOOK_HANDLE)
 IF (CSEDIM == 'SPLI') THEN
  IF (HCLOUD == 'OLD4') THEN
   ZVTRMAX = 40.
@@ -195,7 +203,7 @@ END IF
 KSPLITR = 1
 IF (CSEDIM == 'SPLI' .AND. HCLOUD(1:3)=='OLD') THEN
  SPLIT : DO
-  ZT = PTSTEP / FLOAT(KSPLITR)
+  ZT = PTSTEP / REAL(KSPLITR)
   IF ( ZT * ZVTRMAX / PDZMIN .LT. 1.) EXIT SPLIT
   KSPLITR = KSPLITR + 1
  END DO SPLIT
@@ -649,7 +657,7 @@ END IF
 NGAMINC = 80
 XGAMINC_BOUND_MIN = 1.0E-1 ! Minimal value of (Lbda * D_cs^lim)**alpha
 XGAMINC_BOUND_MAX = 1.0E7  ! Maximal value of (Lbda * D_cs^lim)**alpha
-ZRATE = EXP(LOG(XGAMINC_BOUND_MAX/XGAMINC_BOUND_MIN)/FLOAT(NGAMINC-1))
+ZRATE = EXP(LOG(XGAMINC_BOUND_MAX/XGAMINC_BOUND_MIN)/REAL(NGAMINC-1))
 !
 IF( .NOT.ALLOCATED(XGAMINC_RIM1) ) ALLOCATE( XGAMINC_RIM1(NGAMINC) )
 IF( .NOT.ALLOCATED(XGAMINC_RIM2) ) ALLOCATE( XGAMINC_RIM2(NGAMINC) )
@@ -687,13 +695,13 @@ XLBSACCR3   =                          MOMG(XALPHAS,XNUS,XBS+2.)
 NACCLBDAS = 40
 XACCLBDAS_MIN = 5.0E1 ! Minimal value of Lbda_s to tabulate XKER_RACCS
 XACCLBDAS_MAX = 5.0E5 ! Maximal value of Lbda_s to tabulate XKER_RACCS
-ZRATE = LOG(XACCLBDAS_MAX/XACCLBDAS_MIN)/FLOAT(NACCLBDAS-1)
+ZRATE = LOG(XACCLBDAS_MAX/XACCLBDAS_MIN)/REAL(NACCLBDAS-1)
 XACCINTP1S = 1.0 / ZRATE
 XACCINTP2S = 1.0 - LOG( XACCLBDAS_MIN ) / ZRATE
 NACCLBDAR = 40
 XACCLBDAR_MIN = 1.0E3 ! Minimal value of Lbda_r to tabulate XKER_RACCS
 XACCLBDAR_MAX = 1.0E7 ! Maximal value of Lbda_r to tabulate XKER_RACCS
-ZRATE = LOG(XACCLBDAR_MAX/XACCLBDAR_MIN)/FLOAT(NACCLBDAR-1)
+ZRATE = LOG(XACCLBDAR_MAX/XACCLBDAR_MIN)/REAL(NACCLBDAR-1)
 XACCINTP1R = 1.0 / ZRATE
 XACCINTP2R = 1.0 - LOG( XACCLBDAR_MIN ) / ZRATE
 !
@@ -891,19 +899,19 @@ XLBRDRYG3   =                          MOMG(XALPHAR,XNUR,5.)
 NDRYLBDAR = 40
 XDRYLBDAR_MIN = 1.0E3 ! Minimal value of Lbda_r to tabulate XKER_RDRYG
 XDRYLBDAR_MAX = 1.0E7 ! Maximal value of Lbda_r to tabulate XKER_RDRYG
-ZRATE = LOG(XDRYLBDAR_MAX/XDRYLBDAR_MIN)/FLOAT(NDRYLBDAR-1)
+ZRATE = LOG(XDRYLBDAR_MAX/XDRYLBDAR_MIN)/REAL(NDRYLBDAR-1)
 XDRYINTP1R = 1.0 / ZRATE
 XDRYINTP2R = 1.0 - LOG( XDRYLBDAR_MIN ) / ZRATE
 NDRYLBDAS = 80
 XDRYLBDAS_MIN = 2.5E1 ! Minimal value of Lbda_s to tabulate XKER_SDRYG
 XDRYLBDAS_MAX = 2.5E9 ! Maximal value of Lbda_s to tabulate XKER_SDRYG
-ZRATE = LOG(XDRYLBDAS_MAX/XDRYLBDAS_MIN)/FLOAT(NDRYLBDAS-1)
+ZRATE = LOG(XDRYLBDAS_MAX/XDRYLBDAS_MIN)/REAL(NDRYLBDAS-1)
 XDRYINTP1S = 1.0 / ZRATE
 XDRYINTP2S = 1.0 - LOG( XDRYLBDAS_MIN ) / ZRATE
 NDRYLBDAG = 40
 XDRYLBDAG_MIN = 1.0E3 ! Min value of Lbda_g to tabulate XKER_SDRYG,XKER_RDRYG
 XDRYLBDAG_MAX = 1.0E7 ! Max value of Lbda_g to tabulate XKER_SDRYG,XKER_RDRYG
-ZRATE = LOG(XDRYLBDAG_MAX/XDRYLBDAG_MIN)/FLOAT(NDRYLBDAG-1)
+ZRATE = LOG(XDRYLBDAG_MAX/XDRYLBDAG_MIN)/REAL(NDRYLBDAG-1)
 XDRYINTP1G = 1.0 / ZRATE
 XDRYINTP2G = 1.0 - LOG( XDRYLBDAG_MIN ) / ZRATE
 !
@@ -1089,25 +1097,25 @@ XLBRWETH3   =                          MOMG(XALPHAR,XNUR,XBR+2.)
 NWETLBDAS = 80
 XWETLBDAS_MIN = 2.5E1 ! Minimal value of Lbda_s to tabulate XKER_SWETH
 XWETLBDAS_MAX = 2.5E9 ! Maximal value of Lbda_s to tabulate XKER_SWETH
-ZRATE = LOG(XWETLBDAS_MAX/XWETLBDAS_MIN)/FLOAT(NWETLBDAS-1)
+ZRATE = LOG(XWETLBDAS_MAX/XWETLBDAS_MIN)/REAL(NWETLBDAS-1)
 XWETINTP1S = 1.0 / ZRATE
 XWETINTP2S = 1.0 - LOG( XWETLBDAS_MIN ) / ZRATE
 NWETLBDAG = 40
 XWETLBDAG_MIN = 1.0E3 ! Min value of Lbda_g to tabulate XKER_GWETH
 XWETLBDAG_MAX = 1.0E7 ! Max value of Lbda_g to tabulate XKER_GWETH
-ZRATE = LOG(XWETLBDAG_MAX/XWETLBDAG_MIN)/FLOAT(NWETLBDAG-1)
+ZRATE = LOG(XWETLBDAG_MAX/XWETLBDAG_MIN)/REAL(NWETLBDAG-1)
 XWETINTP1G = 1.0 / ZRATE
 XWETINTP2G = 1.0 - LOG( XWETLBDAG_MIN ) / ZRATE
 NWETLBDAR = 40
 XWETLBDAR_MIN = 1.0E3 ! Minimal value of Lbda_r to tabulate XKER_RWETH
 XWETLBDAR_MAX = 1.0E7 ! Maximal value of Lbda_r to tabulate XKER_RWETH
-ZRATE = LOG(XWETLBDAR_MAX/XWETLBDAR_MIN)/FLOAT(NWETLBDAR-1)
+ZRATE = LOG(XWETLBDAR_MAX/XWETLBDAR_MIN)/REAL(NWETLBDAR-1)
 XWETINTP1R = 1.0 / ZRATE
 XWETINTP2R = 1.0 - LOG( XWETLBDAR_MIN ) / ZRATE
 NWETLBDAH = 40
 XWETLBDAH_MIN = 1.0E3 ! Min value of Lbda_h to tabulate XKER_SWETH,XKER_GWETH,XKER_RWETH
 XWETLBDAH_MAX = 1.0E7 ! Max value of Lbda_h to tabulate XKER_SWETH,XKER_GWETH,XKER_RWETH
-ZRATE = LOG(XWETLBDAH_MAX/XWETLBDAH_MIN)/FLOAT(NWETLBDAH-1)
+ZRATE = LOG(XWETLBDAH_MAX/XWETLBDAH_MIN)/REAL(NWETLBDAH-1)
 XWETINTP1H = 1.0 / ZRATE
 XWETINTP2H = 1.0 - LOG( XWETLBDAH_MIN ) / ZRATE
 !
diff --git a/src/arome/micro/lima_adjust.F90 b/src/arome/micro/lima_adjust.F90
index 195cc8b1e..5a890472e 100644
--- a/src/arome/micro/lima_adjust.F90
+++ b/src/arome/micro/lima_adjust.F90
@@ -160,8 +160,6 @@ USE YOMMDDH, ONLY  : TMDDH
 USE MODI_BUDGET_DDH
 USE MODI_LIMA_FUNCTIONS
 !
-USE MODE_FM
-USE MODE_FMWRIT
 !
 IMPLICIT NONE
 !
diff --git a/src/arome/micro/lima_warm.F90 b/src/arome/micro/lima_warm.F90
index 1a74e7b2e..7778d173f 100644
--- a/src/arome/micro/lima_warm.F90
+++ b/src/arome/micro/lima_warm.F90
@@ -148,9 +148,6 @@ USE MODD_NSV
 USE MODD_BUDGET
 USE MODI_BUDGET_DDH
 !
-USE MODE_FM
-USE MODE_FMWRIT
-!
 USE MODI_LIMA_WARM_SEDIMENTATION
 USE MODI_LIMA_WARM_NUCL
 USE MODI_LIMA_WARM_COAL
diff --git a/src/arome/turb/mode_thermo_mono.F90 b/src/arome/turb/mode_thermo_mono.F90
index 5b68fba7e..8b85442eb 100644
--- a/src/arome/turb/mode_thermo_mono.F90
+++ b/src/arome/turb/mode_thermo_mono.F90
@@ -295,8 +295,6 @@ END FUNCTION SM_FOES_1D
 !
 USE MODD_CST
 !
-USE MODE_FM
-!
 IMPLICIT NONE
 !
 !*       0.1   Declarations of arguments and results
@@ -444,8 +442,6 @@ END FUNCTION SM_PMR_HU_3D
 !
 USE MODD_CST
 !
-USE MODE_FM
-!
 IMPLICIT NONE
 !
 !*       0.1   Declarations of arguments and results
diff --git a/src/arome/micro/modd_conf.F90 b/src/common/aux/modd_conf.F90
similarity index 84%
rename from src/arome/micro/modd_conf.F90
rename to src/common/aux/modd_conf.F90
index ec9f4bb1f..ea493d3a3 100644
--- a/src/arome/micro/modd_conf.F90
+++ b/src/common/aux/modd_conf.F90
@@ -1,4 +1,9 @@
-!     ######spl
+!MNH_LIC Copyright 1994-2018 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_CONF
 !     #################
 !
@@ -38,6 +43,10 @@
 !!      P. Jabouille                  26/06/01   lagrangian variables
 !!      V. Masson                     09/07/01   add LNEUTRAL switch
 !!      P. Jabouille                  18/04/02   add NBUGFIX and CBIBUSER
+!!      C. Lac                        01/04/14   add LCHECK     
+!!      G. Tanguy                     01/04/14   add LCOUPLING
+!!      J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 
+!!  Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O
 !!
 !-------------------------------------------------------------------------------
 !
@@ -59,7 +68,7 @@ LOGICAL,SAVE      :: LTHINSHELL  ! Logical for thinshell approximation
 LOGICAL,SAVE      :: LCARTESIAN  ! Logical for cartesian geometry :
                                  !  .TRUE.  = cartesian geometry
                                  !  .FALSE. = conformal projection
-LOGICAL,SAVE      :: L2D         ! Logical for 2D model version
+LOGICAL,SAVE      :: L2D=.FALSE. ! Logical for 2D model version
                                  ! .TRUE.  = 2D model version
                                  ! .FALSE. = 3D model version
 LOGICAL,SAVE      :: L1D         ! Logical for 1D model version
@@ -91,13 +100,14 @@ CHARACTER (LEN=3),SAVE :: CEQNSYS! EQuatioN SYStem resolved by the MESONH model
 LOGICAL,SAVE      :: LPACK       ! Logical to compress 1D or 2D FM files
 !
 !
+INTEGER,DIMENSION(3),SAVE :: NMNHVERSION ! Version of MesoNH
 INTEGER,SAVE :: NMASDEV           ! NMASDEV=XY corresponds to the masdevX_Y
 INTEGER,SAVE :: NBUGFIX           ! NBUGFIX=n corresponds to the BUGn of masdevX_Y
 CHARACTER(LEN=10),SAVE :: CBIBUSER! CBIBUSER is the name of the user binary library
 !
 CHARACTER(LEN=6),SAVE :: CPROGRAM ! CPROGRAM is the program currently running:
 !                                 ! 'PGD   ','ADVPGD','NESPGD','REAL  ','IDEAL '
-!                                 ! 'MESONH','SPAWN ','DIAG  '
+!                                 ! 'MESONH','SPAWN ','DIAG  ','SPEC  '
 !
 INTEGER,SAVE      :: NHALO        ! Size of the halo for parallel distribution
 !
@@ -111,5 +121,9 @@ LOGICAL,SAVE      :: LNOMIXLG    ! to use turbulence for lagrangian variables
 LOGICAL,SAVE      :: LNEUTRAL ! True if ref. theta field is uniform
 !
 LOGICAL,SAVE      :: LCPL_AROME  ! true if coupling file are issued from AROME
+LOGICAL,SAVE      :: LCOUPLING   ! true if coupling file (and not intial file)
+                                 ! (with LCOUPLING=T in PREP_REAL_CASE)
+!
+LOGICAL,SAVE      :: LCHECK ! To test reproducibility
 !
 END MODULE MODD_CONF
diff --git a/src/arome/micro/modd_les.F90 b/src/common/aux/modd_les.F90
similarity index 95%
rename from src/arome/micro/modd_les.F90
rename to src/common/aux/modd_les.F90
index 9ebc913ed..389e2b1a3 100644
--- a/src/arome/micro/modd_les.F90
+++ b/src/common/aux/modd_les.F90
@@ -1,4 +1,9 @@
-!     ######spl
+!MNH_LIC Copyright 1995-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.
+!-----------------------------------------------------------------
+!     ###############
       MODULE MODD_LES
 !     ###############
 !
@@ -34,7 +39,11 @@
 !!       V. Masson  Nov.   6, 2002  LES budgets
 !!       F. Couvreux Oct   1, 2006  LES PDF
 !!       J.Pergaud   Oct    , 2007  MF LES
-!!       P. Aumond   Oct     , 2009  User multimaskS + 4th order
+!!       P. Aumond   Oct     ,2009  User multimaskS + 4th order
+!!       C.Lac       Oct     ,2014  Correction on user masks
+!  P. Wautelet 05/2016-04/2018: new data structures and calls for I/O
+!  P. Wautelet 13/09/2019: budget: simplify and modernize date/time management
+!  P. Wautelet 30/03/2021: budgets: LES cartesian subdomain limits are defined in the physical domain
 !-------------------------------------------------------------------------------
 !
 !*       0.   DECLARATIONS
@@ -56,10 +65,10 @@ LOGICAL :: LLES_DOWNDRAFT ! flag to activate the computations in downdrafts
 LOGICAL :: LLES_SPECTRA   ! flag to activate the spectra computations
 LOGICAL :: LLES_PDF      ! flag to activate the pdf computations
 !
-INTEGER, DIMENSION(200) :: NLES_LEVELS         ! model levels for LES comp.
-REAL,    DIMENSION(200) :: XLES_ALTITUDES      ! alt.  levels for LES comp.
-INTEGER, DIMENSION(200) :: NSPECTRA_LEVELS     ! model levels for spectra comp.
-REAL,    DIMENSION(200) :: XSPECTRA_ALTITUDES  ! alt.  levels for spectra comp.
+INTEGER, DIMENSION(900) :: NLES_LEVELS         ! physical model levels for LES comp.
+REAL,    DIMENSION(900) :: XLES_ALTITUDES      ! alt.  levels for LES comp.
+INTEGER, DIMENSION(900) :: NSPECTRA_LEVELS     ! physical model levels for spectra comp.
+REAL,    DIMENSION(900) :: XSPECTRA_ALTITUDES  ! alt.  levels for spectra comp.
 !
 INTEGER, DIMENSION( 10) :: NLES_TEMP_SERIE_I   ! I, J and Z point
 INTEGER, DIMENSION( 10) :: NLES_TEMP_SERIE_J   ! localizations to
@@ -74,7 +83,7 @@ REAL :: XLES_TEMP_MEAN_END    ! for start and end of the temporal averaged comp.
 REAL :: XLES_TEMP_MEAN_STEP   ! time step for each averaging
 
 LOGICAL :: LLES_CART_MASK     ! flag to use a cartesian mask
-INTEGER :: NLES_IINF          ! definition of the cartesians mask
+INTEGER :: NLES_IINF          ! definition of the cartesians mask in physical domain
 INTEGER :: NLES_ISUP          !     for NLES_CART_MODNBR model
 INTEGER :: NLES_JINF          !               "
 INTEGER :: NLES_JSUP          !               "
@@ -87,7 +96,7 @@ INTEGER :: NPDF         ! number of pdf intervals
 !
 !-------------------------------------------------------------------------------
 !
-INTEGER, DIMENSION(JPMODELMAX) :: NLESn_IINF ! definition of the cartesians mask
+INTEGER, DIMENSION(JPMODELMAX) :: NLESn_IINF ! definition of the cartesians mask in physical domain
 INTEGER, DIMENSION(JPMODELMAX) :: NLESn_ISUP !          for all models
 INTEGER, DIMENSION(JPMODELMAX) :: NLESn_JINF !               "
 INTEGER, DIMENSION(JPMODELMAX) :: NLESn_JSUP !               "
@@ -115,7 +124,6 @@ LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: LLES_CURRENT_NEB_MASK
 LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: LLES_CURRENT_CORE_MASK
 ! 2D surface precipitations mask of the current model
 !
-LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: LLES_CURRENT_MY_MASK
 ! 2D owner mask of the current model
 LOGICAL, DIMENSION(:,:,:,:), ALLOCATABLE :: LLES_CURRENT_MY_MASKS
 !
@@ -130,11 +138,8 @@ INTEGER :: NLES_CURRENT_TCOUNT
 INTEGER :: NLES_CURRENT_TIMES
 ! current model NLES_TIMES (number of LES samplings)
 !
-REAL, DIMENSION(:,:), ALLOCATABLE :: XLES_CURRENT_TRAJT
-! trajt array for write_diachro routine
-!
 INTEGER :: NLES_CURRENT_IINF, NLES_CURRENT_ISUP, NLES_CURRENT_JINF, NLES_CURRENT_JSUP
-! coordinates for write_diachro, set to NLESn_IINF(current model), etc...
+! coordinates (in physical domain) for write_diachro, set to NLESn_IINF(current model), etc...
 !
 REAL :: XLES_CURRENT_DOMEGAX, XLES_CURRENT_DOMEGAY
 ! minimum wavelength in spectra analysis
@@ -145,9 +150,6 @@ CHARACTER(LEN=4), DIMENSION(2) :: CLES_CURRENT_LBCX
 CHARACTER(LEN=4), DIMENSION(2) :: CLES_CURRENT_LBCY
 ! current model Y boundary conditions for 2 points correlations computations
 !
-REAL, DIMENSION(:,:), ALLOCATABLE :: XLES_CURRENT_DATIME
-!  date array for diachro
-!
 REAL, DIMENSION(:),   ALLOCATABLE :: XLES_CURRENT_Z
 ! altitudes for diachro
 !
@@ -166,9 +168,6 @@ INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: NKLIN_CURRENT_SPEC
 REAL, DIMENSION(:,:,:), ALLOCATABLE :: XCOEFLIN_CURRENT_SPEC
 ! coefficients for vertical interpolation
 !
-CHARACTER(LEN=28) :: CCURRENT_FMDIAC
-! current CFMDIAC file
-!
 REAL,DIMENSION(2) :: XTIME_LES
 ! time spent in subgrid LES computations in this time-step in TURB
 !
diff --git a/src/arome/micro/modd_nsv.F90 b/src/common/aux/modd_nsv.F90
similarity index 82%
rename from src/arome/micro/modd_nsv.F90
rename to src/common/aux/modd_nsv.F90
index f15b1b104..63cab9dbf 100644
--- a/src/arome/micro/modd_nsv.F90
+++ b/src/common/aux/modd_nsv.F90
@@ -1,4 +1,9 @@
-!     ######spl
+!MNH_LIC Copyright 2001-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.
+!-------------------------------------------------------------------------------
+!        ###############
          MODULE MODD_NSV
 !        ###############
 !
@@ -20,15 +25,21 @@
 !!       M. Leriche    12/04/07 add aqueous chemistry
 !!       M. Leriche    08/07/10 add ice phase chemistry
 !!       C.Lac         07/11    add conditional sampling
+!!       Pialat/Tulet  15/02/12 add ForeFire
 !!       B.Vie              /14 LIMA
-!!
+!!      Modification    01/2016  (JP Pinty) Add LIMA
+!!       V. Vionnet     07/17   add blowing snow
+!  P. Wautelet 10/03/2021: add CSVNAMES and CSVNAMES_A to store the name of all the scalar variables
+!  B. Vie         06/2021: add prognostic supersaturation for LIMA
+!
 !-------------------------------------------------------------------------------
 !
 !*       0.   DECLARATIONS
 !             ------------
 !
-USE MODD_PARAMETERS, ONLY : JPMODELMAX,& ! Maximum allowed number of nested models
-                            JPSVMAX      ! Maximum number of scalar variables
+USE MODD_PARAMETERS, ONLY : JPMODELMAX, &  ! Maximum allowed number of nested models
+                            JPSVMAX,    &  ! Maximum number of scalar variables
+                            JPSVNAMELGTMAX ! Maximum length of a scalar variable name
 !
 IMPLICIT NONE
 SAVE
@@ -37,6 +48,8 @@ REAL,DIMENSION(JPSVMAX) :: XSVMIN ! minimum value for SV variables
 !
 LOGICAL :: LINI_NSV = .FALSE. ! becomes True when routine INI_NSV is called
 !
+CHARACTER(LEN=JPSVNAMELGTMAX), DIMENSION(:,:), ALLOCATABLE, TARGET :: CSVNAMES_A !Names of all the scalar variables
+
 INTEGER,DIMENSION(JPMODELMAX)::NSV_A = 0 ! total number of scalar variables
                                          ! NSV_A = NSV_USER_A+NSV_C2R2_A+NSV_CHEM_A+..
 INTEGER,DIMENSION(JPMODELMAX)::NSV_USER_A = 0  ! number of user scalar variables with 
@@ -123,16 +136,25 @@ INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_IFN_FREE_A = 0 ! First Free IFN conc.
 INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_IFN_NUCL_A = 0 ! First Nucl. IFN conc.
 INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_IMM_NUCL_A = 0 ! First Nucl. IMM conc.
 INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_HOM_HAZE_A = 0 ! Hom. freezing of CCN
+INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_SPRO_A = 0     ! Supersaturation
+!
+#ifdef MNH_FOREFIRE
+INTEGER,DIMENSION(JPMODELMAX)::NSV_FF_A = 0    ! number of ForeFire scalar variables
+INTEGER,DIMENSION(JPMODELMAX)::NSV_FFBEG_A = 0 ! with indices in the range :
+INTEGER,DIMENSION(JPMODELMAX)::NSV_FFEND_A = 0 ! NSV_FFBEG_A...NSV_FFEND_A
+#endif
 !
-! Specific declaration for AROME / CO2 runs.....
-! to be keep, and next to be introduced in MesoNH
 INTEGER,DIMENSION(JPMODELMAX)::NSV_CO2_A = 0    ! index for CO2
-
+!
+INTEGER,DIMENSION(JPMODELMAX)::NSV_SNW_A = 0    ! number of blowing snow scalar
+INTEGER,DIMENSION(JPMODELMAX)::NSV_SNWBEG_A = 0 ! with indices in the range :
+INTEGER,DIMENSION(JPMODELMAX)::NSV_SNWEND_A = 0 ! NSV_SNWBEG_A...NSV_SNWEND_A
 !
 !###############################################################################
 !
 ! variables updated for the current model
 !
+CHARACTER(LEN=JPSVNAMELGTMAX), DIMENSION(:), POINTER :: CSVNAMES !Names of all the scalar variables
 CHARACTER(LEN=6), DIMENSION(:), ALLOCATABLE :: CSV ! name of the scalar variables
 INTEGER :: NSV         = 0 ! total number of user scalar variables
 !
@@ -208,7 +230,7 @@ INTEGER :: NSV_CSEND = 0 ! NSV_CSBEG...NSV_CSEND
 !
 INTEGER :: NSV_LIMA     ! number of scalar in LIMA
 INTEGER :: NSV_LIMA_BEG ! with indices in the range :
-INTEGER :: NSV_LIMA_END ! NSV_LIMA_BEG...NSV_LIMA_END
+INTEGER :: NSV_LIMA_END ! NSV_LIMA_BEG_A...NSV_LIMA_END_A
 INTEGER :: NSV_LIMA_NC       !
 INTEGER :: NSV_LIMA_NR       !
 INTEGER :: NSV_LIMA_CCN_FREE !
@@ -219,10 +241,18 @@ INTEGER :: NSV_LIMA_IFN_FREE !
 INTEGER :: NSV_LIMA_IFN_NUCL !
 INTEGER :: NSV_LIMA_IMM_NUCL !
 INTEGER :: NSV_LIMA_HOM_HAZE !
-
-! Specific declaration for AROME / CO2 runs.....
-! to be keep, and next to be introduced in MesoNH
+INTEGER :: NSV_LIMA_SPRO     !
+!
+#ifdef MNH_FOREFIRE
+INTEGER :: NSV_FF    = 0 ! number of ForeFire scalar variables
+INTEGER :: NSV_FFBEG = 0 ! with indices in the range :
+INTEGER :: NSV_FFEND = 0 ! NSV_FFBEG...NSV_FFEND
+#endif
+!
 INTEGER :: NSV_CO2     = 0 ! index for CO2
-
+!
+INTEGER :: NSV_SNW     = 0 ! number of blowing snow scalar variables
+INTEGER :: NSV_SNWBEG  = 0 ! with indices in the range :
+INTEGER :: NSV_SNWEND  = 0 ! NSV_SNWBEG...NSV_SNWEND
 
 END MODULE MODD_NSV
diff --git a/src/mesonh/micro/modd_dyn.f90 b/src/mesonh/aux/modd_dyn.f90
similarity index 100%
rename from src/mesonh/micro/modd_dyn.f90
rename to src/mesonh/aux/modd_dyn.f90
diff --git a/src/mesonh/micro/modd_lunit.f90 b/src/mesonh/aux/modd_lunit.f90
similarity index 100%
rename from src/mesonh/micro/modd_lunit.f90
rename to src/mesonh/aux/modd_lunit.f90
diff --git a/src/mesonh/micro/modd_parameters.f90 b/src/mesonh/aux/modd_parameters.f90
similarity index 97%
rename from src/mesonh/micro/modd_parameters.f90
rename to src/mesonh/aux/modd_parameters.f90
index c21c6e709..1fffa21ef 100644
--- a/src/mesonh/micro/modd_parameters.f90
+++ b/src/mesonh/aux/modd_parameters.f90
@@ -11,21 +11,21 @@
 !!
 !!    PURPOSE
 !!    -------
-!       The purpose of this declarative module is to specify  the variables 
-!     which have the PARAMETER attribute   
+!       The purpose of this declarative module is to specify  the variables
+!     which have the PARAMETER attribute
 !
 !!
 !!**  IMPLICIT ARGUMENTS
 !!    ------------------
-!!      None 
+!!      None
 !!
 !!    REFERENCE
 !!    ---------
 !!      Book2 of documentation of Meso-NH (module MODD_PARAMETER)
-!!          
+!!
 !!    AUTHOR
 !!    ------
-!!	V. Ducrocq   *Meteo France*
+!!      V. Ducrocq   *Meteo France*
 !!
 !!    MODIFICATIONS
 !!    -------------
@@ -57,7 +57,7 @@ INTEGER,SAVE      :: JPHEXT = 1     ! Horizontal External points number
 !JUAN CYCLK
 INTEGER, PARAMETER :: JPVEXT = 1      ! Vertical External points number
 INTEGER, PARAMETER :: JPVEXT_TURB = 1      ! Vertical External points number
-INTEGER, PARAMETER :: JPMODELMAX = 8  ! Maximum allowed number of nested models 
+INTEGER, PARAMETER :: JPMODELMAX = 8  ! Maximum allowed number of nested models
 INTEGER, PARAMETER :: JPCPLFILEMAX = 24 ! Maximum allowed number of CouPLing FILEs
 INTEGER, PARAMETER :: JPRIMMAX = 6    ! Maximum number of points for the
                        ! horizontal relaxation for the outermost verticals
diff --git a/src/mesonh/micro/ini_rain_ice.f90 b/src/mesonh/micro/ini_rain_ice.f90
index 7f8bb85b0..8a57403eb 100644
--- a/src/mesonh/micro/ini_rain_ice.f90
+++ b/src/mesonh/micro/ini_rain_ice.f90
@@ -128,6 +128,9 @@ USE MODE_READ_XKER_SWETH, ONLY: READ_XKER_SWETH
 USE MODE_READ_XKER_GWETH, ONLY: READ_XKER_GWETH
 USE MODE_READ_XKER_RWETH, ONLY: READ_XKER_RWETH
 !
+USE PARKIND1, ONLY : JPRB
+USE YOMHOOK , ONLY : LHOOK, DR_HOOK
+!
 IMPLICIT NONE
 !
 !*       0.1   Declarations of dummy arguments :
@@ -191,8 +194,11 @@ REAL     :: PDRYLBDAG_MAX,PDRYLBDAS_MAX,PDRYLBDAG_MIN,PDRYLBDAS_MIN
 REAL     :: PDRYLBDAR_MAX,PDRYLBDAR_MIN
 REAL     :: PWETLBDAS_MAX,PWETLBDAG_MAX,PWETLBDAS_MIN,PWETLBDAG_MIN
 REAL     :: PWETLBDAR_MAX,PWETLBDAH_MAX,PWETLBDAR_MIN,PWETLBDAH_MIN
+!
+REAL(KIND=JPRB) :: ZHOOK_HANDLE
 !-------------------------------------------------------------------------------
 !
+IF (LHOOK) CALL DR_HOOK('INI_RAIN_ICE',0,ZHOOK_HANDLE)
 !
 !*       0.     FUNCTION STATEMENTS
 !               -------------------
@@ -212,7 +218,7 @@ IF (CSEDIM == 'SPLI' .AND. .NOT. LRED ) THEN
   ZVTRMAX = 40.
  ELSE IF (HCLOUD == 'ICE3') THEN
   ZVTRMAX = 10.
- END IF 
+ END IF
 END IF
 !
 !*       1.2    Compute the number of small time step integration
@@ -591,7 +597,8 @@ IF (GFLAG) THEN
   WRITE(UNIT=KLUOUT,FMT='(" Crit. ice cont. XCRIAUTI=",E13.6)') XCRIAUTI
   WRITE(UNIT=KLUOUT,FMT='(" A Coef. for cirrus law XACRIAUTI=",E13.6)')XACRIAUTI
   WRITE(UNIT=KLUOUT,FMT='(" B Coef. for cirrus law XBCRIAUTI=",E13.6)')XBCRIAUTI
-  WRITE(UNIT=KLUOUT,FMT='(" Temp degC at which cirrus law starts to be used=",E13.6)') XT0CRIAUTI
+  WRITE(UNIT=KLUOUT, &
+   & FMT='(" Temp degC at which cirrus law starts to be used=",E13.6)') XT0CRIAUTI
 END IF
 !
 !
@@ -1377,6 +1384,7 @@ IF (GFLAG) THEN
   WRITE(UNIT=KLUOUT,FMT='("            distribution:AL=",E13.6,"NU=",E13.6)') &
                                                       XALPHAH,XNUH
 END IF
+IF (LHOOK) CALL DR_HOOK('INI_RAIN_ICE',1,ZHOOK_HANDLE)
 CONTAINS
 !
 !------------------------------------------------------------------------------
diff --git a/src/mesonh/micro/modd_conf.f90 b/src/mesonh/micro/modd_conf.f90
deleted file mode 100644
index a7995fec5..000000000
--- a/src/mesonh/micro/modd_conf.f90
+++ /dev/null
@@ -1,127 +0,0 @@
-!MNH_LIC Copyright 1994-2018 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_CONF
-!     #################
-!
-!!****  *MODD_CONF* - declaration of configuration variables
-!!
-!!    PURPOSE
-!!    -------
-!       The purpose of this declarative module is to specify  the variables
-!     which concern the configuration of all models. For exemple, 
-!     the type of geometry (Cartesian or conformal projection plane). 
-!
-!!
-!!**  IMPLICIT ARGUMENTS
-!!    ------------------
-!!      None 
-!!
-!!    REFERENCE
-!!    ---------
-!!      Book2 of documentation of Meso-NH (module MODD_CONF)
-!!      Technical Specifications Report of the Meso-NH (chapters 2 and 3)
-!!       
-!!    AUTHOR
-!!    ------
-!!	V. Ducrocq   *Meteo France*
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original    05/05/94    
-!!      J. Stein                      09/01/95   add the 1D switch    
-!!      J. Stein and P. Jabouille     30/04/96   add the storage type         
-!!      J.-P. Pinty                   13/02/96   add LFORCING switch
-!!      J. Stein                      25/07/97   add the equation system switch    
-!!      P. Jabouille                  07/05/98   add LPACK
-!!      V. Masson                     18/03/98   add the VERSION switch
-!!      V. Masson                     15/03/99   add PROGRAM swith
-!!      P. Jabouille                  21/07/99   add NHALO and CSPLIT
-!!      P. Jabouille                  26/06/01   lagrangian variables
-!!      V. Masson                     09/07/01   add LNEUTRAL switch
-!!      P. Jabouille                  18/04/02   add NBUGFIX and CBIBUSER
-!!      C. Lac                        01/04/14   add LCHECK     
-!!      G. Tanguy                     01/04/14   add LCOUPLING
-!!      J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 
-!!  Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O
-!!
-!-------------------------------------------------------------------------------
-!
-!*       0.   DECLARATIONS
-!             ------------
-!
-IMPLICIT NONE
-!
-CHARACTER (LEN=5),SAVE :: CCONF  ! Configuration of models
-                                 !  'START' for start configuration 
-                                 !  'RESTART' for restart configuration 
-LOGICAL,SAVE      :: LTHINSHELL  ! Logical for thinshell approximation
-                                 ! .TRUE.  = thinshell approximation
-                                 ! .FALSE. = no thinshell approximation
-LOGICAL,SAVE      :: LCARTESIAN  ! Logical for cartesian geometry :
-                                 !  .TRUE.  = cartesian geometry 
-                                 !  .FALSE. = conformal projection
-LOGICAL,SAVE      :: L2D = .FALSE. ! Logical for 2D model version
-                                 ! .TRUE.  = 2D model version
-                                 ! .FALSE. = 3D model version
-LOGICAL,SAVE      :: L1D         ! Logical for 1D model version
-                                 ! .TRUE.  = 1D model version
-                                 ! .FALSE. = 2D or 3D model version
-LOGICAL,SAVE      :: LFLAT       ! Logical for zero ororography
-                                 ! .TRUE.  = no orography (zs=0.)
-                                 ! .FALSE. = orography  
-INTEGER,SAVE      :: NMODEL      ! Number of nested models
-INTEGER,SAVE      :: NVERB       ! Level of informations on output-listing
-                                 !  0 for minimum of prints
-                                 ! 5 for intermediate level of prints
-                                 ! 10 for maximum of prints 
-CHARACTER (LEN=5),SAVE :: CEXP   !  Experiment name
-CHARACTER (LEN=5),SAVE :: CSEG   ! name of segment
-LOGICAL,SAVE :: LFORCING         ! Logical for forcing sources
-                                 ! .TRUE.  = add forcing sources
-                                 ! .FALSE. = no forcing fields
-!
-CHARACTER (LEN=3),SAVE :: CEQNSYS! EQuatioN SYStem resolved by the MESONH model
-                                 ! 'LHE' Lipps and HEmler anelastic system
-                                 ! 'DUR' approximated form of the DURran version
-                                 ! of the anelastic sytem
-                                 ! 'MAE' classical Modified Anelastic Equations
-                                 ! but with not any approximation in the
-                                 ! momentum equation
-                                 ! 'FCE' fully compressible equations ( not
-                                 ! yet developped )
-LOGICAL,SAVE      :: LPACK       ! Logical to compress 1D or 2D FM files
-!
-!
-INTEGER,DIMENSION(3),SAVE :: NMNHVERSION ! Version of MesoNH
-INTEGER,SAVE :: NMASDEV           ! NMASDEV=XY corresponds to the masdevX_Y
-INTEGER,SAVE :: NBUGFIX           ! NBUGFIX=n corresponds to the BUGn of masdevX_Y
-CHARACTER(LEN=10),SAVE :: CBIBUSER! CBIBUSER is the name of the user binary library
-!
-CHARACTER(LEN=6),SAVE :: CPROGRAM ! CPROGRAM is the program currently running:
-!                                 ! 'PGD   ','ADVPGD','NESPGD','REAL  ','IDEAL '
-!                                 ! 'MESONH','SPAWN ','DIAG  ','SPEC  '
-!
-INTEGER,SAVE      :: NHALO        ! Size of the halo for parallel distribution
-!
-!INTEGER,SAVE      :: JPHEXT = 1     ! Horizontal External points number
-!
-CHARACTER (LEN=10),SAVE :: CSPLIT ! kind of domain splitting for parallel distribution
-                                  !  "BSPLITTING","XSPLITTING","YSPLITTING"
-LOGICAL,SAVE      :: LLG         ! Logical to use lagrangian variables
-LOGICAL,SAVE      :: LINIT_LG    ! to reinitialize lagrangian variables
-CHARACTER (LEN=5),SAVE :: CINIT_LG ! to reinitialize LG variables at every output
-LOGICAL,SAVE      :: LNOMIXLG    ! to use turbulence for lagrangian variables
-!
-LOGICAL,SAVE      :: LNEUTRAL ! True if ref. theta field is uniform
-!
-LOGICAL,SAVE      :: LCPL_AROME  ! true if coupling file are issued from AROME
-LOGICAL,SAVE      :: LCOUPLING   ! true if coupling file (and not intial file)
-                                 ! (with LCOUPLING=T in PREP_REAL_CASE)
-!
-LOGICAL,SAVE      :: LCHECK ! To test reproducibility
-!
-END MODULE MODD_CONF
diff --git a/src/mesonh/micro/modd_les.f90 b/src/mesonh/micro/modd_les.f90
deleted file mode 100644
index db71d6f33..000000000
--- a/src/mesonh/micro/modd_les.f90
+++ /dev/null
@@ -1,458 +0,0 @@
-!MNH_LIC Copyright 1995-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.
-!-----------------------------------------------------------------
-!     ############### 
-      MODULE MODD_LES
-!     ###############
-!
-!!****  *MODD_LES* - declaration of prognostic variables
-!!
-!!    PURPOSE
-!!    -------
-!       The purpose of this declarative module is to specify  the 
-!     resolved fluxes and the spectra computed in LES mode
-!
-!!
-!!**  IMPLICIT ARGUMENTS
-!!    ------------------ 
-!!      None  
-!!
-!!    REFERENCE
-!!    ---------
-!!      Book2 of documentation of Meso-NH (module MODD_LES)
-!!      Technical Specifications Report of the Meso-NH (chapters 2 and 3)
-!!      
-!!
-!!    AUTHOR
-!!    ------
-!!	   J. Cuxart   *INM and Meteo France*
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original    March 10, 1995                
-!!
-!!       (J.Stein)  Sept. 25, 1995  add the model number in LES mode
-!!       J. Cuxart  Oct.   4, 1996  New time series
-!!       V. Masson  Jan.  20, 2000  New LES routines variables & //
-!!       V. Masson  Nov.   6, 2002  LES budgets
-!!       F. Couvreux Oct   1, 2006  LES PDF
-!!       J.Pergaud   Oct    , 2007  MF LES     
-!!       P. Aumond   Oct     ,2009  User multimaskS + 4th order
-!!       C.Lac       Oct     ,2014  Correction on user masks
-!  P. Wautelet 05/2016-04/2018: new data structures and calls for I/O
-!  P. Wautelet 13/09/2019: budget: simplify and modernize date/time management
-!  P. Wautelet 30/03/2021: budgets: LES cartesian subdomain limits are defined in the physical domain
-!-------------------------------------------------------------------------------
-!
-!*       0.   DECLARATIONS
-!             ------------
-!
-USE MODD_PARAMETERS
-!
-IMPLICIT NONE
-!
-!-------------------------------------------------------------------------------
-!
-!* namelist variables
-!
-LOGICAL :: LLES_MEAN      ! flag to activate the mean computations
-LOGICAL :: LLES_RESOLVED  ! flag to activate the resolved var. computations
-LOGICAL :: LLES_SUBGRID   ! flag to activate the subgrid var.  computations
-LOGICAL :: LLES_UPDRAFT   ! flag to activate the computations in updrafts
-LOGICAL :: LLES_DOWNDRAFT ! flag to activate the computations in downdrafts
-LOGICAL :: LLES_SPECTRA   ! flag to activate the spectra computations
-LOGICAL :: LLES_PDF      ! flag to activate the pdf computations      
-!
-INTEGER, DIMENSION(900) :: NLES_LEVELS         ! physical model levels for LES comp.
-REAL,    DIMENSION(900) :: XLES_ALTITUDES      ! alt.  levels for LES comp.
-INTEGER, DIMENSION(900) :: NSPECTRA_LEVELS     ! physical model levels for spectra comp.
-REAL,    DIMENSION(900) :: XSPECTRA_ALTITUDES  ! alt.  levels for spectra comp.
-!
-INTEGER, DIMENSION( 10) :: NLES_TEMP_SERIE_I   ! I, J and Z point
-INTEGER, DIMENSION( 10) :: NLES_TEMP_SERIE_J   ! localizations to
-INTEGER, DIMENSION( 10) :: NLES_TEMP_SERIE_Z   ! record temporal data
-
-CHARACTER(LEN=4) :: CLES_NORM_TYPE ! type of turbulence normalization
-CHARACTER(LEN=3) :: CBL_HEIGHT_DEF ! definition of the boundary layer height
-
-REAL :: XLES_TEMP_SAMPLING    ! temporal sampling between each computation
-REAL :: XLES_TEMP_MEAN_START  ! time (in s) from the beginning of the simulation
-REAL :: XLES_TEMP_MEAN_END    ! for start and end of the temporal averaged comp.
-REAL :: XLES_TEMP_MEAN_STEP   ! time step for each averaging
-
-LOGICAL :: LLES_CART_MASK     ! flag to use a cartesian mask
-INTEGER :: NLES_IINF          ! definition of the cartesians mask in physical domain
-INTEGER :: NLES_ISUP          !     for NLES_CART_MODNBR model
-INTEGER :: NLES_JINF          !               "
-INTEGER :: NLES_JSUP          !               "
-LOGICAL :: LLES_NEB_MASK      ! flag to use a 2D nebulosity mask
-LOGICAL :: LLES_CORE_MASK     ! flag to use a 3D cloud core mask
-LOGICAL :: LLES_MY_MASK       ! flag to use its own mask (must be coded by user)
-INTEGER :: NLES_MASKS_USER    ! number of user masks for LES computations
-LOGICAL :: LLES_CS_MASK       ! flag to use conditional sampling mask
-INTEGER :: NPDF         ! number of pdf intervals
-!
-!-------------------------------------------------------------------------------
-!
-INTEGER, DIMENSION(JPMODELMAX) :: NLESn_IINF ! definition of the cartesians mask in physical domain
-INTEGER, DIMENSION(JPMODELMAX) :: NLESn_ISUP !          for all models
-INTEGER, DIMENSION(JPMODELMAX) :: NLESn_JINF !               "
-INTEGER, DIMENSION(JPMODELMAX) :: NLESn_JSUP !               "
-!
-CHARACTER(LEN=4), DIMENSION(2,JPMODELMAX) :: CLES_LBCX
-! X boundary conditions for 2 points correlations computations for all models
-!
-CHARACTER(LEN=4), DIMENSION(2,JPMODELMAX) :: CLES_LBCY
-! Y boundary conditions for 2 points correlations computations for all models
-!
-!-------------------------------------------------------------------------------
-!
-LOGICAL :: LLES               ! flag to compute the LES diagnostics
-!
-LOGICAL :: LLES_CALL          ! flag to compute the LES diagnostics at current
-!                             ! time step
-!
-!
-LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: LLES_CURRENT_CART_MASK
-! 2D cartesian mask of the current model
-!
-LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: LLES_CURRENT_NEB_MASK
-! 2D nebulosity mask of the current model
-!
-LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: LLES_CURRENT_CORE_MASK
-! 2D surface precipitations mask of the current model
-!
-! 2D owner mask of the current model
-LOGICAL, DIMENSION(:,:,:,:), ALLOCATABLE :: LLES_CURRENT_MY_MASKS
-!
-LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: LLES_CURRENT_CS1_MASK
-LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: LLES_CURRENT_CS2_MASK
-LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: LLES_CURRENT_CS3_MASK
-! 2D conditional sampling mask of the current model
-!
-INTEGER :: NLES_CURRENT_TCOUNT
-! current model LES time counter
-!
-INTEGER :: NLES_CURRENT_TIMES
-! current model NLES_TIMES (number of LES samplings)
-!
-INTEGER :: NLES_CURRENT_IINF, NLES_CURRENT_ISUP, NLES_CURRENT_JINF, NLES_CURRENT_JSUP
-! coordinates (in physical domain) for write_diachro, set to NLESn_IINF(current model), etc...
-!
-REAL :: XLES_CURRENT_DOMEGAX, XLES_CURRENT_DOMEGAY
-! minimum wavelength in spectra analysis
-!
-CHARACTER(LEN=4), DIMENSION(2) :: CLES_CURRENT_LBCX
-! current model X boundary conditions for 2 points correlations computations
-!
-CHARACTER(LEN=4), DIMENSION(2) :: CLES_CURRENT_LBCY
-! current model Y boundary conditions for 2 points correlations computations
-!
-REAL, DIMENSION(:),   ALLOCATABLE :: XLES_CURRENT_Z
-! altitudes for diachro
-!
-REAL :: XLES_CURRENT_ZS
-! orography (used for normalization of altitudes)
-!
-INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: NKLIN_CURRENT_LES
-! levels for vertical interpolation
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: XCOEFLIN_CURRENT_LES
-! coefficients for vertical interpolation
-!
-INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: NKLIN_CURRENT_SPEC
-! levels for vertical interpolation
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: XCOEFLIN_CURRENT_SPEC
-! coefficients for vertical interpolation
-!
-REAL,DIMENSION(2) :: XTIME_LES
-! time spent in subgrid LES computations in this time-step in TURB
-!
-!-------------------------------------------------------------------------------
-!
-!* normalization variables
-!
-REAL, DIMENSION(:), ALLOCATABLE :: XLES_NORM_M
-! normalization coefficient for distances (Meters)
-!
-REAL, DIMENSION(:), ALLOCATABLE :: XLES_NORM_K
-! normalization coefficient for temperatures (Kelvin)
-!
-REAL, DIMENSION(:), ALLOCATABLE :: XLES_NORM_S
-! normalization coefficient for times (Seconds)
-!
-REAL, DIMENSION(:), ALLOCATABLE :: XLES_NORM_RHO
-! normalization coefficient for densities
-!
-REAL, DIMENSION(:), ALLOCATABLE :: XLES_NORM_RV
-! normalization coefficient for mixing ratio
-!
-REAL, DIMENSION(:,:), ALLOCATABLE :: XLES_NORM_SV
-! normalization coefficient for scalar variables
-!
-REAL, DIMENSION(:), ALLOCATABLE :: XLES_NORM_P
-! normalization coefficient for pressure
-!
-!-------------------------------------------------------------------------------
-!
-!* monitoring variables
-!
-INTEGER :: NLES_MASKS         ! number of masks for LES computations
-INTEGER :: NLES_K             ! number of vertical levels for local diagnostics
-INTEGER :: NSPECTRA_K         ! number of vertical levels for spectra
-!
-CHARACTER(LEN=1) :: CLES_LEVEL_TYPE     ! type of vertical levels for local diag.
-CHARACTER(LEN=1) :: CSPECTRA_LEVEL_TYPE ! type of vertical levels for spectra
-!
-!-------------------------------------------------------------------------------
-!
-!* subgrid variables for current model
-!
-!                                                                ______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_W_SBG_WThl !  <w'w'Thl'>
-!                                                                _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_W_SBG_WRt  !  <w'w'Rt'>
-!                                                                _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_W_SBG_Thl2 !  <w'Thl'2>
-!                                                                ____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_W_SBG_Rt2  !  <w'Rt'2>
-!                                                                _______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_W_SBG_ThlRt!  <w'Thl'Rt'>
-!                                                                _____
-REAL, DIMENSION(:,:,:,:),ALLOCATABLE:: X_LES_RES_W_SBG_WSv  !  <w'w'Sv'>
-!                                                                ____
-REAL, DIMENSION(:,:,:,:),ALLOCATABLE:: X_LES_RES_W_SBG_Sv2 !  <w'Sv'2>
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: XLES_SUBGRID_RCSIGS ! rc sigmas
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: XLES_SUBGRID_RCSIGC ! rc sigmac
-!                                                                            _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_U_SBG_UaU   !  <du'/dxa ua'u'>
-!                                                                            _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_V_SBG_UaV   !  <dv'/dxa ua'v'>
-!                                                                            _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_W_SBG_UaW   !  <dw'/dxa ua'w'>
-!                                                                            _______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_W_SBG_UaThl !  <dw'/dxa ua'Thl'>
-!                                                                              _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_Thl_SBG_UaW !  <dThl'/dxa ua'w'>
-!                                                                              ___
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddz_Thl_SBG_W2   !  <dThl'/dz w'2>
-!                                                                            ______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_W_SBG_UaRt  !  <dw'/dxa ua'Rt'>
-!                                                                             _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_Rt_SBG_UaW  !  <dRt'/dxa ua'w'>
-!                                                                             ___
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddz_Rt_SBG_W2    !  <dRt'/dz w'2>
-!                                                                              ______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_Thl_SBG_UaRt!  <dThl'/dxa ua'Rt'>
-!                                                                             _______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_Rt_SBG_UaThl!  <dRt'/dxa ua'Thl'>
-!                                                                              _______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_Thl_SBG_UaThl! <dThl'/dxa ua'Thl'>
-!                                                                             ______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_Rt_SBG_UaRt !  <dRt'/dxa ua'Rt'>
-!                                                                              ______
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_W_SBG_UaSv  ! <dw'/dxa ua'Sv'>
-!                                                                               _____
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_Sv_SBG_UaW  ! <dSv'/dxa ua'w'>
-!                                                                              ___
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: X_LES_RES_ddz_Sv_SBG_W2    ! <dSv'/dz w'2>
-!                                                                               ______
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: X_LES_RES_ddxa_Sv_SBG_UaSv ! <dSv'/dxa ua'Sv'>
-!
-!                                                            ___
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_U2    ! <u'2>
-!                                                            ___
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_V2    ! <v'2>
-!                                                            ___
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_W2    ! <w'2>
-!                                                            _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_Thl2  ! <Thl'2>
-!                                                            ____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_Rt2   ! <Rt'2>
-!                                                            ____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_Rc2   ! <Rc'2>
-!                                                            ____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_Ri2   ! <Ri'2>
-!                                                            _______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_ThlRt ! <Thl'Rt'>
-!                                                             ____
-REAL, DIMENSION(:,:,:,:),ALLOCATABLE:: X_LES_SUBGRID_Sv2   ! <Sv'2>
-!                                                            ____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_UV    ! <u'v'>
-!                                                            ____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WU    ! <w'u'>
-!                                                            ____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WV    ! <w'v'>
-!                                                            ______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_UThl  ! <u'Thl'>
-!                                                            ______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_VThl  ! <v'Thl'>
-!                                                            ______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WThl  ! <w'Thl'>
-!                                                            _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_URt   ! <u'Rt'>
-!                                                            _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_VRt   ! <v'Rt'>
-!                                                            _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WRt   ! <w'Rt'>
-!                                                            _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_URc   ! <u'Rc'>
-!                                                            _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_VRc   ! <v'Rc'>
-!                                                            _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WRc   ! <w'Rc'>
-!                                                            _____
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: X_LES_SUBGRID_USv ! <u'Sv'>
-!                                                            _____
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: X_LES_SUBGRID_VSv ! <v'Sv'>
-!                                                            _____
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WSv ! <w'Sv'>
-!                                                            ___
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_UTke  ! <u'e>
-!                                                            ___
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_VTke  ! <v'e>
-!                                                            ___
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WTke  ! <w'e>
-!                                                                   ___
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_ddz_WTke  !  <dw'e/dz>
-!                                                             ______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WThv   ! <w'Thv'>
-!                                                             ________
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_ThlThv ! <Thl'Thv'>
-!                                                             _______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_RtThv  ! <Rt'Thv'>
-!                                                             _______
-REAL, DIMENSION(:,:,:,:),ALLOCATABLE:: X_LES_SUBGRID_SvThv  ! <Sv'Thv'>
-!                                                             ______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_W2Thl  ! <w'2Thl>
-!                                                              _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_W2Rt   ! <w'2Rt>
-!                                                              _____
-REAL, DIMENSION(:,:,:,:),ALLOCATABLE:: X_LES_SUBGRID_W2Sv   ! <w'2Sv>
-!                                                             _______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WThlRt ! <w'ThlRt>
-!                                                             ______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WThl2  ! <w'Thl2>
-!                                                             _____
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WRt2   ! <w'Rt2>
-!                                                              _____
-REAL, DIMENSION(:,:,:,:),ALLOCATABLE:: X_LES_SUBGRID_WSv2   ! <w'Sv2>
-!                                                               _______
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_DISS_Tke ! <epsilon>
-!                                                                 ____________
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_DISS_Thl2 ! <epsilon_Thl2>
-!                                                                 ___________
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_DISS_Rt2  ! <epsilon_Rt2>
-!                                                                ______________
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_DISS_ThlRt! <epsilon_ThlRt>
-!                                                                ___________
-REAL, DIMENSION(:,:,:,:),ALLOCATABLE:: X_LES_SUBGRID_DISS_Sv2  ! <epsilon_Sv2>
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WP     ! <w'p'>
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_ThlPz  ! <Thl'dp'/dz>
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_RtPz   ! <Rt'dp'/dz>
-!
-REAL, DIMENSION(:,:,:,:),ALLOCATABLE:: X_LES_SUBGRID_SvPz   ! <Sv'dp'/dz>
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_PHI3   ! phi3
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_PSI3   ! psi3
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_LMix   ! mixing length
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_LDiss  ! dissipative length
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_Km     ! eddy diffusivity for momentum
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_Kh     ! eddy diffusivity for heat
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_THLUP_MF  ! Thl of the Updraft
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_RTUP_MF   ! Rt of the Updraft
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_RVUP_MF   ! Rv of the Updraft
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_RCUP_MF   ! Rc of the Updraft
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_RIUP_MF   ! Ri of the Updraft
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WUP_MF    ! Thl of the Updraft
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_MASSFLUX  ! Mass Flux
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_DETR      ! Detrainment
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_ENTR      ! Entrainment
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_FRACUP    ! Updraft Fraction 
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_THVUP_MF  ! Thv of the Updraft
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WTHLMF ! Flux of thl   
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WRTMF  ! Flux of rt
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WTHVMF ! Flux of thv 
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WUMF   ! Flux of u
-!
-REAL, DIMENSION(:,:,:), ALLOCATABLE :: X_LES_SUBGRID_WVMF   ! Flux of v
-!
-!* surface variables
-!
-REAL, DIMENSION(:), ALLOCATABLE :: X_LES_USTAR     ! local u* temporal series
-REAL, DIMENSION(:), ALLOCATABLE :: X_LES_UW0       ! uw temporal series
-REAL, DIMENSION(:), ALLOCATABLE :: X_LES_VW0       ! vw temporal series
-REAL, DIMENSION(:), ALLOCATABLE :: X_LES_Q0        ! Qo temporal series
-REAL, DIMENSION(:), ALLOCATABLE :: X_LES_E0        ! Eo temporal series
-REAL, DIMENSION(:,:), ALLOCATABLE :: X_LES_SV0     ! scalar surface fluxes
-!
-!* pdf variables
-REAL                              :: XRV_PDF_MIN       ! min of rv pdf
-REAL                              :: XRV_PDF_MAX       ! max of rv pdf
-REAL                              :: XTH_PDF_MIN       ! min of theta pdf
-REAL                              :: XTH_PDF_MAX       ! max of theta pdf
-REAL                              :: XW_PDF_MIN       ! min of w pdf
-REAL                              :: XW_PDF_MAX       ! max of w pdf
-REAL                              :: XTHV_PDF_MIN       ! min of thetav pdf
-REAL                              :: XTHV_PDF_MAX       ! max of thetav pdf
-REAL                              :: XRC_PDF_MIN       ! min of rc pdf
-REAL                              :: XRC_PDF_MAX       ! max of rc pdf
-REAL                              :: XRR_PDF_MIN       ! min of rr pdf
-REAL                              :: XRR_PDF_MAX       ! max of rr pdf
-REAL                              :: XRI_PDF_MIN       ! min of ri pdf
-REAL                              :: XRI_PDF_MAX       ! max of ri pdf
-REAL                              :: XRS_PDF_MIN       ! min of rs pdf
-REAL                              :: XRS_PDF_MAX       ! max of rs pdf
-REAL                              :: XRG_PDF_MIN       ! min of rg pdf
-REAL                              :: XRG_PDF_MAX       ! max of rg pdf
-REAL                              :: XRT_PDF_MIN       ! min of rt pdf
-REAL                              :: XRT_PDF_MAX       ! max of rt pdf
-REAL                              :: XTHL_PDF_MIN       ! min of thetal pdf
-REAL                              :: XTHL_PDF_MAX       ! max of thetal pdf
-!-------------------------------------------------------------------------------
-!* pdf distribution
-!
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_RV   ! rv  pdf
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_TH   ! theta pdf
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_W    ! w  pdf
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_THV  ! thetav pdf
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_RC   ! rc  pdf
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_RR   ! rr pdf
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_RI   ! ri  pdf
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_RS   ! rs pdf
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_RG   ! rg pdf
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_RT   ! rt  pdf
-REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: XLES_PDF_THL  ! thetal pdf
-!
-!
-!-------------------------------------------------------------------------------
-!
-END MODULE MODD_LES
diff --git a/src/mesonh/micro/modd_nsv.f90 b/src/mesonh/micro/modd_nsv.f90
deleted file mode 100644
index 7a842a5c1..000000000
--- a/src/mesonh/micro/modd_nsv.f90
+++ /dev/null
@@ -1,253 +0,0 @@
-!MNH_LIC Copyright 2001-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.
-!-------------------------------------------------------------------------------
-!        ###############
-         MODULE MODD_NSV
-!        ###############
-!
-!!****  *MODD_NSV* - declaration of scalar variables numbers
-!!
-!!    PURPOSE
-!!    -------
-!!       Arrays to store the per-model NSV_* values number (suffix _A denote an array)
-!!
-!!    AUTHOR
-!!    ------
-!!      D. Gazen   L.A.
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original  01/02/01
-!!       J.-P. Pinty   29/11/02 add C3R5, ELEC
-!!       V. Masson     01/2004  add scalar names
-!!       M. Leriche    12/04/07 add aqueous chemistry
-!!       M. Leriche    08/07/10 add ice phase chemistry
-!!       C.Lac         07/11    add conditional sampling
-!!       Pialat/Tulet  15/02/12 add ForeFire
-!!      Modification    01/2016  (JP Pinty) Add LIMA
-!!       V. Vionnet     07/17   add blowing snow
-!  P. Wautelet 10/03/2021: add CSVNAMES and CSVNAMES_A to store the name of all the scalar variables
-!  B. Vie         06/2021: add prognostic supersaturation for LIMA
-!
-!-------------------------------------------------------------------------------
-!
-!*       0.   DECLARATIONS
-!             ------------
-!
-USE MODD_PARAMETERS, ONLY : JPMODELMAX, &  ! Maximum allowed number of nested models
-                            JPSVMAX,    &  ! Maximum number of scalar variables
-                            JPSVNAMELGTMAX ! Maximum length of a scalar variable name
-!
-IMPLICIT NONE
-SAVE
-!
-REAL,DIMENSION(JPSVMAX) :: XSVMIN ! minimum value for SV variables
-!
-LOGICAL :: LINI_NSV = .FALSE. ! becomes True when routine INI_NSV is called
-!
-CHARACTER(LEN=JPSVNAMELGTMAX), DIMENSION(:,:), ALLOCATABLE, TARGET :: CSVNAMES_A !Names of all the scalar variables
-
-INTEGER,DIMENSION(JPMODELMAX)::NSV_A = 0 ! total number of scalar variables
-                                         ! NSV_A = NSV_USER_A+NSV_C2R2_A+NSV_CHEM_A+..
-INTEGER,DIMENSION(JPMODELMAX)::NSV_USER_A = 0  ! number of user scalar variables with 
-                                               ! indices in the range : 1...NSV_USER_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_C2R2_A = 0    ! number of liq scalar in C2R2
-                                                 !                  and in C3R5
-INTEGER,DIMENSION(JPMODELMAX)::NSV_C2R2BEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_C2R2END_A = 0 ! NSV_C2R2BEG_A...NSV_C2R2END_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_C1R3_A = 0    ! number of ice scalar in C3R5
-INTEGER,DIMENSION(JPMODELMAX)::NSV_C1R3BEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_C1R3END_A = 0 ! NSV_C1R3BEG_A...NSV_C1R3END_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_ELEC_A = 0    ! number of scalar in ELEC
-INTEGER,DIMENSION(JPMODELMAX)::NSV_ELECBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_ELECEND_A = 0 ! NSV_ELECBEG_A...NSV_ELECEND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHEM_A = 0    ! number of chemical scalar
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHEMBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHEMEND_A = 0 ! NSV_CHEMBEG_A...NSV_CHEMEND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHGS_A = 0    ! number of gaseous chemcial species
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHGSBEG_A = 0 ! with indices
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHGSEND_A = 0 ! NSV_CHGSBEG_
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHAC_A = 0    ! number of aqueous chemical species
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHACBEG_A = 0 ! with indices
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHACEND_A = 0 ! NSV_CHACBEG
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHIC_A = 0    ! number of ice phase chemical species
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHICBEG_A = 0 ! with indices
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CHICEND_A = 0 ! NSV_CHICBEG
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LG_A = 0    ! number of LaGrangian 
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LGBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LGEND_A = 0 ! NSV_LGBEG_A...NSV_LGEND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LNOX_A = 0    ! number of lightning NOx
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LNOXBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LNOXEND_A = 0 ! NSV_LNOXBEG_A...NSV_LNOXEND_A                !                                 
-INTEGER,DIMENSION(JPMODELMAX)::NSV_DST_A = 0    ! number of dust scalar
-INTEGER,DIMENSION(JPMODELMAX)::NSV_DSTBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_DSTEND_A = 0 ! NSV_DSTBEG_A...NSV_DSTEND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_SLT_A = 0    ! number of sea salt scalar
-INTEGER,DIMENSION(JPMODELMAX)::NSV_SLTBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_SLTEND_A = 0 ! NSV_SLTBEG_A...NSV_SLTEND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_AER_A = 0    ! number of aerosol scalar
-INTEGER,DIMENSION(JPMODELMAX)::NSV_AERBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_AEREND_A = 0 ! NSV_AERBEG_A...NSV_AEREND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_DSTDEP_A    = 0    ! number of aerosol scalar
-INTEGER,DIMENSION(JPMODELMAX)::NSV_DSTDEPBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_DSTDEPEND_A = 0 ! NSV_AERBEG_A...NSV_AEREND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_AERDEP_A    = 0    ! number of aerosol scalar
-INTEGER,DIMENSION(JPMODELMAX)::NSV_AERDEPBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_AERDEPEND_A = 0 ! NSV_AERBEG_A...NSV_AEREND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_SLTDEP_A    = 0    ! number of aerosol scalar
-INTEGER,DIMENSION(JPMODELMAX)::NSV_SLTDEPBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_SLTDEPEND_A = 0 ! NSV_SLTBEG_A...NSV_SLTEND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_PP_A = 0    ! number of passive pol.
-INTEGER,DIMENSION(JPMODELMAX)::NSV_PPBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_PPEND_A = 0 ! NSV_PPBEG_A...NSV_PPEND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CS_A = 0    ! number of condit.samplings
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CSBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_CSEND_A = 0 ! NSV_CSBEG_A...NSV_CSEND_A
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_A = 0     ! number of scalar in LIMA
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_BEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_END_A = 0 ! NSV_LIMA_BEG_A...NSV_LIMA_END_A
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_NC_A = 0       ! First Nc variable
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_NR_A = 0       ! First Nr variable
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_CCN_FREE_A = 0 ! First Free CCN conc.
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_CCN_ACTI_A = 0 ! First Acti. CNN conc.
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_SCAVMASS_A = 0 ! Scavenged mass variable
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_NI_A = 0       ! First Ni var.
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_IFN_FREE_A = 0 ! First Free IFN conc.
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_IFN_NUCL_A = 0 ! First Nucl. IFN conc.
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_IMM_NUCL_A = 0 ! First Nucl. IMM conc.
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_HOM_HAZE_A = 0 ! Hom. freezing of CCN
-INTEGER,DIMENSION(JPMODELMAX)::NSV_LIMA_SPRO_A = 0     ! Supersaturation
-!
-#ifdef MNH_FOREFIRE
-INTEGER,DIMENSION(JPMODELMAX)::NSV_FF_A = 0    ! number of ForeFire scalar variables
-INTEGER,DIMENSION(JPMODELMAX)::NSV_FFBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_FFEND_A = 0 ! NSV_FFBEG_A...NSV_FFEND_A
-#endif
-!
-INTEGER,DIMENSION(JPMODELMAX)::NSV_SNW_A = 0    ! number of blowing snow scalar
-INTEGER,DIMENSION(JPMODELMAX)::NSV_SNWBEG_A = 0 ! with indices in the range :
-INTEGER,DIMENSION(JPMODELMAX)::NSV_SNWEND_A = 0 ! NSV_SNWBEG_A...NSV_SNWEND_A
-!
-!###############################################################################
-!
-! variables updated for the current model
-!
-CHARACTER(LEN=JPSVNAMELGTMAX), DIMENSION(:), POINTER :: CSVNAMES !Names of all the scalar variables
-CHARACTER(LEN=6), DIMENSION(:), ALLOCATABLE :: CSV ! name of the scalar variables
-INTEGER :: NSV         = 0 ! total number of user scalar variables
-!
-INTEGER :: NSV_USER    = 0 ! number of user scalar variables with indices
-                           ! in the range : 1...NSV_USER
-INTEGER :: NSV_C2R2    = 0 ! number of liq scalar used in C2R2 and in C3R5
-INTEGER :: NSV_C2R2BEG = 0 ! with indices in the range :
-INTEGER :: NSV_C2R2END = 0 ! NSV_C2R2BEG...NSV_C2R2END
-!
-INTEGER :: NSV_C1R3    = 0 ! number of ice scalar used in C3R5
-INTEGER :: NSV_C1R3BEG = 0 ! with indices in the range :
-INTEGER :: NSV_C1R3END = 0 ! NSV_C1R3BEG...NSV_C1R3END
-!
-INTEGER :: NSV_ELEC    = 0 ! number of scalar variables used in ELEC
-INTEGER :: NSV_ELECBEG = 0 ! with indices in the range :
-INTEGER :: NSV_ELECEND = 0 ! NSV_ELECBEG...NSV_ELECEND
-!
-INTEGER :: NSV_CHEM    = 0 ! number of chemical scalar variables
-INTEGER :: NSV_CHEMBEG = 0 ! with indices in the range :
-INTEGER :: NSV_CHEMEND = 0 ! NSV_CHEMBEG...NSV_CHEMEND
-!
-INTEGER :: NSV_CHGS    = 0 ! number of gas-phase chemicals 
-INTEGER :: NSV_CHGSBEG = 0 ! with indices in the range :
-INTEGER :: NSV_CHGSEND = 0 ! NSV_CHGSBEG...NSV_CHGSEND         
-!
-INTEGER :: NSV_CHAC    = 0 ! number of aqueous-phase chemicals
-INTEGER :: NSV_CHACBEG = 0 ! with indices in the range :
-INTEGER :: NSV_CHACEND = 0 ! NSV_CHACBEG...NSV_CHACEND
-!
-INTEGER :: NSV_CHIC    = 0 ! number of ice-phase chemicals
-INTEGER :: NSV_CHICBEG = 0 ! with indices in the range :
-INTEGER :: NSV_CHICEND = 0 ! NSV_CHICBEG...NSV_CHICEND
-!
-INTEGER :: NSV_LG    = 0 ! number of lagrangian
-INTEGER :: NSV_LGBEG = 0 ! with indices in the range :
-INTEGER :: NSV_LGEND = 0 ! NSV_LGBEG...NSV_LGEND
-!
-INTEGER :: NSV_LNOX    = 0 ! number of lightning NOx variables
-INTEGER :: NSV_LNOXBEG = 0 ! with indices in the range :
-INTEGER :: NSV_LNOXEND = 0 ! NSV_LNOXBEG...NSV_LNOXEND
-!
-INTEGER :: NSV_DST     = 0 ! number of dust scalar variables
-INTEGER :: NSV_DSTBEG  = 0 ! with indices in the range :
-INTEGER :: NSV_DSTEND  = 0 ! NSV_DSTBEG...NSV_DSTEND
-
-INTEGER :: NSV_SLT     = 0 ! number of sea salt scalar variables
-INTEGER :: NSV_SLTBEG  = 0 ! with indices in the range :
-INTEGER :: NSV_SLTEND  = 0 ! NSV_SLTBEG...NSV_SLTEND
-
-INTEGER :: NSV_AER     = 0 ! number of aerosol scalar variables
-INTEGER :: NSV_AERBEG  = 0 ! with indices in the range :
-INTEGER :: NSV_AEREND  = 0 ! NSV_AERBEG...NSV_AEREND
-
-INTEGER :: NSV_DSTDEP  = 0 ! number of aerosol scalar variables
-INTEGER :: NSV_DSTDEPBEG  = 0 ! with indices in the range :
-INTEGER :: NSV_DSTDEPEND  = 0 ! NSV_AERBEG...NSV_AEREND
-!
-INTEGER :: NSV_AERDEP  = 0 ! number of aerosol scalar variables
-INTEGER :: NSV_AERDEPBEG  = 0 ! with indices in the range :
-INTEGER :: NSV_AERDEPEND  = 0 ! NSV_AERBEG...NSV_AEREND
-
-INTEGER :: NSV_SLTDEP  = 0 ! number of aerosol scalar variables
-INTEGER :: NSV_SLTDEPBEG  = 0 ! with indices in the range :
-INTEGER :: NSV_SLTDEPEND  = 0 ! NSV_AERBEG...NSV_AEREND
-!
-INTEGER :: NSV_PP    = 0 ! number of passive pollutants       
-INTEGER :: NSV_PPBEG = 0 ! with indices in the range :
-INTEGER :: NSV_PPEND = 0 ! NSV_PPBEG...NSV_PPEND
-!
-INTEGER :: NSV_CS    = 0 ! number of condit.samplings         
-INTEGER :: NSV_CSBEG = 0 ! with indices in the range :
-INTEGER :: NSV_CSEND = 0 ! NSV_CSBEG...NSV_CSEND
-!
-INTEGER :: NSV_LIMA     ! number of scalar in LIMA
-INTEGER :: NSV_LIMA_BEG ! with indices in the range :
-INTEGER :: NSV_LIMA_END ! NSV_LIMA_BEG_A...NSV_LIMA_END_A
-INTEGER :: NSV_LIMA_NC       !
-INTEGER :: NSV_LIMA_NR       !
-INTEGER :: NSV_LIMA_CCN_FREE !
-INTEGER :: NSV_LIMA_CCN_ACTI !
-INTEGER :: NSV_LIMA_SCAVMASS !
-INTEGER :: NSV_LIMA_NI       !
-INTEGER :: NSV_LIMA_IFN_FREE !
-INTEGER :: NSV_LIMA_IFN_NUCL !
-INTEGER :: NSV_LIMA_IMM_NUCL !
-INTEGER :: NSV_LIMA_HOM_HAZE !
-INTEGER :: NSV_LIMA_SPRO     !
-!
-#ifdef MNH_FOREFIRE
-INTEGER :: NSV_FF    = 0 ! number of ForeFire scalar variables
-INTEGER :: NSV_FFBEG = 0 ! with indices in the range :
-INTEGER :: NSV_FFEND = 0 ! NSV_FFBEG...NSV_FFEND
-#endif
-!
-INTEGER :: NSV_SNW     = 0 ! number of blowing snow scalar variables
-INTEGER :: NSV_SNWBEG  = 0 ! with indices in the range :
-INTEGER :: NSV_SNWEND  = 0 ! NSV_SNWBEG...NSV_SNWEND
-
-END MODULE MODD_NSV
-- 
GitLab