Skip to content

Commit e2e5787

Browse files
Hallberg-NOAAmarshallward
authored andcommitted
Corrected the units of 124 variables
Corrected the units in comments describing 124 variables in 39 files. In addition three unused variables were eliminated. All answers and output are bitwise identical.
1 parent d7b2e32 commit e2e5787

39 files changed

Lines changed: 164 additions & 154 deletions

src/ALE/MOM_ALE.F90

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ subroutine adjustGridForIntegrity( CS, G, GV, h )
293293
type(ocean_grid_type), intent(in) :: G !< Ocean grid informations
294294
type(verticalGrid_type), intent(in) :: GV !< Ocean vertical grid structure
295295
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(inout) :: h !< Current 3D grid thickness that
296-
!! are to be adjusted [H ~> m or kg-2]
296+
!! are to be adjusted [H ~> m or kg m-2]
297297
call inflate_vanished_layers_old( CS%regridCS, G, GV, h(:,:,:) )
298298

299299
end subroutine adjustGridForIntegrity
@@ -334,7 +334,7 @@ subroutine ALE_main( G, GV, US, h, u, v, tv, Reg, CS, OBC, dt, frac_shelf_h)
334334
! Local variables
335335
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)+1) :: dzRegrid ! The change in grid interface positions
336336
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)+1) :: eta_preale
337-
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)) :: h_new ! New 3D grid obtained after last time step [H ~> m or kg-2]
337+
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)) :: h_new ! New 3D grid obtained after last time step [H ~> m or kg m-2]
338338
integer :: nk, i, j, k, isc, iec, jsc, jec
339339
logical :: ice_shelf
340340

@@ -405,15 +405,15 @@ subroutine ALE_main_offline( G, GV, h, tv, Reg, CS, OBC, dt)
405405
type(ocean_grid_type), intent(in) :: G !< Ocean grid informations
406406
type(verticalGrid_type), intent(in) :: GV !< Ocean vertical grid structure
407407
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(inout) :: h !< Current 3D grid obtained after the
408-
!! last time step [H ~> m or kg-2]
408+
!! last time step [H ~> m or kg m-2]
409409
type(thermo_var_ptrs), intent(inout) :: tv !< Thermodynamic variable structure
410410
type(tracer_registry_type), pointer :: Reg !< Tracer registry structure
411411
type(ALE_CS), pointer :: CS !< Regridding parameters and options
412412
type(ocean_OBC_type), pointer :: OBC !< Open boundary structure
413413
real, optional, intent(in) :: dt !< Time step between calls to ALE_main [T ~> s]
414414
! Local variables
415415
real, dimension(SZI_(G), SZJ_(G), SZK_(GV)+1) :: dzRegrid ! The change in grid interface positions
416-
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)) :: h_new ! New 3D grid obtained after last time step [H ~> m or kg-2]
416+
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)) :: h_new ! New 3D grid obtained after last time step [H ~> m or kg m-2]
417417
integer :: nk, i, j, k, isc, iec, jsc, jec
418418

419419
nk = GV%ke; isc = G%isc; iec = G%iec; jsc = G%jsc; jec = G%jec
@@ -540,10 +540,10 @@ subroutine ALE_offline_tracer_final( G, GV, h, tv, h_target, Reg, CS, OBC)
540540
type(ocean_grid_type), intent(in) :: G !< Ocean grid informations
541541
type(verticalGrid_type), intent(in) :: GV !< Ocean vertical grid structure
542542
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(inout) :: h !< Current 3D grid obtained after the
543-
!! last time step [H ~> m or kg-2]
543+
!! last time step [H ~> m or kg m-2]
544544
type(thermo_var_ptrs), intent(inout) :: tv !< Thermodynamic variable structure
545545
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(inout) :: h_target !< Current 3D grid obtained after
546-
!! last time step [H ~> m or kg-2]
546+
!! last time step [H ~> m or kg m-2]
547547
type(tracer_registry_type), pointer :: Reg !< Tracer registry structure
548548
type(ALE_CS), pointer :: CS !< Regridding parameters and options
549549
type(ocean_OBC_type), pointer :: OBC !< Open boundary structure
@@ -615,7 +615,7 @@ subroutine ALE_build_grid( G, GV, regridCS, remapCS, h, tv, debug, frac_shelf_h
615615
type(remapping_CS), intent(in) :: remapCS !< Remapping parameters and options
616616
type(thermo_var_ptrs), intent(inout) :: tv !< Thermodynamical variable structure
617617
real, dimension(SZI_(G),SZJ_(G), SZK_(GV)), intent(inout) :: h !< Current 3D grid obtained after the
618-
!! last time step [H ~> m or kg-2]
618+
!! last time step [H ~> m or kg m-2]
619619
logical, optional, intent(in) :: debug !< If true, show the call tree
620620
real, dimension(SZI_(G),SZJ_(G)), optional, intent(in):: frac_shelf_h !< Fractional ice shelf coverage [nondim]
621621
! Local variables
@@ -654,7 +654,7 @@ subroutine ALE_regrid_accelerated(CS, G, GV, h, tv, n, u, v, OBC, Reg, dt, dzReg
654654
type(ocean_grid_type), intent(inout) :: G !< Ocean grid
655655
type(verticalGrid_type), intent(in) :: GV !< Vertical grid
656656
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), &
657-
intent(inout) :: h !< Original thicknesses [H ~> m or kg-2]
657+
intent(inout) :: h !< Original thicknesses [H ~> m or kg m-2]
658658
type(thermo_var_ptrs), intent(inout) :: tv !< Thermo vars (T/S/EOS)
659659
integer, intent(in) :: n !< Number of times to regrid
660660
real, dimension(SZIB_(G),SZJ_(G),SZK_(GV)), &
@@ -741,14 +741,14 @@ subroutine remap_all_state_vars(CS_remapping, CS_ALE, G, GV, h_old, h_new, Reg,
741741
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
742742
type(verticalGrid_type), intent(in) :: GV !< Ocean vertical grid structure
743743
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(in) :: h_old !< Thickness of source grid
744-
!! [H ~> m or kg-2]
744+
!! [H ~> m or kg m-2]
745745
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(in) :: h_new !< Thickness of destination grid
746-
!! [H ~> m or kg-2]
746+
!! [H ~> m or kg m-2]
747747
type(tracer_registry_type), pointer :: Reg !< Tracer registry structure
748748
type(ocean_OBC_type), pointer :: OBC !< Open boundary structure
749749
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)+1), &
750750
optional, intent(in) :: dxInterface !< Change in interface position
751-
!! [H ~> m or kg-2]
751+
!! [H ~> m or kg m-2]
752752
real, dimension(SZIB_(G),SZJ_(G),SZK_(GV)), &
753753
optional, intent(inout) :: u !< Zonal velocity [L T-1 ~> m s-1]
754754
real, dimension(SZI_(G),SZJB_(G),SZK_(GV)), &
@@ -940,10 +940,10 @@ subroutine ALE_remap_scalar(CS, G, GV, nk_src, h_src, s_src, h_dst, s_dst, all_c
940940
type(verticalGrid_type), intent(in) :: GV !< Ocean vertical grid structure
941941
integer, intent(in) :: nk_src !< Number of levels on source grid
942942
real, dimension(SZI_(G),SZJ_(G),nk_src), intent(in) :: h_src !< Level thickness of source grid
943-
!! [H ~> m or kg-2]
943+
!! [H ~> m or kg m-2]
944944
real, dimension(SZI_(G),SZJ_(G),nk_src), intent(in) :: s_src !< Scalar on source grid
945945
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)),intent(in) :: h_dst !< Level thickness of destination grid
946-
!! [H ~> m or kg-2]
946+
!! [H ~> m or kg m-2]
947947
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)),intent(inout) :: s_dst !< Scalar on destination grid
948948
logical, optional, intent(in) :: all_cells !< If false, only reconstruct for
949949
!! non-vanished cells. Use all vanished

src/core/MOM.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3541,7 +3541,7 @@ subroutine get_MOM_state_elements(CS, G, GV, US, C_p, C_p_scaled, use_temp)
35413541
type(unit_scale_type), optional, pointer :: US !< A dimensional unit scaling type
35423542
real, optional, intent(out) :: C_p !< The heat capacity [J kg degC-1]
35433543
real, optional, intent(out) :: C_p_scaled !< The heat capacity in scaled
3544-
!! units [Q degC-1 ~> J kg degC-1]
3544+
!! units [Q degC-1 ~> J kg-1 degC-1]
35453545
logical, optional, intent(out) :: use_temp !< True if temperature is a state variable
35463546

35473547
if (present(G)) G => CS%G_in

src/core/MOM_CoriolisAdv.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, US, CS)
169169
vh_min, vh_max, & ! fluxes through the faces (i.e. u*h*dy & v*h*dx)
170170
! [H L2 T-1 ~> m3 s-1 or kg s-1].
171171
ep_u, ep_v ! Additional pseudo-Coriolis terms in the Arakawa and Lamb
172-
! discretization [H-1 s-1 ~> m-1 s-1 or m2 kg-1 s-1].
172+
! discretization [H-1 T-1 ~> m-1 s-1 or m2 kg-1 s-1].
173173
real, dimension(SZIB_(G),SZJB_(G)) :: &
174174
dvdx, dudy, & ! Contributions to the circulation around q-points [L2 T-1 ~> m2 s-1]
175175
rel_vort, & ! Relative vorticity at q-points [T-1 ~> s-1].
@@ -218,7 +218,7 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, US, CS)
218218
real :: Heff3, Heff4 ! Temporary effective H at U or V points [H ~> m or kg m-2].
219219
real :: h_tiny ! A very small thickness [H ~> m or kg m-2].
220220
real :: UHeff, VHeff ! More temporary variables [H L2 T-1 ~> m3 s-1 or kg s-1].
221-
real :: QUHeff,QVHeff ! More temporary variables [H L2 T-1 s-1 ~> m3 s-2 or kg s-2].
221+
real :: QUHeff,QVHeff ! More temporary variables [H L2 T-2 ~> m3 s-2 or kg s-2].
222222
integer :: i, j, k, n, is, ie, js, je, Isq, Ieq, Jsq, Jeq, nz
223223

224224
! Diagnostics for fractional thickness-weighted terms

src/core/MOM_PressureForce_FV.F90

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ subroutine PressureForce_FV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_
8080
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
8181
type(verticalGrid_type), intent(in) :: GV !< Vertical grid structure
8282
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
83-
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(in) :: h !< Layer thickness [H ~> kg/m2]
83+
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(in) :: h !< Layer thickness [H ~> kg m-2]
8484
type(thermo_var_ptrs), intent(in) :: tv !< Thermodynamic variables
8585
real, dimension(SZIB_(G),SZJ_(G),SZK_(GV)), intent(out) :: PFu !< Zonal acceleration [L T-2 ~> m s-2]
8686
real, dimension(SZI_(G),SZJB_(G),SZK_(GV)), intent(out) :: PFv !< Meridional acceleration [L T-2 ~> m s-2]
@@ -109,9 +109,9 @@ subroutine PressureForce_FV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_
109109
dza, & ! The change in geopotential anomaly between the top and bottom
110110
! of a layer [L2 T-2 ~> m2 s-2].
111111
intp_dza ! The vertical integral in depth of the pressure anomaly less
112-
! the pressure anomaly at the top of the layer [R L4 Z-4 ~> Pa m2 s-2].
112+
! the pressure anomaly at the top of the layer [R L4 T-4 ~> Pa m2 s-2].
113113
real, dimension(SZI_(G),SZJ_(G)) :: &
114-
dp, & ! The (positive) change in pressure across a layer [R L2 Z-2 ~> Pa].
114+
dp, & ! The (positive) change in pressure across a layer [R L2 T-2 ~> Pa].
115115
SSH, & ! The sea surface height anomaly, in depth units [Z ~> m].
116116
e_tidal, & ! The bottom geopotential anomaly due to tidal forces from
117117
! astronomical sources and self-attraction and loading [Z ~> m].
@@ -137,7 +137,7 @@ subroutine PressureForce_FV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_
137137

138138
real :: dp_neglect ! A thickness that is so small it is usually lost
139139
! in roundoff and can be neglected [R L2 T-2 ~> Pa].
140-
real :: I_gEarth ! The inverse of GV%g_Earth [L2 Z L-2 ~> s2 m-1]
140+
real :: I_gEarth ! The inverse of GV%g_Earth [T2 Z L-2 ~> s2 m-1]
141141
real :: alpha_anom ! The in-situ specific volume, averaged over a
142142
! layer, less alpha_ref [R-1 ~> m3 kg-1].
143143
logical :: use_p_atm ! If true, use the atmospheric pressure.
@@ -148,8 +148,10 @@ subroutine PressureForce_FV_nonBouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_
148148
real :: alpha_ref ! A reference specific volume [R-1 ~> m3 kg-1] that is used
149149
! to reduce the impact of truncation errors.
150150
real :: rho_in_situ(SZI_(G)) ! The in situ density [R ~> kg m-3].
151-
real :: Pa_to_H ! A factor to convert from Pa to the thicknesss units (H) [H T2 R-1 L-2 ~> H Pa-1].
152-
real :: H_to_RL2_T2 ! A factor to convert from thicknesss units (H) to pressure units [R L2 T-2 H-1 ~> Pa H-1].
151+
real :: Pa_to_H ! A factor to convert from Pa to the thickness units (H)
152+
! [H T2 R-1 L-2 ~> m Pa-1 or kg m-2 Pa-1].
153+
real :: H_to_RL2_T2 ! A factor to convert from thickness units (H) to pressure
154+
! units [R L2 T-2 H-1 ~> Pa m-1 or Pa m2 kg-1].
153155
! real :: oneatm = 101325.0 ! 1 atm in [Pa] = [kg m-1 s-2]
154156
real, parameter :: C1_6 = 1.0/6.0
155157
integer :: is, ie, js, je, Isq, Ieq, Jsq, Jeq, nz, nkmb

src/core/MOM_PressureForce_Montgomery.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ subroutine PressureForce_Mont_Bouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm, pbce,
365365
real, dimension(SZIB_(G),SZJ_(G),SZK_(GV)), intent(out) :: PFu !< Zonal acceleration due to pressure gradients
366366
!! (equal to -dM/dx) [L T-2 ~> m s-2].
367367
real, dimension(SZI_(G),SZJB_(G),SZK_(GV)), intent(out) :: PFv !< Meridional acceleration due to pressure gradients
368-
!! (equal to -dM/dy) [L T-2 ~> m s2].
368+
!! (equal to -dM/dy) [L T-2 ~> m s-2].
369369
type(PressureForce_Mont_CS), pointer :: CS !< Control structure for Montgomery potential PGF
370370
real, dimension(:,:), pointer :: p_atm !< The pressure at the ice-ocean or
371371
!! atmosphere-ocean [R L2 T-2 ~> Pa].
@@ -377,7 +377,7 @@ subroutine PressureForce_Mont_Bouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm, pbce,
377377
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)) :: &
378378
M, & ! The Montgomery potential, M = (p/rho + gz) [L2 T-2 ~> m2 s-2].
379379
rho_star ! In-situ density divided by the derivative with depth of the
380-
! corrected e times (G_Earth/Rho0) [m2 Z-1 s-2 ~> m s-2].
380+
! corrected e times (G_Earth/Rho0) [L2 Z-1 T-2 ~> m s-2].
381381
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)+1) :: e ! Interface height in m.
382382
! e may be adjusted (with a nonlinear equation of state) so that
383383
! its derivative compensates for the adiabatic compressibility
@@ -629,7 +629,7 @@ subroutine Set_pbce_Bouss(e, tv, G, GV, US, Rho0, GFS_scale, pbce, rho_star)
629629
real :: dR_dS(SZI_(G)) ! Partial derivative of density with salinity [R ppt-1 ~> kg m-3 ppt-1].
630630
real :: rho_in_situ(SZI_(G)) ! In-situ density at the top of a layer [R ~> kg m-3].
631631
real :: G_Rho0 ! A scaled version of g_Earth / Rho0 [L2 Z-1 T-2 R-1 ~> m4 s-2 kg-1]
632-
real :: Rho0xG ! g_Earth * Rho0 [kg s-2 m-1 Z-1 ~> kg s-2 m-2]
632+
real :: Rho0xG ! g_Earth * Rho0 [R L2 Z-1 T-2 ~> kg s-2 m-2]
633633
logical :: use_EOS ! If true, density is calculated from T & S using
634634
! an equation of state.
635635
real :: z_neglect ! A thickness that is so small it is usually lost

src/core/MOM_barotropic.F90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,10 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
447447
!! height anomaly or column mass anomaly [H ~> m or kg m-2].
448448
real, dimension(SZIB_(G),SZJ_(G)), intent(out) :: uhbtav !< the barotropic zonal volume or mass
449449
!! fluxes averaged through the barotropic steps
450-
!! [H L2 T-1 ~> m3 or kg s-1].
450+
!! [H L2 T-1 ~> m3 s-1 or kg s-1].
451451
real, dimension(SZI_(G),SZJB_(G)), intent(out) :: vhbtav !< the barotropic meridional volume or mass
452452
!! fluxes averaged through the barotropic steps
453-
!! [H L2 T-1 ~> m3 or kg s-1].
453+
!! [H L2 T-1 ~> m3 s-1 or kg s-1].
454454
type(barotropic_CS), pointer :: CS !< The control structure returned by a
455455
!! previous call to barotropic_init.
456456
real, dimension(SZIB_(G),SZJ_(G),SZK_(GV)), intent(in) :: visc_rem_u !< Both the fraction of the momentum
@@ -623,7 +623,7 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
623623
vhbt_prev, vhbt_sum_prev, & ! Previous transports stored for OBCs [L2 H T-1 ~> m3 s-1]
624624
vbt_int_prev, & ! Previous value of time-integrated velocity stored for OBCs [L ~> m]
625625
vhbt_int_prev ! Previous value of time-integrated transport stored for OBCs [L2 H ~> m3]
626-
real :: mass_to_Z ! The depth unit conversion divided by the mean density (Rho0) [Z m-1 R-1 ~> m3 kg-1].
626+
real :: mass_to_Z ! The depth unit conversion divided by the mean density (Rho0) [Z m-1 R-1 ~> m3 kg-1] !### R-1
627627
real :: mass_accel_to_Z ! The inverse of the mean density (Rho0) [R-1 ~> m3 kg-1].
628628
real :: visc_rem ! A work variable that may equal visc_rem_[uv]. Nondim.
629629
real :: vel_prev ! The previous velocity [L T-1 ~> m s-1].
@@ -773,7 +773,7 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
773773
bebt = CS%bebt
774774
be_proj = CS%bebt
775775
mass_accel_to_Z = 1.0 / GV%Rho0
776-
mass_to_Z = US%m_to_Z / GV%Rho0
776+
mass_to_Z = US%m_to_Z / GV%Rho0 !### THis should be the same as mass_accel_to_Z.
777777

778778
!--- setup the weight when computing vbt_trans and ubt_trans
779779
if (project_velocity) then
@@ -3566,7 +3566,7 @@ function find_duhbt_du(u, BTC) result(duhbt_du)
35663566
!! allow the barotropic transports to be calculated consistently
35673567
!! with the layers' continuity equations. The dimensions of some
35683568
!! of the elements in this type vary depending on INTEGRAL_BT_CONT.
3569-
real :: duhbt_du !< The zonal barotropic face area [L H ~> m2]
3569+
real :: duhbt_du !< The zonal barotropic face area [L H ~> m2 or kg m-1]
35703570

35713571
if (u == 0.0) then
35723572
duhbt_du = 0.5*(BTC%FA_u_E0 + BTC%FA_u_W0) ! Note the potential discontinuity here.
@@ -3701,7 +3701,7 @@ function find_dvhbt_dv(v, BTC) result(dvhbt_dv)
37013701
!! allow the barotropic transports to be calculated consistently
37023702
!! with the layers' continuity equations. The dimensions of some
37033703
!! of the elements in this type vary depending on INTEGRAL_BT_CONT.
3704-
real :: dvhbt_dv !< The meridional barotropic face area [L H ~> m2]
3704+
real :: dvhbt_dv !< The meridional barotropic face area [L H ~> m2 or kg m-1]
37053705

37063706
if (v == 0.0) then
37073707
dvhbt_dv = 0.5*(BTC%FA_v_N0 + BTC%FA_v_S0) ! Note the potential discontinuity here.

0 commit comments

Comments
 (0)