pyissm.tools.diagnostics

Diagnostic functions for ISSM models

This module contains various functions that support diagnostic analysis of ISSM models.

Functions

velocity_residuals(md[, obs_vel, model_vel])

Compute velocity residuals.

velocity_rmse(md[, obs_vel, model_vel])

Compute weighted velocity RMSE.

weighted_mean(md, values[, weights])

Compute weighted mean.

weighted_rmse(md, values[, weights])

Compute weighted RMSE.

pyissm.tools.diagnostics.velocity_residuals(md, obs_vel=None, model_vel=None)

Compute velocity residuals.

Parameters:
  • md (pyissm.Model) – ISSM model.

  • obs_vel (numpy.ndarray, optional) – Observed velocities. If None, will use md.inversion.vel_obs.

  • model_vel (numpy.ndarray, optional) – Model velocities. If None, will use md.results.StressbalanceSolution.Vel

Returns:

Velocity residuals.

Return type:

numpy.ndarray

pyissm.tools.diagnostics.velocity_rmse(md, obs_vel=None, model_vel=None)

Compute weighted velocity RMSE.

Parameters:
  • md (pyissm.Model) – ISSM model.

  • obs_vel (numpy.ndarray, optional) – Observed velocities. If None, will use md.inversion.vel_obs.

  • model_vel (numpy.ndarray, optional) – Model velocities. If None, will use md.results.StressbalanceSolution.Vel

Returns:

Weighted velocity RMSE.

Return type:

float

pyissm.tools.diagnostics.weighted_mean(md, values, weights=None)

Compute weighted mean.

Parameters:
  • md (pyissm.Model) – ISSM model.

  • values (numpy.ndarray) – Values to compute weighted mean. Either vertex-based or element-based.

  • weights (numpy.ndarray, optional) – Custom weights. Default = None, in which case element areas will be used.

Returns:

float

Weighted mean value.

pyissm.tools.diagnostics.weighted_rmse(md, values, weights=None)

Compute weighted RMSE.

Parameters:
  • md (pyissm.Model) – ISSM model.

  • values (numpy.ndarray) – Values to compute weighted RMSE.

  • weights (numpy.ndarray, optional.) – Custom weights. Default = None, in which case element areas will be used.

Returns:

Weighted RMSE value.

Return type:

float