CONVECT Subroutine

public subroutine CONVECT(nd, nl, delt, iflag, precip, wd, tprime, qprime, cbmf, ithread)

Uses



*** On input:      ***

T: Array of absolute temperature (K) of dimension ND, with first index corresponding to lowest model level. Note that this array will be altered by the subroutine if dry convective adjustment occurs and if IPBL is not equal to 0.

Q: Array of specific humidity (gm/gm) of dimension ND, with first index corresponding to lowest model level. Must be defined at same grid levels as T. Note that this array will be altered if dry convective adjustment occurs and if IPBL is not equal to 0.

QS: Array of saturation specific humidity of dimension ND, with first index corresponding to lowest model level. Must be defined at same grid levels as T. Note that this array will be altered if dry convective adjustment occurs and if IPBL is not equal to 0.

U: Array of zonal wind velocity (m/s) of dimension ND, witth first index corresponding with the lowest model level. Defined at same levels as T. Note that this array will be altered if dry convective adjustment occurs and if IPBL is not equal to 0.

V: Same as U but for meridional velocity.

TRA: Array of passive tracer mixing ratio, of dimensions (ND,NTRA), where NTRA is the number of different tracers. If no convective tracer transport is needed, define a dummy input array of dimension (ND,1). Tracers are defined at same vertical levels as T. Note that this array will be altered if dry convective adjustment occurs and if IPBL is not equal to 0.

P: Array of pressure (mb) of dimension ND, with first index corresponding to lowest model level. Must be defined at same grid levels as T.

PH: Array of pressure (mb) of dimension ND+1, with first index corresponding to lowest level. These pressures are defined at levels intermediate between those of P, T, Q and QS. The first value of PH should be greater than (i.e. at a lower level than) the first value of the array P.

ND: The dimension of the arrays T,Q,QS,P,PH,FT and FQ

NL: The maximum number of levels to which convection can penetrate, plus 1. NL MUST be less than or equal to ND-1.

NTRA:The number of different tracers. If no tracer transport is needed, set this equal to 1. (On most compilers, setting NTRA to 0 will bypass tracer calculation, saving some CPU.)

DELT: The model time step (sec) between calls to CONVECT


***   On Output:         ***

IFLAG: An output integer whose value denotes the following:

       VALUE                        INTERPRETATION
       -----                        --------------
         0               No moist convection; atmosphere is not
                         unstable, or surface temperature is less
                         than 250 K or surface specific humidity
                         is non-positive.

         1               Moist convection occurs.

         2               No moist convection: lifted condensation
                         level is above the 200 mb level.

         3               No moist convection: cloud base is higher
                         then the level NL-1.

         4               Moist convection occurs, but a CFL condition
                         on the subsidence warming is violated. This
                         does not cause the scheme to terminate.

FT: Array of temperature tendency (K/s) of dimension ND, defined at same grid levels as T, Q, QS and P.

FQ: Array of specific humidity tendencies ((gm/gm)/s) of dimension ND, defined at same grid levels as T, Q, QS and P.

FU: Array of forcing of zonal velocity (m/s^2) of dimension ND, defined at same grid levels as T.

FV: Same as FU, but for forcing of meridional velocity.

FTRA: Array of forcing of tracer content, in tracer mixing ratio per second, defined at same levels as T. Dimensioned (ND,NTRA).

PRECIP: Scalar convective precipitation rate (mm/day).

WD: A convective downdraft velocity scale. For use in surface flux parameterizations. See convect.ps file for details.

TPRIME: A convective downdraft temperature perturbation scale (K). For use in surface flux parameterizations. See convect.ps file for details.

QPRIME: A convective downdraft specific humidity perturbation scale (gm/gm). For use in surface flux parameterizations. See convect.ps file for details.

CBMF: The cloud base mass flux ((kg/m**2)/s). THIS SCALAR VALUE MUST BE STORED BY THE CALLING PROGRAM AND RETURNED TO CONVECT AT ITS NEXT CALL. That is, the value of CBMF must be "remembered" by the calling program between calls to CONVECT.


***  THE PARAMETER NA SHOULD IN GENERAL BE GREATER THAN   ***
***                OR EQUAL TO  ND + 1                    ***

** PERFORM DRY ADIABATIC ADJUSTMENT ***

JC=0 DO 30 I=NL-1,1,-1 JN=0 SUM=TH(I)(1.+qconv(I)EPSI-qconv(I)) DO 10 J=I+1,NL SUM=SUM+TH(J)(1.+qconv(J)EPSI-qconv(J)) THBAR=SUM/REAL(J+1-I) IF((TH(J)(1.+qconv(J)EPSI-qconv(J))).LT.THBAR)JN=J 10 CONTINUE IF(I.EQ.1)JN=MAX(JN,2) IF(JN.EQ.0)GOTO 30 12 CONTINUE AHM=0.0 RM=0.0 DO 15 J=I,JN AHM=AHM+(CPD(1.-qconv(J))+qconv(J)CPV)tconv(J) + (phconv_hpa(J)-phconv_hpa(J+1)) RM=RM+qconv(J)(phconv_hpa(J)-phconv_hpa(J+1)) 15 CONTINUE DPHINV=1./(phconv_hpa(I)-phconv_hpa(JN+1)) RM=RMDPHINV A2=0.0 DO 20 J=I,JN qconv(J)=RM RDCP=(RD(1.-qconv(J))+qconv(J)RV)/ 1 (CPD(1.-qconv(J))+qconv(J)CPV) X=(0.001pconv_hpa(J))RDCP TOLD(J)=tconv(J) tconv(J)=X A2=A2+(CPD(1.-qconv(J))+qconv(J)CPV)X 1 (phconv_hpa(J)-phconv_hpa(J+1)) 20 CONTINUE DO 25 J=I,JN TH(J)=AHM/A2 tconv(J)=tconv(J)TH(J) TC=TOLD(J)-273.15 ALV=LV0-CPVMCLTC qsconv(J)=qsconv(J)+qsconv(J)(1.+qsconv(J)(EPSI-1.))ALV 1 (tconv(J)- TOLD(J))/(RVTOLD(J)TOLD(J)) if (qslev(j) .lt. 0.) then write(,) 'qslev.lt.0 ',j,qslev endif 25 CONTINUE IF((TH(JN+1)(1.+qconv(JN+1)EPSI-qconv(JN+1))).LT. 1 (TH(JN)(1.+qconv(JN)*EPSI-qconv(JN))))THEN JN=JN+1 GOTO 12 END IF IF(I.EQ.1)JC=JN 30 CONTINUE

*** Remove any supersaturation that results from adjustment ***

IF(JC.GT.1)THEN DO 38 J=1,JC IF(qsconv(J).LT.qconv(J))THEN ALV=LV0-CPVMCL(tconv(J)-273.15) TNEW=tconv(J)+ALV(qconv(J)-qsconv(J))/(CPD(1.-qconv(J))+ 1 CLqconv(J)+qsconv(J)(CPV-CL+ALVALV/(RVtconv(J)tconv(J)))) ALVNEW=LV0-CPVMCL(TNEW-273.15) QNEW=(ALVqconv(J)-(TNEW-tconv(J))(CPD(1.-qconv(J)) 1 +CLqconv(J)))/ALVNEW PRECIP=PRECIP+24.3600.1.0E5(phconv_hpa(J)-phconv_hpa(J+1)) 1 (qconv(J)-QNEW)/(GDELT*ROWL) tconv(J)=TNEW qconv(J)=QNEW qsconv(J)=QNEW END IF 38 CONTINUE END IF

END IF

*** CALCULATE ARRAYS OF GEOPOTENTIAL, HEAT CAPACITY AND STATIC ENERGY

Arguments

Type IntentOptional Attributes Name
integer :: nd
integer :: nl
real :: delt
integer :: iflag
real :: precip
real :: wd
real :: tprime
real :: qprime
real :: cbmf
integer, intent(in) :: ithread