pycif.plugins.transforms.complex.satellites — API reference#
Configuration reference: satellites plugin
- pycif.plugins.transforms.complex.satellites.adjoint.adjoint(transf, inout_datastore, controlvect, obsvect, mapper, di, df, mode, runsubdir, workdir, onlyinit=False, **kwargs)[source]#
De-aggregate total columns to the model level.
- pycif.plugins.transforms.complex.satellites.apply_AK.apply_ak(sim_ak, aks, pwgt, drycols, qa0, chosen_level=-1, use_drycols=False, scale_factor=1, log_space=False, normalize_columns=False)[source]#
Apply averaging kernels to simulated concentrations (forward pass).
Computes the satellite-equivalent observation from the vertically interpolated model field
sim_ak, the averaging kernelsaks, pressure weightspwgt, dry-air columnsdrycols, and prior profileqa0. The exact formula depends on the keyword flags:Normal space (
log_space = False):\[y = \sum_i \left[(sim\_ak_i \cdot drycols_i - qa0_i) \cdot aks_i \cdot pwgt_i\right] + y_0^{prior}\]Log space (
log_space = True):\[y = \exp\left[\sum_i \left[(\log sim\_ak_i - \log qa0_i) \cdot aks_i \cdot pwgt_i\right] + \log y_0^{prior}\right]\]Optional normalisations and unit scaling are applied afterwards.
- Parameters:
sim_ak (np.ndarray) – simulated concentrations on satellite pressure levels, shape
(nlevsat, nobs).aks (np.ndarray) – averaging kernels, shape
(nlevsat, nobs).pwgt (np.ndarray) – pressure weights, shape
(nlevsat, nobs).drycols (np.ndarray) – dry-air column factors, shape
(nlevsat, nobs).qa0 (np.ndarray) – prior profiles, shape
(nlevsat, nobs).chosen_level (int) – level index for partial-column products (formula 3/8);
-1means use the pressure-weighted sum.use_drycols (bool) – normalise by dry-air columns instead of pressure weights.
scale_factor (float) – multiplicative unit scaling factor.
log_space (bool) – apply AKs in log space (MOPITT-style).
normalize_columns (bool) – normalise the total column by the summed AK/pressure-weight product.
- Returns:
satellite-equivalent observation, shape
(nobs,).- Return type:
np.ndarray
- pycif.plugins.transforms.complex.satellites.apply_AK.apply_ak_tl(sim_ak_tl, sim_ak, aks, pwgt, drycols, qa0, chosen_level=-1, use_drycols=False, scale_factor=1, log_space=False, normalize_columns=False)[source]#
Apply averaging kernels to concentration increments (tangent-linear pass).
The tangent-linear of
apply_ak()with respect to the simulated concentrationssim_ak. Computes:Normal space: \(y_{TL} = \sum_i sim\_ak^{TL}_i \cdot drycols_i \cdot aks_i \cdot pwgt_i\)
Log space: \(y_{TL} = y_{fwd} \sum_i (sim\_ak^{TL}_i / sim\_ak_i) \cdot aks_i \cdot pwgt_i\)
- Parameters:
sim_ak_tl (np.ndarray) – TL of simulated concentrations on satellite pressure levels, shape
(nlevsat, nobs).sim_ak (np.ndarray) – forward simulated concentrations (needed in log space), shape
(nlevsat, nobs).aks
pwgt
drycols
qa0
chosen_level
use_drycols
scale_factor
:param : :param log_space: same as
apply_ak(). :param normalize_columns: same asapply_ak().- Returns:
TL of the satellite-equivalent observation, shape
(nobs,).- Return type:
np.ndarray
- pycif.plugins.transforms.complex.satellites.apply_AK.apply_ak_ad(obs_incr, sim_ak, aks, pwgt, drycols, qa0, chosen_level=-1, use_drycols=False, scale_factor=1, log_space=False, normalize_columns=False)[source]#
Apply averaging kernels to propagate observation sensitivities (adjoint pass).
The adjoint of
apply_ak()w.r.t. the simulated concentrations. Maps the scalar observation sensitivityobs_incrback to level-resolved concentration sensitivities:Normal space: \(s_i = obs\_incr \cdot scale \cdot drycols_i \cdot aks_i \cdot pwgt_i / norm\)
Log space: \(s_i = obs\_incr \cdot scale \cdot aks_i \cdot pwgt_i / sim\_ak_i / norm \cdot y_{fwd}\)
- Parameters:
obs_incr (np.ndarray) – observation-space sensitivity (
adj_out), shape(nobs,).sim_ak (np.ndarray) – forward simulated concentrations on satellite levels, shape
(nlevsat, nobs).aks
pwgt
drycols
qa0
chosen_level
use_drycols
scale_factor
:param : :param log_space: same as
apply_ak(). :param normalize_columns: same asapply_ak().- Returns:
adjoint of simulated concentrations on satellite levels, shape
(nlevsat, nobs).- Return type:
np.ndarray
- pycif.plugins.transforms.complex.satellites.flushrun.flushrun(self, rundir, mode, transform_id, full_flush=True)[source]#
Cleaning the simulation directories to limit space usage
- pycif.plugins.transforms.complex.satellites.forward.forward(transf, inout_datastore, controlvect, obsvect, mapper, di, df, mode, runsubdir, workdir, onlyinit=False, save_debug=False, **kwargs)[source]#
Aggregate simulations at the grid scale to total columns. Re-interpolate the model pressure levels to the satellite averaging kernel levels. Average using the averaging kernel formula