Skip to content

Commit

Permalink
Only visualize init for thin film cases
Browse files Browse the repository at this point in the history
  • Loading branch information
cbegeman committed Oct 24, 2024
1 parent 824648b commit e285b25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions compass/ocean/tests/isomip_plus/initial_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class InitialState(Step):
Whether the run includes a thin film below grounded ice
"""
def __init__(self, test_case, resolution, experiment, vertical_coordinate,
time_varying_forcing, thin_film_present):
time_varying_forcing, thin_film_present, include_viz=False):
"""
Create the step
Expand All @@ -65,6 +65,7 @@ def __init__(self, test_case, resolution, experiment, vertical_coordinate,
Whether the run includes a thin film below grounded ice
"""
super().__init__(test_case=test_case, name='initial_state')
self.include_viz = include_viz
self.resolution = resolution
self.experiment = experiment
self.vertical_coordinate = vertical_coordinate
Expand All @@ -88,7 +89,8 @@ def run(self):
"""
ds, frac = self._compute_initial_condition()
self._compute_restoring(ds, frac)
self._plot(ds)
if self.include_viz:
self._plot(ds)

def _compute_initial_condition(self):
config = self.config
Expand Down
3 changes: 2 additions & 1 deletion compass/ocean/tests/isomip_plus/isomip_plus_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def __init__(self, test_group, resolution, experiment,
experiment=experiment,
vertical_coordinate=vertical_coordinate,
time_varying_forcing=time_varying_forcing,
thin_film_present=thin_film_present))
thin_film_present=thin_film_present,
include_viz=thin_film_present))
self.add_step(
SshAdjustment(test_case=self, resolution=resolution,
vertical_coordinate=vertical_coordinate,
Expand Down

0 comments on commit e285b25

Please sign in to comment.