pycif.plugins.models.lagrangian — API reference#
Configuration reference: lagrangian plugin
- pycif.plugins.models.lagrangian.ini_mapper.ini_mapper(model, transform_type, general_mapper={}, backup_comps={}, transforms_order=[], ref_transform='', **kwargs)[source]#
Build the data-flow mapper for the Lagrangian (FLEXPART/STILT) model.
Declares:
Flux inputs — one surface flux field per active species, with date windows that extend backward by
model.backward_trajdaysto cover the full footprint integration period.Background inputs (optional) — a background concentration field read from the period shifted backward by
backward_trajdays.Outputs — one sampled concentration field per active species.
- Parameters:
model – Lagrangian model plugin instance (carries
input_dates,input_background,tstep_dates,domain, andchemistry.acspecies).transform_type (str) – unused; kept for API compatibility.
general_mapper (dict) – unused.
backup_comps (dict) – unused.
transforms_order (list) – unused.
ref_transform (str) – unused.
**kwargs – unused.
- Returns:
mapper with
inputs,outputs, andoutputs2inputs.- Return type:
dict
- pycif.plugins.models.lagrangian.ini_periods.ini_periods(self, **kwargs)[source]#
Compute temporal discretisation for the Lagrangian model.
Splits the full simulation window into sub-simulation periods and defines the footprint input date windows that extend backward by
self.backward_trajdaysfrom each period start.Sets the following attributes on self:
subsimu_dates— boundary dates of sub-simulation windows (length = n_periods + 1).tstep_dates— dict mapping each period start to its 1-hourly time-step array.input_dates— dict mapping each period start to the backward- shifted flux input dates needed by the footprints.input_background— same but shifted for background concentration read windows.tstep_all— sorted unique merge of all time steps.iniobs/reset_obs— per-period flags controlling obs dumping.
- Parameters:
self – Lagrangian model plugin instance with
datei,datef,period,subperiod, andbackward_trajdaysset.**kwargs – unused.
- pycif.plugins.models.lagrangian.perturb_model.perturb_model(self, nsamples, transf_mapper)[source]#
Extend the Lagrangian footprint model to accommodate ensemble members.
Creates
nsamplescopies of each active species (acspecies) in the chemistry plugin, using the__sample#NNNnaming convention, then removes the original un-suffixed species. Records aperturbed_speciesmapping from sample name back to original name.- Parameters:
self – Lagrangian model plugin instance.
nsamples (int) – number of ensemble members.
transf_mapper (dict) – unused; kept for API consistency.