1 !WRF:MODEL_LAYER:DYNAMICS
3 MODULE module_damping_em
9 !------------------------------------------------------------------------------
11 SUBROUTINE held_suarez_damp( ru_tend, rv_tend, ru, rv, p, pb, &
12 ids,ide, jds,jde, kds,kde, &
13 ims,ime, jms,jme, kms,kme, &
14 its,ite, jts,jte, kts,kte )
18 INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde
19 INTEGER, INTENT(IN ) :: ims,ime, jms,jme, kms,kme
20 INTEGER, INTENT(IN ) :: its,ite, jts,jte, kts,kte
22 REAL, DIMENSION( ims:ime , kms:kme, jms:jme ), &
23 INTENT(INOUT) :: ru_tend, &
26 REAL, DIMENSION( ims:ime , kms:kme, jms:jme ), &
27 INTENT(IN) :: ru, rv, p, pb
31 REAL :: delty,delthez,sigb,kka,kkf
32 REAL :: sig,sigterm,kkt,kkv,daylensec
35 daylensec=60.0*60.0*24.0
38 ! fixed limits so no divide by zero, WCS 070509
40 DO j=max(jds+1,jts),min(jde-1,jte)
41 DO k=kts,MIN(kte,kde-1)
44 sig= (p(i,k,j-1)+pb(i,k,j-1)+p(i,k,j)+pb(i,k,j))/ &
45 (p(i,1,j-1)+pb(i,1,j-1)+p(i,1,j)+pb(i,1,j))
46 sigterm=max(0.0,(sig-sigb)/(1.0-sigb))
48 rv_tend(i,k,j)=rv_tend(i,k,j)-kkv*rv(i,k,j)
54 DO j=jts,min(jde-1,jte)
55 DO k=kts,MIN(kte,kde-1)
58 sig= (p(i-1,k,j)+pb(i-1,k,j)+p(i,k,j)+pb(i,k,j))/ &
59 (p(i-1,1,j)+pb(i-1,1,j)+p(i,1,j)+pb(i,1,j))
60 sigterm=max(0.0,(sig-sigb)/(1.0-sigb))
62 ru_tend(i,k,j)=ru_tend(i,k,j)-kkv*ru(i,k,j)
68 END SUBROUTINE held_suarez_damp
70 !------------------------------------------------------------------------------
72 END MODULE module_damping_em