shnitsel.data.trajectory_variable_description

Classes

UnitInfo

Class to assign standard keys to the attributes of variables associated with dimensions

VariableInfoAttributes

Class to keep track of all variable attributes in xarrays acknowledged by the shnitsel standard

Functions

set_variable_attributes(var, attrs)

Function to set standardized variable attributes.

Module Contents

class UnitInfo

Bases: NamedTuple

Class to assign standard keys to the attributes of variables associated with dimensions

unitdim: str
units: str
class VariableInfoAttributes

Bases: NamedTuple

Class to keep track of all variable attributes in xarrays acknowledged by the shnitsel standard

long_name: str | None
unit_info: UnitInfo | None
set_variable_attributes(var, attrs)

Function to set standardized variable attributes.

This is meant to unify the keys under which information is stored in the shnitsel format.

Parameters:
  • var (xr.DataArray) – The variable/DataArray to set attributes on

  • attrs (VariableInfoAttributes) – The standardized set of attributes to assign to the variable

Return type:

None