pyissm.model.classes.debris
- class pyissm.model.classes.debris(other=None)
Bases:
manage_stateDebris transport class for ISSM.
This class contains parameters for debris transport modeling in the ISSM framework. Debris transport simulates the movement and accumulation of rock debris on glacier surfaces, which affects surface albedo, melting rates, and overall ice dynamics.
- Parameters:
other (any, optional) – Any other class object that contains common fields to inherit from. If values in
otherdiffer from default values, they will override the default values.
- spcthickness
Debris thickness constraints (NaN means no constraint) [m].
- Type:
numpy.ndarray, default=np.nan
- min_thickness
Minimum debris thickness allowed [m].
- Type:
float, default=0.0
- stabilization
Stabilization method: 0=no stabilization, 1=artificial diffusion, 2=streamline upwinding, 3=streamline upwind Petrov-Galerkin (SUPG).
- Type:
int, default=2
- packingfraction
Fraction of debris covered in the ice.
- Type:
float, default=0.01
- removalmodel
Frontal removal of debris: 0=no removal, 1=Slope-triggered debris removal, 2=driving-stress triggered debris removal.
- Type:
int, default=0
- displacementmodel
Debris displacement: 0=no displacement, 1=…
- Type:
int, default=0
- max_displacementvelocity
Maximum velocity of debris transport (v_ice + v_displacement) [m/a].
- Type:
float, default=0.0
- removal_slope_threshold
Critical slope [degrees] for removalmodel (1).
- Type:
float, default=0.0
- removal_stress_threshold
Critical stress [Pa] for removalmodel (2).
- Type:
float, default=0.0
- vertex_pairing
Pairs of vertices that are penalized.
- Type:
float, default=np.nan
- requested_outputs
Additional outputs requested.
- Type:
list, default=[‘default’]
Examples
>>> md.debris = pyissm.model.classes.debris() >>> md.debris.min_thickness = 0.001 >>> md.debris.packingfraction = 0.02 >>> md.debris.stabilization = 2
- __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:
Iterates through all attributes of the current instance
Checks if the same attribute exists in the ‘other’ instance
Compares field values using _fields_equal()
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 [debris] parameters.
issm_enum_string()Default ISSM C++ enum string used during marshalling.
marshall_class(fid, prefix[, md])Marshall [debris.debris] parameters to a binary file.
- check_consistency(md, solution, analyses)
Check consistency of the [debris] 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:
- marshall_class(fid, prefix, md=None)
Marshall [debris.debris] 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