83 & jsta_2l,jend_2u,jsta,jend,lm,lp1, &
85 & t,q,pmid,pint,lmh,prec,zint,ptype,me)
89 integer,
intent(in):: im,jm,jsta_2l,jend_2u,jsta,jend,lm,lp1,iseed,me,&
90 ista_2l,iend_2u,ista,iend
91 real,
intent(in):: g,pthresh
92 real,
intent(in),
dimension(ista_2l:iend_2u,jsta_2l:jend_2u,lm) :: t, q, pmid
93 real,
intent(in),
dimension(ista_2l:iend_2u,jsta_2l:jend_2u,lp1) :: pint, zint
94 real,
intent(in),
dimension(ista_2l:iend_2u,jsta_2l:jend_2u) :: lmh, prec
98 integer,
intent(out) :: ptype(ista:iend,jsta:jend)
100 integer i,j,ifrzl,iwrml,l,lhiwrm,lmhk,jlen
101 real pintk1,areane,tlmhk,areape,pintk2,surfw,area1,dzkl,psfck,r1,r2
103 integer :: rn_seed_size
104 integer,
allocatable,
dimension(:) :: rn_seed
105 logical,
parameter :: debugprint = .false.
111 print *,
'in calwxtbg, jsta,jend=',jsta,jend,
' im=',im
112 print *,
'in calwxtbg,me=',me,
'iseed=',iseed
122 jlen = jend - jsta + 1
124 call random_seed(
size = rn_seed_size)
125 allocate(rn_seed(rn_seed_size))
127 call random_seed(put = rn_seed)
128 call random_number(rn)
138 lmhk = min(nint(lmh(i,j)),lm)
139 psfck = pint(i,j,lmhk+1)
141 if (prec(i,j) <= pthresh) cycle
149 if (tlmhk >= 273.15)
then
151 if (t(i,j,l) >= 273.15 .and. t(i,j,l-1) < 273.15 .and. &
152 & iwrml == lmhk+1) iwrml = l
162 if (t(i,j,l) >= 273.15 .and. pmid(i,j,l) > 25000.) lhiwrm = l
185 if (ifrzl == 0.and.t(i,j,l) <= 273.15) ifrzl = 1
187 dzkl = zint(i,j,l)-zint(i,j,l+1)
188 area1 = log(t(i,j,l)/273.15) * g * dzkl
189 if (t(i,j,l) >= 273.15.and. pmid(i,j,l) > 25000.)
then
190 if (l < iwrml) areape = areape + area1
191 if (l >= iwrml) surfw = surfw + area1
193 if (l > lhiwrm) areane = areane + abs(area1)
200 if (areape < 2.0)
then
203 if (surfw < 5.6)
then
207 else if (surfw > 13.2)
then
225 if (areane > 66.0+0.66*areape)
then
229 if (surfw < 5.6)
then
232 else if (surfw > 13.2)
then
245 else if (areane < 46.0+0.66*areape)
then
248 if (tlmhk < 273.15)
then
260 if (surfw < 5.6)
then
262 else if (surfw > 13.2)
then
267 r2 = rn(i+im*(j-1)+im*jm)
277 if (tlmhk < 273.15)
then
subroutine calwxt_bourg_post(im, ista_2l, iend_2u, ista, iend, jm, jsta_2l, jend_2u, jsta, jend, lm, lp1, iseed, g, pthresh, t, q, pmid, pint, lmh, prec, zint, ptype, me)
calwxt_bourg_post Subroutine that calculates precipitation type (Bourgouin).