Skip to content

Commit

Permalink
Corrected many unit descriptions in comments
Browse files Browse the repository at this point in the history
  Corrected the descriptions of the units of about 113 variables spread across
30 files.  These were either inconsistent unit descriptions or descriptions
using a non-standard syntax.  Only comments are changed, and all answers are
bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Jan 13, 2025
1 parent 82d44fb commit bf8366e
Show file tree
Hide file tree
Showing 30 changed files with 120 additions and 113 deletions.
2 changes: 1 addition & 1 deletion src/ALE/MOM_ALE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ subroutine ALE_remap_tracers(CS, G, GV, h_old, h_new, Reg, debug, dt, PCM_cell)
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)) :: work_conc ! The rate of change of concentrations [Conc T-1 ~> Conc s-1]
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)) :: work_cont ! The rate of change of cell-integrated tracer
! content [Conc H T-1 ~> Conc m s-1 or Conc kg m-2 s-1] or
! cell thickness [H T-1 ~> m s-1 or Conc kg m-2 s-1]
! cell thickness [H T-1 ~> m s-1 or kg m-2 s-1]
real, dimension(SZI_(G),SZJ_(G)) :: work_2d ! The rate of change of column-integrated tracer
! content [Conc H T-1 ~> Conc m s-1 or Conc kg m-2 s-1]
logical :: PCM(GV%ke) ! If true, do PCM remapping from a cell.
Expand Down
2 changes: 1 addition & 1 deletion src/ALE/MOM_regridding.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ subroutine setCoordinateResolution( dz, CS, scale )
type(regridding_CS), intent(inout) :: CS !< Regridding control structure
real, optional, intent(in) :: scale !< A scaling factor converting dz to the internal represetation
!! of coordRes, in various units that depend on the coordinate,
!! such as [Z m-1 ~> 1 for a z-coordinate or [R m3 kg-1 ~> 1] for
!! such as [Z m-1 ~> 1] for a z-coordinate or [R m3 kg-1 ~> 1] for
!! a density coordinate.

if (size(dz)/=CS%nk) call MOM_error( FATAL, &
Expand Down
2 changes: 1 addition & 1 deletion src/core/MOM_barotropic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
Datv ! Basin depth at v-velocity grid points times the x-grid
! spacing [H L ~> m2 or kg m-1].
real, dimension(:,:), pointer :: um2, uk1, vm2, vk1
! M2 and K1 velocities from the output of streaming filters [m s-1]
! M2 and K1 velocities from the output of streaming filters [L T-1 ~> m s-1]
real, target, dimension(SZIW_(CS),SZJW_(CS)) :: &
eta, & ! The barotropic free surface height anomaly or column mass
! anomaly [H ~> m or kg m-2]
Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_checksum_packages.F90
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ subroutine MOM_state_chksum_5arg(mesg, u, v, h, uh, vh, G, GV, US, haloshift, sy
logical, optional, intent(in) :: symmetric !< If true, do checksums on the fully symmetric
!! computational domain.
logical, optional, intent(in) :: omit_corners !< If true, avoid checking diagonal shifts
real, optional, intent(in) :: vel_scale !< The scaling factor to convert velocities to [m s-1]
real, optional, intent(in) :: vel_scale !< The scaling factor to convert velocities to [T m L-1 s-1 ~> 1]

real :: scale_vel ! The scaling factor to convert velocities to [m s-1]
real :: scale_vel ! The scaling factor to convert velocities to mks units [T m L-1 s-1 ~> 1]
logical :: sym
integer :: hs

Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_density_integrals.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ subroutine int_spec_vol_dp_generic_pcm(T, S, p_t, p_b, alpha_ref, HI, EOS, US, d
real :: S5((5*HI%isd+1):(5*(HI%ied+2))) ! Salinities along a line of subgrid locations [S ~> ppt]
real :: p5((5*HI%isd+1):(5*(HI%ied+2))) ! Pressures along a line of subgrid locations [R L2 T-2 ~> Pa]
real :: a5((5*HI%isd+1):(5*(HI%ied+2))) ! Specific volumes anomalies along a line of subgrid
! locations [R-1 ~> m3 kg-3]
! locations [R-1 ~> m3 kg-1]
real :: T15((15*HI%isd+1):(15*(HI%ied+1))) ! Temperatures at an array of subgrid locations [C ~> degC]
real :: S15((15*HI%isd+1):(15*(HI%ied+1))) ! Salinities at an array of subgrid locations [S ~> ppt]
real :: p15((15*HI%isd+1):(15*(HI%ied+1))) ! Pressures at an array of subgrid locations [R L2 T-2 ~> Pa]
Expand Down Expand Up @@ -1621,7 +1621,7 @@ subroutine int_spec_vol_dp_generic_plm(T_t, T_b, S_t, S_b, p_t, p_b, alpha_ref,
real :: S5((5*HI%iscB+1):(5*(HI%iecB+2))) ! Salinities along a line of subgrid locations [S ~> ppt]
real :: p5((5*HI%iscB+1):(5*(HI%iecB+2))) ! Pressures along a line of subgrid locations [R L2 T-2 ~> Pa]
real :: a5((5*HI%iscB+1):(5*(HI%iecB+2))) ! Specific volumes anomalies along a line of subgrid
! locations [R-1 ~> m3 kg-3]
! locations [R-1 ~> m3 kg-1]
real :: T15((15*HI%iscB+1):(15*(HI%iecB+1))) ! Temperatures at an array of subgrid locations [C ~> degC]
real :: S15((15*HI%iscB+1):(15*(HI%iecB+1))) ! Salinities at an array of subgrid locations [S ~> ppt]
real :: p15((15*HI%iscB+1):(15*(HI%iecB+1))) ! Pressures at an array of subgrid locations [R L2 T-2 ~> Pa]
Expand Down
2 changes: 1 addition & 1 deletion src/core/MOM_interface_heights.F90
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ subroutine find_col_avg_SpV(h, SpV_avg, tv, G, GV, US, halo_size)
integer, optional, intent(in) :: halo_size !< width of halo points on which to work

! Local variables
real :: h_tot(SZI_(G)) ! Sum of the layer thicknesses [H ~> m or kg m-3]
real :: h_tot(SZI_(G)) ! Sum of the layer thicknesses [H ~> m or kg m-2]
real :: SpV_x_h_tot(SZI_(G)) ! Vertical sum of the layer average specific volume times
! the layer thicknesses [H R-1 ~> m4 kg-1 or m]
real :: I_rho ! The inverse of the Boussiensq reference density [R-1 ~> m3 kg-1]
Expand Down
2 changes: 1 addition & 1 deletion src/diagnostics/MOM_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ subroutine MOM_diagnostics_init(MIS, ADp, CDp, Time, G, GV, US, param_file, diag
real :: wave_speed_tol ! The fractional tolerance for finding the wave speeds [nondim]
real :: convert_H ! A conversion factor from internal thickness units to the appropriate
! MKS units (m or kg m-2) for thicknesses depending on whether the
! Boussinesq approximation is being made [m H-1 or kg m-2 H-1 ~> 1]
! Boussinesq approximation is being made [m H-1 ~> 1] or [kg m-2 H-1 ~> 1]
logical :: better_speed_est ! If true, use a more robust estimate of the first
! mode wave speed as the starting point for iterations.
logical :: split ! True if using the barotropic-baroclinic split algorithm
Expand Down
6 changes: 3 additions & 3 deletions src/diagnostics/MOM_wave_speed.F90
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ subroutine wave_speed(h, tv, G, GV, US, cg1, CS, halo_size, use_ebt_mode, mono_N
S_int, & ! Salinity interpolated to interfaces [S ~> ppt]
H_top, & ! The distance of each filtered interface from the ocean surface [H ~> m or kg m-2]
H_bot, & ! The distance of each filtered interface from the bottom [H ~> m or kg m-2]
gprime ! The reduced gravity across each interface [L2 H-1 T-2 ~> m s-2 or m4 s-1 kg-1].
gprime ! The reduced gravity across each interface [L2 H-1 T-2 ~> m s-2 or m4 s-2 kg-1].
real, dimension(SZK_(GV)) :: &
Igl, Igu ! The inverse of the reduced gravity across an interface times
! the thickness of the layer below (Igl) or above (Igu) it, in [T2 L-2 ~> s2 m-2].
Expand Down Expand Up @@ -163,7 +163,7 @@ subroutine wave_speed(h, tv, G, GV, US, cg1, CS, halo_size, use_ebt_mode, mono_N
integer :: i, j, k, k2, itt, is, ie, js, je, nz, halo
real :: hw ! The mean of the adjacent layer thicknesses [H ~> m or kg m-2]
real :: sum_hc ! The sum of the layer thicknesses [H ~> m or kg m-2]
real :: gp ! A limited local copy of gprime [L2 H-1 T-2 ~> m s-2 or m4 s-1 kg-1]
real :: gp ! A limited local copy of gprime [L2 H-1 T-2 ~> m s-2 or m4 s-2 kg-1]
real :: N2min ! A minimum buoyancy frequency, including a slope rescaling factor [L2 H-2 T-2 ~> s-2 or m6 kg-2 s-2]
logical :: below_mono_N2_frac ! True if an interface is below the fractional depth where N2 should not increase.
logical :: below_mono_N2_depth ! True if an interface is below the absolute depth where N2 should not increase.
Expand Down Expand Up @@ -853,7 +853,7 @@ subroutine wave_speeds(h, tv, G, GV, US, nmodes, cn, CS, w_struct, u_struct, u_s
real :: drxh_sum ! The sum of density differences across interfaces times thicknesses [R H ~> kg m-2 or kg2 m-5]
real :: dSpVxh_sum ! The sum of specific volume differences across interfaces times
! thicknesses [R-1 H ~> m4 kg-1 or m], negative for stable stratification.
real :: g_Rho0 ! G_Earth/Rho0 [L2 T-2 H-1 R-1 ~> m4 s-2 kg-1 pr m7 s-2 kg-1].
real :: g_Rho0 ! G_Earth/Rho0 [L2 T-2 H-1 R-1 ~> m4 s-2 kg-1 or m7 s-2 kg-2].
real :: tol_Hfrac ! Layers that together are smaller than this fraction of
! the total water column can be merged for efficiency [nondim].
real :: min_h_frac ! tol_Hfrac divided by the total number of layers [nondim].
Expand Down
4 changes: 2 additions & 2 deletions src/ocean_data_assim/MOM_oda_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -675,9 +675,9 @@ subroutine apply_oda_tracer_increments(dt, Time_end, G, GV, tv, h, CS)
integer :: i, j
integer :: isc, iec, jsc, jec
real, dimension(SZI_(G),SZJ_(G),SZK_(G)) :: T_tend_inc !< an adjustment to the temperature
!! tendency [C T-1 -> degC s-1]
!! tendency [C T-1 ~> degC s-1]
real, dimension(SZI_(G),SZJ_(G),SZK_(G)) :: S_tend_inc !< an adjustment to the salinity
!! tendency [S T-1 -> ppt s-1]
!! tendency [S T-1 ~> ppt s-1]
real, dimension(SZI_(G),SZJ_(G),SZK_(CS%Grid)) :: T_tend !< The temperature tendency adjustment from
!! DA [C T-1 ~> degC s-1]
real, dimension(SZI_(G),SZJ_(G),SZK_(CS%Grid)) :: S_tend !< The salinity tendency adjustment from DA
Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/lateral/MOM_MEKE_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module MOM_MEKE_types
!! backscatter from unresolved eddies (see Jansen and Held, 2014).
real, allocatable :: Au(:,:) !< The MEKE-derived lateral biharmonic viscosity
!! coefficient [L4 T-1 ~> m4 s-1].
real, allocatable :: Le(:,:) !< Eddy length scale [L m]
real, allocatable :: Le(:,:) !< Eddy length scale [L ~> m]

! Parameters
real :: KhTh_fac = 1.0 !< Multiplier to map Kh(MEKE) to KhTh [nondim]
Expand Down
10 changes: 5 additions & 5 deletions src/parameterizations/lateral/MOM_hor_visc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
! at some points in the code it is not yet layer integrated, so is in [L2 T-2 ~> m2 s-2].
str_xx_GME,& ! smoothed diagonal term in the stress tensor from GME [L2 T-2 ~> m2 s-2]
bhstr_xx, & ! A copy of str_xx that only contains the biharmonic contribution [H L2 T-2 ~> m3 s-2 or kg s-2]
FrictWorkIntz, & ! depth integrated energy dissipated by lateral friction [R L2 T-3 ~> W m-2]
FrictWorkIntz_bh, & ! depth integrated energy dissipated by biharmonic lateral friction [R L2 T-3 ~> W m-2]
FrictWorkIntz, & ! depth integrated energy dissipated by lateral friction [R Z L2 T-3 ~> W m-2]
FrictWorkIntz_bh, & ! depth integrated energy dissipated by biharmonic lateral friction [R Z L2 T-3 ~> W m-2]
grad_vort_mag_h, & ! Magnitude of vorticity gradient at h-points [L-1 T-1 ~> m-1 s-1]
grad_vort_mag_h_2d, & ! Magnitude of 2d vorticity gradient at h-points [L-1 T-1 ~> m-1 s-1]
grad_div_mag_h, & ! Magnitude of divergence gradient at h-points [L-1 T-1 ~> m-1 s-1]
Expand Down Expand Up @@ -387,9 +387,9 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
Ah_h, & ! biharmonic viscosity at thickness points [L4 T-1 ~> m4 s-1]
Kh_h, & ! Laplacian viscosity at thickness points [L2 T-1 ~> m2 s-1]
dz, & ! Height change across layers [Z ~> m]
FrictWork, & ! work done by MKE dissipation mechanisms [R L2 T-3 ~> W m-2]
FrictWork_bh, & ! work done by the biharmonic MKE dissipation mechanisms [R L2 T-3 ~> W m-2]
FrictWork_GME, & ! work done by GME [R L2 T-3 ~> W m-2]
FrictWork, & ! work done by MKE dissipation mechanisms [R Z L2 T-3 ~> W m-2]
FrictWork_bh, & ! work done by the biharmonic MKE dissipation mechanisms [R Z L2 T-3 ~> W m-2]
FrictWork_GME, & ! work done by GME [R Z L2 T-3 ~> W m-2]
div_xx_h, & ! horizontal divergence [T-1 ~> s-1]
sh_xx_h, & ! horizontal tension (du/dx - dv/dy) including metric terms [T-1 ~> s-1]
NoSt, & ! A diagnostic array of normal stress [T-1 ~> s-1].
Expand Down
Loading

0 comments on commit bf8366e

Please sign in to comment.