Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed some GeoClaw issues that were giving NaNs

movetopo_geo.f: there were two .le. that need to be .lt.
Also cleaned up some other things that gave errors when compiled and run with warning flags
  • Loading branch information...
commit 9317a769dfab7f5b78fa1a6b037750353f029976 1 parent cb2a109
@rjleveque rjleveque authored
View
4 amrclaw/2d/lib/check4nans.f
@@ -22,8 +22,8 @@ subroutine check4nans(maxmx,maxmy,meqn,mbc,mx,my,q,t,
write(*,*) 'At ichecknan = ',ichecknan
write(*,*) ' mx,my,t:',mx,my,t
write(*,*) ' i,j,m:',i,j,m
- write(*,*) ' q(i,j,m) = ',q(i,j,m)
- stop
+ write(*,*) ' q(i,j,:) = ',(q(i,j,me), me=1,meqn)
+ stop
endif
enddo
enddo
View
2  geoclaw/2d/lib/movetopo_geo.f
@@ -250,7 +250,7 @@ subroutine movetopo(maxmx,maxmy,mbc,mx,my,
yjm=ylowtopo(m) + (jb-1.d0)*dytopo(m)
yjp = ylowtopo(m) + jb*dytopo(m)
- if (yjm.le.yhidtopo.and.yjp.ge.ylowdtopo) then
+ if (yjm.lt.yhidtopo.and.yjp.gt.ylowdtopo) then
yjmc=max(yjm,ylowdtopo)
yjpc=min(yjp,yhidtopo)
dyc = yjpc-yjmc
View
1  geoclaw/2d/lib/riemannsolvers_geo.f
@@ -90,6 +90,7 @@ subroutine riemann_aug_JCP(maxiter,meqn,mwaves,hL,hR,huL,huR,
endif
do mw=1,mwaves
+ if (dabs(lambda(mw)) .lt. 1.d-30) lambda(mw) = 0.d0
r(1,mw)=1.d0
r(2,mw)=lambda(mw)
r(3,mw)=(lambda(mw))**2
View
13 geoclaw/2d/lib/topo_mod.f90
@@ -199,7 +199,7 @@ subroutine read_topo(mx,my,topo_type,fname,topo)
double precision, parameter :: topo_missing = -150.d0
logical, parameter :: maketype2 = .false.
integer :: i,j,num_points,missing,status,topo_start
- double precision :: no_data_value,x,y,z
+ double precision :: no_data_value,x,y,z, topoi
print *, ' '
print *, 'Reading topography file ', fname
@@ -215,7 +215,16 @@ subroutine read_topo(mx,my,topo_type,fname,topo)
status = 0
do while (status == 0)
i = i + 1
- read(iunit,fmt=*,iostat=status) x,y,topo(i)
+ read(iunit,fmt=*,iostat=status) x,y,topoi
+ if ((i .gt. mx*my) .and. (status == 0)) then
+ write(6,*) '*** Error: i > mx*my = ',mx*my
+ write(6,*) '*** i, mx, my: ',i,mx,my
+ write(6,*) '*** status = ',status
+ stop
+ endif
+ if (status == 0) then
+ topo(i) = topoi
+ endif
enddo
! ================================================================
Please sign in to comment.
Something went wrong with that request. Please try again.