Skip to content

Commit

Permalink
Add namelist.init and streams.init for each mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Aug 17, 2022
1 parent 2290c76 commit b4c9935
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions compass/ocean/tests/global_ocean/init/initial_state.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from importlib.resources import contents

from compass.ocean.tests.global_ocean.metadata import \
add_mesh_and_init_metadata
from compass.model import run_model
Expand Down Expand Up @@ -66,6 +68,16 @@ def __init__(self, test_case, mesh, initial_condition, with_bgc):
if mesh.with_ice_shelf_cavities:
self.add_streams_file(package, 'streams.wisc', mode='init')

mesh_package = mesh.package
mesh_package_contents = list(contents(mesh_package))
mesh_namelist = 'namelist.init'
if mesh_namelist in mesh_package_contents:
self.add_namelist_file(mesh_package, mesh_namelist, mode='init')

mesh_streams = 'streams.init'
if mesh_streams in mesh_package_contents:
self.add_streams_file(mesh_package, mesh_streams, mode='init')

self.add_input_file(
filename='topography.nc',
target='BedMachineAntarctica_v2_and_GEBCO_2022_0.05_degree_20220729.nc',
Expand Down

0 comments on commit b4c9935

Please sign in to comment.