Skip to content

Commit

Permalink
Use combined scaling factors
Browse files Browse the repository at this point in the history
  Replaced products of scaling factors (like US%R_to_kg_m3*US%L_T_to_m_s**2)
with combined scaling factors (like US%RL2_T2_to_Pa) to simplfy and clarify the
code.  All answers are bitwise idenical.
  • Loading branch information
Hallberg-NOAA committed Apr 7, 2020
1 parent f9b63f3 commit 6d7dde4
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 44 deletions.
4 changes: 2 additions & 2 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2987,13 +2987,13 @@ subroutine extract_surface_state(CS, sfc_state)
if (allocated(sfc_state%taux_shelf) .and. associated(CS%visc%taux_shelf)) then
!$OMP parallel do default(shared)
do j=js,je ; do I=is-1,ie
sfc_state%taux_shelf(I,j) = US%R_to_kg_m3*US%L_T_to_m_s**2*US%Z_to_L*CS%visc%taux_shelf(I,j)
sfc_state%taux_shelf(I,j) = US%RZ_T_to_kg_m2s*US%L_T_to_m_s*CS%visc%taux_shelf(I,j)
enddo ; enddo
endif
if (allocated(sfc_state%tauy_shelf) .and. associated(CS%visc%tauy_shelf)) then
!$OMP parallel do default(shared)
do J=js-1,je ; do i=is,ie
sfc_state%tauy_shelf(i,J) = US%R_to_kg_m3*US%L_T_to_m_s**2*US%Z_to_L*CS%visc%tauy_shelf(i,J)
sfc_state%tauy_shelf(i,J) = US%RZ_T_to_kg_m2s*US%L_T_to_m_s*CS%visc%tauy_shelf(i,J)
enddo ; enddo
endif

Expand Down
12 changes: 6 additions & 6 deletions src/core/MOM_PressureForce_Montgomery.F90
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ subroutine PressureForce_Mont_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm, pb
do k=1,nz
call int_specific_vol_dp(tv%T(:,:,k), tv%S(:,:,k), p(:,:,k), p(:,:,k+1), &
0.0, G%HI, tv%eqn_of_state, dz_geo(:,:,k), halo_size=1, &
SV_scale=US%R_to_kg_m3, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
SV_scale=US%R_to_kg_m3, pres_scale=US%RL2_T2_to_Pa)
enddo
!$OMP parallel do default(shared)
do j=Jsq,Jeq+1 ; do k=1,nz ; do i=Isq,Ieq+1
Expand Down Expand Up @@ -660,7 +660,7 @@ subroutine Set_pbce_Bouss(e, tv, G, GV, US, Rho0, GFS_scale, pbce, rho_star)
press(i) = -Rho0xG*e(i,j,1)
enddo
call calculate_density(tv%T(:,j,1), tv%S(:,j,1), press, rho_in_situ, Isq, Ieq-Isq+2, &
tv%eqn_of_state, scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
tv%eqn_of_state, scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)
do i=Isq,Ieq+1
pbce(i,j,1) = G_Rho0*(GFS_scale * rho_in_situ(i)) * GV%H_to_Z
enddo
Expand All @@ -671,7 +671,7 @@ subroutine Set_pbce_Bouss(e, tv, G, GV, US, Rho0, GFS_scale, pbce, rho_star)
S_int(i) = 0.5*(tv%S(i,j,k-1)+tv%S(i,j,k))
enddo
call calculate_density_derivs(T_int, S_int, press, dR_dT, dR_dS, Isq, Ieq-Isq+2, &
tv%eqn_of_state, scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
tv%eqn_of_state, scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)
do i=Isq,Ieq+1
pbce(i,j,k) = pbce(i,j,k-1) + G_Rho0 * &
((e(i,j,K) - e(i,j,nz+1)) * Ihtot(i)) * &
Expand Down Expand Up @@ -757,7 +757,7 @@ subroutine Set_pbce_nonBouss(p, tv, G, GV, US, GFS_scale, pbce, alpha_star)
do j=Jsq,Jeq+1
call calculate_density(tv%T(:,j,nz), tv%S(:,j,nz), p(:,j,nz+1), rho_in_situ, &
Isq, Ieq-Isq+2, tv%eqn_of_state, scale=US%kg_m3_to_R, &
pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
pres_scale=US%RL2_T2_to_Pa)
do i=Isq,Ieq+1
C_htot(i,j) = dP_dH / ((p(i,j,nz+1)-p(i,j,1)) + dp_neglect)
pbce(i,j,nz) = dP_dH / (rho_in_situ(i))
Expand All @@ -768,10 +768,10 @@ subroutine Set_pbce_nonBouss(p, tv, G, GV, US, GFS_scale, pbce, alpha_star)
S_int(i) = 0.5*(tv%S(i,j,k)+tv%S(i,j,k+1))
enddo
call calculate_density(T_int, S_int, p(:,j,k+1), rho_in_situ, Isq, Ieq-Isq+2, tv%eqn_of_state, &
scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)
call calculate_density_derivs(T_int, S_int, p(:,j,k+1), dR_dT, dR_dS, &
Isq, Ieq-Isq+2, tv%eqn_of_state, &
scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)
do i=Isq,Ieq+1
pbce(i,j,k) = pbce(i,j,k+1) + ((p(i,j,K+1)-p(i,j,1))*C_htot(i,j)) * &
((dR_dT(i)*(tv%T(i,j,k+1)-tv%T(i,j,k)) + &
Expand Down
12 changes: 6 additions & 6 deletions src/core/MOM_PressureForce_analytic_FV.F90
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ subroutine PressureForce_AFV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p
p(:,:,K), p(:,:,K+1), alpha_ref, dp_neglect, p(:,:,nz+1), G%HI, &
tv%eqn_of_state, dza(:,:,k), intp_dza(:,:,k), &
intx_dza(:,:,k), inty_dza(:,:,k), useMassWghtInterp=CS%useMassWghtInterp, &
SV_scale=US%R_to_kg_m3, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
SV_scale=US%R_to_kg_m3, pres_scale=US%RL2_T2_to_Pa)
elseif ( CS%Recon_Scheme == 2 ) then
call MOM_error(FATAL, "PressureForce_AFV_nonBouss: "//&
"int_spec_vol_dp_generic_ppm does not exist yet.")
Expand All @@ -281,7 +281,7 @@ subroutine PressureForce_AFV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p
dza(:,:,k), intp_dza(:,:,k), intx_dza(:,:,k), &
inty_dza(:,:,k), bathyP=p(:,:,nz+1), dP_tiny=dp_neglect, &
useMassWghtInterp=CS%useMassWghtInterp, &
SV_scale=US%R_to_kg_m3, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
SV_scale=US%R_to_kg_m3, pres_scale=US%RL2_T2_to_Pa)
endif
else
alpha_anom = 1.0 / GV%Rlay(k) - alpha_ref
Expand Down Expand Up @@ -336,7 +336,7 @@ subroutine PressureForce_AFV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p
!$OMP parallel do default(shared) private(rho_in_situ)
do j=Jsq,Jeq+1
call calculate_density(tv_tmp%T(:,j,1), tv_tmp%S(:,j,1), p(:,j,1), rho_in_situ, Isq, Ieq-Isq+2, &
tv%eqn_of_state, scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
tv%eqn_of_state, scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)

do i=Isq,Ieq+1
dM(i,j) = (CS%GFS_scale - 1.0) * (p(i,j,1)*(1.0/rho_in_situ(i) - alpha_ref) + za(i,j))
Expand Down Expand Up @@ -670,18 +670,18 @@ subroutine PressureForce_AFV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_at
call int_density_dz_generic_plm( T_t(:,:,k), T_b(:,:,k), S_t(:,:,k), S_b(:,:,k),&
e(:,:,K), e(:,:,K+1), rho_ref, CS%Rho0, GV%g_Earth, dz_neglect, G%bathyT, G%HI, G%HI, &
tv%eqn_of_state, dpa, intz_dpa, intx_dpa, inty_dpa, useMassWghtInterp=CS%useMassWghtInterp, &
rho_scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
rho_scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)
elseif ( CS%Recon_Scheme == 2 ) then
call int_density_dz_generic_ppm( tv%T(:,:,k), T_t(:,:,k), T_b(:,:,k), &
tv%S(:,:,k), S_t(:,:,k), S_b(:,:,k), e(:,:,K), e(:,:,K+1), rho_ref, CS%Rho0, &
GV%g_Earth, G%HI, G%HI, tv%eqn_of_state, dpa, intz_dpa, intx_dpa, inty_dpa, &
rho_scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
rho_scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)
endif
else
call int_density_dz(tv_tmp%T(:,:,k), tv_tmp%S(:,:,k), e(:,:,K), e(:,:,K+1), &
rho_ref, CS%Rho0, GV%g_Earth, G%HI, G%HI, tv%eqn_of_state, &
dpa, intz_dpa, intx_dpa, inty_dpa, G%bathyT, dz_neglect, CS%useMassWghtInterp, &
rho_scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
rho_scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)
endif
!$OMP parallel do default(shared)
do j=Jsq,Jeq+1 ; do i=Isq,Ieq+1
Expand Down
10 changes: 5 additions & 5 deletions src/core/MOM_PressureForce_blocked_AFV.F90
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ subroutine PressureForce_blk_AFV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm,
dza(:,:,k), intp_dza(:,:,k), intx_dza(:,:,k), &
inty_dza(:,:,k), bathyP=p(:,:,nz+1), dP_tiny=dp_neglect, &
useMassWghtInterp=CS%useMassWghtInterp, &
SV_scale=US%R_to_kg_m3, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
SV_scale=US%R_to_kg_m3, pres_scale=US%RL2_T2_to_Pa)
else
alpha_anom = 1.0 / GV%Rlay(k) - alpha_ref
do j=Jsq,Jeq+1 ; do i=Isq,Ieq+1
Expand Down Expand Up @@ -303,7 +303,7 @@ subroutine PressureForce_blk_AFV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm,
!$OMP parallel do default(shared) private(rho_in_situ)
do j=Jsq,Jeq+1
call calculate_density(tv_tmp%T(:,j,1), tv_tmp%S(:,j,1), p(:,j,1), rho_in_situ, Isq, Ieq-Isq+2, &
tv%eqn_of_state, scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
tv%eqn_of_state, scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)

do i=Isq,Ieq+1
dM(i,j) = (CS%GFS_scale - 1.0) * (p(i,j,1)*(1.0/rho_in_situ(i) - alpha_ref) + za(i,j))
Expand Down Expand Up @@ -670,20 +670,20 @@ subroutine PressureForce_blk_AFV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp,
e(:,:,K), e(:,:,K+1), rho_ref, CS%Rho0, GV%g_Earth, dz_neglect, G%bathyT, G%HI, &
G%Block(n), tv%eqn_of_state, dpa_bk, intz_dpa_bk, intx_dpa_bk, inty_dpa_bk, &
useMassWghtInterp=CS%useMassWghtInterp, &
rho_scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
rho_scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)
elseif ( CS%Recon_Scheme == 2 ) then
call int_density_dz_generic_ppm( tv%T(:,:,k), T_t(:,:,k), T_b(:,:,k), &
tv%S(:,:,k), S_t(:,:,k), S_b(:,:,k), e(:,:,K), e(:,:,K+1), rho_ref, CS%Rho0, &
GV%g_Earth, G%HI, G%Block(n), tv%eqn_of_state, dpa_bk, intz_dpa_bk, &
intx_dpa_bk, inty_dpa_bk, &
rho_scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
rho_scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)
endif
else
call int_density_dz(tv_tmp%T(:,:,k), tv_tmp%S(:,:,k), e(:,:,K), e(:,:,K+1), &
rho_ref, CS%Rho0, GV%g_Earth, G%HI, G%Block(n), tv%eqn_of_state, &
dpa_bk, intz_dpa_bk, intx_dpa_bk, inty_dpa_bk, &
G%bathyT, dz_neglect, CS%useMassWghtInterp, &
rho_scale=US%kg_m3_to_R, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
rho_scale=US%kg_m3_to_R, pres_scale=US%RL2_T2_to_Pa)
endif
do jb=Jsq_bk,Jeq_bk+1 ; do ib=Isq_bk,Ieq_bk+1
intz_dpa_bk(ib,jb) = intz_dpa_bk(ib,jb)*GV%Z_to_H
Expand Down
12 changes: 6 additions & 6 deletions src/core/MOM_forcing_type.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ subroutine MOM_mech_forcing_chksum(mesg, forces, G, US, haloshift)
! and js...je as their extent.
if (associated(forces%taux) .and. associated(forces%tauy)) &
call uvchksum(mesg//" forces%tau[xy]", forces%taux, forces%tauy, G%HI, &
haloshift=hshift, symmetric=.true., scale=US%R_to_kg_m3*US%L_T_to_m_s**2*US%Z_to_L)
haloshift=hshift, symmetric=.true., scale=US%RZ_T_to_kg_m2s*US%L_T_to_m_s)
if (associated(forces%p_surf)) &
call hchksum(forces%p_surf, mesg//" forces%p_surf",G%HI,haloshift=hshift)
if (associated(forces%ustar)) &
Expand Down Expand Up @@ -1230,17 +1230,17 @@ subroutine register_forcing_type_diags(Time, diag, US, use_temperature, handles,

handles%id_taux = register_diag_field('ocean_model', 'taux', diag%axesCu1, Time, &
'Zonal surface stress from ocean interactions with atmos and ice', &
'Pa', conversion=US%R_to_kg_m3*US%L_T_to_m_s**2*US%Z_to_L, &
'Pa', conversion=US%RZ_T_to_kg_m2s*US%L_T_to_m_s, &
standard_name='surface_downward_x_stress', cmor_field_name='tauuo', &
cmor_units='N m-2', cmor_long_name='Surface Downward X Stress', &
cmor_standard_name='surface_downward_x_stress')

handles%id_tauy = register_diag_field('ocean_model', 'tauy', diag%axesCv1, Time, &
'Meridional surface stress ocean interactions with atmos and ice', &
'Pa', conversion=US%R_to_kg_m3*US%L_T_to_m_s**2*US%Z_to_L, &
standard_name='surface_downward_y_stress', cmor_field_name='tauvo', &
cmor_units='N m-2', cmor_long_name='Surface Downward Y Stress', &
cmor_standard_name='surface_downward_y_stress')
'Pa', conversion=US%RZ_T_to_kg_m2s*US%L_T_to_m_s, &
standard_name='surface_downward_y_stress', cmor_field_name='tauvo', &
cmor_units='N m-2', cmor_long_name='Surface Downward Y Stress', &
cmor_standard_name='surface_downward_y_stress')

handles%id_ustar = register_diag_field('ocean_model', 'ustar', diag%axesT1, Time, &
'Surface friction velocity = [(gustiness + tau_magnitude)/rho0]^(1/2)', &
Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_interface_heights.F90
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ subroutine find_eta_3d(h, tv, G, GV, US, eta, eta_bt, halo_size, eta_to_m)
do k=1,nz
call int_specific_vol_dp(tv%T(:,:,k), tv%S(:,:,k), p(:,:,K), p(:,:,K+1), &
0.0, G%HI, tv%eqn_of_state, dz_geo(:,:,k), halo_size=halo, &
SV_scale=US%R_to_kg_m3, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
SV_scale=US%R_to_kg_m3, pres_scale=US%RL2_T2_to_Pa)
enddo
!$OMP do
do j=jsv,jev
Expand Down Expand Up @@ -210,7 +210,7 @@ subroutine find_eta_2d(h, tv, G, GV, US, eta, eta_bt, halo_size, eta_to_m)
do k = 1, nz
call int_specific_vol_dp(tv%T(:,:,k), tv%S(:,:,k), p(:,:,k), p(:,:,k+1), 0.0, &
G%HI, tv%eqn_of_state, dz_geo(:,:,k), halo_size=halo, &
SV_scale=US%R_to_kg_m3, pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
SV_scale=US%R_to_kg_m3, pres_scale=US%RL2_T2_to_Pa)
enddo
!$OMP do
do j=js,je ; do k=1,nz ; do i=is,ie
Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_isopycnal_slopes.F90
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ subroutine calc_isoneutral_slopes(G, GV, US, h, e, tv, dt_kappa_smooth, &
enddo
call calculate_density_derivs(T_u, S_u, pres_u, drho_dT_u, &
drho_dS_u, (is-IsdB+1)-1, ie-is+2, tv%eqn_of_state, scale=US%kg_m3_to_R, &
pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
pres_scale=US%RL2_T2_to_Pa)
endif

do I=is-1,ie
Expand Down Expand Up @@ -264,7 +264,7 @@ subroutine calc_isoneutral_slopes(G, GV, US, h, e, tv, dt_kappa_smooth, &
enddo
call calculate_density_derivs(T_v, S_v, pres_v, drho_dT_v, &
drho_dS_v, is, ie-is+1, tv%eqn_of_state, scale=US%kg_m3_to_R, &
pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
pres_scale=US%RL2_T2_to_Pa)
endif
do i=is,ie
if (use_EOS) then
Expand Down
4 changes: 2 additions & 2 deletions src/diagnostics/MOM_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ subroutine calculate_vertical_integrals(h, tv, p_surf, G, GV, US, CS)
enddo ; enddo
call int_density_dz(tv%T(:,:,k), tv%S(:,:,k), z_top, z_bot, 0.0, GV%Rho0, GV%g_Earth, &
G%HI, G%HI, tv%eqn_of_state, dpress, rho_scale=US%kg_m3_to_R, &
pres_scale=US%R_to_kg_m3*US%L_T_to_m_s**2)
pres_scale=US%RL2_T2_to_Pa)
do j=js,je ; do i=is,ie
mass(i,j) = mass(i,j) + dpress(i,j) * IG_Earth
enddo ; enddo
Expand Down Expand Up @@ -1732,7 +1732,7 @@ subroutine MOM_diagnostics_init(MIS, ADp, CDp, Time, G, GV, US, param_file, diag
'The height of the water column', 'm', conversion=US%Z_to_m)
CS%id_pbo = register_diag_field('ocean_model', 'pbo', diag%axesT1, Time, &
long_name='Sea Water Pressure at Sea Floor', standard_name='sea_water_pressure_at_sea_floor', &
units='Pa', conversion=US%R_to_kg_m3*US%L_T_to_m_s**2)
units='Pa', conversion=US%RL2_T2_to_Pa)

call set_dependent_diagnostics(MIS, ADp, CDp, G, CS)

Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/lateral/MOM_mixed_layer_restrat.F90
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ subroutine mixedlayer_restrat_general(h, uhtr, vhtr, tv, forces, dt, MLD_in, Var
call hchksum(forces%ustar,'mixed_layer_restrat: u*', G%HI, haloshift=1, scale=US%Z_to_m*US%s_to_T)
call hchksum(MLD_fast,'mixed_layer_restrat: MLD', G%HI, haloshift=1, scale=GV%H_to_m)
call hchksum(Rml_av_fast,'mixed_layer_restrat: rml', G%HI, haloshift=1, &
scale=US%m_to_Z*US%L_to_m**2*US%s_to_T**2)
scale=US%m_to_Z*US%L_T_to_m_s**2)
endif

! TO DO:
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/vertical/MOM_internal_tide_input.F90
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ subroutine set_int_tide_input(u, v, h, tv, fluxes, itide, dt, G, GV, US, CS)
if (CS%debug) then
call hchksum(N2_bot,"N2_bot",G%HI,haloshift=0, scale=US%s_to_T**2)
call hchksum(itide%TKE_itidal_input,"TKE_itidal_input",G%HI,haloshift=0, &
scale=US%R_to_kg_m3*US%Z_to_m**3*US%s_to_T**3)
scale=US%RZ3_T3_to_W_m2)
endif

if (CS%id_TKE_itidal > 0) call post_data(CS%id_TKE_itidal, itide%TKE_itidal_input, CS%diag)
Expand Down Expand Up @@ -349,7 +349,7 @@ subroutine int_tide_input_init(Time, G, GV, US, param_file, diag, CS, itide)
call get_param(param_file, mdl, "TKE_ITIDE_MAX", CS%TKE_itide_max, &
"The maximum internal tide energy source available to mix "//&
"above the bottom boundary layer with INT_TIDE_DISSIPATION.", &
units="W m-2", default=1.0e3, scale=US%kg_m3_to_R*US%m_to_Z**3*US%T_to_s**3)
units="W m-2", default=1.0e3, scale=US%W_m2_to_RZ3_T3)

call get_param(param_file, mdl, "READ_TIDEAMP", read_tideamp, &
"If true, read a file (given by TIDEAMP_FILE) containing "//&
Expand Down
11 changes: 5 additions & 6 deletions src/parameterizations/vertical/MOM_set_diffusivity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
call get_param(param_file, mdl, "KD_SMOOTH", CS%Kd_smooth, &
"A diapycnal diffusivity that is used to interpolate "//&
"more sensible values of T & S into thin layers.", &
default=1.0e-6, scale=US%m_to_Z**2*US%T_to_s)
units="m2 s-1", default=1.0e-6, scale=US%m2_s_to_Z2_T)

call get_param(param_file, mdl, "DEBUG", CS%debug, &
"If true, write out verbose debugging data.", &
Expand All @@ -2096,19 +2096,18 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_

call get_param(param_file, mdl, "DISSIPATION_MIN", CS%dissip_min, &
"The minimum dissipation by which to determine a lower "//&
"bound of Kd (a floor).", units="W m-3", default=0.0, &
scale=US%kg_m3_to_R*US%m2_s_to_Z2_T*(US%T_to_s**2))
"bound of Kd (a floor).", &
units="W m-3", default=0.0, scale=US%W_m2_to_RZ3_T3*US%Z_to_m)
call get_param(param_file, mdl, "DISSIPATION_N0", CS%dissip_N0, &
"The intercept when N=0 of the N-dependent expression "//&
"used to set a minimum dissipation by which to determine "//&
"a lower bound of Kd (a floor): A in eps_min = A + B*N.", &
units="W m-3", default=0.0, &
scale=US%kg_m3_to_R*US%m2_s_to_Z2_T*(US%T_to_s**2))
units="W m-3", default=0.0, scale=US%W_m2_to_RZ3_T3*US%Z_to_m)
call get_param(param_file, mdl, "DISSIPATION_N1", CS%dissip_N1, &
"The coefficient multiplying N, following Gargett, used to "//&
"set a minimum dissipation by which to determine a lower "//&
"bound of Kd (a floor): B in eps_min = A + B*N", &
units="J m-3", default=0.0, scale=US%kg_m3_to_R*US%m2_s_to_Z2_T*US%T_to_s)
units="J m-3", default=0.0, scale=US%W_m2_to_RZ3_T3*US%Z_to_m*US%s_to_T)
call get_param(param_file, mdl, "DISSIPATION_KD_MIN", CS%dissip_Kd_min, &
"The minimum vertical diffusivity applied as a floor.", &
units="m2 s-1", default=0.0, scale=US%m2_s_to_Z2_T)
Expand Down
Loading

0 comments on commit 6d7dde4

Please sign in to comment.