Reading HARM HDF5 Output¶
These are functions for reading files of the form documented on the AFD docs wiki. This is the format used by modern iterations of iharm3d and ebhlight, as well as the HARM implementation in this package. Several tools for converting output from other codes into this format can be found at EHT-babel.
There are two ways to read HARM HDF5 output with the pyHARM tools: the high level interface, pyHARM.ana.iharm_dump, which allows accessing derived variables of several types in a dict-like interface, or pyHARM.io, which reads and writes arrays of the primitive variables used by HARM.
IharmDump interface¶
-
class
pyHARM.ana.iharm_dump.IharmDump(fname, params=None, calc_cons=False, calc_derived=False, calc_divB=False, add_jcon=False, add_floors=False, add_fails=False, add_ghosts=False, add_divB=False, add_psi_cd=False, add_grid_caches=True, tag='', zones_first=False)¶ Read and cache data from a fluid dump file in HARM HDF5 format, and allow accessing various derived variables directly.
h5io interface¶
-
pyHARM.io.get_dump_time(fname)¶ Try to automatically read a dump’s header by guessing the filetype. See individual implementations for more options
-
pyHARM.io.get_filter(fname)¶ Choose an importer based on what we know of file contents, or failing that, names Purposefully a bit dumb, just trusts the filename
-
pyHARM.io.read_dump(fname, params=None)¶ Try to automatically read a dump file by guessing the filetype. See individual implementations for more options
-
pyHARM.io.read_hdr(fname, params=None)¶ Try to automatically read a dump’s header by guessing the filetype. See individual implementations for more options