Skip to content

Commit

Permalink
Added a unique Prandtl # for convection and background
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Mar 30, 2018
1 parent 4cac1e1 commit 69ab998
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
11 changes: 7 additions & 4 deletions src/parameterizations/vertical/MOM_bkgnd_mixing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ module MOM_bkgnd_mixing
real :: N0_2Omega !< ratio of the typical Buoyancy frequency to
!! twice the Earth's rotation period, used with the
!! Henyey scaling from the mixing
real :: prandtl_turb !< Turbulent Prandtl number
real :: prandtl_bkgnd !< Turbulent Prandtl number used to convert
!! vertical background diffusivity into viscosity
real :: Kd_tanh_lat_scale !< A nondimensional scaling for the range of
!! diffusivities with Kd_tanh_lat_fn. Valid values
!! are in the range of -2 to 2; 0.4 reproduces CM2M.
Expand Down Expand Up @@ -155,8 +156,10 @@ subroutine bkgnd_mixing_init(Time, G, GV, param_file, diag, CS)

call get_param(param_file, mdl, 'DEBUG', CS%debug, default=.False., do_not_log=.True.)

call get_param(param_file, mdl, "PRANDTL_TURB", CS%prandtl_turb, &
units="nondim", default=1.0, do_not_log=.true.)
call get_param(param_file, mdl, "PRANDTL_BKGND", CS%prandtl_bkgnd, &
"Turbulent Prandtl number used to convert vertical \n"//&
"background diffusivities into viscosities.", &
units="nondim", default=1.0)

! call openParameterBlock(param_file,'MOM_BACKGROUND_MIXING')

Expand Down Expand Up @@ -349,7 +352,7 @@ subroutine calculate_bkgnd_mixing(h, tv, N2_lay, Kd, j, G, GV, CS)
bl2 = CS%Bryan_Lewis_c2, &
bl3 = CS%Bryan_Lewis_c3, &
bl4 = CS%Bryan_Lewis_c4, &
prandtl = CS%prandtl_turb)
prandtl = CS%prandtl_bkgnd)

call cvmix_coeffs_bkgnd(Mdiff_out=CS%kv_bkgnd(i,j,:), &
Tdiff_out=CS%kd_bkgnd(i,j,:), &
Expand Down
17 changes: 9 additions & 8 deletions src/parameterizations/vertical/MOM_cvmix_conv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ logical function cvmix_conv_init(Time, G, GV, param_file, diag, CS)
type(cvmix_conv_cs), pointer :: CS !< This module's control structure.

! Local variables
real :: prandtl_turb
logical :: useEPBL
real :: prandtl_conv !< Turbulent Prandtl number used in convective instabilities.
logical :: useEPBL !< If True, use the ePBL boundary layer scheme.

! This include declares and sets the variable "version".
#include "version_variable.h"
Expand Down Expand Up @@ -95,16 +95,17 @@ logical function cvmix_conv_init(Time, G, GV, param_file, diag, CS)
'as convective mixing might occur in the boundary layer.')
endif

call get_param(param_file, mdl, "PRANDTL_TURB", Prandtl_turb, &
"The turbulent Prandtl number applied to shear/conv. \n"//&
"instabilities.", units="nondim", default=1.0, do_not_log=.true.)

call get_param(param_file, mdl, 'DEBUG', CS%debug, default=.False., do_not_log=.True.)

call get_param(param_file, mdl, 'MIN_THICKNESS', CS%min_thickness, default=0.001, do_not_log=.True.)

call openParameterBlock(param_file,'CVMIX_CONVECTION')

call get_param(param_file, mdl, "PRANDTL_CONV", prandtl_conv, &
"The turbulent Prandtl number applied to convective \n"//&
"instabilities (i.e., used to convert KD_CONV into KV_CONV)", &
units="nondim", default=1.0)

call get_param(param_file, mdl, 'KD_CONV', CS%kd_conv, &
"Diffusivity used in convective regime. Corresponding viscosity \n" // &
"(KV_CONV) will be set to KD_CONV * PRANDTL_TURB.", &
Expand All @@ -117,8 +118,8 @@ logical function cvmix_conv_init(Time, G, GV, param_file, diag, CS)

call closeParameterBlock(param_file)

! set kv_conv based on kd_conv and Prandtl_turb
CS%kv_conv = CS%kd_conv * Prandtl_turb
! set kv_conv based on kd_conv and prandtl_conv
CS%kv_conv = CS%kd_conv * prandtl_conv

! allocate arrays and set them to zero
allocate(CS%N2(SZI_(G), SZJ_(G), SZK_(G)+1)); CS%N2(:,:,:) = 0.
Expand Down

0 comments on commit 69ab998

Please sign in to comment.