51 integer :: jpart,itime,ltsample,loutnext,ldeltat,j,k,ix,jy
52 integer :: ngrid,il,interp_time,n,mm,indz,i
53 integer :: jjjjmmdd,ihmmss,ohx,ohy,dohx,dohy,ohz
54 real :: xtn,ytn,oh_average
57 real :: restmass,ohreacted,ohinc
58 real :: xlon, ylat, gas_const, act_energy
59 real :: ohreact_temp_corr, act_temp
60 real,
parameter :: smallnum = tiny(0.0)
70 if (itime.le.loutnext)
then
71 ldeltat=itime-(loutnext-loutstep)
73 ldeltat=itime-loutnext
80 jul=bdate+
real(itime,kind=dp)/86400._dp
81 call
caldate(jul,jjjjmmdd,ihmmss)
82 mm=int((jjjjmmdd-(jjjjmmdd/10000)*10000)/100)
91 if ((xtra1(jpart).gt.xln(j)).and.(xtra1(jpart).lt.xrn(j)).and. &
92 (ytra1(jpart).gt.yln(j)).and.(ytra1(jpart).lt.yrn(j)))
then
104 xtn=(xtra1(jpart)-xln(ngrid))*xresoln(ngrid)
105 ytn=(ytra1(jpart)-yln(ngrid))*yresoln(ngrid)
114 if (abs(memtime(1)-interp_time).lt.abs(memtime(2)-interp_time)) &
118 if (height(i).gt.ztra1(jpart))
then
134 interp_time=nint(itime-0.5*ltsample)
137 xlon=xtra1(jpart)*dx+xlon0
138 if (xlon.gt.180)
then
141 ylat=ytra1(jpart)*dy+ylat0
143 ohx=(180+xlon-1)/dohx
152 ohinc=(oh_field_height(3)-oh_field_height(2))/2
154 if ((oh_field_height(il-1)+ohinc).gt.ztra1(jpart)) goto 26
160 if (ohz.gt.maxzoh) ohz=7
165 oh_average=oh_field(mm,ohx,ohy,ohz)
166 if (oh_average.gt.smallnum)
then
185 act_temp=tt(ix,jy,indz,n)
188 if (ohreact(k).gt.0.)
then
189 ohreact_temp_corr=ohreact(k)*oh_average* &
190 exp((act_energy/gas_const)*(1/298.15-1/act_temp))
191 ohreacted=xmass1(jpart,k)* &
192 (1.-exp(-1*ohreact_temp_corr*abs(ltsample)))
194 restmass = xmass1(jpart,k)-ohreacted
195 if (restmass .gt. smallnum)
then
196 xmass1(jpart,k)=restmass
subroutine caldate(juldate, yyyymmdd, hhmiss)
subroutine ohreaction(itime, ltsample, loutnext)