Skip to content

Commit ece864c

Browse files
authored
Merge pull request #232 from xylar/fix-omega-time-integrator
Set default `time_integrator` for Omega
2 parents 8356cef + 5bc4d53 commit ece864c

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

polaris/ocean/convergence/convergence.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ error_type = l2
1212
# config options for convergence forward steps
1313
[convergence_forward]
1414

15-
# time integrator: {'split_explicit', 'RK4'}
15+
# time integrator
16+
# mpas-ocean: {'split_explicit', 'RK4'}
17+
# omega: {'Forward-Backward', 'RungeKutta4', 'RungeKutta2'}
1618
time_integrator = RK4
1719

1820
# RK4 time step per resolution (s/km), since dt is proportional to resolution

polaris/ocean/tasks/manufactured_solution/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,13 @@ def __init__(self, component):
7171
self.config.add_from_package(
7272
'polaris.ocean.tasks.manufactured_solution',
7373
'manufactured_solution.cfg')
74+
75+
def configure(self):
76+
"""
77+
Set omega default config options
78+
"""
79+
super().configure()
80+
config = self.config
81+
model = config.get('ocean', 'model')
82+
if model == 'omega':
83+
config.set('convergence_forward', 'time_integrator', 'RungeKutta4')

polaris/ocean/tasks/manufactured_solution/manufactured_solution.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ error_type = l2
6969
# config options for spherical convergence tests
7070
[convergence_forward]
7171

72-
# time integrator: {'split_explicit', 'RK4'}
72+
# time integrator
73+
# mpas-ocean: {'split_explicit', 'RK4'}
74+
# omega: {'Forward-Backward', 'RungeKutta4', 'RungeKutta2'}
7375
time_integrator = RK4
7476

7577
# RK4 time step per resolution (s/km), since dt is proportional to resolution

0 commit comments

Comments
 (0)