diff --git a/test_fms/astronomy/test_astronomy.F90 b/test_fms/astronomy/test_astronomy.F90 index 0b94a7f976..f514d3c434 100644 --- a/test_fms/astronomy/test_astronomy.F90 +++ b/test_fms/astronomy/test_astronomy.F90 @@ -271,8 +271,9 @@ subroutine check_answers( results, answers, whoami ) implicit none real(TEST_AST_KIND_) :: answers, results character(*) :: whoami + integer, parameter :: lkind = TEST_AST_KIND_ - if (results.ne.answers) then + if (abs(results - answers) .gt. 1.0e-10_lkind) then write(*,*) 'EXPECTED ', answers, ' but computed ', results call mpp_error(FATAL, trim(whoami)) end if