viscid.readers.athena_bin module¶
Athena binary file reader
At the moment, this reader assumes the conserved fields are in the files. The Athena custom Grid has methods to do vx = M1 / d, etc.
-
class
viscid.readers.athena_bin.
AthenaBinDataWrapper
(file_wrapper, fld_name, expected_shape, fld_number)[source]¶ Bases:
viscid.readers.vfile.DataWrapper
-
dtype
¶
-
expected_shape
= None¶
-
file_wrapper
= None¶
-
filename
= None¶
-
fld_name
= None¶
-
fld_number
= None¶
-
shape
¶ zyx shape since that’s the shape __array__ returns
Type: Returns
-
-
class
viscid.readers.athena_bin.
AthenaBinFile
(fname, crds=None, float_type_name=None, var_type=None, **kwargs)[source]¶ Bases:
viscid.readers.athena.AthenaFile
,viscid.readers.vfile_bucket.ContainerFile
An Athena binary file reader
-
float_type_name
= None¶
-
classmethod
group_fnames
(fnames)[source]¶ Group File names
The default implementation just returns fnames, but some file types might do something fancy here
Parameters: fnames (list) – names that can be logically grouped, as in a bunch of file names that are different time steps of a given run Returns: A list of things that can be given to the constructor of this class
-
var_type
= None¶
-
-
class
viscid.readers.athena_bin.
AthenaBinFileWrapper
(filename, keep_crd_clist=False, float_type_name=None, var_type=None)[source]¶ Bases:
object
A File-like object for interfacing with Athena binary files
-
float_type_name
¶ default float data type, should be ‘f4’ or ‘f8’; deufaults to double (‘f8’)
Type: str
-
count
= None¶
-
crd_clist
= None¶
-
dt
= None¶
-
field_names
¶
-
filename
= None¶
-
fld_names
= None¶
-
float_dtype
¶
-
float_type_name
= 'f8'
-
isopen
¶
-
keep_crd_clist
= None¶
-
nscalars
= None¶
-
nvars
= None¶
-
read_field
(fld_id)[source]¶ Read a field given a seekable location
Parameters: fld_id (int) – number of field in file Returns: tuple array
-
shape
= None¶
-
time
= None¶
-
var_type
= 'cons'¶
-