pyissm.model.classes.smb
Classes
|
ARMA (AutoRegressive Moving Average) surface mass balance model for ISSM. |
|
Component-based surface mass balance model for ISSM. |
|
Delta-18-O driven positive degree day surface mass balance model for ISSM. |
|
Default surface mass balance (SMB) parameters class for ISSM. |
|
GEMB (Greenland Energy and Mass Balance) surface mass balance model for ISSM. |
|
Gradient-based surface mass balance model for ISSM. |
|
Component-based gradient surface mass balance model for ISSM. |
|
Equilibrium Line Altitude (ELA) gradient surface mass balance model for ISSM. |
|
Henning surface mass balance model for ISSM. |
|
Melt component-based surface mass balance model for ISSM. |
|
Positive Degree Day surface mass balance model for ISSM. |
|
SICOPOLIS-style Positive Degree Day surface mass balance model for ISSM. |
|
- class pyissm.model.classes.smb.arma(other=None)
Bases:
manage_stateARMA (AutoRegressive Moving Average) surface mass balance model for ISSM.
This class implements an ARMA-based surface mass balance model that combines autoregressive and moving average components with piecewise polynomial trends and elevation-dependent lapse rates for basin-specific SMB modeling.
- 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.
- num_basins
Number of different basins [unitless].
- Type:
int, default=0
- num_params
Number of different parameters in the piecewise-polynomial (1:intercept only, 2:with linear trend, 3:with quadratic trend, etc.).
- Type:
int, default=0
- num_breaks
Number of different breakpoints in the piecewise-polynomial (separating num_breaks+1 periods).
- Type:
int, default=0
- polynomialparams
Coefficients for the polynomial (const,trend,quadratic,etc.), dim1 for basins, dim2 for periods, dim3 for orders.
- Type:
ndarray, default=np.nan
- ar_order
Order of the autoregressive model [unitless].
- Type:
float, default=0.0
- ma_order
Order of the moving-average model [unitless].
- Type:
float, default=0.0
- arlag_coefs
Basin-specific vectors of AR lag coefficients [unitless].
- Type:
ndarray, default=np.nan
- malag_coefs
Basin-specific vectors of MA lag coefficients [unitless].
- Type:
ndarray, default=np.nan
- datebreaks
Dates at which the breakpoints in the piecewise polynomial occur (1 row per basin) [yr].
- Type:
ndarray, default=np.nan
- basin_id
Basin number assigned to each element [unitless].
- Type:
ndarray, default=np.nan
- lapserates
Basin-specific SMB lapse rates applied in each elevation bin, 1 row per basin, 1 column per bin, dimension 3 can be of size 12 to prescribe monthly varying values [m ice eq yr^-1 m^-1].
- Type:
ndarray, default=np.nan
- elevationbins
Basin-specific separations between elevation bins, 1 row per basin, 1 column per limit between bins [m].
- Type:
ndarray, default=np.nan
- refelevation
Basin-specific reference elevations at which SMB is calculated [m].
- Type:
ndarray, default=np.nan
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested.
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the ARMA SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the ARMA SMB 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.smb = pyissm.model.classes.smb.arma()
- check_consistency(md, solution, analyses)
Check consistency of the [smb.arma] 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:
- initialize(md)
Initialise empty fields in smb.arma.
- marshall_class(fid, prefix, md=None)
Marshall [smb.arma] 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
- class pyissm.model.classes.smb.components(other=None)
Bases:
manage_stateComponent-based surface mass balance model for ISSM.
This class implements a component-based SMB model where the surface mass balance is calculated as SMB = accumulation - runoff - evaporation. Each component can be specified independently.
- 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.
- accumulation
Accumulated snow [m/yr ice eq].
- Type:
ndarray, default=np.nan
- runoff
Amount of ice melt lost from the ice column [m/yr ice eq].
- Type:
ndarray, default=np.nan
- evaporation
Amount of ice lost to evaporative processes [m/yr ice eq].
- Type:
ndarray, default=np.nan
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested.
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the component SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the component SMB 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
Notes
The surface mass balance is computed as: SMB = accumulation - runoff - evaporation
Examples
md.smb = pyissm.model.classes.smb.components() md.smb.accumulation = accumulation_data md.smb.runoff = runoff_data md.smb.evaporation = evaporation_data
- check_consistency(md, solution, analyses)
Check consistency of the [smb.components] 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:
- initialize(md)
Initialise empty fields in smb.components.
- marshall_class(fid, prefix, md=None)
Marshall [smb.components] 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
- class pyissm.model.classes.smb.d18opdd(other=None)
Bases:
manage_stateDelta-18-O driven positive degree day surface mass balance model for ISSM.
This class implements a positive degree day (PDD) SMB model driven by delta-18-O isotope data for paleoclimate applications. It includes temperature and precipitation scaling based on isotope ratios and elevation-dependent corrections.
- 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.
- desfac
Desertification elevation factor (between 0 and 1) [m].
- Type:
float, default=0.5
- s0p
Elevation from precipitation source (between 0 and a few 1000s m) [m].
- Type:
ndarray, default=np.nan
- s0t
Elevation from temperature source (between 0 and a few 1000s m) [m].
- Type:
ndarray, default=np.nan
- rlaps
Present day lapse rate [degree/km].
- Type:
float, default=6.5
- rlapslgm
LGM lapse rate [degree/km].
- Type:
float, default=6.5
- dpermil
Degree per mil, required if d18opd is activated.
- Type:
float, default=2.4
- f
Precipitation/temperature scaling factor, required if d18opd is activated.
- Type:
float, default=0.169
- Tdiff
Temperature difference field.
- Type:
ndarray, default=np.nan
- sealev
Sea level data.
- Type:
ndarray, default=np.nan
- ismungsm
Is mungsm parametrisation activated (0 or 1).
- Type:
int, default=0
- isd18opd
Is delta18o parametrisation from present day temperature and precipitation activated (0 or 1).
- Type:
int, default=1
- issetpddfac
Is user passing in defined PDD factors (0 or 1).
- Type:
int, default=0
- istemperaturescaled
Is temperature scaled to delta18o value (0 or 1).
- Type:
int, default=1
- isprecipscaled
Is precipitation scaled to delta18o value (0 or 1).
- Type:
int, default=1
- delta18o
Delta-18-O values [per mil].
- Type:
ndarray, default=np.nan
- delta18o_surface
Surface delta-18-O values.
- Type:
ndarray, default=np.nan
- temperatures_presentday
Monthly present day surface temperatures [K].
- Type:
ndarray, default=np.nan
- precipitations_presentday
Monthly surface precipitation [m/yr water eq].
- Type:
ndarray, default=np.nan
- temperatures_reconstructed
Monthly historical surface temperatures [K].
- Type:
ndarray, default=np.nan
- precipitations_reconstructed
Monthly historical precipitation [m/yr water eq].
- Type:
ndarray, default=np.nan
- pddfac_snow
PDD factor for snow [mm ice equiv/day/degree C].
- Type:
ndarray, default=np.nan
- pddfac_ice
PDD factor for ice [mm ice equiv/day/degree C].
- Type:
ndarray, default=np.nan
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested.
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the delta-18-O PDD SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the delta-18-O PDD SMB 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.smb = pyissm.model.classes.smb.d18opdd() md.smb.delta18o = delta18o_data md.smb.temperatures_presentday = temp_data
- checkconsistency(md, solution, analyses)
Check consistency of the [smb.d18opdd] 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:
- initialize(md)
Initialise empty fields in smb.d18opdd.
- marshall_class(fid, prefix, md=None)
Marshall [smb.d18opdd] 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
- class pyissm.model.classes.smb.default(other=None)
Bases:
manage_stateDefault surface mass balance (SMB) parameters class for ISSM.
This class encapsulates the default parameters for surface mass balance in the ISSM (Ice Sheet System Model) framework. It defines the main SMB-related parameters.
- 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.
- mass_balance
Surface mass balance [m/yr ice eq].
- Type:
ndarray, default=np.nan
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- requested_outputs
Additional outputs requested
- Type:
list, default=[‘default’]
- averaging
Averaging method from short to long steps. 0: Arithmetic (default), 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- __init__(self, other=None)
Initializes the SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the SMB 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.smb = pyissm.model.classes.smb.default()
- check_consistency(md, solution, analyses)
Check consistency of the [smb.default] 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:
- initialize(md)
Initialise empty fields in smb.default.
- marshall_class(fid, prefix, md=None)
Marshall [smb.default] 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
- class pyissm.model.classes.smb.gemb(mesh=None, other=None)
Bases:
manage_stateGEMB (Greenland Energy and Mass Balance) surface mass balance model for ISSM.
This class implements the GEMB model, a sophisticated physics-based surface mass balance model that simulates snow/firn densification, grain evolution, albedo, shortwave radiation penetration, thermal processes, melt, and accumulation. Originally developed for Greenland but applicable to other ice sheets.
- Parameters:
mesh (ISSM mesh object) – Mesh object containing mesh information. Required for initialization.
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.
- isgraingrowth
Run grain growth module (1=on, 0=off).
- Type:
int, default=1
- isalbedo
Run albedo module (1=on, 0=off).
- Type:
int, default=1
- isshortwave
Run short wave radiation module (1=on, 0=off).
- Type:
int, default=1
- isthermal
Run thermal module (1=on, 0=off).
- Type:
int, default=1
- isaccumulation
Run accumulation module (1=on, 0=off).
- Type:
int, default=1
- ismelt
Run melting module (1=on, 0=off).
- Type:
int, default=1
- isdensification
Run densification module (1=on, 0=off).
- Type:
int, default=1
- isturbulentflux
Run turbulent heat fluxes module (1=on, 0=off).
- Type:
int, default=1
- isconstrainsurfaceT
Constrain surface temperatures to air temperature (1=on, 0=off).
- Type:
int, default=1
- isdeltaLWup
Apply bias to long wave upward radiation spatially (1=on, 0=off).
- Type:
int, default=0
- ismappedforcing
Use mapped forcing when grid doesn’t match model mesh (1=on, 0=off).
- Type:
int, default=0
- iscompressedforcing
Compress input matrices when writing to binary (1=on, 0=off).
- Type:
int, default=0
- Ta
2-meter air temperature [K].
- Type:
ndarray, default=np.nan
- V
Wind speed [m/s].
- Type:
ndarray, default=np.nan
- dswrf
Downward shortwave radiation flux [W/m²].
- Type:
ndarray, default=np.nan
- dlwrf
Downward longwave radiation flux [W/m²].
- Type:
ndarray, default=np.nan
- P
Precipitation [mm w.e./m²].
- Type:
ndarray, default=np.nan
- eAir
Screen level vapor pressure [Pa].
- Type:
ndarray, default=np.nan
- pAir
Surface pressure [Pa].
- Type:
ndarray, default=np.nan
- Tmean
Mean annual temperature [K].
- Type:
ndarray, default=np.nan
- Vmean
Mean annual wind speed [m/s].
- Type:
ndarray, default=10.0
- C
Mean annual snow accumulation [kg/m²/yr].
- Type:
ndarray, default=np.nan
- Tz
Height above ground at which temperature was sampled [m].
- Type:
ndarray, default=np.nan
- Vz
Height above ground at which wind was sampled [m].
- Type:
ndarray, default=np.nan
- zTop
Depth over which grid length is constant at snowpack top [m].
- Type:
ndarray, default=10.0
- dzTop
Initial top vertical grid spacing [m].
- Type:
ndarray, default=0.05
- dzMin
Initial minimum allowable vertical grid spacing [m].
- Type:
ndarray, default=dzTop/2
- zY
Grid stretching factor below top zone.
- Type:
ndarray, default=1.025
- zMax
Initial maximum model depth [m].
- Type:
ndarray, default=250.0
- zMin
Initial minimum model depth [m].
- Type:
ndarray, default=130.0
- aIdx
Albedo calculation method (0-4).
- Type:
int, default=1
- eIdx
Emissivity calculation method (0-2).
- Type:
int, default=1
- tcIdx
Thermal conductivity method (1-2).
- Type:
int, default=1
- swIdx
Shortwave penetration method (0-1).
- Type:
int, default=0
- denIdx
Densification model (1-7).
- Type:
int, default=2
- dsnowIdx
Fresh snow density model (0-4).
- Type:
int, default=1
- outputFreq
Output frequency [days].
- Type:
int, default=30
- InitDensityScaling
Initial density scaling factor.
- Type:
float, default=1.0
- ThermoDeltaTScaling
Thermal diffusion timestep scaling factor.
- Type:
float, default=1/11.0
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested.
- Type:
list, default=[]
- __init__(self, md=None, other=None)
Initializes the GEMB SMB parameters, requires model object for mesh information. Optionally inherits from another instance.
- __repr__(self)
Returns a detailed string representation of the GEMB SMB 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
Notes
GEMB is a comprehensive physically-based surface mass balance model that includes: - Multi-layer snow/firn column with evolving properties - Grain size evolution and metamorphism - Surface albedo calculation with multiple parameterizations - Shortwave radiation penetration and absorption - Thermal diffusion and temperature evolution - Melt and refreeze processes - Snow densification using various empirical/physical models - Turbulent heat flux calculations
The model requires detailed meteorological forcing (temperature, wind, radiation, precipitation, humidity, pressure) and simulates the evolution of snow/firn properties over time.
Examples
md.smb = pyissm.model.classes.smb.gemb(md.mesh) md.smb.Ta = temperature_forcing_data md.smb.P = precipitation_data md.smb.dswrf = shortwave_radiation_data
- check_consistency(md, solution, analyses)
Check consistency of the [smb.gemb] 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:
- initialize(md)
Initialise empty fields in smb.gemb.
- marshall_class(fid, prefix, md=None)
Marshall [smb.gemb] 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
- class pyissm.model.classes.smb.gradients(other=None)
Bases:
manage_stateGradient-based surface mass balance model for ISSM.
This class implements a gradient-based SMB model where SMB varies linearly with elevation relative to a reference elevation and SMB. Different gradients can be specified for accumulation and ablation regimes.
- 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.
- href
Reference elevation from which deviation is used to calculate SMB adjustment [m].
- Type:
ndarray, default=np.nan
- smbref
Reference SMB from which deviation is calculated [m/yr ice equiv].
- Type:
ndarray, default=np.nan
- b_pos
Slope of elevation-SMB regression line for accumulation regime.
- Type:
ndarray, default=np.nan
- b_neg
Slope of elevation-SMB regression line for ablation regime.
- Type:
ndarray, default=np.nan
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested.
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the gradient SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the gradient SMB 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
Notes
SMB is calculated as: SMB = smbref + gradient * (elevation - href) where gradient = b_pos for positive SMB or b_neg for negative SMB.
Examples
md.smb = pyissm.model.classes.smb.gradients() md.smb.href = reference_elevation md.smb.smbref = reference_smb md.smb.b_pos = positive_gradient md.smb.b_neg = negative_gradient
- check_consistency(md, solution, analyses)
Check consistency of the [smb.gradients] 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:
- initialize(md)
Initialise empty fields in smb.gradients.
- marshall_class(fid, prefix, md=None)
Marshall [smb.gradients] 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
- class pyissm.model.classes.smb.gradientscomponents(other=None)
Bases:
manage_stateComponent-based gradient surface mass balance model for ISSM.
This class implements a gradient-based SMB model where accumulation and runoff components vary separately with elevation. Each component has its own reference value, reference elevation, and elevation gradient.
- 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.
- accuref
Reference value of the accumulation [m ice eq/yr].
- Type:
ndarray, default=np.nan
- accualti
Altitude at which the accumulation is equal to the reference value [m].
- Type:
ndarray, default=np.nan
- accugrad
Gradient of the variation of the accumulation (0 for uniform accumulation) [m ice eq/yr/m].
- Type:
ndarray, default=np.nan
- runoffref
Reference value of the runoff [m w.e. y^-1].
- Type:
ndarray, default=np.nan
- runoffalti
Altitude at which the runoff is equal to the reference value [m].
- Type:
ndarray, default=np.nan
- runoffgrad
Gradient of the variation of the runoff (0 for uniform runoff) [m w.e. m^-1 y^-1].
- Type:
ndarray, default=np.nan
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested.
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the gradient components SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the gradient components SMB 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
Notes
SMB components are calculated as: accumulation = accuref + accugrad * (elevation - accualti) runoff = runoffref + runoffgrad * (elevation - runoffalti) SMB = accumulation - runoff
Examples
md.smb = pyissm.model.classes.smb.gradientscomponents() md.smb.accuref = reference_accumulation md.smb.runoffref = reference_runoff
- check_consistency(md, solution, analyses)
Check consistency of the [smb.gradientscomponents] 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:
- initialize(md)
Initialise empty fields in smb.gradientscomponents.
- marshall_class(fid, prefix, md=None)
Marshall [smb.gradientscomponents] 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
- class pyissm.model.classes.smb.gradientsela(other=None)
Bases:
manage_stateEquilibrium Line Altitude (ELA) gradient surface mass balance model for ISSM.
This class implements an ELA-based SMB model where SMB varies linearly with elevation relative to the equilibrium line altitude. Different gradients are applied above and below the ELA, with optional caps on maximum and minimum SMB rates.
- 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.
- ela
Equilibrium line altitude from which deviation is used to calculate SMB [m a.s.l.].
- Type:
ndarray, default=np.nan
- b_pos
Vertical SMB gradient (dB/dz) above ELA [m ice eq./yr/m].
- Type:
ndarray, default=np.nan
- b_neg
Vertical SMB gradient (dB/dz) below ELA [m ice eq./yr/m].
- Type:
ndarray, default=np.nan
- b_max
Upper cap on SMB rate [m ice eq./yr]. Default: 9999 (no cap).
- Type:
float, default=9999
- b_min
Lower cap on SMB rate [m ice eq./yr]. Default: -9999 (no cap).
- Type:
float, default=-9999
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested.
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the ELA gradient SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the ELA gradient SMB 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
Notes
SMB is calculated as: - For elevation > ELA: SMB = b_pos * (elevation - ELA) - For elevation < ELA: SMB = b_neg * (elevation - ELA) SMB is then clamped between b_min and b_max if specified.
Examples
md.smb = pyissm.model.classes.smb.gradientsela() md.smb.ela = equilibrium_line_altitude md.smb.b_pos = positive_gradient # Above ELA md.smb.b_neg = negative_gradient # Below ELA
- check_consistency(md, solution, analyses)
Check consistency of the [smb.gradientsela] 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:
- initialize(md)
Initialise empty fields in smb.gradientsela.
- marshall_class(fid, prefix, md=None)
Marshall [smb.gradientsela] 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
- class pyissm.model.classes.smb.henning(other=None)
Bases:
manage_stateHenning surface mass balance model for ISSM.
This class implements the Henning SMB parametrization, which is a specialized approach for modeling surface mass balance in ice sheet applications.
- 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.
- smbref
Reference surface mass balance [m/yr ice eq].
- Type:
ndarray, default=np.nan
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested.
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the Henning SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the Henning SMB 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.smb = pyissm.model.classes.smb.henning() md.smb.smbref = reference_smb_data
- check_consistency(md, solution, analyses)
Check consistency of the [smb.henning] 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:
- initialize(md)
Initialise empty fields in smb.henning.
- marshall_class(fid, prefix, md=None)
Marshall [smb.henning] 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
- class pyissm.model.classes.smb.meltcomponents(other=None)
Bases:
manage_stateMelt component-based surface mass balance model for ISSM.
This class implements a component-based SMB model that explicitly separates melt and refreeze processes. The surface mass balance is calculated as SMB = accumulation - evaporation - melt + refreeze.
- 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.
- accumulation
Accumulated snow [m/yr ice eq].
- Type:
ndarray, default=np.nan
- evaporation
Amount of ice lost to evaporative processes [m/yr ice eq].
- Type:
ndarray, default=np.nan
- melt
Amount of ice melt in the ice column [m/yr ice eq].
- Type:
ndarray, default=np.nan
- refreeze
Amount of ice melt refrozen in the ice column [m/yr ice eq].
- Type:
ndarray, default=np.nan
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested.
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the melt components SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the melt components SMB 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
Notes
The surface mass balance is computed as: SMB = accumulation - evaporation - melt + refreeze
This formulation explicitly accounts for refreezing processes that can occur in firn layers, which is important for accurate SMB modeling in cold regions.
Examples
md.smb = pyissm.model.classes.smb.meltcomponents() md.smb.accumulation = accumulation_data md.smb.melt = melt_data md.smb.refreeze = refreeze_data
- check_consistency(md, solution, analyses)
Check consistency of the [smb.meltcomponents] 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:
- initialize(md)
Initialise empty fields in smb.meltcomponents.
- marshall_class(fid, prefix, md=None)
Marshall [smb.meltcomponents] 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
- class pyissm.model.classes.smb.pdd(other=None)
Bases:
manage_statePositive Degree Day surface mass balance model for ISSM.
This class implements a positive degree day (PDD) SMB model that calculates surface mass balance based on temperature and precipitation data. It supports multiple temperature and precipitation data sources, including delta-18-O and MUNGSM parametrizations for paleoclimate applications.
- 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.
- precipitation
Monthly surface precipitation [m/yr water eq].
- Type:
ndarray, default=np.nan
- monthlytemperatures
Monthly surface temperatures [K].
- Type:
ndarray, default=np.nan
- desfac
Desertification elevation factor (between 0 and 1) [m].
- Type:
float, default=0.5
- s0p
Elevation from precipitation source (between 0 and a few 1000s m) [m].
- Type:
ndarray, default=np.nan
- s0t
Elevation from temperature source (between 0 and a few 1000s m) [m].
- Type:
ndarray, default=np.nan
- rlaps
Present day lapse rate [degree/km].
- Type:
float, default=6.5
- rlapslgm
LGM lapse rate [degree/km].
- Type:
float, default=6.5
- Pfac
Time interpolation parameter for precipitation, 1D(year).
- Type:
ndarray, default=np.nan
- Tdiff
Time interpolation parameter for temperature, 1D(year).
- Type:
ndarray, default=np.nan
- sealev
Sea level [m], 1D(year).
- Type:
ndarray, default=np.nan
- isdelta18o
Is temperature and precipitation delta18o parametrisation activated (0 or 1).
- Type:
int, default=0
- ismungsm
Is temperature and precipitation mungsm parametrisation activated (0 or 1).
- Type:
int, default=0
- issetpddfac
Is user passing in defined PDD factors (0 or 1).
- Type:
int, default=0
- delta18o
Delta-18-O values [per mil].
- Type:
float, default=0
- delta18o_surface
Surface elevation of the delta18o site [m].
- Type:
ndarray, default=np.nan
- temperatures_presentday
Monthly present day surface temperatures [K].
- Type:
ndarray, default=np.nan
- temperatures_lgm
Monthly LGM surface temperatures [K].
- Type:
ndarray, default=np.nan
- precipitations_presentday
Monthly present day surface precipitation [m/yr water eq].
- Type:
ndarray, default=np.nan
- precipitations_lgm
Monthly LGM surface precipitation [m/yr water eq].
- Type:
ndarray, default=np.nan
- pddfac_snow
PDD factor for snow [mm ice equiv/day/degree C].
- Type:
ndarray, default=np.nan
- pddfac_ice
PDD factor for ice [mm ice equiv/day/degree C].
- Type:
ndarray, default=np.nan
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested.
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the PDD SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the PDD SMB 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
Notes
The PDD model calculates melt based on the number of positive degree days, which is the sum of temperatures above freezing over a given time period. This approach is widely used in glaciology for its simplicity and effectiveness.
Examples
md.smb = pyissm.model.classes.smb.pdd() md.smb.monthlytemperatures = temperature_data md.smb.precipitation = precipitation_data
- check_consistency(md, solution, analyses)
Check consistency of the [smb.pdd] 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:
- initialize(md)
Initialise empty fields in smb.pdd.
- marshall_class(fid, prefix, md=None)
Marshall [smb.pdd] 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
- class pyissm.model.classes.smb.pddSicopolis(other=None)
Bases:
manage_stateSICOPOLIS-style Positive Degree Day surface mass balance model for ISSM.
This class implements the SICOPOLIS PDD scheme (Calov & Greve, 2005) for surface mass balance calculations. It includes temperature and precipitation anomalies, firn warming effects, and desertification corrections based on the SICOPOLIS ice sheet model approach.
- 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.
- precipitation
Monthly surface precipitation [m/yr water eq].
- Type:
ndarray, default=np.nan
- monthlytemperatures
Monthly surface temperatures [K].
- Type:
ndarray, default=np.nan
- temperature_anomaly
Anomaly to monthly reference temperature (additive) [K].
- Type:
ndarray, default=np.nan
- precipitation_anomaly
Anomaly to monthly precipitation (multiplicative, e.g. q = q0*exp(0.070458*DeltaT)) [unitless].
- Type:
ndarray, default=np.nan
- smb_corr
Correction of SMB after PDD call [m/a].
- Type:
ndarray, default=np.nan
- desfac
Desertification elevation factor. Default: -log(2.0)/1000.
- Type:
float, default=-np.log(2.0)/1000
- s0p
Elevation from precipitation source (between 0 and a few 1000s m) [m].
- Type:
ndarray, default=np.nan
- s0t
Elevation from temperature source (between 0 and a few 1000s m) [m].
- Type:
ndarray, default=np.nan
- rlaps
Present day lapse rate [degree/km]. Default: 7.4.
- Type:
float, default=7.4
- isfirnwarming
Is firn warming (Reeh 1991) activated (0 or 1). Default: 1.
- Type:
int, default=1
- pdd_fac_ice
Pdd factor for ice for all the domain (mm ice equiv/day/decgree C)
- Type:
float, default=7.28
- pdd_fac_snow
Pdd factor for snow for all the domain (mm ice equiv/day/decgree C)
- Type:
float, default=2.73
- steps_per_step
Number of SMB steps per time step.
- Type:
int, default=1
- averaging
Averaging method from short to long steps. 0: Arithmetic, 1: Geometric, 2: Harmonic.
- Type:
int, default=0
- requested_outputs
Additional outputs requested (TemperaturePDD, SmbAccumulation, SmbMelt).
- Type:
list, default=[‘default’]
- __init__(self, other=None)
Initializes the SICOPOLIS PDD SMB parameters, optionally inheriting from another instance.
- __repr__(self)
Returns a detailed string representation of the SICOPOLIS PDD SMB 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
Notes
This implementation follows the SICOPOLIS PDD scheme as described in: Calov, R., & Greve, R. (2005). A semi-analytical solution for the positive degree-day model with stochastic temperature variations. Journal of Glaciology, 51(172), 173-175.
The firn warming correction (Reeh, 1991) adjusts melt rates based on firn temperature, which is important for accurate SMB calculations in accumulation zones.
Examples
md.smb = pyissm.model.classes.smb.pddSicopolis() md.smb.monthlytemperatures = temperature_data md.smb.precipitation = precipitation_data md.smb.temperature_anomaly = temp_anomaly
- check_consistency(md, solution, analyses)
Check consistency of the [smb.pddSicopolis] 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:
- initialize(md)
Initialise empty fields in smb.pddSicopolis.
- marshall_class(fid, prefix, md=None)
Marshall [smb.pddSicopolis] 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
- class pyissm.model.classes.smb.semic(other=None)
Bases:
manage_state- check_consistency(md, solution, analyses)
Check consistency of the [smb.semic] 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:
- initialize(md)
Initialise empty fields in smb.semic.
- marshall_class(fid, prefix, md=None)
Marshall [smb.semic] 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