Commit 925150dd authored by Roman Nuterman's avatar Roman Nuterman

add prescribed kappaH profile in tke; when idemix is disabled fix kappaH...

add prescribed kappaH profile in tke; when idemix is disabled fix kappaH profile and add kappaM & kappaH min cutoffs in all setups
parent 421c2e4f
......@@ -64,6 +64,14 @@ def set_tke_diffusivities(vs):
else:
vs.Prandtlnumber[...] = vs.Prandtl_tke0
vs.kappaH[...] = np.maximum(vs.kappaH_min, vs.kappaM / vs.Prandtlnumber)
if vs.enable_kappaH_profile:
# Correct diffusivity according to
# Bryan, K., and L. J. Lewis, 1979:
# A water mass model of the world ocean. J. Geophys. Res., 84, 2503–2517.
# It mainly modifies kappaH within 20S - 20N deg. belt
vs.kappaH[...] = np.maximum(vs.kappaH, (0.8 + 1.05 / np.pi
* np.arctan((-vs.zw[np.newaxis, np.newaxis, :] - 2500.)
/ 222.2)) * 1e-4)
vs.kappaM[...] = np.maximum(vs.kappaM_min, vs.kappaM)
else:
vs.kappaM[...] = vs.kappaM_0
......
......@@ -115,6 +115,7 @@ SETTINGS = OrderedDict([
# New
('kappaH_min', Setting(0., float, 'minimum value for vertical diffusivity')),
('enable_kappaH_profile', Setting(False, bool, 'Compute vertical profile of diffusivity after Bryan and Lewis (1979) in TKE routine')),
('enable_Prandtl_tke', Setting(True, bool, 'Compute Prandtl number from stratification levels in TKE routine')),
('Prandtl_tke0', Setting(10., float, 'Constant Prandtl number when stratification is neglected for kappaH computation in TKE routine')),
('use_io_threads', Setting(False, bool, 'Start extra threads for disk writes')),
......
......@@ -56,6 +56,9 @@ class ACCSetup(VerosSetup):
vs.alpha_tke = 30.0
vs.mxl_min = 1e-8
vs.tke_mxl_choice = 2
vs.kappaM_min = 2e-4
vs.kappaH_min = 2e-5
vs.enable_kappaH_profile = True
# vs.enable_tke_superbee_advection = True
vs.K_gm_0 = 1000.0
......
......@@ -67,8 +67,9 @@ class ACCSectorSetup(VerosSetup):
vs.tke_mxl_choice = 2
vs.kappaM_min = 2e-4
vs.kappaH_min = 2e-5
# vs.enable_tke_superbee_advection = True
vs.enable_Prandtl_tke = False
vs.enable_kappaH_profile = True
# vs.enable_tke_superbee_advection = True
vs.K_gm_0 = 1300.0
vs.enable_eke = False
......
......@@ -58,6 +58,9 @@ class GlobalOneDegreeSetup(VerosSetup):
vs.alpha_tke = 30.0
vs.mxl_min = 1e-8
vs.tke_mxl_choice = 2
vs.kappaM_min = 2e-4
vs.kappaH_min = 2e-5
vs.enable_kappaH_profile = True
vs.enable_tke_superbee_advection = True
# eke
......
......@@ -60,6 +60,9 @@ class GlobalFourDegreeSetup(VerosSetup):
vs.alpha_tke = 30.0
vs.mxl_min = 1e-8
vs.tke_mxl_choice = 2
vs.kappaM_min = 2e-4
vs.kappaH_min = 2e-5
vs.enable_kappaH_profile = True
vs.enable_tke_superbee_advection = True
vs.enable_eke = True
......
......@@ -68,6 +68,9 @@ class GlobalFlexibleResolutionSetup(VerosSetup):
vs.alpha_tke = 30.0
vs.mxl_min = 1e-8
vs.tke_mxl_choice = 2
vs.kappaM_min = 2e-4
vs.kappaH_min = 2e-5
vs.enable_kappaH_profile = True
vs.enable_tke_superbee_advection = True
# eke
......
......@@ -72,6 +72,9 @@ class NorthAtlanticSetup(VerosSetup):
vs.alpha_tke = 30.0
vs.mxl_min = 1e-8
vs.tke_mxl_choice = 2
vs.kappaM_min = 2e-4
vs.kappaH_min = 2e-5
vs.enable_kappaH_profile = True
vs.K_gm_0 = 1000.0
......
......@@ -81,6 +81,9 @@ class WavePropagationSetup(VerosSetup):
vs.alpha_tke = 30.0
vs.mxl_min = 1e-8
vs.tke_mxl_choice = 2
vs.kappaM_min = 2e-4
vs.kappaH_min = 2e-5
vs.enable_kappaH_profile = True
vs.enable_tke_superbee_advection = True
# eke
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment