pyissm.model.classes.regionaloutput

class pyissm.model.classes.regionaloutput(other=None, **kwargs)

Bases: manage_state

Regional output parameters class for ISSM.

This class encapsulates parameters for defining regional outputs in the ISSM (Ice Sheet System Model) framework. It allows users to extract integrated quantities (like ice volume, mass balance, grounded area) over specific regions of interest defined by masks, providing regional analysis capabilities.

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.

name

Identifier for this regional response.

Type:

str, default=’’

definitionstring

String that identifies this output definition uniquely, from Outputdefinition[1-100].

Type:

str, default=’’

outputnamestring

String that identifies the type of output you want, e.g. IceVolume, TotalSmb, GroundedArea.

Type:

str, default=’’

mask

Mask vectorial field which identifies the region of interest (value > 0 will be included).

Type:

ndarray, default=nan

maskexpstring

Name of Argus file that can be passed in to define the regional mask.

Type:

str, default=’’

__init__(self, other=None)

Initializes the regionaloutput parameters, optionally inheriting from another instance.

__repr__(self)

Returns a detailed string representation of the regionaloutput parameters.

__str__(self)

Returns a short string identifying the class.

Examples

md.regionaloutput = pyissm.model.classes.regionaloutput() md.regionaloutput.name = ‘west_antarctica_volume’ md.regionaloutput.outputnamestring = ‘IceVolume’ md.regionaloutput.mask = west_antarctica_mask md.regionaloutput.definitionstring = ‘Outputdefinition1’

__init__(other=None, **kwargs)

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 [regionaloutput.regionaloutput] parameters.

issm_enum_string()

Default ISSM C++ enum string used during marshalling.

marshall_class(fid, prefix[, md])

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

check_consistency(md, solution, analyses)

Check consistency of the [regionaloutput.regionaloutput] 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 [regionaloutput.regionaloutput] 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