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 NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([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 level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. 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 NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([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
read_grid(name='gridfunc', idx=0, *args, **kwargs)[source]

Reads a grid in the current SIESTA.grid.nc file

Enables the reading and processing of the grids created by SIESTA

read_sc()[source]

Returns a SuperCell object from a SIESTA.grid.nc file