polaris.ocean.convergence.analysis.ConvergenceAnalysis.compute_error
- ConvergenceAnalysis.compute_error(refinement_factor, variable_name, zidx=None, error_type='l2')[source]
Compute the error for a given resolution
- Parameters:
refinement_factor (float) – The factor by which step is refined in space, time or both
variable_name (str) – The variable name of which to evaluate error with respect to the exact solution
zidx (int, optional) – The z index to use to slice the field given by variable name
error_type ({'l2', 'inf'}, optional) – The type of error to compute
- Returns:
error (float) – The error of the variable given by variable_name