compass.ocean.tests.sphere_transport.process_output.compute_error_from_output_ncfile

compass.ocean.tests.sphere_transport.process_output.compute_error_from_output_ncfile(dataset, lev=1)[source]

Given a netCDF4 Dataset associated with the output.nc file from a test case in the sphere_transport test group, this function computes the linf and l2 relative error values by comparing the final time step to the initial condition.

Parameters:
  • dataset (NetCDF4.Dataset) – a dataset initialized with an MPAS output.nc file.

  • lev (int, optional) – vertical level to plot.

Returns:

result (dict) – a dictionary containing the linf and l2 relative errors for each of the 3 debug tracers.