Skip to content

Commit

Permalink
Extended comments to clarify Z units
Browse files Browse the repository at this point in the history
  Added to comments to clarify the unscaled units of variabiles that scale with Z,
using notation like 'in Z ~> m'.  Only comments are changed, and all answers
are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Dec 3, 2018
1 parent 47a3574 commit 62709d7
Show file tree
Hide file tree
Showing 72 changed files with 648 additions and 661 deletions.
4 changes: 2 additions & 2 deletions config_src/coupled_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -802,10 +802,10 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
real, dimension(SZI_(G),SZJB_(G)), &
optional, intent(inout) :: tauy !< The meridional wind stresses on a C-grid, in Pa.
real, dimension(SZI_(G),SZJ_(G)), &
optional, intent(inout) :: ustar !< The surface friction velocity, in Z s-1.
optional, intent(inout) :: ustar !< The surface friction velocity, in Z s-1 ~> m s-1.
real, dimension(SZI_(G),SZJ_(G)), &
optional, intent(out) :: gustless_ustar !< The surface friction velocity without
!! any contributions from gustiness, in Z s-1.
!! any contributions from gustiness, in Z s-1 ~> m s-1.
integer, optional, intent(in) :: tau_halo !< The halo size of wind stresses to set, 0 by default.

! Local variables
Expand Down
2 changes: 1 addition & 1 deletion config_src/ice_solo_driver/user_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ subroutine USER_wind_forcing(sfc_state, forces, day, G, US, CS)
! These are the stresses in the direction of the model grid (i.e. the same
! direction as the u- and v- velocities.) They are both in Pa.
! In addition, this subroutine can be used to set the surface friction
! velocity, forces%ustar, in Z s-1. This is needed with a bulk mixed layer.
! velocity, forces%ustar, in Z s-1 ~> m s-1. This is needed with a bulk mixed layer.
!
! Arguments: state - A structure containing fields that describe the
! surface state of the ocean.
Expand Down
4 changes: 2 additions & 2 deletions src/ALE/MOM_ALE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ subroutine ALE_init( param_file, GV, US, max_depth, CS)
type(param_file_type), intent(in) :: param_file !< Parameter file
type(verticalGrid_type), intent(in) :: GV !< Ocean vertical grid structure
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
real, intent(in) :: max_depth !< The maximum depth of the ocean, in Z.
real, intent(in) :: max_depth !< The maximum depth of the ocean, in Z ~> m.
type(ALE_CS), pointer :: CS !< Module control structure

! Local variables
Expand Down Expand Up @@ -1102,7 +1102,7 @@ end subroutine pressure_gradient_ppm
subroutine ALE_initRegridding(GV, US, max_depth, param_file, mdl, regridCS)
type(verticalGrid_type), intent(in) :: GV !< Ocean vertical grid structure
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
real, intent(in) :: max_depth !< The maximum depth of the ocean, in Z.
real, intent(in) :: max_depth !< The maximum depth of the ocean, in Z ~> m.
type(param_file_type), intent(in) :: param_file !< parameter file
character(len=*), intent(in) :: mdl !< Name of calling module
type(regridding_CS), intent(out) :: regridCS !< Regridding parameters and work arrays
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 @@ -172,7 +172,7 @@ subroutine initialize_regridding(CS, GV, US, max_depth, param_file, mdl, coord_m
type(regridding_CS), intent(inout) :: CS !< Regridding control structure
type(verticalGrid_type), intent(in) :: GV !< Ocean vertical grid structure
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
real, intent(in) :: max_depth !< The maximum depth of the ocean, in Z.
real, intent(in) :: max_depth !< The maximum depth of the ocean, in Z ~> m.
type(param_file_type), intent(in) :: param_file !< Parameter file
character(len=*), intent(in) :: mdl !< Name of calling module.
character(len=*), intent(in) :: coord_mode !< Coordinate mode
Expand Down
6 changes: 3 additions & 3 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2707,10 +2707,10 @@ subroutine extract_surface_state(CS, sfc_state)
u => NULL(), & !< u : zonal velocity component (m/s)
v => NULL(), & !< v : meridional velocity component (m/s)
h => NULL() !< h : layer thickness (meter (Bouss) or kg/m2 (non-Bouss))
real :: depth(SZI_(CS%G)) !< Distance from the surface in depth units (Z)
real :: depth(SZI_(CS%G)) !< Distance from the surface in depth units (Z ~> m)
real :: depth_ml !< Depth over which to average to determine mixed
!! layer properties (Z)
real :: dh !< Thickness of a layer within the mixed layer (Z)
!! layer properties (Z ~> m)
real :: dh !< Thickness of a layer within the mixed layer (Z ~> m)
real :: mass !< Mass per unit area of a layer (kg/m2)
real :: bathy_m !< The depth of bathymetry in m (not Z), used for error checking.
real :: T_freeze !< freezing temperature (oC)
Expand Down
20 changes: 10 additions & 10 deletions src/core/MOM_PressureForce_Montgomery.F90
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ subroutine PressureForce_Mont_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm, pb
! enable the use of a reduced gravity form of the equations,
! in m2 s-2.
dp_star, & ! Layer thickness after compensation for compressibility, in Pa.
SSH, & ! The sea surface height anomaly, in depth units (Z).
SSH, & ! The sea surface height anomaly, in depth units (Z ~> m).
e_tidal, & ! Bottom geopotential anomaly due to tidal forces from
! astronomical sources and self-attraction and loading, in Z.
! astronomical sources and self-attraction and loading, in Z ~> m.
geopot_bot ! Bottom geopotential relative to time-mean sea level,
! including any tidal contributions, in units of m2 s-2.
real :: p_ref(SZI_(G)) ! The pressure used to calculate the coordinate
Expand Down Expand Up @@ -390,10 +390,10 @@ subroutine PressureForce_Mont_Bouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm, pbce,
real :: Rho_cv_BL(SZI_(G)) ! The coordinate potential density in
! the deepest variable density near-surface layer, in kg m-3.
real :: h_star(SZI_(G),SZJ_(G)) ! Layer thickness after compensation
! for compressibility, in m.
! for compressibility, in Z ~> m.
real :: e_tidal(SZI_(G),SZJ_(G)) ! Bottom geopotential anomaly due to tidal
! forces from astronomical sources and self-
! attraction and loading, in depth units (Z).
! attraction and loading, in depth units (Z ~> m).
real :: p_ref(SZI_(G)) ! The pressure used to calculate the coordinate
! density, in Pa (usually 2e7 Pa = 2000 dbar).
real :: I_Rho0 ! 1/Rho0, in m3 kg-1.
Expand All @@ -402,7 +402,7 @@ subroutine PressureForce_Mont_Bouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm, pbce,
! compensated density gradients, in m s-2.
real :: dr ! Temporary variables.
real :: h_neglect ! A thickness that is so small it is usually lost
! in roundoff and can be neglected, in m.
! in roundoff and can be neglected, in Z ~> m.
logical :: use_p_atm ! If true, use the atmospheric pressure.
logical :: use_EOS ! If true, density is calculated from T & S using
! an equation of state.
Expand Down Expand Up @@ -603,7 +603,7 @@ end subroutine PressureForce_Mont_Bouss
subroutine Set_pbce_Bouss(e, tv, G, GV, Rho0, GFS_scale, pbce, rho_star)
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
type(verticalGrid_type), intent(in) :: GV !< Vertical grid structure
real, dimension(SZI_(G),SZJ_(G),SZK_(G)+1), intent(in) :: e !< Interface height, in Z.
real, dimension(SZI_(G),SZJ_(G),SZK_(G)+1), intent(in) :: e !< Interface height, in Z ~> m.
type(thermo_var_ptrs), intent(in) :: tv !< Thermodynamic variables
real, intent(in) :: Rho0 !< The "Boussinesq" ocean density, in kg m-3.
real, intent(in) :: GFS_scale !< Ratio between gravity applied to top interface
Expand All @@ -614,7 +614,7 @@ subroutine Set_pbce_Bouss(e, tv, G, GV, Rho0, GFS_scale, pbce, rho_star)
!! to free surface height anomalies, in m2 H-1 s-2.
real, dimension(SZI_(G),SZJ_(G),SZK_(G)), &
optional, intent(in) :: rho_star !< The layer densities (maybe compressibility
!! compensated), times g/rho_0, in m2 Z-1 s-2.
!! compensated), times g/rho_0, in m2 Z-1 s-2 ~> m s-2.

! Local variables
real :: Ihtot(SZI_(G)) ! The inverse of the sum of the layer thicknesses, in H-1.
Expand All @@ -624,12 +624,12 @@ subroutine Set_pbce_Bouss(e, tv, G, GV, Rho0, GFS_scale, pbce, rho_star)
real :: dR_dT(SZI_(G)) ! Partial derivatives of density with temperature
real :: dR_dS(SZI_(G)) ! and salinity in kg m-3 K-1 and kg m-3 PSU-1.
real :: rho_in_situ(SZI_(G)) !In-situ density at the top of a layer.
real :: G_Rho0 ! G_Earth / Rho0 in m5 Z-1 s-2 kg-1.
real :: Rho0xG ! g_Earth * Rho0 in kg s-2 m-1 Z-1.
real :: G_Rho0 ! G_Earth / Rho0 in m5 Z-1 s-2 kg-1 ~> m4 s-2 kg-1.
real :: Rho0xG ! g_Earth * Rho0 in kg s-2 m-1 Z-1 ~> kg m-2 m-2.
logical :: use_EOS ! If true, density is calculated from T & S using
! an equation of state.
real :: z_neglect ! A thickness that is so small it is usually lost
! in roundoff and can be neglected, in Z.
! in roundoff and can be neglected, in Z ~> m.
integer :: Isq, Ieq, Jsq, Jeq, nz, i, j, k

Isq = G%IscB ; Ieq = G%IecB ; Jsq = G%JscB ; Jeq = G%JecB ; nz = G%ke
Expand Down
14 changes: 7 additions & 7 deletions src/core/MOM_PressureForce_analytic_FV.F90
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ subroutine PressureForce_AFV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p
! the pressure anomaly at the top of the layer, in Pa m2 s-2.
real, dimension(SZI_(G),SZJ_(G)) :: &
dp, & ! The (positive) change in pressure across a layer, in Pa.
SSH, & ! The sea surface height anomaly, in depth units (Z).
SSH, & ! The sea surface height anomaly, in depth units (Z ~> m).
e_tidal, & ! The bottom geopotential anomaly due to tidal forces from
! astronomical sources and self-attraction and loading, in Z.
! astronomical sources and self-attraction and loading, in Z ~> m.
dM, & ! The barotropic adjustment to the Montgomery potential to
! account for a reduced gravity model, in m2 s-2.
za ! The geopotential anomaly (i.e. g*e + alpha_0*pressure) at the
Expand All @@ -155,7 +155,7 @@ subroutine PressureForce_AFV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p

real :: dp_neglect ! A thickness that is so small it is usually lost
! in roundoff and can be neglected, in Pa.
real :: g_Earth_z ! A scaled version of g_Earth, in m2 Z-1 s-2.
real :: g_Earth_z ! A scaled version of g_Earth, in m2 Z-1 s-2 ~> m s-2.
real :: I_gEarth ! The inverse of g_Earth_z, in s2 Z m-2
real :: alpha_anom ! The in-situ specific volume, averaged over a
! layer, less alpha_ref, in m3 kg-1.
Expand Down Expand Up @@ -456,10 +456,10 @@ subroutine PressureForce_AFV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_at
!! calculate PFu and PFv, in H, with any tidal
!! contributions or compressibility compensation.
! Local variables
real, dimension(SZI_(G),SZJ_(G),SZK_(G)+1) :: e ! Interface height in depth units (Z).
real, dimension(SZI_(G),SZJ_(G),SZK_(G)+1) :: e ! Interface height in depth units (Z ~> m).
real, dimension(SZI_(G),SZJ_(G)) :: &
e_tidal, & ! The bottom geopotential anomaly due to tidal forces from
! astronomical sources and self-attraction and loading, in Z.
! astronomical sources and self-attraction and loading, in Z ~> m.
dM ! The barotropic adjustment to the Montgomery potential to
! account for a reduced gravity model, in m2 s-2.
real, dimension(SZI_(G)) :: &
Expand Down Expand Up @@ -496,11 +496,11 @@ subroutine PressureForce_AFV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_at
real :: p0(SZI_(G)) ! An array of zeros to use for pressure in Pa.
real :: h_neglect ! A thickness that is so small it is usually lost
! in roundoff and can be neglected, in m.
real :: g_Earth_z ! A scaled version of g_Earth, in m2 Z-1 s-2.
real :: g_Earth_z ! A scaled version of g_Earth, in m2 Z-1 s-2 ~> m s-2.
real :: I_Rho0 ! 1/Rho0.
real :: G_Rho0 ! G_Earth / Rho0 in m5 Z-1 s-2 kg-1.
real :: Rho_ref ! The reference density in kg m-3.
real :: dz_neglect ! A minimal thickness in Z, like e.
real :: dz_neglect ! A minimal thickness in Z ~> m, like e.
logical :: use_p_atm ! If true, use the atmospheric pressure.
logical :: use_ALE ! If true, use an ALE pressure reconstruction.
logical :: use_EOS ! If true, density is calculated from T & S using an equation of state.
Expand Down
16 changes: 8 additions & 8 deletions src/core/MOM_PressureForce_blocked_AFV.F90
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ subroutine PressureForce_blk_AFV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm,
! the pressure anomaly at the top of the layer, in Pa m2 s-2.
real, dimension(SZI_(G),SZJ_(G)) :: &
dp, & ! The (positive) change in pressure across a layer, in Pa.
SSH, & ! The sea surface height anomaly, in depth units (Z).
SSH, & ! The sea surface height anomaly, in depth units (Z ~> m).
e_tidal, & ! The bottom geopotential anomaly due to tidal forces from
! astronomical sources and self-attraction and loading, in Z.
! astronomical sources and self-attraction and loading, in Z ~> m.
dM, & ! The barotropic adjustment to the Montgomery potential to
! account for a reduced gravity model, in m2 s-2.
za ! The geopotential anomaly (i.e. g*e + alpha_0*pressure) at the
Expand All @@ -155,8 +155,8 @@ subroutine PressureForce_blk_AFV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm,

real :: dp_neglect ! A thickness that is so small it is usually lost
! in roundoff and can be neglected, in Pa.
real :: g_Earth_z ! A scaled version of g_Earth, in m2 Z-1 s-2.
real :: I_gEarth ! The inverse of g_Earth_z, in s2 Z m-2
real :: g_Earth_z ! A scaled version of g_Earth, in m2 Z-1 s-2 ~> m s-2.
real :: I_gEarth ! The inverse of g_Earth_z, in s2 Z m-2 ~> s2 m-1.
real :: alpha_anom ! The in-situ specific volume, averaged over a
! layer, less alpha_ref, in m3 kg-1.
logical :: use_p_atm ! If true, use the atmospheric pressure.
Expand Down Expand Up @@ -439,10 +439,10 @@ subroutine PressureForce_blk_AFV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp,
!! calculate PFu and PFv, in H, with any tidal
!! contributions or compressibility compensation.
! Local variables
real, dimension(SZI_(G),SZJ_(G),SZK_(G)+1) :: e ! Interface height in depth units (Z).
real, dimension(SZI_(G),SZJ_(G),SZK_(G)+1) :: e ! Interface height in depth units (Z ~> m).
real, dimension(SZI_(G),SZJ_(G)) :: &
e_tidal, & ! The bottom geopotential anomaly due to tidal forces from
! astronomical sources and self-attraction and loading, in depth units (Z).
! astronomical sources and self-attraction and loading, in depth units (Z ~> m).
dM ! The barotropic adjustment to the Montgomery potential to
! account for a reduced gravity model, in m2 s-2.
real, dimension(SZI_(G)) :: &
Expand Down Expand Up @@ -480,10 +480,10 @@ subroutine PressureForce_blk_AFV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp,
real :: h_neglect ! A thickness that is so small it is usually lost
! in roundoff and can be neglected, in H.
real :: I_Rho0 ! 1/Rho0.
real :: g_Earth_z ! A scaled version of g_Earth, in m2 Z-1 s-2.
real :: g_Earth_z ! A scaled version of g_Earth, in m2 Z-1 s-2 ~> m s-2.
real :: G_Rho0 ! G_Earth / Rho0 in m5 Z-1 s-2 kg-1.
real :: Rho_ref ! The reference density in kg m-3.
real :: dz_neglect ! A minimal thickness in Z, like e.
real :: dz_neglect ! A minimal thickness in Z ~> m, like e.
logical :: use_p_atm ! If true, use the atmospheric pressure.
logical :: use_ALE ! If true, use an ALE pressure reconstruction.
logical :: use_EOS ! If true, density is calculated from T & S using an
Expand Down
Loading

0 comments on commit 62709d7

Please sign in to comment.