compass.ocean.tests.soma.soma_test_case.SomaTestCase

class compass.ocean.tests.soma.soma_test_case.SomaTestCase(test_group, resolution, with_particles, with_surface_restoring, long, three_layer)[source]

The class for all test cases in the SOMA test group. The test case creates the mesh and initial condition, then performs a forward run with analysis members. An analysis step is included if the simulation includes particles.

Variables
  • resolution (str) – The resolution of the test case

  • with_particles (bool) – Whether particles are include in the simulation

  • with_surface_restoring (bool) – Whether surface restoring is included in the simulation

  • long (bool) – Whether to run a long (3-year) simulation to quasi-equilibrium

  • three_layer (bool) – Whether to use only 3 vertical layers and no continental shelf

__init__(test_group, resolution, with_particles, with_surface_restoring, long, three_layer)[source]

Create the test case

Parameters
  • test_group (compass.ocean.tests.soma.Soma) – The test group that this test case belongs to

  • resolution (str) – The resolution of the test case

  • with_particles (bool) – Whether particles are include in the simulation

  • with_surface_restoring (bool) – Whether surface restoring is included in the simulation

  • long (bool) – Whether to run a long (3-year) simulation to quasi-equilibrium

  • three_layer (bool) – Whether to use only 3 vertical layers and no continental shelf

Methods

__init__(test_group, resolution, ...)

Create the test case

add_step(step[, run_by_default])

Add a step to the test case

check_validation()

Check the test case's "validation" dictionary to see if validation failed.

configure()

Set config options that are different from the defaults

run()

Run each step of the test case.

validate()

Test cases can override this method to perform validation of variables