diff --git a/src/MNH/shallow_mf.f90 b/src/MNH/shallow_mf.f90 index a294f5859d3a01cb4e82d83379a9a17295dfdd4f..52831c2d7dfe2d0aa147116f7924aa9bed4a0918 100644 --- a/src/MNH/shallow_mf.f90 +++ b/src/MNH/shallow_mf.f90 @@ -188,6 +188,7 @@ USE MODI_COMPUTE_FRAC_ICE USE MODI_COMPUTE_BL89_ML USE MODD_GRID_n, ONLY : XDXHAT, XDYHAT USE MODD_REF_n, ONLY : XTHVREF +USE MODE_MSG ! IMPLICIT NONE @@ -310,6 +311,10 @@ IF (HMF_UPDRAFT == 'EDKF' .OR. HMF_UPDRAFT == 'HRIO' .OR. & ENDIF ! Thermodynamics functions +ZFRAC_ICE(:,:) = 0. +WHERE(PRM(:,:,2)+PRM(:,:,4) > 1.E-20) + ZFRAC_ICE(:,:) = PRM(:,:,4) / (PRM(:,:,2)+PRM(:,:,4)) +ENDWHERE CALL COMPUTE_FRAC_ICE(HFRAC_ICE,ZFRAC_ICE(:,:),PTHM(:,:)*PEXNM(:,:)) ! Conservative variables at t-dt @@ -384,8 +389,7 @@ ELSEIF (HMF_UPDRAFT == 'HRIO') THEN ELSE WRITE(*,*) ' STOP' WRITE(*,*) ' NO UPDRAFT MODEL FOR EDKF : CMF_UPDRAFT =',HMF_UPDRAFT - CALL ABORT - STOP + CALL PRINT_MSG(NVERB_FATAL,'GEN','SHALLOW_MF','') ENDIF !!! 5. Compute diagnostic convective cloud fraction and content @@ -443,9 +447,8 @@ ENDIF ELSE WRITE(*,*) ' STOP' WRITE(*,*) ' NO UPDRAFT MODEL FOR EDKF : CMF_UPDRAFT =',HMF_UPDRAFT - CALL ABORT - STOP - ENDIF + CALL PRINT_MSG(NVERB_FATAL,'GEN','SHALLOW_MF','') + ENDIF IF (HMF_UPDRAFT == 'BOUT') THEN !! calcul de la hauteur de la couche limite ou de L_up diff --git a/src/MNH/shallow_mf_pack.f90 b/src/MNH/shallow_mf_pack.f90 index 57e35dff884344597b97aea9fb2e44d792b8bdba..ba519f8e3eefe4a15b9471ff07ebca2530fea29c 100644 --- a/src/MNH/shallow_mf_pack.f90 +++ b/src/MNH/shallow_mf_pack.f90 @@ -114,6 +114,7 @@ END MODULE MODI_SHALLOW_MF_PACK !! for the height of the thermal !! M. Leriche 02/2017 : avoid negative values for sv tendencies !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O +!! S. Riette 11/2016: support for CFRAC_ICE_SHALLOW_MF !! -------------------------------------------------------------------------- ! !* 0. DECLARATIONS @@ -124,7 +125,7 @@ USE MODD_CST USE MODD_CONF USE MODD_IO_ll, ONLY: TFILEDATA USE MODD_NSV - +USE MODD_PARAM_ICE, ONLY : CFRAC_ICE_SHALLOW_MF USE MODD_PARAM_MFSHALL_n USE MODD_BUDGET @@ -308,7 +309,7 @@ ZSFRV(:)=RESHAPE(PSFRV(:,:),(/ IIU*IJU /) ) !!! 3. Call of the physical parameterization of massflux vertical transport CALL SHALLOW_MF(1,IKU,1,KRR,KRRL,KRRI, & - HMF_UPDRAFT, HMF_CLOUD, 'T', OMIXUV, & + HMF_UPDRAFT, HMF_CLOUD, CFRAC_ICE_SHALLOW_MF, OMIXUV, & LNOMIXLG,NSV_LGBEG,NSV_LGEND, & PIMPL_MF, PTSTEP, & ZDZZ, ZZZ, & diff --git a/src/MNH/th_r_from_thl_rt_1d.f90 b/src/MNH/th_r_from_thl_rt_1d.f90 index dfffa5435680349d8f1df854a92819ee30989abe..8c9081427e1af18fb11f1807b1ed75a16e8ee217 100644 --- a/src/MNH/th_r_from_thl_rt_1d.f90 +++ b/src/MNH/th_r_from_thl_rt_1d.f90 @@ -1,7 +1,3 @@ -!MNH_LIC Copyright 1994-2014 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. ! ######spl MODULE MODI_TH_R_FROM_THL_RT_1D ! ############################### @@ -63,6 +59,7 @@ REAL, DIMENSION(:), INTENT(OUT) :: PRSATI ! estimated mixing ration at saturati !! S. Riette April 2011 : ice added, allow ZRLTEMP to be negative !! we use dQsat/dT to help convergence !! use of optional PRR, PRS, PRG, PRH +!! S. Riette Nov 2016: support for HFRAC_ICE='S' !! !! -------------------------------------------------------------------------- ! @@ -70,7 +67,7 @@ REAL, DIMENSION(:), INTENT(OUT) :: PRSATI ! estimated mixing ration at saturati ! ------------ ! USE MODI_COMPUTE_FRAC_ICE -USE MODD_CST +USE MODD_CST !, ONLY: XP00, XRD, XCPD, XCPV, XCL, XCI, XLVTT, XTT, XLSTT USE MODE_THERMO ! IMPLICIT NONE @@ -137,6 +134,10 @@ DO II=1,JITER ZT(:)=PTH(:)*ZEXN(:) !Computation of liquid/ice fractions + PFRAC_ICE(:) = 0. + WHERE(PRL(:)+PRI(:) > 1.E-20) + PFRAC_ICE(:) = PRI(:) / (PRL(:)+PRI(:)) + ENDWHERE CALL COMPUTE_FRAC_ICE(HFRAC_ICE,PFRAC_ICE(:),ZT(:)) !Computation of Rvsat and dRsat/dT