Skip to content

Commit

Permalink
Documented 206 density 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 206 variables, including numerous densities and masses per unit area.
Only comments have been changed and all answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Jan 31, 2019
1 parent b45fccd commit e7de91a
Show file tree
Hide file tree
Showing 17 changed files with 211 additions and 212 deletions.
124 changes: 62 additions & 62 deletions src/SIS2_ice_thm.F90

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/SIS_dyn_bgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ module SIS_dyn_bgrid
sig22 => NULL() !< The yy component of the stress tensor [Pa m] (or N m-1).

! parameters for calculating water drag and internal ice stresses
real :: p0 = 2.75e4 !< Hibbler rheology pressure constant (Pa)
real :: p0_rho !< The pressure constant divided by ice density, N m kg-1.
real :: p0 = 2.75e4 !< Hibbler rheology pressure constant [Pa]
real :: p0_rho !< The pressure constant divided by ice density [N m kg-1].
real :: c0 = 20.0 !< another pressure constant
real :: cdw = 3.24e-3 !< ice/water drag coef. (nondim)
real :: blturn = 0.0 !< air/water surf. turning angle (degrees)
real :: EC = 2.0 !< yield curve axis ratio
real :: MIV_MIN = 1.0 !< min ice mass to do dynamics (kg/m^2)
real :: Rho_ocean = 1030.0 !< The nominal density of sea water, in kg m-3.
real :: Rho_ice = 905.0 !< The nominal density of sea ice, in kg m-3.
real :: MIV_MIN = 1.0 !< min ice mass to do dynamics [kg m-2]
real :: Rho_ocean = 1030.0 !< The nominal density of sea water [kg m-3].
real :: Rho_ice = 905.0 !< The nominal density of sea ice [kg m-3].
logical :: debug !< If true, write verbose checksums for debugging purposes.
logical :: debug_redundant !< If true, debug redundant points
integer :: evp_sub_steps !< The number of iterations in the EVP dynamics
Expand Down
39 changes: 19 additions & 20 deletions src/SIS_dyn_cgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ module SIS_dyn_cgrid
real :: c0 = 20.0 !< another pressure constant
real :: cdw = 3.24e-3 !< ice/water drag coef. (nondim)
real :: EC = 2.0 !< yield curve axis ratio
real :: Rho_ocean = 1030.0 !< The nominal density of sea water, in kg m-3.
real :: Rho_ice = 905.0 !< The nominal density of sea ice, in kg m-3.
real :: Rho_ocean = 1030.0 !< The nominal density of sea water [kg m-3].
real :: Rho_ice = 905.0 !< The nominal density of sea ice [kg m-3].
real :: drag_bg_vel2 = 0.0 !< A background (subgridscale) velocity for drag
!< with the ocean squared, in m2 s-2.
real :: min_ocn_inertial_h = 0. !< A minimum ocean thickness used to limit the viscous coupling
Expand Down Expand Up @@ -490,7 +490,7 @@ subroutine SIS_C_dynamics(ci, mis, mice, ui, vi, uo, vo, &
diag_val_u, & ! A temporary diagnostic array.
u_tmp, & ! A temporary copy of the old values of ui, in m s-1.
u_IC, & ! The initial zonal ice velocities, in m s-1.
mi_u, & ! The total ice and snow mass interpolated to u points, in kg m-2.
mi_u, & ! The total ice and snow mass interpolated to u points [kg m-2].
f2dt_u, &! The squared effective Coriolis parameter at u-points times a
! time step, in s-1.
I1_f2dt2_u ! 1 / ( 1 + f^2 dt^2) at u-points, nondimensional.
Expand All @@ -503,7 +503,7 @@ subroutine SIS_C_dynamics(ci, mis, mice, ui, vi, uo, vo, &
PFv, & ! Meridional hydrostatic pressure driven acceleration, in m s-2.
diag_val_v, & ! A temporary diagnostic array.
v_IC, & ! The initial meridional ice velocities, in m s-1.
mi_v, & ! The total ice and snow mass interpolated to v points, in kg m-2.
mi_v, & ! The total ice and snow mass interpolated to v points [kg m-2].
f2dt_v, &! The squared effective Coriolis parameter at v-points times a
! time step, in s-1.
I1_f2dt2_v ! 1 / ( 1 + f^2 dt^2) at v-points, nondimensional.
Expand All @@ -526,19 +526,19 @@ subroutine SIS_C_dynamics(ci, mis, mice, ui, vi, uo, vo, &
! directions.

real :: Cor ! A Coriolis accleration, in m s-2.
real :: fxic_now, fyic_now ! ice internal stress convergence, in kg m-1 s-2.
real :: drag_u, drag_v ! Drag rates with the ocean at u & v points, in kg m-2 s-1.
real :: drag_max ! A maximum drag rate allowed in the ocean, in kg m-2 s-1.
real :: fxic_now, fyic_now ! ice internal stress convergence [kg m-1 s-2].
real :: drag_u, drag_v ! Drag rates with the ocean at u & v points [kg m-2 s-1].
real :: drag_max ! A maximum drag rate allowed in the ocean [kg m-2 s-1].
real :: tot_area ! The sum of the area of the four neighboring cells, in m2.
real :: dxharm ! The harmonic mean of the x- and y- grid spacings, in m.
real :: muq2, mvq2 ! The product of the u- and v-face masses per unit cell
! area surrounding a vorticity point, in kg2 m-4.
! area surrounding a vorticity point [kg2 m-4].
real :: muq, mvq ! The u- and v-face masses per unit cell area extrapolated
! to a vorticity point on the coast, in kg m-2.
! to a vorticity point on the coast [kg m-2].
real :: pres_sum ! The sum of the internal ice pressures aroung a point [Pa].
real :: min_rescale ! The smallest of the 4 surrounding values of rescale, ND.
real :: I_1pdt_T ! 1.0 / (1.0 + dt_2Tdamp)
real :: I_1pE2dt_T ! 1.0 / (1.0 + EC^2 * dt_2Tdamp)
real :: I_1pdt_T ! 1.0 / (1.0 + dt_2Tdamp), ND.
real :: I_1pE2dt_T ! 1.0 / (1.0 + EC^2 * dt_2Tdamp), ND.

real :: v2_at_u ! The squared v-velocity interpolated to u points, in m s-1.
real :: u2_at_v ! The squared u-velocity interpolated to v points, in m s-1.
Expand All @@ -548,13 +548,12 @@ subroutine SIS_C_dynamics(ci, mis, mice, ui, vi, uo, vo, &
real :: b_vel0 ! The initial difference between the velocity magnitude
! and the absolute value of the u- or v- component, plus
! the ice thickness divided by the time step and the drag
! coefficient, all in m s-1.
! coefficient [m s-1].
real :: uio_C ! A u-velocity difference between the ocean and ice, in m s-1.
real :: vio_C ! A v-velocity difference between the ocean and ice, in m s-1.

real :: Tdamp ! The damping timescale of the stress tensor components
! toward their equilibrium solution due to the elastic terms,
! in s.
! toward their equilibrium solution due to the elastic terms, in s.
real :: dt ! The short timestep associated with the EVP dynamics, in s.
real :: dt_2Tdamp ! The ratio of the timestep to the elastic damping timescale.
real :: dt_cumulative ! The elapsed time within this call to EVP dynamics, in s.
Expand All @@ -567,9 +566,9 @@ subroutine SIS_C_dynamics(ci, mis, mice, ui, vi, uo, vo, &
real :: I_2EC ! 1/(2*EC), where EC is the yield curve axis ratio.
real, parameter :: H_subroundoff = 1e-30 ! A negligible thickness, in m, that
! can be cubed without underflow.
real :: m_neglect ! A tiny mass per unit area, in kg m-2.
real :: m_neglect2 ! A tiny mass per unit area squared, in kg2 m-4.
real :: m_neglect4 ! A tiny mass per unit area to the 4th power, in kg4 m-8.
real :: m_neglect ! A tiny mass per unit area [kg m-2].
real :: m_neglect2 ! A tiny mass per unit area squared [kg2 m-4].
real :: m_neglect4 ! A tiny mass per unit area to the 4th power [kg4 m-8].
real :: sum_area ! The sum of ocean areas around a vorticity point, in m2.

type(time_type) :: &
Expand Down Expand Up @@ -1355,7 +1354,7 @@ subroutine limit_stresses(pres_mice, mice, str_d, str_t, str_s, G, CS, limit)
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: pres_mice !< The ice internal pressure per
!! unit column mass, in N m / kg.
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: mice !< The mass per unit total area (ice
!! covered and ice free) of the ice, in kg m-2.
!! covered and ice free) of the ice [kg m-2].
real, dimension(SZI_(G),SZJ_(G)), intent(inout) :: str_d !< The divergence stress tensor component [Pa m].
real, dimension(SZI_(G),SZJ_(G)), intent(inout) :: str_t !< The tension stress tensor component [Pa m].
real, dimension(SZIB_(G),SZJB_(G)), intent(inout) :: str_s !< The shearing stress tensor component [Pa m].
Expand Down Expand Up @@ -1656,7 +1655,7 @@ subroutine write_u_trunc(I, j, ui, u_IC, uo, mis, fxoc, fxic, Cor_u, PFu, fxat,
real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: ui !< The zonal ice velicity in m s-1.
real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: u_IC !< The initial zonal ice velicity in m s-1.
real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: uo !< The zonal ocean velicity in m s-1.
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: mis !< The mass of ice an snow per unit ocean area, in kg m-2
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: mis !< The mass of ice an snow per unit ocean area [kg m-2]
real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: fxoc !< The zonal ocean-to-ice force [Pa].
real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: fxic !< The ice internal force [Pa].
real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: Cor_u !< The zonal Coriolis acceleration, in m s-2.
Expand Down Expand Up @@ -1726,7 +1725,7 @@ subroutine write_v_trunc(i, J, vi, v_IC, vo, mis, fyoc, fyic, Cor_v, PFv, fyat,
real, dimension(SZI_(G),SZJB_(G)), intent(in) :: vi !< The meridional ice velicity in m s-1.
real, dimension(SZI_(G),SZJB_(G)), intent(in) :: v_IC !< The initial meridional ice velicity in m s-1.
real, dimension(SZI_(G),SZJB_(G)), intent(in) :: vo !< The meridional ocean velicity in m s-1.
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: mis !< The mass of ice an snow per unit ocean area, in kg m-2
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: mis !< The mass of ice an snow per unit ocean area [kg m-2]
real, dimension(SZI_(G),SZJB_(G)), intent(in) :: fyoc !< The meridional ocean-to-ice force [Pa].
real, dimension(SZI_(G),SZJB_(G)), intent(in) :: fyic !< The ice internal force [Pa].
real, dimension(SZI_(G),SZJB_(G)), intent(in) :: Cor_v !< The meridional Coriolis acceleration, in m s-2.
Expand Down
12 changes: 6 additions & 6 deletions src/SIS_dyn_trans.F90
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ subroutine update_icebergs(IST, OSS, IOF, FIA, icebergs_CS, dt_slow, G, IG, CS)
real, dimension(G%isc:G%iec, G%jsc:G%jec) :: &
windstr_x, & ! The area-weighted average ice thickness [Pa].
windstr_y ! The area-weighted average ice thickness [Pa].
real :: rho_ice ! The nominal density of sea ice in kg m-3.
real :: rho_ice ! The nominal density of sea ice [kg m-3].
real :: H_to_m_ice ! The specific volume of ice times the conversion factor
! from thickness units, in m H-1.
integer :: stress_stagger
Expand Down Expand Up @@ -280,8 +280,8 @@ subroutine SIS_dynamics_trans(IST, OSS, FIA, IOF, dt_slow, CS, icebergs_CS, G, I

! Local variables
real, dimension(SZI_(G),SZJ_(G)) :: &
mi_sum, & ! Masses of ice per unit total area, in kg m-2.
misp_sum, & ! Combined mass of snow, ice and melt pond water per unit total area, in kg m-2.
mi_sum, & ! Masses of ice per unit total area [kg m-2].
misp_sum, & ! Combined mass of snow, ice and melt pond water per unit total area [kg m-2].
ice_free, & ! The fractional open water; nondimensional, between 0 & 1.
ice_cover ! The fractional ice coverage, summed across all
! thickness categories; nondimensional, between 0 & 1.
Expand Down Expand Up @@ -688,8 +688,8 @@ subroutine post_ice_state_diagnostics(CS, IST, OSS, IOF, dt_slow, Time, G, IG, d
real, dimension(SZI_(G),SZJ_(G)) :: diagVar ! An temporary array for diagnostics.
real, dimension(IG%NkIce) :: S_col ! Specified thermodynamic salinity of each
! ice layer if spec_thermo_sal is true.
real :: rho_ice ! The nominal density of sea ice in kg m-3.
real :: rho_snow ! The nominal density of snow in kg m-3.
real :: rho_ice ! The nominal density of sea ice [kg m-3].
real :: rho_snow ! The nominal density of snow [kg m-3].
real :: enth_units, I_enth_units
real :: tmp_mca ! A temporary cell averaged mass, in H.
real :: I_Nk ! The inverse of the number of layers in the ice.
Expand Down Expand Up @@ -722,7 +722,7 @@ subroutine post_ice_state_diagnostics(CS, IST, OSS, IOF, dt_slow, Time, G, IG, d
if (CS%id_mib>0) then
if (associated(IOF%mass_berg)) then
do j=jsc,jec ; do i=isc,iec
mass(i,j) = (mass(i,j) + IOF%mass_berg(i,j)) ! Add icebergs mass in kg/m^2
mass(i,j) = (mass(i,j) + IOF%mass_berg(i,j)) ! Add icebergs mass [kg m-2]
enddo ; enddo
endif
call post_data(CS%id_mib, mass(isc:iec,jsc:jec), diag)
Expand Down
16 changes: 8 additions & 8 deletions src/SIS_fast_thermo.F90
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ subroutine sum_top_quantities (FIA, ABT, flux_u, flux_v, flux_sh, evap, &
!! the atmosphere in W m-2.
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce), &
intent(in) :: evap !< The upward flux of water due to sublimation or evaporation
!! from the top of the ice to the atmosphere, in kg m-2 s-1.
!! from the top of the ice to the atmosphere [kg m-2 s-1].
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce), &
intent(in) :: flux_lw !< The net longwave heat flux from the atmosphere into the
!! ice or ocean, in W m-2.
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce), &
intent(in) :: lprec !< The liquid precipitation onto the ice in kg m-2 s-1.
intent(in) :: lprec !< The liquid precipitation onto the ice [kg m-2 s-1].
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce), &
intent(in) :: fprec !< The frozen precipitation onto the ice in kg m-2 s-1.
intent(in) :: fprec !< The frozen precipitation onto the ice [kg m-2 s-1].
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce), &
intent(in) :: flux_lh !< The upward latent heat flux associated with sublimation or
!! evaporation, in W m-2.
Expand All @@ -129,7 +129,7 @@ subroutine sum_top_quantities (FIA, ABT, flux_u, flux_v, flux_sh, evap, &
!! the atmosphere when the skin temperature is 0 degC, in W m-2.
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce), &
intent(in) :: evap_T0 !< The sublimation rate when the skin temperature is 0 degC,
!! in kg m-2 s-1.
!! [kg m-2 s-1].
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce), &
intent(in) :: lw_T0 !< The downward longwave heat flux from the atmosphere into the
!! ice or ocean when the skin temperature is 0 degC, in W m-2.
Expand Down Expand Up @@ -590,7 +590,7 @@ subroutine do_update_ice_model_fast(Atmos_boundary, IST, sOSS, Rad, FIA, &
flux_sh, & ! The upward sensible heat flux from the ice to the atmosphere
! at the surface of the ice, in W m-2.
evap, & ! The upward flux of water due to sublimation or evaporation
! from the top of the ice to the atmosphere, in kg m-2 s-1.
! from the top of the ice to the atmosphere [kg m-2 s-1].
flux_lh, & ! The upward latent heat flux associated with sublimation or
! evaporation, in W m-2.
flux_lw, & ! The net downward longwave heat flux into the ice, in W m-2.
Expand All @@ -599,7 +599,7 @@ subroutine do_update_ice_model_fast(Atmos_boundary, IST, sOSS, Rad, FIA, &
sh_T0, & ! The upward sensible heat flux from the top of the ice into
! the atmosphere when the skin temperature is 0 degC, in W m-2.
evap_T0, & ! The sublimation rate when the skin temperature is 0 degC,
! in kg m-2 s-1.
! [kg m-2 s-1].
lw_T0, & ! The downward longwave heat flux from the atmosphere into the
! ice or ocean when the skin temperature is 0 degC, in W m-2.
dshdt, & ! The derivative of the upward sensible heat flux with the surface
Expand Down Expand Up @@ -887,8 +887,8 @@ subroutine redo_update_ice_model_fast(IST, sOSS, Rad, FIA, TSF, optics_CSp, &
real :: hf_0 ! The positive upward surface heat flux when T_sfc = 0 degC, in W m-2.
real :: dhf_dt ! The deriviative of the upward surface heat flux with Ts, in W m-2 C-1.
real :: sw_tot ! sum over dir/dif vis/nir components
real :: rho_ice ! The nominal density of sea ice in kg m-3.
real :: rho_snow ! The nominal density of snow in kg m-3.
real :: rho_ice ! The nominal density of sea ice [kg m-3].
real :: rho_snow ! The nominal density of snow [kg m-3].
real, dimension(size(FIA%flux_sw_top,4)) :: &
albedos ! The ice albedos by directional and wavelength band.
real, dimension(IG%NkIce) :: &
Expand Down
10 changes: 5 additions & 5 deletions src/SIS_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ end subroutine SIS_optics_init
!> ice_optics_SIS2 sets albedo, penetrating solar, and ice/snow transmissivity
subroutine ice_optics_SIS2(mp, hs, hi, ts, tfw, NkIce, albedos, abs_sfc, &
abs_snow, abs_ice_lay, abs_ocn, abs_int, CS, ITV, coszen_in)
real, intent(in ) :: mp !< pond mass (kg/m2)
real, intent(in ) :: mp !< pond mass [kg m-2]
real, intent(in ) :: hs !< snow thickness (m-snow)
real, intent(in ) :: hi !< ice thickness (m-ice)
real, intent(in ) :: ts !< surface temperature [degC].
Expand All @@ -185,9 +185,9 @@ subroutine ice_optics_SIS2(mp, hs, hi, ts, tfw, NkIce, albedos, abs_sfc, &
real :: SW_frac_top ! The fraction of the SW at the top of the snow that
! is still present at the top of each ice layer (ND).
real :: opt_decay_lay ! The optical extinction in each ice layer (ND).
real :: rho_ice ! The nominal density of sea ice in kg m-3.
real :: rho_snow ! The nominal density of snow in kg m-3.
real :: rho_water ! The nominal density of sea water in kg m-3.
real :: rho_ice ! The nominal density of sea ice [kg m-3].
real :: rho_snow ! The nominal density of snow [kg m-3].
real :: rho_water ! The nominal density of sea water [kg m-3].
real :: pen ! The fraction of the shortwave flux that will pass
! below the surface (frac 1-pen absorbed at the surface)
real :: sal_ice_top(1) ! A specified surface salinity of ice.
Expand Down Expand Up @@ -225,7 +225,7 @@ subroutine ice_optics_SIS2(mp, hs, hi, ts, tfw, NkIce, albedos, abs_sfc, &
hprad ! pond depth (m) for radiation code - may be diagnosed

real (kind=dbl_kind), dimension (1,1,1) :: &
rhosnw , & ! density in snow layer (kg/m3)
rhosnw , & ! density in snow layer [kg m-3]
rsnw ! grain radius in snow layer (micro-meters)

real (kind=dbl_kind), dimension (1,1,18) :: &
Expand Down
Loading

0 comments on commit e7de91a

Please sign in to comment.