Opened 6 years ago

Closed 5 years ago

#55 closed Defect (fixed)

Particles over highest model level

Reported by: alaedera Owned by: hasod
Priority: major Milestone: FLEXPART 9.2
Component: FP physics/numerics Version: none
Keywords: Cc: rstow

Description

When running FLEXPART 9.1 in global domainfilling mode, particles make it over the highest model level. Eventhough this is observed rarely, it results in a crash with division by zero error.

Change History (5)

comment:1 Changed 6 years ago by DefaultCC Plugin

  • Cc rstow added

comment:2 Changed 6 years ago by hasod

  • Component changed from FP other to FP physics/numerics
  • Owner changed from somebody to hasod
  • Status changed from new to assigned

Corrected code supplied

comment:3 Changed 6 years ago by hasod

  • Status changed from assigned to accepted

comment:4 Changed 6 years ago by hasod

In file advance.f90, lines 469 onward change the code as shown below (block BUGFIX):

  ! Horizontal displacements during time step dt are small real values compared
  ! to the position; adding the two, would result in large numerical errors.
  ! Thus, displacements are accumulated during lsynctime and are added to the
  ! position at the end
  !****************************************************************************

      dxsave=dxsave+u*dt
      dysave=dysave+v*dt
      dawsave=dawsave+up*dt
      dcwsave=dcwsave+vp*dt
      zt=zt+w*dt*real(ldirect)

! --- BUGFIX BEGIN ---
      if (zt.ge.height(nz)) zt=height(nz)-100.*eps
! NOTE: Particle managed to go over highest level
!       -> interpolation error in goto 700
!          alias interpol_wind (division by zero)
! --- BUGFIX END ---

      if (zt.gt.h) then
        if (itimec.eq.itime+lsynctime) goto 99
        goto 700    ! complete the current interval above PBL
      endif

comment:5 Changed 5 years ago by hasod

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.
hosted by ZAMG