From 582bf44241d30ab0b85c84b3ad280ed523bdc6de Mon Sep 17 00:00:00 2001
From: Quentin Rodier <quentin.rodier@meteo.fr>
Date: Fri, 11 Dec 2020 17:32:56 +0100
Subject: [PATCH] Quentin 11/12/2020: temporary force the possible uncorrected
 negative values to be > 0. This commit should be reverted soon and the
 missing right correction of negative values of rv must be found

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

diff --git a/src/MNH/sources_neg_correct.f90 b/src/MNH/sources_neg_correct.f90
index 8a6578c62..8bd003713 100644
--- a/src/MNH/sources_neg_correct.f90
+++ b/src/MNH/sources_neg_correct.f90
@@ -90,6 +90,7 @@ CLOUD: select case ( hcloud )
            ( zcph(:, :, :) * zexn(:, :, :) )
       prrs(:, :, :, 2) = 0.
     end where
+    prrs(:,:,:,1) = max(0.0,prrs(:,:,:,1))
 
 
   case( 'ICE3', 'ICE4' )
@@ -141,6 +142,8 @@ CLOUD: select case ( hcloud )
         prrs(:, :, :, 4) = prrs(:, :, :, 4) - zcor(:, :, :)
       end where
     end if
+   prrs(:,:,:,1) = max(0.0,prrs(:,:,:,1))
+
 !
 !
   case( 'C2R2', 'KHKO' )
@@ -163,6 +166,8 @@ CLOUD: select case ( hcloud )
       prrs(:, :, :, 2) = 0.
       prsvs(:, :, :, nsv_c2r2beg + 1) = 0.
     end where
+    prrs(:,:,:,1) = max(0.0,prrs(:,:,:,1))
+
 !
 !
   case( 'LIMA' )
@@ -224,7 +229,7 @@ CLOUD: select case ( hcloud )
         deallocate( zcor )
       end if
     end if
-
+    prrs(:,:,:,1) = max(0.0,prrs(:,:,:,1))
     prsvs(:, :, :, nsv_lima_beg : nsv_lima_end) = Max( 0.0, prsvs(:, :, :, nsv_lima_beg : nsv_lima_end) )
 
 end select CLOUD
-- 
GitLab