Commit e52967c0 authored by Espen Sollum's avatar Espen Sollum
Browse files

Quick fix for segmentation fault when particle is at north pole

parent 72d3a5a7
......@@ -242,6 +242,12 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, &
dt2=real(memtime(2)-itime)
dtt=1./(dt1+dt2)
! eso: Temporary fix for particle exactly at north pole
if (jyp >= nymax) then
! write(*,*) 'WARNING: advance.f90 jyp >= nymax. xt,yt:',xt,yt
jyp=jyp-1
end if
! Compute maximum mixing height around particle position
!*******************************************************
......
......@@ -110,6 +110,12 @@ subroutine conccalc(itime,weight)
p3=rddx*ddy
p4=ddx*ddy
! eso: Temporary fix for particle exactly at north pole
if (jyp >= nymax) then
! write(*,*) 'WARNING: conccalc.f90 jyp >= nymax'
jyp=jyp-1
end if
do il=2,nz
if (height(il).gt.ztra1(i)) then
indz=il-1
......
......@@ -117,6 +117,12 @@ subroutine conccalc(itime,weight)
p3=rddx*ddy
p4=ddx*ddy
! eso: Temporary fix for particle exactly at north pole
if (jyp >= nymax) then
! write(*,*) 'WARNING: conccalc.f90 jyp >= nymax'
jyp=jyp-1
end if
do il=2,nz
if (height(il).gt.ztra1(i)) then
indz=il-1
......
Markdown is supported
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