Skip to content

Commit

Permalink
Documented 300 miscellaneous variable units
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 300 additional variables.  Also eliminated several redundant argument
documentation blocks.  Only comments have been changed and all answers are
bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Jan 29, 2019
1 parent 026f7d8 commit c2473a7
Show file tree
Hide file tree
Showing 74 changed files with 402 additions and 433 deletions.
20 changes: 10 additions & 10 deletions config_src/coupled_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ module MOM_surface_forcing
real :: latent_heat_vapor !< Latent heat of vaporization [J kg-1]

real :: max_p_surf !< The maximum surface pressure that can be
!! exerted by the atmosphere and floating sea-ice,
!! in Pa. This is needed because the FMS coupling
!! structure does not limit the water that can be
!! frozen out of the ocean and the ice-ocean heat
!! fluxes are treated explicitly.
!! exerted by the atmosphere and floating sea-ice [Pa].
!! This is needed because the FMS coupling structure
!! does not limit the water that can be frozen out
!! of the ocean and the ice-ocean heat fluxes are
!! treated explicitly.
logical :: use_limited_P_SSH !< If true, return the sea surface height with
!! the correction for the atmospheric (and sea-ice)
!! pressure limited by max_p_surf instead of the
Expand Down Expand Up @@ -1009,9 +1009,9 @@ end subroutine extract_IOB_stresses
!> Adds thermodynamic flux adjustments obtained via data_override
!! Component name is 'OCN'
!! Available adjustments are:
!! - hflx_adj (Heat flux into the ocean, in W m-2)
!! - sflx_adj (Salt flux into the ocean, in kg salt m-2 s-1)
!! - prcme_adj (Fresh water flux into the ocean, in kg m-2 s-1)
!! - hflx_adj (Heat flux into the ocean [W m-2])
!! - sflx_adj (Salt flux into the ocean [kg salt m-2 s-1])
!! - prcme_adj (Fresh water flux into the ocean [kg m-2 s-1])
subroutine apply_flux_adjustments(G, CS, Time, fluxes)
type(ocean_grid_type), intent(inout) :: G !< Ocean grid structure
type(surface_forcing_CS), pointer :: CS !< Surface forcing control structure
Expand Down Expand Up @@ -1054,8 +1054,8 @@ end subroutine apply_flux_adjustments
!> Adds mechanical forcing adjustments obtained via data_override
!! Component name is 'OCN'
!! Available adjustments are:
!! - taux_adj (Zonal wind stress delta, positive to the east, in Pa)
!! - tauy_adj (Meridional wind stress delta, positive to the north, in Pa)
!! - taux_adj (Zonal wind stress delta, positive to the east [Pa])
!! - tauy_adj (Meridional wind stress delta, positive to the north [Pa])
subroutine apply_force_adjustments(G, CS, Time, forces)
type(ocean_grid_type), intent(inout) :: G !< Ocean grid structure
type(surface_forcing_CS), pointer :: CS !< Surface forcing control structure
Expand Down
22 changes: 11 additions & 11 deletions config_src/coupled_driver/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ module ocean_model_mod
real, pointer, dimension(:,:) :: &
t_surf => NULL(), & !< SST on t-cell (degrees Kelvin)
s_surf => NULL(), & !< SSS on t-cell (psu)
u_surf => NULL(), & !< i-velocity at the locations indicated by stagger, m/s.
v_surf => NULL(), & !< j-velocity at the locations indicated by stagger, m/s.
u_surf => NULL(), & !< i-velocity at the locations indicated by stagger [m s-1].
v_surf => NULL(), & !< j-velocity at the locations indicated by stagger [m s-1].
sea_lev => NULL(), & !< Sea level in m after correction for surface pressure,
!! i.e. dzt(1) + eta_t + patm/rho0/grav (m)
frazil =>NULL(), & !< Accumulated heating (in Joules/m^2) from frazil
!! i.e. dzt(1) + eta_t + patm/rho0/grav [m]
frazil =>NULL(), & !< Accumulated heating [J m-2] from frazil
!! formation in the ocean.
area => NULL() !< cell area of the ocean surface, in m2.
area => NULL() !< cell area of the ocean surface [m2].
type(coupler_2d_bc_type) :: fields !< A structure that may contain named
!! arrays of tracer-related surface fields.
integer :: avg_kount !< A count of contributions to running
Expand Down Expand Up @@ -154,8 +154,8 @@ module ocean_model_mod
logical :: icebergs_alter_ocean !< If true, the icebergs can change ocean the
!! ocean dynamics and forcing fluxes.
real :: press_to_z !< A conversion factor between pressure and ocean
!! depth in m, usually 1/(rho_0*g), in m Pa-1.
real :: C_p !< The heat capacity of seawater, in J K-1 kg-1.
!! depth in m, usually 1/(rho_0*g) [m Pa-1].
real :: C_p !< The heat capacity of seawater [J degC-1 kg-1].
logical :: offline_tracer_mode = .false. !< If false, use the model in prognostic mode
!! with the barotropic and baroclinic dynamics, thermodynamics,
!! etc. stepped forward integrated in time.
Expand All @@ -169,8 +169,8 @@ module ocean_model_mod
!! If false, the two phases are advanced with
!! separate calls. The default is true.
! The following 3 variables are only used here if single_step_call is false.
real :: dt !< (baroclinic) dynamics time step (seconds)
real :: dt_therm !< thermodynamics time step (seconds)
real :: dt !< (baroclinic) dynamics time step [s]
real :: dt_therm !< thermodynamics time step [s]
logical :: thermo_spans_coupling !< If true, thermodynamic and tracer time
!! steps can span multiple coupled time steps.
logical :: diabatic_first !< If true, apply diabatic and thermodynamic
Expand Down Expand Up @@ -820,9 +820,9 @@ subroutine convert_state_to_ocean_type(sfc_state, Ocean_sfc, G, patm, press_to_z
!! visible ocean surface fields, whose elements
!! have their data set here.
type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure
real, optional, intent(in) :: patm(:,:) !< The pressure at the ocean surface, in Pa.
real, optional, intent(in) :: patm(:,:) !< The pressure at the ocean surface [Pa].
real, optional, intent(in) :: press_to_z !< A conversion factor between pressure and
!! ocean depth in m, usually 1/(rho_0*g), in m Pa-1.
!! ocean depth in m, usually 1/(rho_0*g) [m Pa-1].
! Local variables
real :: IgR0
character(len=48) :: val_str
Expand Down
2 changes: 1 addition & 1 deletion config_src/ice_solo_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ subroutine wind_forcing_from_file(sfc_state, forces, day, G, US, CS)
! be reset, depending on the time.
character(len=200) :: filename ! The name of the input file.
real :: temp_x(SZI_(G),SZJ_(G)) ! Pseudo-zonal and psuedo-meridional
real :: temp_y(SZI_(G),SZJ_(G)) ! wind stresses at h-points, in Pa.
real :: temp_y(SZI_(G),SZJ_(G)) ! wind stresses at h-points [Pa].
integer :: days, seconds

call callTree_enter("wind_forcing_from_file, MOM_surface_forcing.F90")
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 @@ -236,7 +236,7 @@ subroutine USER_buoyancy_forcing(sfc_state, fluxes, day, dt, G, CS)
enddo ; enddo
else ! This is the buoyancy only mode.
do j=js,je ; do i=is,ie
! fluxes%buoy is the buoyancy flux into the ocean in m2 s-3. A positive
! fluxes%buoy is the buoyancy flux into the ocean [m2 s-3]. A positive
! buoyancy flux is of the same sign as heating the ocean.
fluxes%buoy(i,j) = 0.0 * G%mask2dT(i,j)
enddo ; enddo
Expand Down
2 changes: 1 addition & 1 deletion config_src/solo_driver/MESO_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ subroutine MESO_buoyancy_forcing(sfc_state, fluxes, day, dt, G, CS)
enddo ; enddo
else ! This is the buoyancy only mode.
do j=js,je ; do i=is,ie
! fluxes%buoy is the buoyancy flux into the ocean in m2 s-3. A positive
! fluxes%buoy is the buoyancy flux into the ocean [m2 s-3]. A positive
! buoyancy flux is of the same sign as heating the ocean.
fluxes%buoy(i,j) = 0.0 * G%mask2dT(i,j)
enddo ; enddo
Expand Down
4 changes: 2 additions & 2 deletions config_src/solo_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ module MOM_surface_forcing
real :: Flux_const !< piston velocity for surface restoring [m s-1]
real :: Flux_const_T !< piston velocity for surface temperature restoring [m s-1]
real :: Flux_const_S !< piston velocity for surface salinity restoring [m s-1]
real :: latent_heat_fusion !< latent heat of fusion [J kg]
real :: latent_heat_vapor !< latent heat of vaporization [J kg]
real :: latent_heat_fusion !< latent heat of fusion [J kg-1]
real :: latent_heat_vapor !< latent heat of vaporization [J kg-1]
real :: tau_x0 !< Constant zonal wind stress used in the WIND_CONFIG="const" forcing
real :: tau_y0 !< Constant meridional wind stress used in the WIND_CONFIG="const" forcing

Expand Down
4 changes: 2 additions & 2 deletions config_src/solo_driver/Neverland_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ subroutine Neverland_buoyancy_forcing(sfc_state, fluxes, day, dt, G, CS)
type(Neverland_surface_forcing_CS), pointer :: CS !< Control structure for this module.
! Local variables
real :: buoy_rest_const ! A constant relating density anomalies to the
! restoring buoyancy flux, in m5 s-3 kg-1.
! restoring buoyancy flux [m5 s-3 kg-1].
real :: density_restore ! De
integer :: i, j, is, ie, js, je
integer :: isd, ied, jsd, jed
Expand Down Expand Up @@ -179,7 +179,7 @@ subroutine Neverland_buoyancy_forcing(sfc_state, fluxes, day, dt, G, CS)
"Temperature/salinity restoring not coded!" )
else ! This is the buoyancy only mode.
do j=js,je ; do i=is,ie
! fluxes%buoy is the buoyancy flux into the ocean in m2 s-3. A positive
! fluxes%buoy is the buoyancy flux into the ocean [m2 s-3]. A positive
! buoyancy flux is of the same sign as heating the ocean.
fluxes%buoy(i,j) = 0.0 * G%mask2dT(i,j)
enddo ; enddo
Expand Down
2 changes: 1 addition & 1 deletion config_src/solo_driver/user_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ subroutine USER_buoyancy_forcing(sfc_state, fluxes, day, dt, G, CS)
enddo ; enddo
else ! This is the buoyancy only mode.
do j=js,je ; do i=is,ie
! fluxes%buoy is the buoyancy flux into the ocean in m2 s-3. A positive
! fluxes%buoy is the buoyancy flux into the ocean [m2 s-3]. A positive
! buoyancy flux is of the same sign as heating the ocean.
fluxes%buoy(i,j) = 0.0 * G%mask2dT(i,j)
enddo ; enddo
Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_continuity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ subroutine continuity(u, v, hin, h, uh, vh, dt, G, GV, CS, uhbt, vhbt, OBC, &
!! give vhbt as the depth-integrated transport [m s-1].
real, dimension(SZIB_(G),SZJ_(G)), &
optional, intent(in) :: uhbt_aux !< A second summed zonal
!! volume flux in m3/s.
!! volume flux [H m2 s-1 ~> m3 s-1 or kg s-1].
real, dimension(SZI_(G),SZJB_(G)), &
optional, intent(in) :: vhbt_aux !< A second summed meridional
!! volume flux in m3/s.
!! volume flux [H m2 s-1 ~> m3 s-1 or kg s-1].
real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
optional, intent(inout) :: u_cor_aux !< The zonal velocities
!! that give uhbt_aux as the depth-integrated transport [m s-1].
Expand Down
7 changes: 3 additions & 4 deletions src/core/MOM_dynamics_split_RK2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ subroutine step_MOM_dyn_split_RK2(u, v, h, tv, visc, &
type(thermo_var_ptrs), intent(in) :: tv !< thermodynamic type
type(vertvisc_type), intent(inout) :: visc !< vertical visc, bottom drag, and related
type(time_type), intent(in) :: Time_local !< model time at end of time step
real, intent(in) :: dt !< time step (sec)
real, intent(in) :: dt !< time step [s]
type(mech_forcing), intent(in) :: forces !< A structure with the driving mechanical forces
real, dimension(:,:), pointer :: p_surf_begin !< surf pressure at start of this dynamic
!! time step [Pa]
Expand Down Expand Up @@ -316,8 +316,7 @@ subroutine step_MOM_dyn_split_RK2(u, v, h, tv, visc, &
u_init => NULL(), v_init => NULL(), & ! Pointers to u and v or u_adj and v_adj.
u_av, & ! The zonal velocity time-averaged over a time step [m s-1].
v_av, & ! The meridional velocity time-averaged over a time step [m s-1].
h_av ! The layer thickness time-averaged over a time step, in m or
! kg m-2.
h_av ! The layer thickness time-averaged over a time step [H ~> m or kg m-2].
real :: Idt
logical :: dyn_p_surf
logical :: BT_cont_BT_thick ! If true, use the BT_cont_type to estimate the
Expand Down Expand Up @@ -974,7 +973,7 @@ subroutine initialize_dyn_split_RK2(u, v, h, uh, vh, eta, Time, G, GV, US, param
type(diag_ctrl), target, intent(inout) :: diag !< to control diagnostics
type(MOM_dyn_split_RK2_CS), pointer :: CS !< module control structure
type(MOM_restart_CS), pointer :: restart_CS !< restart control structure
real, intent(in) :: dt !< time step (sec)
real, intent(in) :: dt !< time step [s]
type(accel_diag_ptrs), target, intent(inout) :: Accel_diag !< points to momentum equation terms for
!! budget analysis
type(cont_diag_ptrs), target, intent(inout) :: Cont_diag !< points to terms in continuity equation
Expand Down
2 changes: 1 addition & 1 deletion src/core/MOM_forcing_type.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ subroutine get_net_mass_forcing(fluxes, G, net_mass_src)
type(forcing), intent(in) :: fluxes !< A structure containing thermodynamic forcing fields
type(ocean_grid_type), intent(in) :: G !< The ocean grid type
real, dimension(SZI_(G),SZJ_(G)), intent(out) :: net_mass_src !< The net mass flux of water into the ocean
!! in kg m-2 s-1.
!! [kg m-2 s-1].

integer :: i, j, is, ie, js, je
is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec
Expand Down
20 changes: 10 additions & 10 deletions src/core/MOM_open_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module MOM_open_boundary
real, pointer, dimension(:,:,:) :: buffer_src=>NULL() !< buffer for segment data located at cell faces
!! and on the original vertical grid
integer :: nk_src !< Number of vertical levels in the source data
real, dimension(:,:,:), pointer :: dz_src=>NULL() !< vertical grid cell spacing of the incoming segment data (m)
real, dimension(:,:,:), pointer :: dz_src=>NULL() !< vertical grid cell spacing of the incoming segment data [m]
real, dimension(:,:,:), pointer :: buffer_dst=>NULL() !< buffer src data remapped to the target vertical grid
real, dimension(:,:), pointer :: bt_vel=>NULL() !< barotropic velocity [m s-1]
real :: value !< constant value if fid is equal to -1
Expand Down Expand Up @@ -135,15 +135,15 @@ module MOM_open_boundary
integer :: Ie_obc !< i-indices of boundary segment.
integer :: Js_obc !< j-indices of boundary segment.
integer :: Je_obc !< j-indices of boundary segment.
real :: Velocity_nudging_timescale_in !< Nudging timescale on inflow (s).
real :: Velocity_nudging_timescale_out !< Nudging timescale on outflow (s).
real :: Velocity_nudging_timescale_in !< Nudging timescale on inflow [s].
real :: Velocity_nudging_timescale_out !< Nudging timescale on outflow [s].
logical :: on_pe !< true if segment is located in the computational domain
logical :: temp_segment_data_exists !< true if temperature data arrays are present
logical :: salt_segment_data_exists !< true if salinity data arrays are present
real, pointer, dimension(:,:) :: Cg=>NULL() !< The external gravity
!! wave speed (m -s) at OBC-points.
real, pointer, dimension(:,:) :: Htot=>NULL() !< The total column thickness (m) at OBC-points.
real, pointer, dimension(:,:,:) :: h=>NULL() !< The cell thickness (m) at OBC-points.
real, pointer, dimension(:,:) :: Cg=>NULL() !< The external gravity wave speed [m s-1]
!! at OBC-points.
real, pointer, dimension(:,:) :: Htot=>NULL() !< The total column thickness [m] at OBC-points.
real, pointer, dimension(:,:,:) :: h=>NULL() !< The cell thickness [m] at OBC-points.
real, pointer, dimension(:,:,:) :: normal_vel=>NULL() !< The layer velocity normal to the OB
!! segment [m s-1].
real, pointer, dimension(:,:,:) :: tangential_vel=>NULL() !< The layer velocity tangential to the
Expand All @@ -154,13 +154,13 @@ module MOM_open_boundary
!! segment (m3 s-1).
real, pointer, dimension(:,:) :: normal_vel_bt=>NULL() !< The barotropic velocity normal to
!! the OB segment [m s-1].
real, pointer, dimension(:,:) :: eta=>NULL() !< The sea-surface elevation along the segment (m).
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]
real, pointer, dimension(:,:,:) :: grad_tan=>NULL() !< The gradient of the tangential flow along the
!! segment [s-1]
real, pointer, dimension(:,:,:) :: grad_gradient=>NULL() !< The gradient of the gradient of tangential flow along the
!! segment (m-1 s-1)
!! segment [m-1 s-1]
real, pointer, dimension(:,:,:) :: rx_normal=>NULL() !< The rx_old_u value for radiation coeff
!! for normal velocity
real, pointer, dimension(:,:,:) :: ry_normal=>NULL() !< The tangential value for radiation coeff
Expand All @@ -175,7 +175,7 @@ module MOM_open_boundary
!! 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)
real :: Tr_InvLscale3_out !< An effective inverse length scale cubed [m-3]
real :: Tr_InvLscale3_in !< for restoring the tracer concentration in a
!! ficticious reservior towards interior values
!! when flow is exiting the domain, or towards
Expand Down
4 changes: 2 additions & 2 deletions src/core/MOM_variables.F90
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ module MOM_variables
real :: P_Ref !< The coordinate-density reference pressure [Pa].
!! This is the pressure used to calculate Rml from
!! T and S when eqn_of_state is associated.
real :: C_p !< The heat capacity of seawater [J K-1 kg-1].
real :: C_p !< The heat capacity of seawater [J degC-1 kg-1].
!! When conservative temperature is used, this is
!! constant and exactly 3991.86795711963 J K kg-1.
!! constant and exactly 3991.86795711963 J degC-1 kg-1.
logical :: T_is_conT = .false. !< If true, the temperature variable tv%T is
!! actually the conservative temperature [degC].
logical :: S_is_absS = .false. !< If true, the salinity variable tv%S is
Expand Down
Loading

0 comments on commit c2473a7

Please sign in to comment.