endas.localization.DomainLocalization¶
-
class
endas.localization.DomainLocalization(ssp, taper_fn=None)¶ Bases:
objectDomain-based localization of the analysis update.
This is a general-purpose implementation of the domain localization scheme. Domain localization scheme works by partitioning the global state space into a set of disjoint local domains. The analysis update is then done for each local domain individually and the local domains are assembled back into a global state/ensemble afterwards.
Parameters: - cs – Coordinate system of the grid. Must be an instance of
endas.localization.CoordinateSystem - taper_fn – Taper function that defines the localization radius. Must be an instance of
endas.localization.TaperFnorNone(see notes below). - on_local_R_needed – Called if this class does not know how to construct localized observation error covariance operator from the global one.
The tapering function (
taper_fn) is required since it defines the localization radius. It is allowed to passNoneduring construction but the taper function must be set (viaset_taper_fn()) before the first analysis update at the latest. It is allowed to replace the taper function before each analysis update with a different one.One of the steps required from the domain localization is to construct localized versions of the global observation operator and the observation error covariance operator. The localized versions are subsets of the global operators that only represent observations used in the local analysis. Localization of the observation operator is done by the
DomainLocalization.get_local_H()method, which relies onObservationOperator.localize()being implemented.-
ssp¶ The state space partitioning scheme.
-
set_taper_fn(taper_fn)¶ Sets the tapering function that defines the localization radius and how the influence of observations is truncated with distance.
-
get_local_H(Hg, obs_used)¶ Returns localized observation operator for the given domain.
Parameters: - Hg – Observation operator representing all observations
- obs_used – Flat array of indices into the observation vector pointing to observations to be used
Returns: New ::class::endas.ObservationOperator instance or
Noneifobs_usedis an empty array.
-
get_local_R(Rg, obs_used, obs_dist)¶ Returns localized observation error covariance operator for the given domain.
Parameters: - Rg – Global observation error covariance operator
- obs_used – Flat array of indices into the observation vector pointing to selected observations
- obs_dist – Array of distances of selected observations from the local domain
- taper_fn – Tapering function instance
- cs – Coordinate system of the grid. Must be an instance of