From 70890bd76b4d733ac02ff573e2c240a500fd913a Mon Sep 17 00:00:00 2001
From: Juan Escobar <escj@aero.obs-mip.fr>
Date: Mon, 3 Aug 2020 11:24:51 +0200
Subject: [PATCH] Juan 03/08/2020:sources_neg_correct.f90, bug <-> array of
 size(:,:,:,0) => return if krr=0

---
 src/MNH/sources_neg_correct.f90 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/MNH/sources_neg_correct.f90 b/src/MNH/sources_neg_correct.f90
index 7a0c80d42..8a6578c62 100644
--- a/src/MNH/sources_neg_correct.f90
+++ b/src/MNH/sources_neg_correct.f90
@@ -6,6 +6,7 @@
 ! Author: P. Wautelet 25/06/2020 (deduplication of code from advection_metsv, resolved_cloud and turb)
 ! Modifications:
 !  P. Wautelet 30/06/2020: remove non-local corrections in resolved_cloud for NEGA => new local corrections here
+!  J. Escobar  21/07/2020: bug <-> array of size(:,:,:,0) => return if krr=0
 !-----------------------------------------------------------------
 module mode_sources_neg_correct
 
@@ -50,6 +51,8 @@ integer :: jrmax
 integer :: jsv
 real, dimension(:, :, :), allocatable :: zt, zexn, zlv, zls, zcph, zcor
 
+if (krr .eq. 0 ) return
+
 if ( hbudname /= 'NEADV' .and. hbudname /= 'NECON' .and. hbudname /= 'NEGA' .and. hbudname /= 'NETUR' ) &
   call Print_msg( NVERB_WARNING, 'GEN', 'Sources_neg_correct', 'budget '//hbudname//' not yet tested' )
 
-- 
GitLab