Skip to content

Commit

Permalink
Add ocean core
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Dec 1, 2020
1 parent ca78748 commit 868e9ba
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
1 change: 1 addition & 0 deletions compass/ocean/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

34 changes: 34 additions & 0 deletions compass/ocean/ocean.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This config file has default config options for the ocean core

# The paths section points COMPASS to external paths
[paths]

# the relative or absolute path to the root of a branch where MPAS-Ocean
# has been built
mpas_model = MPAS-Model/ocean/develop

# The namelists section defines paths to example_compact namelists that will be used
# to generate specific namelists. By default, these point to the forward and
# init namelists in the default_inputs directory after a successful build of
# the ocean model. Change these in a custom config file if you need a different
# example_compact.
[namelists]
forward = ${paths:mpas_model}/default_inputs/namelist.ocean.forward
init = ${paths:mpas_model}/default_inputs/namelist.ocean.init

# The streams section defines paths to example_compact streams files that will be used
# to generate specific streams files. By default, these point to the forward and
# init streams files in the default_inputs directory after a successful build of
# the ocean model. Change these in a custom config file if you need a different
# example_compact.
[streams]
forward = ${paths:mpas_model}/default_inputs/streams.ocean.forward
init = ${paths:mpas_model}/default_inputs/streams.ocean.init


# The executables section defines paths to required executables. These
# executables are provided for use by specific test cases. Most tools that
# COMPASS needs should be in the conda environment, so this is only the path
# to the MPAS-Ocean executable by default.
[executables]
model = ${paths:mpas_model}/ocean_model
16 changes: 16 additions & 0 deletions compass/ocean/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

def collect():
"""
Get a list of testcases in this configuration
Returns
-------
testcases : list
A dictionary of configurations within this core
"""
testcases = list()
for configuration in []:
testcases.extend(configuration.collect())

return testcases
3 changes: 2 additions & 1 deletion compass/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys

from compass.examples import tests as example_tests
from compass.ocean import tests as ocean_tests


def collect():
Expand All @@ -16,7 +17,7 @@ def collect():

testcase_list = list()

for tests in [example_tests]:
for tests in [example_tests, ocean_tests]:
testcase_list.extend(tests.collect())

validate(testcase_list)
Expand Down

0 comments on commit 868e9ba

Please sign in to comment.