Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SampleSuccGauss() EKP failure handler, fill crashed sim output with NaNs #37

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/atmos_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
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)

Check warning on line 51 in src/atmos_interface.jl

View check run for this annotation

Codecov / codecov/patch

src/atmos_interface.jl#L51

Added line #L51 was not covered by tests
error(
"The ClimaAtmos simulation has crashed. See the stack trace for details.",
)
Expand Down
1 change: 1 addition & 0 deletions src/ekp_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function initialize(
Γ,
EKP.Inversion();
rng = rng_ekp,
failure_handler_method = EKP.SampleSuccGauss(),
)

save_parameter_ensemble(
Expand Down
Loading