flopy.mf6.utils.binaryfile_utils module¶
-
class
MFOutput
(mfdict, path, key)[source]¶ Bases:
object
Wrapper class for Binary Arrays. This class enables directly getting slices from the binary output. It is intended to be called from the __getitem__ method of the SimulationDict() class. Implemented to conserve memory.
Parameters: - path (binary file path location) –
- mfdict (SimulationDict() object) –
- key (OrderedDictionary key ex. ('flow15','CBC','FLOW RIGHT FACE')) –
Returns: - Xarray of [n,n,n,n] dimension
- Usage
- —–
- >>> val = MFOutput(mfdict, path, key)
- >>> return val.data
- User interaction
- —————–
- >>> data[(‘flow15’,’CBC’,’FLOW RIGHT FACE’)][ (,0,1,:])
- or
- >>> data[(‘flow15’,’CBC’,’FLOW RIGHT FACE’)]
-
class
MFOutputRequester
(mfdict, path, key)[source]¶ Bases:
object
MFOutputRequest class is a helper function to enable the user to query binary data from the SimulationDict() object on the fly without actually storing it in the SimulationDict() object.
- mfdict: OrderedDict
- local instance of the SimulationDict() object
- path:
- pointer to the MFSimulationPath object
- key: tuple
- user requested data key
- MFOutputRequester.querybinarydata
- returns: Xarray object
>>> data = MFOutputRequester(mfdict, path, key) >>> data.querybinarydata