sequence.output_writer module#
Write a SequenceModelGrid to a file.
- class sequence.output_writer.OutputWriter(*args, **kwds)[source]#
Bases:
Component
Write output to a netcdf file.
- __init__(grid: SequenceModelGrid, filepath: str | PathLike[str], interval: int = 1, fields: Iterable[str] | None = None, clobber: bool = False, rows: Iterable[str] | None = None)[source]#
Create an output-file writer.
- Parameters:
grid (SequenceModelGrid) – The grid to write to a file.
filepath (path-like) – Path to the output file.
interval (int, optional) – The number of time steps between updates to the output file.
fields (list of str, optional) – Names of (at-node) fields to include in the output file.
clobber (bool, optional) – If True and the provided file already exists, quietly overwrite it, otherwise raise an exception.
rows (iterable of int) – The rows of the grid to include in the file.