From a3365c7098703b6353480e657b07e22cb7080dcd Mon Sep 17 00:00:00 2001
From: Quentin Rodier <quentin.rodier@meteo.fr>
Date: Fri, 17 Feb 2023 14:18:42 +0100
Subject: [PATCH] Quentin 17/02/2023: budget, keep only _phy part

---
 .../{mode_budget.F90 => mode_budget_phy.F90}  |   5 +-
 src/arome/ext/aro_adjust_lima.F90             |   2 +-
 src/arome/ext/aro_convbu.F90                  |   2 +-
 src/arome/ext/aro_lima.F90                    |   2 +-
 src/arome/ext/aro_rain_ice.F90                |   2 +-
 src/arome/ext/aro_startbu.F90                 |   2 +-
 src/arome/micro/lima.F90                      |   2 +-
 src/arome/micro/lima_adjust.F90               |   2 +-
 src/arome/micro/lima_ccn_hom_freezing.F90     |   2 +-
 src/arome/micro/lima_cold.F90                 |   2 +-
 src/arome/micro/lima_cold_hom_nucl.F90        |   2 +-
 src/arome/micro/lima_cold_slow_processes.F90  |   2 +-
 src/arome/micro/lima_meyers.F90               |   2 +-
 src/arome/micro/lima_meyers_nucleation.F90    |   2 +-
 src/arome/micro/lima_mixed.F90                |   2 +-
 src/arome/micro/lima_mixed_fast_processes.F90 |   2 +-
 src/arome/micro/lima_mixed_slow_processes.F90 |   2 +-
 src/arome/micro/lima_nucleation_procs.F90     |   2 +-
 src/arome/micro/lima_phillips.F90             |   2 +-
 .../micro/lima_phillips_ifn_nucleation.F90    |   2 +-
 src/arome/micro/lima_precip_scavenging.F90    |   2 +-
 src/arome/micro/lima_warm.F90                 |   2 +-
 src/arome/micro/lima_warm_coal.F90            |   2 +-
 src/arome/micro/rain_ice_old.F90              |   2 +-
 .../{mode_budget.F90 => mode_budget_phy.F90}  |   4 +-
 src/common/micro/ice_adjust.F90               |   2 +-
 src/common/micro/mode_ice4_budgets.F90        |   2 +-
 src/common/micro/mode_ice4_sedimentation.F90  |   2 +-
 src/common/micro/rain_ice.F90                 |   2 +-
 src/common/turb/mode_tke_eps_sources.F90      |   2 +-
 src/common/turb/shallow_mf.F90                |   2 +-
 src/common/turb/turb.F90                      |   2 +-
 src/mesonh/aux/mode_budget.f90                | 349 ------------------
 src/mesonh/aux/mode_budget_phy.f90            |  62 ++++
 34 files changed, 96 insertions(+), 384 deletions(-)
 rename src/arome/aux/{mode_budget.F90 => mode_budget_phy.F90} (99%)
 rename src/common/aux/{mode_budget.F90 => mode_budget_phy.F90} (98%)
 delete mode 100644 src/mesonh/aux/mode_budget.f90
 create mode 100644 src/mesonh/aux/mode_budget_phy.f90

diff --git a/src/arome/aux/mode_budget.F90 b/src/arome/aux/mode_budget_phy.F90
similarity index 99%
rename from src/arome/aux/mode_budget.F90
rename to src/arome/aux/mode_budget_phy.F90
index 3a258b244..d2881a967 100644
--- a/src/arome/aux/mode_budget.F90
+++ b/src/arome/aux/mode_budget_phy.F90
@@ -1,4 +1,4 @@
-MODULE MODE_BUDGET
+MODULE MODE_BUDGET_PHY
 USE MODD_BUDGET, ONLY : TBUDGETDATA
 IMPLICIT NONE
 CONTAINS
@@ -291,5 +291,4 @@ ENDIF
 
 IF (LHOOK) CALL DR_HOOK('BUDGET_DDH',1,ZHOOK_HANDLE)
 END SUBROUTINE BUDGET_DDH
-END MODULE MODE_BUDGET
-
+END MODULE MODE_BUDGET_PHY
diff --git a/src/arome/ext/aro_adjust_lima.F90 b/src/arome/ext/aro_adjust_lima.F90
index 169373f49..04009ff0d 100644
--- a/src/arome/ext/aro_adjust_lima.F90
+++ b/src/arome/ext/aro_adjust_lima.F90
@@ -87,7 +87,7 @@ USE MODD_PARAM_LIMA
 USE MODD_NSV
 !
 USE MODI_LIMA_ADJUST
-!USE MODE_BUDGET, ONLY: BUDGET_DDH
+!USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 USE DDH_MIX, ONLY  : TYP_DDH
 USE YOMLDDH, ONLY  : TLDDH
diff --git a/src/arome/ext/aro_convbu.F90 b/src/arome/ext/aro_convbu.F90
index 6cb035798..06d195d23 100644
--- a/src/arome/ext/aro_convbu.F90
+++ b/src/arome/ext/aro_convbu.F90
@@ -3,7 +3,7 @@ USE PARKIND1, ONLY : JPRB
 USE YOMHOOK , ONLY : LHOOK, DR_HOOK
 
 USE MODD_BUDGET,ONLY: LBU_ENABLE, LBUDGET_TH, LBUDGET_RV, LBUDGET_RC, LBUDGET_RI
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE DDH_MIX, ONLY  : TYP_DDH
 USE YOMLDDH, ONLY  : TLDDH
 USE YOMMDDH, ONLY  : TMDDH
diff --git a/src/arome/ext/aro_lima.F90 b/src/arome/ext/aro_lima.F90
index 4b10ba776..44ad16f2a 100644
--- a/src/arome/ext/aro_lima.F90
+++ b/src/arome/ext/aro_lima.F90
@@ -48,7 +48,7 @@ USE MODD_PARAM_LIMA
 USE MODD_NSV
 !
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 USE MODI_LIMA
 !
diff --git a/src/arome/ext/aro_rain_ice.F90 b/src/arome/ext/aro_rain_ice.F90
index 9fbb93287..8fd95fc4d 100644
--- a/src/arome/ext/aro_rain_ice.F90
+++ b/src/arome/ext/aro_rain_ice.F90
@@ -94,7 +94,7 @@ USE MODD_PARAM_ICE,      ONLY: PARAM_ICE
 USE MODD_DIMPHYEX,   ONLY: DIMPHYEX_t
 !
 USE MODD_BUDGET, ONLY: TBUDGETDATA, NBUDGET_RH, TBUCONF
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE MODE_FILL_DIMPHYEX, ONLY: FILL_DIMPHYEX
 !
 USE MODI_RAIN_ICE
diff --git a/src/arome/ext/aro_startbu.F90 b/src/arome/ext/aro_startbu.F90
index 8eebeb0fc..c9b10fcde 100644
--- a/src/arome/ext/aro_startbu.F90
+++ b/src/arome/ext/aro_startbu.F90
@@ -44,7 +44,7 @@ USE YOMHOOK , ONLY : LHOOK, DR_HOOK
 !              ------------
 !
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE DDH_MIX     , ONLY  : TYP_DDH
 USE YOMLDDH     , ONLY  : TLDDH
 USE YOMMDDH     , ONLY  : TMDDH
diff --git a/src/arome/micro/lima.F90 b/src/arome/micro/lima.F90
index a96c98099..12ac3f686 100644
--- a/src/arome/micro/lima.F90
+++ b/src/arome/micro/lima.F90
@@ -109,7 +109,7 @@ USE MODD_NSV,            ONLY : NSV_LIMA_NC, NSV_LIMA_NR, NSV_LIMA_CCN_FREE, NSV
                                 NSV_LIMA_IFN_NUCL, NSV_LIMA_IMM_NUCL, NSV_LIMA_HOM_HAZE
 USE MODD_CST,            ONLY : XCI, XCL, XCPD, XCPV, XLSTT, XLVTT, XTT
 !
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE MODI_LIMA_FUNCTIONS, ONLY : COUNTJV
 USE MODI_LIMA_WARM_SEDIMENTATION
 USE MODI_LIMA_COLD_SEDIMENTATION
diff --git a/src/arome/micro/lima_adjust.F90 b/src/arome/micro/lima_adjust.F90
index fd7e8f5cd..960d93364 100644
--- a/src/arome/micro/lima_adjust.F90
+++ b/src/arome/micro/lima_adjust.F90
@@ -157,7 +157,7 @@ USE DDH_MIX, ONLY  : TYP_DDH
 USE YOMLDDH, ONLY  : TLDDH
 USE YOMMDDH, ONLY  : TMDDH
 !
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE MODI_LIMA_FUNCTIONS
 !
 !
diff --git a/src/arome/micro/lima_ccn_hom_freezing.F90 b/src/arome/micro/lima_ccn_hom_freezing.F90
index a7da41311..68c8ab6f4 100644
--- a/src/arome/micro/lima_ccn_hom_freezing.F90
+++ b/src/arome/micro/lima_ccn_hom_freezing.F90
@@ -83,7 +83,7 @@ USE MODI_LIMA_FUNCTIONS,  ONLY : COUNTJV
 !
 USE MODD_NSV
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 IMPLICIT NONE
 !
diff --git a/src/arome/micro/lima_cold.F90 b/src/arome/micro/lima_cold.F90
index 2c6030595..7d1c1ac77 100644
--- a/src/arome/micro/lima_cold.F90
+++ b/src/arome/micro/lima_cold.F90
@@ -124,7 +124,7 @@ USE MODD_NSV
 USE MODD_PARAM_LIMA
 !
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 USE MODI_LIMA_COLD_SEDIMENTATION
 USE MODI_LIMA_MEYERS
diff --git a/src/arome/micro/lima_cold_hom_nucl.F90 b/src/arome/micro/lima_cold_hom_nucl.F90
index f30a0feb3..f7ff316df 100644
--- a/src/arome/micro/lima_cold_hom_nucl.F90
+++ b/src/arome/micro/lima_cold_hom_nucl.F90
@@ -126,7 +126,7 @@ USE YOMMDDH, ONLY  : TMDDH
 !
 USE MODD_NSV
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 IMPLICIT NONE
 !
diff --git a/src/arome/micro/lima_cold_slow_processes.F90 b/src/arome/micro/lima_cold_slow_processes.F90
index a342f7d22..fc25802ae 100644
--- a/src/arome/micro/lima_cold_slow_processes.F90
+++ b/src/arome/micro/lima_cold_slow_processes.F90
@@ -112,7 +112,7 @@ USE MODD_PARAM_LIMA_COLD, ONLY : XLBI, XLBEXI, XLBS, XLBEXS, XBI, XCXS, XCCS, &
 USE MODI_LIMA_FUNCTIONS,  ONLY : COUNTJV
 USE MODD_BUDGET
 USE MODD_NSV, ONLY : NSV_LIMA_NI
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 
 USE DDH_MIX, ONLY  : TYP_DDH
 USE YOMLDDH, ONLY  : TLDDH
diff --git a/src/arome/micro/lima_meyers.F90 b/src/arome/micro/lima_meyers.F90
index a10953731..33147160c 100644
--- a/src/arome/micro/lima_meyers.F90
+++ b/src/arome/micro/lima_meyers.F90
@@ -126,7 +126,7 @@ USE MODD_CST
 USE MODD_PARAM_LIMA
 USE MODD_PARAM_LIMA_COLD
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE MODD_NSV, ONLY : NSV_LIMA_NC, NSV_LIMA_NI
 !
 USE DDH_MIX, ONLY  : TYP_DDH
diff --git a/src/arome/micro/lima_meyers_nucleation.F90 b/src/arome/micro/lima_meyers_nucleation.F90
index 2b90ca08c..7506e5d74 100644
--- a/src/arome/micro/lima_meyers_nucleation.F90
+++ b/src/arome/micro/lima_meyers_nucleation.F90
@@ -108,7 +108,7 @@ USE MODD_CST
 USE MODD_PARAM_LIMA
 USE MODD_PARAM_LIMA_COLD
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE MODD_NSV, ONLY : NSV_LIMA_NC, NSV_LIMA_NI
 !
 USE MODI_LIMA_FUNCTIONS,  ONLY : COUNTJV
diff --git a/src/arome/micro/lima_mixed.F90 b/src/arome/micro/lima_mixed.F90
index 000b50376..31dac8680 100644
--- a/src/arome/micro/lima_mixed.F90
+++ b/src/arome/micro/lima_mixed.F90
@@ -123,7 +123,7 @@ USE MODD_PARAM_LIMA_MIXED, ONLY : XLBG, XLBEXG, XLBH, XLBEXH
 USE MODD_NSV
 !
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 USE MODI_LIMA_FUNCTIONS,   ONLY : COUNTJV
 USE MODI_LIMA_MIXED_SLOW_PROCESSES
diff --git a/src/arome/micro/lima_mixed_fast_processes.F90 b/src/arome/micro/lima_mixed_fast_processes.F90
index 9bcfa9bb6..f87cc293b 100644
--- a/src/arome/micro/lima_mixed_fast_processes.F90
+++ b/src/arome/micro/lima_mixed_fast_processes.F90
@@ -160,7 +160,7 @@ USE MODD_PARAM_LIMA_MIXED
 !
 USE MODD_NSV
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 USE DDH_MIX, ONLY  : TYP_DDH
 USE YOMLDDH, ONLY  : TLDDH
diff --git a/src/arome/micro/lima_mixed_slow_processes.F90 b/src/arome/micro/lima_mixed_slow_processes.F90
index ff8f782ce..ac1bdfc10 100644
--- a/src/arome/micro/lima_mixed_slow_processes.F90
+++ b/src/arome/micro/lima_mixed_slow_processes.F90
@@ -130,7 +130,7 @@ USE MODD_PARAM_LIMA_MIXED, ONLY : XLBG, XLBEXG, XLBDAG_MAX,           &
 !
 USE MODD_NSV
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 USE DDH_MIX, ONLY  : TYP_DDH
 USE YOMLDDH, ONLY  : TLDDH
diff --git a/src/arome/micro/lima_nucleation_procs.F90 b/src/arome/micro/lima_nucleation_procs.F90
index 9b23d62f2..2a5584cff 100644
--- a/src/arome/micro/lima_nucleation_procs.F90
+++ b/src/arome/micro/lima_nucleation_procs.F90
@@ -68,7 +68,7 @@ USE MODD_BUDGET,     ONLY : LBU_ENABLE, LBUDGET_TH, LBUDGET_RV, LBUDGET_RC, LBUD
 USE MODD_NSV,        ONLY : NSV_LIMA_NC, NSV_LIMA_NR, NSV_LIMA_CCN_FREE,               &
                             NSV_LIMA_NI, NSV_LIMA_IFN_FREE
 !
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE MODI_LIMA_CCN_ACTIVATION
 USE MODI_LIMA_PHILLIPS_IFN_NUCLEATION
 USE MODI_LIMA_MEYERS_NUCLEATION
diff --git a/src/arome/micro/lima_phillips.F90 b/src/arome/micro/lima_phillips.F90
index 6791798d4..cf84a56c1 100644
--- a/src/arome/micro/lima_phillips.F90
+++ b/src/arome/micro/lima_phillips.F90
@@ -145,7 +145,7 @@ USE MODI_LIMA_PHILLIPS_REF_SPECTRUM
 USE MODI_LIMA_PHILLIPS_INTEG
 !
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE MODD_NSV, ONLY : NSV_LIMA_NC, NSV_LIMA_NI, NSV_LIMA_IFN_FREE
 !
 USE DDH_MIX, ONLY  : TYP_DDH
diff --git a/src/arome/micro/lima_phillips_ifn_nucleation.F90 b/src/arome/micro/lima_phillips_ifn_nucleation.F90
index 068d15cfc..8d887cbb0 100644
--- a/src/arome/micro/lima_phillips_ifn_nucleation.F90
+++ b/src/arome/micro/lima_phillips_ifn_nucleation.F90
@@ -120,7 +120,7 @@ USE MODI_LIMA_PHILLIPS_REF_SPECTRUM
 USE MODI_LIMA_PHILLIPS_INTEG
 !
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE MODD_NSV, ONLY : NSV_LIMA_NC, NSV_LIMA_NI, NSV_LIMA_IFN_FREE
 !
 !
diff --git a/src/arome/micro/lima_precip_scavenging.F90 b/src/arome/micro/lima_precip_scavenging.F90
index ad63b9683..4ed7840ed 100644
--- a/src/arome/micro/lima_precip_scavenging.F90
+++ b/src/arome/micro/lima_precip_scavenging.F90
@@ -127,7 +127,7 @@ USE MODD_PARAM_LIMA,      ONLY : NMOD_IFN, NSPECIE, XFRAC,
 USE MODD_PARAM_LIMA_WARM, ONLY : XCR, XDR
 !
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 IMPLICIT NONE
 !
diff --git a/src/arome/micro/lima_warm.F90 b/src/arome/micro/lima_warm.F90
index bcec12255..92e137d6d 100644
--- a/src/arome/micro/lima_warm.F90
+++ b/src/arome/micro/lima_warm.F90
@@ -146,7 +146,7 @@ USE MODD_NSV
 !
 !
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 USE MODI_LIMA_WARM_SEDIMENTATION
 USE MODI_LIMA_WARM_NUCL
diff --git a/src/arome/micro/lima_warm_coal.F90 b/src/arome/micro/lima_warm_coal.F90
index cf7ade8f3..96f0bfb4a 100644
--- a/src/arome/micro/lima_warm_coal.F90
+++ b/src/arome/micro/lima_warm_coal.F90
@@ -117,7 +117,7 @@ USE MODD_PARAM_LIMA_WARM
 !
 USE MODD_NSV, ONLY : NSV_LIMA_NC, NSV_LIMA_NR
 USE MODD_BUDGET
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 !
 USE MODI_LIMA_FUNCTIONS, ONLY : COUNTJV
 !
diff --git a/src/arome/micro/rain_ice_old.F90 b/src/arome/micro/rain_ice_old.F90
index e7b5994e2..e291da334 100644
--- a/src/arome/micro/rain_ice_old.F90
+++ b/src/arome/micro/rain_ice_old.F90
@@ -173,7 +173,7 @@ USE MODD_RAIN_ICE_PARAM
 USE MODD_PARAM_ICE
 USE MODD_BUDGET
 USE MODD_LES
-USE MODE_BUDGET, ONLY: BUDGET_DDH
+USE MODE_BUDGET_PHY, ONLY: BUDGET_DDH
 USE MODI_GAMMA
 USE MODE_TIWMX
 USE MODE_ICECLOUD, ONLY : ICECLOUD
diff --git a/src/common/aux/mode_budget.F90 b/src/common/aux/mode_budget_phy.F90
similarity index 98%
rename from src/common/aux/mode_budget.F90
rename to src/common/aux/mode_budget_phy.F90
index e50f2185b..30db2f33b 100644
--- a/src/common/aux/mode_budget.F90
+++ b/src/common/aux/mode_budget_phy.F90
@@ -1,4 +1,4 @@
-MODULE MODE_BUDGET
+MODULE MODE_BUDGET_PHY
 USE MODD_BUDGET, ONLY : TBUDGETDATA
 IMPLICIT NONE
 CONTAINS
@@ -48,4 +48,4 @@ SUBROUTINE BUDGET_STORE_ADD(TPBUDGET, HSOURCE, PVARS)
   REAL, DIMENSION(:,:,:), INTENT(IN)    :: PVARS    ! Current value to be stored
   REAL, DIMENSION(SIZE(PVARS, 1), SIZE(PVARS, 2), SIZE(PVARS, 3)) :: ZVARS
 END SUBROUTINE BUDGET_STORE_ADD
-END MODULE MODE_BUDGET
+END MODULE MODE_BUDGET_PHY
diff --git a/src/common/micro/ice_adjust.F90 b/src/common/micro/ice_adjust.F90
index deec98d8e..e2981ff01 100644
--- a/src/common/micro/ice_adjust.F90
+++ b/src/common/micro/ice_adjust.F90
@@ -118,7 +118,7 @@ USE MODD_TURB_n,         ONLY: TURB_t
 USE MODD_BUDGET,     ONLY: TBUDGETDATA, TBUDGETCONF_t, NBUDGET_TH, NBUDGET_RV, NBUDGET_RC, NBUDGET_RI
 USE MODD_RAIN_ICE_PARAM, ONLY : RAIN_ICE_PARAM_t
 !
-USE MODE_BUDGET,         ONLY: BUDGET_STORE_INIT_PHY, BUDGET_STORE_END_PHY
+USE MODE_BUDGET_PHY,         ONLY: BUDGET_STORE_INIT_PHY, BUDGET_STORE_END_PHY
 !
 USE MODI_CONDENSATION
 !
diff --git a/src/common/micro/mode_ice4_budgets.F90 b/src/common/micro/mode_ice4_budgets.F90
index 99cf34f31..03c550d31 100644
--- a/src/common/micro/mode_ice4_budgets.F90
+++ b/src/common/micro/mode_ice4_budgets.F90
@@ -25,7 +25,7 @@ USE MODD_PARAM_ICE,  ONLY: PARAM_ICE_t
 !
 USE MODD_FIELDS_ADDRESS ! index number for prognostic (theta and mixing ratios) and budgets
 !
-USE MODE_BUDGET,     ONLY: BUDGET_STORE_ADD_PHY, BUDGET_STORE_INIT_PHY, BUDGET_STORE_END_PHY
+USE MODE_BUDGET_PHY,     ONLY: BUDGET_STORE_ADD_PHY, BUDGET_STORE_INIT_PHY, BUDGET_STORE_END_PHY
 !
 !
 IMPLICIT NONE
diff --git a/src/common/micro/mode_ice4_sedimentation.F90 b/src/common/micro/mode_ice4_sedimentation.F90
index f6fc795ed..c110a81f1 100644
--- a/src/common/micro/mode_ice4_sedimentation.F90
+++ b/src/common/micro/mode_ice4_sedimentation.F90
@@ -42,7 +42,7 @@ USE MODD_RAIN_ICE_PARAM, ONLY: RAIN_ICE_PARAM_t
 USE MODD_PARAM_ICE,      ONLY: PARAM_ICE_t
 !
 USE MODE_MSG, ONLY: PRINT_MSG, NVERB_FATAL
-USE MODE_BUDGET,         ONLY: BUDGET_STORE_INIT_PHY, BUDGET_STORE_END_PHY
+USE MODE_BUDGET_PHY,         ONLY: BUDGET_STORE_INIT_PHY, BUDGET_STORE_END_PHY
 !
 USE MODE_ICE4_SEDIMENTATION_STAT, ONLY: ICE4_SEDIMENTATION_STAT                                                                     
 USE MODE_ICE4_SEDIMENTATION_SPLIT, ONLY: ICE4_SEDIMENTATION_SPLIT                                                                   
diff --git a/src/common/micro/rain_ice.F90 b/src/common/micro/rain_ice.F90
index 2008e76f6..c17b5c3cd 100644
--- a/src/common/micro/rain_ice.F90
+++ b/src/common/micro/rain_ice.F90
@@ -197,7 +197,7 @@ USE MODD_FIELDS_ADDRESS, ONLY : & ! common fields adress
       & IRG,     & ! Graupel
       & IRH        ! Hail
 
-USE MODE_BUDGET,         ONLY: BUDGET_STORE_ADD_PHY, BUDGET_STORE_INIT_PHY, BUDGET_STORE_END_PHY
+USE MODE_BUDGET_PHY,         ONLY: BUDGET_STORE_ADD_PHY, BUDGET_STORE_INIT_PHY, BUDGET_STORE_END_PHY
 USE MODE_MSG,            ONLY: PRINT_MSG, NVERB_FATAL
 
 USE MODE_ICE4_RAINFR_VERT, ONLY: ICE4_RAINFR_VERT
diff --git a/src/common/turb/mode_tke_eps_sources.F90 b/src/common/turb/mode_tke_eps_sources.F90
index 82d497230..333b8d641 100644
--- a/src/common/turb/mode_tke_eps_sources.F90
+++ b/src/common/turb/mode_tke_eps_sources.F90
@@ -142,7 +142,7 @@ USE MODD_LES,            ONLY: TLES_t
 USE MODD_PARAMETERS,     ONLY: JPVEXT_TURB
 USE MODD_TURB_n,         ONLY: TURB_t
 !
-USE MODE_BUDGET,         ONLY: BUDGET_STORE_ADD_PHY, BUDGET_STORE_END_PHY, BUDGET_STORE_INIT_PHY
+USE MODE_BUDGET_PHY,         ONLY: BUDGET_STORE_ADD_PHY, BUDGET_STORE_END_PHY, BUDGET_STORE_INIT_PHY
 USE MODE_IO_FIELD_WRITE_PHY, ONLY: IO_FIELD_WRITE_PHY
 USE MODE_ll
 !
diff --git a/src/common/turb/shallow_mf.F90 b/src/common/turb/shallow_mf.F90
index 0c6b142cb..0eaa8b405 100644
--- a/src/common/turb/shallow_mf.F90
+++ b/src/common/turb/shallow_mf.F90
@@ -86,7 +86,7 @@ USE MODD_TURB_n,          ONLY: TURB_t
 USE MODD_CTURB,           ONLY: CSTURB_t
 USE MODD_PARAMETERS,      ONLY: JPSVMAX
 !
-USE MODE_BUDGET,                 ONLY: BUDGET_STORE_ADD_PHY
+USE MODE_BUDGET_PHY,                 ONLY: BUDGET_STORE_ADD_PHY
 USE MODE_COMPUTE_MF_CLOUD,       ONLY: COMPUTE_MF_CLOUD
 USE MODE_COMPUTE_UPDRAFT,        ONLY: COMPUTE_UPDRAFT
 USE MODE_COMPUTE_UPDRAFT_RAHA,   ONLY: COMPUTE_UPDRAFT_RAHA
diff --git a/src/common/turb/turb.F90 b/src/common/turb/turb.F90
index 676f909cd..cc4927a5a 100644
--- a/src/common/turb/turb.F90
+++ b/src/common/turb/turb.F90
@@ -256,7 +256,7 @@ USE MODD_PARAMETERS, ONLY: JPVEXT_TURB, XUNDEF
 USE MODD_TURB_n,     ONLY: TURB_t
 !
 USE MODE_BL89,                ONLY: BL89
-USE MODE_BUDGET,              ONLY: BUDGET_STORE_INIT_PHY, BUDGET_STORE_END_PHY
+USE MODE_BUDGET_PHY,              ONLY: BUDGET_STORE_INIT_PHY, BUDGET_STORE_END_PHY
 USE MODE_EMOIST,              ONLY: EMOIST
 USE MODE_ETHETA,              ONLY: ETHETA
 USE MODE_GRADIENT_U_PHY,      ONLY: GZ_U_UW_PHY
diff --git a/src/mesonh/aux/mode_budget.f90 b/src/mesonh/aux/mode_budget.f90
deleted file mode 100644
index 89aad3a6e..000000000
--- a/src/mesonh/aux/mode_budget.f90
+++ /dev/null
@@ -1,349 +0,0 @@
-!MNH_LIC Copyright 1994-2021 CNRS, Meteo-France and Universite Paul Sabatier
-!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
-!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
-!MNH_LIC for details. version 1.
-!-----------------------------------------------------------------
-! Modifications
-!  P. Wautelet 28/01/2020: new subroutines: Budget_store_init, Budget_store_end and Budget_source_id_find in new module mode_budget
-!  P. Wautelet 17/08/2020: treat LES budgets correctly
-!  P. Wautelet 05/03/2021: measure cpu_time for budgets
-!-----------------------------------------------------------------
-
-!#################
-module mode_budget
-!#################
-
-use modd_budget,     only: cbutype, nbutime, tbudgetdata, xtime_bu, xtime_bu_process
-use modd_les_budget, only: xtime_les_bu, xtime_les_bu_process
-
-use modi_cart_compress, only: Cart_compress
-use modi_mask_compress, only: Mask_compress
-use modi_second_mnh,    only: Second_mnh
-
-use mode_msg
-
-implicit none
-
-private
-
-public :: Budget_store_init,Budget_store_init_phy
-public :: Budget_store_end, Budget_store_end_phy
-public :: Budget_store_add, Budget_store_add_phy
-
-real :: ztime1, ztime2
-
-contains
-
-subroutine Budget_store_init_phy(D, tpbudget, hsource, pvars)
-  USE MODD_DIMPHYEX, ONLY: DIMPHYEX_t
-  TYPE(DIMPHYEX_t),       INTENT(IN)    :: D
-  type(tbudgetdata),      intent(inout) :: tpbudget ! Budget datastructure
-  character(len=*),       intent(in)    :: hsource  ! Name of the source term
-  real, dimension(D%NIT,D%NJT,D%NKT), intent(in)    :: pvars    ! Current value to be stored
-!
-  call Budget_store_init(tpbudget, hsource, pvars)
-!
-end subroutine Budget_store_init_phy
-!
-subroutine Budget_store_end_phy(D, tpbudget, hsource, pvars)
-  USE MODD_DIMPHYEX, ONLY: DIMPHYEX_t
-  TYPE(DIMPHYEX_t),       INTENT(IN)    :: D
-  type(tbudgetdata),      intent(inout) :: tpbudget ! Budget datastructure
-  character(len=*),       intent(in)    :: hsource  ! Name of the source term
-  real, dimension(D%NIT,D%NJT,D%NKT), intent(in)    :: pvars    ! Current value to be stored
-!
-  call Budget_store_end(tpbudget, hsource, pvars)
-!
-end subroutine Budget_store_end_phy
-!
-subroutine Budget_store_add_phy(D, tpbudget, hsource, pvars)
-  USE MODD_DIMPHYEX, ONLY: DIMPHYEX_t
-  TYPE(DIMPHYEX_t),       INTENT(IN)    :: D
-  type(tbudgetdata),      intent(inout) :: tpbudget ! Budget datastructure
-  character(len=*),       intent(in)    :: hsource  ! Name of the source term
-  real, dimension(D%NIT,D%NJT,D%NKT), intent(in)    :: pvars    ! Current value to be stored
-!
-  call Budget_store_add(tpbudget, hsource, pvars)
-!
-end subroutine Budget_store_add_phy
-!
-subroutine Budget_store_init( tpbudget, hsource, pvars )
-  use modd_les, only: lles_call
-
-  type(tbudgetdata),      intent(inout) :: tpbudget ! Budget datastructure
-  character(len=*),       intent(in)    :: hsource  ! Name of the source term
-  real, dimension(:,:,:), intent(in)    :: pvars    ! Current value to be stored
-
-  integer :: iid ! Reference number of the current source term
-
-  call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_store_init', trim( tpbudget%cname )//':'//trim( hsource ) )
-
-  if ( lles_call ) then
-    call Second_mnh( ztime1 )
-
-    if ( allocated( tpbudget%xtmplesstore ) ) then
-      call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_init', 'xtmplesstore already allocated' )
-    else
-      allocate( tpbudget%xtmplesstore( Size( pvars, 1 ), Size( pvars, 2 ), Size ( pvars, 3 )  ) )
-    end if
-    tpbudget%xtmplesstore(:, :, :) = pvars(:, :, :)
-
-    tpbudget%clessource = hsource
-
-    call Second_mnh( ztime2 )
-    xtime_les_bu         = xtime_les_bu         + ztime2 - ztime1
-    xtime_les_bu_process = xtime_les_bu_process + ztime2 - ztime1
-  end if
-
-  ! Nothing else to do if budgets are not enabled
-  if ( .not. tpbudget%lenabled ) return
-
-  call Second_mnh( ztime1 )
-
-  call Budget_source_id_find( tpbudget, hsource, iid )
-
-  if ( tpbudget%ntmpstoresource /= 0 ) then
-    cmnhmsg(1) = 'ntmpstoresource already set (previous call to '//'Budget_store_end missing?)'
-    cmnhmsg(2) = 'Set for:    ' // Trim( tpbudget%cname ) // ':' // Trim( tpbudget%tsources(tpbudget%ntmpstoresource)%cmnhname )
-    cmnhmsg(3) = 'Working on: ' // Trim( tpbudget%cname ) // ':' // Trim( hsource )
-    call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_init' )
-  end if
-
-  if ( tpbudget%tsources(iid)%ldonotinit ) then
-    ! If ldonotinit is set, this subroutine should not be called
-    call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_init', 'should not be called for ' &
-                    //trim( tpbudget%cname )//':'//trim( hsource ) )
-    return
-  end if
-
-  if ( tpbudget%tsources(iid)%lenabled ) then
-    if ( tpbudget%ntmpstoresource /= 0 ) then
-      call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_init', 'xtmpstore already used by ' &
-                      //trim( tpbudget%tsources(tpbudget%ntmpstoresource)%cmnhname ) )
-      return
-    end if
-
-    tpbudget%ntmpstoresource = iid
-
-    !Store data into the budget temporary array
-    !This value will be subtracted from the next one (in Budget_store_end) to get the evolution of the array between the 2 calls
-    if ( cbutype == 'CART' ) then
-      tpbudget%xtmpstore(:, :, :) = Cart_compress( pvars(:, :, :) )
-    else if ( cbutype == 'MASK' ) then
-      tpbudget%xtmpstore(:, nbutime, :) = Mask_compress( pvars(:, :, :) )
-    else
-      call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_init', 'unknown cbutype: '//trim( cbutype ) )
-    end if
-  end if
-
-  call Second_mnh( ztime2 )
-  xtime_bu         = xtime_bu         + ztime2 - ztime1
-  xtime_bu_process = xtime_bu_process + ztime2 - ztime1
-
-  end subroutine Budget_store_init
-
-
-subroutine Budget_store_end( tpbudget, hsource, pvars )
-  use modd_les, only: lles_call
-
-  use modi_les_budget, only: Les_budget
-
-  type(tbudgetdata),      intent(inout) :: tpbudget ! Budget datastructure
-  character(len=*),       intent(in) :: hsource     ! Name of the source term
-  real, dimension(:,:,:), intent(in) :: pvars       ! Current value to be stored
-
-  integer :: iid    ! Reference number of the current source term
-  integer :: igroup ! Number of the group where to store the source term
-  real, dimension(:,:,:), allocatable :: zvars_add
-
-  call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_store_end', trim( tpbudget%cname )//':'//trim( hsource ) )
-
-  if ( lles_call ) then
-    if ( hsource /= tpbudget%clessource ) &
-      call Print_msg( NVERB_FATAL, 'BUD', 'Budget_store_end', 'hsource not the same as in Budget_store_init (' &
-                      // Trim( hsource ) // ' / ' // Trim( tpbudget%clessource ) // ')' )
-
-    tpbudget%clessource = 'reset'
-
-    if ( allocated( tpbudget%xtmplesstore ) ) then
-      ! Do the call to Les_budget with oadd=.true.
-      ! This is necessary when the call to Budget_store_init was done with pvars not strictly
-      ! equal to the source term
-      Allocate( zvars_add( Size( pvars, 1 ), Size( pvars, 2 ), Size ( pvars, 3 ) ) )
-      zvars_add(:, :, :) = pvars(:, :, :) - tpbudget%xtmplesstore(:, :, :)
-      call Les_budget( zvars_add, tpbudget%nid, hsource, oadd = .true. )
-      Deallocate( zvars_add )
-      Deallocate( tpbudget%xtmplesstore )
-    else
-      call Les_budget( pvars, tpbudget%nid, hsource, oadd = .false. )
-    end if
-  end if
-
-  ! Nothing to do if budgets are not enabled
-  if ( .not. tpbudget%lenabled ) return
-
-  call Second_mnh( ztime1 )
-
-  call Budget_source_id_find( tpbudget, hsource, iid )
-
-  if ( tpbudget%tsources(iid)%lenabled ) then
-    if ( iid /= tpbudget%ntmpstoresource .and. .not.tpbudget%tsources(iid)%ldonotinit ) then
-      if ( tpbudget%ntmpstoresource == 0 ) then
-        call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_end', 'ntmpstoresource not set for ' &
-                        //trim( tpbudget%tsources(iid)%cmnhname ) )
-      else
-        call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_end', 'xtmpstore used by an other source: '    &
-                        //trim( tpbudget%tsources(tpbudget%ntmpstoresource)%cmnhname )//', expected: '   &
-                        //trim( tpbudget%tsources(iid)%cmnhname ) )
-      end if
-    end if
-
-    !Store data into the budget array
-    !The values are computed by the difference between the values stored in the temporary array (filled in Budget_store_init)
-    !and the current values added to the already stored ones.
-    !Except if ldonotinit is true. In that case, overwrite the array.
-    igroup = tpbudget%tsources(iid)%ngroup
-    if ( cbutype == 'CART' ) then
-      if ( tpbudget%tsources(iid)%ldonotinit ) then
-        if ( tpbudget%tsources(iid)%loverwrite ) then
-          tpbudget%tgroups(igroup)%xdata(:, :, :) =   Cart_compress( pvars(:, :, :) )
-        else
-          tpbudget%tgroups(igroup)%xdata(:, :, :) =   tpbudget%tgroups(igroup)%xdata(:, :, :) &
-                                                    + Cart_compress( pvars(:, :, :) )
-        end if
-      else
-        if ( tpbudget%tsources(iid)%loverwrite ) then
-          tpbudget%tgroups(igroup)%xdata(:, :, :) =   Cart_compress( pvars(:, :, :) )          &
-                                                    - tpbudget%xtmpstore(:, :, :)
-        else
-          tpbudget%tgroups(igroup)%xdata(:, :, :) =   tpbudget%tgroups(igroup)%xdata(:, :, :) &
-                                                     + Cart_compress( pvars(:, :, :) )          &
-                                                     - tpbudget%xtmpstore(:, :, :)
-        end if
-      end if
-    else if ( cbutype == 'MASK' ) then
-      if ( tpbudget%tsources(iid)%ldonotinit ) then
-        if ( tpbudget%tsources(iid)%loverwrite ) then
-          tpbudget%tgroups(igroup)%xdata(:, nbutime, :) =   Mask_compress( pvars(:, :, :) )
-        else
-          tpbudget%tgroups(igroup)%xdata(:, nbutime, :) =   tpbudget%tgroups(igroup)%xdata(:, nbutime, :) &
-                                                           + Mask_compress( pvars(:, :, :) )
-        end if
-      else
-        if ( tpbudget%tsources(iid)%loverwrite ) then
-          tpbudget%tgroups(igroup)%xdata(:, nbutime, :) =   Mask_compress( pvars(:, :, :) )   &
-                                                          - tpbudget%xtmpstore(:, nbutime, :)
-        else
-          tpbudget%tgroups(igroup)%xdata(:, nbutime, :) =   tpbudget%tgroups(igroup)%xdata(:, nbutime, :) &
-                                                          + Mask_compress( pvars(:, :, :) )                &
-                                                          - tpbudget%xtmpstore(:, nbutime, :)
-        end if
-      end if
-    else
-      call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_end', 'unknown cbutype: '//trim( cbutype ) )
-    end if
-
-    ! Release the budget temporary array
-    tpbudget%ntmpstoresource = 0
-  end if
-
-  call Second_mnh( ztime2 )
-  xtime_bu         = xtime_bu         + ztime2 - ztime1
-  xtime_bu_process = xtime_bu_process + ztime2 - ztime1
-
-end subroutine Budget_store_end
-
-
-subroutine Budget_store_add( tpbudget, hsource, pvars )
-  use modd_les, only: lles_call
-
-  use modi_les_budget, only: Les_budget
-
-  type(tbudgetdata),      intent(inout) :: tpbudget ! Budget datastructure
-  character(len=*),       intent(in) :: hsource     ! Name of the source term
-  real, dimension(:,:,:), intent(in) :: pvars       ! Current value to be stored
-
-  integer :: iid    ! Reference number of the current source term
-  integer :: igroup ! Number of the group where to store the source term
-
-  call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_store_add', trim( tpbudget%cname )//':'//trim( hsource ) )
-
-  if ( tpbudget%ntmpstoresource /= 0 ) &
-    call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_add', 'inside a Budget_store_init/Budget_store_end zone' )
-
-  if ( lles_call ) call Les_budget( pvars, tpbudget%nid, hsource, oadd = .true. )
-
-  ! Nothing to do if budgets are not enabled
-  if ( .not. tpbudget%lenabled ) return
-
-  call Second_mnh( ztime1 )
-
-  call Budget_source_id_find( tpbudget, hsource, iid )
-
-  if ( tpbudget%tsources(iid)%lenabled ) then
-    if ( tpbudget%tsources(iid)%loverwrite ) &
-      call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_add', 'loverwrite=.true. is not allowed' )
-
-    !Store data into the budget array
-    igroup = tpbudget%tsources(iid)%ngroup
-    if ( cbutype == 'CART' ) then
-      tpbudget%tgroups(igroup)%xdata(:, :, :) =   tpbudget%tgroups(igroup)%xdata(:, :, :) &
-                                                + Cart_compress( pvars(:, :, :) )
-    else if ( cbutype == 'MASK' ) then
-      tpbudget%tgroups(igroup)%xdata(:, nbutime, :) =   tpbudget%tgroups(igroup)%xdata(:, nbutime, :) &
-                                                      + Mask_compress( pvars(:, :, :) )
-    else
-      call Print_msg( NVERB_ERROR, 'BUD', 'Budget_store_add', 'unknown cbutype: '//trim( cbutype ) )
-    end if
-  end if
-
-  call Second_mnh( ztime2 )
-  xtime_bu         = xtime_bu         + ztime2 - ztime1
-  xtime_bu_process = xtime_bu_process + ztime2 - ztime1
-
-end subroutine Budget_store_add
-
-
-subroutine Budget_source_id_find( tpbudget, hsource, kid )
-  type(tbudgetdata), intent(in)  :: tpbudget ! Budget datastructure
-  character(len=*),  intent(in)  :: hsource  ! Name of the source term
-  integer,           intent(out) :: kid      ! Reference number of the current source term
-
-  integer :: iid
-  integer :: ji
-
-  call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_source_id_find', trim( tpbudget%cname )//':'//trim( hsource ) )
-
-  iid = 0
-  do ji = 1, tpbudget%nsources
-    if ( trim( hsource ) == trim( tpbudget%tsources(ji)%cmnhname ) ) then
-      iid = ji
-      exit
-    end if
-  end do
-
-  if ( iid > 0 ) then
-    call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_source_id_find', trim( tpbudget%cname )//':'//trim( hsource )//' found' )
-  else
-    !Search also in the non-available source term list
-    do ji = tpbudget%nsources + 1, tpbudget%nsourcesmax
-      if ( trim( hsource ) == trim( tpbudget%tsources(ji)%cmnhname ) ) then
-        iid = ji
-        exit
-      end if
-    end do
-
-    if ( iid == 0 ) then
-      call Print_msg( NVERB_ERROR, 'BUD', 'Budget_source_id_find', trim( tpbudget%cname )//':'//trim( hsource )//' not found' )
-    else
-      cmnhmsg(1) = Trim( tpbudget%cname ) // ':' // Trim( hsource ) // ' found'
-      cmnhmsg(2) = 'in non-available source term list.'
-      cmnhmsg(3) = 'Check availability condition in Ini_budget.'
-      call Print_msg( NVERB_ERROR, 'BUD', 'Budget_source_id_find' )
-    end if
-  end if
-
-  kid = iid
-end subroutine Budget_source_id_find
-
-end module mode_budget
diff --git a/src/mesonh/aux/mode_budget_phy.f90 b/src/mesonh/aux/mode_budget_phy.f90
new file mode 100644
index 000000000..04a610d20
--- /dev/null
+++ b/src/mesonh/aux/mode_budget_phy.f90
@@ -0,0 +1,62 @@
+!MNH_LIC Copyright 1994-2021 CNRS, Meteo-France and Universite Paul Sabatier
+!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
+!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
+!MNH_LIC for details. version 1.
+!-----------------------------------------------------------------
+! Modifications
+!  P. Wautelet 28/01/2020: new SUBROUTINEs: Budget_store_init, Budget_store_end and Budget_source_id_find in new module mode_budget
+!  P. Wautelet 17/08/2020: treat LES budgets correctly
+!  P. Wautelet 05/03/2021: measure cpu_time for budgets
+!-----------------------------------------------------------------
+
+!#################
+MODULE MODE_BUDGET_PHY
+!#################
+
+USE MODD_BUDGET, ONLY: TBUDGETDATA
+USE MODD_DIMPHYEX, ONLY: DIMPHYEX_t
+
+IMPLICIT NONE
+
+PRIVATE
+
+PUBLIC :: Budget_store_init_phy
+PUBLIC :: Budget_store_end_phy
+PUBLIC :: Budget_store_add_phy
+
+CONTAINS
+
+SUBROUTINE Budget_store_init_phy(D, tpbudget, hsource, pvars)
+  USE MODE_BUDGET, ONLY: BUDGET_STORE_INIT
+  TYPE(DIMPHYEX_t),       INTENT(IN)    :: D
+  type(tbudgetdata),      intent(inout) :: tpbudget ! Budget datastructure
+  character(len=*),       intent(in)    :: hsource  ! Name of the source term
+  real, dimension(D%NIT,D%NJT,D%NKT), intent(in)    :: pvars    ! Current value to be stored
+!
+  CALL Budget_store_init(tpbudget, hsource, pvars)
+!
+END SUBROUTINE Budget_store_init_phy
+!
+SUBROUTINE Budget_store_end_phy(D, tpbudget, hsource, pvars)
+  USE MODE_BUDGET, ONLY: BUDGET_STORE_END
+  TYPE(DIMPHYEX_t),       INTENT(IN)    :: D
+  type(tbudgetdata),      intent(inout) :: tpbudget ! Budget datastructure
+  character(len=*),       intent(in)    :: hsource  ! Name of the source term
+  real, dimension(D%NIT,D%NJT,D%NKT), intent(in)    :: pvars    ! Current value to be stored
+!
+  CALL Budget_store_end(tpbudget, hsource, pvars)
+!
+END SUBROUTINE Budget_store_end_phy
+!
+SUBROUTINE Budget_store_add_phy(D, tpbudget, hsource, pvars)
+  USE MODE_BUDGET,   ONLY: BUDGET_STORE_ADD
+  TYPE(DIMPHYEX_t),       INTENT(IN)    :: D
+  type(tbudgetdata),      intent(inout) :: tpbudget ! Budget datastructure
+  character(len=*),       intent(in)    :: hsource  ! Name of the source term
+  real, dimension(D%NIT,D%NJT,D%NKT), intent(in)    :: pvars    ! Current value to be stored
+!
+  CALL Budget_store_add(tpbudget, hsource, pvars)
+!
+END SUBROUTINE Budget_store_add_phy
+!
+END MODULE MODE_BUDGET_PHY
-- 
GitLab