Changeset 29 for trunk


Ignore:
Timestamp:
Oct 21, 2014, 7:52:35 AM (4 years ago)
Author:
hasod
Message:

BUGFIX: implemented bugfixes related to global domain-filling runs with
escaping particles at the poles and above the highest model level
(Tickets # 54 and 55)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/advance.f90

    r4 r29  
    463463      dcwsave=dcwsave+vp*dt
    464464      zt=zt+w*dt*real(ldirect)
     465
     466      ! HSO/AL: Particle managed to go over highest level -> interpolation error in goto 700
     467      !          alias interpol_wind (division by zero)
     468      if (zt.ge.height(nz)) zt=height(nz)-100.*eps
    465469
    466470      if (zt.gt.h) then
     
    699703  endif
    700704
     705  ! HSO/AL: Prevent particles from disappearing at the pole
     706  !******************************************************************
     707
     708  if ( yt.lt.0. ) then
     709    xt=mod(xt+180.,360.)
     710    yt=-yt
     711  else if ( yt.gt.real(nymin1) ) then
     712    xt=mod(xt+180.,360.)
     713    yt=2*real(nymin1)-yt
     714  endif
    701715
    702716  ! Check position: If trajectory outside model domain, terminate it
     
    704718
    705719  if ((xt.lt.0.).or.(xt.ge.real(nxmin1)).or.(yt.lt.0.).or. &
    706        (yt.ge.real(nymin1))) then
     720       (yt.gt.real(nymin1))) then
    707721    nstop=3
    708722    return
     
    859873  endif
    860874
     875  ! HSO/AL: Prevent particles from disappearing at the pole
     876  !******************************************************************
     877
     878  if ( yt.lt.0. ) then
     879    xt=mod(xt+180.,360.)
     880    yt=-yt
     881  else if ( yt.gt.real(nymin1) ) then
     882    xt=mod(xt+180.,360.)
     883    yt=2*real(nymin1)-yt
     884  endif
     885
    861886  ! Check position: If trajectory outside model domain, terminate it
    862887  !*****************************************************************
    863888
    864889  if ((xt.lt.0.).or.(xt.ge.real(nxmin1)).or.(yt.lt.0.).or. &
    865        (yt.ge.real(nymin1))) then
     890       (yt.gt.real(nymin1))) then
    866891    nstop=3
    867892    return
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG