Skip to content

Commit

Permalink
ETKF and var4d clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kysolvik committed Dec 20, 2024
1 parent 2bc8d41 commit b168ef6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion dabench/dacycler/_etkf.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ def cycle(self,
start_time,
analysis_window,
n_cycles)


# Get the obs vectors for each analysis window
all_filtered_idx = dac_utils._get_obs_indices(
Expand Down
2 changes: 1 addition & 1 deletion dabench/dacycler/_var4d_backprop.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _calc_obs_term(self, pred_x, obs_vals, Ht, Rinv):
pred_obs = pred_x @ Ht
resid = pred_obs.ravel() - obs_vals.ravel()

return jnp.sum(resid.T @ Rinv @ resid)
return jnp.sum(resid.T @ (Rinv @ resid))

def _make_loss(self, xb0, obs_vals, Hs, Binv, Rinv,
obs_window_indices,
Expand Down

0 comments on commit b168ef6

Please sign in to comment.