diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index 4bebae589..10d407ae8 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -287,7 +287,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dqsfc_cpl, dusfci_cpl, dvsfci_cpl, dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, & dusfci_diag, dvsfci_diag, dtsfci_diag, dqsfci_diag, dt3dt, du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, dq3dt, & dq3dt_ozone, rd, cp,fvirt, hvap, t1, q1, prsl, hflx, ushfsfci, oceanfrac, fice, dusfc_cice, dvsfc_cice, dtsfc_cice, & - dqsfc_cice, wet, dry, icy, wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1, dkt_cpl, dkt, errmsg, errflg) + dqsfc_cice, wet, dry, icy, wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1, dkt_cpl, dkt, epsq, errmsg, errflg) use machine, only : kind_phys use GFS_PBL_generic_common, only : set_aerosol_tracer_index @@ -302,7 +302,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, lsidea logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu - real(kind=kind_phys), intent(in) :: dtf + real(kind=kind_phys), intent(in) :: dtf, epsq real(kind=kind_phys), intent(in) :: rd, cp, fvirt, hvap real(kind=kind_phys), dimension(:), intent(in) :: t1, q1, hflx, oceanfrac, fice real(kind=kind_phys), dimension(:,:), intent(in) :: prsl @@ -389,7 +389,11 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dqdt(i,k,ntcw) = dvdftra(i,k,2) dqdt(i,k,ntiw) = dvdftra(i,k,3) dqdt(i,k,ntrw) = dvdftra(i,k,4) - dqdt(i,k,nqrimef) = dvdftra(i,k,5) + if(dvdftra(i,k,3) > epsq) then + dqdt(i,k,nqrimef) = dvdftra(i,k,5)/dvdftra(i,k,3) + else + dqdt(i,k,nqrimef) = 1. + end if dqdt(i,k,ntoz) = dvdftra(i,k,6) enddo enddo diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 51764e04d..de6891049 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -1220,6 +1220,15 @@ kind = kind_phys intent = in optional = F +[EPSQ] + standard_name = minimum_value_of_specific_humidity + long_name = floor value for specific humidity + units = kg kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index aa1ea039e..a12938aef 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -748,8 +748,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif - elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6 .or. & - Model%imp_physics == 15) then + elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then if (Model%kdt == 1) then Tbd%phy_f3d(:,:,Model%nleffr) = 10. Tbd%phy_f3d(:,:,Model%nieffr) = 50. @@ -766,6 +765,15 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + elseif(Model%imp_physics == 15) then + call progcld2 (plyr,plvl,tlyr,qlyr,qstl,rhly,tvly,tracer1,& ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + im, lmk, lmp, & + Model%lmfshal,Model%lmfdeep2, & + clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs +! --- output + endif ! end if_imp_physics ! endif ! end_if_ntcw diff --git a/physics/module_MP_FER_HIRES.F90 b/physics/module_MP_FER_HIRES.F90 index 67d446044..863cb0ea5 100644 --- a/physics/module_MP_FER_HIRES.F90 +++ b/physics/module_MP_FER_HIRES.F90 @@ -242,37 +242,42 @@ MODULE MODULE_MP_FER_HIRES !! version, and QRIMEF is only in the advected version. The innards !! are all the same. SUBROUTINE FER_HIRES (DT,RHgrd, & - & dz8w,rho_phy,p_phy,pi_phy,th_phy,t_phy, & + & prsi,p_phy,t_phy, & & q,qt, & - & LOWLYR,SR, & + & LOWLYR,SR,TRAIN_PHY, & & F_ICE_PHY,F_RAIN_PHY,F_RIMEF_PHY, & & QC,QR,QS, & & RAINNC,RAINNCV, & & threads, & - & ims,ime, jms,jme, lm, & + & ims,ime, lm, & & d_ss, & & refl_10cm,DX1 ) !----------------------------------------------------------------------- IMPLICIT NONE !----------------------------------------------------------------------- - INTEGER,INTENT(IN) :: D_SS,IMS,IME,JMS,JME,LM,DX1 + INTEGER,INTENT(IN) :: D_SS,IMS,IME,LM,DX1 !ZM ,ITIMESTEP REAL, INTENT(IN) :: DT,RHgrd INTEGER, INTENT(IN) :: THREADS - REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme, lm):: & - & dz8w,p_phy,pi_phy,rho_phy - REAL, INTENT(INOUT), DIMENSION(ims:ime, jms:jme, lm):: & - & th_phy,t_phy,q,qt - REAL, INTENT(INOUT), DIMENSION(ims:ime,jms:jme, lm ) :: & + REAL, INTENT(IN), DIMENSION(ims:ime, lm+1):: & + & prsi + REAL, INTENT(IN), DIMENSION(ims:ime, lm):: & + & p_phy + REAL, INTENT(INOUT), DIMENSION(ims:ime, lm):: & + & q,qt,t_phy + REAL, INTENT(INOUT), DIMENSION(ims:ime, lm ) :: & +!Aligo Oct 23,2019: dry mixing ratio for cloud species & qc,qr,qs - REAL, INTENT(INOUT), DIMENSION(ims:ime, jms:jme,lm) :: & + REAL, INTENT(INOUT), DIMENSION(ims:ime, lm) :: & & F_ICE_PHY,F_RAIN_PHY,F_RIMEF_PHY - REAL, INTENT(OUT), DIMENSION(ims:ime, jms:jme,lm) :: & - & refl_10cm - REAL, INTENT(INOUT), DIMENSION(ims:ime,jms:jme) :: & + REAL, INTENT(OUT), DIMENSION(ims:ime, lm) :: & !jul28 + & refl_10cm !jul28 + REAL, INTENT(INOUT), DIMENSION(ims:ime) :: & & RAINNC,RAINNCV - REAL, INTENT(OUT), DIMENSION(ims:ime,jms:jme):: SR + REAL, INTENT(OUT), DIMENSION(ims:ime):: SR + REAL, INTENT(OUT), DIMENSION( ims:ime, lm ) :: & + & TRAIN_PHY ! - INTEGER, DIMENSION( ims:ime, jms:jme ),INTENT(INOUT) :: LOWLYR + INTEGER, DIMENSION( ims:ime ),INTENT(INOUT) :: LOWLYR !----------------------------------------------------------------------- ! LOCAL VARS @@ -282,24 +287,22 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & ! the microphysics scheme. Instead, they will be used by Eta precip ! assimilation. - REAL, DIMENSION( ims:ime, jms:jme,lm ) :: & - & TLATGS_PHY,TRAIN_PHY - REAL, DIMENSION(ims:ime,jms:jme):: APREC,PREC,ACPREC + REAL, DIMENSION(ims:ime):: APREC,PREC,ACPREC - INTEGER :: I,J,K,KK + INTEGER :: I,K,KK REAL :: wc !------------------------------------------------------------------------ ! For subroutine EGCP01COLUMN_hr !----------------------------------------------------------------------- INTEGER :: LSFC,I_index,J_index,L - INTEGER,DIMENSION(ims:ime,jms:jme) :: LMH + INTEGER,DIMENSION(ims:ime) :: LMH REAL :: TC,QI,QRdum,QW,Fice,Frain,DUM,ASNOW,ARAIN - REAL,DIMENSION(lm) :: P_col,Q_col,T_col,WC_col, & + REAL,DIMENSION(lm) :: P_col,Q_col,T_col,WC_col, & RimeF_col,QI_col,QR_col,QW_col, THICK_col,DPCOL,pcond1d, & pidep1d,piacw1d,piacwi1d,piacwr1d,piacr1d,picnd1d,pievp1d, & - pimlt1d,praut1d,pracw1d,prevp1d,pisub1d,pevap1d,DBZ_col, & + pimlt1d,praut1d,pracw1d,prevp1d,pisub1d,pevap1d,DBZ_col, & !jul28 NR_col,NS_col,vsnow1d,vrain11d,vrain21d,vci1d,NSmICE1d, & - INDEXS1d,INDEXR1d,RFlag1d,RHC_col + INDEXS1d,INDEXR1d,RFlag1d,RHC_col !jul28 !jun01 ! !----------------------------------------------------------------------- !********************************************************************** @@ -309,7 +312,7 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & ! MZ: HWRF practice start !---------- !2015-03-30, recalculate some constants which may depend on phy time step - CALL MY_GROWTH_RATES_NMM_hr (DT) + CALL MY_GROWTH_RATES_NMM_hr (DT) !--- CIACW is used in calculating riming rates ! The assumed effective collection efficiency of cloud water rimed onto @@ -341,83 +344,75 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !write(*,*)'braut=',braut !! END OF adding, 2015-03-30 !----------- -! MZ: HWRF practice end -! - DO j = jms,jme DO i = ims,ime - ACPREC(i,j)=0. - APREC (i,j)=0. - PREC (i,j)=0. - SR (i,j)=0. + ACPREC(i)=0. + APREC (i)=0. + PREC (i)=0. + SR (i)=0. ENDDO + DO k = 1,lm DO i = ims,ime - TLATGS_PHY (i,j,k)=0. - TRAIN_PHY (i,j,k)=0. + TRAIN_PHY (i,k)=0. ENDDO ENDDO - ENDDO !----------------------------------------------------------------------- !-- Start of original driver for EGCP01COLUMN_hr !----------------------------------------------------------------------- ! - DO J=JMS,JME - DO I=IMS,IME - LSFC=LM-LOWLYR(I,J)+1 ! "L" of surface - DO K=1,LM - DPCOL(K)=RHO_PHY(I,J,K)*GRAV*dz8w(I,J,K) - ENDDO + DO I=IMS,IME + LSFC=LM-LOWLYR(I)+1 ! "L" of surface + DO K=1,LM + DPCOL(K)=prsi(I,K)-prsi(I,K+1) + ENDDO ! !--- Initialize column data (1D arrays) ! - L=LM + L=LM !-- qt = CWM, total condensate - IF (qt(I,J,L) .LE. EPSQ) qt(I,J,L)=EPSQ - F_ice_phy(I,J,L)=1. - F_rain_phy(I,J,L)=0. - F_RimeF_phy(I,J,L)=1. + IF (qt(I,L) .LE. EPSQ) qt(I,L)=EPSQ + F_ice_phy(I,L)=1. + F_rain_phy(I,L)=0. + F_RimeF_phy(I,L)=1. do L=LM,1,-1 -! -!--- Pressure (Pa) = (Psfc-Ptop)*(ETA/ETA_sfc)+Ptop -! - P_col(L)=P_phy(I,J,L) + P_col(L)=P_phy(I,L) ! !--- Layer thickness = RHO*DZ = -DP/G = (Psfc-Ptop)*D_ETA/(G*ETA_sfc) ! THICK_col(L)=DPCOL(L)*RGRAV - T_col(L)=T_phy(I,J,L) + T_col(L)=T_phy(I,L) TC=T_col(L)-T0C - Q_col(L)=max(EPSQ, q(I,J,L)) - IF (qt(I,J,L) .LE. EPSQ1) THEN + Q_col(L)=max(EPSQ, q(I,L)) + IF (qt(I,L) .LE. EPSQ1) THEN WC_col(L)=0. IF (TC .LT. T_ICE) THEN - F_ice_phy(I,J,L)=1. + F_ice_phy(I,L)=1. ELSE - F_ice_phy(I,J,L)=0. + F_ice_phy(I,L)=0. ENDIF - F_rain_phy(I,J,L)=0. - F_RimeF_phy(I,J,L)=1. + F_rain_phy(I,L)=0. + F_RimeF_phy(I,L)=1. ELSE - WC_col(L)=qt(I,J,L) + WC_col(L)=qt(I,L) !-- Debug 20120111 ! TC==TC will fail if NaN, preventing unnecessary error messages IF (WC_col(L)>QTwarn .AND. P_col(L)1 g/kg condensate in stratosphere; I,J,L,TC,P,QT=', & - I,J,L,TC,.01*P_col(L),1000.*WC_col(L) + WRITE(0,*) 'WARN4: >1 g/kg condensate in stratosphere; I,L,TC,P,QT=', & + I,L,TC,.01*P_col(L),1000.*WC_col(L) QTwarn=MAX(WC_col(L),10.*QTwarn) Pwarn=MIN(P_col(L),0.5*Pwarn) ENDIF !-- TC/=TC will pass if TC is NaN IF (WARN5 .AND. TC/=TC) THEN - WRITE(0,*) 'WARN5: NaN temperature; I,J,L,P=',I,J,L,.01*P_col(L) + WRITE(0,*) 'WARN5: NaN temperature; I,L,P=',I,L,.01*P_col(L) WARN5=.FALSE. ENDIF ENDIF - IF (T_ICE<=-100.) F_ice_phy(I,J,L)=0. + IF (T_ICE<=-100.) F_ice_phy(I,L)=0. ! ! ! !--- Determine composition of condensate in terms of ! ! cloud water, ice, & rain @@ -426,8 +421,8 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & QI=0. QRdum=0. QW=0. - Fice=F_ice_phy(I,J,L) - Frain=F_rain_phy(I,J,L) + Fice=F_ice_phy(I,L) + Frain=F_rain_phy(I,L) ! IF (Fice .GE. 1.) THEN QI=WC @@ -447,8 +442,8 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & QW=QW-QRdum ENDIF ENDIF - IF (QI .LE. 0.) F_RimeF_phy(I,J,L)=1. - RimeF_col(L)=F_RimeF_phy(I,J,L) ! (real) + IF (QI .LE. 0.) F_RimeF_phy(I,L)=1. + RimeF_col(L)=F_RimeF_phy(I,L) ! (real) QI_col(L)=QI QR_col(L)=QRdum QW_col(L)=QW @@ -469,7 +464,7 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !--- Perform the microphysical calculations in this column ! I_index=I - J_index=J + J_index=1 CALL EGCP01COLUMN_hr ( ARAIN, ASNOW, DT, RHC_col, & & I_index, J_index, LSFC, & & P_col, QI_col, QR_col, Q_col, QW_col, RimeF_col, T_col, & @@ -483,11 +478,10 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !--- Update storage arrays ! do L=LM,1,-1 - TRAIN_phy(I,J,L)=(T_col(L)-T_phy(I,J,L))/DT - TLATGS_phy(I,J,L)=T_col(L)-T_phy(I,J,L) - T_phy(I,J,L)=T_col(L) - q(I,J,L)=Q_col(L) - qt(I,J,L)=WC_col(L) + TRAIN_phy(I,L)=(T_col(L)-T_phy(I,L))/DT + T_phy(I,L)=T_col(L) + q(I,L)=Q_col(L) + qt(I,L)=WC_col(L) !---convert 1D source/sink terms to one 4D array !---d_ss is the total number of source/sink terms in the 4D mprates array !---if d_ss=1, only 1 source/sink term is used @@ -496,20 +490,20 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !--- REAL*4 array storage ! IF (QI_col(L) .LE. EPSQ) THEN - F_ice_phy(I,J,L)=0. - IF (T_col(L) .LT. T_ICEK) F_ice_phy(I,J,L)=1. - F_RimeF_phy(I,J,L)=1. + F_ice_phy(I,L)=0. + IF (T_col(L) .LT. T_ICEK) F_ice_phy(I,L)=1. + F_RimeF_phy(I,L)=1. ELSE - F_ice_phy(I,J,L)=MAX( 0., MIN(1., QI_col(L)/WC_col(L)) ) - F_RimeF_phy(I,J,L)=MAX(1., RimeF_col(L)) + F_ice_phy(I,L)=MAX( 0., MIN(1., QI_col(L)/WC_col(L)) ) + F_RimeF_phy(I,L)=MAX(1., RimeF_col(L)) ENDIF IF (QR_col(L) .LE. EPSQ) THEN DUM=0 ELSE DUM=QR_col(L)/(QR_col(L)+QW_col(L)) ENDIF - F_rain_phy(I,J,L)=DUM - REFL_10CM(I,J,L)=DBZ_col(L) !jul28 + F_rain_phy(I,L)=DUM + REFL_10CM(I,L)=DBZ_col(L) !jul28 ENDDO ! !--- Update accumulated precipitation statistics @@ -517,63 +511,57 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !--- Surface precipitation statistics; SR is fraction of surface ! precipitation (if >0) associated with snow ! - APREC(I,J)=(ARAIN+ASNOW)*RRHOL ! Accumulated surface precip (depth in m) !<--- Ying - PREC(I,J)=PREC(I,J)+APREC(I,J) - ACPREC(I,J)=ACPREC(I,J)+APREC(I,J) - IF(APREC(I,J) .LT. 1.E-8) THEN - SR(I,J)=0. + APREC(I)=(ARAIN+ASNOW)*RRHOL ! Accumulated surface precip (depth in m) !<--- Ying + PREC(I)=PREC(I)+APREC(I) + ACPREC(I)=ACPREC(I)+APREC(I) + IF(APREC(I) .LT. 1.E-8) THEN + SR(I)=0. ELSE - SR(I,J)=RRHOL*ASNOW/APREC(I,J) + SR(I)=RRHOL*ASNOW/APREC(I) ENDIF ! !####################################################################### !####################################################################### ! enddo ! End "I" loop - enddo ! End "J" loop ! !----------------------------------------------------------------------- !-- End of original driver for EGCP01COLUMN_hr !----------------------------------------------------------------------- ! - DO j = jms,jme do k = lm, 1, -1 DO i = ims,ime - th_phy(i,j,k) = t_phy(i,j,k)/pi_phy(i,j,k) - WC=qt(I,J,K) - QS(I,J,K)=0. - QR(I,J,K)=0. - QC(I,J,K)=0. -! - IF(F_ICE_PHY(I,J,K)>=1.)THEN - QS(I,J,K)=WC - ELSEIF(F_ICE_PHY(I,J,K)<=0.)THEN - QC(I,J,K)=WC + WC=qt(I,K) + QS(I,K)=0. + QR(I,K)=0. + QC(I,K)=0. +! + IF(F_ICE_PHY(I,K)>=1.)THEN + QS(I,K)=WC + ELSEIF(F_ICE_PHY(I,K)<=0.)THEN + QC(I,K)=WC ELSE - QS(I,J,K)=F_ICE_PHY(I,J,K)*WC - QC(I,J,K)=WC-QS(I,J,K) + QS(I,K)=F_ICE_PHY(I,K)*WC + QC(I,K)=WC-QS(I,K) ENDIF ! - IF(QC(I,J,K)>0..AND.F_RAIN_PHY(I,J,K)>0.)THEN - IF(F_RAIN_PHY(I,J,K).GE.1.)THEN - QR(I,J,K)=QC(I,J,K) - QC(I,J,K)=0. + IF(QC(I,K)>0..AND.F_RAIN_PHY(I,K)>0.)THEN + IF(F_RAIN_PHY(I,K).GE.1.)THEN + QR(I,K)=QC(I,K) + QC(I,K)=0. ELSE - QR(I,J,K)=F_RAIN_PHY(I,J,K)*QC(I,J,K) - QC(I,J,K)=QC(I,J,K)-QR(I,J,K) + QR(I,K)=F_RAIN_PHY(I,K)*QC(I,K) + QC(I,K)=QC(I,K)-QR(I,K) ENDIF ENDIF ENDDO !- i ENDDO !- k - ENDDO !- j ! !- Update rain (convert from m to kg/m**2, which is also equivalent to mm depth) ! - DO j=jms,jme DO i=ims,ime - RAINNC(i,j)=APREC(i,j)*1000.+RAINNC(i,j) - RAINNCV(i,j)=APREC(i,j)*1000. - ENDDO + RAINNC(i)=APREC(i)*1000.+RAINNC(i) + RAINNCV(i)=APREC(i)*1000. ENDDO ! !----------------------------------------------------------------------- diff --git a/physics/mp_fer_hires.F90 b/physics/mp_fer_hires.F90 index 9f265db22..03d0b53e0 100644 --- a/physics/mp_fer_hires.F90 +++ b/physics/mp_fer_hires.F90 @@ -186,26 +186,19 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & integer :: lowlyr(1:ncol) integer :: dx1 !real(kind_phys) :: mprates(1:ncol,1:nlev,d_ss) - real(kind_phys) :: DTPHS,PCPCOL,RDTPHS,TNEW + real(kind_phys) :: PCPCOL real(kind_phys) :: ql(1:nlev),tl(1:nlev) real(kind_phys) :: rainnc(1:ncol),rainncv(1:ncol) real(kind_phys) :: snownc(1:ncol),snowncv(1:ncol) real(kind_phys) :: graupelncv(1:ncol) - real(kind_phys) :: dz(1:ncol,1:nlev) - real(kind_phys) :: pi_phy(1:ncol,1:nlev) - real(kind_phys) :: rr(1:ncol,1:nlev) - real(kind_phys) :: th_phy(1:ncol,1:nlev) - real(kind_phys) :: R_G, CAPPA + real(kind_phys) :: train_phy(1:ncol,1:nlev) ! Dimension - integer :: ims, ime, jms, jme, lm + integer :: ims, ime, lm !----------------------------------------------------------------------- !*********************************************************************** !----------------------------------------------------------------------- - R_G=1./G - CAPPA=R_D/CP - ! Initialize the CCPP error handling variables errmsg = '' errflg = 0 @@ -217,18 +210,9 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & return end if - -!ZM NTSD=ITIMESTEP -!ZM presume nphs=1 DTPHS=NPHS*DT - DTPHS=DT - RDTPHS=1./DTPHS -!ZM AVRAIN=AVRAIN+1. - ! Set internal dimensions ims = 1 ime = ncol - jms = 1 - jme = 1 lm = nlev ! Use the dx of the 1st i point to set an integer value of dx to be used for @@ -271,18 +255,18 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & ! ! TL(K)=T(I,K) ! QL(K)=AMAX1(Q(I,K),EPSQ) -! - RR(I,K)=P_PHY(I,K)/(R_D*T(I,K)*(P608*AMAX1(Q(I,K),EPSQ)+1.)) - PI_PHY(I,K)=(P_PHY(I,K)*1.E-5)**CAPPA - TH_PHY(I,K)=T(I,K)/PI_PHY(I,K) - DZ(I,K)=(PRSI(I,K)-PRSI(I,K+1))*R_G/RR(I,K) - ! !*** CALL MICROPHYSICS !MZ* in HWRF !-- 6/11/2010: Update cwm, F_ice, F_rain and F_rimef arrays - cwm(I,K)=QC(I,K)+QR(I,K)+QI(I,K) + cwm(I,K) = QC(I,K)+QR(I,K)+QI(I,K) +!aligo + cwm(i,k) = cwm(i,k)/(1.0_kind_phys-q(i,k)) + qr(i,k) = qr(i,k)/(1.0_kind_phys-q(i,k)) + qi(i,k) = qi(i,k)/(1.0_kind_phys-q(i,k)) + qc(i,k) = qc(i,k)/(1.0_kind_phys-q(i,k)) +!aligo IF (QI(I,K) <= EPSQ) THEN F_ICE(I,K)=0. F_RIMEF(I,K)=1. @@ -297,7 +281,8 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & F_RAIN(I,K)=QR(I,K)/(QR(I,K)+QC(I,K)) ENDIF - end do + ENDDO + enddo !--------------------------------------------------------------------- @@ -318,33 +303,32 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & !--------------------------------------------------------------------- CALL FER_HIRES( & - DT=dtphs,RHgrd=RHGRD & - ,DZ8W=dz,RHO_PHY=rr,P_PHY=p_phy,PI_PHY=pi_phy & - ,TH_PHY=th_phy,T_PHY=t & + DT=DT,RHgrd=RHGRD & + ,PRSI=prsi,P_PHY=p_phy,T_PHY=t & ,Q=Q,QT=cwm & - ,LOWLYR=LOWLYR,SR=SR & + ,LOWLYR=LOWLYR,SR=SR,TRAIN_PHY=train_phy & ,F_ICE_PHY=F_ICE,F_RAIN_PHY=F_RAIN & ,F_RIMEF_PHY=F_RIMEF & ,QC=QC,QR=QR,QS=QI & ,RAINNC=rainnc,RAINNCV=rainncv & ,threads=threads & - ,IMS=IMS,IME=IME,JMS=JMS,JME=JME,LM=LM & + ,IMS=IMS,IME=IME,LM=LM & ,D_SS=d_ss & ,refl_10cm=refl_10cm,DX1=DX1) !....................................................................... -!MZ* !Aligo Oct-23-2019 ! - Convert dry qc,qr,qi back to wet mixing ratio -! DO K = 1, LM -! DO I= IMS, IME -! qc_m(i,k) = qc(i,k)/(1.0_kind_phys+q(i,k)) -! qi_m(i,k) = qi(i,k)/(1.0_kind_phys+q(i,k)) -! qr_m(i,k) = qr(i,k)/(1.0_kind_phys+q(i,k)) -! ENDDO -! ENDDO + DO K = 1, LM + DO I= IMS, IME + cwm(i,k) = cwm(i,k)/(1.0_kind_phys+q(i,k)) + qc(i,k) = qc(i,k)/(1.0_kind_phys+q(i,k)) + qi(i,k) = qi(i,k)/(1.0_kind_phys+q(i,k)) + qr(i,k) = qr(i,k)/(1.0_kind_phys+q(i,k)) + ENDDO + ENDDO @@ -366,9 +350,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & !*** UPDATE TEMPERATURE, SPECIFIC HUMIDITY, CLOUD WATER, AND HEATING. !----------------------------------------------------------------------- ! - TNEW=TH_PHY(I,K)*PI_PHY(I,K) - TRAIN(I,K)=TRAIN(I,K)+(TNEW-T(I,K))*RDTPHS - T(I,K)=TNEW + TRAIN(I,K)=TRAIN(I,K)+TRAIN_PHY(I,K) ENDDO ENDDO diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 49b394fe1..7ee7158d9 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -864,22 +864,24 @@ end subroutine progcld1 !!\param mtop (IX,3), vertical indices for low, mid, hi cloud tops !!\param mbot (IX,3), vertical indices for low, mid, hi cloud bases !!\param de_lgth (IX), clouds decorrelation length (km) -!>\section gen_progcld2 progcld2 General Algorithm +!>\section gen_progcld2 progcld2 General Algorithm for the F-A MP scheme !> @{ subroutine progcld2 & - & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs: - & xlat,xlon,slmsk,dz,delp, f_ice,f_rain,r_rime,flgmin, & - & IX, NLAY, NLP1, lmfshal, lmfdeep2, & + & ( plyr,plvl,tlyr,qlyr,qstl,rhly,tvly,clw, & ! --- inputs: + & xlat,xlon,slmsk,dz,delp, & + & ntrac, ntcw, ntiw, ntrw, & + & IX, NLAY, NLP1, & + & lmfshal, lmfdeep2, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! ! ! ! subprogram: progcld2 computes cloud related quantities using ! -! ferrier's prognostic cloud microphysics scheme. ! +! Thompson/WSM6 cloud microphysics scheme. ! ! ! ! abstract: this program computes cloud fractions from cloud ! -! condensates, calculates liquid/ice cloud droplet effective radius, ! +! condensates, ! ! and computes the low, mid, high, total and boundary layer cloud ! ! fractions and the vertical indices of low, mid, and high cloud ! ! top and base. the three vertical cloud domains are set up in the ! @@ -904,11 +906,6 @@ subroutine progcld2 & ! qlyr (IX,NLAY) : layer specific humidity in gm/gm ! ! qstl (IX,NLAY) : layer saturate humidity in gm/gm ! ! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) ! -! clw (IX,NLAY) : layer cloud condensate amount ! -! f_ice (IX,NLAY) : fraction of layer cloud ice (ferrier micro-phys) ! -! f_rain(IX,NLAY) : fraction of layer rain water (ferrier micro-phys) ! -! r_rime(IX,NLAY) : mass ratio of total ice to unrimed ice (>=1) ! -! flgmin(IX) : minimim large ice fraction ! ! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2! ! range, otherwise see in-line comment ! ! xlon (IX) : grid longitude in radians (not used) ! @@ -917,6 +914,8 @@ subroutine progcld2 & ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! +! lmfshal : logical - true for mass flux shallow convection ! +! lmfdeep2 : logical - true for mass flux deep convection ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -925,9 +924,9 @@ subroutine progcld2 & ! clouds(:,:,3) - mean eff radius for liq cloud (micron) ! ! clouds(:,:,4) - layer cloud ice water path (g/m**2) ! ! clouds(:,:,5) - mean eff radius for ice cloud (micron) ! -! clouds(:,:,6) - layer rain drop water path (g/m**2) ! +! clouds(:,:,6) - layer rain drop water path not assigned ! ! clouds(:,:,7) - mean eff radius for rain drop (micron) ! -! *** clouds(:,:,8) - layer snow flake water path (g/m**2) ! +! *** clouds(:,:,8) - layer snow flake water path not assigned ! ! clouds(:,:,9) - mean eff radius for snow flake (micron) ! ! *** fu's scheme need to be normalized by snow density (g/m**3/1.0e6) ! ! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl ! @@ -935,7 +934,7 @@ subroutine progcld2 & ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! ! ! -! external module variables: ! +! module variables: ! ! ivflip : control flag of vertical index direction ! ! =0: index from toa to surface ! ! =1: index from surface to toa ! @@ -947,28 +946,24 @@ subroutine progcld2 & ! lcnorm : control flag for in-cld condensate ! ! =t: normalize cloud condensate ! ! =f: not normalize cloud condensate ! -! lnoprec : precip effect in radiation flag (ferrier scheme) ! -! =t: snow/rain has no impact on radiation ! -! =f: snow/rain has impact on radiation ! ! ! ! ==================== end of description ===================== ! ! implicit none -! --- constants - ! --- inputs integer, intent(in) :: IX, NLAY, NLP1 + integer, intent(in) :: ntrac, ntcw, ntiw, ntrw logical, intent(in) :: lmfshal, lmfdeep2 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, tvly, qlyr, qstl, rhly, clw, f_ice, f_rain, r_rime, & - & dz, delp + & tlyr, qlyr, qstl, rhly, tvly, delp, dz + + real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk - real (kind=kind_phys), dimension(:), intent(in) :: flgmin ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds @@ -980,15 +975,14 @@ subroutine progcld2 & ! --- local variables: real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, & - & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clw2, & - & qcwat, qcice, qrain, fcice, frain, rrime, rsden, clwf + & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf real (kind=kind_phys) :: ptop1(IX,NK_CLDS+1), rxlat(ix) real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id + integer :: i, k, id, nf ! --- constant values ! real (kind=kind_phys), parameter :: xrc3 = 200. @@ -997,9 +991,15 @@ subroutine progcld2 & ! !===> ... begin here ! + do nf=1,nf_clds + do k=1,nlay + do i=1,ix + clouds(i,k,nf) = 0.0 + enddo + enddo + enddo ! clouds(:,:,:) = 0.0 -!> - Assign water/ice/rain/snow cloud properties for Ferrier scheme. do k = 1, NLAY do i = 1, IX cldtot(i,k) = 0.0 @@ -1008,39 +1008,23 @@ subroutine progcld2 & cip (i,k) = 0.0 crp (i,k) = 0.0 csp (i,k) = 0.0 - rew (i,k) = reliq_def ! default liq radius to 10 micron - rei (i,k) = reice_def ! default ice radius to 50 micron + rew (i,k) = reliq_def + rei (i,k) = reice_def rer (i,k) = rrain_def ! default rain radius to 1000 micron - res (i,k) = rsnow_def ! default snow radius to 250 micron - fcice (i,k) = max(0.0, min(1.0, f_ice(i,k))) - frain (i,k) = max(0.0, min(1.0, f_rain(i,k))) - rrime (i,k) = max(1.0, r_rime(i,k)) - tem2d (i,k) = tlyr(i,k) - con_t0c + res (i,k) = rsnow_def + clwf(i,k) = 0.0 enddo enddo ! - if ( lcrick ) then - do i = 1, IX - clwf(i,1) = 0.75*clw(i,1) + 0.25*clw(i,2) - clwf(i,nlay) = 0.75*clw(i,nlay) + 0.25*clw(i,nlay-1) - enddo - do k = 2, NLAY-1 - do i = 1, IX - clwf(i,K) = 0.25*clw(i,k-1) + 0.5*clw(i,k) + 0.25*clw(i,k+1) - enddo - enddo - else - do k = 1, NLAY + + do k = 1, NLAY do i = 1, IX - clwf(i,k) = clw(i,k) + clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) enddo - enddo - endif - -!> - Compute SFC/low/middle/high cloud top pressure for each cloud -!! domain for given latitude. -! - ptopc(k,i): top pressure of each cld domain (k=1-4 are sfc,l,m, -!! h; i=1,2 are low-lat (<45 degree) and pole regions) + enddo +!> - Find top pressure for each cloud domain for given latitude. +!! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h; +!! i=1,2 are low-lat (<45 degree) and pole regions) do i =1, IX rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range @@ -1055,76 +1039,61 @@ subroutine progcld2 & enddo enddo -!> - Seperate cloud condensate into liquid, ice, and rain types, and -!! save the liquid+ice condensate in array clw2 for later calculation -!! of cloud fraction. +!> - Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ . do k = 1, NLAY - do i = 1, IX - if (tem2d(i,k) > -40.0) then - qcice(i,k) = clwf(i,k) * fcice(i,k) - tem1 = clwf(i,k) - qcice(i,k) - qrain(i,k) = tem1 * frain(i,k) - qcwat(i,k) = tem1 - qrain(i,k) - clw2 (i,k) = qcwat(i,k) + qcice(i,k) - else - qcice(i,k) = clwf(i,k) - qrain(i,k) = 0.0 - qcwat(i,k) = 0.0 - clw2 (i,k) = clwf(i,k) - endif - enddo + do i = 1, IX + cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k)) + cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k)) + crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k)) + csp(i,k) = 0.0 + enddo enddo -!> - Call module_microphysics::rsipath2(), in Ferrier's scheme, to -!! compute layer's cloud liquid, ice, rain, and snow water condensate -!! path and the partical effective radius for liquid droplet, rain drop, -!! and snow flake. - call rsipath2 & -! --- inputs: - & ( plyr, plvl, tlyr, qlyr, qcwat, qcice, qrain, rrime, & - & IX, NLAY, ivflip, flgmin, & -! --- outputs: - & cwp, cip, crp, csp, rew, rer, res, rsden & - & ) +!> - Compute cloud ice effective radii + + do k = 1, NLAY + do i = 1, IX + tem2 = tlyr(i,k) - con_ttp + if (cip(i,k) > 0.0) then + tem3 = gord * cip(i,k) * plyr(i,k) / (delp(i,k)*tvly(i,k)) - do k = 1, NLAY - do i = 1, IX - tem2d(i,k) = (con_g * plyr(i,k)) & - & / (con_rd* delp(i,k)) + if (tem2 < -50.0) then + rei(i,k) = (1250.0/9.917) * tem3 ** 0.109 + elseif (tem2 < -40.0) then + rei(i,k) = (1250.0/9.337) * tem3 ** 0.08 + elseif (tem2 < -30.0) then + rei(i,k) = (1250.0/9.208) * tem3 ** 0.055 + else + rei(i,k) = (1250.0/9.387) * tem3 ** 0.031 + endif + rei(i,k) = max(10.0, min(rei(i,k), 150.0)) + endif enddo - enddo + enddo + !> - Calculate layer cloud fraction. - clwmin = 0.0e-6 + clwmin = 0.0 if (.not. lmfshal) then do k = 1, NLAY do i = 1, IX -! clwt = 1.0e-7 * (plyr(i,k)*0.001) -! clwt = 1.0e-6 * (plyr(i,k)*0.001) - clwt = 2.0e-6 * (plyr(i,k)*0.001) -! clwt = 5.0e-6 * (plyr(i,k)*0.001) -! clwt = 5.0e-6 + clwt = 1.0e-6 * (plyr(i,k)*0.001) +! clwt = 2.0e-6 * (plyr(i,k)*0.001) + + if (clwf(i,k) > clwt) then - if (clw2(i,k) > clwt) then onemrh= max( 1.e-10, 1.0-rhly(i,k) ) clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) -! tem1 = min(max(sqrt(onemrh*qstl(i,k)),0.0001),1.0) -! tem1 = 100.0 / tem1 - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) tem1 = 2000.0 / tem1 -! tem1 = 2400.0 / tem1 -!cnt tem1 = 2500.0 / tem1 -! tem1 = min(max(sqrt(onemrh*qstl(i,k)),0.0001),1.0) -! tem1 = 2000.0 / tem1 + ! tem1 = 1000.0 / tem1 -! tem1 = 100.0 / tem1 - value = max( min( tem1*(clw2(i,k)-clwm), 50.0 ), 0.0 ) + value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) tem2 = sqrt( sqrt(rhly(i,k)) ) cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) @@ -1134,21 +1103,21 @@ subroutine progcld2 & else do k = 1, NLAY do i = 1, IX -! clwt = 1.0e-6 * (plyr(i,k)*0.001) - clwt = 2.0e-6 * (plyr(i,k)*0.001) + clwt = 1.0e-6 * (plyr(i,k)*0.001) +! clwt = 2.0e-6 * (plyr(i,k)*0.001) - if (clw2(i,k) > clwt) then + if (clwf(i,k) > clwt) then onemrh= max( 1.e-10, 1.0-rhly(i,k) ) clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) ! - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan if (lmfdeep2) then tem1 = xrc3 / tem1 else tem1 = 100.0 / tem1 endif ! - value = max( min( tem1*(clw2(i,k)-clwm), 50.0 ), 0.0 ) + value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) tem2 = sqrt( sqrt(rhly(i,k)) ) cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) @@ -1169,16 +1138,6 @@ subroutine progcld2 & enddo enddo -!> - When lnoprec = .true. snow/rain has no impact on radiation. - if ( lnoprec ) then - do k = 1, NLAY - do i = 1, IX - crp(i,k) = 0.0 - csp(i,k) = 0.0 - enddo - enddo - endif -! if ( lcnorm ) then do k = 1, NLAY do i = 1, IX @@ -1193,38 +1152,6 @@ subroutine progcld2 & enddo endif -!> - Calculate effective ice cloud droplet radius following Heymsfield and McFarquhar (1996) -!! \cite heymsfield_and_mcfarquhar_1996 . - - do k = 1, NLAY - do i = 1, IX - tem1 = tlyr(i,k) - con_ttp - tem2 = cip(i,k) - - if (tem2 > 0.0) then - tem3 = tem2d(i,k) * tem2 / tvly(i,k) - - if (tem1 < -50.0) then - rei(i,k) = (1250.0/9.917) * tem3 ** 0.109 - elseif (tem1 < -40.0) then - rei(i,k) = (1250.0/9.337) * tem3 ** 0.08 - elseif (tem1 < -30.0) then - rei(i,k) = (1250.0/9.208) * tem3 ** 0.055 - else - rei(i,k) = (1250.0/9.387) * tem3 ** 0.031 - endif - -! if (lprnt .and. k == l) print *,' reiL=',rei(i,k),' icec=', & -! & icec,' cip=',cip(i,k),' tem=',tem,' delt=',delt - - rei(i,k) = max(10.0, min(rei(i,k), 300.0)) -! rei(i,k) = max(20.0, min(rei(i,k), 300.0)) -!!!! rei(i,k) = max(30.0, min(rei(i,k), 300.0)) -! rei(i,k) = max(50.0, min(rei(i,k), 300.0)) -! rei(i,k) = max(100.0, min(rei(i,k), 300.0)) - endif - enddo - enddo ! do k = 1, NLAY do i = 1, IX @@ -1233,10 +1160,9 @@ subroutine progcld2 & clouds(i,k,3) = rew(i,k) clouds(i,k,4) = cip(i,k) clouds(i,k,5) = rei(i,k) - clouds(i,k,6) = crp(i,k) + clouds(i,k,6) = crp(i,k) ! added for Thompson clouds(i,k,7) = rer(i,k) -! clouds(i,k,8) = csp(i,k) !ncar scheme - clouds(i,k,8) = csp(i,k) * rsden(i,k) !fu's scheme + clouds(i,k,8) = csp(i,k) ! added for Thompson clouds(i,k,9) = res(i,k) enddo enddo @@ -1250,9 +1176,11 @@ subroutine progcld2 & enddo endif -!> - Call gethml(), to compute low, mid, high, total, and boundary -!! layer cloud fractions and clouds top/bottom layer indices for low, -!! mid, and high clouds. +!> - Call gethml() to compute low,mid,high,total, and boundary layer +!! cloud fractions and clouds top/bottom layer indices for low, mid, +!! and high clouds. +! --- compute low, mid, high, total, and boundary layer cloud fractions +! and clouds top/bottom layer indices for low, mid, and high clouds. ! The three cloud domain boundaries are defined by ptopc. The cloud ! overlapping method is defined by control flag 'iovr', which may ! be different for lw and sw radiation programs. @@ -1270,6 +1198,8 @@ subroutine progcld2 & return !................................... end subroutine progcld2 +!................................... + !> @} !-----------------------------------