sisl.io.siesta.siesta_grid module¶
Sile object for reading/writing SIESTA Grid files
-
class
sisl.io.siesta.siesta_grid.
gridncSileSiesta
(filename, mode='r', lvl=0, access=1, _open=True)[source]¶ Bases:
sisl.io.siesta.sile.SileCDFSIESTA
SIESTA Grid file object
Attributes
file
Filename of the current Sile
Methods
ArgumentParser
([parser])Returns the arguments that may be available for this Sile ArgumentParser_out
([parser])Appends additional arguments based on the output of the file isDataset
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([group, dimension, variable, levels, root])Iterator on all groups, variables and dimensions. read
(*args, **kwargs)Generic read method which should be overloaded in child-classes read_grid
([name, idx])Reads a grid in the current SIESTA.grid.nc file read_sc
()Returns a SuperCell object from a SIESTA.grid.nc file write
(*args, **kwargs)Generic write method which should be overloaded in child-classes Creates/Opens a SileCDF
Opens a SileCDF with
mode
and compression levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- means stores certain variables in the object.
Attributes
file
Filename of the current Sile
Methods
ArgumentParser
([parser])Returns the arguments that may be available for this Sile ArgumentParser_out
([parser])Appends additional arguments based on the output of the file isDataset
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([group, dimension, variable, levels, root])Iterator on all groups, variables and dimensions. read
(*args, **kwargs)Generic read method which should be overloaded in child-classes read_grid
([name, idx])Reads a grid in the current SIESTA.grid.nc file read_sc
()Returns a SuperCell object from a SIESTA.grid.nc file write
(*args, **kwargs)Generic write method which should be overloaded in child-classes