Skip to content
Snippets Groups Projects
Commit d9a3b06e authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 27/06/2024: PHYEX: mode_prandtl: bugfix for dry case

parent 2a4dc520
No related branches found
No related tags found
No related merge requests found
!MNH_LIC Copyright 1994-2020 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC Copyright 1994-2024 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
......@@ -551,18 +551,12 @@ DO JSV=1,KSV
!
CALL GX_M_M_PHY(D,OFLAT,PSVM(:,:,JSV),PDXX,PDZZ,PDZX,ZGXMM_PSV)
CALL GX_M_M_PHY(D,OFLAT,PTHLM,PDXX,PDZZ,PDZX,ZGXMM_PTH)
CALL GX_M_M_PHY(D,OFLAT,PRM(:,:,1),PDXX,PDZZ,PDZX,ZGXMM_PRM)
!
!$mnh_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
ZWORK1(:,:) = ZGXMM_PSV(:,:) * ZGXMM_PTH(:,:)
!$mnh_end_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
CALL MZM_PHY(D,ZWORK1,ZWORK2)
!
!$mnh_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
ZWORK1(:,:) = ZGXMM_PSV(:,:) * ZGXMM_PRM(:,:)
!$mnh_end_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
CALL MZM_PHY(D,ZWORK1,ZWORK3)
!
!$mnh_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
IF (KRR /= 0) THEN
ZWORK1(:,:) = ZW1(:,:)*PETHETA(:,:)
......@@ -573,6 +567,13 @@ DO JSV=1,KSV
ZWORK1(:,:) * ZWORK2(:,:)
!
IF (KRR /= 0) THEN
CALL GX_M_M_PHY(D,OFLAT,PRM(:,:,1),PDXX,PDZZ,PDZX,ZGXMM_PRM)
!
!$mnh_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
ZWORK1(:,:) = ZGXMM_PSV(:,:) * ZGXMM_PRM(:,:)
!$mnh_end_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
CALL MZM_PHY(D,ZWORK1,ZWORK3)
!
PRED2RS3(:,:,JSV) = PREDR1(:,:) * PREDS1(:,:,JSV) + &
ZW1(:,:) * PEMOIST(:,:) * ZWORK3(:,:)
ELSE
......@@ -605,10 +606,8 @@ DO JSV=1,KSV
!
CALL GX_M_M_PHY(D,OFLAT,PSVM(:,:,JSV),PDXX,PDZZ,PDZX,ZGXMM_PSV)
CALL GX_M_M_PHY(D,OFLAT,PTHLM,PDXX,PDZZ,PDZX,ZGXMM_PTH)
CALL GX_M_M_PHY(D,OFLAT,PRM(:,:,1),PDXX,PDZZ,PDZX,ZGXMM_PRM)
CALL GY_M_M_PHY(D,OFLAT,PSVM(:,:,JSV),PDYY,PDZZ,PDZY,ZGYMM_PSV)
CALL GY_M_M_PHY(D,OFLAT,PTHLM,PDYY,PDZZ,PDZY,ZGYMM_PTH)
CALL GY_M_M_PHY(D,OFLAT,PRM(:,:,1),PDYY,PDZZ,PDZY,ZGYMM_PRM)
!
!$mnh_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
ZWORK1(:,:) = ZGXMM_PSV(:,:) * ZGXMM_PTH(:,:) &
......@@ -616,13 +615,15 @@ DO JSV=1,KSV
!$mnh_end_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
CALL MZM_PHY(D,ZWORK1,ZWORK2)
!
!$mnh_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
ZWORK1(:,:) = ZGXMM_PSV(:,:) * ZGXMM_PRM(:,:) &
+ ZGYMM_PSV(:,:) * ZGYMM_PRM(:,:)
!$mnh_end_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
CALL MZM_PHY(D,ZWORK1,ZWORK3)
!
IF (KRR /= 0) THEN
CALL GX_M_M_PHY(D,OFLAT,PRM(:,:,1),PDXX,PDZZ,PDZX,ZGXMM_PRM)
CALL GY_M_M_PHY(D,OFLAT,PRM(:,:,1),PDYY,PDZZ,PDZY,ZGYMM_PRM)
!
!$mnh_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
ZWORK1(:,:) = ZGXMM_PSV(:,:) * ZGXMM_PRM(:,:) + ZGYMM_PSV(:,:) * ZGYMM_PRM(:,:)
!$mnh_end_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
CALL MZM_PHY(D,ZWORK1,ZWORK3)
!
!$mnh_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
ZWORK1(:,:) = ZW1(:,:)*PETHETA(:,:)
!$mnh_end_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment