pycif.plugins.models.dummy — API reference

pycif.plugins.models.dummy — API reference#

Configuration reference: dummy plugin

pycif.plugins.models.dummy.flushrun.flushrun(self, rundir, mode, transform_id, full_flush=True)[source]#

Cleaning attributes to the model

pycif.plugins.models.dummy.ini_mapper.ini_mapper(model, general_mapper={}, backup_comps={}, transforms_order=[], ref_transform='', **kwargs)[source]#

Build the data-flow mapper for the dummy Gaussian plume model.

Declares:

  • Inputs — meteorological fields (windspeed, winddir, stabclass) and one surface flux field per active species.

  • Outputs — one sparse (observation-sampled) concentration field per active species.

  • outputs2inputs — links each concentration output to the flux input of the corresponding species so the adjoint pipeline knows which flux sensitivity to accumulate.

Input date windows are hourly intervals derived from model.input_dates.

Parameters:
  • model – dummy model plugin instance (carries input_dates, domain, and chemistry.acspecies).

  • general_mapper (dict) – unused.

  • backup_comps (dict) – unused.

  • transforms_order (list) – unused.

  • ref_transform (str) – unused.

  • **kwargs – unused.

Returns:

mapper with inputs, outputs, and outputs2inputs.

Return type:

dict

pycif.plugins.models.dummy.ini_periods.ini_periods(self, **kwargs)[source]#

Initialise sub-simulation periods and time-step arrays for the dummy model.

Partitions the full simulation window into sub-periods of length self.periods, then divides each sub-period into time steps of length self.tstep. Both periods and time steps may be any pandas frequency alias (e.g. '4D', '1H').

Sets the following attributes on self:

  • subsimu_dates — 1-D array of sub-simulation boundary dates.

  • tstep_dates — dict mapping each sub-period start date to its array of time-step boundary dates.

  • input_dates — same as tstep_dates (dummy model reads inputs at each model time step).

  • tstep_all — 1-D array of all time steps across all periods.

Parameters:
  • self (Plugin) – dummy model plugin instance (carries datei, datef, periods, tstep).

  • **kwargs – unused; accepted for interface consistency.

pycif.plugins.models.dummy.perturb_model.perturb_model(self, nsamples, transf_mapper)[source]#

Extend the chemistry active-species list to accommodate ensemble members.

For each active species spec, creates nsamples copies named spec__sample#000, …, spec__sample#NNN on self.chemistry.acspecies, then removes the original species. This allows the ensemble inversion modes (EnSRF, Monte Carlo) to propagate multiple concentration fields through the model simultaneously.

Parameters:
  • self (Plugin) – dummy model plugin instance.

  • nsamples (int) – number of ensemble members (samples per species).

  • transf_mapper (dict) – transform mapper (unused; kept for API consistency with other model plugins).

pycif.plugins.models.dummy.run.run(self, runsubdir, mode, workdir, ddi, do_simu=True, **kwargs)[source]#

Run dummy_txt Gaussian model in forward or adjoint mode

Parameters:
  • runsubdir (str) – working directory for the current run

  • mode (str) – forward or backward

  • workdir (str) – pycif working directory

  • do_simu (bool) – if False, considers that the simulation was already run

pycif.plugins.models.dummy.run.fortran_exe(self, pg_file, mode, spec, ddi)[source]#

Mimic the behaviour of a numerical model executable