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

Philippe 12/02/2019: bugfix: variables were not always initialized + ensure a...

Philippe 12/02/2019: bugfix: variables were not always initialized + ensure a variable is always positive
parent 07df4243
No related branches found
No related tags found
No related merge requests found
!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC Copyright 2007-2019 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 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 version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1. !MNH_LIC for details. version 1.
! ################################ ! ################################
MODULE MODI_CH_AQUEOUS_SEDIM1MOM MODULE MODI_CH_AQUEOUS_SEDIM1MOM
...@@ -79,6 +79,7 @@ END MODULE MODI_CH_AQUEOUS_SEDIM1MOM ...@@ -79,6 +79,7 @@ END MODULE MODI_CH_AQUEOUS_SEDIM1MOM
!! 17/09/10 (M Leriche) add LUSECHIC flag !! 17/09/10 (M Leriche) add LUSECHIC flag
!! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 !! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1
!! 16/12/15 (M Leriche) compute instantaneous rain at the surface !! 16/12/15 (M Leriche) compute instantaneous rain at the surface
! P. Wautelet 12/02/2019: bugfix: ZRR_SEDIM was not initialized everywhere
!! !!
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
...@@ -268,6 +269,7 @@ DO JN = 1 , KSPLITR ...@@ -268,6 +269,7 @@ DO JN = 1 , KSPLITR
! !
ZZW(:) = ZFSEDR * ZZZRRS(:)**(ZEXSEDR) * ZRHODREF(:)**(ZEXSEDR-ZCEXVT) ZZW(:) = ZFSEDR * ZZZRRS(:)**(ZEXSEDR) * ZRHODREF(:)**(ZEXSEDR-ZCEXVT)
ZWSED(:,:,:) = UNPACK( ZZW(:),MASK=GSEDIMR(:,:,:),FIELD=0.0 ) ZWSED(:,:,:) = UNPACK( ZZW(:),MASK=GSEDIMR(:,:,:),FIELD=0.0 )
ZRR_SEDIM(:,:,:) = 0.0
DO JK = IKB , IKE DO JK = IKB , IKE
ZRR_SEDIM(:,:,JK) = ZW(:,:,JK)*(ZWSED(:,:,JK+1)-ZWSED(:,:,JK)) ZRR_SEDIM(:,:,JK) = ZW(:,:,JK)*(ZWSED(:,:,JK+1)-ZWSED(:,:,JK))
END DO END DO
...@@ -308,6 +310,7 @@ DO JN = 1 , KSPLITR ...@@ -308,6 +310,7 @@ DO JN = 1 , KSPLITR
! !
ZZW(:) = XFSEDS * ZZZRSS(:)**(XEXSEDS) * ZRHODREF(:)**(XEXSEDS-ZCEXVT) ZZW(:) = XFSEDS * ZZZRSS(:)**(XEXSEDS) * ZRHODREF(:)**(XEXSEDS-ZCEXVT)
ZWSED(:,:,:) = UNPACK( ZZW(:),MASK=GSEDIMS(:,:,:),FIELD=0.0 ) ZWSED(:,:,:) = UNPACK( ZZW(:),MASK=GSEDIMS(:,:,:),FIELD=0.0 )
ZRR_SEDIM(:,:,:) = 0.0
DO JK = IKB , IKE DO JK = IKB , IKE
ZRR_SEDIM(:,:,JK) = ZW(:,:,JK)*(ZWSED(:,:,JK+1)-ZWSED(:,:,JK)) ZRR_SEDIM(:,:,JK) = ZW(:,:,JK)*(ZWSED(:,:,JK+1)-ZWSED(:,:,JK))
END DO END DO
...@@ -336,6 +339,7 @@ DO JN = 1 , KSPLITR ...@@ -336,6 +339,7 @@ DO JN = 1 , KSPLITR
! !
ZZW(:) = XFSEDG * ZZZRGS(:)**(XEXSEDG) * ZRHODREF(:)**(XEXSEDG-ZCEXVT) ZZW(:) = XFSEDG * ZZZRGS(:)**(XEXSEDG) * ZRHODREF(:)**(XEXSEDG-ZCEXVT)
ZWSED(:,:,:) = UNPACK( ZZW(:),MASK=GSEDIMG(:,:,:),FIELD=0.0 ) ZWSED(:,:,:) = UNPACK( ZZW(:),MASK=GSEDIMG(:,:,:),FIELD=0.0 )
ZRR_SEDIM(:,:,:) = 0.0
DO JK = IKB , IKE DO JK = IKB , IKE
ZRR_SEDIM(:,:,JK) = ZW(:,:,JK)*(ZWSED(:,:,JK+1)-ZWSED(:,:,JK)) ZRR_SEDIM(:,:,JK) = ZW(:,:,JK)*(ZWSED(:,:,JK+1)-ZWSED(:,:,JK))
END DO END DO
......
!MNH_LIC Copyright 1994-2018 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC Copyright 1995-2019 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 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 version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1. !MNH_LIC for details. version 1.
!! ######################## !! ########################
MODULE MODI_CH_MONITOR_n MODULE MODI_CH_MONITOR_n
...@@ -113,6 +113,7 @@ END MODULE MODI_CH_MONITOR_n ...@@ -113,6 +113,7 @@ END MODULE MODI_CH_MONITOR_n
!! 20/01/17 (G.Delautier) bug if CPROGRAM/=DIAG !! 20/01/17 (G.Delautier) bug if CPROGRAM/=DIAG
!! 01/10/17 (C.Lac) add correction of negativity !! 01/10/17 (C.Lac) add correction of negativity
!! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O
! P. Wautelet 12/02/2019: bugfix: ZINPRR was not initialized all the time
!! !!
!! EXTERNAL !! EXTERNAL
!! -------- !! --------
...@@ -845,6 +846,8 @@ IF (LUSECHAQ.AND.(NRRL>=2) ) THEN ...@@ -845,6 +846,8 @@ IF (LUSECHAQ.AND.(NRRL>=2) ) THEN
XRSVS(:,:,:,NSV_CHACBEG+NEQAQ/2:NSV_CHACEND),& XRSVS(:,:,:,NSV_CHACBEG+NEQAQ/2:NSV_CHACEND),&
ZINPRR(:,:) ) ZINPRR(:,:) )
END SELECT END SELECT
ELSE
ZINPRR(:,:) = 0.
END IF END IF
ELSE IF (LUSECHAQ.AND.(NRRL==1) ) THEN ELSE IF (LUSECHAQ.AND.(NRRL==1) ) THEN
CALL CH_AQUEOUS_CHECK (PTSTEP, XRHODREF, XRHODJ, XRRS, XRSVS, NRRL, & CALL CH_AQUEOUS_CHECK (PTSTEP, XRHODREF, XRHODJ, XRRS, XRSVS, NRRL, &
......
!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC Copyright 1995-2019 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 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 version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1. !MNH_LIC for details. version 1.
!----------------------------------------------------------------- !-----------------------------------------------------------------
!--------------- special set of characters for RCS information
!-----------------------------------------------------------------
! $Source$ $Revision$
! MASDEV4_7 conv 2006/05/18 13:07:25
!-----------------------------------------------------------------
! ################# ! #################
MODULE MODI_CONVECT_UPDRAFT MODULE MODI_CONVECT_UPDRAFT
! ################# ! #################
...@@ -149,6 +144,7 @@ END MODULE MODI_CONVECT_UPDRAFT ...@@ -149,6 +144,7 @@ END MODULE MODI_CONVECT_UPDRAFT
!! Original 07/11/95 !! Original 07/11/95
!! Last modified 10/12/97 !! Last modified 10/12/97
!! V.Masson, C.Lac, Sept. 2010 : Correction of a loop for reproducibility !! V.Masson, C.Lac, Sept. 2010 : Correction of a loop for reproducibility
! P. Wautelet 12/02/2019: bugfix: PURR/PURS were sometimes =-0. -> problems later
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
!* 0. DECLARATIONS !* 0. DECLARATIONS
...@@ -384,7 +380,9 @@ DO JK = MAX( IKB + 1, JKMIN ), IKE - 1 ...@@ -384,7 +380,9 @@ DO JK = MAX( IKB + 1, JKMIN ), IKE - 1
PUTPR(:) = PUTPR(:) + PUPR(:,JKP) ! total precipitation rate PUTPR(:) = PUTPR(:) + PUPR(:,JKP) ! total precipitation rate
ZWORK2(:) = PURR(:,JKP) / MAX( 1.E-8, PURC(:,JKP) + PURI(:,JKP) ) ZWORK2(:) = PURR(:,JKP) / MAX( 1.E-8, PURC(:,JKP) + PURI(:,JKP) )
PURR(:,JKP) = ZWORK2(:) * PURC(:,JKP) ! liquid precipitation PURR(:,JKP) = ZWORK2(:) * PURC(:,JKP) ! liquid precipitation
PURR(:,JKP)=MAX(TINY(0.),PURR(:,JKP)) !To prevent problems when =-0. (occur sometimes)
PURS(:,JKP) = ZWORK2(:) * PURI(:,JKP) ! solid precipitation PURS(:,JKP) = ZWORK2(:) * PURI(:,JKP) ! solid precipitation
PURS(:,JKP)=MAX(TINY(0.),PURS(:,JKP)) !To prevent problems when =-0. (occur sometimes)
! !
! !
!* 7. Update r_c, r_i, enthalpy, r_w for precipitation !* 7. Update r_c, r_i, enthalpy, r_w for precipitation
......
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