Skip to content

Commit 899486b

Browse files
committed
Add drag cfg option
1 parent de3fcd5 commit 899486b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

polaris/tasks/ocean/barotropic_channel/forward.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,17 @@ def dynamic_model_config(self, at_setup):
101101

102102
config = self.config
103103
nu = config.getfloat('barotropic_channel', 'horizontal_viscosity')
104-
replacements = dict(nu=nu)
104+
drag = config.getfloat('barotropic_channel', 'bottom_drag')
105+
replacements = dict(nu=nu, drag=drag)
105106
self.add_yaml_file(
106107
'polaris.tasks.ocean.barotropic_channel',
107108
self.yaml_filename,
108109
template_replacements=replacements,
109110
)
111+
model = config.get('ocean', 'model')
112+
vert_levels = config.getfloat('vertical_grid', 'vert_levels')
113+
if model == 'mpas-ocean' and vert_levels == 1:
114+
self.add_yaml_file('polaris.ocean.config', 'single_layer.yaml')
110115

111116
def compute_cell_count(self):
112117
"""

0 commit comments

Comments
 (0)