From 5685b89701b47909ad848290eb683a41c9e9a7d9 Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Tue, 18 Aug 2020 16:13:26 +0200
Subject: [PATCH] Philippe 18/08/2020: budgets: bugfix: use tpbudget%lenabled
 instead of lbu_enable

---
 src/MNH/budget.f90 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/MNH/budget.f90 b/src/MNH/budget.f90
index 95f3a48d9..ef8c99224 100644
--- a/src/MNH/budget.f90
+++ b/src/MNH/budget.f90
@@ -12,7 +12,7 @@
 module mode_budget
 !#################
 
-use modd_budget, only: cbutype, lbu_enable, nbutime, tbudgetdata
+use modd_budget, only: cbutype, nbutime, tbudgetdata
 
 use modi_cart_compress, only: Cart_compress
 use modi_mask_compress, only: Mask_compress
@@ -51,7 +51,7 @@ subroutine Budget_store_init( tpbudget, hsource, pvars )
   end if
 
   ! Nothing else to do if budgets are not enabled
-  if ( .not. lbu_enable ) return
+  if ( .not. tpbudget%lenabled ) return
 
   call Budget_source_id_find( tpbudget, hsource, iid )
 
@@ -121,7 +121,7 @@ subroutine Budget_store_end( tpbudget, hsource, pvars )
   end if
 
   ! Nothing to do if budgets are not enabled
-  if ( .not. lbu_enable ) return
+  if ( .not. tpbudget%lenabled ) return
 
   call Budget_source_id_find( tpbudget, hsource, iid )
 
@@ -206,7 +206,7 @@ subroutine Budget_store_add( tpbudget, hsource, pvars )
   if ( lles_call ) call Les_budget( pvars, tpbudget%nid, hsource, oadd = .true. )
 
   ! Nothing to do if budgets are not enabled
-  if ( .not. lbu_enable ) return
+  if ( .not. tpbudget%lenabled ) return
 
   call Budget_source_id_find( tpbudget, hsource, iid )
 
-- 
GitLab