From dfb1c4d67edfb25e272ddf68ab17bde726be1624 Mon Sep 17 00:00:00 2001
From: Pierre Tulet <pierre.tulet@aero.obs-mip.fr>
Date: Mon, 22 May 2023 17:47:00 +0200
Subject: [PATCH] P.Tulet 22/02/23: XINISIGI et XINISIGJ au lieu de XSIGIMIN et
 XSIGJMIN. XINISIGI et XINISIGJ instead of  XSIGIMIN et XSIGJMIN.

---
 src/MNH/ch_aer_trans.f90 | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/MNH/ch_aer_trans.f90 b/src/MNH/ch_aer_trans.f90
index d8844d117..400ccec1f 100644
--- a/src/MNH/ch_aer_trans.f90
+++ b/src/MNH/ch_aer_trans.f90
@@ -95,16 +95,16 @@ CHARACTER(LEN=10),        INTENT(IN) :: HSCHEME
 !
 !*      0.2    declarations local variables
 !
-INTEGER :: JJ, JN  ! loop counter
+INTEGER :: JJ, JN, II  ! loop counter
 !   variables for the aerosol module
 !
 REAL, DIMENSION(SIZE(PM,1)) :: ZSIGMA
 REAL, DIMENSION(SIZE(PM,1)) :: ZSUM
 REAL, SAVE, DIMENSION(JPIN) :: ZPMIN
 LOGICAL, SAVE               :: GPHYSLIM = .TRUE. ! flag
-REAL :: ZRGMIN
+REAL, SAVE    :: ZRGMIN
 REAL, PARAMETER :: ZCSTAVOG=6.0221367E+11
-REAL    :: ZINIRADIUSI, ZINIRADIUSJ
+REAL, SAVE    :: ZINIRADIUSI, ZINIRADIUSJ
 
 
 !
@@ -128,13 +128,13 @@ END IF
 
 ZPMIN(1) = XN0IMIN
 ZRGMIN = ZINIRADIUSI
-ZPMIN(2) = ZPMIN(1) * (ZRGMIN**3)*EXP(4.5 * LOG(XSIGIMIN)**2) 
-ZPMIN(3) = ZPMIN(1) * (ZRGMIN**6)*EXP(18. * LOG(XSIGIMIN)**2)
+ZPMIN(2) = ZPMIN(1) * (ZRGMIN**3)*EXP(4.5 * LOG(XINISIGI)**2) 
+ZPMIN(3) = ZPMIN(1) * (ZRGMIN**6)*EXP(18. * LOG(XINISIGI)**2)
 
 ZPMIN(4) = XN0JMIN
 ZRGMIN = ZINIRADIUSJ
-ZPMIN(5) = ZPMIN(4) * (ZRGMIN**3)*EXP(4.5 * LOG(XSIGJMIN)**2) 
-ZPMIN(6) = ZPMIN(4) * (ZRGMIN**6)*EXP(18. * LOG(XSIGJMIN)**2)
+ZPMIN(5) = ZPMIN(4) * (ZRGMIN**3)*EXP(4.5 * LOG(XINISIGJ)**2) 
+ZPMIN(6) = ZPMIN(4) * (ZRGMIN**6)*EXP(18. * LOG(XINISIGJ)**2)
 
 END IF
 
@@ -768,6 +768,8 @@ END IF
 !
 !*       1.n    transfer moment 0 from gas to aerosol variable
 !
+!print*,'aer_trans N0i =',MINVAL(PAERO(:,JP_CH_M0i)), MAXVAL(PAERO(:,JP_CH_M0i))
+!print*,'aer_trans N0j =',MINVAL(PAERO(:,JP_CH_M0j)), MAXVAL(PAERO(:,JP_CH_M0j))
   PM(:,1) = MAX(PAERO(:,JP_CH_M0i) * 1E+6, XMNH_TINY) ! convert from 1/cc to 1/m3
   PM(:,4) = MAX(PAERO(:,JP_CH_M0j) * 1E+6, XMNH_TINY) ! convert from 1/cc to 1/m3
 
@@ -892,7 +894,7 @@ PMASK(:,JN) = 1.
 END WHERE
 
 ENDDO
-
+  
 ELSE
 !
 !*       2.     TRANSFER FROM AEROSOL TO GAS  MODULE
-- 
GitLab