Skip to content

Commit

Permalink
Documented 101 length and stress 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 101 variables, including numerous lengths, albedos, streses and
nondimensional ratios.  Only comments have been changed and all answers are
bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Feb 1, 2019
1 parent cc1e58b commit d3355b6
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 102 deletions.
4 changes: 2 additions & 2 deletions src/SIS2_ice_thm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ subroutine estimate_tsurf(m_pond, m_snow, m_ice, enthalpy, sice, SF_0, dSF_dT, &
real :: tsurf_est ! An estimate of the surface temperature [degC].
real, dimension(0:NkIce+1) :: cc ! Interfacial coupling coefficients.
real, dimension(0:NkIce) :: bb ! Effective layer heat capacities.
real :: hsnow_eff ! The effective thickness of the snow layer, in m.
real :: hL_ice_eff ! The effective thickness of each ice sub-layer, in m.
real :: hsnow_eff ! The effective thickness of the snow layer [m].
real :: hL_ice_eff ! The effective thickness of each ice sub-layer [m].
real :: rho_ice ! The nominal density of sea ice [kg m-3].
real :: rho_snow ! The nominal density of snow [kg m-3].
real :: Cp_ice ! The heat capacity of ice [J kg-1 degC-1].
Expand Down
18 changes: 9 additions & 9 deletions src/SIS_dyn_bgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,9 @@ function sigI(mi, ci, sig11, sig22, sig12, G, CS)
type(SIS_hor_grid_type), intent(in) :: G !< The horizontal grid type
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: mi !< Mass per unit ocean area of sea ice [kg m-2]
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: ci !< Sea ice concentration (nondim)
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig11 !< The xx component of the stress tensor, in N m-1
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig22 !< The yy component of the stress tensor, in N m-1
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig12 !< The xy & yx component of the stress tensor, in N m-1
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig11 !< The xx component of the stress tensor [N m-1]
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig22 !< The yy component of the stress tensor [N m-1]
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig12 !< The xy & yx component of the stress tensor [N m-1]
real, dimension(SZI_(G),SZJ_(G)) :: sigI !< The first stress invariant, nondim
type(SIS_B_dyn_CS), pointer :: CS !< The control structure for this module

Expand All @@ -666,9 +666,9 @@ function sigII(mi, ci, sig11, sig22, sig12, G, CS)
type(SIS_hor_grid_type), intent(in) :: G !< The horizontal grid type
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: mi !< Mass per unit ocean area of sea ice [kg m-2]
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: ci !< Sea ice concentration (nondim)
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig11 !< The xx component of the stress tensor, in N m-1
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig22 !< The yy component of the stress tensor, in N m-1
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig12 !< The xy & yx component of the stress tensor, in N m-1
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig11 !< The xx component of the stress tensor [N m-1]
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig22 !< The yy component of the stress tensor [N m-1]
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: sig12 !< The xy & yx component of the stress tensor [N m-1]
real, dimension(SZI_(G),SZJ_(G)) :: sigII !< The second stress invariant, nondim
type(SIS_B_dyn_CS), pointer :: CS !< The control structure for this module

Expand Down Expand Up @@ -746,9 +746,9 @@ subroutine ice_stress_old(isc,iec,jsc,jec,prs,strn11,strn22,strn12,edt,EC, &
real, dimension(isc:iec,jsc:jec), intent(in ) :: strn12 !< The xy & yx component of the strain rate [s-1]
real, dimension(isc:iec,jsc:jec), intent(in ) :: edt !< The ice elasticity times a time-step [Pa m s].
real, intent(in ) :: EC !< The yeild curve axis ratio
real, dimension(isc:iec,jsc:jec), intent(inout) :: sig11 !< The xx component of the stress tensor, in N m-1
real, dimension(isc:iec,jsc:jec), intent(inout) :: sig22 !< The yy component of the stress tensor, in N m-1
real, dimension(isc:iec,jsc:jec), intent(inout) :: sig12 !< The xy & yx component of the stress tensor, in N m-1
real, dimension(isc:iec,jsc:jec), intent(inout) :: sig11 !< The xx component of the stress tensor [N m-1]
real, dimension(isc:iec,jsc:jec), intent(inout) :: sig22 !< The yy component of the stress tensor [N m-1]
real, dimension(isc:iec,jsc:jec), intent(inout) :: sig12 !< The xy & yx component of the stress tensor [N m-1]
real, dimension(isc:iec,jsc:jec), intent( out) :: del2 !< An elipticity modulated estimate of
!! the squared strain rate [s-2].
logical, dimension(isc:iec,jsc:jec), intent(in) :: ice_present !< True where there is any ice present in a cell
Expand Down
10 changes: 5 additions & 5 deletions src/SIS_dyn_cgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ subroutine SIS_C_dynamics(ci, mis, mice, ui, vi, uo, vo, &


real, dimension(SZI_(G),SZJ_(G)) :: &
pres_mice, & ! The ice internal pressure per unit column mass, in N m / kg.
pres_mice, & ! The ice internal pressure per unit column mass [N m kg-1].
ci_proj, & ! The projected ice concentration, nondim.
zeta, & ! The ice bulk viscosity [Pa m s] (i.e., [N s m-1]).
del_sh, & ! The magnitude of the shear rates [s-1].
Expand Down Expand Up @@ -563,7 +563,7 @@ subroutine SIS_C_dynamics(ci, mis, mice, ui, vi, uo, vo, &
real :: I_EC2 ! 1/EC^2, where EC is the yield curve axis ratio.
real :: I_EC ! 1/EC, where EC is the yield curve axis ratio.
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
real, parameter :: H_subroundoff = 1e-30 ! A negligible thickness [m], that
! can be cubed without underflow.
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].
Expand Down Expand Up @@ -1351,7 +1351,7 @@ end subroutine SIS_C_dynamics
subroutine limit_stresses(pres_mice, mice, str_d, str_t, str_s, G, CS, limit)
type(SIS_hor_grid_type), intent(in) :: G !< The horizontal grid type
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: pres_mice !< The ice internal pressure per
!! unit column mass, in N m / kg.
!! unit column mass [N m kg-1].
real, dimension(SZI_(G),SZJ_(G)), intent(in) :: mice !< The mass per unit total area (ice
!! 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].
Expand Down Expand Up @@ -1664,7 +1664,7 @@ subroutine write_u_trunc(I, j, ui, u_IC, uo, mis, fxoc, fxic, Cor_u, PFu, fxat,
type(SIS_C_dyn_CS), pointer :: CS !< The control structure for this module

real :: dt_mi, CFL
real, parameter :: H_subroundoff = 1e-30 ! A negligible thickness, in m, that
real, parameter :: H_subroundoff = 1e-30 ! A negligible thickness [m], that
! can be cubed without underflow.
integer :: file
integer :: yr, mo, day, hr, minute, sec, yearday
Expand Down Expand Up @@ -1734,7 +1734,7 @@ subroutine write_v_trunc(i, J, vi, v_IC, vo, mis, fyoc, fyic, Cor_v, PFv, fyat,
type(SIS_C_dyn_CS), pointer :: CS !< The control structure for this module

real :: dt_mi, CFL
real, parameter :: H_subroundoff = 1e-30 ! A negligible thickness, in m, that
real, parameter :: H_subroundoff = 1e-30 ! A negligible thickness [m], that
! can be cubed without underflow.
integer :: file
integer :: yr, mo, day, hr, minute, sec, yearday
Expand Down
4 changes: 2 additions & 2 deletions src/SIS_hor_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ module SIS_hor_grid
geoLonT, & !< The geographic longitude at q points in degrees of longitude or m.
dxT, & !< dxT is delta x at h points [m].
IdxT, & !< 1/dxT [m-1].
dyT, & !< dyT is delta y at h points, in m, and IdyT is 1/dyT [m-1].
IdyT, & !< dyT is delta y at h points, in m, and IdyT is 1/dyT [m-1].
dyT, & !< dyT is delta y at h points [m], and IdyT is 1/dyT [m-1].
IdyT, & !< dyT is delta y at h points [m], and IdyT is 1/dyT [m-1].
areaT, & !< The area of an h-cell [m2].
IareaT !< 1/areaT [m-2].
real ALLOCABLE_, dimension(NIMEM_,NJMEM_) :: sin_rot
Expand Down
80 changes: 40 additions & 40 deletions src/SIS_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@ module SIS_optics
type, public :: SIS_optics_CS ; private

! albedos are from CSIM4 assumming 0.53 visible and 0.47 near-ir insolation
real :: alb_snow !< albedo of snow (not melting)
real :: alb_ice !< albedo of ice (not melting)
real :: pen_ice !< ice surface penetrating solar fraction
real :: opt_dep_ice !< ice optical depth (m)
real :: t_range_melt !< melt albedos scaled in below melting T
real :: alb_snow !< albedo of snow (not melting) [nondim]
real :: alb_ice !< albedo of ice (not melting) [nondim]
real :: pen_ice !< ice surface penetrating solar fraction [nondim]
real :: opt_dep_ice !< ice optical depth [m]
real :: t_range_melt !< melt albedos scaled in below melting T [degC]

logical :: do_deltaEdd = .true. !< If true, use a delta-Eddington radiative
! transfer calculation for the shortwave radiation
! within the sea-ice and snow.

logical :: do_pond = .false. !< activate melt pond scheme - mw/new
real :: max_pond_frac = 0.5 !< pond water beyond this is dumped
real :: min_pond_frac = 0.2 !< ponds below sea level don't drain
real :: max_pond_frac = 0.5 !< pond water beyond this is dumped [nondim]
real :: min_pond_frac = 0.2 !< ponds below sea level don't drain [nondim]

logical :: slab_optics = .false. !< If true use the very old slab ice optics
!! from the supersource model.
real :: slab_crit_thick !< The thickness beyond which the slab ice optics no
!! longer exhibits a thickness dependencs on albedo, in m.
real :: slab_alb_ocean !< The ocean albedo as used in the slab ice optics.
real :: slab_min_ice_alb !< The minimum thick ice albedo with the slab ice optics.
!! longer exhibits a thickness dependencs on albedo [m].
real :: slab_alb_ocean !< The ocean albedo as used in the slab ice optics [nondim].
real :: slab_min_ice_alb !< The minimum thick ice albedo with the slab ice optics [nondim].

end type SIS_optics_CS

Expand Down Expand Up @@ -160,37 +160,37 @@ end subroutine SIS_optics_init
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 m-2]
real, intent(in ) :: hs !< snow thickness (m-snow)
real, intent(in ) :: hi !< ice thickness (m-ice)
real, intent(in ) :: hs !< snow thickness [m]
real, intent(in ) :: hi !< ice thickness [m]
real, intent(in ) :: ts !< surface temperature [degC].
real, intent(in ) :: tfw !< seawater freezing temperature
real, intent(in ) :: tfw !< seawater freezing temperature [degC]
integer, intent(in) :: NkIce !< The number of sublayers in the ice
real, dimension(:), intent( out) :: albedos !< ice surface albedos (0-1)
real, intent( out) :: abs_sfc !< fraction of absorbed SW that is absorbed at surface
real, intent( out) :: abs_snow !< fraction of absorbed SW that is absorbed in snow
real, intent( out) :: abs_ice_lay(NkIce) !< fraction of absorbed SW that is absorbed by each ice layer
real, intent( out) :: abs_ocn !< fraction of absorbed SW that is absorbed in ocean
real, intent( out) :: abs_int !< fraction of absorbed SW that is absorbed in ice interior
real, dimension(:), intent( out) :: albedos !< ice surface albedos (0-1) [nondim]
real, intent( out) :: abs_sfc !< fraction of absorbed SW that is absorbed at surface [nondim]
real, intent( out) :: abs_snow !< fraction of absorbed SW that is absorbed in snow [nondim]
real, intent( out) :: abs_ice_lay(NkIce) !< fraction of absorbed SW that is absorbed by each ice layer [nondim]
real, intent( out) :: abs_ocn !< fraction of absorbed SW that is absorbed in ocean [nondim]
real, intent( out) :: abs_int !< fraction of absorbed SW that is absorbed in ice interior [nondim]
type(SIS_optics_CS), intent(in) :: CS !< The ice optics control structure.
type(ice_thermo_type), intent(in) :: ITV !< The ice thermodynamic parameter structure.
real, intent(in),optional :: coszen_in !< The cosine of the solar zenith angle.
real, intent(in),optional :: coszen_in !< The cosine of the solar zenith angle [nondim].

real :: alb ! The albedo for all bands, 0-1, nondimensional.
real :: as ! A snow albedo, 0-1, nondimensional.
real :: ai ! The ice albedo, 0-1, nondimensional.
real :: snow_cover ! The fraction of the area covered by snow, 0-1, ND.
real :: alb ! The albedo for all bands, 0-1 [nondim].
real :: as ! A snow albedo, 0-1 [nondim].
real :: ai ! The ice albedo, 0-1 [nondim].
real :: snow_cover ! The fraction of the area covered by snow, 0-1 [nondim].
real :: fh ! A weighting fraction of the ice albedo (as compared
! with the albedo of water) when ice is thin, 0-1, ND.
! with the albedo of water) when ice is thin, 0-1 [nondim].
real :: coalb, I_coalb ! The coalbedo (0-1) and its reciprocal.
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).
! is still present at the top of each ice layer [nondim].
real :: opt_decay_lay ! The optical extinction in each ice layer [nondim].
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.
real :: pen ! The fraction of the shortwave flux that will pass below
! the surface (frac 1-pen absorbed at the surface) [nondim]
real :: sal_ice_top(1) ! A specified surface salinity of ice [ppt].
real :: temp_ice_freeze ! The freezing temperature of the top ice layer [degC].
integer :: m, b, nb
character(len=200) :: mesg
Expand Down Expand Up @@ -221,21 +221,21 @@ subroutine ice_optics_SIS2(mp, hs, hi, ts, tfw, NkIce, albedos, abs_sfc, &
! outputs
real (kind=dbl_kind), dimension (1,1) :: &
fs , & ! horizontal coverage of snow
fp , & ! pond fractional coverage (0 to 1)
hprad ! pond depth (m) for radiation code - may be diagnosed
fp , & ! pond fractional coverage (0 to 1) [nondim]
hprad ! pond depth [m] for radiation code - may be diagnosed

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

real (kind=dbl_kind), dimension (1,1,18) :: &
trcr ! aerosol tracers

real (kind=dbl_kind), dimension (1,1) :: &
alvdr , & ! visible, direct, albedo (fraction)
alvdf , & ! visible, diffuse, albedo (fraction)
alidr , & ! near-ir, direct, albedo (fraction)
alidf , & ! near-ir, diffuse, albedo (fraction)
alvdr , & ! visible, direct, albedo [nondim]
alvdf , & ! visible, diffuse, albedo [nondim]
alidr , & ! near-ir, direct, albedo [nondim]
alidf , & ! near-ir, diffuse, albedo [nondim]
fswsfc , & ! SW absorbed at snow/bare ice/pondedi ice surface [W m-2]
fswint , & ! SW interior absorption (below surface, above ocean,W m-2)
fswthru ! SW through snow/bare ice/ponded ice into ocean [W m-2]
Expand All @@ -247,9 +247,9 @@ subroutine ice_optics_SIS2(mp, hs, hi, ts, tfw, NkIce, albedos, abs_sfc, &
Iswabs ! SW absorbed in ice layer [W m-2]

real (kind=dbl_kind), dimension (1,1) :: &
albice , & ! bare ice albedo, for history
albsno , & ! snow albedo, for history
albpnd ! pond albedo, for history
albice , & ! bare ice albedo, for history [nondim]
albsno , & ! snow albedo, for history [nondim]
albpnd ! pond albedo, for history [nondim]

real (kind=dbl_kind) :: max_mp, hs_mask_pond, pond_decr

Expand Down
4 changes: 2 additions & 2 deletions src/SIS_slow_thermo.F90
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module SIS_slow_thermo
!! do_ice_restore is true, in days.

logical :: do_ice_limit !< Limit the sea ice thickness to max_ice_limit.
real :: max_ice_limit !< The maximum sea ice thickness, in m, when do_ice_limit is true.
real :: max_ice_limit !< The maximum sea ice thickness [m], when do_ice_limit is true.

logical :: nudge_sea_ice = .false. !< If true, nudge sea ice concentrations towards observations.
real :: nudge_sea_ice_rate = 0.0 !< The rate of cooling of ice-free water that should be ice
Expand Down Expand Up @@ -322,7 +322,7 @@ subroutine slow_thermodynamics(IST, dt_slow, CS, OSS, FIA, XSF, IOF, G, IG)

! Local variables
real, dimension(SZI_(G),SZJ_(G)) :: &
h_ice_input ! The specified ice thickness, with specified_ice, in m.
h_ice_input ! The specified ice thickness, with specified_ice [m].

real :: rho_ice ! The nominal density of sea ice [kg m-3].
real :: Idt_slow ! The inverse of the slow thermodynamic time step [s-1]
Expand Down
2 changes: 1 addition & 1 deletion src/ice_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module ice_grid
!! (like 1e-40) that will be lost to roundoff during any sums so that the
!! open ocean fluxes can be used in interpolation across categories.
real, allocatable, dimension(:) :: &
cat_thick_lim, & !< The lower thickness limits for each ice category, in m.
cat_thick_lim, & !< The lower thickness limits for each ice category [m].
mH_cat_bound !< The lower mass-per-unit area limits for each ice category [H ~> kg m-2].

end type ice_grid_type
Expand Down
Loading

0 comments on commit d3355b6

Please sign in to comment.