hydromt_sfincs.utils.write_timeseries#

hydromt_sfincs.utils.write_timeseries(fn: str | Path, df: DataFrame | Series, tref: str | datetime, fmt: str = '%7.2f') None[source]#

Write pandas.DataFrame to fixed width ascii timeseries files such as sfincs.bzs, sfincs.dis and sfincs.precip. The output time index is given in seconds from tref.

Parameters:
  • fn (str, Path) – Path to output timeseries file.

  • df (pd.DataFrame) – Dataframe of timeseries.

  • tref (datetime.datetime, str) – Datetime of tref, string in “%Y%m%d %H%M%S” format.

  • fmt (str, optional) – Output value format, by default “%7.2f”.