pycif.plugins.datastreams.meteos.lmdz_mass_fluxes — API reference#
Configuration reference: lmdz_mass_fluxes plugin
- pycif.plugins.datastreams.meteos.lmdz_mass_fluxes.fetch.fetch(ref_dir: str, ref_file: str, input_interval: dict[datetime, list[datetime]], target_dir: str, tracer: object | None = None, **kwargs)[source]#
Locate LMDZ monthly mass-flux files and link them to the working directory.
For each period listed in
tracer.model.meteo_input_dates, builds the expectedfluxstoke/phystoke_csrfile names (plusfluxstokevwhentracer.model.grid == "regular") following the<prefix>.<YYYY>.m<MM><suffix>.ncconvention, links each intotarget_dir, and records the sub-date-interval pairs covered by each period.- Parameters:
ref_dir – directory holding the LMDZ mass-flux files.
ref_file – unused (kept for interface consistency; this plugin derives its own file names from
tracer.model).input_interval – unused (kept for interface consistency; dates come from
tracer.model.meteo_input_dates).target_dir – directory where matching files are symlinked.
tracer – the meteo datastream Plugin, used for
tracer.model.gridandtracer.model.meteo_input_dates.
- Returns:
(list_files, list_dates), dicts keyed by each period’s start date.list_filesmaps each key to a placeholder list (one"dummy"entry per sub-period; the actual linked file names are not tracked here).list_datesmaps each key to the list of consecutive(start, end)date pairs within the period.- Return type:
tuple
- Raises:
CifValueError – if
tracerisNone.CifFileNotFoundError – if an expected mass-flux file is missing from
ref_dir.