Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+(*)Fix wave_speed_init mono_N2_depth bug #413

Merged
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
4 changes: 3 additions & 1 deletion src/diagnostics/MOM_wave_speed.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module MOM_wave_speed
!! wave_speed() which can be overridden by optional arguments.
real :: mono_N2_depth = -1. !< The depth below which N2 is limited as monotonic for the purposes of
!! calculating the equivalent barotropic wave speed [Z ~> m].
!! If this parameter is negative, this limiting does not occur.
!! This parameter controls the default behavior of wave_speed() which
!! can be overridden by optional arguments.
real :: min_speed2 = 0. !< The minimum mode 1 internal wave speed squared [L2 T-2 ~> m2 s-2]
Expand Down Expand Up @@ -1465,7 +1466,8 @@ subroutine wave_speed_init(CS, use_ebt_mode, mono_N2_column_fraction, mono_N2_de
call log_version(mdl, version)

call wave_speed_set_param(CS, use_ebt_mode=use_ebt_mode, mono_N2_column_fraction=mono_N2_column_fraction, &
better_speed_est=better_speed_est, min_speed=min_speed, wave_speed_tol=wave_speed_tol, &
mono_N2_depth=mono_N2_depth, better_speed_est=better_speed_est, &
min_speed=min_speed, wave_speed_tol=wave_speed_tol, &
remap_answers_2018=remap_answers_2018, remap_answer_date=remap_answer_date, &
c1_thresh=c1_thresh)

Expand Down
5 changes: 3 additions & 2 deletions src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1239,8 +1239,9 @@ subroutine VarMix_init(Time, G, GV, US, param_file, diag, CS)
in_use = .true.
call get_param(param_file, mdl, "RESOLN_N2_FILTER_DEPTH", N2_filter_depth, &
"The depth below which N2 is monotonized to avoid stratification "//&
"artifacts from altering the equivalent barotropic mode structure.",&
units="m", default=2000., scale=US%m_to_Z)
"artifacts from altering the equivalent barotropic mode structure. "//&
"This monotonzization is disabled if this parameter is negative.", &
units="m", default=-1.0, scale=US%m_to_Z)
allocate(CS%ebt_struct(isd:ied,jsd:jed,GV%ke), source=0.0)
endif

Expand Down