Skip to content

Commit

Permalink
Tune maximum round-off, relative and absolute errors when doing remap…
Browse files Browse the repository at this point in the history
…ping.
  • Loading branch information
nichannah committed Jun 11, 2015
1 parent 5ff8c45 commit 68ddf8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ALE/MOM_remapping.F90
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ subroutine remapping_core( CS, n0, h0, u0, n1, dx, u1 )
! Maximum error based on guess at maximum roundoff
if (abs(totalHU2-totalHU0) > (err0+err2)*max(real(n0), real(n1)) .and. (err0+err2)/=0.) then
! Maximum relative error
if (abs(totalHU2-totalHU0) / totalHU2 > 1e-6) then
if (abs(totalHU2-totalHU0) / totalHU2 > 1e-09) then
! Maximum absolute error
if (abs(totalHU2-totalHU0) > 1e-18) then
write(0,*) 'h0=',h0
Expand All @@ -547,7 +547,7 @@ subroutine remapping_core( CS, n0, h0, u0, n1, dx, u1 )
write(0,*) 'total HU0,HUf,f-0=',totalHU0,totalHU2,totalHU2-totalHU0
write(0,*) 'err0,errF=',err0,err2
call MOM_error( FATAL, 'MOM_remapping, remapping_core: '//&
'Total stuff on h0 and hF differ by more than roundoff' )
'Total stuff on h0 and hF differ by more than maximum errors' )
endif
endif
endif
Expand Down

0 comments on commit 68ddf8e

Please sign in to comment.