1 |
C $Header$ |
C $Header$ |
2 |
C $Name$ |
C $Name$ |
3 |
|
|
4 |
|
#include "CPP_OPTIONS.h" |
5 |
subroutine moistio (ndmoist,istrip,npcs,pz,tz,qz,ntracer,ptracer, |
subroutine moistio (ndmoist,istrip,npcs,pz,tz,qz,ntracer,ptracer, |
6 |
. pkht,qqz,dumoist,dvmoist,dtmoist,dqmoist, |
. pkht,qqz,dumoist,dvmoist,dtmoist,dqmoist, |
7 |
. im,jm,lm,sige,sig,dsig,ptop, |
. im,jm,lm,sige,sig,dsig,ptop, |
8 |
. iras,rainlsp,rainconv,snowfall, |
. iras,rainlsp,rainconv,snowfall, |
9 |
. nswcld,cldtot_sw,cldras_sw,cldlsp_sw,nswlz,swlz, |
. nswcld,cldtot_sw,cldras_sw,cldlsp_sw,nswlz,swlz, |
10 |
. nlwcld,cldtot_lw,cldras_lw,cldlsp_lw,nlwlz,lwlz, |
. nlwcld,cldtot_lw,cldras_lw,cldlsp_lw,nlwlz,lwlz, |
11 |
. lpnt,qdiag,nd,myid) |
. lpnt,myid) |
12 |
|
|
13 |
|
#ifdef ALLOW_DIAGNOSTICS |
14 |
#include "diagnostics.h" |
#include "diagnostics.h" |
15 |
|
#endif |
16 |
|
|
17 |
c Input Variables |
c Input Variables |
18 |
c --------------- |
c --------------- |
19 |
integer ndmoist,istrip,npcs,nd,myid |
integer ndmoist,istrip,npcs,myid |
20 |
|
|
21 |
integer im,jm,lm |
integer im,jm,lm |
22 |
real ptop |
real ptop |
56 |
real cldtot_lw(im,jm,lm) |
real cldtot_lw(im,jm,lm) |
57 |
real lwlz(im,jm,lm) |
real lwlz(im,jm,lm) |
58 |
|
|
|
real qdiag(im,jm,nd) |
|
59 |
logical lpnt |
logical lpnt |
60 |
|
|
61 |
c Local Variables |
c Local Variables |
164 |
|
|
165 |
C Minimum Large-Scale Cloud Fraction at rhcrit |
C Minimum Large-Scale Cloud Fraction at rhcrit |
166 |
alpha = 0.80 |
alpha = 0.80 |
167 |
C Difference in fraction between SR and LS Thresshold |
C Difference in fraction between SR and LS Threshold |
168 |
offset = 0.10 |
offset = 0.10 |
169 |
C Large-Scale Relative Humidity Threshold in PLB |
C Large-Scale Relative Humidity Threshold in PBL |
170 |
rhmin = 0.90 |
rhmin = 0.90 |
171 |
C Maximum Cloud Fraction associated with RAS |
C Maximum Cloud Fraction associated with RAS |
172 |
rasmax = 1.00 |
rasmax = 1.00 |
486 |
C Top level of atan func above this rh_threshold = rhmin |
C Top level of atan func above this rh_threshold = rhmin |
487 |
pup = 600. |
pup = 600. |
488 |
do i=num,num+nindeces(nsubcl)-1 |
do i=num,num+nindeces(nsubcl)-1 |
489 |
do L = nsubcl, lm |
do L = nsubcl, lm |
490 |
rhcrit(i,L) = 1. |
rhcrit(i,L) = 1. |
491 |
enddo |
enddo |
492 |
do L = 1, nsubcl-1 |
do L = 1, nsubcl-1 |
493 |
pcheck = (1000.-ptop)*sig(L) + ptop |
pcheck = (1000.-ptop)*sig(L) + ptop |
494 |
if (pcheck .le. pup) then |
if (pcheck .le. pup) then |
495 |
rhcrit(i,L) = rhmin |
rhcrit(i,L) = rhmin |
496 |
else |
else |
497 |
ppbl = (1000.-ptop)*sig(nsubcl) + ptop |
ppbl = (1000.-ptop)*sig(nsubcl) + ptop |
498 |
rhcrit(i,L) = rhmin + (1.-rhmin)/(19.) * (( |
rhcrit(i,L) = rhmin + (1.-rhmin)/(19.) * |
499 |
. atan( (2.*(pcheck-pup)/(ppbl-pup)-1.) * |
. ((atan( (2.*(pcheck-pup)/(ppbl-pup)-1.) * |
500 |
. tan(20.*pi/21.-0.5*pi) ) |
. tan(20.*pi/21.-0.5*pi) ) |
501 |
. + 0.5*pi) * 21./pi - 1.) |
. + 0.5*pi) * 21./pi - 1.) |
502 |
endif |
endif |
503 |
enddo |
enddo |
504 |
enddo |
enddo |
505 |
|
|
506 |
c Save Initial Values of Temperature and Specific Humidity |
c Save Initial Values of Temperature and Specific Humidity |