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

*Change defaults for KV_ML_INVZ2 and 3 bug flags #205

Merged
merged 2 commits into from
Sep 20, 2022
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
2 changes: 1 addition & 1 deletion src/core/MOM_barotropic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4476,7 +4476,7 @@ subroutine barotropic_init(u, v, h, eta, Time, G, GV, US, param_file, diag, CS,
"If true, the tidal self-attraction and loading anomaly in the barotropic "//&
"solver has the wrong sign, replicating a long-standing bug with a scalar "//&
"self-attraction and loading term or the SAL term from a previous simulation.", &
default=.true., do_not_log=(det_de==0.0))
default=.false., do_not_log=(det_de==0.0))
call get_param(param_file, mdl, "SADOURNY", CS%Sadourny, &
"If true, the Coriolis terms are discretized with the "//&
"Sadourny (1975) energy conserving scheme, otherwise "//&
Expand Down
2 changes: 1 addition & 1 deletion src/initialization/MOM_state_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2651,7 +2651,7 @@ subroutine MOM_temp_salt_initialize_from_Z(h, tv, depth_tot, G, GV, US, PF, just
"If true use an expression with a vertical indexing bug for extrapolating the "//&
"densities at the bottom of unstable profiles from data when finding the "//&
"initial interface locations in layered mode from a dataset of T and S.", &
default=.true., do_not_log=just_read)
default=.false., do_not_log=just_read)
! Reusing MINIMUM_DEPTH for the default mixed layer depth may be a strange choice, but
! it reproduces previous answers.
endif
Expand Down
23 changes: 1 addition & 22 deletions src/parameterizations/vertical/MOM_bkgnd_mixing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,6 @@ module MOM_bkgnd_mixing
!! Henyey et al, JGR (1986) latitudinal scaling for the background diapycnal diffusivity,
!! which gives a marked decrease in the diffusivity near the equator. The simplification
!! here is to assume that the in-situ stratification is the same as the reference stratificaiton.
logical :: Henyey_IGW_background_new !< same as Henyey_IGW_background
!! but incorporate the effect of stratification on TKE dissipation,
!! e = f/f_0 * acosh(N/f) / acosh(N_0/f_0) * e_0
!! where e is the TKE dissipation, and N_0 and f_0
!! are the reference buoyancy frequency and inertial frequencies respectively.
!! e_0 is the reference dissipation at (N_0,f_0). In the previous version, N=N_0.
!! Additionally, the squared inverse relationship between diapycnal diffusivities
!! and stratification is included:
!!
!! kd = e/N^2
!!
!! where kd is the diapycnal diffusivity. This approach assumes that work done
!! against gravity is uniformly distributed throughout the column. Whereas, kd=kd_0*e,
!! as in the original version, concentrates buoyancy work in regions of strong stratification.
logical :: physical_OBL_scheme !< If true, a physically-based scheme is used to determine mixing in the
!! ocean's surface boundary layer, such as ePBL, KPP, or a refined bulk mixed layer scheme.
logical :: Kd_via_Kdml_bug !< If true and KDML /= KD and a number of other higher precedence
Expand Down Expand Up @@ -276,13 +262,6 @@ subroutine bkgnd_mixing_init(Time, G, GV, US, param_file, diag, CS, physical_OBL
"Harrison & Hallberg, JPO 2008.", default=.false.)
if (CS%Henyey_IGW_background) call check_bkgnd_scheme(CS, "HENYEY_IGW_BACKGROUND")


call get_param(param_file, mdl, "HENYEY_IGW_BACKGROUND_NEW", CS%Henyey_IGW_background_new, &
"If true, use a better latitude-dependent scaling for the "//&
"background diffusivity, as described in "//&
"Harrison & Hallberg, JPO 2008. This option is obsolete.", default=.false.)
if (CS%Henyey_IGW_background_new) call check_bkgnd_scheme(CS, "HENYEY_IGW_BACKGROUND_NEW")

if (CS%Kd>0.0 .and. (trim(CS%bkgnd_scheme_str)=="BRYAN_LEWIS_DIFFUSIVITY" .or.&
trim(CS%bkgnd_scheme_str)=="HORIZ_VARYING_BACKGROUND" )) then
call MOM_error(WARNING, "bkgnd_mixing_init: a nonzero constant background "//&
Expand Down Expand Up @@ -321,7 +300,7 @@ subroutine bkgnd_mixing_init(Time, G, GV, US, param_file, diag, CS, physical_OBL
call get_param(param_file, mdl, "KD_BACKGROUND_VIA_KDML_BUG", CS%Kd_via_Kdml_bug, &
"If true and KDML /= KD and several other conditions apply, the background "//&
"diffusivity is set incorrectly using a bug that was introduced in March, 2018.", &
default=.false.) ! The default should be changed to false and this parameter obsoleted.
default=.false.) ! This parameter should be obsoleted.
endif

! call closeParameterBlock(param_file)
Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_kappa_shear.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,7 @@ function kappa_shear_init(Time, G, GV, US, param_file, diag, CS)
call get_param(param_file, mdl, "KAPPA_SHEAR_VERTEX_PSURF_BUG", CS%psurf_bug, &
"If true, do a simple average of the cell surface pressures to get a pressure "//&
"at the corner if VERTEX_SHEAR=True. Otherwise mask out any land points in "//&
"the average.", default=.true., do_not_log=(just_read .or. (.not.CS%KS_at_vertex)))
"the average.", default=.false., do_not_log=(just_read .or. (.not.CS%KS_at_vertex)))

call get_param(param_file, mdl, "KAPPA_SHEAR_ITER_BUG", CS%dKdQ_iteration_bug, &
"If true, use an older, dimensionally inconsistent estimate of the "//&
Expand Down
9 changes: 4 additions & 5 deletions src/parameterizations/vertical/MOM_vert_friction.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1789,7 +1789,6 @@ subroutine vertvisc_init(MIS, Time, G, GV, US, param_file, diag, ADp, dirs, &

! Local variables

real :: Kv_dflt ! A default viscosity [m2 s-1].
real :: Kv_BBL ! A viscosity in the bottom boundary layer with a simple scheme [Z2 T-1 ~> m2 s-1].
real :: Hmix_m ! A boundary layer thickness [m].
integer :: default_answer_date ! The default setting for the various ANSWER_DATE flags.
Expand Down Expand Up @@ -1917,7 +1916,7 @@ subroutine vertvisc_init(MIS, Time, G, GV, US, param_file, diag, ADp, dirs, &
call get_param(param_file, mdl, "KV", CS%Kv, &
"The background kinematic viscosity in the interior. "//&
"The molecular value, ~1e-6 m2 s-1, may be used.", &
units="m2 s-1", fail_if_missing=.true., scale=US%m2_s_to_Z2_T, unscaled=Kv_dflt)
units="m2 s-1", fail_if_missing=.true., scale=US%m2_s_to_Z2_T)

CS%Kvml_invZ2 = 0.0
if (GV%nkml < 1) then
Expand All @@ -1932,19 +1931,19 @@ subroutine vertvisc_init(MIS, Time, G, GV, US, param_file, diag, ADp, dirs, &
if (CS%Kvml_invZ2 < 0.0) then
call get_param(param_file, mdl, "KVML", CS%Kvml_invZ2, &
"The scale for an extra kinematic viscosity in the mixed layer", &
units="m2 s-1", default=Kv_dflt, scale=US%m2_s_to_Z2_T, do_not_log=.true.)
units="m2 s-1", default=0.0, scale=US%m2_s_to_Z2_T, do_not_log=.true.)
if (CS%Kvml_invZ2 >= 0.0) &
call MOM_error(WARNING, "KVML is a deprecated parameter. Use KV_ML_INVZ2 instead.")
endif
if (CS%Kvml_invZ2 < 0.0) CS%Kvml_invZ2 = CS%Kv ! Change this default later to 0.0.
if (CS%Kvml_invZ2 < 0.0) CS%Kvml_invZ2 = 0.0
call log_param(param_file, mdl, "KV_ML_INVZ2", US%Z2_T_to_m2_s*CS%Kvml_invZ2, &
"An extra kinematic viscosity in a mixed layer of thickness HMIX_FIXED, "//&
"with the actual viscosity scaling as 1/(z*HMIX_FIXED)^2, where z is the "//&
"distance from the surface, to allow for finite wind stresses to be "//&
"transmitted through infinitesimally thin surface layers. This is an "//&
"older option for numerical convenience without a strong physical basis, "//&
"and its use is now discouraged.", &
units="m2 s-1", default=Kv_dflt)
units="m2 s-1", default=0.0)
endif

if (.not.CS%bottomdraglaw) then
Expand Down