MODULE MODULE_CU_BMJ USE MODULE_MODEL_CONSTANTS REAL,PARAMETER :: & & DSPC=-3000. & & ,DTTOP=0.,EFIFC=5.0,EFIMN=0.20,EFMNT=0.70 & & ,ELIWV=2.683E6,ENPLO=20000.,ENPUP=15000. & & ,EPSDN=1.05,EPSDT=0. & & ,EPSNTP=.0001,EPSNTT=.0001,EPSPR=1.E-7 & & ,EPSUP=1.00 & & ,FR=1.00,FSL=0.85,FSS=0.85,GAM=0.5,PEPS=1./2.5 & & ,FUP=0.,FCC=5.00,CRMN=0.14,CRMX=85.0 & & ,PBM=13000.,PFRZ=15000.,PNO=1000. & & ,PONE=2500.,PQM=20000. & & ,PSH=20000.,PSHU=45000. & & ,RENDP=1./(ENPLO-ENPUP) & & ,RHLSC=0.00,RHHSC=1.10 & & ,ROW=1.E3 & & ,STABDF=0.90,STABDS=0.90 & & ,STABS=1.0,STRESH=1.10 & & ,DTSHAL=-1.0,TREL=2400. REAL,PARAMETER :: DTtrigr=-0.0 & ,DTPtrigr=DTtrigr*PONE REAL,PARAMETER :: DSPBFL=-3875.*FR & & ,DSP0FL=-5875.*FR & & ,DSPTFL=-1875.*FR & & ,DSPBFS=-3875. & & ,DSP0FS=-5875. & & ,DSPTFS=-1875. REAL,PARAMETER :: PL=2500.,PLQ=70000.,PH=105000. & & ,THL=210.,THH=365.,THHQ=325. INTEGER,PARAMETER :: ITB=76,JTB=134,ITBQ=152,JTBQ=440 INTEGER,PARAMETER :: ITREFI_MAX=3 REAL,DIMENSION(ITB),PRIVATE,SAVE :: STHE,THE0 REAL,DIMENSION(JTB),PRIVATE,SAVE :: QS0,SQS REAL,DIMENSION(ITBQ),PRIVATE,SAVE :: STHEQ,THE0Q REAL,DIMENSION(ITB,JTB),PRIVATE,SAVE :: PTBL REAL,DIMENSION(JTB,ITB),PRIVATE,SAVE :: TTBL REAL,DIMENSION(JTBQ,ITBQ),PRIVATE,SAVE :: TTBLQ REAL,DIMENSION(JTB) :: QS0_EXP,SQS_EXP REAL,DIMENSION(ITB,JTB) :: PTBL_EXP REAL,PARAMETER :: RDP=(ITB-1.)/(PH-PL),RDPQ=(ITBQ-1.)/(PH-PLQ) & & ,RDQ=ITB-1,RDTH=(JTB-1.)/(THH-THL) & & ,RDTHE=JTB-1.,RDTHEQ=JTBQ-1. & & ,RSFCP=1./101300. REAL,PARAMETER :: AVGEFI=(EFIMN+1.)*0.5 CONTAINS SUBROUTINE BMJDRV( & & IDS,IDE,JDS,JDE,KDS,KDE & & ,IMS,IME,JMS,JME,KMS,KME & & ,ITS,ITE,JTS,JTE,KTS,KTE & & ,DT,ITIMESTEP,STEPCU,CCLDFRA,CONVCLD & & ,RAINCV,PRATEC,CUTOP,CUBOT,KPBL & & ,TH,T,QV,QCCONV,QICONV,BMJ_RAD_FEEDBACK & & ,PINT,PMID,PI,RHO,DZ8W & & ,CP,R,ELWV,ELIV,G,TFRZ,D608 & & ,CLDEFI,LOWLYR,XLAND,CU_ACT_FLAG & & ,RTHCUTEN,RQVCUTEN & & ) IMPLICIT NONE INTEGER,INTENT(IN) :: IDS,IDE,JDS,JDE,KDS,KDE & & ,IMS,IME,JMS,JME,KMS,KME & & ,ITS,ITE,JTS,JTE,KTS,KTE INTEGER,INTENT(IN) :: ITIMESTEP,STEPCU INTEGER,DIMENSION(IMS:IME,JMS:JME),INTENT(IN) :: KPBL,LOWLYR REAL,INTENT(IN) :: CP,DT,ELIV,ELWV,G,R,TFRZ,D608 REAL,DIMENSION(IMS:IME,JMS:JME),INTENT(IN) :: XLAND REAL,DIMENSION(IMS:IME,KMS:KME,JMS:JME),INTENT(IN) :: DZ8W & & ,PI,PINT & & ,PMID,QV & & ,RHO,T,TH REAL,DIMENSION(IMS:IME,KMS:KME,JMS:JME),INTENT(INOUT) :: CCLDFRA & ,QCCONV & ,QICONV REAL,DIMENSION(IMS:IME,KMS:KME,JMS:JME) & & ,OPTIONAL & & ,INTENT(INOUT) :: RQVCUTEN,RTHCUTEN REAL,DIMENSION(IMS:IME,JMS:JME),INTENT(INOUT) :: CLDEFI,RAINCV, & PRATEC,CONVCLD REAL,DIMENSION(IMS:IME,JMS:JME),INTENT(OUT) :: CUBOT,CUTOP LOGICAL,INTENT(IN) :: bmj_rad_feedback LOGICAL,DIMENSION(IMS:IME,JMS:JME),INTENT(INOUT) :: CU_ACT_FLAG INTEGER :: LBOT,LPBL,LTOP REAL :: DTCNVC,LANDMASK,PCPCOL,PSFC,PTOP REAL :: PAVG,PWCOL,DQCOL,DQCOLMIN REAL :: CUMX,QCIS,RRP,PRRT,MCOL,MPVPR,FACTL INTEGER :: BBOT,TTOP REAL,DIMENSION(KTS:KTE) :: DPCOL,DQDT,DTDT,PCOL,QCOL,TCOL REAL,DIMENSION(KTS:KTE) :: PVPR,JPR INTEGER :: I,J,K,KFLIP,LMH REAL :: DELQ,DELT,PLYR INTEGER :: IMD,JMD LOGICAL :: PRINT_DIAG IMD=(IMS+IME)/2 JMD=(JMS+JME)/2 PRINT_DIAG=.FALSE. DO J=JTS,JTE DO I=ITS,ITE CU_ACT_FLAG(I,J)=.TRUE. ENDDO ENDDO DTCNVC=DT*STEPCU DO J=JTS,JTE DO I=ITS,ITE DO K=KTS,KTE DQDT(K)=0. DTDT(K)=0. JPR(K)=0. PVPR(K)=0. QCCONV(I,K,J)=0. QICONV(I,K,J)=0. CCLDFRA(I,K,J)=0. ENDDO DQCOL=0. PWCOL=0. PCPCOL=0. DQCOLMIN=0. RAINCV(I,J)=0. PRATEC(I,J)=0. CONVCLD(I,J)=0. PSFC=PINT(I,LOWLYR(I,J),J) PTOP=PINT(I,KTE+1,J) LANDMASK=XLAND(I,J)-1. DO K=KTS,KTE KFLIP=KTE+1-K QCOL(K)=MAX(EPSQ,QV(I,KFLIP,J)/(1.+QV(I,KFLIP,J))) TCOL(K)=T(I,KFLIP,J) PCOL(K)=PMID(I,KFLIP,J) DPCOL(K)=RHO(I,KFLIP,J)*G*DZ8W(I,KFLIP,J) ENDDO LMH=KTE+1-LOWLYR(I,J) LPBL=KTE+1-KPBL(I,J) CALL BMJ(ITIMESTEP,I,J,DTCNVC,LMH,LANDMASK,CLDEFI(I,J) & & ,DPCOL,PCOL,QCOL,TCOL,PSFC,PTOP & & ,DQDT,DTDT,PCPCOL,LBOT,LTOP,LPBL & & ,PWCOL,DQCOL,DQCOLMIN & & ,CP,R,ELWV,ELIV,G,TFRZ,D608 & & ,PRINT_DIAG & & ,IDS,IDE,JDS,JDE,KDS,KDE & & ,IMS,IME,JMS,JME,KMS,KME & & ,ITS,ITE,JTS,JTE,KTS,KTE) IF ( PRESENT( RTHCUTEN ) .AND. PRESENT( RQVCUTEN )) THEN DO K=KTS,KTE KFLIP=KTE+1-K RTHCUTEN(I,K,J)=DTDT(KFLIP)/PI(I,K,J) RQVCUTEN(I,K,J)=DQDT(KFLIP)/(1.-QCOL(KFLIP))**2 ENDDO ENDIF RAINCV(I,J)=PCPCOL*1.E3/STEPCU PRATEC(I,J)=PCPCOL*1.E3/(STEPCU * DT) CUTOP(I,J)=REAL(KTE+1-LTOP) CUBOT(I,J)=REAL(KTE+1-LBOT) IF ( bmj_rad_feedback ) THEN IF (DQCOL.GT.DQCOLMIN) THEN TTOP=0 BBOT=0 PAVG=0. CUMX=0. MPVPR=0. FACTL=0. PRRT=(PRATEC(I,J)*86400.0)/CRMN RRP=0.8/(LOG(CRMX/CRMN)) IF (PRRT=TFRZ) THEN QICONV(I,K,J)=0. QCCONV(I,K,J)=(QCIS*QCOL(KFLIP)*CCLDFRA(I,K,J))/(1.-QCOL(KFLIP)) ELSE QICONV(I,K,J)=(QCIS*QCOL(KFLIP)*CCLDFRA(I,K,J))/(1.-QCOL(KFLIP)) QCCONV(I,K,J)=0. ENDIF ENDDO ENDIF ENDIF IF(PRINT_DIAG)THEN DELT=0. DELQ=0. PLYR=0. IF(LBOT>0.AND.LTOP