Skip to content

Commit

Permalink
Rescale strat_floor
Browse files Browse the repository at this point in the history
  Rescaled the internal representation of the FGNV_STRAT_FLOOR variable and
thickness_diffuse%N2_floor to include appropriate factors of US%Z_to_L to
reflect the scaling of aspect ratios.  This leads to the elimination of one
rescaling factor in thickness_diffuse_full() and its replacement by another
in a scale factor for a get_param call.  All answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Jan 19, 2025
1 parent c9892e7 commit fd4d3ba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/parameterizations/lateral/MOM_thickness_diffuse.F90
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ module MOM_thickness_diffuse
real :: FGNV_c_min !< A minimum wave speed used in the Ferrari et al., 2010,
!! streamfunction formulation [L T-1 ~> m s-1].
real :: N2_floor !< A floor for squared buoyancy frequency in the Ferrari et al., 2010,
!! streamfunction formulation [T-2 ~> s-2].
!! streamfunction formulation divided by aspect ratio rescaling factors
!! [L2 Z-2 T-2 ~> s-2].
logical :: detangle_interfaces !< If true, add 3-d structured interface height
!! diffusivities to horizontally smooth jagged layers.
real :: detangle_time !< If detangle_interfaces is true, this is the
Expand Down Expand Up @@ -784,7 +785,7 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV
h_neglect = GV%H_subroundoff ; h_neglect2 = h_neglect**2 ; hn_2 = 0.5*h_neglect
dz_neglect = GV%dZ_subroundoff ; dz_neglect2 = dz_neglect**2
if (GV%Boussinesq) G_rho0 = GV%g_Earth / GV%Rho0
N2_floor = CS%N2_floor * US%Z_to_L**2
N2_floor = CS%N2_floor

use_EOS = associated(tv%eqn_of_state)
present_slope_x = PRESENT(slope_x)
Expand Down Expand Up @@ -2124,7 +2125,7 @@ subroutine thickness_diffuse_init(Time, G, GV, US, param_file, diag, CDp, CS)
real :: omega ! The Earth's rotation rate [T-1 ~> s-1]
real :: strat_floor ! A floor for buoyancy frequency in the Ferrari et al. 2010,
! streamfunction formulation, expressed as a fraction of planetary
! rotation [nondim].
! rotation divided by an aspect ratio rescaling factor [L Z-1 ~> nondim]
real :: Stanley_coeff ! Coefficient relating the temperature gradient and sub-gridscale
! temperature variance [nondim]
integer :: default_answer_date ! The default setting for the various ANSWER_DATE flags.
Expand Down Expand Up @@ -2243,7 +2244,7 @@ subroutine thickness_diffuse_init(Time, G, GV, US, param_file, diag, CDp, CS)
"A floor for Brunt-Vasaila frequency in the Ferrari et al., 2010, "//&
"streamfunction formulation, expressed as a fraction of planetary "//&
"rotation, OMEGA. This should be tiny but non-zero to avoid degeneracy.", &
default=1.e-15, units="nondim", do_not_log=.not.CS%use_FGNV_streamfn)
default=1.e-15, units="nondim", scale=US%Z_to_L, do_not_log=.not.CS%use_FGNV_streamfn)
call get_param(param_file, mdl, "USE_STANLEY_GM", CS%use_stanley_gm, &
"If true, turn on Stanley SGS T variance parameterization "// &
"in GM code.", default=.false.)
Expand Down

0 comments on commit fd4d3ba

Please sign in to comment.