boxkit.library._data module

Module with implementation of the Data class.

class boxkit.library._data.Data(**attributes)

Bases: boxkit.cbox.lib.library.Data

Class to store handles for physical data

Parameters

attributes (Dictionary of attributes) –

'nblocks'   : total number of blocks,
'nxb'       : number of grid points per block x direction,
'nyb'       : number of grid points per block y direction,
'nzb'       : number of grid points per block z direction,
'xguard'    : number of guard cells x direction,
'yguard'    : number of guard cells y direction,
'zguard'    : number of guard cells z direction,
'inputfile' : hdf5 inputfile default (None),
'remotefile': sftp remote file default (None),
'variables' : dictionary of variables default ({}),
'storage'   : ('numpy', 'zarr', 'dask', 'pyarrow')

_create_dask_objects()

Create dask array representation of data

_create_h5_datasets()

Create h5 datasets for empty keys in variables dictionary

_create_numpy_arrays()

Create numpy arrays for empty keys in variables dictionary

_create_numpy_memmap()

Create numpy memory maps for empty keys in variables dictionary

_create_pyarrow_objects()

Create a pyarrow tensor objects

_create_zarr_objects()

Create zarr objects

_set_attributes(attributes)

Private method for intialization

_set_data()

Private method for setting new data

addvar(varkey, dtype=<class 'float'>)

Add a variables to data

delvar(varkey)

Delete a variable

purge(purgeflag='all')

Clean up data and close it

type_ = 'default'