diff --git a/src/atmos_interface.jl b/src/atmos_interface.jl index cc843d34..196f544b 100644 --- a/src/atmos_interface.jl +++ b/src/atmos_interface.jl @@ -48,7 +48,7 @@ function run_forward_model(atmos_config::CA.AtmosConfig) integrator = CA.get_integrator(atmos_config) sol_res = CA.solve_atmos!(integrator) if sol_res.ret_code == :simulation_crashed - # TODO: Handle error properly - overwrite data + !isnothing(sol_res.sol) && sol_res.sol .= eltype(sol_res.sol)(NaN) error( "The ClimaAtmos simulation has crashed. See the stack trace for details.", ) diff --git a/src/ekp_interface.jl b/src/ekp_interface.jl index 51d477e5..dd0215a6 100644 --- a/src/ekp_interface.jl +++ b/src/ekp_interface.jl @@ -56,6 +56,7 @@ function initialize( Γ, EKP.Inversion(); rng = rng_ekp, + failure_handler_method = EKP.SampleSuccGauss(), ) save_parameter_ensemble(