From e0ae8a6b026d2d4ade0541124daffef512681a0e Mon Sep 17 00:00:00 2001
From: Quentin Rodier <quentin.rodier@meteo.fr>
Date: Thu, 5 Jan 2023 13:11:01 +0100
Subject: [PATCH] Quentin 05/01/2023: prepare integration of PHYEX (move mesonh
 existing files to new PHYEX folder)

---
 src/MNH/compute_entr_detr.f90                 | 489 ------------------
 src/MNH/compute_frac_ice.f90                  | 286 ----------
 src/MNH/mf_turb_greyzone.f90                  | 340 ------------
 src/MNH/th_r_from_thl_rt_1d.f90               | 203 --------
 src/MNH/th_r_from_thl_rt_2d.f90               | 128 -----
 src/MNH/th_r_from_thl_rt_3d.f90               | 126 -----
 src/{MNH => PHYEX/aux}/gamma.f90              |   0
 src/{MNH => PHYEX/aux}/gamma_inc.f90          |   0
 src/{MNH => PHYEX/aux}/general_gamma.f90      |   0
 src/{MNH => PHYEX/aux}/get_halo.f90           |   0
 src/{MNH => PHYEX/aux}/gradient_m.f90         |   0
 src/{MNH => PHYEX/aux}/gradient_u.f90         |   0
 src/{MNH => PHYEX/aux}/gradient_v.f90         |   0
 src/{MNH => PHYEX/aux}/gradient_w.f90         |   0
 src/{MNH => PHYEX/aux}/ini_cst.f90            |   0
 src/{MNH => PHYEX/aux}/modd_budget.f90        |   0
 src/{MNH => PHYEX/aux}/modd_conf.f90          |   0
 src/{MNH => PHYEX/aux}/modd_cst.f90           |   0
 src/{MNH => PHYEX/aux}/modd_les.f90           |   0
 src/{MNH => PHYEX/aux}/modd_lunit.f90         |   0
 .../budget.f90 => PHYEX/aux/mode_budget.f90}  |   0
 .../src => PHYEX/aux}/mode_io_field_write.f90 |   0
 src/{MNH => PHYEX/aux}/mode_thermo.f90        |   0
 .../src => PHYEX/aux}/mode_tools_ll.f90       |   0
 src/{MNH => PHYEX/aux}/shuman.f90             |   0
 .../aux}/sources_neg_correct.f90              |   0
 src/{MNH => PHYEX/aux}/tools.f90              |   0
 .../conv}/convect_chem_transport.f90          |   0
 src/{MNH => PHYEX/conv}/convect_closure.f90   |   0
 .../conv}/convect_closure_adjust.f90          |   0
 .../conv}/convect_closure_adjust_shal.f90     |   0
 .../conv}/convect_closure_shal.f90            |   0
 .../conv}/convect_closure_thrvlcl.f90         |   0
 src/{MNH => PHYEX/conv}/convect_condens.f90   |   0
 src/{MNH => PHYEX/conv}/convect_downdraft.f90 |   0
 .../conv}/convect_mixing_funct.f90            |   0
 .../conv}/convect_precip_adjust.f90           |   0
 .../conv}/convect_satmixratio.f90             |   0
 .../conv}/convect_trigger_funct.f90           |   0
 .../conv}/convect_trigger_shal.f90            |   0
 .../conv}/convect_tstep_pref.f90              |   0
 src/{MNH => PHYEX/conv}/convect_updraft.f90   |   0
 .../conv}/convect_updraft_shal.f90            |   0
 src/{MNH => PHYEX/conv}/deep_convection.f90   |   0
 src/{MNH => PHYEX/conv}/ini_convpar.f90       |   0
 src/{MNH => PHYEX/conv}/ini_convpar_e1.f90    |   0
 src/{MNH => PHYEX/conv}/ini_convpar_shal.f90  |   0
 src/{MNH => PHYEX/conv}/modd_convpar.f90      |   0
 src/{MNH => PHYEX/conv}/modd_convpar_shal.f90 |   0
 src/{MNH => PHYEX/conv}/modd_convparext.f90   |   0
 .../conv}/shallow_convection.f90              |   0
 src/{MNH => PHYEX/micro}/c2r2_adjust.f90      |   0
 src/{MNH => PHYEX/micro}/condensation.f90     |   0
 src/{MNH => PHYEX/micro}/hypgeo.f90           |   0
 src/{MNH => PHYEX/micro}/hypser.f90           |   0
 src/{MNH => PHYEX/micro}/ice_adjust.f90       |   0
 src/{MNH => PHYEX/micro}/ice_adjust_elec.f90  |   0
 src/{MNH => PHYEX/micro}/ini_ice_c1r3.f90     |   0
 src/{MNH => PHYEX/micro}/ini_lima.f90         |   0
 .../micro}/ini_lima_cold_mixed.f90            |   0
 src/{MNH => PHYEX/micro}/ini_lima_warm.f90    |   0
 src/{MNH => PHYEX/micro}/ini_neb.f90          |   0
 src/{MNH => PHYEX/micro}/ini_param_elec.f90   |   0
 src/{MNH => PHYEX/micro}/ini_rain_c2r2.f90    |   0
 src/{MNH => PHYEX/micro}/ini_rain_ice.f90     |   0
 .../micro}/ini_rain_ice_elec.f90              |   0
 .../micro}/init_aerosol_properties.f90        |   0
 src/{MNH => PHYEX/micro}/lima.f90             |   0
 src/{MNH => PHYEX/micro}/lima_adjust.f90      |   0
 .../micro}/lima_adjust_split.f90              |   0
 src/{MNH => PHYEX/micro}/lima_bergeron.f90    |   0
 .../micro}/lima_ccn_activation.f90            |   0
 .../micro}/lima_ccn_hom_freezing.f90          |   0
 src/{MNH => PHYEX/micro}/lima_cold.f90        |   0
 .../micro}/lima_cold_hom_nucl.f90             |   0
 .../micro}/lima_cold_sedimentation.f90        |   0
 .../micro}/lima_cold_slow_processes.f90       |   0
 .../micro}/lima_collisional_ice_breakup.f90   |   0
 .../micro}/lima_compute_cloud_fractions.f90   |   0
 .../micro}/lima_conversion_melting_snow.f90   |   0
 .../micro}/lima_droplets_accretion.f90        |   0
 .../micro}/lima_droplets_autoconversion.f90   |   0
 .../micro}/lima_droplets_hom_freezing.f90     |   0
 .../micro}/lima_droplets_riming_snow.f90      |   0
 .../micro}/lima_droplets_self_collection.f90  |   0
 .../micro}/lima_drops_break_up.f90            |   0
 .../micro}/lima_drops_hom_freezing.f90        |   0
 .../micro}/lima_drops_self_collection.f90     |   0
 .../micro}/lima_drops_to_droplets_conv.f90    |   0
 src/{MNH => PHYEX/micro}/lima_functions.f90   |   0
 src/{MNH => PHYEX/micro}/lima_graupel.f90     |   0
 .../micro}/lima_graupel_deposition.f90        |   0
 src/{MNH => PHYEX/micro}/lima_hail.f90        |   0
 .../micro}/lima_hail_deposition.f90           |   0
 .../micro}/lima_ice_aggregation_snow.f90      |   0
 .../micro}/lima_ice_deposition.f90            |   0
 src/{MNH => PHYEX/micro}/lima_ice_melting.f90 |   0
 .../lima_init_ccn_activation_spectrum.f90     |   0
 src/{MNH => PHYEX/micro}/lima_inst_procs.f90  |   0
 src/{MNH => PHYEX/micro}/lima_meyers.f90      |   0
 .../micro}/lima_meyers_nucleation.f90         |   0
 src/{MNH => PHYEX/micro}/lima_mixed.f90       |   0
 .../micro}/lima_mixed_fast_processes.f90      |   0
 .../micro}/lima_mixed_slow_processes.f90      |   0
 .../micro}/lima_mixrat_to_nconc.f90           |   0
 src/{MNH => PHYEX/micro}/lima_notadjust.f90   |   0
 .../micro}/lima_nucleation_procs.f90          |   0
 src/{MNH => PHYEX/micro}/lima_phillips.f90    |   0
 .../micro}/lima_phillips_ifn_nucleation.f90   |   0
 .../micro}/lima_phillips_integ.f90            |   0
 .../micro}/lima_phillips_ref_spectrum.f90     |   0
 .../micro}/lima_precip_scavenging.f90         |   0
 .../micro}/lima_rain_accr_snow.f90            |   0
 .../micro}/lima_rain_evaporation.f90          |   0
 .../micro}/lima_rain_freezing.f90             |   0
 .../lima_raindrop_shattering_freezing.f90     |   0
 .../micro}/lima_read_xker_gweth.f90           |   0
 .../micro}/lima_read_xker_raccs.f90           |   0
 .../micro}/lima_read_xker_rdryg.f90           |   0
 .../micro}/lima_read_xker_sdryg.f90           |   0
 .../micro}/lima_read_xker_sweth.f90           |   0
 .../micro}/lima_sedimentation.f90             |   0
 .../micro}/lima_snow_deposition.f90           |   0
 .../micro}/lima_snow_self_collection.f90      |   0
 src/{MNH => PHYEX/micro}/lima_tendencies.f90  |   0
 src/{MNH => PHYEX/micro}/lima_warm.f90        |   0
 src/{MNH => PHYEX/micro}/lima_warm_coal.f90   |   0
 src/{MNH => PHYEX/micro}/lima_warm_evap.f90   |   0
 src/{MNH => PHYEX/micro}/lima_warm_nucl.f90   |   0
 .../micro}/lima_warm_sedimentation.f90        |   0
 src/{MNH => PHYEX/micro}/modd_elec_descr.f90  |   0
 .../micro}/modd_lima_precip_scavengingn.f90   |   0
 src/{MNH => PHYEX/micro}/modd_neb.f90         |   0
 src/{MNH => PHYEX/micro}/modd_param_c1r3.f90  |   0
 src/{MNH => PHYEX/micro}/modd_param_c2r2.f90  |   0
 src/{MNH => PHYEX/micro}/modd_param_ice.f90   |   0
 src/{MNH => PHYEX/micro}/modd_param_lima.f90  |   0
 .../micro}/modd_param_lima_cold.f90           |   0
 .../micro}/modd_param_lima_mixed.f90          |   0
 .../micro}/modd_param_lima_warm.f90           |   0
 .../micro}/modd_rain_c2r2_descr.f90           |   0
 .../micro}/modd_rain_c2r2_khko_param.f90      |   0
 .../micro}/modd_rain_ice_descr.f90            |   0
 .../micro}/modd_rain_ice_param.f90            |   0
 .../micro/mode_ice4_compute_pdf.f90}          |   0
 .../micro/mode_ice4_fast_rg.f90}              |   0
 .../micro/mode_ice4_fast_rh.f90}              |   0
 .../micro/mode_ice4_fast_ri.f90}              |   0
 .../micro/mode_ice4_fast_rs.f90}              |   0
 .../micro/mode_ice4_nucleation.f90}           |   0
 .../micro/mode_ice4_rainfr_vert.f90}          |   0
 .../micro/mode_ice4_rimltc.f90}               |   0
 .../micro/mode_ice4_rrhong.f90}               |   0
 .../micro/mode_ice4_rsrimcg_old.f90}          |   0
 .../micro/mode_ice4_sedimentation_split.f90}  |   0
 ...ode_ice4_sedimentation_split_momentum.f90} |   0
 .../micro/mode_ice4_sedimentation_stat.f90}   |   0
 .../micro/mode_ice4_slow.f90}                 |   0
 .../micro/mode_ice4_tendencies.f90}           |   0
 .../micro/mode_ice4_warm.f90}                 |   0
 .../micro/mode_read_xker_gweth.f90}           |   0
 .../micro/mode_read_xker_raccs.f90}           |   0
 .../micro/mode_read_xker_rdryg.f90}           |   0
 .../micro/mode_read_xker_rweth.f90}           |   0
 .../micro/mode_read_xker_sdryg.f90}           |   0
 .../micro/mode_read_xker_sweth.f90}           |   0
 .../micro/mode_rrcolss.f90}                   |   0
 .../micro/mode_rscolrg.f90}                   |   0
 .../micro/mode_rzcolx.f90}                    |   0
 src/{MNH => PHYEX/micro}/modn_param_lima.f90  |   0
 src/{MNH => PHYEX/micro}/prognos_lima.f90     |   0
 src/{MNH => PHYEX/micro}/radar_rain_ice.f90   |   0
 src/{MNH => PHYEX/micro}/radtr_satel.f90      |   0
 src/{MNH => PHYEX/micro}/rain_c2r2_khko.f90   |   0
 .../micro/rain_ice.f90}                       |   0
 src/{MNH => PHYEX/micro}/rain_ice_elec.f90    |   0
 src/{MNH => PHYEX/micro}/rain_ice_fast_rg.f90 |   0
 src/{MNH => PHYEX/micro}/rain_ice_fast_rh.f90 |   0
 src/{MNH => PHYEX/micro}/rain_ice_fast_ri.f90 |   0
 src/{MNH => PHYEX/micro}/rain_ice_fast_rs.f90 |   0
 .../micro}/rain_ice_nucleation.f90            |   0
 .../micro/rain_ice_old.f90}                   |   0
 .../micro}/rain_ice_sedimentation_split.f90   |   0
 .../micro}/rain_ice_sedimentation_stat.f90    |   0
 src/{MNH => PHYEX/micro}/rain_ice_slow.f90    |   0
 src/{MNH => PHYEX/micro}/rain_ice_warm.f90    |   0
 src/{MNH => PHYEX/micro}/set_conc_lima.f90    |   0
 src/{MNH => PHYEX/turb}/ini_cturb.f90         |   0
 src/{MNH => PHYEX/turb}/les_mean_subgrid.f90  |   0
 src/{MNH => PHYEX/turb}/modd_cturb.f90        |   0
 src/{MNH => PHYEX/turb}/modd_diag_in_run.f90  |   0
 .../turb}/modd_param_mfshalln.f90             |   0
 src/{MNH => PHYEX/turb}/modd_turbn.f90        |   0
 .../bl89.f90 => PHYEX/turb/mode_bl89.f90}     |   0
 .../turb/mode_bl_depth_diag.f90}              |   0
 .../coefj.f90 => PHYEX/turb/mode_coefj.f90}   |   0
 .../turb/mode_compute_bl89_ml.f90}            |   0
 .../turb/mode_compute_function_thermo_mf.f90} |   0
 .../turb/mode_compute_mf_cloud.f90}           |   0
 .../turb/mode_compute_mf_cloud_bigaus.f90}    |   0
 .../turb/mode_compute_mf_cloud_direct.f90}    |   0
 .../turb/mode_compute_mf_cloud_stat.f90}      |   0
 .../turb/mode_compute_updraft.f90}            |   0
 .../turb/mode_compute_updraft_raha.f90}       |   0
 .../turb/mode_compute_updraft_rhcj10.f90}     |   0
 .../emoist.f90 => PHYEX/turb/mode_emoist.f90} |   0
 .../etheta.f90 => PHYEX/turb/mode_etheta.f90} |   0
 .../turb/mode_ibm_mixinglength.f90}           |   0
 .../turb/mode_mf_turb.f90}                    |   0
 .../turb/mode_mf_turb_expl.f90}               |   0
 .../turb/mode_prandtl.f90}                    |   0
 .../rmc01.f90 => PHYEX/turb/mode_rmc01.f90}   |   0
 .../turb/mode_rotate_wind.f90}                |   0
 src/{MNH => PHYEX/turb}/mode_sbl.f90          |   0
 .../turb/mode_sbl_depth.f90}                  |   0
 .../turb/mode_thl_rt_from_th_r_mf.f90}        |   0
 .../turb/mode_tke_eps_sources.f90}            |   0
 .../tm06.f90 => PHYEX/turb/mode_tm06.f90}     |   0
 .../tm06_h.f90 => PHYEX/turb/mode_tm06_h.f90} |   0
 .../turb/mode_tridiag.f90}                    |   0
 .../turb/mode_tridiag_massflux.f90}           |   0
 .../turb/mode_tridiag_thermo.f90}             |   0
 .../turb/mode_tridiag_tke.f90}                |   0
 .../turb/mode_tridiag_w.f90}                  |   0
 .../turb/mode_tridiag_wind.f90}               |   0
 .../turb/mode_turb_hor.f90}                   |   0
 .../turb/mode_turb_hor_dyn_corr.f90}          |   0
 .../turb/mode_turb_hor_splt.f90}              |   0
 .../turb/mode_turb_hor_sv_corr.f90}           |   0
 .../turb/mode_turb_hor_sv_flux.f90}           |   0
 .../turb/mode_turb_hor_thermo_corr.f90}       |   0
 .../turb/mode_turb_hor_thermo_flux.f90}       |   0
 .../turb/mode_turb_hor_tke.f90}               |   0
 .../turb/mode_turb_hor_uv.f90}                |   0
 .../turb/mode_turb_hor_uw.f90}                |   0
 .../turb/mode_turb_hor_vw.f90}                |   0
 .../turb/mode_turb_ver.f90}                   |   0
 .../turb/mode_turb_ver_dyn_flux.f90}          |   0
 .../turb/mode_turb_ver_sv_corr.f90}           |   0
 .../turb/mode_turb_ver_sv_flux.f90}           |   0
 .../turb/mode_turb_ver_thermo_corr.f90}       |   0
 .../turb/mode_turb_ver_thermo_flux.f90}       |   0
 .../turb/mode_update_lm.f90}                  |   0
 src/{MNH => PHYEX/turb}/shallow_mf.f90        |   0
 src/{MNH => PHYEX/turb}/shuman_mf.f90         |   0
 src/{MNH => PHYEX/turb}/turb.f90              |   0
 246 files changed, 1572 deletions(-)
 delete mode 100644 src/MNH/compute_entr_detr.f90
 delete mode 100644 src/MNH/compute_frac_ice.f90
 delete mode 100644 src/MNH/mf_turb_greyzone.f90
 delete mode 100644 src/MNH/th_r_from_thl_rt_1d.f90
 delete mode 100644 src/MNH/th_r_from_thl_rt_2d.f90
 delete mode 100644 src/MNH/th_r_from_thl_rt_3d.f90
 rename src/{MNH => PHYEX/aux}/gamma.f90 (100%)
 rename src/{MNH => PHYEX/aux}/gamma_inc.f90 (100%)
 rename src/{MNH => PHYEX/aux}/general_gamma.f90 (100%)
 rename src/{MNH => PHYEX/aux}/get_halo.f90 (100%)
 rename src/{MNH => PHYEX/aux}/gradient_m.f90 (100%)
 rename src/{MNH => PHYEX/aux}/gradient_u.f90 (100%)
 rename src/{MNH => PHYEX/aux}/gradient_v.f90 (100%)
 rename src/{MNH => PHYEX/aux}/gradient_w.f90 (100%)
 rename src/{MNH => PHYEX/aux}/ini_cst.f90 (100%)
 rename src/{MNH => PHYEX/aux}/modd_budget.f90 (100%)
 rename src/{MNH => PHYEX/aux}/modd_conf.f90 (100%)
 rename src/{MNH => PHYEX/aux}/modd_cst.f90 (100%)
 rename src/{MNH => PHYEX/aux}/modd_les.f90 (100%)
 rename src/{MNH => PHYEX/aux}/modd_lunit.f90 (100%)
 rename src/{MNH/budget.f90 => PHYEX/aux/mode_budget.f90} (100%)
 rename src/{LIB/SURCOUCHE/src => PHYEX/aux}/mode_io_field_write.f90 (100%)
 rename src/{MNH => PHYEX/aux}/mode_thermo.f90 (100%)
 rename src/{LIB/SURCOUCHE/src => PHYEX/aux}/mode_tools_ll.f90 (100%)
 rename src/{MNH => PHYEX/aux}/shuman.f90 (100%)
 rename src/{MNH => PHYEX/aux}/sources_neg_correct.f90 (100%)
 rename src/{MNH => PHYEX/aux}/tools.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_chem_transport.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_closure.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_closure_adjust.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_closure_adjust_shal.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_closure_shal.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_closure_thrvlcl.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_condens.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_downdraft.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_mixing_funct.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_precip_adjust.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_satmixratio.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_trigger_funct.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_trigger_shal.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_tstep_pref.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_updraft.f90 (100%)
 rename src/{MNH => PHYEX/conv}/convect_updraft_shal.f90 (100%)
 rename src/{MNH => PHYEX/conv}/deep_convection.f90 (100%)
 rename src/{MNH => PHYEX/conv}/ini_convpar.f90 (100%)
 rename src/{MNH => PHYEX/conv}/ini_convpar_e1.f90 (100%)
 rename src/{MNH => PHYEX/conv}/ini_convpar_shal.f90 (100%)
 rename src/{MNH => PHYEX/conv}/modd_convpar.f90 (100%)
 rename src/{MNH => PHYEX/conv}/modd_convpar_shal.f90 (100%)
 rename src/{MNH => PHYEX/conv}/modd_convparext.f90 (100%)
 rename src/{MNH => PHYEX/conv}/shallow_convection.f90 (100%)
 rename src/{MNH => PHYEX/micro}/c2r2_adjust.f90 (100%)
 rename src/{MNH => PHYEX/micro}/condensation.f90 (100%)
 rename src/{MNH => PHYEX/micro}/hypgeo.f90 (100%)
 rename src/{MNH => PHYEX/micro}/hypser.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ice_adjust.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ice_adjust_elec.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ini_ice_c1r3.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ini_lima.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ini_lima_cold_mixed.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ini_lima_warm.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ini_neb.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ini_param_elec.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ini_rain_c2r2.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ini_rain_ice.f90 (100%)
 rename src/{MNH => PHYEX/micro}/ini_rain_ice_elec.f90 (100%)
 rename src/{MNH => PHYEX/micro}/init_aerosol_properties.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_adjust.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_adjust_split.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_bergeron.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_ccn_activation.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_ccn_hom_freezing.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_cold.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_cold_hom_nucl.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_cold_sedimentation.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_cold_slow_processes.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_collisional_ice_breakup.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_compute_cloud_fractions.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_conversion_melting_snow.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_droplets_accretion.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_droplets_autoconversion.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_droplets_hom_freezing.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_droplets_riming_snow.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_droplets_self_collection.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_drops_break_up.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_drops_hom_freezing.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_drops_self_collection.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_drops_to_droplets_conv.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_functions.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_graupel.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_graupel_deposition.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_hail.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_hail_deposition.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_ice_aggregation_snow.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_ice_deposition.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_ice_melting.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_init_ccn_activation_spectrum.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_inst_procs.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_meyers.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_meyers_nucleation.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_mixed.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_mixed_fast_processes.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_mixed_slow_processes.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_mixrat_to_nconc.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_notadjust.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_nucleation_procs.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_phillips.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_phillips_ifn_nucleation.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_phillips_integ.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_phillips_ref_spectrum.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_precip_scavenging.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_rain_accr_snow.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_rain_evaporation.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_rain_freezing.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_raindrop_shattering_freezing.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_read_xker_gweth.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_read_xker_raccs.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_read_xker_rdryg.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_read_xker_sdryg.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_read_xker_sweth.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_sedimentation.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_snow_deposition.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_snow_self_collection.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_tendencies.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_warm.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_warm_coal.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_warm_evap.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_warm_nucl.f90 (100%)
 rename src/{MNH => PHYEX/micro}/lima_warm_sedimentation.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_elec_descr.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_lima_precip_scavengingn.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_neb.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_param_c1r3.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_param_c2r2.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_param_ice.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_param_lima.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_param_lima_cold.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_param_lima_mixed.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_param_lima_warm.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_rain_c2r2_descr.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_rain_c2r2_khko_param.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_rain_ice_descr.f90 (100%)
 rename src/{MNH => PHYEX/micro}/modd_rain_ice_param.f90 (100%)
 rename src/{MNH/ice4_compute_pdf.f90 => PHYEX/micro/mode_ice4_compute_pdf.f90} (100%)
 rename src/{MNH/ice4_fast_rg.f90 => PHYEX/micro/mode_ice4_fast_rg.f90} (100%)
 rename src/{MNH/ice4_fast_rh.f90 => PHYEX/micro/mode_ice4_fast_rh.f90} (100%)
 rename src/{MNH/ice4_fast_ri.f90 => PHYEX/micro/mode_ice4_fast_ri.f90} (100%)
 rename src/{MNH/ice4_fast_rs.f90 => PHYEX/micro/mode_ice4_fast_rs.f90} (100%)
 rename src/{MNH/ice4_nucleation.f90 => PHYEX/micro/mode_ice4_nucleation.f90} (100%)
 rename src/{MNH/ice4_rainfr_vert.f90 => PHYEX/micro/mode_ice4_rainfr_vert.f90} (100%)
 rename src/{MNH/ice4_rimltc.f90 => PHYEX/micro/mode_ice4_rimltc.f90} (100%)
 rename src/{MNH/ice4_rrhong.f90 => PHYEX/micro/mode_ice4_rrhong.f90} (100%)
 rename src/{MNH/ice4_rsrimcg_old.f90 => PHYEX/micro/mode_ice4_rsrimcg_old.f90} (100%)
 rename src/{MNH/ice4_sedimentation_split.f90 => PHYEX/micro/mode_ice4_sedimentation_split.f90} (100%)
 rename src/{MNH/ice4_sedimentation_split_momentum.f90 => PHYEX/micro/mode_ice4_sedimentation_split_momentum.f90} (100%)
 rename src/{MNH/ice4_sedimentation_stat.f90 => PHYEX/micro/mode_ice4_sedimentation_stat.f90} (100%)
 rename src/{MNH/ice4_slow.f90 => PHYEX/micro/mode_ice4_slow.f90} (100%)
 rename src/{MNH/ice4_tendencies.f90 => PHYEX/micro/mode_ice4_tendencies.f90} (100%)
 rename src/{MNH/ice4_warm.f90 => PHYEX/micro/mode_ice4_warm.f90} (100%)
 rename src/{MNH/read_xker_gweth.f90 => PHYEX/micro/mode_read_xker_gweth.f90} (100%)
 rename src/{MNH/read_xker_raccs.f90 => PHYEX/micro/mode_read_xker_raccs.f90} (100%)
 rename src/{MNH/read_xker_rdryg.f90 => PHYEX/micro/mode_read_xker_rdryg.f90} (100%)
 rename src/{MNH/read_xker_rweth.f90 => PHYEX/micro/mode_read_xker_rweth.f90} (100%)
 rename src/{MNH/read_xker_sdryg.f90 => PHYEX/micro/mode_read_xker_sdryg.f90} (100%)
 rename src/{MNH/read_xker_sweth.f90 => PHYEX/micro/mode_read_xker_sweth.f90} (100%)
 rename src/{MNH/rrcolss.f90 => PHYEX/micro/mode_rrcolss.f90} (100%)
 rename src/{MNH/rscolrg.f90 => PHYEX/micro/mode_rscolrg.f90} (100%)
 rename src/{MNH/rzcolx.f90 => PHYEX/micro/mode_rzcolx.f90} (100%)
 rename src/{MNH => PHYEX/micro}/modn_param_lima.f90 (100%)
 rename src/{MNH => PHYEX/micro}/prognos_lima.f90 (100%)
 rename src/{MNH => PHYEX/micro}/radar_rain_ice.f90 (100%)
 rename src/{MNH => PHYEX/micro}/radtr_satel.f90 (100%)
 rename src/{MNH => PHYEX/micro}/rain_c2r2_khko.f90 (100%)
 rename src/{MNH/rain_ice_red.f90 => PHYEX/micro/rain_ice.f90} (100%)
 rename src/{MNH => PHYEX/micro}/rain_ice_elec.f90 (100%)
 rename src/{MNH => PHYEX/micro}/rain_ice_fast_rg.f90 (100%)
 rename src/{MNH => PHYEX/micro}/rain_ice_fast_rh.f90 (100%)
 rename src/{MNH => PHYEX/micro}/rain_ice_fast_ri.f90 (100%)
 rename src/{MNH => PHYEX/micro}/rain_ice_fast_rs.f90 (100%)
 rename src/{MNH => PHYEX/micro}/rain_ice_nucleation.f90 (100%)
 rename src/{MNH/rain_ice.f90 => PHYEX/micro/rain_ice_old.f90} (100%)
 rename src/{MNH => PHYEX/micro}/rain_ice_sedimentation_split.f90 (100%)
 rename src/{MNH => PHYEX/micro}/rain_ice_sedimentation_stat.f90 (100%)
 rename src/{MNH => PHYEX/micro}/rain_ice_slow.f90 (100%)
 rename src/{MNH => PHYEX/micro}/rain_ice_warm.f90 (100%)
 rename src/{MNH => PHYEX/micro}/set_conc_lima.f90 (100%)
 rename src/{MNH => PHYEX/turb}/ini_cturb.f90 (100%)
 rename src/{MNH => PHYEX/turb}/les_mean_subgrid.f90 (100%)
 rename src/{MNH => PHYEX/turb}/modd_cturb.f90 (100%)
 rename src/{MNH => PHYEX/turb}/modd_diag_in_run.f90 (100%)
 rename src/{MNH => PHYEX/turb}/modd_param_mfshalln.f90 (100%)
 rename src/{MNH => PHYEX/turb}/modd_turbn.f90 (100%)
 rename src/{MNH/bl89.f90 => PHYEX/turb/mode_bl89.f90} (100%)
 rename src/{MNH/bl_depth_diag.f90 => PHYEX/turb/mode_bl_depth_diag.f90} (100%)
 rename src/{MNH/coefj.f90 => PHYEX/turb/mode_coefj.f90} (100%)
 rename src/{MNH/compute_bl89_ml.f90 => PHYEX/turb/mode_compute_bl89_ml.f90} (100%)
 rename src/{MNH/compute_function_thermo_mf.f90 => PHYEX/turb/mode_compute_function_thermo_mf.f90} (100%)
 rename src/{MNH/compute_mf_cloud.f90 => PHYEX/turb/mode_compute_mf_cloud.f90} (100%)
 rename src/{MNH/compute_mf_cloud_bigaus.f90 => PHYEX/turb/mode_compute_mf_cloud_bigaus.f90} (100%)
 rename src/{MNH/compute_mf_cloud_direct.f90 => PHYEX/turb/mode_compute_mf_cloud_direct.f90} (100%)
 rename src/{MNH/compute_mf_cloud_stat.f90 => PHYEX/turb/mode_compute_mf_cloud_stat.f90} (100%)
 rename src/{MNH/compute_updraft.f90 => PHYEX/turb/mode_compute_updraft.f90} (100%)
 rename src/{MNH/compute_updraft_raha.f90 => PHYEX/turb/mode_compute_updraft_raha.f90} (100%)
 rename src/{MNH/compute_updraft_rhcj10.f90 => PHYEX/turb/mode_compute_updraft_rhcj10.f90} (100%)
 rename src/{MNH/emoist.f90 => PHYEX/turb/mode_emoist.f90} (100%)
 rename src/{MNH/etheta.f90 => PHYEX/turb/mode_etheta.f90} (100%)
 rename src/{MNH/ibm_mixinglength.f90 => PHYEX/turb/mode_ibm_mixinglength.f90} (100%)
 rename src/{MNH/mf_turb.f90 => PHYEX/turb/mode_mf_turb.f90} (100%)
 rename src/{MNH/mf_turb_expl.f90 => PHYEX/turb/mode_mf_turb_expl.f90} (100%)
 rename src/{MNH/prandtl.f90 => PHYEX/turb/mode_prandtl.f90} (100%)
 rename src/{MNH/rmc01.f90 => PHYEX/turb/mode_rmc01.f90} (100%)
 rename src/{MNH/rotate_wind.f90 => PHYEX/turb/mode_rotate_wind.f90} (100%)
 rename src/{MNH => PHYEX/turb}/mode_sbl.f90 (100%)
 rename src/{MNH/sbl_depth.f90 => PHYEX/turb/mode_sbl_depth.f90} (100%)
 rename src/{MNH/thl_rt_from_th_r_mf.f90 => PHYEX/turb/mode_thl_rt_from_th_r_mf.f90} (100%)
 rename src/{MNH/tke_eps_sources.f90 => PHYEX/turb/mode_tke_eps_sources.f90} (100%)
 rename src/{MNH/tm06.f90 => PHYEX/turb/mode_tm06.f90} (100%)
 rename src/{MNH/tm06_h.f90 => PHYEX/turb/mode_tm06_h.f90} (100%)
 rename src/{MNH/tridiag.f90 => PHYEX/turb/mode_tridiag.f90} (100%)
 rename src/{MNH/tridiag_massflux.f90 => PHYEX/turb/mode_tridiag_massflux.f90} (100%)
 rename src/{MNH/tridiag_thermo.f90 => PHYEX/turb/mode_tridiag_thermo.f90} (100%)
 rename src/{MNH/tridiag_tke.f90 => PHYEX/turb/mode_tridiag_tke.f90} (100%)
 rename src/{MNH/tridiag_w.f90 => PHYEX/turb/mode_tridiag_w.f90} (100%)
 rename src/{MNH/tridiag_wind.f90 => PHYEX/turb/mode_tridiag_wind.f90} (100%)
 rename src/{MNH/turb_hor.f90 => PHYEX/turb/mode_turb_hor.f90} (100%)
 rename src/{MNH/turb_hor_dyn_corr.f90 => PHYEX/turb/mode_turb_hor_dyn_corr.f90} (100%)
 rename src/{MNH/turb_hor_splt.f90 => PHYEX/turb/mode_turb_hor_splt.f90} (100%)
 rename src/{MNH/turb_hor_sv_corr.f90 => PHYEX/turb/mode_turb_hor_sv_corr.f90} (100%)
 rename src/{MNH/turb_hor_sv_flux.f90 => PHYEX/turb/mode_turb_hor_sv_flux.f90} (100%)
 rename src/{MNH/turb_hor_thermo_corr.f90 => PHYEX/turb/mode_turb_hor_thermo_corr.f90} (100%)
 rename src/{MNH/turb_hor_thermo_flux.f90 => PHYEX/turb/mode_turb_hor_thermo_flux.f90} (100%)
 rename src/{MNH/turb_hor_tke.f90 => PHYEX/turb/mode_turb_hor_tke.f90} (100%)
 rename src/{MNH/turb_hor_uv.f90 => PHYEX/turb/mode_turb_hor_uv.f90} (100%)
 rename src/{MNH/turb_hor_uw.f90 => PHYEX/turb/mode_turb_hor_uw.f90} (100%)
 rename src/{MNH/turb_hor_vw.f90 => PHYEX/turb/mode_turb_hor_vw.f90} (100%)
 rename src/{MNH/turb_ver.f90 => PHYEX/turb/mode_turb_ver.f90} (100%)
 rename src/{MNH/turb_ver_dyn_flux.f90 => PHYEX/turb/mode_turb_ver_dyn_flux.f90} (100%)
 rename src/{MNH/turb_ver_sv_corr.f90 => PHYEX/turb/mode_turb_ver_sv_corr.f90} (100%)
 rename src/{MNH/turb_ver_sv_flux.f90 => PHYEX/turb/mode_turb_ver_sv_flux.f90} (100%)
 rename src/{MNH/turb_ver_thermo_corr.f90 => PHYEX/turb/mode_turb_ver_thermo_corr.f90} (100%)
 rename src/{MNH/turb_ver_thermo_flux.f90 => PHYEX/turb/mode_turb_ver_thermo_flux.f90} (100%)
 rename src/{MNH/update_lm.f90 => PHYEX/turb/mode_update_lm.f90} (100%)
 rename src/{MNH => PHYEX/turb}/shallow_mf.f90 (100%)
 rename src/{MNH => PHYEX/turb}/shuman_mf.f90 (100%)
 rename src/{MNH => PHYEX/turb}/turb.f90 (100%)

diff --git a/src/MNH/compute_entr_detr.f90 b/src/MNH/compute_entr_detr.f90
deleted file mode 100644
index 004f706a1..000000000
--- a/src/MNH/compute_entr_detr.f90
+++ /dev/null
@@ -1,489 +0,0 @@
-!MNH_LIC Copyright 2009-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.
-!     ######spl
-     MODULE MODI_COMPUTE_ENTR_DETR
-!    ##############################
-!
-INTERFACE
-!
-          SUBROUTINE COMPUTE_ENTR_DETR(KK,KKB,KKE,KKL,OTEST,OTESTLCL,&
-                            HFRAC_ICE,PFRAC_ICE,PRHODREF,&
-                            PPRE_MINUS_HALF,&
-                            PPRE_PLUS_HALF,PZZ,PDZZ,&
-                            PTHVM,PTHLM,PRTM,PW_UP2,PTH_UP,&
-                            PTHL_UP,PRT_UP,PLUP,&
-                            PRC_UP,PRI_UP,PTHV_UP,&
-                            PRSAT_UP,PRC_MIX,PRI_MIX,      &
-                            PENTR,PDETR,PENTR_CLD,PDETR_CLD,&
-                            PBUO_INTEG_DRY,PBUO_INTEG_CLD,&
-                            PPART_DRY)
-
-!INTEGER,                INTENT(IN)   :: KK
-INTEGER,                INTENT(IN)   :: KKB          ! near ground physical index
-INTEGER,                INTENT(IN)   :: KKE          ! uppest atmosphere physical index
-INTEGER,                INTENT(IN)   :: KKL          ! +1 if grid goes from ground to atmosphere top, -1 otherwise
-LOGICAL,DIMENSION(:),   INTENT(IN)   :: OTEST ! test to see if updraft is running
-LOGICAL,DIMENSION(:),   INTENT(IN)   :: OTESTLCL !test of condensation 
-CHARACTER(len=1),       INTENT(IN)   :: HFRAC_ICE ! frac_ice can be compute using
-                                              ! Temperature (T) or prescribed
-                                              ! (Y)
-REAL, DIMENSION(:), INTENT(IN)      :: PFRAC_ICE ! fraction of ice
-!
-!    prognostic variables at t- deltat
-!
-REAL, DIMENSION(:),     INTENT(IN) ::  PRHODREF  !rhodref
-REAL, DIMENSION(:),     INTENT(IN) ::  PPRE_MINUS_HALF ! Pressure at flux level KK
-REAL, DIMENSION(:),     INTENT(IN) ::  PPRE_PLUS_HALF ! Pressure at flux level KK+KKL
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PZZ       !  Height at the flux point
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PDZZ       !  metrics coefficient
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PTHVM      ! ThetaV environment 
-
-!
-!   thermodynamical variables which are transformed in conservative var.
-!
-REAL, DIMENSION(:,:), INTENT(IN)     ::  PTHLM     ! Thetal
-REAL, DIMENSION(:,:), INTENT(IN)     ::  PRTM      ! total mixing ratio 
-REAL, DIMENSION(:,:), INTENT(IN)     ::  PW_UP2    ! Vertical velocity^2
-REAL, DIMENSION(:),   INTENT(IN)     ::  PTH_UP,PTHL_UP,PRT_UP  ! updraft properties
-REAL, DIMENSION(:),   INTENT(IN)     ::  PLUP      ! LUP compute from the ground
-REAL, DIMENSION(:),   INTENT(IN)     ::  PRC_UP,PRI_UP   ! Updraft cloud content
-REAL, DIMENSION(:),   INTENT(IN)     ::  PTHV_UP ! Thetav of updraft
-REAL, DIMENSION(:),   INTENT(IN)     ::  PRSAT_UP ! Mixing ratio at saturation in updraft
-REAL, DIMENSION(:),   INTENT(INOUT)  ::  PRC_MIX, PRI_MIX      ! Mixture cloud content
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PENTR     ! Mass flux entrainment of the updraft
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PDETR     ! Mass flux detrainment of the updraft
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PENTR_CLD ! Mass flux entrainment of the updraft in cloudy part
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PDETR_CLD ! Mass flux detrainment of the updraft in cloudy part
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PBUO_INTEG_DRY, PBUO_INTEG_CLD! Integral Buoyancy
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PPART_DRY ! ratio of dry part at the transition level
-!
-!
-END SUBROUTINE COMPUTE_ENTR_DETR
-
-END INTERFACE
-!
-END MODULE MODI_COMPUTE_ENTR_DETR
-!     ######spl
-          SUBROUTINE COMPUTE_ENTR_DETR(KK,KKB,KKE,KKL,OTEST,OTESTLCL,&
-                            HFRAC_ICE,PFRAC_ICE,PRHODREF,&
-                            PPRE_MINUS_HALF,&
-                            PPRE_PLUS_HALF,PZZ,PDZZ,&
-                            PTHVM,PTHLM,PRTM,PW_UP2,PTH_UP,&
-                            PTHL_UP,PRT_UP,PLUP,&
-                            PRC_UP,PRI_UP,PTHV_UP,&
-                            PRSAT_UP,PRC_MIX,PRI_MIX,      &
-                            PENTR,PDETR,PENTR_CLD,PDETR_CLD,&
-                            PBUO_INTEG_DRY,PBUO_INTEG_CLD,&
-                            PPART_DRY)
-!         #############################################################
-
-!!
-!!***COMPUTE_ENTR_DETR* - calculates caracteristics of the updraft or downdraft
-!!                       using model of the EDMF scheme 
-!!
-!!    PURPOSE
-!!    -------
-!!****  The purpose of this routine is to compute entrainement and
-!!      detrainement at one level of the updraft
-!
-!!**  METHOD
-!!    ------
-!!
-!!    EXTERNAL
-!!    --------
-!!      
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!
-!!     REFERENCE
-!!     ---------
-!!       Book 1 of Meso-NH documentation (chapter Convection)
-!!       
-!!
-!!     AUTHOR
-!!     ------
-!!    J.Pergaud : 2009
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Y.Seity (06/2010) Bug correction
-!!      V.Masson (09/2010) Optimization
-!!      S. Riette april 2011 : ice added, protection against zero divide by Yves Bouteloup
-!!                             protection against too big ZPART_DRY, interface modified
-!!      S. Riette Jan 2012: support for both order of vertical levels 
-!!      S. Riette & J. Escobar (11/2013) : remove div by 0 on real*4 case
-!!      P.Marguinaud Jun 2012: fix uninitialized variable
-!!      P.Marguinaud Nov 2012: fix gfortran bug
-!!      S. Riette Apr 2013: bugs correction, rewriting (for optimisation) and
-!!                          improvement of continuity at the condensation level
-!!      S. Riette Nov 2013: protection against zero divide for min value of dry PDETR
-!!      R.Honnert Oct 2016 : Update with AROME
-!  P. Wautelet 08/02/2019: bugfix: compute ZEPSI_CLOUD only once and only when it is needed
-!  P. Wautelet 10/02/2021: bugfix: initialized PPART_DRY everywhere
-!  M. Mandement 24/01/2022:bugfix: init of theta_l in mixtures was too low (0.1K) 
-!! --------------------------------------------------------------------------
-!
-!*      0. DECLARATIONS
-!          ------------
-!                         
-USE MODD_CST
-USE MODD_PARAM_MFSHALL_n
-USE MODD_PARAMETERS, ONLY: XUNDEF
-
-USE MODE_THERMO
-
-USE MODI_TH_R_FROM_THL_RT_1D
-
-IMPLICIT NONE
-!
-!                         
-!*                    1.1  Declaration of Arguments
-!
-!
-INTEGER,                INTENT(IN)   :: KK
-INTEGER,                INTENT(IN)   :: KKB          ! near ground physical index
-INTEGER,                INTENT(IN)   :: KKE          ! uppest atmosphere physical index
-INTEGER,                INTENT(IN)   :: KKL          ! +1 if grid goes from ground to atmosphere top, -1 otherwise
-LOGICAL,DIMENSION(:),   INTENT(IN)   :: OTEST ! test to see if updraft is running
-LOGICAL,DIMENSION(:),   INTENT(IN)   :: OTESTLCL !test of condensation 
-CHARACTER(len=1),       INTENT(IN)   :: HFRAC_ICE ! frac_ice can be compute using
-                                              ! Temperature (T) or prescribed
-                                              ! (Y)
-REAL, DIMENSION(:), INTENT(IN)      :: PFRAC_ICE ! fraction of ice
-!
-!    prognostic variables at t- deltat
-!
-REAL, DIMENSION(:),     INTENT(IN) ::  PRHODREF  !rhodref
-REAL, DIMENSION(:),     INTENT(IN) ::  PPRE_MINUS_HALF ! Pressure at flux level KK
-REAL, DIMENSION(:),     INTENT(IN) ::  PPRE_PLUS_HALF ! Pressure at flux level KK+KKL
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PZZ       !  Height at the flux point
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PDZZ       !  metrics coefficient
-REAL, DIMENSION(:,:),   INTENT(IN) ::  PTHVM      ! ThetaV environment 
-
-!
-!   thermodynamical variables which are transformed in conservative var.
-!
-REAL, DIMENSION(:,:), INTENT(IN)     ::  PTHLM     ! Thetal
-REAL, DIMENSION(:,:), INTENT(IN)     ::  PRTM      ! total mixing ratio 
-REAL, DIMENSION(:,:), INTENT(IN)     ::  PW_UP2    ! Vertical velocity^2
-REAL, DIMENSION(:),   INTENT(IN)     ::  PTH_UP,PTHL_UP,PRT_UP  ! updraft properties
-REAL, DIMENSION(:),   INTENT(IN)     ::  PLUP      ! LUP compute from the ground
-REAL, DIMENSION(:),   INTENT(IN)     ::  PRC_UP,PRI_UP   ! Updraft cloud content
-REAL, DIMENSION(:),   INTENT(IN)     ::  PTHV_UP ! Thetav of updraft
-REAL, DIMENSION(:),   INTENT(IN)     ::  PRSAT_UP ! Mixing ratio at saturation in updraft
-REAL, DIMENSION(:),   INTENT(INOUT)  ::  PRC_MIX, PRI_MIX      ! Mixture cloud content
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PENTR     ! Mass flux entrainment of the updraft
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PDETR     ! Mass flux detrainment of the updraft
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PENTR_CLD ! Mass flux entrainment of the updraft in cloudy part
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PDETR_CLD ! Mass flux detrainment of the updraft in cloudy part
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PBUO_INTEG_DRY, PBUO_INTEG_CLD! Integral Buoyancy
-REAL, DIMENSION(:),   INTENT(OUT)    ::  PPART_DRY ! ratio of dry part at the transition level
-!
-!
-!                       1.2  Declaration of local variables
-!
-!
-
-! Variables for cloudy part
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZKIC, ZKIC_F2  ! fraction of env. mass in the muxtures
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZEPSI,ZDELTA   ! factor entrainment detrainment
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZEPSI_CLOUD    ! factor entrainment detrainment
-REAL                           :: ZCOEFFMF_CLOUD ! factor for compputing entr. detr.
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZMIXTHL,ZMIXRT ! Thetal and rt in the mixtures
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZTHMIX         ! Theta and Thetav  of mixtures
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZRVMIX,ZRCMIX,ZRIMIX ! mixing ratios in mixtures
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZTHVMIX, ZTHVMIX_F2 ! Theta and Thetav  of mixtures
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZTHV_UP_F2     ! thv_up at flux point kk+kkl
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZRSATW, ZRSATI ! working arrays (mixing ratio at saturation)
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZTHV           ! theta V of environment at the bottom of cloudy part  
-REAL                           :: ZKIC_INIT      !Initial value of ZKIC
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZCOTHVU              ! Variation of Thvup between bottom and top of cloudy part
-
-! Variables for dry part
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZFOESW, ZFOESI       ! saturating vapor pressure
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZDRSATODP            ! d.Rsat/dP
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZT                   ! Temperature
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZWK                  ! Work array
-
-! Variables for dry and cloudy parts
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZCOEFF_MINUS_HALF,&  ! Variation of Thv between mass points kk-kkl and kk
-                                  ZCOEFF_PLUS_HALF     ! Variation of Thv between mass points kk and kk+kkl
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZPRE                 ! pressure at the bottom of the cloudy part
-REAL, DIMENSION(SIZE(PTHVM,1)) :: ZG_O_THVREF
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZFRAC_ICE            ! fraction of ice
-REAL                           :: ZRVORD               ! RV/RD
-REAL, DIMENSION(SIZE(PTHLM,1)) :: ZDZ_STOP,&           ! Exact Height of the LCL above flux level KK
-                                  ZTHV_MINUS_HALF,&    ! Thv at flux point(kk)  
-                                  ZTHV_PLUS_HALF,&     ! Thv at flux point(kk+kkl)
-                                  ZDZ                  ! Delta Z used in computations
-INTEGER :: JI,JLOOP
-
-!----------------------------------------------------------------------------------
-                        
-!                1.3 Initialisation
-!                ------------------
-
-  
-  ZRVORD   = XRV / XRD   !=1.607
-  ZG_O_THVREF(:)=XG/PTHVM(:,KK)
-  ZCOEFFMF_CLOUD=XENTR_MF * XG / XCRAD_MF
-  
-  ZFRAC_ICE(:)=PFRAC_ICE(:) ! to not modify fraction of ice
- 
-  ZPRE(:)=PPRE_MINUS_HALF(:)
-  ZMIXTHL(:)=300.0
-  ZMIXRT(:)=0.1
-
-  !Initialize PPART_DRY everywhere to prevent access to non-initialized values
-  ! (intent(out) arrays have undefined values at subroutine entry)
-  PPART_DRY(:) = XUNDEF
-
-!                1.4 Estimation of PPART_DRY
-  DO JLOOP=1,SIZE(OTEST)
-    IF(OTEST(JLOOP) .AND. OTESTLCL(JLOOP)) THEN
-      !No dry part when condensation level is reached
-      PPART_DRY(JLOOP)=0.
-      ZDZ_STOP(JLOOP)=0.
-      ZPRE(JLOOP)=PPRE_MINUS_HALF(JLOOP)
-    ELSE IF (OTEST(JLOOP) .AND. .NOT. OTESTLCL(JLOOP)) THEN
-      !Temperature at flux level KK
-      ZT(JLOOP)=PTH_UP(JLOOP)*(PPRE_MINUS_HALF(JLOOP)/XP00) ** (XRD/XCPD)
-      !Saturating vapor pressure at flux level KK
-      ZFOESW(JLOOP) = MIN(EXP( XALPW - XBETAW/ZT(JLOOP) - XGAMW*LOG(ZT(JLOOP))  ), 0.99*PPRE_MINUS_HALF(JLOOP))
-      ZFOESI(JLOOP) = MIN(EXP( XALPI - XBETAI/ZT(JLOOP) - XGAMI*LOG(ZT(JLOOP))  ), 0.99*PPRE_MINUS_HALF(JLOOP))
-      !Computation of d.Rsat / dP (partial derivations with respect to P and T
-      !and use of T=Theta*(P/P0)**(R/Cp) to transform dT into dP with theta_up
-      !constant at the vertical)
-      ZDRSATODP(JLOOP)=(XBETAW/ZT(JLOOP)-XGAMW)*(1-ZFRAC_ICE(JLOOP))+(XBETAI/ZT(JLOOP)-XGAMI)*ZFRAC_ICE(JLOOP)
-      ZDRSATODP(JLOOP)=((XRD/XCPD)*ZDRSATODP(JLOOP)-1.)*PRSAT_UP(JLOOP)/ &
-                  &(PPRE_MINUS_HALF(JLOOP)-(ZFOESW(JLOOP)*(1-ZFRAC_ICE(JLOOP)) + ZFOESI(JLOOP)*ZFRAC_ICE(JLOOP)))
-      !Use of d.Rsat / dP and pressure at flux level KK to find pressure (ZPRE)
-      !where Rsat is equal to PRT_UP
-      ZPRE(JLOOP)=PPRE_MINUS_HALF(JLOOP)+(PRT_UP(JLOOP)-PRSAT_UP(JLOOP))/ZDRSATODP(JLOOP)
-      !Fraction of dry part (computed with pressure and used with heights, no
-      !impact found when using log function here and for pressure on flux levels
-      !computation)
-      PPART_DRY(JLOOP)=MAX(0., MIN(1., (PPRE_MINUS_HALF(JLOOP)-ZPRE(JLOOP))/(PPRE_MINUS_HALF(JLOOP)-PPRE_PLUS_HALF(JLOOP))))
-      !Height above flux level KK of the cloudy part
-      ZDZ_STOP(JLOOP) = (PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK))*PPART_DRY(JLOOP)
-    END IF
-  END DO
-
-!               1.5 Gradient and flux values of thetav
-  IF(KK/=KKB)THEN
-    ZCOEFF_MINUS_HALF(:)=((PTHVM(:,KK)-PTHVM(:,KK-KKL))/PDZZ(:,KK))
-    ZTHV_MINUS_HALF(:) = PTHVM(:,KK) - ZCOEFF_MINUS_HALF(:)*0.5*(PZZ(:,KK+KKL)-PZZ(:,KK))
-  ELSE
-    ZCOEFF_MINUS_HALF(:)=0.
-    ZTHV_MINUS_HALF(:) = PTHVM(:,KK)
-  ENDIF
-  ZCOEFF_PLUS_HALF(:)  = ((PTHVM(:,KK+KKL)-PTHVM(:,KK))/PDZZ(:,KK+KKL))
-  ZTHV_PLUS_HALF(:)  = PTHVM(:,KK) + ZCOEFF_PLUS_HALF(:)*0.5*(PZZ(:,KK+KKL)-PZZ(:,KK))
-
-!               2  Dry part computation:
-!                  Integral buoyancy and computation of PENTR and PDETR for dry part
-!               --------------------------------------------------------------------
-
-DO JLOOP=1,SIZE(OTEST) 
- IF (OTEST(JLOOP) .AND. PPART_DRY(JLOOP)>0.) THEN
-    ZDZ(JLOOP)=MIN(ZDZ_STOP(JLOOP),(PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK))*0.5)
-    PBUO_INTEG_DRY(JLOOP) = ZG_O_THVREF(JLOOP)*ZDZ(JLOOP)*&
-                (0.5 * (  - ZCOEFF_MINUS_HALF(JLOOP))*ZDZ(JLOOP)  &
-                  - ZTHV_MINUS_HALF(JLOOP) + PTHV_UP(JLOOP) )
-
-    !Between mass flux KK and bottom of cloudy part (if above mass flux)
-    ZDZ(JLOOP)=MAX(0., ZDZ_STOP(JLOOP)-(PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK))*0.5)
-    PBUO_INTEG_DRY(JLOOP) = PBUO_INTEG_DRY(JLOOP) + ZG_O_THVREF(JLOOP)*ZDZ(JLOOP)*&
-                (0.5 * (  - ZCOEFF_PLUS_HALF(JLOOP))*ZDZ(JLOOP) &
-                  - PTHVM(JLOOP,KK) + PTHV_UP(JLOOP) )
-    IF (PBUO_INTEG_DRY(JLOOP)>=0.) THEN
-      PENTR(JLOOP) = 0.5/(XABUO-XBENTR*XENTR_DRY)*&
-                 LOG(1.+ (2.*(XABUO-XBENTR*XENTR_DRY)/PW_UP2(JLOOP,KK))* &
-                 PBUO_INTEG_DRY(JLOOP))
-      PDETR(JLOOP) = 0.  
-    ELSE
-      PENTR(JLOOP) = 0.
-      PDETR(JLOOP) = 0.5/(XABUO)*&
-                 LOG(1.+ (2.*(XABUO)/PW_UP2(JLOOP,KK))* &
-                 (-PBUO_INTEG_DRY(JLOOP)))
-    ENDIF
-    PENTR(JLOOP) = XENTR_DRY*PENTR(JLOOP)/(PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK))    
-    PDETR(JLOOP) = XDETR_DRY*PDETR(JLOOP)/(PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK))
-    !Minimum value of detrainment
-    ZWK(JLOOP)=PLUP(JLOOP)-0.5*(PZZ(JLOOP,KK)+PZZ(JLOOP,KK+KKL))
-    ZWK(JLOOP)=SIGN(MAX(1., ABS(ZWK(JLOOP))), ZWK(JLOOP)) ! ZWK must not be zero
-    PDETR(JLOOP) = MAX(PPART_DRY(JLOOP)*XDETR_LUP/ZWK(JLOOP), PDETR(JLOOP))  
- ELSE
-    !No dry part, consation reached (OTESTLCL)
-    PBUO_INTEG_DRY(JLOOP) = 0.
-    PENTR(JLOOP)=0.
-    PDETR(JLOOP)=0.
- END IF
-ENDDO
-
-
-!               3  Wet part computation
-!               -----------------------
-
-!               3.1 Integral buoyancy for cloudy part
-
-  ! Compute theta_v of updraft at flux level KK+KKL                   
-  !MIX variables are used to avoid declaring new variables
-  !but we are dealing with updraft and not mixture
-  ZRCMIX(:)=PRC_UP(:)
-  ZRIMIX(:)=PRI_UP(:)
-  CALL TH_R_FROM_THL_RT_1D(HFRAC_ICE,ZFRAC_ICE,&
-               PPRE_PLUS_HALF,PTHL_UP,PRT_UP,&
-               ZTHMIX,ZRVMIX,ZRCMIX,ZRIMIX,&
-               ZRSATW, ZRSATI)
-  ZTHV_UP_F2(:) = ZTHMIX(:)*(1.+ZRVORD*ZRVMIX(:))/(1.+PRT_UP(:))
-
-  ! Integral buoyancy for cloudy part
-  DO JLOOP=1,SIZE(OTEST)
-    IF(OTEST(JLOOP) .AND. PPART_DRY(JLOOP)<1.) THEN
-      !Gradient of Theta V updraft over the cloudy part, assuming that thetaV updraft don't change
-      !between flux level KK and bottom of cloudy part
-      ZCOTHVU(JLOOP)=(ZTHV_UP_F2(JLOOP)-PTHV_UP(JLOOP))/((PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK))*(1-PPART_DRY(JLOOP)))
-
-      !Computation in two parts to use change of gradient of theta v of environment
-      !Between bottom of cloudy part (if under mass level) and mass level KK
-      ZDZ(JLOOP)=MAX(0., 0.5*(PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK))-ZDZ_STOP(JLOOP))
-      PBUO_INTEG_CLD(JLOOP) = ZG_O_THVREF(JLOOP)*ZDZ(JLOOP)*&
-              (0.5*( ZCOTHVU(JLOOP) - ZCOEFF_MINUS_HALF(JLOOP))*ZDZ(JLOOP) &
-                - (PTHVM(JLOOP,KK)-ZDZ(JLOOP)*ZCOEFF_MINUS_HALF(JLOOP)) + PTHV_UP(JLOOP) )
-
-      !Between max(mass level, bottom of cloudy part) and flux level KK+KKL
-      ZDZ(JLOOP)=(PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK))-MAX(ZDZ_STOP(JLOOP),0.5*(PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK)))
-      PBUO_INTEG_CLD(JLOOP) = PBUO_INTEG_CLD(JLOOP)+ZG_O_THVREF(JLOOP)*ZDZ(JLOOP)*&
-                        (0.5*( ZCOTHVU(JLOOP) - ZCOEFF_PLUS_HALF(JLOOP))*ZDZ(JLOOP)&
-                - (PTHVM(JLOOP,KK)+(0.5*((PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK)))-ZDZ(JLOOP))*ZCOEFF_PLUS_HALF(JLOOP)) +&
-                PTHV_UP(JLOOP) )
-
-    ELSE
-      !No cloudy part
-      PBUO_INTEG_CLD(JLOOP)=0.
-    END IF
-  END DO
-
-!               3.2 Critical mixed fraction for KK+KKL flux level (ZKIC_F2) and
-!                   for bottom of cloudy part (ZKIC), then a mean for the cloudy part
-!                   (put also in ZKIC)
-!
-!                   computation by estimating unknown  
-!                   T^mix r_c^mix and r_i^mix from enthalpy^mix and r_w^mix
-!                   We determine the zero crossing of the linear curve
-!                   evaluating the derivative using ZMIXF=0.1
-                
-  ZKIC_INIT=0.1  ! starting value for critical mixed fraction for CLoudy Part
-
-  !  Compute thetaV of environment at the bottom of cloudy part
-  !    and cons then non cons. var. of mixture at the bottom of cloudy part
-
-  !   JI computed to avoid KKL(KK-KKL) being < KKL*KKB
-  JI=KKL*MAX(KKL*(KK-KKL),KKL*KKB)
-  DO JLOOP=1,SIZE(OTEST)
-    IF(OTEST(JLOOP) .AND. PPART_DRY(JLOOP)>0.5) THEN
-      ZDZ(JLOOP)=ZDZ_STOP(JLOOP)-0.5*(PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK))
-      ZTHV(JLOOP)= PTHVM(JLOOP,KK)+ZCOEFF_PLUS_HALF(JLOOP)*ZDZ(JLOOP)
-      ZMIXTHL(JLOOP) = ZKIC_INIT * &
-                 (PTHLM(JLOOP,KK)+ZDZ(JLOOP)*(PTHLM(JLOOP,KK+KKL)-PTHLM(JLOOP,KK))/PDZZ(JLOOP,KK+KKL)) + &
-                 (1. - ZKIC_INIT)*PTHL_UP(JLOOP)
-      ZMIXRT(JLOOP)  = ZKIC_INIT * &
-                 (PRTM(JLOOP,KK)+ZDZ(JLOOP)*(PRTM(JLOOP,KK+KKL)-PRTM(JLOOP,KK))/PDZZ(JLOOP,KK+KKL)) +   &
-                 (1. - ZKIC_INIT)*PRT_UP(JLOOP)
-     ELSEIF(OTEST(JLOOP)) THEN
-      ZDZ(JLOOP)=0.5*(PZZ(JLOOP,KK+KKL)-PZZ(JLOOP,KK))-ZDZ_STOP(JLOOP)
-      ZTHV(JLOOP)= PTHVM(JLOOP,KK)-ZCOEFF_MINUS_HALF(JLOOP)*ZDZ(JLOOP)
-      ZMIXTHL(JLOOP) = ZKIC_INIT * &
-                 (PTHLM(JLOOP,KK)-ZDZ(JLOOP)*(PTHLM(JLOOP,KK)-PTHLM(JLOOP,JI))/PDZZ(JLOOP,KK)) + &
-                 (1. - ZKIC_INIT)*PTHL_UP(JLOOP)
-      ZMIXRT(JLOOP)  = ZKIC_INIT * &
-                 (PRTM(JLOOP,KK)-ZDZ(JLOOP)*(PRTM(JLOOP,KK)-PRTM(JLOOP,JI))/PDZZ(JLOOP,KK)) + &
-                 (1. - ZKIC_INIT)*PRT_UP(JLOOP)
-    ENDIF
-  ENDDO
-  CALL TH_R_FROM_THL_RT_1D(HFRAC_ICE,ZFRAC_ICE,&
-               ZPRE,ZMIXTHL,ZMIXRT,&
-               ZTHMIX,ZRVMIX,PRC_MIX,PRI_MIX,&
-               ZRSATW, ZRSATI)
-  ZTHVMIX(:) = ZTHMIX(:)*(1.+ZRVORD*ZRVMIX(:))/(1.+ZMIXRT(:))
-
-  !  Compute cons then non cons. var. of mixture at the flux level KK+KKL  with initial ZKIC
-  ZMIXTHL(:) = ZKIC_INIT * 0.5*(PTHLM(:,KK)+PTHLM(:,KK+KKL))+(1. - ZKIC_INIT)*PTHL_UP(:)
-  ZMIXRT(:)  = ZKIC_INIT * 0.5*(PRTM(:,KK)+PRTM(:,KK+KKL))+(1. - ZKIC_INIT)*PRT_UP(:)
-  CALL TH_R_FROM_THL_RT_1D(HFRAC_ICE,ZFRAC_ICE,&
-               PPRE_PLUS_HALF,ZMIXTHL,ZMIXRT,&
-               ZTHMIX,ZRVMIX,PRC_MIX,PRI_MIX,&
-               ZRSATW, ZRSATI)
-  ZTHVMIX_F2(:) = ZTHMIX(:)*(1.+ZRVORD*ZRVMIX(:))/(1.+ZMIXRT(:))
-
-  !Computation of mean ZKIC over the cloudy part
-  DO JLOOP=1,SIZE(OTEST) 
-    IF (OTEST(JLOOP)) THEN
-    ! Compute ZKIC at the bottom of cloudy part
-    ! Thetav_up at bottom is equal to Thetav_up at flux level KK
-      IF (ABS(PTHV_UP(JLOOP)-ZTHVMIX(JLOOP))<1.E-10) THEN
-        ZKIC(JLOOP)=1.
-      ELSE
-        ZKIC(JLOOP) = MAX(0.,PTHV_UP(JLOOP)-ZTHV(JLOOP))*ZKIC_INIT /  &  
-                   (PTHV_UP(JLOOP)-ZTHVMIX(JLOOP))
-      END IF
-      ! Compute ZKIC_F2 at flux level KK+KKL
-      IF (ABS(ZTHV_UP_F2(JLOOP)-ZTHVMIX_F2(JLOOP))<1.E-10) THEN
-        ZKIC_F2(JLOOP)=1.
-      ELSE
-        ZKIC_F2(JLOOP) = MAX(0.,ZTHV_UP_F2(JLOOP)-ZTHV_PLUS_HALF(JLOOP))*ZKIC_INIT /  &  
-                   (ZTHV_UP_F2(JLOOP)-ZTHVMIX_F2(JLOOP))
-      END IF
-      !Mean ZKIC over the cloudy part
-      ZKIC(JLOOP)=MAX(MIN(0.5*(ZKIC(JLOOP)+ZKIC_F2(JLOOP)),1.),0.)
-    END IF
-  END DO
-
-
-!               3.3 Integration of PDF
-!                   According to Kain and Fritsch (1990), we replace delta Mt
-!                   in eq. (7) and (8) using eq. (5). Here we compute the ratio
-!                   of integrals without computing delta Me
-
-  !Constant PDF
-  !For this PDF, eq. (5) is delta Me=0.5*delta Mt
-  DO JLOOP=1,SIZE(OTEST)
-    IF(OTEST(JLOOP)) THEN
-      ZEPSI(JLOOP) = ZKIC(JLOOP)**2. !integration multiplied by 2
-      ZDELTA(JLOOP) = (1.-ZKIC(JLOOP))**2. !idem
-    ENDIF
-  ENDDO
-
-  !Triangular PDF
-  !Calculus must be verified before activating this part, but in this state,
-  !results on ARM case are almost identical
-  !For this PDF, eq. (5) is also delta Me=0.5*delta Mt
-  !WHERE(OTEST)
-  !  !Integration multiplied by 2
-  !  WHERE(ZKIC<0.5)
-  !    ZEPSI(:)=8.*ZKIC(:)**3/3.
-  !    ZDELTA(:)=1.-4.*ZKIC(:)**2+8.*ZKIC(:)**3/3.
-  !  ELSEWHERE
-  !    ZEPSI(:)=5./3.-4*ZKIC(:)**2+8.*ZKIC(:)**3/3.
-  !    ZDELTA(:)=8.*(1.-ZKIC(:))**3/3.
-  !  ENDWHERE
-  !ENDWHERE
-
-!               3.4 Computation of PENTR and PDETR
-  DO JLOOP=1,SIZE(OTEST)
-    IF(OTEST(JLOOP)) THEN
-      ZEPSI_CLOUD(JLOOP)=MIN(ZDELTA(JLOOP),ZEPSI(JLOOP))
-      PENTR_CLD(JLOOP) = (1.-PPART_DRY(JLOOP))*ZCOEFFMF_CLOUD*PRHODREF(JLOOP)*ZEPSI_CLOUD(JLOOP)
-      PDETR_CLD(JLOOP) = (1.-PPART_DRY(JLOOP))*ZCOEFFMF_CLOUD*PRHODREF(JLOOP)*ZDELTA(JLOOP)
-      PENTR(JLOOP) = PENTR(JLOOP)+PENTR_CLD(JLOOP)
-      PDETR(JLOOP) = PDETR(JLOOP)+PDETR_CLD(JLOOP)
-    ELSE
-      PENTR_CLD(JLOOP) = 0.
-      PDETR_CLD(JLOOP) = 0.
-    ENDIF
-  ENDDO 
-
-END SUBROUTINE COMPUTE_ENTR_DETR  
diff --git a/src/MNH/compute_frac_ice.f90 b/src/MNH/compute_frac_ice.f90
deleted file mode 100644
index b0e8e7b2d..000000000
--- a/src/MNH/compute_frac_ice.f90
+++ /dev/null
@@ -1,286 +0,0 @@
-!MNH_LIC Copyright 2006-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_FRAC_ICE  
-!    ############################ 
-!
-INTERFACE COMPUTE_FRAC_ICE
-!
-    SUBROUTINE COMPUTE_FRAC_ICE3D(HFRAC_ICE,PFRAC_ICE,PT)
-!
-CHARACTER(len=1),       INTENT(IN) :: HFRAC_ICE
-REAL, DIMENSION(:,:,:), INTENT(IN) :: PT
-REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PFRAC_ICE                                             
-!
-   END SUBROUTINE COMPUTE_FRAC_ICE3D
-!
-   SUBROUTINE COMPUTE_FRAC_ICE2D(HFRAC_ICE,PFRAC_ICE,PT)
-!
-CHARACTER(len=1),     INTENT(IN) :: HFRAC_ICE
-REAL, DIMENSION(:,:), INTENT(IN) :: PT
-REAL, DIMENSION(:,:), INTENT(INOUT) :: PFRAC_ICE                                             
-!
-   END SUBROUTINE COMPUTE_FRAC_ICE2D
-
-   SUBROUTINE COMPUTE_FRAC_ICE1D(HFRAC_ICE,PFRAC_ICE,PT)
-!
-CHARACTER(len=1),   INTENT(IN) :: HFRAC_ICE
-REAL, DIMENSION(:), INTENT(IN) :: PT
-REAL, DIMENSION(:), INTENT(INOUT) :: PFRAC_ICE                                             
-
-   END SUBROUTINE COMPUTE_FRAC_ICE1D
-
-END INTERFACE
-!
-END MODULE MODI_COMPUTE_FRAC_ICE
-!
-!     ##############################
-      MODULE MODI_COMPUTE_FRAC_ICE3D  
-!     ############################## 
-
-INTERFACE 
-!
-    SUBROUTINE COMPUTE_FRAC_ICE3D(HFRAC_ICE,PFRAC_ICE,PT)
-!
-CHARACTER(len=1),       INTENT(IN) :: HFRAC_ICE
-REAL, DIMENSION(:,:,:), INTENT(IN) :: PT
-REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PFRAC_ICE                                             
-!
-   END SUBROUTINE COMPUTE_FRAC_ICE3D
-END INTERFACE
-END MODULE MODI_COMPUTE_FRAC_ICE3D
-!
-!     ##############################
-       MODULE MODI_COMPUTE_FRAC_ICE1D  
-!     ############################## 
-
-INTERFACE 
-!
-    SUBROUTINE COMPUTE_FRAC_ICE1D(HFRAC_ICE,PFRAC_ICE,PT)
-!
-CHARACTER(len=1),   INTENT(IN)    :: HFRAC_ICE
-REAL, DIMENSION(:), INTENT(IN)    :: PT
-REAL, DIMENSION(:), INTENT(INOUT) :: PFRAC_ICE
-!
-   END SUBROUTINE COMPUTE_FRAC_ICE1D
-END INTERFACE
-END MODULE MODI_COMPUTE_FRAC_ICE1D
-!    ##########################################################
-      SUBROUTINE COMPUTE_FRAC_ICE3D(HFRAC_ICE,PFRAC_ICE,PT)
-!     #################################################################
-!
-!
-!!****  *COMPUTE_FRAC_ICE* - computes ice fraction
-!!
-!!    PURPOSE
-!!    -------
-!!
-!!**  METHOD
-!!    ------
-!!    
-!!
-!!    EXTERNAL
-!!    --------
-!!
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!
-!!
-!!    REFERENCE
-!!    ---------
-!!
-!!    AUTHOR
-!!    ------
-!!      Julien PERGAUD      * Meteo-France *
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original         13/03/06
-!!      S. Riette        April 2011 optimisation
-!!
-!! --------------------------------------------------------------------------
-!       
-!*      0. DECLARATIONS
-!          ------------
-!
-USE MODI_COMPUTE_FRAC_ICE1D
-!
-IMPLICIT NONE
-!
-!
-!*      0.1  declarations of arguments
-!
-CHARACTER(len=1),       INTENT(IN)    :: HFRAC_ICE ! scheme to use
-REAL, DIMENSION(:,:,:), INTENT(IN)    :: PT        ! Temperature
-REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PFRAC_ICE ! Ice fraction (1 for ice only, 0 for liquid only)
-!-------------------------------------------------------------------------
-!
-!       0.2  declaration of local variables
-!
-INTEGER :: JJ, JK
-!-------------------------------------------------------------------------
-!
-!       0.3  Initialisation
-!
-!
-!----------------------------------------------------------------------------
-!
-!       1 Compute FRAC_ICE
-!         ----------------
-!
-DO JK=1, SIZE(PT,3)
-  DO JJ=1, SIZE(PT,2)
-    CALL COMPUTE_FRAC_ICE1D(HFRAC_ICE,PFRAC_ICE(:,JJ,JK),PT(:,JJ,JK))
-  ENDDO
-ENDDO
-
-
-END SUBROUTINE COMPUTE_FRAC_ICE3D
-!    ##########################################################
-      SUBROUTINE COMPUTE_FRAC_ICE2D(HFRAC_ICE,PFRAC_ICE,PT)
-!    ##########################################################
-!
-!
-!!****  *COMPUTE_FRAC_ICE* - computes ice fraction
-!!
-!!    PURPOSE
-!!    -------
-!!
-!!**  METHOD
-!!    ------
-!!    
-!!
-!!    EXTERNAL
-!!    --------
-!!
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!
-!!
-!!    REFERENCE
-!!    ---------
-!!
-!!    AUTHOR
-!!    ------
-!!      Julien PERGAUD      * Meteo-France *
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original         13/03/06
-!!      S. Riette        April 2011 optimisation
-!!
-!! --------------------------------------------------------------------------
-!       0. DECLARATIONS
-!          ------------
-!
-USE MODI_COMPUTE_FRAC_ICE1D
-!
-IMPLICIT NONE
-!
-!
-!*      0.1  declarations of arguments
-!
-CHARACTER(len=1),     INTENT(IN)    :: HFRAC_ICE ! scheme to use
-REAL, DIMENSION(:,:), INTENT(IN)    :: PT        ! Temperature
-REAL, DIMENSION(:,:), INTENT(INOUT) :: PFRAC_ICE ! Ice fraction (1 for ice only, 0 for liquid only)
-!-------------------------------------------------------------------------
-!
-!       0.2  declaration of local variables
-!
-INTEGER :: JK
-!-------------------------------------------------------------------------
-!
-!       0.3  Initialisation
-!
-!
-!----------------------------------------------------------------------------
-!
-!       1 Compute FRAC_ICE
-!         ----------------
-!
-DO JK=1, SIZE(PT,2)
-  CALL COMPUTE_FRAC_ICE1D(HFRAC_ICE,PFRAC_ICE(:,JK),PT(:,JK))
-ENDDO
-
-
-END SUBROUTINE COMPUTE_FRAC_ICE2D
-!    ##########################################################
-      SUBROUTINE COMPUTE_FRAC_ICE1D(HFRAC_ICE,PFRAC_ICE,PT)
-!    ##########################################################
-!
-!
-!!****  *COMPUTE_FRAC_ICE* - computes ice fraction
-!!
-!!    PURPOSE
-!!    -------
-!!
-!!**  METHOD
-!!    ------
-!!    
-!!
-!!    EXTERNAL
-!!    --------
-!!
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!
-!!
-!!    REFERENCE
-!!    ---------
-!!
-!!    AUTHOR
-!!    ------
-!!      Julien PERGAUD      * Meteo-France *
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original         13/03/06
-!!      S. Riette        April 2011 optimisation
-!!      S. Riette        08/2016 add option O
-!  P. Wautelet 10/04/2019: replace ABORT and STOP calls by Print_msg
-!!
-!! --------------------------------------------------------------------------
-!       0. DECLARATIONS
-!          ------------
-!
-USE MODD_NEB, ONLY : XTMINMIX, XTMAXMIX
-USE MODD_CST, ONLY : XTT
-USE MODE_MSG
-!
-IMPLICIT NONE
-!
-!
-!*      0.1  declarations of arguments
-!
-CHARACTER(len=1),   INTENT(IN)    :: HFRAC_ICE  ! scheme to use
-REAL, DIMENSION(:), INTENT(IN)    :: PT         ! temperature
-REAL, DIMENSION(:), INTENT(INOUT) :: PFRAC_ICE  ! Ice fraction (1 for ice only, 0 for liquid only)
-!
-!               0.2  declaration of local variables
-! 
-!
-!               0.2  initialisation
-!
-!
-!------------------------------------------------------------------------
-!                1. Compute FRAC_ICE
-!
-IF (HFRAC_ICE=='T') THEN !using Temperature
-  PFRAC_ICE(:) = ( XTMAXMIX - PT(:) ) / ( XTMAXMIX - XTMINMIX ) ! freezing interval
-ELSEIF (HFRAC_ICE=='O') THEN !using Temperature with old formulae
-  PFRAC_ICE(:) = ( XTT - PT(:) ) / 40. ! freezing interval
-ELSEIF (HFRAC_ICE=='N') THEN !No ice
-  PFRAC_ICE(:) = 0.
-ELSEIF (HFRAC_ICE=='S') THEN !Same as previous
-  !nothing to do
-ELSE
-  call Print_msg(NVERB_FATAL,'GEN','COMPUTE_FRAC_ICE','invalid option for HFRAC_ICE='//HFRAC_ICE)
-ENDIF
-
-PFRAC_ICE(:) = MAX( 0., MIN(1., PFRAC_ICE(:) ) )
-
-
-END SUBROUTINE COMPUTE_FRAC_ICE1D
diff --git a/src/MNH/mf_turb_greyzone.f90 b/src/MNH/mf_turb_greyzone.f90
deleted file mode 100644
index ab28b6c61..000000000
--- a/src/MNH/mf_turb_greyzone.f90
+++ /dev/null
@@ -1,340 +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.
-!     ######spl
-     MODULE MODI_MF_TURB_GREYZONE
-!    ######################
-!
-INTERFACE
-!     #################################################################
-      SUBROUTINE MF_TURB_GREYZONE(KKA,KKB,KKE,KKU,KKL,OMIXUV,                  &
-                ONOMIXLG,KSV_LGBEG,KSV_LGEND,                         &
-                PIMPL, PTSTEP,                              &
-                PDZZ,                                                 &
-                PRHODJ,                                               &
-                PTHLM,PTHVM,PRTM,PUM,PVM,PSVM,                        &
-                PTHLDT,PRTDT,PUDT,PVDT,PSVDT,                         &
-                PEMF,PTHL_UP,PTHV_UP,PRT_UP,PU_UP,PV_UP,PSV_UP,       &
-                     PTHL_DO,PTHV_DO,PRT_DO,PU_DO,PV_DO,PSV_DO,       &
-                PFLXZTHMF,PFLXZTHVMF,PFLXZRMF,PFLXZUMF,PFLXZVMF,      &
-                PFLXZSVMF                                             )
-
-!     #################################################################
-!
-!               
-!*               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
-
-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,                   INTENT(IN)   :: PIMPL       ! degree of implicitness
-REAL,                 INTENT(IN)     ::  PTSTEP   ! Dynamical timestep 
-!
-REAL, DIMENSION(:,:), INTENT(IN)   :: PDZZ        ! metric coefficients
-
-REAL, DIMENSION(:,:), INTENT(IN)   ::  PRHODJ    ! dry density * Grid size
-
-!   Conservative var. at t-dt
-REAL, DIMENSION(:,:), INTENT(IN) ::  PTHLM       ! conservative pot. temp.
-REAL, DIMENSION(:,:), INTENT(IN) ::  PRTM         ! water var.  where 
-!  Virtual potential temperature at t-dt
-REAL, DIMENSION(:,:), INTENT(IN) ::  PTHVM 
-!  Momentum at t-dt
-REAL, DIMENSION(:,:), INTENT(IN) ::  PUM
-REAL, DIMENSION(:,:), INTENT(IN) ::  PVM
-!  scalar variables at t-dt
-REAL, DIMENSION(:,:,:), INTENT(IN) ::  PSVM
-!
-! Tendencies of conservative variables
-REAL, DIMENSION(:,:),   INTENT(OUT) ::  PTHLDT
-
-REAL, DIMENSION(:,:),   INTENT(OUT) ::  PRTDT 
-! Tendencies of momentum
-REAL, DIMENSION(:,:),   INTENT(OUT) ::  PUDT
-REAL, DIMENSION(:,:),   INTENT(OUT) ::  PVDT
-! Tendencies of scalar variables
-REAL, DIMENSION(:,:,:), INTENT(OUT) ::  PSVDT
-
-
-! Updraft characteritics
-REAL, DIMENSION(:,:), INTENT(IN)   ::  PEMF,PTHL_UP,PTHV_UP,PRT_UP,PU_UP,PV_UP
-REAL, DIMENSION(:,:), INTENT(IN)   ::       PTHL_DO,PTHV_DO,PRT_DO,PU_DO,PV_DO
-REAL, DIMENSION(:,:,:), INTENT(IN) ::  PSV_UP, PSV_DO
-! Fluxes
-REAL, DIMENSION(:,:), INTENT(OUT)  ::  PFLXZTHMF,PFLXZTHVMF,PFLXZRMF,PFLXZUMF,PFLXZVMF
-
-REAL, DIMENSION(:,:,:), INTENT(OUT)::  PFLXZSVMF
-
-END SUBROUTINE MF_TURB_GREYZONE
-
-END INTERFACE
-!
-END MODULE MODI_MF_TURB_GREYZONE
-!     #################################################################
-      SUBROUTINE MF_TURB_GREYZONE(KKA, KKB, KKE, KKU, KKL,OMIXUV,                  &
-                ONOMIXLG,KSV_LGBEG,KSV_LGEND,                         &
-                PIMPL, PTSTEP,                                        &
-                PDZZ,                                                 &
-                PRHODJ,                                               &
-                PTHLM,PTHVM,PRTM,PUM,PVM,PSVM,                        &
-                PTHLDT,PRTDT,PUDT,PVDT,PSVDT,                         &
-                PEMF,PTHL_UP,PTHV_UP,PRT_UP,PU_UP,PV_UP,PSV_UP,       &
-                     PTHL_DO,PTHV_DO,PRT_DO,PU_DO,PV_DO,PSV_DO,       &
-                PFLXZTHMF,PFLXZTHVMF,PFLXZRMF,PFLXZUMF,PFLXZVMF,      &
-                PFLXZSVMF                                             )
-
-!     #################################################################
-!
-!
-!!****  *MF_TURB_GREYZONE* - computes the MF_turbulent source terms for the prognostic
-!!                  variables. 
-!!
-!!    PURPOSE
-!!    -------
-!!****  The purpose of this routine is to compute the source terms in 
-!!    the evolution equations due to the MF turbulent mixing. 
-!!      The source term is computed as the divergence of the turbulent fluxes.
-!
-!!**  METHOD
-!!    ------
-!!    
-!!
-!!    EXTERNAL
-!!    --------
-!!
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!
-!!
-!!    REFERENCE
-!!    ---------
-!!
-!!    AUTHOR
-!!    ------
-!!     
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!  10/2009     (C.Lac)        Introduction of different PTSTEP according to the
-!!                              advection schemes
-!!  09/2010     (V.Masson)     Optimization
-!!     S. Riette Jan 2012: support for both order of vertical levels
-!!                         suppression of useless initialisations
-!!
-!! --------------------------------------------------------------------------
-!       
-!*      0. DECLARATIONS
-!          ------------
-!
-USE MODD_PARAM_MFSHALL_n
-!
-USE MODI_SHUMAN_MF
-USE MODI_TRIDIAG_MASSFLUX
-!
-IMPLICIT NONE
-!
-!
-!*      0.1  declarations 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
-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,                   INTENT(IN)   :: PIMPL       ! degree of implicitness
-REAL,                 INTENT(IN)     ::  PTSTEP   ! Dynamical timestep 
-!
-REAL, DIMENSION(:,:), INTENT(IN)   :: PDZZ        ! metric coefficients
-
-REAL, DIMENSION(:,:), INTENT(IN)   :: PRHODJ      ! dry density * Grid size
-
-!   Conservative var. at t-dt
-REAL, DIMENSION(:,:), INTENT(IN) ::  PTHLM        ! conservative pot. temp.
-REAL, DIMENSION(:,:), INTENT(IN) ::  PRTM         ! water var.  where 
-!  Virtual potential temperature at t-dt
-REAL, DIMENSION(:,:), INTENT(IN) ::  PTHVM 
-!  Momentum at t-dt
-REAL, DIMENSION(:,:), INTENT(IN) ::  PUM
-REAL, DIMENSION(:,:), INTENT(IN) ::  PVM
-!  scalar variables at t-dt
-REAL, DIMENSION(:,:,:), INTENT(IN) ::  PSVM
-!
-! Tendencies of conservative variables
-REAL, DIMENSION(:,:),   INTENT(OUT) ::  PTHLDT
-
-REAL, DIMENSION(:,:),   INTENT(OUT) ::  PRTDT 
-! Tendencies of momentum
-REAL, DIMENSION(:,:),   INTENT(OUT) ::  PUDT
-REAL, DIMENSION(:,:),   INTENT(OUT) ::  PVDT
-! Tendencies of scalar variables
-REAL, DIMENSION(:,:,:), INTENT(OUT) ::  PSVDT
-
-
-! Updraft/environment characteritics
-REAL, DIMENSION(:,:), INTENT(IN)   ::  PEMF,PTHL_UP,PTHV_UP,PRT_UP,PU_UP,PV_UP
-REAL, DIMENSION(:,:), INTENT(IN)   ::  PTHL_DO,PTHV_DO,PRT_DO,PU_DO,PV_DO
-REAL, DIMENSION(:,:,:), INTENT(IN) ::  PSV_UP,PSV_DO
-! Fluxes
-REAL, DIMENSION(:,:), INTENT(OUT)  ::  PFLXZTHMF,PFLXZTHVMF,PFLXZRMF,PFLXZUMF,PFLXZVMF
-
-REAL, DIMENSION(:,:,:), INTENT(OUT)::  PFLXZSVMF
-!
-!
-!
-!-------------------------------------------------------------------------------
-!
-!       0.2  declaration of local variables
-!
-
-REAL, DIMENSION(SIZE(PTHLM,1),SIZE(PTHLM,2)) :: ZVARS
-
-!
-INTEGER :: ISV,JSV          !number of scalar variables and Loop counter
-!
-!----------------------------------------------------------------------------
-!
-!*      1.PRELIMINARIES
-!         -------------
-!
-!
-! number of scalar var
-ISV=SIZE(PSVM,3)
-
-!
-PFLXZSVMF = 0.
-PSVDT = 0.
-
-!
-!----------------------------------------------------------------------------
-!
-!*      2. COMPUTE THE MEAN FLUX OF CONSERVATIVE VARIABLES at time t-dt
-!          (equation (3) of Soares et al)
-!          + THE MEAN FLUX OF THETA_V (buoyancy flux)
-!          -----------------------------------------------
-!   ( Resulting fluxes are in flux level (w-point) as PEMF and PTHL_UP )
-!
-! downdraft data are on the flux points
-PFLXZTHMF(:,:) = PEMF(:,:)*(PTHL_UP(:,:)-PTHL_DO(:,:))
-
-PFLXZRMF(:,:) =  PEMF(:,:)*(PRT_UP(:,:)-PRT_DO(:,:))
-
-PFLXZTHVMF(:,:) = PEMF(:,:)*(PTHV_UP(:,:)-PTHV_DO(:,:))
-
-IF (OMIXUV) THEN
-  PFLXZUMF(:,:) =  PEMF(:,:)*(PU_UP(:,:)-PU_DO(:,:))
-  PFLXZVMF(:,:) =  PEMF(:,:)*(PV_UP(:,:)-PV_DO(:,:))
-ELSE
-  PFLXZUMF(:,:) = 0.
-  PFLXZVMF(:,:) = 0.
-ENDIF
-!
-!
-!----------------------------------------------------------------------------
-!
-!*      3. COMPUTE TENDENCIES OF CONSERVATIVE VARIABLES (or treated as such...)
-!          (implicit formulation)
-!          --------------------------------------------
-!
-
-!
-!
-! 3.1 Compute the tendency for the conservative potential temperature
-!     (PDZZ and flux in w-point and PRHODJ is mass point, result in mass point)
-!
-CALL TRIDIAG_MASSFLUX(KKA,KKB,KKE,KKU,KKL,PTHLM,PFLXZTHMF,-PEMF,PTSTEP,PIMPL,  &
-                      PDZZ,PRHODJ,ZVARS )
-! compute new flux
-!!!!!!!!!!!!!!!!!!!!!!!!!!
-! Pourquoi on le recalcule ici alors qu'il n'est pas utilisé ailleurs
-! sauf pour l'écriture ?
-! Est ce que ZVARS est au point de masse pour qu'il doivent être remis au point
-! de flux ?
-!!!!!!!!!!!!!!!!!!!!!!!!!!
-PFLXZTHMF(:,:) = PEMF(:,:)*(PTHL_UP(:,:)-MZM_MF(KKA,KKU,KKL,ZVARS(:,:)))
-
-!!! compute THL tendency
-!
-PTHLDT(:,:)= (ZVARS(:,:)-PTHLM(:,:))/PTSTEP
-
-!
-! 3.2 Compute the tendency for the conservative mixing ratio
-!
-CALL TRIDIAG_MASSFLUX(KKA,KKB,KKE,KKU,KKL,PRTM(:,:),PFLXZRMF,-PEMF,PTSTEP,PIMPL,  &
-                                 PDZZ,PRHODJ,ZVARS )
-! compute new flux
-PFLXZRMF(:,:) =  PEMF(:,:)*(PRT_UP(:,:)-MZM_MF(KKA,KKU,KKL,ZVARS(:,:)))
-
-!!! compute RT tendency
-PRTDT(:,:) = (ZVARS(:,:)-PRTM(:,:))/PTSTEP
-!
-
-IF (OMIXUV) THEN
-  !
-  ! 3.3 Compute the tendency for the (non conservative but treated as it) zonal momentum
-  !     (PDZZ and flux in w-point and PRHODJ is mass point, result in mass point)
-  !
-
-  CALL TRIDIAG_MASSFLUX(KKA,KKB,KKE,KKU,KKL,PUM,PFLXZUMF,-PEMF,PTSTEP,PIMPL,  &
-                                 PDZZ,PRHODJ,ZVARS )
-  ! compute new flux
-  PFLXZUMF(:,:) = PEMF(:,:)*(PU_UP(:,:)-MZM_MF(KKA,KKU,KKL,ZVARS(:,:)))
-
-  ! compute U tendency
-  PUDT(:,:)= (ZVARS(:,:)-PUM(:,:))/PTSTEP
-
-  !
-  !
-  ! 3.4 Compute the tendency for the (non conservative but treated as it for the time beiing)
-  !                                  meridian momentum
-  !     (PDZZ and flux in w-point and PRHODJ is mass point, result in mass point)
-  !
-  CALL TRIDIAG_MASSFLUX(KKA,KKB,KKE,KKU,KKL,PVM,PFLXZVMF,-PEMF,PTSTEP,PIMPL,  &
-                                 PDZZ,PRHODJ,ZVARS )
-  ! compute new flux
-  PFLXZVMF(:,:) = PEMF(:,:)*(PV_UP(:,:)-MZM_MF(KKA,KKU,KKL,ZVARS(:,:)))
-
-  ! compute V tendency
-  PVDT(:,:)= (ZVARS(:,:)-PVM(:,:))/PTSTEP
-ELSE
-  PUDT(:,:)=0.
-  PVDT(:,:)=0.
-ENDIF
-
-DO JSV=1,ISV 
-
-  IF (ONOMIXLG .AND. JSV >= KSV_LGBEG .AND. JSV<= KSV_LGEND) CYCLE
-  
-  !*     compute mean flux of scalar variables at time t-dt
-  !   ( Resulting fluxes are in flux level (w-point) as PEMF and PTHL_UP )
-
-  PFLXZSVMF(:,:,JSV) = PEMF(:,:)*(PSV_UP(:,:,JSV)-MZM_MF(KKA,KKU,KKL,PSVM(:,:,JSV)))
-  
-  !
-  ! 3.5 Compute the tendency for scalar variables
-  !     (PDZZ and flux in w-point and PRHODJ is mass point, result in mass point)
-  !
-  CALL TRIDIAG_MASSFLUX(KKA,KKB,KKE,KKU,KKL,PSVM(:,:,JSV),PFLXZSVMF(:,:,JSV),&
-                        -PEMF,PTSTEP,PIMPL,PDZZ,PRHODJ,ZVARS )
-  ! compute new flux
-  PFLXZSVMF(:,:,JSV) = PEMF(:,:)*(PSV_UP(:,:,JSV)-MZM_MF(KKA,KKU,KKL,ZVARS))
-
-  ! compute Sv tendency
-  PSVDT(:,:,JSV)= (ZVARS(:,:)-PSVM(:,:,JSV))/PTSTEP
-
-ENDDO
-!
-END SUBROUTINE MF_TURB_GREYZONE    
diff --git a/src/MNH/th_r_from_thl_rt_1d.f90 b/src/MNH/th_r_from_thl_rt_1d.f90
deleted file mode 100644
index e4ba92f8a..000000000
--- a/src/MNH/th_r_from_thl_rt_1d.f90
+++ /dev/null
@@ -1,203 +0,0 @@
-!MNH_LIC Copyright 2006-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.
-!-----------------------------------------------------------------
-!     ######spl
-      MODULE MODI_TH_R_FROM_THL_RT_1D
-!     ###############################
-!
-      INTERFACE
-      SUBROUTINE TH_R_FROM_THL_RT_1D(HFRAC_ICE,PFRAC_ICE,PP,             &
-                                  PTHL, PRT, PTH, PRV, PRL, PRI,         &
-                                  PRSATW, PRSATI, PRR, PRS, PRG, PRH     )
-CHARACTER(len=1),   INTENT(IN)    :: HFRAC_ICE
-REAL, DIMENSION(:), INTENT(INOUT) :: PFRAC_ICE
-REAL, DIMENSION(:), INTENT(IN) :: PP     ! Pressure
-REAL, DIMENSION(:), INTENT(IN) :: PTHL   ! Liquid pot. temp.
-REAL, DIMENSION(:), INTENT(IN) :: PRT    ! Total mixing ratios 
-REAL, DIMENSION(:),OPTIONAL,INTENT(IN) :: PRR, PRS, PRG, PRH
-REAL, DIMENSION(:), INTENT(OUT):: PTH    ! Potential temp.
-REAL, DIMENSION(:), INTENT(OUT):: PRV    ! vapor mixing ratio
-REAL, DIMENSION(:), INTENT(INOUT):: PRL  ! cloud mixing ratio
-REAL, DIMENSION(:), INTENT(INOUT):: PRI  ! ice   mixing ratio
-REAL, DIMENSION(:), INTENT(OUT)  :: PRSATW ! estimated mixing ration at saturation over water
-REAL, DIMENSION(:), INTENT(OUT)  :: PRSATI ! estimated mixing ration at saturation over ice
-
-      END SUBROUTINE TH_R_FROM_THL_RT_1D
-      END INTERFACE
-      END MODULE MODI_TH_R_FROM_THL_RT_1D
-!     ######spl
-      SUBROUTINE TH_R_FROM_THL_RT_1D(HFRAC_ICE,PFRAC_ICE,PP,             &
-                                  PTHL, PRT, PTH, PRV, PRL, PRI,         &
-                                  PRSATW, PRSATI, PRR, PRS, PRG, PRH     )
-!     #################################################################
-!
-!
-!!****  *TH_R_FROM_THL_RT_1D* - computes the non-conservative variables
-!!                          from conservative variables
-!!
-!!    PURPOSE
-!!    -------
-!!
-!!**  METHOD
-!!    ------
-!!    
-!!
-!!    EXTERNAL
-!!    --------
-!!
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!
-!!
-!!    REFERENCE
-!!    ---------
-!!
-!!    AUTHOR
-!!    ------
-!!      Julien PERGAUD      * Meteo-France *
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original         13/03/06
-!!      S. Riette April 2011 : ice added, allow ZRLTEMP to be negative
-!!                             we use dQsat/dT to help convergence
-!!                             use of optional PRR, PRS, PRG, PRH
-!!      S. Riette Nov 2016: support for HFRAC_ICE='S'
-!!
-!! --------------------------------------------------------------------------
-!
-!*      0. DECLARATIONS
-!          ------------
-!
-USE MODI_COMPUTE_FRAC_ICE
-USE MODD_CST
-USE MODD_DYN_n, ONLY : LOCEAN
-USE MODE_THERMO
-!
-IMPLICIT NONE
-!
-!
-!*      0.1  declarations of arguments
-!
-CHARACTER(len=1),   INTENT(IN) :: HFRAC_ICE
-REAL, DIMENSION(:), INTENT(INOUT) :: PFRAC_ICE
-REAL, DIMENSION(:), INTENT(IN) :: PP          ! Pressure
-REAL, DIMENSION(:), INTENT(IN) :: PTHL    ! thetal to transform into th
-REAL, DIMENSION(:),INTENT(IN)  :: PRT    ! Total mixing ratios to transform into rv,rc and ri
-REAL, DIMENSION(:),OPTIONAL,INTENT(IN) :: PRR, PRS, PRG, PRH
-REAL, DIMENSION(:), INTENT(OUT):: PTH    ! th
-REAL, DIMENSION(:), INTENT(OUT):: PRV    ! vapor mixing ratio
-REAL, DIMENSION(:), INTENT(INOUT):: PRL    ! vapor mixing ratio
-REAL, DIMENSION(:), INTENT(INOUT):: PRI    ! vapor mixing ratio
-REAL, DIMENSION(:), INTENT(OUT)  :: PRSATW ! estimated mixing ration at saturation over water
-REAL, DIMENSION(:), INTENT(OUT)  :: PRSATI ! estimated mixing ration at saturation over ice
-!
-!-------------------------------------------------------------------------------
-!
-!       0.2  declaration of local variables
-INTEGER                       :: II ! Loop control
-INTEGER                       :: JITER ! number of iterations
-REAL, DIMENSION(SIZE(PTHL,1))   :: ZEXN
-REAL, DIMENSION(SIZE(PTHL,1)) :: ZRVSAT,ZCPH,ZRLTEMP,ZCPH2
-REAL, DIMENSION(SIZE(PTHL,1)) :: ZT,ZLVOCPEXN,ZLSOCPEXN
-REAL, DIMENSION(SIZE(PTHL,1)) :: ZDRSATODT,ZDRSATODTW,ZDRSATODTI
-REAL, DIMENSION(SIZE(PTHL,1)) :: ZFOESW, ZFOESI
-!----------------------------------------------------------------------------
-!
-!*      1 Initialisation
-!         --------------
-!
-!
-!
-!Number of iterations
-JITER=2
-!
-!Computation of ZCPH2 depending on dummy arguments received
-ZCPH2(:)=0
-IF(PRESENT(PRR)) ZCPH2(:)=ZCPH2(:) + XCL*PRR(:)
-IF(PRESENT(PRS)) ZCPH2(:)=ZCPH2(:) + XCI*PRS(:)
-IF(PRESENT(PRG)) ZCPH2(:)=ZCPH2(:) + XCI*PRG(:)
-IF(PRESENT(PRH)) ZCPH2(:)=ZCPH2(:) + XCI*PRH(:)
-!
-!Computation of an approximate state thanks to PRL and PRI guess
-ZEXN(:)=(PP(:)/XP00) ** (XRD/XCPD)
-ZT(:)=PTHL(:)*ZEXN(:)
-PRV(:)=PRT(:)-PRL(:)-PRI(:)
-ZCPH(:)=XCPD+ XCPV * PRV(:)+ XCL * PRL(:) + XCI * PRI(:) + ZCPH2(:)
-ZLVOCPEXN(:) = (XLVTT + (XCPV-XCL) * (ZT(:)-XTT)) &
-                        /(ZCPH(:)*ZEXN(:))
-ZLSOCPEXN(:) = (XLSTT + (XCPV-XCI) * (ZT(:)-XTT)) &
-                        /(ZCPH(:)*ZEXN(:))
-PTH(:)=PTHL(:)+ZLVOCPEXN(:)*PRL(:)+ZLSOCPEXN(:)*PRI(:)
-!
-!
-!       2 Iteration
-!         ---------
-
-DO II=1,JITER
-  IF (LOCEAN) THEN
-    ZT=PTH                  
-  ELSE
-    ZT(:)=PTH(:)*ZEXN(:)
-  END IF
-  !Computation of liquid/ice fractions
-  PFRAC_ICE(:) = 0.
-  WHERE(PRL(:)+PRI(:) > 1.E-20)
-    PFRAC_ICE(:) = PRI(:) / (PRL(:)+PRI(:))
-  ENDWHERE
-  CALL COMPUTE_FRAC_ICE(HFRAC_ICE,PFRAC_ICE(:),ZT(:))
-
-  !Computation of Rvsat and dRsat/dT
-  !In this version QSAT, QSATI, DQSAT and DQASATI functions are not used
-  !due to performance issue
-  ZFOESW(:) = MIN(EXP( XALPW - XBETAW/ZT(:) - XGAMW*LOG(ZT(:))  ), 0.99*PP(:))
-  ZFOESI(:) = MIN(EXP( XALPI - XBETAI/ZT(:) - XGAMI*LOG(ZT(:))  ), 0.99*PP(:))
-  PRSATW(:) = XRD/XRV*ZFOESW(:)/PP(:) / (1.+(XRD/XRV-1.)*ZFOESW(:)/PP(:))
-  PRSATI(:) = XRD/XRV*ZFOESI(:)/PP(:) / (1.+(XRD/XRV-1.)*ZFOESI(:)/PP(:))
-  ZDRSATODTW(:) = PRSATW(:) / (1.+(XRD/XRV-1.)*ZFOESW(:)/PP(:) ) &
-                   * (XBETAW/ZT(:)**2 - XGAMW/ZT(:))*(1+PRT(:))
-  ZDRSATODTI(:) = PRSATI(:) / (1.+(XRD/XRV-1.)*ZFOESI(:)/PP(:) ) &
-                   * (XBETAI/ZT(:)**2 - XGAMI/ZT(:))*(1+PRT(:))
-  !PRSATW(:) =  QSAT(ZT(:),PP(:)) !qsatw
-  !PRSATI(:) = QSATI(ZT(:),PP(:)) !qsati
-  !ZDRSATODTW(:) =  DQSAT(ZT(:),PP(:),PRSATW(:))*(1+PRT(:))
-  !ZDRSATODTI(:) = DQSATI(ZT(:),PP(:),PRSATI(:))*(1+PRT(:))
-  PRSATW(:) = PRSATW(:)*(1+PRT(:))
-  PRSATI(:) = PRSATI(:)*(1+PRT(:))
-  ZRVSAT(:) = PRSATW(:)*(1-PFRAC_ICE(:)) + PRSATI(:)*PFRAC_ICE(:)
-  ZDRSATODT(:) = (ZDRSATODTW(:)*(1-PFRAC_ICE(:))+ &
-            & ZDRSATODTI(:)*PFRAC_ICE(:))
-
-  !Computation of new PRL, PRI and PRV
-  !Correction term applied to (PRV(:)-ZRVSAT(:)) is computed assuming that
-  !ZLVOCPEXN, ZLSOCPEXN and ZCPH don't vary to much with T. It takes into account
-  !the variation (estimated linear) of Qsat with T
-  ZRLTEMP(:)=(PRV(:)-ZRVSAT(:))/ &
-                &(1 + ZDRSATODT(:)*ZEXN(:)* &
-                &     (ZLVOCPEXN(:)*(1-PFRAC_ICE(:))+ZLSOCPEXN(:)*PFRAC_ICE(:)))
-  ZRLTEMP(:)=MIN(MAX(-PRL(:)-PRI(:), ZRLTEMP(:)),PRV(:))
-  PRV(:)=PRV(:)-ZRLTEMP(:)
-  PRL(:)=PRL(:)+PRI(:)+ZRLTEMP(:)
-  PRI(:)=PFRAC_ICE(:)     * (PRL(:))
-  PRL(:)=(1-PFRAC_ICE(:)) * (PRT(:) - PRV(:))
-
-  !Computation of Cph (as defined in Meso-NH doc, equation 2.2, to be used with mixing ratios)
-  ZCPH(:)=XCPD+ XCPV * PRV(:)+ XCL * PRL(:) + XCI * PRI(:) + ZCPH2(:)
-
-  !Computation of L/Cph/EXN, then new PTH
-  ZLVOCPEXN(:) = (XLVTT + (XCPV-XCL) * (ZT(:)-XTT)) &
-                    /(ZCPH(:)*ZEXN(:))
-  ZLSOCPEXN(:) = (XLSTT + (XCPV-XCI) * (ZT(:)-XTT)) &
-                    /(ZCPH(:)*ZEXN(:))
-  PTH(:)=PTHL(:)+ZLVOCPEXN(:)*PRL(:)+ZLSOCPEXN(:)*PRI(:)
-
-  !Computation of estimated mixing ration at saturation
-  !To compute the adjustement a first order development was used
-  PRSATW(:)=PRSATW(:) + ZDRSATODTW(:)*(PTH(:)*ZEXN(:)-ZT(:))
-  PRSATI(:)=PRSATI(:) + ZDRSATODTI(:)*(PTH(:)*ZEXN(:)-ZT(:))
-ENDDO
-
-
-END SUBROUTINE TH_R_FROM_THL_RT_1D
diff --git a/src/MNH/th_r_from_thl_rt_2d.f90 b/src/MNH/th_r_from_thl_rt_2d.f90
deleted file mode 100644
index 356c9c191..000000000
--- a/src/MNH/th_r_from_thl_rt_2d.f90
+++ /dev/null
@@ -1,128 +0,0 @@
-!MNH_LIC Copyright 2006-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_TH_R_FROM_THL_RT_2D
-      INTERFACE
-      SUBROUTINE TH_R_FROM_THL_RT_2D(HFRAC_ICE,PFRAC_ICE,PP,             &
-                                  PTHL, PRT, PTH, PRV, PRL, PRI,         &
-                                  PRSATW, PRSATI, PRR, PRS, PRG, PRH     )
-CHARACTER(len=1),     INTENT(IN) :: HFRAC_ICE
-REAL, DIMENSION(:,:), INTENT(INOUT) :: PFRAC_ICE
-REAL, DIMENSION(:,:), INTENT(IN) :: PP          ! Pressure
-REAL, DIMENSION(:,:), INTENT(IN) :: PTHL    ! thetal to transform into th
-REAL, DIMENSION(:,:),INTENT(IN)  :: PRT    ! Total mixing ratios to transform into rv,rc and ri
-REAL, DIMENSION(:),OPTIONAL,INTENT(IN) :: PRR, PRS, PRG, PRH
-REAL, DIMENSION(:,:), INTENT(OUT):: PTH    ! th
-REAL, DIMENSION(:,:), INTENT(OUT):: PRV    ! vapor mixing ratio
-REAL, DIMENSION(:,:), INTENT(INOUT):: PRL    ! vapor mixing ratio
-REAL, DIMENSION(:,:), INTENT(INOUT):: PRI    ! vapor mixing ratio
-REAL, DIMENSION(:,:), INTENT(OUT)  :: PRSATW ! estimated mixing ration at saturation over water
-REAL, DIMENSION(:,:), INTENT(OUT)  :: PRSATI ! estimated mixing ration at saturation over ice
-
-      END SUBROUTINE TH_R_FROM_THL_RT_2D
-
-      END INTERFACE
-
-      END MODULE MODI_TH_R_FROM_THL_RT_2D
-
-!     ######spl
-      SUBROUTINE TH_R_FROM_THL_RT_2D(HFRAC_ICE,PFRAC_ICE,PP,             &
-                                  PTHL, PRT, PTH, PRV, PRL, PRI,         &
-                                  PRSATW, PRSATI, PRR, PRS, PRG, PRH     )
-!     #################################################################
-!
-!
-!!****  *TH_R_FROM_THL_RT_2D* - computes the non-conservative variables
-!!                          from conservative variables
-!!
-!!    PURPOSE
-!!    -------
-!!
-!!**  METHOD
-!!    ------
-!!    
-!!
-!!    EXTERNAL
-!!    --------
-!!
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!
-!!
-!!    REFERENCE
-!!    ---------
-!!
-!!    AUTHOR
-!!    ------
-!!      Julien PERGAUD      * Meteo-France *
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original         13/03/06
-!!      Sébastien Riette April 2011: code moved in th_r_from_thl_rt_3D
-!!
-!! --------------------------------------------------------------------------
-!       
-!*      0. DECLARATIONS
-!          ------------
-!
-!
-USE MODI_TH_R_FROM_THL_RT_3D
-
-IMPLICIT NONE
-!
-!
-!*      0.1  declarations of arguments
-!
-CHARACTER(len=1),     INTENT(IN) :: HFRAC_ICE
-REAL, DIMENSION(:,:), INTENT(INOUT) :: PFRAC_ICE
-REAL, DIMENSION(:,:), INTENT(IN) :: PP     ! Pressure
-REAL, DIMENSION(:,:), INTENT(IN) :: PTHL   ! Liquid pot. temp.
-REAL, DIMENSION(:,:), INTENT(IN) :: PRT    ! Total mixing ratios
-REAL, DIMENSION(:,:),OPTIONAL,INTENT(IN) :: PRR, PRS, PRG, PRH
-REAL, DIMENSION(:,:), INTENT(OUT):: PTH    ! Potential temp.
-REAL, DIMENSION(:,:), INTENT(OUT):: PRV    ! vapor mixing ratio
-REAL, DIMENSION(:,:), INTENT(INOUT):: PRL  ! cloud mixing ratio
-REAL, DIMENSION(:,:), INTENT(INOUT):: PRI  ! ice   mixing ratio
-REAL, DIMENSION(:,:), INTENT(OUT)  :: PRSATW ! estimated mixing ration at saturation over water
-REAL, DIMENSION(:,:), INTENT(OUT)  :: PRSATI ! estimated mixing ration at saturation over ice
-
-!
-!-------------------------------------------------------------------------------
-!
-!       0.2  declaration of local variables
-!
-!----------------------------------------------------------------------------
-!
-REAL, DIMENSION(SIZE(PP,1),SIZE(PP,2)) :: ZRR, ZRS, ZRG, ZRH
-INTEGER :: JK
-!----------------------------------------------------------------------------
-!
-!*      1 Initialisation
-!         --------------
-!
-ZRR(:,:)=0.
-ZRS(:,:)=0.
-ZRG(:,:)=0.
-ZRH(:,:)=0.
-IF(PRESENT(PRR)) ZRR(:,:)=PRR(:,:)
-IF(PRESENT(PRS)) ZRS(:,:)=PRS(:,:)
-IF(PRESENT(PRG)) ZRG(:,:)=PRG(:,:)
-IF(PRESENT(PRH)) ZRH(:,:)=PRH(:,:)
-!
-!
-!       2 Call of 1d version
-!         ------------------
-DO JK=1, SIZE(PTHL,2)
-  CALL TH_R_FROM_THL_RT_1D(HFRAC_ICE,PFRAC_ICE(:,JK),PP(:,JK),             &
-                                PTHL(:,JK), PRT(:,JK), PTH(:,JK),       &
-                                PRV(:,JK), PRL(:,JK), PRI(:,JK),        &
-                                PRSATW(:,JK), PRSATI(:,JK),                &
-                                ZRR(:,JK), ZRS(:,JK), ZRG(:,JK), ZRH(:,JK))
-ENDDO
-
-
-END SUBROUTINE TH_R_FROM_THL_RT_2D
diff --git a/src/MNH/th_r_from_thl_rt_3d.f90 b/src/MNH/th_r_from_thl_rt_3d.f90
deleted file mode 100644
index d58d98f4d..000000000
--- a/src/MNH/th_r_from_thl_rt_3d.f90
+++ /dev/null
@@ -1,126 +0,0 @@
-!MNH_LIC Copyright 2011-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_TH_R_FROM_THL_RT_3D
-!     ###############################
-INTERFACE
-!
-      SUBROUTINE TH_R_FROM_THL_RT_3D(HFRAC_ICE,PFRAC_ICE,PP,             &
-                                  PTHL, PRT, PTH, PRV, PRL, PRI, &
-                                  PRSATW, PRSATI, PRR, PRS, PRG, PRH       )
-
-CHARACTER(len=1),       INTENT(IN) :: HFRAC_ICE
-REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PFRAC_ICE
-REAL, DIMENSION(:,:,:), INTENT(IN) :: PP          ! Pressure
-REAL, DIMENSION(:,:,:), INTENT(IN) :: PTHL    ! thetal to transform into th
-REAL, DIMENSION(:,:,:),INTENT(IN)  :: PRT    ! Total mixing ratios to transform into rv,rc and ri
-REAL, DIMENSION(:,:,:),OPTIONAL,INTENT(IN) :: PRR, PRS, PRG, PRH
-REAL, DIMENSION(:,:,:), INTENT(OUT):: PTH    ! th
-REAL, DIMENSION(:,:,:), INTENT(OUT):: PRV    ! vapor mixing ratio
-REAL, DIMENSION(:,:,:), INTENT(INOUT):: PRL    ! vapor mixing ratio
-REAL, DIMENSION(:,:,:), INTENT(INOUT):: PRI    ! vapor mixing ratio
-REAL, DIMENSION(:,:,:), INTENT(OUT)  :: PRSATW ! estimated mixing ration at saturation over water
-REAL, DIMENSION(:,:,:), INTENT(OUT)  :: PRSATI ! estimated mixing ration at saturation over ice
-!
-END SUBROUTINE TH_R_FROM_THL_RT_3D
-!
-END INTERFACE
-!
-END MODULE MODI_TH_R_FROM_THL_RT_3D
-!     ######spl
-      SUBROUTINE TH_R_FROM_THL_RT_3D(HFRAC_ICE,PFRAC_ICE,PP,             &
-                                  PTHL, PRT, PTH, PRV, PRL, PRI, &
-                                  PRSATW, PRSATI, PRR, PRS, PRG, PRH       )
-!     #################################################################
-!
-!
-!!****  *TH_R_FROM_THL_RT_3D* - computes the non-conservative variables
-!!                          from conservative variables
-!!
-!!    PURPOSE
-!!    -------
-!!
-!!**  METHOD
-!!    ------
-!!
-!!
-!!    EXTERNAL
-!!    --------
-!!
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!
-!!
-!!    REFERENCE
-!!    ---------
-!!
-!!    AUTHOR
-!!    ------
-!!      Julien PERGAUD      * Meteo-France *
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original         15/03/2011
-!!      S. Riette April 2011 : code moved in th_r_from_thl_rt_1d
-!!
-!! --------------------------------------------------------------------------
-!
-!*      0. DECLARATIONS
-!          ------------
-!
-USE MODI_TH_R_FROM_THL_RT_1D
-!
-IMPLICIT NONE
-!
-!
-!*      0.1  declarations of arguments
-!
-CHARACTER(len=1),       INTENT(IN) :: HFRAC_ICE
-REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PFRAC_ICE
-REAL, DIMENSION(:,:,:), INTENT(IN) :: PP          ! Pressure
-REAL, DIMENSION(:,:,:), INTENT(IN) :: PTHL    ! thetal to transform into th
-REAL, DIMENSION(:,:,:),INTENT(IN)  :: PRT    ! Total mixing ratios to transform into rv,rc and ri
-REAL, DIMENSION(:,:,:),OPTIONAL,INTENT(IN) :: PRR, PRS, PRG, PRH
-REAL, DIMENSION(:,:,:), INTENT(OUT):: PTH    ! th
-REAL, DIMENSION(:,:,:), INTENT(OUT):: PRV    ! vapor mixing ratio
-REAL, DIMENSION(:,:,:), INTENT(INOUT):: PRL    ! vapor mixing ratio
-REAL, DIMENSION(:,:,:), INTENT(INOUT):: PRI    ! vapor mixing ratio
-REAL, DIMENSION(:,:,:), INTENT(OUT)  :: PRSATW ! estimated mixing ration at saturation over water
-REAL, DIMENSION(:,:,:), INTENT(OUT)  :: PRSATI ! estimated mixing ration at saturation over ice
-!
-!-------------------------------------------------------------------------------
-!
-!       0.2  declaration of local variables
-REAL, DIMENSION(SIZE(PTHL,1),SIZE(PTHL,2),SIZE(PTHL,3)) :: ZRR, ZRS, ZRG, ZRH
-INTEGER :: JJ, JK
-!----------------------------------------------------------------------------
-!
-!*      1 Initialisation
-!         --------------
-!
-ZRR(:,:,:)=0.
-ZRS(:,:,:)=0.
-ZRG(:,:,:)=0.
-ZRH(:,:,:)=0.
-IF(PRESENT(PRR)) ZRR(:,:,:)=PRR(:,:,:)
-IF(PRESENT(PRS)) ZRS(:,:,:)=PRS(:,:,:)
-IF(PRESENT(PRG)) ZRG(:,:,:)=PRG(:,:,:)
-IF(PRESENT(PRH)) ZRH(:,:,:)=PRH(:,:,:)
-!
-!
-!       2 Call of 1d version
-!         ------------------
-DO JK=1, SIZE(PTHL,3)
-  DO JJ=1, SIZE(PTHL,2)
-    CALL TH_R_FROM_THL_RT_1D(HFRAC_ICE,PFRAC_ICE(:,JJ,JK),PP(:,JJ,JK),             &
-                                  PTHL(:,JJ,JK), PRT(:,JJ,JK), PTH(:,JJ,JK),       &
-                                  PRV(:,JJ,JK), PRL(:,JJ,JK), PRI(:,JJ,JK),        &
-                                  PRSATW(:,JJ,JK), PRSATI(:,JJ,JK),                &
-                                  ZRR(:,JJ,JK), ZRS(:,JJ,JK), ZRG(:,JJ,JK), ZRH(:,JJ,JK))
-  ENDDO
-ENDDO
-
-END SUBROUTINE TH_R_FROM_THL_RT_3D
diff --git a/src/MNH/gamma.f90 b/src/PHYEX/aux/gamma.f90
similarity index 100%
rename from src/MNH/gamma.f90
rename to src/PHYEX/aux/gamma.f90
diff --git a/src/MNH/gamma_inc.f90 b/src/PHYEX/aux/gamma_inc.f90
similarity index 100%
rename from src/MNH/gamma_inc.f90
rename to src/PHYEX/aux/gamma_inc.f90
diff --git a/src/MNH/general_gamma.f90 b/src/PHYEX/aux/general_gamma.f90
similarity index 100%
rename from src/MNH/general_gamma.f90
rename to src/PHYEX/aux/general_gamma.f90
diff --git a/src/MNH/get_halo.f90 b/src/PHYEX/aux/get_halo.f90
similarity index 100%
rename from src/MNH/get_halo.f90
rename to src/PHYEX/aux/get_halo.f90
diff --git a/src/MNH/gradient_m.f90 b/src/PHYEX/aux/gradient_m.f90
similarity index 100%
rename from src/MNH/gradient_m.f90
rename to src/PHYEX/aux/gradient_m.f90
diff --git a/src/MNH/gradient_u.f90 b/src/PHYEX/aux/gradient_u.f90
similarity index 100%
rename from src/MNH/gradient_u.f90
rename to src/PHYEX/aux/gradient_u.f90
diff --git a/src/MNH/gradient_v.f90 b/src/PHYEX/aux/gradient_v.f90
similarity index 100%
rename from src/MNH/gradient_v.f90
rename to src/PHYEX/aux/gradient_v.f90
diff --git a/src/MNH/gradient_w.f90 b/src/PHYEX/aux/gradient_w.f90
similarity index 100%
rename from src/MNH/gradient_w.f90
rename to src/PHYEX/aux/gradient_w.f90
diff --git a/src/MNH/ini_cst.f90 b/src/PHYEX/aux/ini_cst.f90
similarity index 100%
rename from src/MNH/ini_cst.f90
rename to src/PHYEX/aux/ini_cst.f90
diff --git a/src/MNH/modd_budget.f90 b/src/PHYEX/aux/modd_budget.f90
similarity index 100%
rename from src/MNH/modd_budget.f90
rename to src/PHYEX/aux/modd_budget.f90
diff --git a/src/MNH/modd_conf.f90 b/src/PHYEX/aux/modd_conf.f90
similarity index 100%
rename from src/MNH/modd_conf.f90
rename to src/PHYEX/aux/modd_conf.f90
diff --git a/src/MNH/modd_cst.f90 b/src/PHYEX/aux/modd_cst.f90
similarity index 100%
rename from src/MNH/modd_cst.f90
rename to src/PHYEX/aux/modd_cst.f90
diff --git a/src/MNH/modd_les.f90 b/src/PHYEX/aux/modd_les.f90
similarity index 100%
rename from src/MNH/modd_les.f90
rename to src/PHYEX/aux/modd_les.f90
diff --git a/src/MNH/modd_lunit.f90 b/src/PHYEX/aux/modd_lunit.f90
similarity index 100%
rename from src/MNH/modd_lunit.f90
rename to src/PHYEX/aux/modd_lunit.f90
diff --git a/src/MNH/budget.f90 b/src/PHYEX/aux/mode_budget.f90
similarity index 100%
rename from src/MNH/budget.f90
rename to src/PHYEX/aux/mode_budget.f90
diff --git a/src/LIB/SURCOUCHE/src/mode_io_field_write.f90 b/src/PHYEX/aux/mode_io_field_write.f90
similarity index 100%
rename from src/LIB/SURCOUCHE/src/mode_io_field_write.f90
rename to src/PHYEX/aux/mode_io_field_write.f90
diff --git a/src/MNH/mode_thermo.f90 b/src/PHYEX/aux/mode_thermo.f90
similarity index 100%
rename from src/MNH/mode_thermo.f90
rename to src/PHYEX/aux/mode_thermo.f90
diff --git a/src/LIB/SURCOUCHE/src/mode_tools_ll.f90 b/src/PHYEX/aux/mode_tools_ll.f90
similarity index 100%
rename from src/LIB/SURCOUCHE/src/mode_tools_ll.f90
rename to src/PHYEX/aux/mode_tools_ll.f90
diff --git a/src/MNH/shuman.f90 b/src/PHYEX/aux/shuman.f90
similarity index 100%
rename from src/MNH/shuman.f90
rename to src/PHYEX/aux/shuman.f90
diff --git a/src/MNH/sources_neg_correct.f90 b/src/PHYEX/aux/sources_neg_correct.f90
similarity index 100%
rename from src/MNH/sources_neg_correct.f90
rename to src/PHYEX/aux/sources_neg_correct.f90
diff --git a/src/MNH/tools.f90 b/src/PHYEX/aux/tools.f90
similarity index 100%
rename from src/MNH/tools.f90
rename to src/PHYEX/aux/tools.f90
diff --git a/src/MNH/convect_chem_transport.f90 b/src/PHYEX/conv/convect_chem_transport.f90
similarity index 100%
rename from src/MNH/convect_chem_transport.f90
rename to src/PHYEX/conv/convect_chem_transport.f90
diff --git a/src/MNH/convect_closure.f90 b/src/PHYEX/conv/convect_closure.f90
similarity index 100%
rename from src/MNH/convect_closure.f90
rename to src/PHYEX/conv/convect_closure.f90
diff --git a/src/MNH/convect_closure_adjust.f90 b/src/PHYEX/conv/convect_closure_adjust.f90
similarity index 100%
rename from src/MNH/convect_closure_adjust.f90
rename to src/PHYEX/conv/convect_closure_adjust.f90
diff --git a/src/MNH/convect_closure_adjust_shal.f90 b/src/PHYEX/conv/convect_closure_adjust_shal.f90
similarity index 100%
rename from src/MNH/convect_closure_adjust_shal.f90
rename to src/PHYEX/conv/convect_closure_adjust_shal.f90
diff --git a/src/MNH/convect_closure_shal.f90 b/src/PHYEX/conv/convect_closure_shal.f90
similarity index 100%
rename from src/MNH/convect_closure_shal.f90
rename to src/PHYEX/conv/convect_closure_shal.f90
diff --git a/src/MNH/convect_closure_thrvlcl.f90 b/src/PHYEX/conv/convect_closure_thrvlcl.f90
similarity index 100%
rename from src/MNH/convect_closure_thrvlcl.f90
rename to src/PHYEX/conv/convect_closure_thrvlcl.f90
diff --git a/src/MNH/convect_condens.f90 b/src/PHYEX/conv/convect_condens.f90
similarity index 100%
rename from src/MNH/convect_condens.f90
rename to src/PHYEX/conv/convect_condens.f90
diff --git a/src/MNH/convect_downdraft.f90 b/src/PHYEX/conv/convect_downdraft.f90
similarity index 100%
rename from src/MNH/convect_downdraft.f90
rename to src/PHYEX/conv/convect_downdraft.f90
diff --git a/src/MNH/convect_mixing_funct.f90 b/src/PHYEX/conv/convect_mixing_funct.f90
similarity index 100%
rename from src/MNH/convect_mixing_funct.f90
rename to src/PHYEX/conv/convect_mixing_funct.f90
diff --git a/src/MNH/convect_precip_adjust.f90 b/src/PHYEX/conv/convect_precip_adjust.f90
similarity index 100%
rename from src/MNH/convect_precip_adjust.f90
rename to src/PHYEX/conv/convect_precip_adjust.f90
diff --git a/src/MNH/convect_satmixratio.f90 b/src/PHYEX/conv/convect_satmixratio.f90
similarity index 100%
rename from src/MNH/convect_satmixratio.f90
rename to src/PHYEX/conv/convect_satmixratio.f90
diff --git a/src/MNH/convect_trigger_funct.f90 b/src/PHYEX/conv/convect_trigger_funct.f90
similarity index 100%
rename from src/MNH/convect_trigger_funct.f90
rename to src/PHYEX/conv/convect_trigger_funct.f90
diff --git a/src/MNH/convect_trigger_shal.f90 b/src/PHYEX/conv/convect_trigger_shal.f90
similarity index 100%
rename from src/MNH/convect_trigger_shal.f90
rename to src/PHYEX/conv/convect_trigger_shal.f90
diff --git a/src/MNH/convect_tstep_pref.f90 b/src/PHYEX/conv/convect_tstep_pref.f90
similarity index 100%
rename from src/MNH/convect_tstep_pref.f90
rename to src/PHYEX/conv/convect_tstep_pref.f90
diff --git a/src/MNH/convect_updraft.f90 b/src/PHYEX/conv/convect_updraft.f90
similarity index 100%
rename from src/MNH/convect_updraft.f90
rename to src/PHYEX/conv/convect_updraft.f90
diff --git a/src/MNH/convect_updraft_shal.f90 b/src/PHYEX/conv/convect_updraft_shal.f90
similarity index 100%
rename from src/MNH/convect_updraft_shal.f90
rename to src/PHYEX/conv/convect_updraft_shal.f90
diff --git a/src/MNH/deep_convection.f90 b/src/PHYEX/conv/deep_convection.f90
similarity index 100%
rename from src/MNH/deep_convection.f90
rename to src/PHYEX/conv/deep_convection.f90
diff --git a/src/MNH/ini_convpar.f90 b/src/PHYEX/conv/ini_convpar.f90
similarity index 100%
rename from src/MNH/ini_convpar.f90
rename to src/PHYEX/conv/ini_convpar.f90
diff --git a/src/MNH/ini_convpar_e1.f90 b/src/PHYEX/conv/ini_convpar_e1.f90
similarity index 100%
rename from src/MNH/ini_convpar_e1.f90
rename to src/PHYEX/conv/ini_convpar_e1.f90
diff --git a/src/MNH/ini_convpar_shal.f90 b/src/PHYEX/conv/ini_convpar_shal.f90
similarity index 100%
rename from src/MNH/ini_convpar_shal.f90
rename to src/PHYEX/conv/ini_convpar_shal.f90
diff --git a/src/MNH/modd_convpar.f90 b/src/PHYEX/conv/modd_convpar.f90
similarity index 100%
rename from src/MNH/modd_convpar.f90
rename to src/PHYEX/conv/modd_convpar.f90
diff --git a/src/MNH/modd_convpar_shal.f90 b/src/PHYEX/conv/modd_convpar_shal.f90
similarity index 100%
rename from src/MNH/modd_convpar_shal.f90
rename to src/PHYEX/conv/modd_convpar_shal.f90
diff --git a/src/MNH/modd_convparext.f90 b/src/PHYEX/conv/modd_convparext.f90
similarity index 100%
rename from src/MNH/modd_convparext.f90
rename to src/PHYEX/conv/modd_convparext.f90
diff --git a/src/MNH/shallow_convection.f90 b/src/PHYEX/conv/shallow_convection.f90
similarity index 100%
rename from src/MNH/shallow_convection.f90
rename to src/PHYEX/conv/shallow_convection.f90
diff --git a/src/MNH/c2r2_adjust.f90 b/src/PHYEX/micro/c2r2_adjust.f90
similarity index 100%
rename from src/MNH/c2r2_adjust.f90
rename to src/PHYEX/micro/c2r2_adjust.f90
diff --git a/src/MNH/condensation.f90 b/src/PHYEX/micro/condensation.f90
similarity index 100%
rename from src/MNH/condensation.f90
rename to src/PHYEX/micro/condensation.f90
diff --git a/src/MNH/hypgeo.f90 b/src/PHYEX/micro/hypgeo.f90
similarity index 100%
rename from src/MNH/hypgeo.f90
rename to src/PHYEX/micro/hypgeo.f90
diff --git a/src/MNH/hypser.f90 b/src/PHYEX/micro/hypser.f90
similarity index 100%
rename from src/MNH/hypser.f90
rename to src/PHYEX/micro/hypser.f90
diff --git a/src/MNH/ice_adjust.f90 b/src/PHYEX/micro/ice_adjust.f90
similarity index 100%
rename from src/MNH/ice_adjust.f90
rename to src/PHYEX/micro/ice_adjust.f90
diff --git a/src/MNH/ice_adjust_elec.f90 b/src/PHYEX/micro/ice_adjust_elec.f90
similarity index 100%
rename from src/MNH/ice_adjust_elec.f90
rename to src/PHYEX/micro/ice_adjust_elec.f90
diff --git a/src/MNH/ini_ice_c1r3.f90 b/src/PHYEX/micro/ini_ice_c1r3.f90
similarity index 100%
rename from src/MNH/ini_ice_c1r3.f90
rename to src/PHYEX/micro/ini_ice_c1r3.f90
diff --git a/src/MNH/ini_lima.f90 b/src/PHYEX/micro/ini_lima.f90
similarity index 100%
rename from src/MNH/ini_lima.f90
rename to src/PHYEX/micro/ini_lima.f90
diff --git a/src/MNH/ini_lima_cold_mixed.f90 b/src/PHYEX/micro/ini_lima_cold_mixed.f90
similarity index 100%
rename from src/MNH/ini_lima_cold_mixed.f90
rename to src/PHYEX/micro/ini_lima_cold_mixed.f90
diff --git a/src/MNH/ini_lima_warm.f90 b/src/PHYEX/micro/ini_lima_warm.f90
similarity index 100%
rename from src/MNH/ini_lima_warm.f90
rename to src/PHYEX/micro/ini_lima_warm.f90
diff --git a/src/MNH/ini_neb.f90 b/src/PHYEX/micro/ini_neb.f90
similarity index 100%
rename from src/MNH/ini_neb.f90
rename to src/PHYEX/micro/ini_neb.f90
diff --git a/src/MNH/ini_param_elec.f90 b/src/PHYEX/micro/ini_param_elec.f90
similarity index 100%
rename from src/MNH/ini_param_elec.f90
rename to src/PHYEX/micro/ini_param_elec.f90
diff --git a/src/MNH/ini_rain_c2r2.f90 b/src/PHYEX/micro/ini_rain_c2r2.f90
similarity index 100%
rename from src/MNH/ini_rain_c2r2.f90
rename to src/PHYEX/micro/ini_rain_c2r2.f90
diff --git a/src/MNH/ini_rain_ice.f90 b/src/PHYEX/micro/ini_rain_ice.f90
similarity index 100%
rename from src/MNH/ini_rain_ice.f90
rename to src/PHYEX/micro/ini_rain_ice.f90
diff --git a/src/MNH/ini_rain_ice_elec.f90 b/src/PHYEX/micro/ini_rain_ice_elec.f90
similarity index 100%
rename from src/MNH/ini_rain_ice_elec.f90
rename to src/PHYEX/micro/ini_rain_ice_elec.f90
diff --git a/src/MNH/init_aerosol_properties.f90 b/src/PHYEX/micro/init_aerosol_properties.f90
similarity index 100%
rename from src/MNH/init_aerosol_properties.f90
rename to src/PHYEX/micro/init_aerosol_properties.f90
diff --git a/src/MNH/lima.f90 b/src/PHYEX/micro/lima.f90
similarity index 100%
rename from src/MNH/lima.f90
rename to src/PHYEX/micro/lima.f90
diff --git a/src/MNH/lima_adjust.f90 b/src/PHYEX/micro/lima_adjust.f90
similarity index 100%
rename from src/MNH/lima_adjust.f90
rename to src/PHYEX/micro/lima_adjust.f90
diff --git a/src/MNH/lima_adjust_split.f90 b/src/PHYEX/micro/lima_adjust_split.f90
similarity index 100%
rename from src/MNH/lima_adjust_split.f90
rename to src/PHYEX/micro/lima_adjust_split.f90
diff --git a/src/MNH/lima_bergeron.f90 b/src/PHYEX/micro/lima_bergeron.f90
similarity index 100%
rename from src/MNH/lima_bergeron.f90
rename to src/PHYEX/micro/lima_bergeron.f90
diff --git a/src/MNH/lima_ccn_activation.f90 b/src/PHYEX/micro/lima_ccn_activation.f90
similarity index 100%
rename from src/MNH/lima_ccn_activation.f90
rename to src/PHYEX/micro/lima_ccn_activation.f90
diff --git a/src/MNH/lima_ccn_hom_freezing.f90 b/src/PHYEX/micro/lima_ccn_hom_freezing.f90
similarity index 100%
rename from src/MNH/lima_ccn_hom_freezing.f90
rename to src/PHYEX/micro/lima_ccn_hom_freezing.f90
diff --git a/src/MNH/lima_cold.f90 b/src/PHYEX/micro/lima_cold.f90
similarity index 100%
rename from src/MNH/lima_cold.f90
rename to src/PHYEX/micro/lima_cold.f90
diff --git a/src/MNH/lima_cold_hom_nucl.f90 b/src/PHYEX/micro/lima_cold_hom_nucl.f90
similarity index 100%
rename from src/MNH/lima_cold_hom_nucl.f90
rename to src/PHYEX/micro/lima_cold_hom_nucl.f90
diff --git a/src/MNH/lima_cold_sedimentation.f90 b/src/PHYEX/micro/lima_cold_sedimentation.f90
similarity index 100%
rename from src/MNH/lima_cold_sedimentation.f90
rename to src/PHYEX/micro/lima_cold_sedimentation.f90
diff --git a/src/MNH/lima_cold_slow_processes.f90 b/src/PHYEX/micro/lima_cold_slow_processes.f90
similarity index 100%
rename from src/MNH/lima_cold_slow_processes.f90
rename to src/PHYEX/micro/lima_cold_slow_processes.f90
diff --git a/src/MNH/lima_collisional_ice_breakup.f90 b/src/PHYEX/micro/lima_collisional_ice_breakup.f90
similarity index 100%
rename from src/MNH/lima_collisional_ice_breakup.f90
rename to src/PHYEX/micro/lima_collisional_ice_breakup.f90
diff --git a/src/MNH/lima_compute_cloud_fractions.f90 b/src/PHYEX/micro/lima_compute_cloud_fractions.f90
similarity index 100%
rename from src/MNH/lima_compute_cloud_fractions.f90
rename to src/PHYEX/micro/lima_compute_cloud_fractions.f90
diff --git a/src/MNH/lima_conversion_melting_snow.f90 b/src/PHYEX/micro/lima_conversion_melting_snow.f90
similarity index 100%
rename from src/MNH/lima_conversion_melting_snow.f90
rename to src/PHYEX/micro/lima_conversion_melting_snow.f90
diff --git a/src/MNH/lima_droplets_accretion.f90 b/src/PHYEX/micro/lima_droplets_accretion.f90
similarity index 100%
rename from src/MNH/lima_droplets_accretion.f90
rename to src/PHYEX/micro/lima_droplets_accretion.f90
diff --git a/src/MNH/lima_droplets_autoconversion.f90 b/src/PHYEX/micro/lima_droplets_autoconversion.f90
similarity index 100%
rename from src/MNH/lima_droplets_autoconversion.f90
rename to src/PHYEX/micro/lima_droplets_autoconversion.f90
diff --git a/src/MNH/lima_droplets_hom_freezing.f90 b/src/PHYEX/micro/lima_droplets_hom_freezing.f90
similarity index 100%
rename from src/MNH/lima_droplets_hom_freezing.f90
rename to src/PHYEX/micro/lima_droplets_hom_freezing.f90
diff --git a/src/MNH/lima_droplets_riming_snow.f90 b/src/PHYEX/micro/lima_droplets_riming_snow.f90
similarity index 100%
rename from src/MNH/lima_droplets_riming_snow.f90
rename to src/PHYEX/micro/lima_droplets_riming_snow.f90
diff --git a/src/MNH/lima_droplets_self_collection.f90 b/src/PHYEX/micro/lima_droplets_self_collection.f90
similarity index 100%
rename from src/MNH/lima_droplets_self_collection.f90
rename to src/PHYEX/micro/lima_droplets_self_collection.f90
diff --git a/src/MNH/lima_drops_break_up.f90 b/src/PHYEX/micro/lima_drops_break_up.f90
similarity index 100%
rename from src/MNH/lima_drops_break_up.f90
rename to src/PHYEX/micro/lima_drops_break_up.f90
diff --git a/src/MNH/lima_drops_hom_freezing.f90 b/src/PHYEX/micro/lima_drops_hom_freezing.f90
similarity index 100%
rename from src/MNH/lima_drops_hom_freezing.f90
rename to src/PHYEX/micro/lima_drops_hom_freezing.f90
diff --git a/src/MNH/lima_drops_self_collection.f90 b/src/PHYEX/micro/lima_drops_self_collection.f90
similarity index 100%
rename from src/MNH/lima_drops_self_collection.f90
rename to src/PHYEX/micro/lima_drops_self_collection.f90
diff --git a/src/MNH/lima_drops_to_droplets_conv.f90 b/src/PHYEX/micro/lima_drops_to_droplets_conv.f90
similarity index 100%
rename from src/MNH/lima_drops_to_droplets_conv.f90
rename to src/PHYEX/micro/lima_drops_to_droplets_conv.f90
diff --git a/src/MNH/lima_functions.f90 b/src/PHYEX/micro/lima_functions.f90
similarity index 100%
rename from src/MNH/lima_functions.f90
rename to src/PHYEX/micro/lima_functions.f90
diff --git a/src/MNH/lima_graupel.f90 b/src/PHYEX/micro/lima_graupel.f90
similarity index 100%
rename from src/MNH/lima_graupel.f90
rename to src/PHYEX/micro/lima_graupel.f90
diff --git a/src/MNH/lima_graupel_deposition.f90 b/src/PHYEX/micro/lima_graupel_deposition.f90
similarity index 100%
rename from src/MNH/lima_graupel_deposition.f90
rename to src/PHYEX/micro/lima_graupel_deposition.f90
diff --git a/src/MNH/lima_hail.f90 b/src/PHYEX/micro/lima_hail.f90
similarity index 100%
rename from src/MNH/lima_hail.f90
rename to src/PHYEX/micro/lima_hail.f90
diff --git a/src/MNH/lima_hail_deposition.f90 b/src/PHYEX/micro/lima_hail_deposition.f90
similarity index 100%
rename from src/MNH/lima_hail_deposition.f90
rename to src/PHYEX/micro/lima_hail_deposition.f90
diff --git a/src/MNH/lima_ice_aggregation_snow.f90 b/src/PHYEX/micro/lima_ice_aggregation_snow.f90
similarity index 100%
rename from src/MNH/lima_ice_aggregation_snow.f90
rename to src/PHYEX/micro/lima_ice_aggregation_snow.f90
diff --git a/src/MNH/lima_ice_deposition.f90 b/src/PHYEX/micro/lima_ice_deposition.f90
similarity index 100%
rename from src/MNH/lima_ice_deposition.f90
rename to src/PHYEX/micro/lima_ice_deposition.f90
diff --git a/src/MNH/lima_ice_melting.f90 b/src/PHYEX/micro/lima_ice_melting.f90
similarity index 100%
rename from src/MNH/lima_ice_melting.f90
rename to src/PHYEX/micro/lima_ice_melting.f90
diff --git a/src/MNH/lima_init_ccn_activation_spectrum.f90 b/src/PHYEX/micro/lima_init_ccn_activation_spectrum.f90
similarity index 100%
rename from src/MNH/lima_init_ccn_activation_spectrum.f90
rename to src/PHYEX/micro/lima_init_ccn_activation_spectrum.f90
diff --git a/src/MNH/lima_inst_procs.f90 b/src/PHYEX/micro/lima_inst_procs.f90
similarity index 100%
rename from src/MNH/lima_inst_procs.f90
rename to src/PHYEX/micro/lima_inst_procs.f90
diff --git a/src/MNH/lima_meyers.f90 b/src/PHYEX/micro/lima_meyers.f90
similarity index 100%
rename from src/MNH/lima_meyers.f90
rename to src/PHYEX/micro/lima_meyers.f90
diff --git a/src/MNH/lima_meyers_nucleation.f90 b/src/PHYEX/micro/lima_meyers_nucleation.f90
similarity index 100%
rename from src/MNH/lima_meyers_nucleation.f90
rename to src/PHYEX/micro/lima_meyers_nucleation.f90
diff --git a/src/MNH/lima_mixed.f90 b/src/PHYEX/micro/lima_mixed.f90
similarity index 100%
rename from src/MNH/lima_mixed.f90
rename to src/PHYEX/micro/lima_mixed.f90
diff --git a/src/MNH/lima_mixed_fast_processes.f90 b/src/PHYEX/micro/lima_mixed_fast_processes.f90
similarity index 100%
rename from src/MNH/lima_mixed_fast_processes.f90
rename to src/PHYEX/micro/lima_mixed_fast_processes.f90
diff --git a/src/MNH/lima_mixed_slow_processes.f90 b/src/PHYEX/micro/lima_mixed_slow_processes.f90
similarity index 100%
rename from src/MNH/lima_mixed_slow_processes.f90
rename to src/PHYEX/micro/lima_mixed_slow_processes.f90
diff --git a/src/MNH/lima_mixrat_to_nconc.f90 b/src/PHYEX/micro/lima_mixrat_to_nconc.f90
similarity index 100%
rename from src/MNH/lima_mixrat_to_nconc.f90
rename to src/PHYEX/micro/lima_mixrat_to_nconc.f90
diff --git a/src/MNH/lima_notadjust.f90 b/src/PHYEX/micro/lima_notadjust.f90
similarity index 100%
rename from src/MNH/lima_notadjust.f90
rename to src/PHYEX/micro/lima_notadjust.f90
diff --git a/src/MNH/lima_nucleation_procs.f90 b/src/PHYEX/micro/lima_nucleation_procs.f90
similarity index 100%
rename from src/MNH/lima_nucleation_procs.f90
rename to src/PHYEX/micro/lima_nucleation_procs.f90
diff --git a/src/MNH/lima_phillips.f90 b/src/PHYEX/micro/lima_phillips.f90
similarity index 100%
rename from src/MNH/lima_phillips.f90
rename to src/PHYEX/micro/lima_phillips.f90
diff --git a/src/MNH/lima_phillips_ifn_nucleation.f90 b/src/PHYEX/micro/lima_phillips_ifn_nucleation.f90
similarity index 100%
rename from src/MNH/lima_phillips_ifn_nucleation.f90
rename to src/PHYEX/micro/lima_phillips_ifn_nucleation.f90
diff --git a/src/MNH/lima_phillips_integ.f90 b/src/PHYEX/micro/lima_phillips_integ.f90
similarity index 100%
rename from src/MNH/lima_phillips_integ.f90
rename to src/PHYEX/micro/lima_phillips_integ.f90
diff --git a/src/MNH/lima_phillips_ref_spectrum.f90 b/src/PHYEX/micro/lima_phillips_ref_spectrum.f90
similarity index 100%
rename from src/MNH/lima_phillips_ref_spectrum.f90
rename to src/PHYEX/micro/lima_phillips_ref_spectrum.f90
diff --git a/src/MNH/lima_precip_scavenging.f90 b/src/PHYEX/micro/lima_precip_scavenging.f90
similarity index 100%
rename from src/MNH/lima_precip_scavenging.f90
rename to src/PHYEX/micro/lima_precip_scavenging.f90
diff --git a/src/MNH/lima_rain_accr_snow.f90 b/src/PHYEX/micro/lima_rain_accr_snow.f90
similarity index 100%
rename from src/MNH/lima_rain_accr_snow.f90
rename to src/PHYEX/micro/lima_rain_accr_snow.f90
diff --git a/src/MNH/lima_rain_evaporation.f90 b/src/PHYEX/micro/lima_rain_evaporation.f90
similarity index 100%
rename from src/MNH/lima_rain_evaporation.f90
rename to src/PHYEX/micro/lima_rain_evaporation.f90
diff --git a/src/MNH/lima_rain_freezing.f90 b/src/PHYEX/micro/lima_rain_freezing.f90
similarity index 100%
rename from src/MNH/lima_rain_freezing.f90
rename to src/PHYEX/micro/lima_rain_freezing.f90
diff --git a/src/MNH/lima_raindrop_shattering_freezing.f90 b/src/PHYEX/micro/lima_raindrop_shattering_freezing.f90
similarity index 100%
rename from src/MNH/lima_raindrop_shattering_freezing.f90
rename to src/PHYEX/micro/lima_raindrop_shattering_freezing.f90
diff --git a/src/MNH/lima_read_xker_gweth.f90 b/src/PHYEX/micro/lima_read_xker_gweth.f90
similarity index 100%
rename from src/MNH/lima_read_xker_gweth.f90
rename to src/PHYEX/micro/lima_read_xker_gweth.f90
diff --git a/src/MNH/lima_read_xker_raccs.f90 b/src/PHYEX/micro/lima_read_xker_raccs.f90
similarity index 100%
rename from src/MNH/lima_read_xker_raccs.f90
rename to src/PHYEX/micro/lima_read_xker_raccs.f90
diff --git a/src/MNH/lima_read_xker_rdryg.f90 b/src/PHYEX/micro/lima_read_xker_rdryg.f90
similarity index 100%
rename from src/MNH/lima_read_xker_rdryg.f90
rename to src/PHYEX/micro/lima_read_xker_rdryg.f90
diff --git a/src/MNH/lima_read_xker_sdryg.f90 b/src/PHYEX/micro/lima_read_xker_sdryg.f90
similarity index 100%
rename from src/MNH/lima_read_xker_sdryg.f90
rename to src/PHYEX/micro/lima_read_xker_sdryg.f90
diff --git a/src/MNH/lima_read_xker_sweth.f90 b/src/PHYEX/micro/lima_read_xker_sweth.f90
similarity index 100%
rename from src/MNH/lima_read_xker_sweth.f90
rename to src/PHYEX/micro/lima_read_xker_sweth.f90
diff --git a/src/MNH/lima_sedimentation.f90 b/src/PHYEX/micro/lima_sedimentation.f90
similarity index 100%
rename from src/MNH/lima_sedimentation.f90
rename to src/PHYEX/micro/lima_sedimentation.f90
diff --git a/src/MNH/lima_snow_deposition.f90 b/src/PHYEX/micro/lima_snow_deposition.f90
similarity index 100%
rename from src/MNH/lima_snow_deposition.f90
rename to src/PHYEX/micro/lima_snow_deposition.f90
diff --git a/src/MNH/lima_snow_self_collection.f90 b/src/PHYEX/micro/lima_snow_self_collection.f90
similarity index 100%
rename from src/MNH/lima_snow_self_collection.f90
rename to src/PHYEX/micro/lima_snow_self_collection.f90
diff --git a/src/MNH/lima_tendencies.f90 b/src/PHYEX/micro/lima_tendencies.f90
similarity index 100%
rename from src/MNH/lima_tendencies.f90
rename to src/PHYEX/micro/lima_tendencies.f90
diff --git a/src/MNH/lima_warm.f90 b/src/PHYEX/micro/lima_warm.f90
similarity index 100%
rename from src/MNH/lima_warm.f90
rename to src/PHYEX/micro/lima_warm.f90
diff --git a/src/MNH/lima_warm_coal.f90 b/src/PHYEX/micro/lima_warm_coal.f90
similarity index 100%
rename from src/MNH/lima_warm_coal.f90
rename to src/PHYEX/micro/lima_warm_coal.f90
diff --git a/src/MNH/lima_warm_evap.f90 b/src/PHYEX/micro/lima_warm_evap.f90
similarity index 100%
rename from src/MNH/lima_warm_evap.f90
rename to src/PHYEX/micro/lima_warm_evap.f90
diff --git a/src/MNH/lima_warm_nucl.f90 b/src/PHYEX/micro/lima_warm_nucl.f90
similarity index 100%
rename from src/MNH/lima_warm_nucl.f90
rename to src/PHYEX/micro/lima_warm_nucl.f90
diff --git a/src/MNH/lima_warm_sedimentation.f90 b/src/PHYEX/micro/lima_warm_sedimentation.f90
similarity index 100%
rename from src/MNH/lima_warm_sedimentation.f90
rename to src/PHYEX/micro/lima_warm_sedimentation.f90
diff --git a/src/MNH/modd_elec_descr.f90 b/src/PHYEX/micro/modd_elec_descr.f90
similarity index 100%
rename from src/MNH/modd_elec_descr.f90
rename to src/PHYEX/micro/modd_elec_descr.f90
diff --git a/src/MNH/modd_lima_precip_scavengingn.f90 b/src/PHYEX/micro/modd_lima_precip_scavengingn.f90
similarity index 100%
rename from src/MNH/modd_lima_precip_scavengingn.f90
rename to src/PHYEX/micro/modd_lima_precip_scavengingn.f90
diff --git a/src/MNH/modd_neb.f90 b/src/PHYEX/micro/modd_neb.f90
similarity index 100%
rename from src/MNH/modd_neb.f90
rename to src/PHYEX/micro/modd_neb.f90
diff --git a/src/MNH/modd_param_c1r3.f90 b/src/PHYEX/micro/modd_param_c1r3.f90
similarity index 100%
rename from src/MNH/modd_param_c1r3.f90
rename to src/PHYEX/micro/modd_param_c1r3.f90
diff --git a/src/MNH/modd_param_c2r2.f90 b/src/PHYEX/micro/modd_param_c2r2.f90
similarity index 100%
rename from src/MNH/modd_param_c2r2.f90
rename to src/PHYEX/micro/modd_param_c2r2.f90
diff --git a/src/MNH/modd_param_ice.f90 b/src/PHYEX/micro/modd_param_ice.f90
similarity index 100%
rename from src/MNH/modd_param_ice.f90
rename to src/PHYEX/micro/modd_param_ice.f90
diff --git a/src/MNH/modd_param_lima.f90 b/src/PHYEX/micro/modd_param_lima.f90
similarity index 100%
rename from src/MNH/modd_param_lima.f90
rename to src/PHYEX/micro/modd_param_lima.f90
diff --git a/src/MNH/modd_param_lima_cold.f90 b/src/PHYEX/micro/modd_param_lima_cold.f90
similarity index 100%
rename from src/MNH/modd_param_lima_cold.f90
rename to src/PHYEX/micro/modd_param_lima_cold.f90
diff --git a/src/MNH/modd_param_lima_mixed.f90 b/src/PHYEX/micro/modd_param_lima_mixed.f90
similarity index 100%
rename from src/MNH/modd_param_lima_mixed.f90
rename to src/PHYEX/micro/modd_param_lima_mixed.f90
diff --git a/src/MNH/modd_param_lima_warm.f90 b/src/PHYEX/micro/modd_param_lima_warm.f90
similarity index 100%
rename from src/MNH/modd_param_lima_warm.f90
rename to src/PHYEX/micro/modd_param_lima_warm.f90
diff --git a/src/MNH/modd_rain_c2r2_descr.f90 b/src/PHYEX/micro/modd_rain_c2r2_descr.f90
similarity index 100%
rename from src/MNH/modd_rain_c2r2_descr.f90
rename to src/PHYEX/micro/modd_rain_c2r2_descr.f90
diff --git a/src/MNH/modd_rain_c2r2_khko_param.f90 b/src/PHYEX/micro/modd_rain_c2r2_khko_param.f90
similarity index 100%
rename from src/MNH/modd_rain_c2r2_khko_param.f90
rename to src/PHYEX/micro/modd_rain_c2r2_khko_param.f90
diff --git a/src/MNH/modd_rain_ice_descr.f90 b/src/PHYEX/micro/modd_rain_ice_descr.f90
similarity index 100%
rename from src/MNH/modd_rain_ice_descr.f90
rename to src/PHYEX/micro/modd_rain_ice_descr.f90
diff --git a/src/MNH/modd_rain_ice_param.f90 b/src/PHYEX/micro/modd_rain_ice_param.f90
similarity index 100%
rename from src/MNH/modd_rain_ice_param.f90
rename to src/PHYEX/micro/modd_rain_ice_param.f90
diff --git a/src/MNH/ice4_compute_pdf.f90 b/src/PHYEX/micro/mode_ice4_compute_pdf.f90
similarity index 100%
rename from src/MNH/ice4_compute_pdf.f90
rename to src/PHYEX/micro/mode_ice4_compute_pdf.f90
diff --git a/src/MNH/ice4_fast_rg.f90 b/src/PHYEX/micro/mode_ice4_fast_rg.f90
similarity index 100%
rename from src/MNH/ice4_fast_rg.f90
rename to src/PHYEX/micro/mode_ice4_fast_rg.f90
diff --git a/src/MNH/ice4_fast_rh.f90 b/src/PHYEX/micro/mode_ice4_fast_rh.f90
similarity index 100%
rename from src/MNH/ice4_fast_rh.f90
rename to src/PHYEX/micro/mode_ice4_fast_rh.f90
diff --git a/src/MNH/ice4_fast_ri.f90 b/src/PHYEX/micro/mode_ice4_fast_ri.f90
similarity index 100%
rename from src/MNH/ice4_fast_ri.f90
rename to src/PHYEX/micro/mode_ice4_fast_ri.f90
diff --git a/src/MNH/ice4_fast_rs.f90 b/src/PHYEX/micro/mode_ice4_fast_rs.f90
similarity index 100%
rename from src/MNH/ice4_fast_rs.f90
rename to src/PHYEX/micro/mode_ice4_fast_rs.f90
diff --git a/src/MNH/ice4_nucleation.f90 b/src/PHYEX/micro/mode_ice4_nucleation.f90
similarity index 100%
rename from src/MNH/ice4_nucleation.f90
rename to src/PHYEX/micro/mode_ice4_nucleation.f90
diff --git a/src/MNH/ice4_rainfr_vert.f90 b/src/PHYEX/micro/mode_ice4_rainfr_vert.f90
similarity index 100%
rename from src/MNH/ice4_rainfr_vert.f90
rename to src/PHYEX/micro/mode_ice4_rainfr_vert.f90
diff --git a/src/MNH/ice4_rimltc.f90 b/src/PHYEX/micro/mode_ice4_rimltc.f90
similarity index 100%
rename from src/MNH/ice4_rimltc.f90
rename to src/PHYEX/micro/mode_ice4_rimltc.f90
diff --git a/src/MNH/ice4_rrhong.f90 b/src/PHYEX/micro/mode_ice4_rrhong.f90
similarity index 100%
rename from src/MNH/ice4_rrhong.f90
rename to src/PHYEX/micro/mode_ice4_rrhong.f90
diff --git a/src/MNH/ice4_rsrimcg_old.f90 b/src/PHYEX/micro/mode_ice4_rsrimcg_old.f90
similarity index 100%
rename from src/MNH/ice4_rsrimcg_old.f90
rename to src/PHYEX/micro/mode_ice4_rsrimcg_old.f90
diff --git a/src/MNH/ice4_sedimentation_split.f90 b/src/PHYEX/micro/mode_ice4_sedimentation_split.f90
similarity index 100%
rename from src/MNH/ice4_sedimentation_split.f90
rename to src/PHYEX/micro/mode_ice4_sedimentation_split.f90
diff --git a/src/MNH/ice4_sedimentation_split_momentum.f90 b/src/PHYEX/micro/mode_ice4_sedimentation_split_momentum.f90
similarity index 100%
rename from src/MNH/ice4_sedimentation_split_momentum.f90
rename to src/PHYEX/micro/mode_ice4_sedimentation_split_momentum.f90
diff --git a/src/MNH/ice4_sedimentation_stat.f90 b/src/PHYEX/micro/mode_ice4_sedimentation_stat.f90
similarity index 100%
rename from src/MNH/ice4_sedimentation_stat.f90
rename to src/PHYEX/micro/mode_ice4_sedimentation_stat.f90
diff --git a/src/MNH/ice4_slow.f90 b/src/PHYEX/micro/mode_ice4_slow.f90
similarity index 100%
rename from src/MNH/ice4_slow.f90
rename to src/PHYEX/micro/mode_ice4_slow.f90
diff --git a/src/MNH/ice4_tendencies.f90 b/src/PHYEX/micro/mode_ice4_tendencies.f90
similarity index 100%
rename from src/MNH/ice4_tendencies.f90
rename to src/PHYEX/micro/mode_ice4_tendencies.f90
diff --git a/src/MNH/ice4_warm.f90 b/src/PHYEX/micro/mode_ice4_warm.f90
similarity index 100%
rename from src/MNH/ice4_warm.f90
rename to src/PHYEX/micro/mode_ice4_warm.f90
diff --git a/src/MNH/read_xker_gweth.f90 b/src/PHYEX/micro/mode_read_xker_gweth.f90
similarity index 100%
rename from src/MNH/read_xker_gweth.f90
rename to src/PHYEX/micro/mode_read_xker_gweth.f90
diff --git a/src/MNH/read_xker_raccs.f90 b/src/PHYEX/micro/mode_read_xker_raccs.f90
similarity index 100%
rename from src/MNH/read_xker_raccs.f90
rename to src/PHYEX/micro/mode_read_xker_raccs.f90
diff --git a/src/MNH/read_xker_rdryg.f90 b/src/PHYEX/micro/mode_read_xker_rdryg.f90
similarity index 100%
rename from src/MNH/read_xker_rdryg.f90
rename to src/PHYEX/micro/mode_read_xker_rdryg.f90
diff --git a/src/MNH/read_xker_rweth.f90 b/src/PHYEX/micro/mode_read_xker_rweth.f90
similarity index 100%
rename from src/MNH/read_xker_rweth.f90
rename to src/PHYEX/micro/mode_read_xker_rweth.f90
diff --git a/src/MNH/read_xker_sdryg.f90 b/src/PHYEX/micro/mode_read_xker_sdryg.f90
similarity index 100%
rename from src/MNH/read_xker_sdryg.f90
rename to src/PHYEX/micro/mode_read_xker_sdryg.f90
diff --git a/src/MNH/read_xker_sweth.f90 b/src/PHYEX/micro/mode_read_xker_sweth.f90
similarity index 100%
rename from src/MNH/read_xker_sweth.f90
rename to src/PHYEX/micro/mode_read_xker_sweth.f90
diff --git a/src/MNH/rrcolss.f90 b/src/PHYEX/micro/mode_rrcolss.f90
similarity index 100%
rename from src/MNH/rrcolss.f90
rename to src/PHYEX/micro/mode_rrcolss.f90
diff --git a/src/MNH/rscolrg.f90 b/src/PHYEX/micro/mode_rscolrg.f90
similarity index 100%
rename from src/MNH/rscolrg.f90
rename to src/PHYEX/micro/mode_rscolrg.f90
diff --git a/src/MNH/rzcolx.f90 b/src/PHYEX/micro/mode_rzcolx.f90
similarity index 100%
rename from src/MNH/rzcolx.f90
rename to src/PHYEX/micro/mode_rzcolx.f90
diff --git a/src/MNH/modn_param_lima.f90 b/src/PHYEX/micro/modn_param_lima.f90
similarity index 100%
rename from src/MNH/modn_param_lima.f90
rename to src/PHYEX/micro/modn_param_lima.f90
diff --git a/src/MNH/prognos_lima.f90 b/src/PHYEX/micro/prognos_lima.f90
similarity index 100%
rename from src/MNH/prognos_lima.f90
rename to src/PHYEX/micro/prognos_lima.f90
diff --git a/src/MNH/radar_rain_ice.f90 b/src/PHYEX/micro/radar_rain_ice.f90
similarity index 100%
rename from src/MNH/radar_rain_ice.f90
rename to src/PHYEX/micro/radar_rain_ice.f90
diff --git a/src/MNH/radtr_satel.f90 b/src/PHYEX/micro/radtr_satel.f90
similarity index 100%
rename from src/MNH/radtr_satel.f90
rename to src/PHYEX/micro/radtr_satel.f90
diff --git a/src/MNH/rain_c2r2_khko.f90 b/src/PHYEX/micro/rain_c2r2_khko.f90
similarity index 100%
rename from src/MNH/rain_c2r2_khko.f90
rename to src/PHYEX/micro/rain_c2r2_khko.f90
diff --git a/src/MNH/rain_ice_red.f90 b/src/PHYEX/micro/rain_ice.f90
similarity index 100%
rename from src/MNH/rain_ice_red.f90
rename to src/PHYEX/micro/rain_ice.f90
diff --git a/src/MNH/rain_ice_elec.f90 b/src/PHYEX/micro/rain_ice_elec.f90
similarity index 100%
rename from src/MNH/rain_ice_elec.f90
rename to src/PHYEX/micro/rain_ice_elec.f90
diff --git a/src/MNH/rain_ice_fast_rg.f90 b/src/PHYEX/micro/rain_ice_fast_rg.f90
similarity index 100%
rename from src/MNH/rain_ice_fast_rg.f90
rename to src/PHYEX/micro/rain_ice_fast_rg.f90
diff --git a/src/MNH/rain_ice_fast_rh.f90 b/src/PHYEX/micro/rain_ice_fast_rh.f90
similarity index 100%
rename from src/MNH/rain_ice_fast_rh.f90
rename to src/PHYEX/micro/rain_ice_fast_rh.f90
diff --git a/src/MNH/rain_ice_fast_ri.f90 b/src/PHYEX/micro/rain_ice_fast_ri.f90
similarity index 100%
rename from src/MNH/rain_ice_fast_ri.f90
rename to src/PHYEX/micro/rain_ice_fast_ri.f90
diff --git a/src/MNH/rain_ice_fast_rs.f90 b/src/PHYEX/micro/rain_ice_fast_rs.f90
similarity index 100%
rename from src/MNH/rain_ice_fast_rs.f90
rename to src/PHYEX/micro/rain_ice_fast_rs.f90
diff --git a/src/MNH/rain_ice_nucleation.f90 b/src/PHYEX/micro/rain_ice_nucleation.f90
similarity index 100%
rename from src/MNH/rain_ice_nucleation.f90
rename to src/PHYEX/micro/rain_ice_nucleation.f90
diff --git a/src/MNH/rain_ice.f90 b/src/PHYEX/micro/rain_ice_old.f90
similarity index 100%
rename from src/MNH/rain_ice.f90
rename to src/PHYEX/micro/rain_ice_old.f90
diff --git a/src/MNH/rain_ice_sedimentation_split.f90 b/src/PHYEX/micro/rain_ice_sedimentation_split.f90
similarity index 100%
rename from src/MNH/rain_ice_sedimentation_split.f90
rename to src/PHYEX/micro/rain_ice_sedimentation_split.f90
diff --git a/src/MNH/rain_ice_sedimentation_stat.f90 b/src/PHYEX/micro/rain_ice_sedimentation_stat.f90
similarity index 100%
rename from src/MNH/rain_ice_sedimentation_stat.f90
rename to src/PHYEX/micro/rain_ice_sedimentation_stat.f90
diff --git a/src/MNH/rain_ice_slow.f90 b/src/PHYEX/micro/rain_ice_slow.f90
similarity index 100%
rename from src/MNH/rain_ice_slow.f90
rename to src/PHYEX/micro/rain_ice_slow.f90
diff --git a/src/MNH/rain_ice_warm.f90 b/src/PHYEX/micro/rain_ice_warm.f90
similarity index 100%
rename from src/MNH/rain_ice_warm.f90
rename to src/PHYEX/micro/rain_ice_warm.f90
diff --git a/src/MNH/set_conc_lima.f90 b/src/PHYEX/micro/set_conc_lima.f90
similarity index 100%
rename from src/MNH/set_conc_lima.f90
rename to src/PHYEX/micro/set_conc_lima.f90
diff --git a/src/MNH/ini_cturb.f90 b/src/PHYEX/turb/ini_cturb.f90
similarity index 100%
rename from src/MNH/ini_cturb.f90
rename to src/PHYEX/turb/ini_cturb.f90
diff --git a/src/MNH/les_mean_subgrid.f90 b/src/PHYEX/turb/les_mean_subgrid.f90
similarity index 100%
rename from src/MNH/les_mean_subgrid.f90
rename to src/PHYEX/turb/les_mean_subgrid.f90
diff --git a/src/MNH/modd_cturb.f90 b/src/PHYEX/turb/modd_cturb.f90
similarity index 100%
rename from src/MNH/modd_cturb.f90
rename to src/PHYEX/turb/modd_cturb.f90
diff --git a/src/MNH/modd_diag_in_run.f90 b/src/PHYEX/turb/modd_diag_in_run.f90
similarity index 100%
rename from src/MNH/modd_diag_in_run.f90
rename to src/PHYEX/turb/modd_diag_in_run.f90
diff --git a/src/MNH/modd_param_mfshalln.f90 b/src/PHYEX/turb/modd_param_mfshalln.f90
similarity index 100%
rename from src/MNH/modd_param_mfshalln.f90
rename to src/PHYEX/turb/modd_param_mfshalln.f90
diff --git a/src/MNH/modd_turbn.f90 b/src/PHYEX/turb/modd_turbn.f90
similarity index 100%
rename from src/MNH/modd_turbn.f90
rename to src/PHYEX/turb/modd_turbn.f90
diff --git a/src/MNH/bl89.f90 b/src/PHYEX/turb/mode_bl89.f90
similarity index 100%
rename from src/MNH/bl89.f90
rename to src/PHYEX/turb/mode_bl89.f90
diff --git a/src/MNH/bl_depth_diag.f90 b/src/PHYEX/turb/mode_bl_depth_diag.f90
similarity index 100%
rename from src/MNH/bl_depth_diag.f90
rename to src/PHYEX/turb/mode_bl_depth_diag.f90
diff --git a/src/MNH/coefj.f90 b/src/PHYEX/turb/mode_coefj.f90
similarity index 100%
rename from src/MNH/coefj.f90
rename to src/PHYEX/turb/mode_coefj.f90
diff --git a/src/MNH/compute_bl89_ml.f90 b/src/PHYEX/turb/mode_compute_bl89_ml.f90
similarity index 100%
rename from src/MNH/compute_bl89_ml.f90
rename to src/PHYEX/turb/mode_compute_bl89_ml.f90
diff --git a/src/MNH/compute_function_thermo_mf.f90 b/src/PHYEX/turb/mode_compute_function_thermo_mf.f90
similarity index 100%
rename from src/MNH/compute_function_thermo_mf.f90
rename to src/PHYEX/turb/mode_compute_function_thermo_mf.f90
diff --git a/src/MNH/compute_mf_cloud.f90 b/src/PHYEX/turb/mode_compute_mf_cloud.f90
similarity index 100%
rename from src/MNH/compute_mf_cloud.f90
rename to src/PHYEX/turb/mode_compute_mf_cloud.f90
diff --git a/src/MNH/compute_mf_cloud_bigaus.f90 b/src/PHYEX/turb/mode_compute_mf_cloud_bigaus.f90
similarity index 100%
rename from src/MNH/compute_mf_cloud_bigaus.f90
rename to src/PHYEX/turb/mode_compute_mf_cloud_bigaus.f90
diff --git a/src/MNH/compute_mf_cloud_direct.f90 b/src/PHYEX/turb/mode_compute_mf_cloud_direct.f90
similarity index 100%
rename from src/MNH/compute_mf_cloud_direct.f90
rename to src/PHYEX/turb/mode_compute_mf_cloud_direct.f90
diff --git a/src/MNH/compute_mf_cloud_stat.f90 b/src/PHYEX/turb/mode_compute_mf_cloud_stat.f90
similarity index 100%
rename from src/MNH/compute_mf_cloud_stat.f90
rename to src/PHYEX/turb/mode_compute_mf_cloud_stat.f90
diff --git a/src/MNH/compute_updraft.f90 b/src/PHYEX/turb/mode_compute_updraft.f90
similarity index 100%
rename from src/MNH/compute_updraft.f90
rename to src/PHYEX/turb/mode_compute_updraft.f90
diff --git a/src/MNH/compute_updraft_raha.f90 b/src/PHYEX/turb/mode_compute_updraft_raha.f90
similarity index 100%
rename from src/MNH/compute_updraft_raha.f90
rename to src/PHYEX/turb/mode_compute_updraft_raha.f90
diff --git a/src/MNH/compute_updraft_rhcj10.f90 b/src/PHYEX/turb/mode_compute_updraft_rhcj10.f90
similarity index 100%
rename from src/MNH/compute_updraft_rhcj10.f90
rename to src/PHYEX/turb/mode_compute_updraft_rhcj10.f90
diff --git a/src/MNH/emoist.f90 b/src/PHYEX/turb/mode_emoist.f90
similarity index 100%
rename from src/MNH/emoist.f90
rename to src/PHYEX/turb/mode_emoist.f90
diff --git a/src/MNH/etheta.f90 b/src/PHYEX/turb/mode_etheta.f90
similarity index 100%
rename from src/MNH/etheta.f90
rename to src/PHYEX/turb/mode_etheta.f90
diff --git a/src/MNH/ibm_mixinglength.f90 b/src/PHYEX/turb/mode_ibm_mixinglength.f90
similarity index 100%
rename from src/MNH/ibm_mixinglength.f90
rename to src/PHYEX/turb/mode_ibm_mixinglength.f90
diff --git a/src/MNH/mf_turb.f90 b/src/PHYEX/turb/mode_mf_turb.f90
similarity index 100%
rename from src/MNH/mf_turb.f90
rename to src/PHYEX/turb/mode_mf_turb.f90
diff --git a/src/MNH/mf_turb_expl.f90 b/src/PHYEX/turb/mode_mf_turb_expl.f90
similarity index 100%
rename from src/MNH/mf_turb_expl.f90
rename to src/PHYEX/turb/mode_mf_turb_expl.f90
diff --git a/src/MNH/prandtl.f90 b/src/PHYEX/turb/mode_prandtl.f90
similarity index 100%
rename from src/MNH/prandtl.f90
rename to src/PHYEX/turb/mode_prandtl.f90
diff --git a/src/MNH/rmc01.f90 b/src/PHYEX/turb/mode_rmc01.f90
similarity index 100%
rename from src/MNH/rmc01.f90
rename to src/PHYEX/turb/mode_rmc01.f90
diff --git a/src/MNH/rotate_wind.f90 b/src/PHYEX/turb/mode_rotate_wind.f90
similarity index 100%
rename from src/MNH/rotate_wind.f90
rename to src/PHYEX/turb/mode_rotate_wind.f90
diff --git a/src/MNH/mode_sbl.f90 b/src/PHYEX/turb/mode_sbl.f90
similarity index 100%
rename from src/MNH/mode_sbl.f90
rename to src/PHYEX/turb/mode_sbl.f90
diff --git a/src/MNH/sbl_depth.f90 b/src/PHYEX/turb/mode_sbl_depth.f90
similarity index 100%
rename from src/MNH/sbl_depth.f90
rename to src/PHYEX/turb/mode_sbl_depth.f90
diff --git a/src/MNH/thl_rt_from_th_r_mf.f90 b/src/PHYEX/turb/mode_thl_rt_from_th_r_mf.f90
similarity index 100%
rename from src/MNH/thl_rt_from_th_r_mf.f90
rename to src/PHYEX/turb/mode_thl_rt_from_th_r_mf.f90
diff --git a/src/MNH/tke_eps_sources.f90 b/src/PHYEX/turb/mode_tke_eps_sources.f90
similarity index 100%
rename from src/MNH/tke_eps_sources.f90
rename to src/PHYEX/turb/mode_tke_eps_sources.f90
diff --git a/src/MNH/tm06.f90 b/src/PHYEX/turb/mode_tm06.f90
similarity index 100%
rename from src/MNH/tm06.f90
rename to src/PHYEX/turb/mode_tm06.f90
diff --git a/src/MNH/tm06_h.f90 b/src/PHYEX/turb/mode_tm06_h.f90
similarity index 100%
rename from src/MNH/tm06_h.f90
rename to src/PHYEX/turb/mode_tm06_h.f90
diff --git a/src/MNH/tridiag.f90 b/src/PHYEX/turb/mode_tridiag.f90
similarity index 100%
rename from src/MNH/tridiag.f90
rename to src/PHYEX/turb/mode_tridiag.f90
diff --git a/src/MNH/tridiag_massflux.f90 b/src/PHYEX/turb/mode_tridiag_massflux.f90
similarity index 100%
rename from src/MNH/tridiag_massflux.f90
rename to src/PHYEX/turb/mode_tridiag_massflux.f90
diff --git a/src/MNH/tridiag_thermo.f90 b/src/PHYEX/turb/mode_tridiag_thermo.f90
similarity index 100%
rename from src/MNH/tridiag_thermo.f90
rename to src/PHYEX/turb/mode_tridiag_thermo.f90
diff --git a/src/MNH/tridiag_tke.f90 b/src/PHYEX/turb/mode_tridiag_tke.f90
similarity index 100%
rename from src/MNH/tridiag_tke.f90
rename to src/PHYEX/turb/mode_tridiag_tke.f90
diff --git a/src/MNH/tridiag_w.f90 b/src/PHYEX/turb/mode_tridiag_w.f90
similarity index 100%
rename from src/MNH/tridiag_w.f90
rename to src/PHYEX/turb/mode_tridiag_w.f90
diff --git a/src/MNH/tridiag_wind.f90 b/src/PHYEX/turb/mode_tridiag_wind.f90
similarity index 100%
rename from src/MNH/tridiag_wind.f90
rename to src/PHYEX/turb/mode_tridiag_wind.f90
diff --git a/src/MNH/turb_hor.f90 b/src/PHYEX/turb/mode_turb_hor.f90
similarity index 100%
rename from src/MNH/turb_hor.f90
rename to src/PHYEX/turb/mode_turb_hor.f90
diff --git a/src/MNH/turb_hor_dyn_corr.f90 b/src/PHYEX/turb/mode_turb_hor_dyn_corr.f90
similarity index 100%
rename from src/MNH/turb_hor_dyn_corr.f90
rename to src/PHYEX/turb/mode_turb_hor_dyn_corr.f90
diff --git a/src/MNH/turb_hor_splt.f90 b/src/PHYEX/turb/mode_turb_hor_splt.f90
similarity index 100%
rename from src/MNH/turb_hor_splt.f90
rename to src/PHYEX/turb/mode_turb_hor_splt.f90
diff --git a/src/MNH/turb_hor_sv_corr.f90 b/src/PHYEX/turb/mode_turb_hor_sv_corr.f90
similarity index 100%
rename from src/MNH/turb_hor_sv_corr.f90
rename to src/PHYEX/turb/mode_turb_hor_sv_corr.f90
diff --git a/src/MNH/turb_hor_sv_flux.f90 b/src/PHYEX/turb/mode_turb_hor_sv_flux.f90
similarity index 100%
rename from src/MNH/turb_hor_sv_flux.f90
rename to src/PHYEX/turb/mode_turb_hor_sv_flux.f90
diff --git a/src/MNH/turb_hor_thermo_corr.f90 b/src/PHYEX/turb/mode_turb_hor_thermo_corr.f90
similarity index 100%
rename from src/MNH/turb_hor_thermo_corr.f90
rename to src/PHYEX/turb/mode_turb_hor_thermo_corr.f90
diff --git a/src/MNH/turb_hor_thermo_flux.f90 b/src/PHYEX/turb/mode_turb_hor_thermo_flux.f90
similarity index 100%
rename from src/MNH/turb_hor_thermo_flux.f90
rename to src/PHYEX/turb/mode_turb_hor_thermo_flux.f90
diff --git a/src/MNH/turb_hor_tke.f90 b/src/PHYEX/turb/mode_turb_hor_tke.f90
similarity index 100%
rename from src/MNH/turb_hor_tke.f90
rename to src/PHYEX/turb/mode_turb_hor_tke.f90
diff --git a/src/MNH/turb_hor_uv.f90 b/src/PHYEX/turb/mode_turb_hor_uv.f90
similarity index 100%
rename from src/MNH/turb_hor_uv.f90
rename to src/PHYEX/turb/mode_turb_hor_uv.f90
diff --git a/src/MNH/turb_hor_uw.f90 b/src/PHYEX/turb/mode_turb_hor_uw.f90
similarity index 100%
rename from src/MNH/turb_hor_uw.f90
rename to src/PHYEX/turb/mode_turb_hor_uw.f90
diff --git a/src/MNH/turb_hor_vw.f90 b/src/PHYEX/turb/mode_turb_hor_vw.f90
similarity index 100%
rename from src/MNH/turb_hor_vw.f90
rename to src/PHYEX/turb/mode_turb_hor_vw.f90
diff --git a/src/MNH/turb_ver.f90 b/src/PHYEX/turb/mode_turb_ver.f90
similarity index 100%
rename from src/MNH/turb_ver.f90
rename to src/PHYEX/turb/mode_turb_ver.f90
diff --git a/src/MNH/turb_ver_dyn_flux.f90 b/src/PHYEX/turb/mode_turb_ver_dyn_flux.f90
similarity index 100%
rename from src/MNH/turb_ver_dyn_flux.f90
rename to src/PHYEX/turb/mode_turb_ver_dyn_flux.f90
diff --git a/src/MNH/turb_ver_sv_corr.f90 b/src/PHYEX/turb/mode_turb_ver_sv_corr.f90
similarity index 100%
rename from src/MNH/turb_ver_sv_corr.f90
rename to src/PHYEX/turb/mode_turb_ver_sv_corr.f90
diff --git a/src/MNH/turb_ver_sv_flux.f90 b/src/PHYEX/turb/mode_turb_ver_sv_flux.f90
similarity index 100%
rename from src/MNH/turb_ver_sv_flux.f90
rename to src/PHYEX/turb/mode_turb_ver_sv_flux.f90
diff --git a/src/MNH/turb_ver_thermo_corr.f90 b/src/PHYEX/turb/mode_turb_ver_thermo_corr.f90
similarity index 100%
rename from src/MNH/turb_ver_thermo_corr.f90
rename to src/PHYEX/turb/mode_turb_ver_thermo_corr.f90
diff --git a/src/MNH/turb_ver_thermo_flux.f90 b/src/PHYEX/turb/mode_turb_ver_thermo_flux.f90
similarity index 100%
rename from src/MNH/turb_ver_thermo_flux.f90
rename to src/PHYEX/turb/mode_turb_ver_thermo_flux.f90
diff --git a/src/MNH/update_lm.f90 b/src/PHYEX/turb/mode_update_lm.f90
similarity index 100%
rename from src/MNH/update_lm.f90
rename to src/PHYEX/turb/mode_update_lm.f90
diff --git a/src/MNH/shallow_mf.f90 b/src/PHYEX/turb/shallow_mf.f90
similarity index 100%
rename from src/MNH/shallow_mf.f90
rename to src/PHYEX/turb/shallow_mf.f90
diff --git a/src/MNH/shuman_mf.f90 b/src/PHYEX/turb/shuman_mf.f90
similarity index 100%
rename from src/MNH/shuman_mf.f90
rename to src/PHYEX/turb/shuman_mf.f90
diff --git a/src/MNH/turb.f90 b/src/PHYEX/turb/turb.f90
similarity index 100%
rename from src/MNH/turb.f90
rename to src/PHYEX/turb/turb.f90
-- 
GitLab