-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
82 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ class ens_method: | |
class EnKF: | ||
"""The ensemble Kalman filter. | ||
Refs: `bib.evensen2009ensemble`. | ||
Refs: [evensen2009ensemble][]. | ||
""" | ||
|
||
upd_a: str | ||
|
@@ -67,8 +67,8 @@ def EnKF_analysis(E, Eo, hnoise, y, upd_a, stats=None, ko=None): | |
This implementation includes several flavours and forms, | ||
specified by `upd_a`. | ||
Main references: `bib.sakov2008deterministic`, | ||
`bib.sakov2008implications`, `bib.hoteit2015mitigating` | ||
Main references: [sakov2008deterministic][], | ||
[sakov2008implications][], [hoteit2015mitigating][] | ||
""" | ||
R = hnoise.C # Obs noise cov | ||
N, Nx = E.shape # Dimensionality | ||
|
@@ -261,7 +261,7 @@ def post_process(E, infl, rot): | |
def add_noise(E, dt, noise, method): | ||
"""Treatment of additive noise for ensembles. | ||
Refs: `bib.raanes2014ext` | ||
Refs: [raanes2014ext][] | ||
""" | ||
if noise.C == 0: | ||
return E | ||
|
@@ -354,7 +354,7 @@ def sqrt_core(): | |
class EnKS: | ||
"""The ensemble Kalman smoother. | ||
Refs: `bib.evensen2009ensemble` | ||
Refs: [evensen2009ensemble][] | ||
The only difference to the EnKF | ||
is the management of the lag and the reshapings. | ||
|
@@ -414,7 +414,7 @@ def assimilate(self, HMM, xx, yy): | |
class EnRTS: | ||
"""EnRTS (Rauch-Tung-Striebel) smoother. | ||
Refs: `bib.raanes2016thesis` | ||
Refs: [raanes2016thesis][] | ||
""" | ||
|
||
upd_a: str | ||
|
@@ -484,7 +484,7 @@ def serial_inds(upd_a, y, cvR, A): | |
class SL_EAKF: | ||
"""Serial, covariance-localized EAKF. | ||
Refs: `bib.karspeck2007experimental`. | ||
Refs: [karspeck2007experimental][]. | ||
In contrast with LETKF, this iterates over the observations rather | ||
than over the state (batches). | ||
|
@@ -614,7 +614,7 @@ def local_analysis(ii): | |
class LETKF: | ||
"""Same as EnKF (Sqrt), but with localization. | ||
Refs: `bib.hunt2007efficient`. | ||
Refs: [hunt2007efficient][]. | ||
NB: Multiproc. yields slow-down for [`mods.Lorenz96`][], | ||
even with `batch_size=(1,)`. But for [`mods.QG`][] | ||
|
@@ -778,7 +778,7 @@ def hyperprior_coeffs(s, N, xN=1, g=0): | |
- Reason 1: mode correction. | ||
These parameters bridge the Jeffreys (`xN=1`) and Dirac (`xN=Inf`) hyperpriors | ||
for the prior covariance, B, as discussed in `bib.bocquet2015expanding`. | ||
for the prior covariance, B, as discussed in [bocquet2015expanding][]. | ||
Indeed, mode correction becomes necessary when $$ R \rightarrow \infty $$ | ||
because then there should be no ensemble update (and also no inflation!). | ||
More specifically, the mode of `l1`'s should be adjusted towards 1 | ||
|
@@ -790,7 +790,7 @@ def hyperprior_coeffs(s, N, xN=1, g=0): | |
- Reason 2: Boosting the inflation prior's certainty from N to xN*N. | ||
The aim is to take advantage of the fact that the ensemble may not | ||
have quite as much sampling error as a fully stochastic sample, | ||
as illustrated in section 2.1 of `bib.raanes2019adaptive`. | ||
as illustrated in section 2.1 of [raanes2019adaptive][]. | ||
- Its damping effect is similar to work done by J. Anderson. | ||
|
@@ -809,7 +809,7 @@ def hyperprior_coeffs(s, N, xN=1, g=0): | |
eN = (N + 1) / N | ||
cL = (N + g) / N1 | ||
|
||
# Mode correction (almost) as in eqn 36 of `bib.bocquet2015expanding` | ||
# Mode correction (almost) as in eqn 36 of [bocquet2015expanding][] | ||
prior_mode = eN / cL # Mode of l1 (before correction) | ||
diagonal = pad0(s**2, N) + N1 # diag of [email protected]@Y + N1*I | ||
# (Hessian of J) | ||
|
@@ -847,7 +847,7 @@ def zeta_a(eN, cL, w): | |
class EnKF_N: | ||
"""Finite-size EnKF (EnKF-N). | ||
Refs: `bib.bocquet2011ensemble`, `bib.bocquet2015expanding` | ||
Refs: [bocquet2011ensemble][], [bocquet2015expanding][] | ||
This implementation is pedagogical, prioritizing the "dual" form. | ||
In consequence, the efficiency of the "primal" form suffers a bit. | ||
|
@@ -985,7 +985,7 @@ def nvrs(w): | |
# l1 = 1.0 | ||
|
||
# Explicitly inflate prior | ||
# => formulae look different from `bib.bocquet2015expanding`. | ||
# => formulae look different from [bocquet2015expanding][]. | ||
A *= l1 | ||
Y *= l1 | ||
|
||
|
@@ -1000,7 +1000,7 @@ def nvrs(w): | |
else: | ||
# Also include angular-radial co-dependence. | ||
# Note: denominator not squared coz | ||
# unlike `bib.bocquet2015expanding` we have inflated Y. | ||
# unlike [bocquet2015expanding][] we have inflated Y. | ||
Hw = ( | ||
Y @ R.inv @ Y.T / N1 | ||
+ eye(N) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"""Settings from `bib.anderson2010non`.""" | ||
"""Settings from [anderson2010non][].""" | ||
|
||
import numpy as np | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"""Settings from `bib.wiljes2016second`.""" | ||
"""Settings from [wiljes2016second][].""" | ||
|
||
import numpy as np | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"""From Fig. 1 of `bib.bocquet2010beyond`.""" | ||
"""From Fig. 1 of [bocquet2010beyond][].""" | ||
|
||
import numpy as np | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.