Commit a89b0606 authored by Sabine's avatar Sabine
Browse files

bugfix: ix was not set

parent 02e13c26
......@@ -115,6 +115,7 @@ subroutine calculate_watercycle(partnumber,itime)
ddy=ytn-real(jy)
ddx=xtn-real(ix)
else
ix=int(xtra1(i))
jy=int(ytra1(i))
ddx=xtra1(i)-real(ix)
ddy=ytra1(i)-real(jy)
......@@ -212,13 +213,17 @@ subroutine calculate_watercycle(partnumber,itime)
! we cannot be sure 3600 is the second timestep, could also be 1800!
if (((diff.ge.0).or.((e_minus_pi)/24.gt.-1.0)) .and. (itage.le.3600)) then
! write(*,*) 'terminated: ',i,diff,e_minus_pi &
! ,partnumber,val_q(i),qvi,itime,itra1(i),itage
itra1(i)=-999999999
else
! write(*,*) 'accounted: ',i,diff,e_minus_pi &
! ,partnumber,val_q(i),qvi,itime,itra1(i),itage
! if (((e_minus_pi)/24.gt.-2.0) .and. (itage.le.3600)) then
if (((diff.ge.0).or.((e_minus_pi/24).gt.-2.0)) .and. (itage.le.abs(loutstep))) then
! if (((diff.ge.0).or.((e_minus_pi).gt.-2.0)) .and. (itage.le.3600)) then
! if ((diff.ge.-1000000) .and. (itage.le.3600)) then
! write(*,*) 'terminated: ',i,diff,e_minus_pi &
! ,partnumber,val_q(i),qvi,itime,itra1(i),itage
itra1(i)=-999999999
else
! write(*,*) 'accounted: ',i,diff,e_minus_pi &
! ,partnumber,val_q(i),qvi,itime,itra1(i),itage,xtra1(i),ytra1(i),xmass1(i,1)
call centerofmass(xl,yl,2,centerposx_real,centerposy_real)
centerposx=(centerposx_real-xlon0)/dx
centerposy=(centerposy_real-ylat0)/dy
......@@ -231,7 +236,7 @@ subroutine calculate_watercycle(partnumber,itime)
if (nested_output.eq.1) &
call wetdepokernel_nest(1,abs(diff),centerposx,centerposy,nage,1)
endif
endif
endif
endif
! save the old values
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment