Skip to content

Commit e285b25

Browse files
committed
Only visualize init for thin film cases
1 parent 824648b commit e285b25

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

compass/ocean/tests/isomip_plus/initial_state.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class InitialState(Step):
4040
Whether the run includes a thin film below grounded ice
4141
"""
4242
def __init__(self, test_case, resolution, experiment, vertical_coordinate,
43-
time_varying_forcing, thin_film_present):
43+
time_varying_forcing, thin_film_present, include_viz=False):
4444
"""
4545
Create the step
4646
@@ -65,6 +65,7 @@ def __init__(self, test_case, resolution, experiment, vertical_coordinate,
6565
Whether the run includes a thin film below grounded ice
6666
"""
6767
super().__init__(test_case=test_case, name='initial_state')
68+
self.include_viz = include_viz
6869
self.resolution = resolution
6970
self.experiment = experiment
7071
self.vertical_coordinate = vertical_coordinate
@@ -88,7 +89,8 @@ def run(self):
8889
"""
8990
ds, frac = self._compute_initial_condition()
9091
self._compute_restoring(ds, frac)
91-
self._plot(ds)
92+
if self.include_viz:
93+
self._plot(ds)
9294

9395
def _compute_initial_condition(self):
9496
config = self.config

compass/ocean/tests/isomip_plus/isomip_plus_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ def __init__(self, test_group, resolution, experiment,
140140
experiment=experiment,
141141
vertical_coordinate=vertical_coordinate,
142142
time_varying_forcing=time_varying_forcing,
143-
thin_film_present=thin_film_present))
143+
thin_film_present=thin_film_present,
144+
include_viz=thin_film_present))
144145
self.add_step(
145146
SshAdjustment(test_case=self, resolution=resolution,
146147
vertical_coordinate=vertical_coordinate,

0 commit comments

Comments
 (0)