Skip to content

Commit

Permalink
Introduce min memory
Browse files Browse the repository at this point in the history
  • Loading branch information
NoraLoose committed Apr 9, 2024
1 parent 14bbae3 commit 76819cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/parameterizations/lateral/MOM_Zanna_Bolton.F90
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module MOM_Zanna_Bolton
real :: ZB_large_scale_memory_const !< The non-dimensional factor for the memory time scale
!! for the velocity gradients that scales the dynamical time scale [nondim]
!! Typical range: 1-10
real :: ZB_min_memory !< The minimum eddy memory time scale; default: 0 [T ~> s]
real :: ZB_max_memory !< The maximum eddy memory time scale; default: 1 year [T ~> s]
real :: DT !< The baroclinic model time step [T ~> s]

Expand Down Expand Up @@ -283,6 +284,9 @@ subroutine ZB_2020_init(Time, G, GV, US, param_file, diag, CS, use_ZB2020)
call get_param(param_file, mdl, "ZB_MAX_MEMORY", CS%ZB_max_memory, &
"The maximal eddy memory time. Default is 1 year", units="s", scale=US%s_to_T, &
default=31536000.0)
call get_param(param_file, mdl, "ZB_MIN_MEMORY", CS%ZB_min_memory, &
"The maximal eddy memory time. Default is 0", units="s", scale=US%s_to_T, &
default=0.0)

call get_param(param_file, mdl, "DT", CS%dt, &
"The (baroclinic) dynamics time step.", units="s", scale=US%s_to_T, &
Expand Down Expand Up @@ -816,6 +820,7 @@ subroutine step_forward_ZB_memory(u, v, h, G, GV, CS, eddy)
else
tau = CS%ZB_eddy_memory
endif
tau = max(tau, CS%ZB_min_memory)
CS%ZBtau_eddy(i,j,k) = tau

! Eulerian memory with implicit time stepping
Expand All @@ -833,6 +838,7 @@ subroutine step_forward_ZB_memory(u, v, h, G, GV, CS, eddy)
else
tau = CS%ZB_large_scale_memory
endif
tau = max(tau, CS%ZB_min_memory)
CS%ZBtau_large_scale(i,j,k) = tau

! Eulerian memory with implicit time stepping
Expand Down

0 comments on commit 76819cc

Please sign in to comment.