Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions polaris/ocean/model/mpaso_to_omega.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ config:
- section:
debug: Tendencies
options:
config_disable_vel_explicit_bottom_drag: BottomDragTendencyEnable
config_disable_vel_explicit_bottom_drag: not BottomDragTendencyEnable

- section:
bottom_drag: Tendencies
Expand All @@ -109,8 +109,13 @@ config:
config_eos_type: EosType

- section:
eos_linear: [Eos, Linear]
eos_linear: [Eos, Linear]
options:
config_eos_linear_alpha: DRhoDT
config_eos_linear_alpha: not DRhoDT
config_eos_linear_beta: DRhoDS
config_eos_linear_densityref: RhoT0S0

- section:
ocean_constants: VertCoord
options:
config_density0: Density0
10 changes: 9 additions & 1 deletion polaris/ocean/model/ocean_model_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,5 +669,13 @@ def _map_handle_not(
if option.startswith('not '):
# a special case where we want the opposite of a boolean value
option = option[4:]
value = not value
if isinstance(value, bool):
value = not value
elif isinstance(value, float):
value = -value
else:
raise ValueError(
f"{option}: Cannot apply 'not' to option type "
f'{type(value)}'
)
return option, value
13 changes: 7 additions & 6 deletions polaris/ocean/ocean.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ eos_linear_alpha = 0.2
# Equation of state drho/dS, defaults to mpas-ocean default
eos_linear_beta = 0.8

# Equation of state reference density when T and S are the reference values, defaults to mpas-ocean default
eos_linear_rhoref = 1000.
# Equation of state constant term, designed to match mpas-ocean's default linear EOS
# 1000.0 + 0.2 * 5.0 - 0.8 * 35 = 973.0
eos_linear_rhoref = 973.0

# Equation of state reference temperature, defaults to mpas-ocean default
eos_linear_Tref = 5.
# Equation of state reference temperature, defaults to omega default
eos_linear_Tref = 0.

# Equation of state reference salinity, defaults to mpas-ocean default
eos_linear_Sref = 35.
# Equation of state reference salinity, defaults to omega default
eos_linear_Sref = 0.

# Options relate to adjusting the sea-surface height or land-ice pressure
# below ice shelves to they are dynamically consistent with one another
Expand Down
13 changes: 9 additions & 4 deletions polaris/tasks/ocean/single_column/cvmix/forward.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
ocean:
eos:
config_eos_type: linear
eos_linear:
config_eos_linear_alpha: 0.2
config_eos_linear_beta: 0.01
# 1000.0 + 0.2 * 5 - 0.01 * 35
eos_linear_rhoref: 1000.65

mpas-ocean:
time_management:
config_run_duration: 0010_00:00:00
Expand All @@ -13,9 +22,5 @@ mpas-ocean:
config_use_cvmix_kpp: true
config_cvmix_kpp_matching: MatchBoth
config_cvmix_kpp_interpolationOMLType: cubic
eos:
config_eos_type: linear
eos_linear:
config_eos_linear_beta: 0.01
streams:
KPP_testing: {}
1 change: 1 addition & 0 deletions polaris/tasks/ocean/single_column/forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(
openmp_threads=1,
validate_vars=None,
task_name='',
update_eos=True,
):
"""
Create a new test case
Expand Down
Loading