diff --git a/code/math.f90 b/code/math.f90 index a31fd57da..18e31f1f0 100644 --- a/code/math.f90 +++ b/code/math.f90 @@ -1418,7 +1418,7 @@ pure function math_RtoEuler(R) math_RtoEuler(2) = acos(myVal) - if(math_RtoEuler(2) < 1.0e-8_pReal) then + if((math_RtoEuler(2) < 1.0e-8_pReal) .or. (pi-math_RtoEuler(2) < 1.0e-8_pReal)) then ! calculate phi2 math_RtoEuler(3) = 0.0_pReal ! calculate phi1