CSV I/O

class rtctools.simulation.csv_mixin.CSVMixin(**kwargs)

Bases: rtctools.simulation.simulation_problem.SimulationProblem

Adds reading and writing of CSV timeseries and parameters to your simulation problem.

During preprocessing, files named timeseries_import.csv, initial_state.csv, and parameters.csv are read from the input subfolder.

During postprocessing, a file named timeseries_export.csv is written to the output subfolder.

Variables:
  • csv_delimiter – Column delimiter used in CSV files. Default is ,.
  • csv_validate_timeseries – Check consistency of timeseries. Default is True.
timeseries_at(variable, t)

Return the value of a timeseries at the given time.

Parameters:
  • variable – Variable name.
  • t – Time.
Returns:

The interpolated value of the time series.

Raises:

KeyError