From 10fed5c58a1fad248bd66053085cddb6d0098ced Mon Sep 17 00:00:00 2001
From: Juan Escobar <escj@aero.obs-mip.fr>
Date: Fri, 10 Jun 2022 18:22:56 +0200
Subject: [PATCH] M.Leriche 10/06/2022:ch_update_jvalues.f90,  correct J by the
 presence of clouds , if nrr >= 2

---
 src/MNH/ch_update_jvalues.f90 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/MNH/ch_update_jvalues.f90 b/src/MNH/ch_update_jvalues.f90
index f62d1d96e..4c4754b7b 100644
--- a/src/MNH/ch_update_jvalues.f90
+++ b/src/MNH/ch_update_jvalues.f90
@@ -85,7 +85,9 @@ END MODULE MODI_CH_UPDATE_JVALUES
 !!    -------------
 !!    Original 05/03/97
 !!    05/03/05  P. Tulet (CNRM/GMEI) Update for Arome
-!  P. Wautelet 10/04/2019: replace ABORT and STOP calls by Print_msg
+!!    P. Wautelet 10/04/2019: replace ABORT and STOP calls by Print_msg
+!!    M. Leriche 01/06/2022: correct J by the presence of clouds 
+!!    if nrr >= 2 and not nrr = 2 (meaning only cloud and water vapor)
 !!
 !!------------------------------------------------------------------------------
 !!
@@ -273,7 +275,7 @@ ELSE
     IF (.NOT.ALLOCATED(ZFCLD))  ALLOCATE(ZFCLD(1:IIU,1:IJU,1:IKU,JPJVMAX))
 !
      ZAZ3D(:,:,:) = PZZ(:,:,:)
-     IF (SIZE(PRT,4) == 2 ) THEN
+     IF (SIZE(PRT,4) >= 2 ) THEN
       ZLWC3D(:,:,:) = PRT(:,:,:,2) * PRHODREF(:,:,:)
      ELSE
       ZLWC3D(:,:,:) = 0.
-- 
GitLab