snek5000.output.readers.pymech_#
Read field files using pymech
as xarray
datasets.
Classes
|
|
|
- class snek5000.output.readers.pymech_.ReaderPymech(output)[source]#
- tag = 'pymech'#
- load(prefix='', index=-1, t_approx=None, **kwargs)[source]#
Opens field files(s) as a xarray dataset. The data is cached in
data
.- Parameters
prefix (str) – Field file prefix to load custom output files. Empty for default field files.
index (int or str) – When an integer is provided, it refers to the index position in a sorted list of field files. When
index == "all"
all files are loaded. Whenindex
is some other string, it is assumed to be glob pattern for the final 5 digits of the field filename extension (for example:"??20?"
).t_approx (float) – Find a file from approximate simulation time
**kwargs – Keyword arguments for
pymech.open_*
function
- Returns
ds
- Return type
xarray.Dataset