Time History Tools
The geos-timehistory package contains tools to treat and plot time-history data from GEOS output.
Usage
$ python plot_time_history.py --help
usage: plot_time_history.py [-h] [--sets name [name ...]]
[--indices index [index ...]]
[--components int [int ...]]
history_file variable_name
A script that parses geosx HDF5 time-history files and produces time-history
plots using matplotlib
positional arguments:
history_file The time history file to parse
variable_name Which time-history variable collected by GEOSX to
generate a plot file for.
options:
-h, --help show this help message and exit
--sets name [name ...]
Which index set of time-history data collected by GEOS
to generate a plot file for, may be specified multiple
times with different indices/components for each set.
--indices index [index ...]
An optional list of specific indices in the most-
recently specified set.
--components int [int ...]
An optional list of specific variable components
API
- geos.timehistory.plot_time_history.getHistorySeries(database, variable, setname, indices=None, components=None)[source]
Retrieve a series of time history structures suitable for plotting in addition to the specific set index and component for the time series.
- Parameters:
database (geos.hdf5_wrapper.hdf5_wrapper) – database to retrieve time history data from
variable (str) – the name of the time history variable for which to retrieve time-series data
setname (str) – the name of the index set as specified in the geos input xml for which to query time-series data
indices (Optional[int | list[ int ]]) – the indices in the named set to query for, if None, defaults to all
components (Optional[int | list[ int ]]) – the components in the flattened data types to retrieve, defaults to all
- Returns:
list of (time, data, idx, comp) timeseries tuples for each time history data component
- Return type:
Optional[list[ tuple[ Any, …] ]]