!**********************************************************************c SUBROUTINE CALRH_PW(RHPW) ! Algorithm use at GSD for RUC and Rapid Refresh !------------------------------------------------------------------ ! use vrbls3d, only: q, pmid, t use params_mod, only: g use ctlblk_mod, only: lm, jsta, jend, lm, im !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - implicit none real,PARAMETER :: svp1=6.1153,svp2=17.67,svp3=29.65 REAL, dimension(im,jsta:jend):: PW, PW_SAT, RHPW REAL deltp,sh,qv,temp,es,qs,qv_sat integer i,j,l,k,ka,kb pw = 0. pw_sat = 0. rhpw = 0. DO L=1,LM k=lm-l+1 DO J=JSTA,JEND DO I=1,IM ! -- use specific humidity for PW calculation sh = q(i,j,k) qv = sh/(1.-sh) KA = MAX(1,K-1) KB = MIN(LM,K+1) ! assumes that P is in mb at this point - be careful! DELTP = 0.5*(PMID(I,J,KB)-PMID(I,J,KA)) PW(I,J) = PW(I,J) + sh *DELTP/G !Csgb -- Add more for RH w.r.t. PW-sat temp = T(I,J,K) ! --- use saturation mixing ratio w.r.t. water here ! for this check. es = svp1*exp(SVP2*(Temp-273.15)/(Temp-SVP3)) ! -- get saturation specific humidity (w.r.t. total air) qs = 0.62198*es/(pmid(i,j,k)*1.e-2-0.37802*es) ! -- get saturation mixing ratio (w.r.t. dry air) qv_sat = qs/(1.-qs) pw_sat(i,j) = pw_sat(i,j) + max(sh,Qs)*DELTP/G if (i.eq.120 .and. j.eq.120 ) & write (6,*)'pw-sat', temp, sh, qs, pmid(i,j,kb) & ,pmid(i,j,ka),pw(i,j),pw_sat(i,j) !sgb - This IS RH w.r.t. PW-sat. RHPW (i,j) = min(1.,PW(i,j) / pw_sat(i,j)) * 100. ENDDO ENDDO ENDDO RETURN END