Transport backends¶
The Tier II and Tier III transports behind CoupledForward. A TransportBackend gives each instrument's column per unit emission through the shared ColumnObservation: LagrangianSource from met-ensemble backward footprints, EulerianSource from the les_fvm finite-volume run at the overpass time. PlumeSource is the Tier I backend. Tier IV.
backends
¶
Tier II and Tier III transport backends (implementation in plumax.coupled._src.backends).
EulerianSource
dataclass
¶
Tier III transport: the les_fvm finite-volume run through the shared column.
r_i = A_i Σ_k Δz c_k(x_i, t_inst; Q = 1),
the field of a unit constant emission at the overpass time t_inst, read in
the T-cell that holds each receptor. The forward is linear in the emission
with a zero initial field, so Q · r is the run at constant emission Q.
Attributes:
| Name | Type | Description |
|---|---|---|
forward |
EulerianForward4DVar
|
The differentiable transport ( |
background |
float
|
Additive background column c_bg. |
unit_history
cached
property
¶
Interior field history of a unit constant emission, one solve.
time_index
¶
Index of the save time that equals the instrument's overpass time.
Raises:
| Type | Description |
|---|---|
GridMismatchError
|
If no save time matches it. |
Source code in src/plumax/coupled/_src/backends.py
column_response
¶
Column per unit emission at the instrument's receptors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instrument
|
Instrument
|
The observing instrument. |
required |
Returns:
| Type | Description |
|---|---|
Float[Array, ' obs']
|
The response r_inst. |
Raises:
| Type | Description |
|---|---|
GridMismatchError
|
If the overpass time is not a save time. |
DomainError
|
If a receptor lies outside the grid. |
Source code in src/plumax/coupled/_src/backends.py
LagrangianSource
dataclass
¶
LagrangianSource(emission_pattern: Float[Array, ' cell'] | Float[Array, 'cell param'], winds: tuple[GriddedWind | Callable[[Array], Array], ...], turbulence: TurbulenceModel, domain_x: tuple[float, float, int], domain_y: tuple[float, float, int], column_z: Float[Array, ' level'], n_particles: int = 1000, t_back: float = 600.0, dt: float = 1.0, pbl_height: float = 1000.0, pbl_fraction: float = 0.5, air_density: float = 1.2, seed: int = 0, background: float = 0.0)
Tier II transport: met-ensemble backward footprints through the shared column.
c_k(x_i) = ρ_air F̄(x_i, z_k) q, F̄ = mean_e F_e, r_i = A_i Σ_k h_k c_k(x_i),
with F_e the footprint of member e at receptor (x_i, z_k), q the surface
flux of a unit source and h_k the trapezoid weights over column_z.
Attributes:
| Name | Type | Description |
|---|---|---|
emission_pattern |
Float[Array, ' cell'] | Float[Array, 'cell param']
|
Surface flux per unit emission q [m⁻²] on the
footprint grid, cells flattened row-major over |
winds |
tuple[GriddedWind | Callable[[Array], Array], ...]
|
One mean wind per met-ensemble member (a |
turbulence |
TurbulenceModel
|
Turbulence model shared by the members. |
domain_x |
tuple[float, float, int]
|
|
domain_y |
tuple[float, float, int]
|
|
column_z |
Float[Array, ' level']
|
Receptor levels z_k [m] of the column, strictly increasing. |
n_particles |
int
|
Particles per receptor level and member. |
t_back |
float
|
Backward integration time [s]. |
dt |
float
|
Particle time step [s]. |
pbl_height |
float
|
Boundary-layer height [m]. |
pbl_fraction |
float
|
Fraction of the boundary layer that sees the surface flux. |
air_density |
float
|
Air density ρ_air [kg m⁻³]. |
seed |
int
|
Base PRNG seed of the particle draws. |
background |
float
|
Additive background column c_bg. |
point
classmethod
¶
point(location: tuple[float, float], *, winds: Sequence[GriddedWind | Callable[[Array], Array]], turbulence: TurbulenceModel, domain_x: tuple[float, float, int], domain_y: tuple[float, float, int], column_z: Float[Array, ' level'], **settings: float | int) -> LagrangianSource
A point source: unit emission spread over the cell that holds it.
q_s = 1 / A_cell in the containing cell s, zero elsewhere.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
tuple[float, float]
|
Source |
required |
winds
|
Sequence[GriddedWind | Callable[[Array], Array]]
|
One mean wind per met member. |
required |
turbulence
|
TurbulenceModel
|
Turbulence model. |
required |
domain_x
|
tuple[float, float, int]
|
|
required |
domain_y
|
tuple[float, float, int]
|
|
required |
column_z
|
Float[Array, ' level']
|
Receptor levels z_k [m]. |
required |
**settings
|
float | int
|
Any other field of :class: |
{}
|
Returns:
| Type | Description |
|---|---|
LagrangianSource
|
The source, with a one-cell emission pattern. |
Raises:
| Type | Description |
|---|---|
DomainError
|
If the location lies outside the footprint grid. |
Source code in src/plumax/coupled/_src/backends.py
footprints
¶
Member footprints F_e at every receptor level, level fastest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instrument
|
Instrument
|
The observing instrument; its overpass time is the receptor time of the backward runs. |
required |
Returns:
| Type | Description |
|---|---|
Float[Array, 'member point cell']
|
One row per (receptor, level) pair, units s m² kg⁻¹. |
Source code in src/plumax/coupled/_src/backends.py
column_response
¶
Column per unit emission at the instrument's receptors.
Algorithm
- Backward footprints from every receptor level, per member.
- Average over the members: F̄ = mean_e F_e.
- Concentration of a unit source: c = ρ_air F̄ q.
- Column and averaging kernel: r_i = A_i Σ_k h_k c_k(x_i).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instrument
|
Instrument
|
The observing instrument. |
required |
Returns:
| Type | Description |
|---|---|
Float[Array, ' obs'] | Float[Array, 'obs param']
|
The response r_inst, one column per emission pattern when the |
Float[Array, ' obs'] | Float[Array, 'obs param']
|
pattern has a parameter axis. |
Source code in src/plumax/coupled/_src/backends.py
TransportBackend
¶
Bases: Protocol
A transport tier as the coupled forward sees it.
r_inst = A_inst col_z(c(·; Q = 1)), the column per unit emission at each of the instrument's receptors.
Attributes:
| Name | Type | Description |
|---|---|---|
background |
float
|
Additive background column c_bg, in the units of the observation. |
column_response
¶
Column per unit emission at the instrument's receptors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instrument
|
Instrument
|
The observing instrument (receptors and kernel). |
required |
Returns:
| Type | Description |
|---|---|
Float[Array, ' obs'] | Float[Array, 'obs param']
|
The response r_inst: one value per receptor for a scalar emission |
Float[Array, ' obs'] | Float[Array, 'obs param']
|
rate, or one column per emission parameter. |