diff --git a/src/arome/ext/aro_shallow_mf.F90 b/src/arome/ext/aro_shallow_mf.F90 index eb583c24ff16486b237abe3faf80f3b931d5c258..6029e44ee50d20715e123dfd68a1c6d61ed53ed6 100644 --- a/src/arome/ext/aro_shallow_mf.F90 +++ b/src/arome/ext/aro_shallow_mf.F90 @@ -67,6 +67,7 @@ USE MODD_PARAMETERS, ONLY: JPVEXT USE MODD_CST, ONLY: CST USE MODD_NEB, ONLY: NEB USE MODD_TURB_n, ONLY: TURBN +USE MODD_CTURB, ONLY: CSTURB USE MODD_PARAM_MFSHALL_n, ONLY: PARAM_MFSHALLN USE MODD_DIMPHYEX, ONLY: DIMPHYEX_t ! @@ -202,7 +203,7 @@ ZIMPL=1. ! ! --------------------------------- ! - CALL SHALLOW_MF(YLDIMPHYEX, CST, NEB, PARAM_MFSHALLN, TURBN, & + CALL SHALLOW_MF(YLDIMPHYEX, CST, NEB, PARAM_MFSHALLN, TURBN, CSTURB, & &KRR=KRR, KRRL=KRRL, KRRI=KRRI, KSV=KSV, & &HMF_UPDRAFT=HMF_UPDRAFT, HMF_CLOUD=HMF_CLOUD,HFRAC_ICE=HFRAC_ICE,OMIXUV=OMIXUV, & &ONOMIXLG=ONOMIXLG,KSV_LGBEG=KSV_LGBEG,KSV_LGEND=KSV_LGEND, & diff --git a/src/arome/ext/arp_shallow_mf.F90 b/src/arome/ext/arp_shallow_mf.F90 index d79db7626e6282b7d58e5945fe65be029cb2e1db..1a5193bc91f7bb1f71a7cc7c6ea02743dd4efc03 100644 --- a/src/arome/ext/arp_shallow_mf.F90 +++ b/src/arome/ext/arp_shallow_mf.F90 @@ -59,6 +59,7 @@ USE YOMCST , ONLY : RG, RATM, RKAPPA, RD, RCPD, RCPV USE MODD_CST, ONLY: CST USE MODD_NEB, ONLY: NEB USE MODD_TURB_n, ONLY: TURBN +USE MODD_CTURB, ONLY: CSTURB USE MODD_PARAM_MFSHALL_n, ONLY: PARAM_MFSHALLN USE MODD_DIMPHYEX, ONLY: DIMPHYEX_t ! @@ -390,7 +391,7 @@ ZDRTDT_MF(:,:) = 0. ! ! --------------------------------- - CALL SHALLOW_MF(YLDIMPHYEX, CST, NEB, PARAM_MFSHALLN, TURBN, & + CALL SHALLOW_MF(YLDIMPHYEX, CST, NEB, PARAM_MFSHALLN, TURBN, CSTURB, & KRR=IKR,KRRL=IKRL,KRRI=IKRI, KSV=1, & HMF_UPDRAFT=HMF_UPDRAFT, HMF_CLOUD=HMF_CLOUD,HFRAC_ICE='N',OMIXUV=LLOMIXUV, & ONOMIXLG=LLONOMIXLG,KSV_LGBEG=ISV_LGBEG,KSV_LGEND=ISV_LGEND, & diff --git a/src/common/turb/mode_compute_bl89_ml.F90 b/src/common/turb/mode_compute_bl89_ml.F90 index 92e576ecb88c25e956df59916a7483e367944cbd..231af2f268ff69dddd0f2449eeb489899f97303b 100644 --- a/src/common/turb/mode_compute_bl89_ml.F90 +++ b/src/common/turb/mode_compute_bl89_ml.F90 @@ -2,7 +2,7 @@ MODULE MODE_COMPUTE_BL89_ML IMPLICIT NONE CONTAINS ! ######spl - SUBROUTINE COMPUTE_BL89_ML(KKA,KKB,KKE,KKU,KKL,PDZZ2D, & + SUBROUTINE COMPUTE_BL89_ML(D, CST, CSTURB,PDZZ2D, & PTKEM_DEP,PG_O_THVREF,PVPT,KK,OUPORDN,OFLUX,PSHEAR,PLWORK) USE PARKIND1, ONLY : JPRB @@ -40,8 +40,9 @@ CONTAINS !but algorithm must remain the same. !!!!!!!!!!!! ! -USE MODD_CTURB -USE MODD_PARAMETERS, ONLY: JPVEXT +USE MODD_DIMPHYEX, ONLY: DIMPHYEX_t +USE MODD_CST, ONLY: CST_t +USE MODD_CTURB, ONLY: CSTURB_t ! USE MODE_MSG ! @@ -51,34 +52,31 @@ IMPLICIT NONE ! ! 0.1 arguments ! -INTEGER, INTENT(IN) :: KKA ! near ground array index -INTEGER, INTENT(IN) :: KKB ! near ground physical index -INTEGER, INTENT(IN) :: KKE ! uppest atmosphere physical index -INTEGER, INTENT(IN) :: KKU ! uppest atmosphere array index -INTEGER, INTENT(IN) :: KKL ! +1 if grid goes from ground to atmosphere top, -1 otherwise -REAL, DIMENSION(:,:), INTENT(IN) :: PDZZ2D ! height difference between two mass levels -REAL, DIMENSION(:), INTENT(IN) :: PTKEM_DEP ! TKE to consume -REAL, DIMENSION(:), INTENT(IN) :: PG_O_THVREF ! g/ThetaVRef at the departure point -REAL, DIMENSION(:,:), INTENT(IN) :: PVPT ! ThetaV on mass levels +TYPE(DIMPHYEX_t), INTENT(IN) :: D +TYPE(CST_t), INTENT(IN) :: CST +TYPE(CSTURB_t), INTENT(IN) :: CSTURB +REAL, DIMENSION(D%NIT,D%NKT), INTENT(IN) :: PDZZ2D ! height difference between two mass levels +REAL, DIMENSION(D%NIT), INTENT(IN) :: PTKEM_DEP ! TKE to consume +REAL, DIMENSION(D%NIT), INTENT(IN) :: PG_O_THVREF ! g/ThetaVRef at the departure point +REAL, DIMENSION(D%NIT,D%NKT), INTENT(IN) :: PVPT ! ThetaV on mass levels INTEGER, INTENT(IN) :: KK ! index of departure level LOGICAL, INTENT(IN) :: OUPORDN ! switch to compute upward (true) or ! downward (false) mixing length LOGICAL, INTENT(IN) :: OFLUX ! Computation must be done from flux level -REAL, DIMENSION(:), INTENT(OUT) :: PLWORK ! Resulting mixing length -REAL, DIMENSION(:,:), INTENT(IN) :: PSHEAR ! vertical wind shear for RM17 mixing length +REAL, DIMENSION(D%NIT), INTENT(OUT) :: PLWORK ! Resulting mixing length +REAL, DIMENSION(D%NIT,D%NKT), INTENT(IN) :: PSHEAR ! vertical wind shear for RM17 mixing length ! 0.2 Local variable ! -REAL, DIMENSION(SIZE(PVPT,1)) :: ZLWORK1,ZLWORK2 ! Temporary mixing length -REAL, DIMENSION(SIZE(PVPT,1)) :: ZINTE,ZPOTE ! TKE and potential energy +REAL, DIMENSION(D%NIT) :: ZLWORK1,ZLWORK2 ! Temporary mixing length +REAL, DIMENSION(D%NIT) :: ZINTE,ZPOTE ! TKE and potential energy ! between 2 levels -REAL, DIMENSION(SIZE(PVPT,1)) :: ZVPT_DEP ! Thetav on departure point +REAL, DIMENSION(D%NIT) :: ZVPT_DEP ! Thetav on departure point ! -REAL, DIMENSION(SIZE(PVPT,1),SIZE(PVPT,2)) :: ZDELTVPT,ZHLVPT +REAL, DIMENSION(D%NIT,D%NKT) :: ZDELTVPT,ZHLVPT !Virtual Potential Temp at Half level and DeltaThv between !2 mass levels -INTEGER :: IIJU !Internal Domain INTEGER :: J1D !horizontal loop counter INTEGER :: JKK !loop counters REAL :: ZTEST,ZTEST0,ZTESTM !test for vectorization @@ -88,20 +86,19 @@ REAL :: ZTEST,ZTEST0,ZTESTM !test for vectorization ! -------------- REAL(KIND=JPRB) :: ZHOOK_HANDLE IF (LHOOK) CALL DR_HOOK('COMPUTE_BL89_ML',0,ZHOOK_HANDLE) -IIJU=SIZE(PVPT,1) ! -ZDELTVPT(:,:)=DZM_MF(PVPT(:,:), KKA, KKU, KKL) -ZDELTVPT(:,KKA)=0. -WHERE (ABS(ZDELTVPT(:,:))<XLINF) - ZDELTVPT(:,:)=XLINF +ZDELTVPT(:,:)=DZM_MF(PVPT(:,:), D%NKA, D%NKU, D%NKL) +ZDELTVPT(:,D%NKA)=0. +WHERE (ABS(ZDELTVPT(:,:))<CSTURB%XLINF) + ZDELTVPT(:,:)=CSTURB%XLINF END WHERE ! -ZHLVPT(:,:)=MZM_MF(PVPT(:,:), KKA, KKU, KKL) +ZHLVPT(:,:)=MZM_MF(PVPT(:,:), D%NKA, D%NKU, D%NKL) ! !We consider that gradient between mass levels KKB and KKB+KKL is the same as !the gradient between flux level KKB and mass level KKB -ZDELTVPT(:,KKB)=PDZZ2D(:,KKB)*ZDELTVPT(:,KKB+KKL)/PDZZ2D(:,KKB+KKL) -ZHLVPT(:,KKB)=PVPT(:,KKB)-ZDELTVPT(:,KKB)*0.5 +ZDELTVPT(:,D%NKB)=PDZZ2D(:,D%NKB)*ZDELTVPT(:,D%NKB+D%NKL)/PDZZ2D(:,D%NKB+D%NKL) +ZHLVPT(:,D%NKB)=PVPT(:,D%NKB)-ZDELTVPT(:,D%NKB)*0.5 ! ! ! @@ -116,12 +113,12 @@ IF (OUPORDN.EQV..TRUE.) THEN IF(OFLUX)THEN ZVPT_DEP(:)=ZHLVPT(:,KK) ! departure point is on flux level !We must compute what happens between flux level KK and mass level KK - DO J1D=1,IIJU + DO J1D=1,D%NIT ZTEST0=0.5+SIGN(0.5,ZINTE(J1D)) ! test if there's energy to consume ! Energy consumed if parcel cross the entire layer ZPOTE(J1D) = ZTEST0*(PG_O_THVREF(J1D) * & (0.5*(ZHLVPT(J1D,KK)+ PVPT(J1D,KK)) - ZVPT_DEP(J1D)) + & - XRM17*PSHEAR(J1D,KK)*SQRT(ABS(PTKEM_DEP(J1D)))) * & + CSTURB%XRM17*PSHEAR(J1D,KK)*SQRT(ABS(PTKEM_DEP(J1D)))) * & PDZZ2D(J1D,KK)*0.5 ! Test if it rests some energy to consume ZTEST =0.5+SIGN(0.5,ZINTE(J1D)-ZPOTE(J1D)) @@ -130,9 +127,9 @@ IF (OUPORDN.EQV..TRUE.) THEN ! Lenght travelled by parcel to nullify energy ZLWORK2(J1D)= ( - PG_O_THVREF(J1D) * & ( ZHLVPT(J1D,KK) - ZVPT_DEP(J1D) ) & - - XRM17*PSHEAR(J1D,KK)*SQRT(ABS(PTKEM_DEP(J1D))) & + - CSTURB%XRM17*PSHEAR(J1D,KK)*SQRT(ABS(PTKEM_DEP(J1D))) & + SQRT (ABS( & - (XRM17*PSHEAR(J1D,KK)*SQRT(ABS(PTKEM_DEP(J1D))) + & + (CSTURB%XRM17*PSHEAR(J1D,KK)*SQRT(ABS(PTKEM_DEP(J1D))) + & PG_O_THVREF(J1D) * (ZHLVPT(J1D,KK) - ZVPT_DEP(J1D)) )**2 & + 2. * ZINTE(J1D) * PG_O_THVREF(J1D) & * ZDELTVPT(J1D,KK) / PDZZ2D(J1D,KK) )) ) / & @@ -147,24 +144,24 @@ IF (OUPORDN.EQV..TRUE.) THEN ZVPT_DEP(:)=PVPT(:,KK) ! departure point is on mass level ENDIF - DO JKK=KK+KKL,KKE,KKL + DO JKK=KK+D%NKL,D%NKE,D%NKL IF(ZTESTM > 0.) THEN ZTESTM=0 - DO J1D=1,IIJU + DO J1D=1,D%NIT ZTEST0=0.5+SIGN(0.5,ZINTE(J1D)) ZPOTE(J1D) = ZTEST0*(PG_O_THVREF(J1D) * & (ZHLVPT(J1D,JKK) - ZVPT_DEP(J1D)) & - + XRM17*PSHEAR(J1D,JKK)*SQRT(ABS(PTKEM_DEP(J1D))))* PDZZ2D(J1D,JKK) + + CSTURB%XRM17*PSHEAR(J1D,JKK)*SQRT(ABS(PTKEM_DEP(J1D))))* PDZZ2D(J1D,JKK) ZTEST =0.5+SIGN(0.5,ZINTE(J1D)-ZPOTE(J1D)) ZTESTM=ZTESTM+ZTEST0 ZLWORK1(J1D)=PDZZ2D(J1D,JKK) !ZLWORK2 jump of the last reached level ZLWORK2(J1D)= ( - PG_O_THVREF(J1D) * & - ( PVPT(J1D,JKK-KKL) - ZVPT_DEP(J1D) ) & - - XRM17*PSHEAR(J1D,JKK)*sqrt(abs(PTKEM_DEP(J1D))) & + ( PVPT(J1D,JKK-D%NKL) - ZVPT_DEP(J1D) ) & + - CSTURB%XRM17*PSHEAR(J1D,JKK)*sqrt(abs(PTKEM_DEP(J1D))) & + SQRT (ABS( & - (XRM17*PSHEAR(J1D,JKK)*sqrt(abs(PTKEM_DEP(J1D))) + & - PG_O_THVREF(J1D) * (PVPT(J1D,JKK-KKL) - ZVPT_DEP(J1D)) )**2 & + (CSTURB%XRM17*PSHEAR(J1D,JKK)*sqrt(abs(PTKEM_DEP(J1D))) + & + PG_O_THVREF(J1D) * (PVPT(J1D,JKK-D%NKL) - ZVPT_DEP(J1D)) )**2 & + 2. * ZINTE(J1D) * PG_O_THVREF(J1D) & * ZDELTVPT(J1D,JKK) / PDZZ2D(J1D,JKK) )) ) / & ( PG_O_THVREF(J1D) * ZDELTVPT(J1D,JKK) / PDZZ2D(J1D,JKK) ) @@ -186,22 +183,22 @@ IF (OUPORDN.EQV..FALSE.) THEN ZINTE(:)=PTKEM_DEP(:) PLWORK=0. ZTESTM=1. - DO JKK=KK,KKB,-KKL + DO JKK=KK,D%NKB,-D%NKL IF(ZTESTM > 0.) THEN ZTESTM=0 - DO J1D=1,IIJU + DO J1D=1,D%NIT ZTEST0=0.5+SIGN(0.5,ZINTE(J1D)) ZPOTE(J1D) = ZTEST0*(-PG_O_THVREF(J1D) * & (ZHLVPT(J1D,JKK) - PVPT(J1D,KK)) & - + XRM17*PSHEAR(J1D,JKK)*SQRT(ABS(PTKEM_DEP(J1D))))* PDZZ2D(J1D,JKK) + + CSTURB%XRM17*PSHEAR(J1D,JKK)*SQRT(ABS(PTKEM_DEP(J1D))))* PDZZ2D(J1D,JKK) ZTEST =0.5+SIGN(0.5,ZINTE(J1D)-ZPOTE(J1D)) ZTESTM=ZTESTM+ZTEST0 ZLWORK1(J1D)=PDZZ2D(J1D,JKK) ZLWORK2(J1D)= ( + PG_O_THVREF(J1D) * & ( PVPT(J1D,JKK) - PVPT(J1D,KK) ) & - -XRM17*PSHEAR(J1D,JKK)*sqrt(abs(PTKEM_DEP(J1D))) & + -CSTURB%XRM17*PSHEAR(J1D,JKK)*sqrt(abs(PTKEM_DEP(J1D))) & + SQRT (ABS( & - (XRM17*PSHEAR(J1D,JKK)*sqrt(abs(PTKEM_DEP(J1D))) - & + (CSTURB%XRM17*PSHEAR(J1D,JKK)*sqrt(abs(PTKEM_DEP(J1D))) - & PG_O_THVREF(J1D) * (PVPT(J1D,JKK) - PVPT(J1D,KK)) )**2 & + 2. * ZINTE(J1D) * PG_O_THVREF(J1D) & * ZDELTVPT(J1D,JKK) / PDZZ2D(J1D,JKK) )) ) / & diff --git a/src/common/turb/mode_compute_updraft.F90 b/src/common/turb/mode_compute_updraft.F90 index 7baf9accb065915bc85fbe7485aba651bf19d5f4..36e5e153f81af43c2dddbdd9fedab7cbba9ae6d6 100644 --- a/src/common/turb/mode_compute_updraft.F90 +++ b/src/common/turb/mode_compute_updraft.F90 @@ -9,7 +9,7 @@ ! IMPLICIT NONE CONTAINS - SUBROUTINE COMPUTE_UPDRAFT(D, CST, NEB, PARAMMF, TURB, & + SUBROUTINE COMPUTE_UPDRAFT(D, CST, NEB, PARAMMF, TURB, CSTURB, & KSV, HFRAC_ICE, & OENTR_DETR,OMIXUV, & ONOMIXLG,KSV_LGBEG,KSV_LGEND, & @@ -71,6 +71,7 @@ USE MODD_CST, ONLY: CST_t USE MODD_NEB, ONLY: NEB_t USE MODD_PARAM_MFSHALL_n, ONLY: PARAM_MFSHALL_t USE MODD_TURB_n, ONLY: TURB_t +USE MODD_CTURB, ONLY: CSTURB_t ! USE MODE_COMPUTE_ENTR_DETR, ONLY: COMPUTE_ENTR_DETR USE MODE_TH_R_FROM_THL_RT_1D, ONLY: TH_R_FROM_THL_RT_1D @@ -91,6 +92,7 @@ TYPE(CST_t), INTENT(IN) :: CST TYPE(NEB_t), INTENT(IN) :: NEB TYPE(PARAM_MFSHALL_t), INTENT(IN) :: PARAMMF TYPE(TURB_t), INTENT(IN) :: TURB +TYPE(CSTURB_t), INTENT(IN) :: CSTURB INTEGER, INTENT(IN) :: KSV CHARACTER(LEN=1), INTENT(IN) :: HFRAC_ICE ! partition liquid/ice scheme LOGICAL, INTENT(IN) :: OENTR_DETR! flag to recompute entrainment, detrainment and mass flux @@ -320,10 +322,10 @@ IF (OENTR_DETR) THEN END IF ! #ifdef REPRO48 - CALL COMPUTE_BL89_ML(D%NKA,D%NKB,D%NKE,D%NKU,D%NKL,PDZZ,ZTKEM_F(:,D%NKB),& + CALL COMPUTE_BL89_ML(D, CST, CSTURB, PDZZ,ZTKEM_F(:,D%NKB),& &ZG_O_THVREF(:,D%NKB),ZTHVM,D%NKB,GLMIX,.TRUE.,ZSHEAR,ZLUP) #else - CALL COMPUTE_BL89_ML(D%NKA,D%NKB,D%NKE,D%NKU,D%NKL,PDZZ,ZTKEM_F(:,D%NKB),& + CALL COMPUTE_BL89_ML(D, CST, CSTURB, PDZZ,ZTKEM_F(:,D%NKB),& &ZG_O_THVREF(:,D%NKB),ZTHVM,D%NKB,GLMIX,.FALSE.,ZSHEAR,ZLUP) #endif ZLUP(:)=MAX(ZLUP(:),1.E-10) diff --git a/src/common/turb/mode_compute_updraft_rhcj10.F90 b/src/common/turb/mode_compute_updraft_rhcj10.F90 index 3f04e2028a2bd97845273a82ccb21b76c1f795ab..f0524b89a4d9c3e7a94fb58dc4a7c474dc591400 100644 --- a/src/common/turb/mode_compute_updraft_rhcj10.F90 +++ b/src/common/turb/mode_compute_updraft_rhcj10.F90 @@ -10,7 +10,7 @@ IMPLICIT NONE CONTAINS ! -SUBROUTINE COMPUTE_UPDRAFT_RHCJ10(D, CST, NEB, PARAMMF, TURB, & +SUBROUTINE COMPUTE_UPDRAFT_RHCJ10(D, CST, NEB, PARAMMF, TURB, CSTURB, & KSV, HFRAC_ICE, & OENTR_DETR,OMIXUV, & ONOMIXLG,KSV_LGBEG,KSV_LGEND, & @@ -66,6 +66,7 @@ USE MODD_CST, ONLY: CST_t USE MODD_NEB, ONLY: NEB_t USE MODD_PARAM_MFSHALL_n, ONLY: PARAM_MFSHALL_t USE MODD_TURB_n, ONLY: TURB_t +USE MODD_CTURB, ONLY: CSTURB_t ! USE MODE_TH_R_FROM_THL_RT_1D, ONLY: TH_R_FROM_THL_RT_1D USE MODI_SHUMAN_MF, ONLY: MZF_MF, MZM_MF, GZ_M_W_MF @@ -85,6 +86,7 @@ TYPE(CST_t), INTENT(IN) :: CST TYPE(NEB_t), INTENT(IN) :: NEB TYPE(PARAM_MFSHALL_t), INTENT(IN) :: PARAMMF TYPE(TURB_t), INTENT(IN) :: TURB +TYPE(CSTURB_t), INTENT(IN) :: CSTURB INTEGER, INTENT(IN) :: KSV CHARACTER(LEN=1), INTENT(IN) :: HFRAC_ICE ! partition liquid/ice scheme LOGICAL, INTENT(IN) :: OENTR_DETR! flag to recompute entrainment, detrainment and mass flux @@ -341,7 +343,7 @@ ELSE ZSHEAR = 0. !no shear in bl89 mixing length END IF ! -CALL COMPUTE_BL89_ML(D%NKA,D%NKB,D%NKE,D%NKU,D%NKL,PDZZ,ZTKEM_F(:,D%NKB),ZG_O_THVREF(:,D%NKB), & +CALL COMPUTE_BL89_ML(D, CST, CSTURB, PDZZ,ZTKEM_F(:,D%NKB),ZG_O_THVREF(:,D%NKB), & ZTHVM_F,D%NKB,GLMIX,.TRUE.,ZSHEAR,ZLUP) ZLUP(:)=MAX(ZLUP(:),1.E-10) diff --git a/src/common/turb/modi_shallow_mf.F90 b/src/common/turb/modi_shallow_mf.F90 index 29f16989a07758c3d687ef90bff2045a10aa9236..e0fa4465041d2032768d3c683f6d2c25f6993b96 100644 --- a/src/common/turb/modi_shallow_mf.F90 +++ b/src/common/turb/modi_shallow_mf.F90 @@ -4,7 +4,7 @@ ! INTERFACE ! ################################################################# - SUBROUTINE SHALLOW_MF(D, CST, NEB, PARAMMF, TURB, & + SUBROUTINE SHALLOW_MF(D, CST, NEB, PARAMMF, TURB, CSTURB, & KRR, KRRL, KRRI, KSV, & HMF_UPDRAFT, HMF_CLOUD, HFRAC_ICE, OMIXUV, & ONOMIXLG,KSV_LGBEG,KSV_LGEND, & @@ -29,6 +29,7 @@ USE MODD_CST, ONLY: CST_t USE MODD_NEB, ONLY: NEB_t USE MODD_PARAM_MFSHALL_n, ONLY: PARAM_MFSHALL_t USE MODD_TURB_n, ONLY: TURB_t +USE MODD_CTURB, ONLY: CSTURB_t ! !* 1.1 Declaration of Arguments ! @@ -38,6 +39,7 @@ TYPE(CST_t), INTENT(IN) :: CST TYPE(NEB_t), INTENT(IN) :: NEB TYPE(PARAM_MFSHALL_t), INTENT(IN) :: PARAMMF TYPE(TURB_t), INTENT(IN) :: TURB +TYPE(CSTURB_t), INTENT(IN) :: CSTURB INTEGER, INTENT(IN) :: KRR ! number of moist var. INTEGER, INTENT(IN) :: KRRL ! number of liquid water var. INTEGER, INTENT(IN) :: KRRI ! number of ice water var. diff --git a/src/common/turb/shallow_mf.F90 b/src/common/turb/shallow_mf.F90 index b6726a7b8a2a414bc8a28864eaa9c12944f77351..b95f3e9d4f1392ac9ead0c2587b607dc388e12a6 100644 --- a/src/common/turb/shallow_mf.F90 +++ b/src/common/turb/shallow_mf.F90 @@ -4,7 +4,7 @@ !MNH_LIC for details. version 1. !----------------------------------------------------------------- ! ################################################################ - SUBROUTINE SHALLOW_MF(D, CST, NEB, PARAMMF, TURB, & + SUBROUTINE SHALLOW_MF(D, CST, NEB, PARAMMF, TURB, CSTURB, & KRR, KRRL, KRRI, KSV, & HMF_UPDRAFT, HMF_CLOUD, HFRAC_ICE, OMIXUV, & ONOMIXLG,KSV_LGBEG,KSV_LGEND, & @@ -77,6 +77,7 @@ USE MODD_CST, ONLY: CST_t USE MODD_NEB, ONLY: NEB_t USE MODD_PARAM_MFSHALL_n, ONLY: PARAM_MFSHALL_t USE MODD_TURB_n, ONLY: TURB_t +USE MODD_CTURB, ONLY: CSTURB_t ! USE MODE_THL_RT_FROM_TH_R_MF, ONLY: THL_RT_FROM_TH_R_MF USE MODE_COMPUTE_UPDRAFT, ONLY: COMPUTE_UPDRAFT @@ -100,6 +101,7 @@ TYPE(CST_t), INTENT(IN) :: CST TYPE(NEB_t), INTENT(IN) :: NEB TYPE(PARAM_MFSHALL_t), INTENT(IN) :: PARAMMF TYPE(TURB_t), INTENT(IN) :: TURB +TYPE(CSTURB_t), INTENT(IN) :: CSTURB INTEGER, INTENT(IN) :: KRR ! number of moist var. INTEGER, INTENT(IN) :: KRRL ! number of liquid water var. INTEGER, INTENT(IN) :: KRRI ! number of ice water var. @@ -217,7 +219,7 @@ ZTHVM(:,:) = PTHM(:,:)*((1.+CST%XRV / CST%XRD *PRM(:,:,1))/(1.+ZRTM(:,:))) ! IF (HMF_UPDRAFT == 'EDKF') THEN GENTR_DETR = .TRUE. - CALL COMPUTE_UPDRAFT(D, CST, NEB, PARAMMF, TURB, & + CALL COMPUTE_UPDRAFT(D, CST, NEB, PARAMMF, TURB, CSTURB, & KSV, HFRAC_ICE, GENTR_DETR, OMIXUV, & ONOMIXLG,KSV_LGBEG,KSV_LGEND, & PZZ,PDZZ, & @@ -231,7 +233,7 @@ IF (HMF_UPDRAFT == 'EDKF') THEN PDX,PDY) ELSEIF (HMF_UPDRAFT == 'RHCJ') THEN GENTR_DETR = .TRUE. - CALL COMPUTE_UPDRAFT_RHCJ10(D, CST, NEB, PARAMMF, TURB, & + CALL COMPUTE_UPDRAFT_RHCJ10(D, CST, NEB, PARAMMF, TURB, CSTURB,& KSV, HFRAC_ICE, GENTR_DETR, OMIXUV, & ONOMIXLG,KSV_LGBEG,KSV_LGEND, & PZZ,PDZZ, & diff --git a/src/mesonh/ext/shallow_mf_pack.f90 b/src/mesonh/ext/shallow_mf_pack.f90 index 517d8b9da61656f1e6c75943ed2747af9340d709..73a1810be3d509d037a26c52efe5a0157d25a465 100644 --- a/src/mesonh/ext/shallow_mf_pack.f90 +++ b/src/mesonh/ext/shallow_mf_pack.f90 @@ -126,6 +126,7 @@ END MODULE MODI_SHALLOW_MF_PACK USE MODD_CST, ONLY: CST USE MODD_NEB, ONLY: NEB USE MODD_TURB_n, ONLY: TURBN +USE MODD_CTURB, ONLY: CSTURB USE MODD_PARAM_MFSHALL_n, ONLY: PARAM_MFSHALLN USE MODD_DIMPHYEX, ONLY: DIMPHYEX_t ! @@ -332,7 +333,7 @@ ZSFRV(:)=RESHAPE(PSFRV(:,:),(/ IIU*IJU /) ) !!! 3. Call of the physical parameterization of massflux vertical transport -CALL SHALLOW_MF(YLDIMPHYEXPACK, CST, NEB, PARAM_MFSHALLN, TURBN, & +CALL SHALLOW_MF(YLDIMPHYEXPACK, CST, NEB, PARAM_MFSHALLN, TURBN, CSTURB,& KRR,KRRL,KRRI,ISV, & HMF_UPDRAFT, HMF_CLOUD, CFRAC_ICE_SHALLOW_MF, OMIXUV, & LNOMIXLG,NSV_LGBEG,NSV_LGEND, &