diff --git a/src/SurfaceFluxes.jl b/src/SurfaceFluxes.jl index 897e67b4..8c12d53c 100644 --- a/src/SurfaceFluxes.jl +++ b/src/SurfaceFluxes.jl @@ -19,9 +19,6 @@ module SurfaceFluxes import RootSolvers const RS = RootSolvers -import KernelAbstractions -const KA = KernelAbstractions - using DocStringExtensions const DSE = DocStringExtensions @@ -45,17 +42,6 @@ abstract type SolverScheme end struct FVScheme <: SolverScheme end struct FDScheme <: SolverScheme end -# Allow users to skip error on non-convergence -# by importing: -# ```julia -# import SurfaceFluxes -# SurfaceFluxes.error_on_non_convergence() = false -# ``` -# Error on convergence must be the default -# behavior because this can result in printing -# very large logs resulting in CI to seemingly hang. -error_on_non_convergence() = true - """ SurfaceFluxConditions @@ -408,35 +394,6 @@ function obukhov_length( L_MO_init = FT(-1) sol = RS.find_zero(root_l_mo, RS.NewtonsMethodAD(L_MO_init), soltype, tol, maxiter) L_MO = sol.root - if !sol.converged - if error_on_non_convergence() - KA.@print("maxiter reached in SurfaceFluxes.jl:\n") - KA.@print(" T_in = ", TD.air_temperature(thermo_params, ts_in(sc))) - KA.@print(", T_sfc = ", TD.air_temperature(thermo_params, ts_sfc(sc))) - KA.@print(", q_in = ", TD.total_specific_humidity(thermo_params, ts_in(sc))) - KA.@print(", q_sfc = ", TD.total_specific_humidity(thermo_params, ts_sfc(sc))) - KA.@print(", u_in = ", u_in(sc)) - KA.@print(", u_sfc = ", u_sfc(sc)) - KA.@print(", z0_m = ", z0(sc, UF.MomentumTransport())) - KA.@print(", z0_b = ", z0(sc, UF.HeatTransport())) - KA.@print(", Δz = ", Δz(sc)) - KA.@print(", ΔDSEᵥ = ", ΔDSEᵥ) - KA.@print("\n") - KA.@print("ts_in(sc) = ", ts_in(sc)) - KA.@print("\n") - KA.@print("ts_sfc(sc) = ", ts_sfc(sc)) - KA.@print("\n") - if soltype isa RS.CompactSolution - KA.@print(", sol.root = ", sol.root) - else - KA.@print(", sol.root_history = ", sol.root_history) - KA.@print(", sol.err_history = ", sol.err_history) - end - error("Unconverged Surface Fluxes.") - else - KA.@print("Warning: Unconverged Surface Fluxes. Returning last interation.") - end - end return non_zero(L_MO) end end