Skip to content
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
16 changes: 7 additions & 9 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2219,11 +2219,10 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
"A tiny magnitude of temperatures below which they are set to 0.", &
units="degC", default=0.0, scale=US%degC_to_C)
call get_param(param_file, "MOM", "C_P", CS%tv%C_p, &
"The heat capacity of sea water, approximated as a "//&
"constant. This is only used if ENABLE_THERMODYNAMICS is "//&
"true. The default value is from the TEOS-10 definition "//&
"of conservative temperature.", units="J kg-1 K-1", &
default=3991.86795711963, scale=US%J_kg_to_Q*US%C_to_degC)
"The heat capacity of sea water, approximated as a constant. "//&
"This is only used if ENABLE_THERMODYNAMICS is true. The default "//&
"value is from the TEOS-10 definition of conservative temperature.", &
units="J kg-1 K-1", default=3991.86795711963, scale=US%J_kg_to_Q*US%C_to_degC)
call get_param(param_file, "MOM", "USE_PSURF_IN_EOS", CS%use_p_surf_in_EOS, &
"If true, always include the surface pressure contributions "//&
"in equation of state calculations.", default=.true.)
Expand All @@ -2239,9 +2238,8 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
"The number of sublayers within the mixed layer if "//&
"BULKMIXEDLAYER is true.", units="nondim", default=2)
call get_param(param_file, "MOM", "NKBL", nkbl, &
"The number of layers that are used as variable density "//&
"buffer layers if BULKMIXEDLAYER is true.", units="nondim", &
default=2)
"The number of layers that are used as variable density buffer "//&
"layers if BULKMIXEDLAYER is true.", units="nondim", default=2)
endif

call get_param(param_file, "MOM", "GLOBAL_INDEXING", global_indexing, &
Expand Down Expand Up @@ -2642,7 +2640,7 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &

call MEKE_alloc_register_restart(HI, US, param_file, CS%MEKE, restart_CSp)
call set_visc_register_restarts(HI, GV, US, param_file, CS%visc, restart_CSp)
call mixedlayer_restrat_register_restarts(HI, GV, param_file, &
call mixedlayer_restrat_register_restarts(HI, GV, US, param_file, &
CS%mixedlayer_restrat_CSp, restart_CSp)

if (CS%rotate_index .and. associated(OBC_in) .and. use_temperature) then
Expand Down
20 changes: 10 additions & 10 deletions src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1177,12 +1177,10 @@ subroutine VarMix_init(Time, G, GV, US, param_file, diag, CS)
default=.false.)
call get_param(param_file, mdl, "KHTH_SLOPE_CFF", KhTh_Slope_Cff, &
"The nondimensional coefficient in the Visbeck formula "//&
"for the interface depth diffusivity", units="nondim", &
default=0.0)
"for the interface depth diffusivity", units="nondim", default=0.0)
call get_param(param_file, mdl, "KHTR_SLOPE_CFF", KhTr_Slope_Cff, &
"The nondimensional coefficient in the Visbeck formula "//&
"for the epipycnal tracer diffusivity", units="nondim", &
default=0.0)
"for the epipycnal tracer diffusivity", units="nondim", default=0.0)
call get_param(param_file, mdl, "USE_STORED_SLOPES", CS%use_stored_slopes,&
"If true, the isopycnal slopes are calculated once and "//&
"stored for re-use. This uses more memory but avoids calling "//&
Expand Down Expand Up @@ -1277,20 +1275,22 @@ subroutine VarMix_init(Time, G, GV, US, param_file, diag, CS)
if (KhTr_Slope_Cff>0. .or. KhTh_Slope_Cff>0.) then
in_use = .true.
call get_param(param_file, mdl, "VISBECK_L_SCALE", CS%Visbeck_L_scale, &
"The fixed length scale in the Visbeck formula.", units="m", &
default=0.0)
"The fixed length scale in the Visbeck formula, or if negative a nondimensional "//&
"scaling factor relating this length scale squared to the cell areas.", &
units="m or nondim", default=0.0, scale=US%m_to_L)
allocate(CS%L2u(IsdB:IedB,jsd:jed), source=0.0)
allocate(CS%L2v(isd:ied,JsdB:JedB), source=0.0)
if (CS%Visbeck_L_scale<0) then
! Undo the rescaling of CS%Visbeck_L_scale.
do j=js,je ; do I=is-1,Ieq
CS%L2u(I,j) = CS%Visbeck_L_scale**2 * G%areaCu(I,j)
CS%L2u(I,j) = (US%L_to_m*CS%Visbeck_L_scale)**2 * G%areaCu(I,j)
enddo ; enddo
do J=js-1,Jeq ; do i=is,ie
CS%L2v(i,J) = CS%Visbeck_L_scale**2 * G%areaCv(i,J)
CS%L2v(i,J) = (US%L_to_m*CS%Visbeck_L_scale)**2 * G%areaCv(i,J)
enddo ; enddo
else
CS%L2u(:,:) = US%m_to_L**2*CS%Visbeck_L_scale**2
CS%L2v(:,:) = US%m_to_L**2*CS%Visbeck_L_scale**2
CS%L2u(:,:) = CS%Visbeck_L_scale**2
CS%L2v(:,:) = CS%Visbeck_L_scale**2
endif

CS%id_L2u = register_diag_field('ocean_model', 'L2u', diag%axesCu1, Time, &
Expand Down
Loading