compass.ocean.tests.sphere_transport.process_output.compute_convergence_rates¶
- compass.ocean.tests.sphere_transport.process_output.compute_convergence_rates(dlambda, linf, l2)[source]¶
Given a set of approximate mesh sizes (dlambda) and the corresponding linf and l2 relative error values, this function computes the approximate convergence rates for each error. These values are computed by compute_error_from_output_ncfile for tracer1.
- Parameters
dlambda (numpy.ndarray) – approximate mesh size
linf (numpy.ndarray) – linf relative error associated with each mesh size
l2 (numpy.ndarray) – l2 relative error associated with each mesh size
- Returns
linfrates, l2rates (numpy.ndarray) – Approximate convergence rates for each error.