Adapters¶
Classes that structurally satisfy the pipekit_cycle ForwardModel / ObservationOperator protocols. plumax does not import pipekit_cycle at runtime.
adapters
¶
Data-assimilation adapters for the pipekit_cycle protocols.
pipekit_cycle decomposes data assimilation into three runtime-checkable
protocols — ForwardModel (predict), ObservationOperator (compare),
AnalysisStep (update). plumax ships adapters that satisfy them
structurally: the classes below expose exactly the right methods /
properties, so isinstance(obj, ForwardModel) succeeds, without plumax
importing pipekit_cycle at runtime. This keeps the dependency arrow
pointing the right way — assimilation drivers depend on plumax, not the
reverse.
- :class:
EulerianForwardModel— wraps an :class:~plumax.les_fvm.EulerianDispersionRHSas aForwardModel, advancing a 3-D concentration field one explicit-Euler step per call. - :class:
RadtranObservationOperator— wraps the normalised Beer–Lambert forward model as anObservationOperatormapping a scalar plume enhancement (ΔVMR) to a normalised radiance spectrum, with the analytic Jacobian as its tangent-linear.
EulerianForwardModel
¶
Expose an Eulerian dispersion RHS as a pipekit_cycle.ForwardModel.
The adapter advances a tracer field with a single explicit-Euler step,
c ← c + dt · RHS(t0, c). It is the minimal forward operator a cycling
driver needs; richer time integration (diffrax) is available through
:func:~plumax.les_fvm.simulate_eulerian_dispersion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rhs
|
EulerianDispersionRHS
|
The tendency module |
required |
dt
|
float
|
Default integration step [s]. |
required |
t0
|
float
|
Time at which the (autonomous-in-practice) RHS is evaluated [s]. |
0.0
|
Source code in src/plumax/adapters.py
step
¶
Advance state by dt with one explicit-Euler step.
RadtranObservationOperator
¶
RadtranObservationOperator(ds: Dataset, nu_obs: ndarray, *, T_K: float, p_atm: float, vmr_background: float, path_length_cm: float, amf: float, var: str = 'absorption_cross_section')
Expose the normalised Beer–Lambert forward as an ObservationOperator.
H(ΔVMR) answers "what normalised radiance spectrum would a plume
enhancement of ΔVMR produce?". The innovation in a retrieval is then
observed_spectrum - H(ΔVMR_forecast). :meth:linearize returns the
analytic Jacobian d(L_norm)/d(ΔVMR) the forward model already computes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ds
|
Dataset
|
Absorption-cross-section LUT dataset. |
required |
nu_obs
|
ndarray
|
Observation wavenumbers [cm⁻¹]. |
required |
T_K
|
float
|
Layer temperature [K]. |
required |
p_atm
|
float
|
Layer pressure [atm]. |
required |
vmr_background
|
float
|
Background gas volume mixing ratio. |
required |
path_length_cm
|
float
|
Optical path length [cm]. |
required |
amf
|
float
|
Air-mass factor. |
required |
var
|
str
|
LUT cross-section variable name. |
'absorption_cross_section'
|