From 59d8050e03f6f642eb433fa1bf02e42f22867f91 Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Wed, 6 May 2020 12:01:38 +0200
Subject: [PATCH] Philippe 06/05/2020: budgets: bugfix: add missing condition
 for call to Budget_store_init for PRES budget

---
 src/MNH/modeln.f90 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/MNH/modeln.f90 b/src/MNH/modeln.f90
index 51d29f1f8..d1bd8dbf3 100644
--- a/src/MNH/modeln.f90
+++ b/src/MNH/modeln.f90
@@ -1618,9 +1618,11 @@ ZRUS=XRUS
 ZRVS=XRVS
 ZRWS=XRWS
 
-if ( lbudget_u ) call Budget_store_init( tbudgets(NBUDGET_U), 'PRES', xrus(:, :, :) )
-if ( lbudget_v ) call Budget_store_init( tbudgets(NBUDGET_V), 'PRES', xrvs(:, :, :) )
-if ( lbudget_w ) call Budget_store_init( tbudgets(NBUDGET_W), 'PRES', xrws(:, :, :) )
+if ( .not. l1d ) then
+  if ( lbudget_u ) call Budget_store_init( tbudgets(NBUDGET_U), 'PRES', xrus(:, :, :) )
+  if ( lbudget_v ) call Budget_store_init( tbudgets(NBUDGET_V), 'PRES', xrvs(:, :, :) )
+  if ( lbudget_w ) call Budget_store_init( tbudgets(NBUDGET_W), 'PRES', xrws(:, :, :) )
+end if
 
 CALL RAD_BOUND (CLBCX,CLBCY,CTURB,XCARPKMAX,             &
                 XTSTEP,                                  &
-- 
GitLab