sdynpy.fileio.sdynpy_rattlesnake.read_rattlesnake_output

read_rattlesnake_output(file, coordinate_override_column=None, read_only_indices=None, read_variable='time_data', abscissa_start=None, abscissa_stop=None, downsample=None)[source]

Reads in a Rattlesnake data file and returns the time history array as well as the channel table

Parameters
  • file (str or nc4.Dataset) – Path to the file to read in or an already open

  • coordinate_override_column (str, optional) – Specify a channel table column name to extract coordinate information from. If not specified, then it will be assembled from node id and directions.

  • read_only_indices (slice or iterable, optional) – A valid indexing operation to select which channel indices to read

  • read_variable (str, optional) – The time variable from the Rattlesnake file to read. These will generally be time_data, time_data_1, time_data_2, etc. depending on how many streams exist in the file. The default is ‘time_data’.

  • abscissa_start (float, optional) – Data will not be extracted for abscissa values less than this value

  • abscissa_stop (float, optional) – Data will not be extracted for abscissa values greater than this value

  • downsample (int, optional) – A step size to use to downsample the dataset when reading

Returns

  • data_array (TimeHistoryArray) – Time history data in the Rattlesnake output file

  • channel_table (DataFrame) – Pandas Dataframe containing the channel table information