Skip to content

Commit

Permalink
Documented units of 110 core variables
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 110 core directory variables.  Only comments have been changed and all
answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Dec 22, 2018
1 parent 3d0c946 commit 00b3289
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 115 deletions.
12 changes: 6 additions & 6 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ module MOM
!< A running time integral of the sea surface height [s m].
real ALLOCABLE_, dimension(NIMEM_,NJMEM_) :: ave_ssh_ibc
!< time-averaged (over a forcing time step) sea surface height
!! with a correction for the inverse barometer (meter)
!! with a correction for the inverse barometer [m]
real ALLOCABLE_, dimension(NIMEM_,NJMEM_) :: eta_av_bc
!< free surface height or column mass time averaged over the last
!! baroclinic dynamics time step [H ~> m or kg m-2]
real, dimension(:,:), pointer :: &
Hml => NULL() !< active mixed layer depth, in m
Hml => NULL() !< active mixed layer depth [m]
real :: time_in_cycle !< The running time of the current time-stepping cycle
!! in calls that step the dynamics, and also the length of
!! the time integral of ssh_rint [s].
Expand Down Expand Up @@ -2912,7 +2912,7 @@ subroutine extract_surface_state(CS, sfc_state)
sfc_state%melt_potential(i,j) = 0.0

if (G%mask2dT(i,j)>0.) then
! instantaneous melt_potential, in J/m^2
! instantaneous melt_potential [J m-2]
sfc_state%melt_potential(i,j) = CS%tv%C_p * CS%GV%Rho0 * delT(i)
endif
enddo
Expand Down Expand Up @@ -3072,9 +3072,9 @@ end subroutine get_MOM_state_elements
!> Find the global integrals of various quantities.
subroutine get_ocean_stocks(CS, mass, heat, salt, on_PE_only)
type(MOM_control_struct), pointer :: CS !< MOM control structure
real, optional, intent(out) :: heat !< The globally integrated integrated ocean heat, in J.
real, optional, intent(out) :: salt !< The globally integrated integrated ocean salt, in kg.
real, optional, intent(out) :: mass !< The globally integrated integrated ocean mass, in kg.
real, optional, intent(out) :: heat !< The globally integrated integrated ocean heat [J].
real, optional, intent(out) :: salt !< The globally integrated integrated ocean salt [kg].
real, optional, intent(out) :: mass !< The globally integrated integrated ocean mass [kg].
logical, optional, intent(in) :: on_PE_only !< If present and true, only sum on the local PE.

if (present(mass)) &
Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_CoriolisAdv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, CS)
! and use the indexing of the corresponding u point.

real, dimension(SZI_(G),SZJ_(G)) :: &
Area_h, & ! The ocean area at h points, in m2. Area_h is used to find the
Area_h, & ! The ocean area at h points [m2]. Area_h is used to find the
! average thickness in the denominator of q. 0 for land points.
KE ! Kinetic energy per unit mass [m2 s-2], KE = (u^2 + v^2)/2.
real, dimension(SZIB_(G),SZJ_(G)) :: &
Expand Down Expand Up @@ -179,7 +179,7 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, CS)
real :: absolute_vorticity ! Absolute vorticity [s-1].
real :: relative_vorticity ! Relative vorticity [s-1].
real :: Ih ! Inverse of thickness [H-1 ~> m-1 or m2 kg-1].
real :: max_Ihq, min_Ihq ! The maximum and minimum of the nearby Ihq.
real :: max_Ihq, min_Ihq ! The maximum and minimum of the nearby Ihq [H-1 ~> m-1 or m2 kg-1].
real :: hArea_q ! The sum of area times thickness of the cells
! surrounding a q point [H m2 ~> m3 or kg].
real :: h_neglect ! A thickness that is so small it is usually
Expand Down
2 changes: 1 addition & 1 deletion src/core/MOM_PressureForce_Montgomery.F90
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ subroutine PressureForce_Mont_Bouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm, pbce,
! forces from astronomical sources and self-
! 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).
! density [Pa] (usually 2e7 Pa = 2000 dbar).
real :: I_Rho0 ! 1/Rho0 [m3 kg-1].
real :: G_Rho0 ! G_Earth / Rho0 [m5 Z-1 s-2 kg-1 ~> m4 s-2 kg-1].
real :: PFu_bc, PFv_bc ! The pressure gradient force due to along-layer
Expand Down
43 changes: 21 additions & 22 deletions src/core/MOM_barotropic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ module MOM_barotropic
!< The barotropic solvers estimate of the zonal velocity that will be the initial
!! condition for the next call to btstep [m s-1].
real ALLOCABLE_, dimension(NIMEMB_PTR_,NJMEM_) :: ubtav
!< The barotropic zonal velocity averaged over the baroclinic time step, m s-1.
!< The barotropic zonal velocity averaged over the baroclinic time step [m s-1].
real ALLOCABLE_, dimension(NIMEM_,NJMEMB_PTR_) :: IDatv
!< Inverse of the basin depth at v grid points [Z-1 ~> m-1].
real ALLOCABLE_, dimension(NIMEM_,NJMEMB_PTR_) :: lin_drag_v
Expand All @@ -127,7 +127,7 @@ module MOM_barotropic
!< The barotropic solvers estimate of the zonal velocity that will be the initial
!! condition for the next call to btstep [m s-1].
real ALLOCABLE_, dimension(NIMEM_,NJMEMB_PTR_) :: vbtav
!< The barotropic meridional velocity averaged over the baroclinic time step, m s-1.
!< The barotropic meridional velocity averaged over the baroclinic time step [m s-1].
real ALLOCABLE_, dimension(NIMEM_,NJMEM_) :: eta_cor
!< The difference between the free surface height from the barotropic calculation and the sum
!! of the layer thicknesses. This difference is imposed as a forcing term in the barotropic
Expand All @@ -138,18 +138,18 @@ module MOM_barotropic
real ALLOCABLE_, dimension(NIMEMW_,NJMEMW_) :: &
ua_polarity, & !< Test vector components for checking grid polarity.
va_polarity, & !< Test vector components for checking grid polarity.
bathyT !< A copy of bathyT (ocean bottom depth) with wide halos, in depth units
bathyT !< A copy of bathyT (ocean bottom depth) with wide halos [Z ~> m]
real ALLOCABLE_, dimension(NIMEMW_,NJMEMW_) :: IareaT
!< This is a copy of G%IareaT with wide halos, but will
!! still utilize the macro IareaT when referenced, m-2.
real ALLOCABLE_, dimension(NIMEMBW_,NJMEMW_) :: &
D_u_Cor, & !< A simply averaged depth at u points [Z ~> m].
dy_Cu, & !< A copy of G%dy_Cu with wide halos, in m.
IdxCu !< A copy of G%IdxCu with wide halos, in m-1.
dy_Cu, & !< A copy of G%dy_Cu with wide halos [m].
IdxCu !< A copy of G%IdxCu with wide halos [m-1].
real ALLOCABLE_, dimension(NIMEMW_,NJMEMBW_) :: &
D_v_Cor, & !< A simply averaged depth at v points [Z ~> m].
dx_Cv, & !< A copy of G%dx_Cv with wide halos, in m.
IdyCv !< A copy of G%IdyCv with wide halos, in m-1.
dx_Cv, & !< A copy of G%dx_Cv with wide halos [m].
IdyCv !< A copy of G%IdyCv with wide halos [m-1].
real ALLOCABLE_, dimension(NIMEMBW_,NJMEMBW_) :: &
q_D !< f / D at PV points [Z-1 s-1 ~> m-1 s-1].

Expand All @@ -159,8 +159,7 @@ module MOM_barotropic
type(BT_OBC_type) :: BT_OBC !< A structure with all of this modules fields
!! for applying open boundary conditions.

real :: Rho0 !< The density used in the Boussinesq
!! approximation [kg m-3 ~> m or kg m-2].
real :: Rho0 !< The density used in the Boussinesq approximation [kg m-3].
real :: dtbt !< The barotropic time step [s].
real :: dtbt_fraction !< The fraction of the maximum time-step that
!! should used. The default is 0.98.
Expand Down Expand Up @@ -210,11 +209,10 @@ module MOM_barotropic
logical :: dynamic_psurf !< If true, add a dynamic pressure due to a viscous
!! ice shelf, for instance.
real :: Dmin_dyn_psurf !< The minimum depth to use in limiting the size
!! of the dynamic surface pressure for stability,
!! in m.
!! of the dynamic surface pressure for stability [m].
real :: ice_strength_length !< The length scale at which the damping rate
!! due to the ice strength should be the same as if
!! a Laplacian were applied, in m.
!! a Laplacian were applied [m].
real :: const_dyn_psurf !< The constant that scales the dynamic surface
!! pressure, nondim. Stable values are < ~1.0.
!! The default is 0.9.
Expand Down Expand Up @@ -596,7 +594,7 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
! than physical problem would suggest.
real :: Instep ! The inverse of the number of barotropic time steps
! to take.
real :: wt_end ! The weighting of the final value of eta_PF, ND.
real :: wt_end ! The weighting of the final value of eta_PF [nondim]
integer :: nstep ! The number of barotropic time steps to take.
type(time_type) :: &
time_bt_start, & ! The starting time of the barotropic steps.
Expand Down Expand Up @@ -2394,18 +2392,18 @@ subroutine apply_velocity_OBCs(OBC, ubt, vbt, uhbt, vhbt, ubt_trans, vbt_trans,
real, dimension(SZIBW_(MS),SZJW_(MS)), intent(inout) :: uhbt !< the zonal barotropic transport
!! [H m2 s-1 ~> m3 s-1 or kg s-1].
real, dimension(SZIBW_(MS),SZJW_(MS)), intent(inout) :: ubt_trans !< the zonal barotropic velocity used in
!! transport, m s-1.
!! transport [m s-1].
real, dimension(SZIW_(MS),SZJBW_(MS)), intent(inout) :: vbt !< the meridional barotropic velocity [m s-1].
real, dimension(SZIW_(MS),SZJBW_(MS)), intent(inout) :: vhbt !< the meridional barotropic transport
!! [H m2 s-1 ~> m3 s-1 or kg s-1].
real, dimension(SZIW_(MS),SZJBW_(MS)), intent(inout) :: vbt_trans !< the meridional BT velocity used in transports,
!! m s-1.
real, dimension(SZIW_(MS),SZJBW_(MS)), intent(inout) :: vbt_trans !< the meridional BT velocity used in
!! transports [m s-1].
real, dimension(SZIW_(MS),SZJW_(MS)), intent(in) :: eta !< The barotropic free surface height anomaly or
!! column mass anomaly [H ~> m or kg m-2].
real, dimension(SZIBW_(MS),SZJW_(MS)), intent(in) :: ubt_old !< The starting value of ubt in a barotropic step,
!! m s-1.
real, dimension(SZIW_(MS),SZJBW_(MS)), intent(in) :: vbt_old !< The starting value of vbt in a barotropic step,
!! m s-1.
real, dimension(SZIBW_(MS),SZJW_(MS)), intent(in) :: ubt_old !< The starting value of ubt in a barotropic
!! step [m s-1].
real, dimension(SZIW_(MS),SZJBW_(MS)), intent(in) :: vbt_old !< The starting value of vbt in a barotropic
!! step [m s-1].
type(BT_OBC_type), intent(in) :: BT_OBC !< A structure with the private barotropic arrays
!! related to the open boundary conditions,
!! set by set_up_BT_OBC.
Expand Down Expand Up @@ -2440,7 +2438,7 @@ subroutine apply_velocity_OBCs(OBC, ubt, vbt, uhbt, vhbt, ubt_trans, vbt_trans,
! that does the mass transport [m s-1].
real :: H_u ! The total thickness at the u-point [H ~> m or kg m-2].
real :: H_v ! The total thickness at the v-point [H ~> m or kg m-2].
real :: cfl ! The CFL number at the point in question, ND.
real :: cfl ! The CFL number at the point in question [nondim]
real :: u_inlet
real :: v_inlet
real :: h_in
Expand Down Expand Up @@ -3636,7 +3634,8 @@ subroutine bt_mass_source(h, eta, set_cor, G, GV, CS)
type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure.
type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure.
real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thicknesses [H ~> m or kg m-2].
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: eta !< The free surface height that is to be corrected, in m.
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: eta !< The free surface height that is to be
!! corrected [H ~> m or kg m-2].
logical, intent(in) :: set_cor !< A flag to indicate whether to set the corrective
!! fluxes (and update the slowly varying part of eta_cor)
!! (.true.) or whether to incrementally update the
Expand Down
Loading

0 comments on commit 00b3289

Please sign in to comment.