sdf_xarray.SDFDataStore#
- class sdf_xarray.SDFDataStore(manager, drop_variables=None, keep_particles=False, deck_path=None, lock=None, probe_names=None)[source]#
Bases:
AbstractDataStoreStore for reading and writing data via the SDF library.
- __init__(manager, drop_variables=None, keep_particles=False, deck_path=None, lock=None, probe_names=None)[source]#
Methods
__init__(manager[, drop_variables, ...])acquire_context([needs_lock])close(**kwargs)get_attrs()get_child_store(group)Get a store corresponding to the indicated child group.
get_dimensions()get_encoding()get_parent_dimensions()get_variables()load()This loads the variables and attributes simultaneously.
open(filename[, lock, drop_variables, ...])Attributes
- deck_path#
- drop_variables#
- property ds#
- keep_particles#
- load()[source]#
This loads the variables and attributes simultaneously. A centralized loading function makes it easier to create data stores that do automatic encoding/decoding.
For example:
class SuffixAppendingDataStore(AbstractDataStore): def load(self): variables, attributes = AbstractDataStore.load(self) variables = {"%s_suffix" % k: v for k, v in variables.items()} attributes = {"%s_suffix" % k: v for k, v in attributes.items()} return variables, attributes
This function will be called anytime variables or attributes are requested, so care should be taken to make sure its fast.
- lock#
- classmethod open(filename, lock=None, drop_variables=None, keep_particles=False, probe_names=None, deck_path=None)[source]#
- probe_names#