The global_convergence test group (compass.ocean.tests.global_convergence.GlobalConvergence) implements convergence studies on the full globe. Currently, the only test case is the advection of a cosine bell.

mesh types

The global convergence test cases support two types of meshes: qu meshes created with the compass.mesh.QuasiUniformSphericalMeshStep step and icos meshes created with compass.mesh.IcosahedralMeshStep. In general, the icos meshes are more uniform but the qu meshes are more flexible. The icos meshes only support a fixed set of resolutions described in Spherical Meshes.


The compass.ocean.tests.global_convergence.cosine_bell.CosineBell test performs a series of 24-day runs that advect a bell-shaped tracer blob around the sphere. The resolution of the sphere varies (by default, between 60 and 240 km). Advected results are compared with a known exact solution to determine the rate of convergence. See cosine_bell. for config options and more details on the test case.


This step builds a global mesh with uniform resolution. The type of mesh depends on the mesh type (qu or icos).


The class compass.ocean.tests.global_convergence.cosine_bell.init.Init defines a step for setting up the initial state for each test case with a tracer distributed in a cosine-bell shape.


The class compass.ocean.tests.global_convergence.cosine_bell.forward.Forward defines a step for running MPAS-Ocean from the initial condition produced in the initial_state step. The time step is determined from the resolution based on the dt_per_km config option. Other namelist options are taken from the test case’s namelist.forward.


The class compass.ocean.tests.global_convergence.cosine_bell.analysis.Analysis defines a step for computing the RMSE (root-mean-squared error) for the results at each resolution and plotting them in convergence.png.