From 0bebde98489cd33ba1991fd11f67568900457dff Mon Sep 17 00:00:00 2001
From: Juan Escobar <escj@aero.obs-mip.fr>
Date: Tue, 17 Oct 2017 18:07:52 +0200
Subject: [PATCH] Juan 17/10/2017: for real*4, use XMNH_EPSILON & XMNH_HUGE

---
 src/MNH/lima_warm.f90      | 3 ++-
 src/MNH/lima_warm_nucl.f90 | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/MNH/lima_warm.f90 b/src/MNH/lima_warm.f90
index 58098af61..653ae66e3 100644
--- a/src/MNH/lima_warm.f90
+++ b/src/MNH/lima_warm.f90
@@ -120,6 +120,7 @@ END MODULE MODI_LIMA_WARM
 !!    -------------
 !!      Original             ??/??/13 
 !!      C. Barthe  * LACy *  jan. 2014   add budgets
+!!      J. Escobar : for real*4 , use XMNH_HUGE
 !!
 !-------------------------------------------------------------------------------
 !
@@ -283,7 +284,7 @@ END IF
 !   	        ----------------------------------------
 !
 !
-ZWLBDC3(:,:,:) = 1.E45
+ZWLBDC3(:,:,:) = XMNH_HUGE
 ZWLBDC(:,:,:)  = 1.E15
 !
 WHERE (PRCT(:,:,:)>XRTMIN(2) .AND. PCCT(:,:,:)>XCTMIN(2))
diff --git a/src/MNH/lima_warm_nucl.f90 b/src/MNH/lima_warm_nucl.f90
index af3de3889..ea473aa91 100644
--- a/src/MNH/lima_warm_nucl.f90
+++ b/src/MNH/lima_warm_nucl.f90
@@ -95,6 +95,7 @@ END MODULE MODI_LIMA_WARM_NUCL
 !!    MODIFICATIONS
 !!    -------------
 !!      Original             ??/??/13 
+!!      J. Escobar : 10/2017 , for real*4 use XMNH_EPSILON
 !!
 !-------------------------------------------------------------------------------
 !
@@ -739,7 +740,7 @@ INTEGER                        :: PIVEC1
 ALLOCATE(PFUNCSMAX(NPTS))
 !
 PFUNCSMAX(:) = 0.
-PZVEC1 = MAX( 1.00001,MIN( FLOAT(NHYP)-0.00001,               &
+PZVEC1 = MAX( ( 1.0 + 10.0 * XMNH_EPSILON ) ,MIN( FLOAT(NHYP)*( 1.0 - 10.0 * XMNH_EPSILON ) ,               &
                            XHYPINTP1*LOG(PPZSMAX)+XHYPINTP2 ) )
 PIVEC1 = INT( PZVEC1 )
 PZVEC1 = PZVEC1 - FLOAT( PIVEC1 )
-- 
GitLab