pyissm.model.classes.balancethickness

class pyissm.model.classes.balancethickness(other=None)

Bases: manage_state

Balance thickness class for ISSM.

This class contains parameters for the balance thickness solution in the ISSM framework. It allows users to configure thickness constraints, thickening rates, and stabilization parameters for solving the balance thickness equation.

Parameters:

other (any, optional) – Any other class object that contains common fields to inherit from. If values in other differ from default values, they will override the default values.

spcthickness

Thickness constraints (NaN means no constraint) [m].

Type:

float, default=np.nan

thickening_rate

Ice thickening rate used in the mass conservation (dh/dt) [m/yr].

Type:

float, default=np.nan

stabilization

Stabilization method: 0=None, 1=SU, 2=SSA’s artificial diffusivity, 3=DG.

Type:

int, default=1

omega

Stabilization parameter.

Type:

float, default=np.nan

slopex

Surface slope in x-direction for stabilization.

Type:

float, default=np.nan

slopey

Surface slope in y-direction for stabilization.

Type:

float, default=np.nan

Examples

>>> md.balancethickness = pyissm.model.classes.balancethickness()
>>> md.balancethickness.spcthickness = 100.0
>>> md.balancethickness.thickening_rate = 0.1
__init__(other=None)

Initialize the instance with optional field inheritance.

Parameters:

other (object, optional) – Another instance to inherit field values from. If provided, any fields in the current instance that differ from the default values and exist in ‘other’ will be replaced with the values from ‘other’.

Notes

The inheritance process:

  1. Iterates through all attributes of the current instance

  2. Checks if the same attribute exists in the ‘other’ instance

  3. Compares field values using _fields_equal()

  4. If different, replaces the current value with the ‘other’ value

This enables the common ISSM pattern where classes can inherit configurations from existing instances while maintaining their default values for unspecified fields.

Methods

__init__([other])

Initialize the instance with optional field inheritance.

check_consistency(md, solution, analyses)

Check consistency of the [balancethickness] parameters.

issm_enum_string()

Default ISSM C++ enum string used during marshalling.

marshall_class(fid, prefix[, md])

Marshall [balancethickness.balancethickness] parameters to a binary file.

check_consistency(md, solution, analyses)

Check consistency of the [balancethickness] parameters.

Parameters:
  • md (pyissm.model.Model) – The model object to check.

  • solution (str) – The solution name to check.

  • analyses (list of str) – List of analyses to check consistency for.

Returns:

md – The model object with any consistency errors noted.

Return type:

pyissm.model.Model

marshall_class(fid, prefix, md=None)

Marshall [balancethickness.balancethickness] parameters to a binary file.

Parameters:
  • fid (file object) – The file object to write the binary data to.

  • prefix (str) – Prefix string used for data identification in the binary file.

  • md (pyissm.model.Model, optional) – ISSM model object needed in some cases.

Return type:

None