Skip to content

Commit

Permalink
Document frequency units with square brackets
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 50 frequency, inverse timescale, or potential vorticity variables.  Only
comments have been changed and all answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Dec 21, 2018
1 parent dd34d00 commit 17c4608
Show file tree
Hide file tree
Showing 29 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion config_src/mct_driver/ocn_cap_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ subroutine ocn_export(ind, ocn_public, grid, o2x, dt_int, ncouple_per_day)
real, dimension(grid%isd:grid%ied,grid%jsd:grid%jed) :: ssh !< Local copy of sea_lev with updated halo
integer :: i, j, n, ig, jg !< Grid indices
real :: slp_L, slp_R, slp_C, slope, u_min, u_max
real :: I_time_int !< The inverse of coupling time interval in s-1.
real :: I_time_int !< The inverse of coupling time interval [s-1].

!-----------------------------------------------------------------------

Expand Down
14 changes: 7 additions & 7 deletions src/core/MOM_barotropic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -475,14 +475,14 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
! of H (m or kg m-2, the same as eta and h).

! These are always allocated with symmetric memory and wide halos.
real :: q(SZIBW_(CS),SZJBW_(CS)) ! A pseudo potential vorticity in s-1 m-1.
real :: q(SZIBW_(CS),SZJBW_(CS)) ! A pseudo potential vorticity [s-1 Z-1 ~> s-1 m-1].
real, dimension(SZIBW_(CS),SZJW_(CS)) :: &
ubt, & ! The zonal barotropic velocity [m s-1].
bt_rem_u, & ! The fraction of the barotropic zonal velocity that remains
! after a time step, the remainder being lost to bottom drag.
! bt_rem_u is a nondimensional number between 0 and 1.
BT_force_u, & ! The vertical average of all of the u-accelerations that are
! not explicitly included in the barotropic equation, m s-2.
! not explicitly included in the barotropic equation [m s-2].
u_accel_bt, & ! The difference between the zonal acceleration from the
! barotropic calculation and BT_force_u [m s-2].
uhbt, & ! The zonal barotropic thickness fluxes [H m2 s-1 ~> m3 s-1 or kg s-1].
Expand All @@ -503,7 +503,7 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
Cor_ref_u, & ! The zonal barotropic Coriolis acceleration due
! to the reference velocities [m s-2].
PFu, & ! The zonal pressure force acceleration [m s-2].
Rayleigh_u, & ! A Rayleigh drag timescale operating at u-points, in s-1.
Rayleigh_u, & ! A Rayleigh drag timescale operating at u-points [s-1].
PFu_bt_sum, & ! The summed zonal barotropic pressure gradient force [m s-2].
Coru_bt_sum, & ! The summed zonal barotropic Coriolis acceleration [m s-2].
DCor_u, & ! A simply averaged depth at u points [Z ~> m].
Expand All @@ -515,7 +515,7 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
! remains after a time step, the rest being lost to bottom
! drag. bt_rem_v is a nondimensional number between 0 and 1.
BT_force_v, & ! The vertical average of all of the v-accelerations that are
! not explicitly included in the barotropic equation, m s-2.
! not explicitly included in the barotropic equation [m s-2].
v_accel_bt, & ! The difference between the meridional acceleration from the
! barotropic calculation and BT_force_v [m s-2].
vhbt, & ! The meridional barotropic thickness fluxes [H m2 s-1 ~> m3 s-1 or kg s-1].
Expand All @@ -532,7 +532,7 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
Cor_ref_v, & ! The meridional barotropic Coriolis acceleration due
! to the reference velocities [m s-2].
PFv, & ! The meridional pressure force acceleration [m s-2].
Rayleigh_v, & ! A Rayleigh drag timescale operating at v-points, in s-1.
Rayleigh_v, & ! A Rayleigh drag timescale operating at v-points [s-1].
PFv_bt_sum, & ! The summed meridional barotropic pressure gradient force,
! [m s-2].
Corv_bt_sum, & ! The summed meridional barotropic Coriolis acceleration,
Expand Down Expand Up @@ -587,7 +587,7 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
real :: be_proj ! The fractional amount by which velocities are projected
! when project_velocity is true. For now be_proj is set
! to equal bebt, as they have similar roles and meanings.
real :: Idt ! The inverse of dt, in s-1.
real :: Idt ! The inverse of dt [s-1].
real :: det_de ! The partial derivative due to self-attraction and loading
! of the reference geopotential with the sea surface height.
! This is typically ~0.09 or less.
Expand Down Expand Up @@ -3654,7 +3654,7 @@ subroutine bt_mass_source(h, eta, set_cor, G, GV, CS)
real :: d_eta ! The difference between estimates of the total
! thicknesses [H ~> m or kg m-2].
real :: limit_dt ! The fractional mass-source limit divided by the
! thermodynamic time step, in s-1.
! thermodynamic time step [s-1].
integer :: is, ie, js, je, nz, i, j, k
real, parameter :: frac_cor = 0.25
real, parameter :: slow_rate = 0.125
Expand Down
12 changes: 6 additions & 6 deletions src/core/MOM_continuity_PPM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ subroutine zonal_mass_flux(u, h_in, uh, dt, G, GV, CS, LB, uhbt, OBC, &
real :: FA_u ! A sum of zonal face areas [H m ~> m2 or kg m-1].
real :: I_vrm ! 1.0 / visc_rem_max, nondim.
real :: CFL_dt ! The maximum CFL ratio of the adjusted velocities divided by
! the time step, in s-1.
real :: I_dt ! 1.0 / dt, in s-1.
! the time step [s-1].
real :: I_dt ! 1.0 / dt [s-1].
real :: du_lim ! The velocity change that give a relative CFL of 1 [m s-1].
real :: dx_E, dx_W ! Effective x-grid spacings to the east and west, in m.
integer :: i, j, k, ish, ieh, jsh, jeh, n, nz
Expand Down Expand Up @@ -946,7 +946,7 @@ subroutine set_zonal_BT_cont(u, h_in, h_L, h_R, BT_cont, uh_tot_0, duhdu_tot_0,
! of visc_rem from leading to large CFL numbers.
real :: CFL_min ! A minimal increment in the CFL to try to ensure that the
! flow is truly upwind, ND.
real :: Idt ! The inverse of the time step, in s-1.
real :: Idt ! The inverse of the time step [s-1].
logical :: domore
integer :: i, k, nz

Expand Down Expand Up @@ -1100,8 +1100,8 @@ subroutine meridional_mass_flux(v, h_in, vh, dt, G, GV, CS, LB, vhbt, OBC, &
visc_rem ! A 2-D copy of visc_rem_v or an array of 1's.
real :: I_vrm ! 1.0 / visc_rem_max, nondim.
real :: CFL_dt ! The maximum CFL ratio of the adjusted velocities divided by
! the time step, in s-1.
real :: I_dt ! 1.0 / dt, in s-1.
! the time step [s-1].
real :: I_dt ! 1.0 / dt [s-1].
real :: dv_lim ! The velocity change that give a relative CFL of 1 [m s-1].
real :: dy_N, dy_S ! Effective y-grid spacings to the north and south [m].
integer :: i, j, k, ish, ieh, jsh, jeh, n, nz
Expand Down Expand Up @@ -1765,7 +1765,7 @@ subroutine set_merid_BT_cont(v, h_in, h_L, h_R, BT_cont, vh_tot_0, dvhdv_tot_0,
! of visc_rem from leading to large CFL numbers.
real :: CFL_min ! A minimal increment in the CFL to try to ensure that the
! flow is truly upwind, ND.
real :: Idt ! The inverse of the time step, in s-1.
real :: Idt ! The inverse of the time step [s-1].
logical :: domore
integer :: i, k, nz

Expand Down
6 changes: 3 additions & 3 deletions src/core/MOM_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ module MOM_grid
Dblock_v, & !< Topographic depths at v-points at which the flow is blocked, in depth units.
Dopen_v !< Topographic depths at v-points at which the flow is open at width dx_Cv, in depth units.
real ALLOCABLE_, dimension(NIMEMB_PTR_,NJMEMB_PTR_) :: &
CoriolisBu !< The Coriolis parameter at corner points, in s-1.
CoriolisBu !< The Coriolis parameter at corner points [s-1].
real ALLOCABLE_, dimension(NIMEM_,NJMEM_) :: &
df_dx, & !< Derivative d/dx f (Coriolis parameter) at h-points, in s-1 m-1.
df_dy !< Derivative d/dy f (Coriolis parameter) at h-points, in s-1 m-1.
df_dx, & !< Derivative d/dx f (Coriolis parameter) at h-points [s-1 m-1].
df_dy !< Derivative d/dy f (Coriolis parameter) at h-points [s-1 m-1].
real :: g_Earth !< The gravitational acceleration [m s-2].

! These variables are global sums that are useful for 1-d diagnostics
Expand Down
6 changes: 3 additions & 3 deletions src/core/MOM_open_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ module MOM_open_boundary
!! the OB segment [m s-1].
real, pointer, dimension(:,:) :: eta=>NULL() !< The sea-surface elevation along the segment (m).
real, pointer, dimension(:,:,:) :: grad_normal=>NULL() !< The gradient of the normal flow along the
!! segment (s-1)
!! segment [s-1]
real, pointer, dimension(:,:,:) :: grad_tan=>NULL() !< The gradient of the tangential flow along the
!! segment (s-1)
!! segment [s-1]
real, pointer, dimension(:,:,:) :: grad_gradient=>NULL() !< The gradient of the gradient of tangential flow along the
!! segment (m-1 s-1)
real, pointer, dimension(:,:,:) :: rx_normal=>NULL() !< The rx_old_u value for radiation coeff
Expand All @@ -172,7 +172,7 @@ module MOM_open_boundary
real, pointer, dimension(:,:,:) :: nudged_tangential_vel=>NULL() !< The layer velocity tangential to the OB segment
!! that values should be nudged towards [m s-1].
real, pointer, dimension(:,:,:) :: nudged_tangential_grad=>NULL() !< The layer dvdx or dudy towards which nudging
!! can occur (s-1).
!! can occur [s-1].
type(segment_tracer_registry_type), pointer :: tr_Reg=> NULL()!< A pointer to the tracer registry for the segment.
type(hor_index_type) :: HI !< Horizontal index ranges
real :: Tr_InvLscale3_out !< An effective inverse length scale cubed (m-3)
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 @@ -1188,7 +1188,7 @@ subroutine post_surface_thermo_diags(IDs, G, GV, US, diag, dt_int, sfc_state, tv
real, dimension(SZI_(G),SZJ_(G)) :: work_2d ! A 2-d work array
real, dimension(SZI_(G),SZJ_(G)) :: &
zos ! dynamic sea lev (zero area mean) from inverse-barometer adjusted ssh (meter)
real :: I_time_int ! The inverse of the time interval in s-1.
real :: I_time_int ! The inverse of the time interval [s-1].
real :: zos_area_mean, volo, ssh_ga
integer :: i, j, is, ie, js, je

Expand Down
6 changes: 3 additions & 3 deletions src/framework/MOM_dyn_horgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ module MOM_dyn_horgrid
Dblock_v, & !< Topographic depths at v-points at which the flow is blocked [Z ~> m].
Dopen_v !< Topographic depths at v-points at which the flow is open at width dx_Cv [Z ~> m].
real, allocatable, dimension(:,:) :: &
CoriolisBu !< The Coriolis parameter at corner points, in s-1.
CoriolisBu !< The Coriolis parameter at corner points [s-1].
real, allocatable, dimension(:,:) :: &
df_dx, & !< Derivative d/dx f (Coriolis parameter) at h-points, in s-1 m-1.
df_dy !< Derivative d/dy f (Coriolis parameter) at h-points, in s-1 m-1.
df_dx, & !< Derivative d/dx f (Coriolis parameter) at h-points [s-1 m-1].
df_dy !< Derivative d/dy f (Coriolis parameter) at h-points [s-1 m-1].

! These variables are global sums that are useful for 1-d diagnostics
real :: areaT_global !< Global sum of h-cell area in m2
Expand Down
2 changes: 1 addition & 1 deletion src/initialization/MOM_shared_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ end subroutine MOM_shared_init_init
!> MOM_initialize_rotation makes the appropriate call to set up the Coriolis parameter.
subroutine MOM_initialize_rotation(f, G, PF, US)
type(dyn_horgrid_type), intent(in) :: G !< The dynamic horizontal grid type
real, dimension(G%IsdB:G%IedB,G%JsdB:G%JedB), intent(out) :: f !< The Coriolis parameter in s-1
real, dimension(G%IsdB:G%IedB,G%JsdB:G%JedB), intent(out) :: f !< The Coriolis parameter [s-1]
type(param_file_type), intent(in) :: PF !< Parameter file structure
type(unit_scale_type), optional, intent(in) :: US !< A dimensional unit scaling type

Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/lateral/MOM_MEKE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module MOM_MEKE
! 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_damping !< Local depth-independent MEKE dissipation rate in s-1.
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.
Expand Down
18 changes: 9 additions & 9 deletions src/parameterizations/lateral/MOM_hor_visc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ subroutine horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, CS,
FrictWorkIntz ! depth integrated energy dissipated by lateral friction (W/m2)

real, dimension(SZIB_(G),SZJB_(G)) :: &
dvdx, dudy, & ! components in the shearing strain (s-1)
dvdx, dudy, & ! components in the shearing strain [s-1]
sh_xy, & ! horizontal shearing strain (du/dy + dv/dx) (1/sec) including metric terms
str_xy, & ! str_xy is the cross term in the stress tensor (H m2 s-2)
bhstr_xy, & ! A copy of str_xy that only contains the biharmonic contribution (H m2 s-2)
Expand Down Expand Up @@ -245,8 +245,8 @@ subroutine horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, CS,
real :: mod_Leith ! nondimensional coefficient for divergence part of modified Leith
! viscosity. Here set equal to nondimensional Laplacian Leith constant.
! This is set equal to zero if modified Leith is not used.
real :: Shear_mag ! magnitude of the shear (1/s)
real :: Vort_mag ! magnitude of the vorticity (1/s)
real :: Shear_mag ! magnitude of the shear [s-1]
real :: Vort_mag ! magnitude of the vorticity [s-1]
real :: h2uq, h2vq ! temporary variables [H2 ~> m2 or kg2 m-4].
real :: hu, hv ! Thicknesses interpolated by arithmetic means to corner
! points; these are first interpolated to u or v velocity
Expand All @@ -263,8 +263,8 @@ subroutine horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, CS,
real :: Kh_scale ! A factor between 0 and 1 by which the horizontal
! Laplacian viscosity is rescaled
real :: RoScl ! The scaling function for MEKE source term
real :: FatH ! abs(f) at h-point for MEKE source term (s-1)
real :: local_strain ! Local variable for interpolating computed strain rates (s-1).
real :: FatH ! abs(f) at h-point for MEKE source term [s-1]
real :: local_strain ! Local variable for interpolating computed strain rates [s-1].

logical :: rescale_Kh, legacy_bound
logical :: find_FrictWork
Expand Down Expand Up @@ -969,12 +969,12 @@ subroutine hor_visc_init(Time, G, param_file, diag, CS)
real :: grid_sp_h3 ! Harmonic mean of the squares of the grid^(3/2)
real :: grid_sp_q2 ! spacings at h and q points (m2)
real :: grid_sp_q3 ! spacings at h and q points^(3/2) (m3)
real :: Kh_Limit ! A coefficient (1/s) used, along with the
real :: Kh_Limit ! A coefficient [s-1] used, along with the
! grid spacing, to limit Laplacian viscosity.
real :: fmax ! maximum absolute value of f at the four
! vorticity points around a thickness point (1/s)
! vorticity points around a thickness point [s-1]
real :: BoundCorConst ! constant (s2/m2)
real :: Ah_Limit ! coefficient (1/s) used, along with the
real :: Ah_Limit ! coefficient [s-1] used, along with the
! grid spacing, to limit biharmonic viscosity
real :: Kh ! Lapacian horizontal viscosity (m2/s)
real :: Ah ! biharmonic horizontal viscosity (m4/s)
Expand All @@ -985,7 +985,7 @@ subroutine hor_visc_init(Time, G, param_file, diag, CS)
real :: Leith_Lap_const ! nondimensional Laplacian Leith constant
real :: Leith_bi_const ! nondimensional biharmonic Leith constant
real :: dt ! dynamics time step (sec)
real :: Idt ! inverse of dt (1/s)
real :: Idt ! inverse of dt [s-1]
real :: denom ! work variable; the denominator of a fraction
real :: maxvel ! largest permitted velocity components [m s-1]
real :: bound_Cor_vel ! grid-scale velocity variations at which value
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/lateral/MOM_internal_tides.F90
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ subroutine propagate_int_tide(h, tv, cn, TKE_itidal_input, vel_btTide, Nb, dt, &
! Dissipate energy if Fr>1; done here with an arbitrary time scale
if (Fr2_max > 1.0) then
En_initial = sum(CS%En(i,j,:,fr,m)) ! for debugging
! Calculate effective decay rate (s-1) if breaking occurs over a time step
! Calculate effective decay rate [s-1] if breaking occurs over a time step
loss_rate = (1/Fr2_max - 1.0)/dt
do a=1,CS%nAngle
! Determine effective dissipation rate (Wm-2)
Expand Down Expand Up @@ -759,7 +759,7 @@ subroutine refract(En, cn, freq, dt, G, NAngle, use_PPMang)
real :: f2 ! The squared Coriolis parameter [s-2].
real :: favg ! The average Coriolis parameter at a point [s-1].
real :: df2_dy, df2_dx ! The x- and y- gradients of the squared Coriolis parameter, in s-2 m-1.
real :: df_dy, df_dx ! The x- and y- gradients of the Coriolis parameter, in s-1 m-1.
real :: df_dy, df_dx ! The x- and y- gradients of the Coriolis parameter [s-1 m-1].
real :: dlnCn_dx ! The x-gradient of the wave speed divided by itself in m-1.
real :: dlnCn_dy ! The y-gradient of the wave speed divided by itself in m-1.
real :: Angle_size, dt_Angle_size, angle
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ subroutine calc_Visbeck_coeffs(h, slope_x, slope_y, N2_u, N2_v, G, GV, CS)
! Local variables
real :: Khth_Loc ! Locally calculated thickness mixing coefficient (m2/s)
real :: S2 ! Interface slope squared (non-dim)
real :: N2 ! Brunt-Vaisala frequency (1/s)
real :: N2 ! Brunt-Vaisala frequency [s-1]
real :: Hup, Hdn ! Thickness from above, below [H ~> m or kg m-2]
real :: H_geom ! The geometric mean of Hup*Hdn [H ~> m or kg m-2].
integer :: is, ie, js, je, nz
Expand Down Expand Up @@ -590,7 +590,7 @@ subroutine calc_slope_functions_using_just_e(h, G, GV, US, CS, e, calculate_slop
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].
real :: S2 ! Interface slope squared (non-dim)
real :: N2 ! Brunt-Vaisala frequency (1/s)
real :: N2 ! Brunt-Vaisala frequency [s-1]
real :: Hup, Hdn ! Thickness from above, below [H ~> m or kg m-2]
real :: H_geom ! The geometric mean of Hup*Hdn [H ~> m or kg m-2].
real :: Z_to_L ! A conversion factor between from units for e to the
Expand Down
Loading

0 comments on commit 17c4608

Please sign in to comment.