Skip to content

Commit

Permalink
Documented 288 parameterization variable units
Browse files Browse the repository at this point in the history
  Changed comments to use the square bracket notation to document the units of
about 288 variables in the parameterization directories, many of them
diffusivities, energy budget terms or nondimensional ratios.  Only comments have
been changed and all answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Jan 29, 2019
1 parent c2473a7 commit bf1fa4b
Show file tree
Hide file tree
Showing 21 changed files with 312 additions and 305 deletions.
32 changes: 16 additions & 16 deletions src/parameterizations/lateral/MOM_MEKE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,40 +31,40 @@ module MOM_MEKE
!> Control structure that contains MEKE parameters and diagnostics handles
type, public :: MEKE_CS ; private
! Parameters
real :: MEKE_FrCoeff !< Efficiency of conversion of ME into MEKE (non-dim)
real :: MEKE_GMcoeff !< Efficiency of conversion of PE into MEKE (non-dim)
real :: MEKE_FrCoeff !< Efficiency of conversion of ME into MEKE [nondim]
real :: MEKE_GMcoeff !< Efficiency of conversion of PE into MEKE [nondim]
real :: MEKE_damping !< Local depth-independent MEKE dissipation rate [s-1].
real :: MEKE_Cd_scale !< The ratio of the bottom eddy velocity to the column mean
!! eddy velocity, i.e. sqrt(2*MEKE). This should be less than 1
!! to account for the surface intensification of MEKE.
real :: MEKE_Cb !< Coefficient in the \f$\gamma_{bot}\f$ expression (non-dim)
real :: MEKE_min_gamma!< Minimum value of gamma_b^2 allowed (non-dim)
real :: MEKE_Ct !< Coefficient in the \f$\gamma_{bt}\f$ expression (non-dim)
real :: MEKE_Cb !< Coefficient in the \f$\gamma_{bot}\f$ expression [nondim]
real :: MEKE_min_gamma!< Minimum value of gamma_b^2 allowed [nondim]
real :: MEKE_Ct !< Coefficient in the \f$\gamma_{bt}\f$ expression [nondim]
logical :: visc_drag !< If true use the vertvisc_type to calculate bottom drag.
logical :: Rd_as_max_scale !< If true the length scale can not exceed the
!! first baroclinic deformation radius.
logical :: use_old_lscale !< Use the old formula for mixing length scale.
real :: cdrag !< The bottom drag coefficient for MEKE (non-dim).
real :: cdrag !< The bottom drag coefficient for MEKE [nondim].
real :: MEKE_BGsrc !< Background energy source for MEKE [W kg-1] (= m2 s-3).
real :: MEKE_dtScale !< Scale factor to accelerate time-stepping (non-dim.)
real :: MEKE_KhCoeff !< Scaling factor to convert MEKE into Kh (non-dim.)
real :: MEKE_dtScale !< Scale factor to accelerate time-stepping [nondim]
real :: MEKE_KhCoeff !< Scaling factor to convert MEKE into Kh [nondim]
real :: MEKE_Uscale !< MEKE velocity scale for bottom drag [m s-1]
real :: MEKE_KH !< Background lateral diffusion of MEKE [m2 s-1]
real :: MEKE_K4 !< Background bi-harmonic diffusivity (of MEKE) [m4 s-1]
real :: KhMEKE_Fac !< A factor relating MEKE%Kh to the diffusivity used for
!! MEKE itself (nondimensional).
!! MEKE itself [nondim].
real :: viscosity_coeff !< The scaling coefficient in the expression for
!! viscosity used to parameterize lateral momentum mixing
!! by unresolved eddies represented by MEKE.
real :: Lfixed !< Fixed mixing length scale [m].
real :: aDeform !< Weighting towards deformation scale of mixing length (non-dim.)
real :: aRhines !< Weighting towards Rhines scale of mixing length (non-dim.)
real :: aFrict !< Weighting towards frictional arrest scale of mixing length (non-dim.)
real :: aEady !< Weighting towards Eady scale of mixing length (non-dim.)
real :: aGrid !< Weighting towards grid scale of mixing length (non-dim.)
real :: MEKE_advection_factor !< A scaling in front of the advection of MEKE (non-dim.)
real :: aDeform !< Weighting towards deformation scale of mixing length [nondim]
real :: aRhines !< Weighting towards Rhines scale of mixing length [nondim]
real :: aFrict !< Weighting towards frictional arrest scale of mixing length [nondim]
real :: aEady !< Weighting towards Eady scale of mixing length [nondim]
real :: aGrid !< Weighting towards grid scale of mixing length [nondim]
real :: MEKE_advection_factor !< A scaling in front of the advection of MEKE [nondim]
real :: MEKE_topographic_beta !< Weight for how much topographic beta is considered
!! when computing beta in Rhines scale (non-dim.)
!! when computing beta in Rhines scale [nondim]
logical :: initialize !< If True, invokes a steady state solver to calculate MEKE.
logical :: debug !< If true, write out checksums of data for debugging

Expand Down
17 changes: 8 additions & 9 deletions src/parameterizations/lateral/MOM_internal_tides.F90
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ module MOM_internal_tides
!! summed over angle, frequency and mode [W m-2]
real, allocatable, dimension(:,:) :: tot_allprocesses_loss !< Energy loss rates due to all processes,
!! summed over angle, frequency and mode [W m-2]
real :: q_itides !< fraction of local dissipation (nondimensional)
real :: q_itides !< fraction of local dissipation [nondim]
real :: En_sum !< global sum of energy for use in debugging
type(time_type), pointer :: Time => NULL() !< A pointer to the model's clock.
character(len=200) :: inputdir !< directory to look for coastline angle file
real :: decay_rate !< A constant rate at which internal tide energy is
!! lost to the interior ocean internal wave field.
real :: cdrag !< The bottom drag coefficient (non-dim).
real :: cdrag !< The bottom drag coefficient [nondim].
logical :: apply_background_drag
!< If true, apply a drag due to background processes as a sink.
logical :: apply_bottom_drag
Expand Down Expand Up @@ -632,7 +632,7 @@ subroutine itidal_lowmode_loss(G, US, CS, Nb, Ub, En, TKE_loss_fixed, TKE_loss,
intent(inout) :: Ub !< RMS (over one period) near-bottom horizontal
!! mode velocity [m s-1].
real, dimension(G%isd:G%ied,G%jsd:G%jed), &
intent(in) :: TKE_loss_fixed !< Fixed part of energy loss [kg Z-2 ~> kg m-2]
intent(in) :: TKE_loss_fixed !< Fixed part of energy loss [kg Z-2 ~> kg m-2]
!! (rho*kappa*h^2).
real, dimension(G%isd:G%ied,G%jsd:G%jed,CS%NAngle,CS%nFreq,CS%nMode), &
intent(inout) :: En !< Energy density of the internal waves [J m-2].
Expand Down Expand Up @@ -1358,12 +1358,12 @@ subroutine propagate_x(En, speed_x, Cgx_av, dCgx, dt, G, Nangle, CS, LB)
real, dimension(SZI_(G),SZJ_(G)) :: &
EnL, EnR ! Left and right face energy densities [J m-2].
real, dimension(SZIB_(G),SZJ_(G)) :: &
flux_x ! The internal wave energy flux, in J s-1.
flux_x ! The internal wave energy flux [J s-1].
real, dimension(SZIB_(G)) :: &
cg_p, cg_m, flux1, flux2
!real, dimension(SZI_(G),SZJB_(G),Nangle) :: En_m, En_p
real, dimension(SZI_(G),SZJB_(G),Nangle) :: &
Fdt_m, Fdt_p! Left and right energy fluxes, in J
Fdt_m, Fdt_p! Left and right energy fluxes [J]
integer :: i, j, k, ish, ieh, jsh, jeh, a

ish = LB%ish ; ieh = LB%ieh ; jsh = LB%jsh ; jeh = LB%jeh
Expand Down Expand Up @@ -1441,12 +1441,12 @@ subroutine propagate_y(En, speed_y, Cgy_av, dCgy, dt, G, Nangle, CS, LB)
real, dimension(SZI_(G),SZJ_(G)) :: &
EnL, EnR ! South and north face energy densities [J m-2].
real, dimension(SZI_(G),SZJB_(G)) :: &
flux_y ! The internal wave energy flux, in J s-1.
flux_y ! The internal wave energy flux [J s-1].
real, dimension(SZI_(G)) :: &
cg_p, cg_m, flux1, flux2
!real, dimension(SZI_(G),SZJB_(G),Nangle) :: En_m, En_p
real, dimension(SZI_(G),SZJB_(G),Nangle) :: &
Fdt_m, Fdt_p! South and north energy fluxes, in J
Fdt_m, Fdt_p! South and north energy fluxes [J]
character(len=160) :: mesg ! The text of an error message
integer :: i, j, k, ish, ieh, jsh, jeh, a

Expand Down Expand Up @@ -1562,8 +1562,7 @@ subroutine merid_flux_En(v, h, hL, hR, vh, dt, G, J, ish, ieh, vol_CFL)
!! reconstruction [J m-2].
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: hR !< Right- Energy densities in the
!! reconstruction [J m-2].
real, dimension(SZI_(G)), intent(inout) :: vh !< The meridional energy transport,
!! in J s-1.
real, dimension(SZI_(G)), intent(inout) :: vh !< The meridional energy transport [J s-1].
real, intent(in) :: dt !< Time increment [s].
integer, intent(in) :: J !< The j-index to work on.
integer, intent(in) :: ish !< The start i-index range to work on.
Expand Down
10 changes: 5 additions & 5 deletions src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module MOM_lateral_mixing_coeffs
integer :: Res_fn_power_visc !< The power of dx/Ld in the Kh resolution function. Any
!! positive integer power may be used, but even powers
!! and especially 2 are coded to be more efficient.
real :: Visbeck_S_max !< Upper bound on slope used in Eady growth rate (nondim).
real :: Visbeck_S_max !< Upper bound on slope used in Eady growth rate [nondim].

! Diagnostics
!>@{
Expand Down Expand Up @@ -174,7 +174,7 @@ subroutine calc_resoln_function(h, tv, G, GV, US, CS)
endif

! Calculate and store the ratio between deformation radius and grid-spacing
! at h-points (non-dimensional).
! at h-points [nondim].
if (CS%calculate_rd_dx) then
if (.not. associated(CS%Rd_dx_h)) call MOM_error(FATAL, &
"calc_resoln_function: %Rd_dx_h is not associated with calculate_rd_dx.")
Expand Down Expand Up @@ -578,12 +578,12 @@ subroutine calc_slope_functions_using_just_e(h, G, GV, US, CS, e, calculate_slop
type(verticalGrid_type), intent(in) :: GV !< Vertical grid structure
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
type(VarMix_CS), pointer :: CS !< Variable mixing coefficients
real, dimension(SZI_(G),SZJ_(G),SZK_(G)+1), intent(in) :: e !< Interface position (m)
real, dimension(SZI_(G),SZJ_(G),SZK_(G)+1), intent(in) :: e !< Interface position [Z ~> m]
logical, intent(in) :: calculate_slopes !< If true, calculate slopes internally
!! otherwise use slopes stored in CS
! Local variables
real :: E_x(SZIB_(G), SZJ_(G)) ! X-slope of interface at u points (for diagnostics)
real :: E_y(SZI_(G), SZJB_(G)) ! Y-slope of interface at v points (for diagnostics)
real :: E_x(SZIB_(G), SZJ_(G)) ! X-slope of interface at u points [nondim] (for diagnostics)
real :: E_y(SZI_(G), SZJB_(G)) ! Y-slope of interface at v points [nondim] (for diagnostics)
real :: H_cutoff ! Local estimate of a minimum thickness for masking [H ~> m or kg m-2]
real :: h_neglect ! A thickness that is so small it is usually lost
! in roundoff and can be neglected [H ~> m or kg m-2].
Expand Down
Loading

0 comments on commit bf1fa4b

Please sign in to comment.