Commit 6abf6464 authored by Sabine's avatar Sabine
Browse files

added a seperate variable for syncing of watercycle

parent 8ec045e9
......@@ -19,7 +19,7 @@
! along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. *
!**********************************************************************
subroutine calculate_watercycle(partnumber,itime)
subroutine calculate_watercycle(partnumber,itime,watersynctime)
!*****************************************************************************
! *
......@@ -47,8 +47,6 @@ subroutine calculate_watercycle(partnumber,itime)
integer ixr,jyr,idumx,idumy,istep, watersynctime
watersynctime=3600*3 ! was loutstep before, but for monthly run not possible
! Some variables needed for temporal interpolation
!*************************************************
......@@ -226,8 +224,8 @@ subroutine calculate_watercycle(partnumber,itime)
! e_minus_pi=precip_reference(ix+1,jy-90+2)*(-24.)
! First timestep and criteria fullfilled, keep it or throw it?
! if ( ((diff.ge.0).or.((e_minus_pi/24).gt.-2.0)) .and. (status_q(i).eq.1) ) then
if ( ((diff.ge.0).or.((e_minus_pi/24).gt.-0.2)) .and. (status_q(i).eq.1) ) then
if ( ((diff.ge.0).or.((e_minus_pi/24).gt.-2.0)) .and. (status_q(i).eq.1) ) then
! if ( ((diff.ge.0)) .and. (status_q(i).eq.1) ) then
! if (status_q(i).eq.-100) then ! never! all trajectories.
! write(*,*) 'terminated: ',i,diff,e_minus_pi,itage,itramem(i),status_q(i),qvi,val_q(i),xmass1(i,1)
status_q(i)=-9 ! this particle is invalid
......
......@@ -120,12 +120,18 @@ subroutine timemanager(metdata_format)
real :: xold,yold,zold,xmassfract
real :: grfraction(3)
real, parameter :: e_inv = 1.0/exp(1.0)
integer :: watersynctime
!double precision xm(maxspec,maxpointspec_act),
! + xm_depw(maxspec,maxpointspec_act),
! + xm_depd(maxspec,maxpointspec_act)
watersynctime=loutstep
! watersynctime=3600*3 ! was loutstep before, but for monthly run not possible
write(*,*) 'Watersynctime: ',watersynctime
open(89,file=path(2)(1:length(2))//'budget.dat')
open(90,file=path(2)(1:length(2))//'budget_nest.dat')
......@@ -377,7 +383,7 @@ subroutine timemanager(metdata_format)
(ldirect*itime.le.ldirect*loutend)) then ! add to grid
if (mod(itime-loutstart,loutsample).eq.0) then
if (WATERCYCLE) &
call calculate_watercycle(-1,itime)
call calculate_watercycle(-1,itime,watersynctime)
! If we are exactly at the start or end of the concentration averaging interval,
! give only half the weight to this sample
......@@ -752,7 +758,7 @@ subroutine timemanager(metdata_format)
if (ipout.eq.2) call partoutput_short(itime) ! dump particle positions
if (WATERCYCLE) then
call calculate_watercycle(-1,itime)
call calculate_watercycle(-1,itime,watersynctime)
write (*,*) 'last watercycle'
endif
......
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