Skip to content

Commit

Permalink
Add inactive top cells as tests, not test group
Browse files Browse the repository at this point in the history
  • Loading branch information
cbegeman committed Aug 25, 2023
1 parent 2a15e8f commit 2a41fe5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 300 deletions.
28 changes: 18 additions & 10 deletions compass/ocean/tests/global_ocean/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,7 @@ def __init__(self, mpas_core):
include_rk4=True,
include_regression=True,
include_phc=True,
include_en4_1900=True)
self._add_tests(mesh_names=['QU240', 'Icos240', 'QUwISC240'],
DynamicAdjustment=QU240DynamicAdjustment,
high_res_topography=False,
include_rk4=True,
include_regression=True,
include_phc=True,
include_en4_1900=True,
with_inactive_top_cells=True)

# for other meshes, we do fewer tests
Expand Down Expand Up @@ -108,7 +102,7 @@ def _add_tests(self, mesh_names, DynamicAdjustment,

init_test = Init(test_group=self, mesh=mesh_test,
initial_condition=default_ic,
with_inactive_top_cells=with_inactive_top_cells)
with_inactive_top_cells=False)
self.add_test_case(init_test)

time_integrator = default_time_int
Expand Down Expand Up @@ -171,6 +165,21 @@ def _add_tests(self, mesh_names, DynamicAdjustment,
test_group=self, mesh=mesh_test, init=init_test,
time_integrator=time_integrator))

if with_inactive_top_cells:
init_test = Init(test_group=self, mesh=mesh_test,
initial_condition=default_ic,
with_inactive_top_cells=True)
self.add_test_case(init_test)
self.add_test_case(
PerformanceTest(
test_group=self, mesh=mesh_test, init=init_test,
time_integrator=default_time_int))
if include_rk4:
self.add_test_case(
PerformanceTest(
test_group=self, mesh=mesh_test, init=init_test,
time_integrator='RK4'))

initial_conditions = []
if include_phc:
initial_conditions.append('PHC')
Expand All @@ -181,8 +190,7 @@ def _add_tests(self, mesh_names, DynamicAdjustment,
# additional initial conditions (if any)
time_integrator = default_time_int
init_test = Init(test_group=self, mesh=mesh_test,
initial_condition=initial_condition,
with_inactive_top_cells=with_inactive_top_cells)
initial_condition=initial_condition)
self.add_test_case(init_test)

self.add_test_case(
Expand Down
290 changes: 0 additions & 290 deletions compass/ocean/vertical/grid_1d.py

This file was deleted.

0 comments on commit 2a41fe5

Please sign in to comment.