pyissm.model.classes.transient
- class pyissm.model.classes.transient(other=None)
Bases:
manage_stateTransient solution parameters class for ISSM.
This class encapsulates parameters for configuring transient (time-dependent) simulations in the ISSM (Ice Sheet System Model) framework. It allows users to enable or disable various physics components and models that can be included in transient simulations, such as age tracking, surface mass balance, thermal evolution, and grounding line migration.
- 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.
- isage
Indicates if age model is requested in the transient.
- Type:
int, default=0
- issmb
Indicates if a surface mass balance solution is used in the transient.
- Type:
int, default=1
- ismasstransport
Indicates if a masstransport solution is used in the transient.
- Type:
int, default=1
- ismmemasstransport
Indicates whether an MME masstransport solution is used in the transient.
- Type:
int, default=0
- isoceantransport
Indicates whether an ocean masstransport solution is used in the transient.
- Type:
int, default=0
- isstressbalance
Indicates if a stressbalance solution is used in the transient.
- Type:
int, default=1
- isthermal
Indicates if a thermal solution is used in the transient.
- Type:
int, default=1
- isgroundingline
Indicates if a groundingline migration is used in the transient.
- Type:
int, default=0
- isesa
Indicates whether an elastic adjustment model is used in the transient.
- Type:
int, default=0
- isdamageevolution
Indicates whether damage evolution is used in the transient.
- Type:
int, default=0
- ismovingfront
Indicates whether a moving front capability is used in the transient.
- Type:
int, default=0
- ishydrology
Indicates whether an hydrology model is used.
- Type:
int, default=0
- isdebris
Indicates whether a debris model is used.
- Type:
int, default=0
- issampling
Indicates whether sampling is used in the transient.
- Type:
int, default=0
- isslc
Indicates if a sea level change solution is used in the transient.
- Type:
int, default=0
- amr_frequency
Frequency at which mesh is refined in simulations with multiple time_steps.
- Type:
int, default=0
- isoceancoupling
Indicates whether coupling with an ocean model is used in the transient (1 for cartesian coordinates, 2 for lat/long coordinates).
- Type:
int, default=0
- requested_outputs
List of additional outputs requested.
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the transient parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the transient parameters.
- __str__(self)
Returns a short string identifying the class.
- _process_outputs(self, md=None, return_default_outputs=False)
Process requested outputs, expanding ‘default’ to appropriate outputs.
- marshall_class(self, fid, prefix, md=None)
Marshall parameters to a binary file
Examples
md.transient = pyissm.model.classes.transient() md.transient.isage = 1 md.transient.isgroundingline = 1 md.transient.requested_outputs = [‘IceVolume’, ‘IceVolumeAboveFloatation’]
- __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 [transient.transient] parameters.
deactivate_all()Deactivate all transient model components.
issm_enum_string()Default ISSM C++ enum string used during marshalling.
marshall_class(fid, prefix[, md])Marshall [transient.transient] parameters to a binary file.
- check_consistency(md, solution, analyses)
Check consistency of the [transient.transient] 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:
- deactivate_all()
Deactivate all transient model components.
- marshall_class(fid, prefix, md=None)
Marshall [transient.transient] 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 (ISSM model object, optional.) – ISSM model object needed in some cases.
- Return type:
None