Skip to content

Commit

Permalink
add kwargs...
Browse files Browse the repository at this point in the history
  • Loading branch information
odunbar committed Jun 27, 2024
1 parent a5a137f commit 0b7276d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/EnsembleTransformKalmanInversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function update_ensemble!(
g::AbstractMatrix{FT},
process::TransformInversion;
failed_ens = nothing,
kwargs...
) where {FT, IT}

# u: N_par × N_ens
Expand All @@ -164,20 +165,15 @@ function update_ensemble!(

fh = ekp.failure_handler

# Scale noise using Δt
#scaled_obs_noise_cov = get_obs_noise_cov(ekp) / ekp.Δt[end]

#y = get_obs(ekp)

if isnothing(failed_ens)
_, failed_ens = split_indices_by_success(g)
end
if !isempty(failed_ens)
@info "$(length(failed_ens)) particle failure(s) detected. Handler used: $(nameof(typeof(fh).parameters[2]))."
end

# u = fh.failsafe_update(ekp, u, g, y, scaled_obs_noise_cov, failed_ens)
u = fh.failsafe_update(ekp, u, g, failed_ens)

# store new parameters (and model outputs)
push!(ekp.g, DataContainer(g, data_are_columns = true))
# Store error
Expand Down

0 comments on commit 0b7276d

Please sign in to comment.