Skip to content

Commit

Permalink
Merge pull request #232 from xylar/fix-omega-time-integrator
Browse files Browse the repository at this point in the history
Set default `time_integrator` for Omega
  • Loading branch information
xylar authored Oct 15, 2024
2 parents 8356cef + 5bc4d53 commit ece864c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion polaris/ocean/convergence/convergence.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ error_type = l2
# config options for convergence forward steps
[convergence_forward]

# time integrator: {'split_explicit', 'RK4'}
# time integrator
# mpas-ocean: {'split_explicit', 'RK4'}
# omega: {'Forward-Backward', 'RungeKutta4', 'RungeKutta2'}
time_integrator = RK4

# RK4 time step per resolution (s/km), since dt is proportional to resolution
Expand Down
10 changes: 10 additions & 0 deletions polaris/ocean/tasks/manufactured_solution/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,13 @@ def __init__(self, component):
self.config.add_from_package(
'polaris.ocean.tasks.manufactured_solution',
'manufactured_solution.cfg')

def configure(self):
"""
Set omega default config options
"""
super().configure()
config = self.config
model = config.get('ocean', 'model')
if model == 'omega':
config.set('convergence_forward', 'time_integrator', 'RungeKutta4')
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ error_type = l2
# config options for spherical convergence tests
[convergence_forward]

# time integrator: {'split_explicit', 'RK4'}
# time integrator
# mpas-ocean: {'split_explicit', 'RK4'}
# omega: {'Forward-Backward', 'RungeKutta4', 'RungeKutta2'}
time_integrator = RK4

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

0 comments on commit ece864c

Please sign in to comment.