Skip to content

Commit

Permalink
Update other ocean tasks for config_models
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Sep 3, 2024
1 parent 68cb107 commit 8e49511
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 22 deletions.
6 changes: 4 additions & 2 deletions polaris/ocean/tasks/baroclinic_channel/forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def __init__(self, component, resolution, name='forward', subdir=None,
if nu is not None:
# update the viscosity to the requested value *after* loading
# forward.yaml
self.add_model_config_options(options=dict(config_mom_del2=nu))
self.add_model_config_options(options=dict(config_mom_del2=nu),
config_model='mpas-ocean')

self.add_output_file(
filename='output.nc',
Expand Down Expand Up @@ -153,4 +154,5 @@ def dynamic_model_config(self, at_setup):
self.dt = dt
self.btr_dt = btr_dt

self.add_model_config_options(options=options)
self.add_model_config_options(options=options,
config_model='mpas-ocean')
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/baroclinic_channel/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
io:
config_write_output_on_startup: false
hmix_del2:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
time_management:
config_start_time: {{ start_time }}
config_run_duration: {{ run_duration }}
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/baroclinic_channel/rpe/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
time_management:
config_run_duration: 20_00:00:00
streams:
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/cosine_bell/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
run_modes:
config_ocean_run_mode: forward
time_management:
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/geostrophic/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
time_management:
config_run_duration: {{ run_duration }}
time_integration:
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/ice_shelf_2d/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
io:
config_write_output_on_startup: false
hmix_del2:
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/ice_shelf_2d/global_stats.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
AM_globalStats:
config_AM_globalStats_enable: true
config_AM_globalStats_compute_on_startup: true
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/ice_shelf_2d/ssh_forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
hmix_del2:
config_use_mom_del2: true
config_mom_del2: 10.0
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/ice_shelf_2d/tidal_forcing.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
tidal_forcing:
config_use_tidal_forcing: true
config_use_tidal_forcing_tau: 10000
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/inertial_gravity_wave/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
time_management:
config_run_duration: {{ run_duration }}
time_integration:
Expand Down
9 changes: 6 additions & 3 deletions polaris/ocean/tasks/internal_wave/forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ def __init__(self, component, name='forward', subdir=None, indir=None,
if nu is not None:
# update the viscosity to the requested value *after* loading
# forward.yaml
self.add_model_config_options(options=dict(config_mom_del2=nu))
self.add_model_config_options(options=dict(config_mom_del2=nu),
config_model='mpas-ocean')

vadv_dict = {'standard': 'flux-form',
'vlr': 'remap'}
self.add_model_config_options({
'config_vert_advection_method': f"{vadv_dict[vadv_method]}"})
'config_vert_advection_method': f"{vadv_dict[vadv_method]}"},
config_model='mpas-ocean')

self.add_output_file(
filename='output.nc',
Expand Down Expand Up @@ -136,4 +138,5 @@ def dynamic_model_config(self, at_setup):
run_seconds = self.run_time_steps * dt
options['config_run_duration'] = \
time.strftime('%H:%M:%S', time.gmtime(run_seconds))
self.add_model_config_options(options=options)
self.add_model_config_options(options=options,
config_model='mpas-ocean')
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/internal_wave/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
time_management:
config_run_duration: 0000_00:15:00
time_integration:
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/internal_wave/rpe/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
time_management:
config_run_duration: 20_00:00:00
streams:
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/single_column/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
run_modes:
config_ocean_run_mode: forward
time_management:
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/single_column/ideal_age/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
tracer_forcing_idealAgeTracers:
config_use_idealAgeTracers: true
config_use_idealAgeTracers_idealAge_forcing: true
Expand Down
7 changes: 5 additions & 2 deletions polaris/ocean/tasks/sphere_transport/forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ def __init__(self, component, name, subdir, resolution, base_mesh, init,
'nondivergent_2d': 2,
'divergent_2d': 3,
'correlated_tracers_2d': 4}
namelist_options = dict(
config_transport_tests_flow_id=flow_id[case_name])
namelist_options = {
'mpas-ocean': {
'config_transport_tests_flow_id': flow_id[case_name]
}
}
validate_vars = ['normalVelocity', 'tracer1', 'tracer2', 'tracer3']
super().__init__(component=component, name=name, subdir=subdir,
resolution=resolution, mesh=base_mesh,
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/sphere_transport/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
omega:
mpas-ocean:
run_modes:
config_ocean_run_mode: forward
time_management:
Expand Down

0 comments on commit 8e49511

Please sign in to comment.