Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions compass/landice/tests/dome/decomposition_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ def __init__(self, test_group, mesh_type):

# no configure() method is needed

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

variables = ['thickness', 'normalVelocity']
steps = self.steps_to_run
if '1proc_run' in steps and '4proc_run' in steps:
Expand Down
10 changes: 5 additions & 5 deletions compass/landice/tests/dome/restart_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ def __init__(self, test_group, mesh_type):

# no configure() method is needed

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

variables = ['thickness', 'normalVelocity']
steps = self.steps_to_run
if 'full_run' in steps and 'restart_run' in steps:
Expand Down
10 changes: 5 additions & 5 deletions compass/landice/tests/eismint2/decomposition_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ def __init__(self, test_group, thermal_solver):

# no configure() method is needed

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

variables = ['thickness', 'temperature', 'basalTemperature',
'heatDissipation']
steps = self.steps_to_run
Expand Down
10 changes: 5 additions & 5 deletions compass/landice/tests/eismint2/restart_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ def __init__(self, test_group, thermal_solver):

# no configure() method is needed

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

variables = ['thickness', 'temperature', 'basalTemperature',
'heatDissipation']
steps = self.steps_to_run
Expand Down
9 changes: 5 additions & 4 deletions compass/landice/tests/enthalpy_benchmark/A/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ def configure(self):
target:
symlink(str(target), '{}/README'.format(self.work_dir))

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()
variables = ['temperature', 'basalWaterThickness',
'groundedBasalMassBal']
compare_variables(test_case=self, variables=variables,
Expand Down
10 changes: 5 additions & 5 deletions compass/landice/tests/greenland/decomposition_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ def __init__(self, test_group):

# no configure() method is needed

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

variables = ['thickness', 'normalVelocity']
steps = self.steps_to_run
if '1proc_run' in steps and '8proc_run' in steps:
Expand Down
10 changes: 5 additions & 5 deletions compass/landice/tests/greenland/restart_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ def __init__(self, test_group):

# no configure() method is needed

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

variables = ['thickness', 'normalVelocity']
steps = self.steps_to_run
if 'full_run' in steps and 'restart_run' in steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ def __init__(self, test_group):

# no configure() method is needed

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

variables = ['waterThickness', 'waterPressure']
steps = self.steps_to_run
if '1proc_run' in steps and '3proc_run' in steps:
Expand Down
10 changes: 5 additions & 5 deletions compass/landice/tests/hydro_radial/restart_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ def __init__(self, test_group):

# no configure() method is needed

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

variables = ['waterThickness', 'waterPressure']
steps = self.steps_to_run
if 'full_run' in steps and 'restart_run' in steps:
Expand Down
11 changes: 5 additions & 6 deletions compass/ocean/tests/baroclinic_channel/decomp_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ def configure(self):
"""
baroclinic_channel.configure(self.resolution, self.config)

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

# perform validation
variables = ['temperature', 'salinity', 'layerThickness',
'normalVelocity']
steps = self.steps_to_run
Expand Down
11 changes: 5 additions & 6 deletions compass/ocean/tests/baroclinic_channel/restart_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,13 @@ def configure(self):
"""
baroclinic_channel.configure(self.resolution, self.config)

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

# perform validation
variables = ['temperature', 'salinity', 'layerThickness',
'normalVelocity']
steps = self.steps_to_run
Expand Down
11 changes: 5 additions & 6 deletions compass/ocean/tests/baroclinic_channel/threads_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ def configure(self):
"""
baroclinic_channel.configure(self.resolution, self.config)

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the test case
Test cases can override this method to perform validation of variables
and timers
"""
# run the steps
super().run()

# perform validation
variables = ['temperature', 'salinity', 'layerThickness',
'normalVelocity']
steps = self.steps_to_run
Expand Down
10 changes: 5 additions & 5 deletions compass/ocean/tests/global_ocean/analysis_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ def __init__(self, test_group, mesh, init, time_integrator):
step.add_streams_file(module, 'streams.forward')
self.add_step(step)

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the testcase
Test cases can override this method to perform validation of variables
and timers
"""
# get cores, threads from config options and run the steps
super().run()

config = self.config
work_dir = self.work_dir

Expand Down
13 changes: 5 additions & 8 deletions compass/ocean/tests/global_ocean/daily_output_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,13 @@ def __init__(self, test_group, mesh, init, time_integrator):
step.add_streams_file(module, 'streams.forward')
self.add_step(step)

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the testcase
Test cases can override this method to perform validation of variables
and timers
"""
# get cores, threads from config options and run the steps
super().run()

config = self.config
work_dir = self.work_dir

variables = [
'timeDaily_avg_activeTracers_temperature',
'timeDaily_avg_activeTracers_salinity',
Expand Down
10 changes: 5 additions & 5 deletions compass/ocean/tests/global_ocean/decomp_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ def __init__(self, test_group, mesh, init, time_integrator):
time_integrator=time_integrator, name=name,
subdir=name, cores=procs, threads=1))

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the testcase
Test cases can override this method to perform validation of variables
and timers
"""
# get cores, threads from config options and run the steps
super().run()

variables = ['temperature', 'salinity', 'layerThickness',
'normalVelocity']
steps = self.steps_to_run
Expand Down
10 changes: 5 additions & 5 deletions compass/ocean/tests/global_ocean/dynamic_adjustment.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ def __init__(self, test_group, mesh, init, time_integrator,

self.restart_filenames = restart_filenames

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the testcase
Test cases can override this method to perform validation of variables
and timers
"""
# get cores, threads from config options and run the steps
super().run()

variables = ['temperature', 'salinity', 'layerThickness',
'normalVelocity']

Expand Down
8 changes: 7 additions & 1 deletion compass/ocean/tests/global_ocean/init/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def run(self):
"""
config = self.config
steps = self.steps_to_run
work_dir = self.work_dir
if 'initial_state' in steps:
step = self.steps['initial_state']
# get the these properties from the config options
Expand All @@ -97,6 +96,13 @@ def run(self):
# run the steps
super().run()

def validate(self):
"""
Test cases can override this method to perform validation of variables
and timers
"""
steps = self.steps_to_run

if 'initial_state' in steps:
variables = ['temperature', 'salinity', 'layerThickness']
compare_variables(test_case=self, variables=variables,
Expand Down
5 changes: 5 additions & 0 deletions compass/ocean/tests/global_ocean/mesh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ def run(self):
# run the step
super().run()

def validate(self):
"""
Test cases can override this method to perform validation of variables
and timers
"""
variables = ['xCell', 'yCell', 'zCell']
compare_variables(test_case=self, variables=variables,
filename1='mesh/culled_mesh.nc')
10 changes: 5 additions & 5 deletions compass/ocean/tests/global_ocean/performance_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ def __init__(self, test_group, mesh, init, time_integrator):
step.add_output_file(filename='land_ice_fluxes.nc')
self.add_step(step)

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the testcase
Test cases can override this method to perform validation of variables
and timers
"""
# get cores, threads from config options and run the steps
super().run()

variables = ['temperature', 'salinity', 'layerThickness',
'normalVelocity']
if self.init.with_bgc:
Expand Down
10 changes: 5 additions & 5 deletions compass/ocean/tests/global_ocean/restart_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ def __init__(self, test_group, mesh, init, time_integrator):
step.add_output_file(filename=output_file[part])
self.add_step(step)

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the testcase
Test cases can override this method to perform validation of variables
and timers
"""
# get cores, threads from config options and run the steps
super().run()

variables = ['temperature', 'salinity', 'layerThickness',
'normalVelocity']
steps = self.steps_to_run
Expand Down
10 changes: 5 additions & 5 deletions compass/ocean/tests/global_ocean/threads_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ def __init__(self, test_group, mesh, init, time_integrator):
time_integrator=time_integrator, name=name,
subdir=name, cores=4, threads=threads))

def run(self):
# no run() method is needed

def validate(self):
"""
Run each step of the testcase
Test cases can override this method to perform validation of variables
and timers
"""
# get cores, threads from config options and run the steps
super().run()

variables = ['temperature', 'salinity', 'layerThickness',
'normalVelocity']
steps = self.steps_to_run
Expand Down
Loading