Skip to content

Commit

Permalink
Documented 82 time 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 82 variables, including numerous time intervals and rates.  Also
eliminated several redundant blocks describing arguments in an older format.
Only comments have been changed and all answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Feb 1, 2019
1 parent 42d6116 commit e8d65be
Show file tree
Hide file tree
Showing 21 changed files with 93 additions and 137 deletions.
14 changes: 7 additions & 7 deletions src/SIS2_ice_thm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ subroutine ice_temp_SIS2(m_pond, m_snow, m_ice, enthalpy, sice, SF_0, dSF_dT, so
real, intent(in ) :: tfw !< seawater freezing temperature [degC]
real, intent(in ) :: fb !< heat flux upward from ocean to ice bottom [W m-2]
real, intent( out) :: tsurf !< surface temperature [degC]
real, intent(in ) :: dtt !< timestep (sec)
real, intent(in ) :: dtt !< timestep [s]
integer, intent(in ) :: NkIce !< The number of ice layers.
real, intent(inout) :: tmelt !< accumulated top melting energy [J m-2]
real, intent(inout) :: bmelt !< accumulated bottom melting energy [J m-2]
Expand Down Expand Up @@ -543,16 +543,16 @@ subroutine estimate_tsurf(m_pond, m_snow, m_ice, enthalpy, sice, SF_0, dSF_dT, &
real, intent(in ) :: m_ice !< ice mass per unit area [H ~> kg m-2]
real, dimension(0:NkIce) , &
intent(in ) :: enthalpy !< The enthalpy of each layer in a column of
!! snow and ice, in enth_unit (J kg-1).
!! snow and ice, in enth_unit [J kg-1].
real, dimension(NkIce), &
intent(in) :: Sice !< ice salinity by layer (g/kg)
intent(in) :: Sice !< ice salinity by layer [g/kg]
real, intent(in ) :: SF_0 !< net upward surface heat flux when Tsurf=0 [W m-2]
real, intent(in ) :: dSF_dT !< d(sfc heat flux)/d(ts) [W m-2 degC-1]
real, dimension(0:NkIce), &
intent(in) :: sol !< Solar heating of the snow and ice layers [W m-2]
real, intent(in ) :: tfw !< seawater freezing temperature [degC]
real, intent( out) :: tsurf !< surface temperature [degC]
real, intent(in ) :: dtt !< timestep (sec)
real, intent(in ) :: dtt !< timestep [s]
integer, intent(in ) :: NkIce !< The number of ice layers.
type(SIS2_ice_thm_CS), intent(in) :: CS !< The SIS2 ice thermodynamics control structure
type(ice_thermo_type), intent(in) :: ITV !< The ice thermodynamic parameter structure.
Expand Down Expand Up @@ -710,7 +710,7 @@ function laytemp_SIS2(m, T_fr, f, b, tp, enth, salin, dtt, ITV) result (new_temp
real, intent(in) :: tp !< prior step temperature [degC]
real, intent(in) :: enth !< prior step enthalpy
real, intent(in) :: salin !< ice salinity in ppt.
real, intent(in) :: dtt !< timestep in s.
real, intent(in) :: dtt !< timestep [s]
type(ice_thermo_type), intent(in) :: ITV !< The ice thermodynamic parameter structure.

real :: T_g ! The latest best guess at Temp [degC].
Expand Down Expand Up @@ -868,7 +868,7 @@ subroutine update_lay_enth(m_lay, sice, enth, ftop, ht_body, fbot, dftop_dT, &
real, intent(inout) :: fbot !< Downward heat below the layer at T = 0 degC [W m-2].
real, intent(in) :: dftop_dT !< The linearization of ftop with layer temperature [W m-2 degC-1].
real, intent(in) :: dfbot_dT !< The linearization of fbot with layer temperature [W m-2 degC-1].
real, intent(in) :: dtt !< The timestep in s.
real, intent(in) :: dtt !< The timestep [s]
real, intent(in) :: hf_err_rat !< A conversion factor for comparing the errors
!! in explicit and implicit estimates of the updated
!! heat fluxes [kg degC W-1].
Expand All @@ -887,7 +887,7 @@ subroutine update_lay_enth(m_lay, sice, enth, ftop, ht_body, fbot, dftop_dT, &
real :: enth_in ! The initial enthalpy, in enth_units.
real :: enth_fp ! The enthalpy at the freezing point, in enth_units.
real :: AA, BB, CC ! Temporary variables used to solve a quadratic equation.
real :: dtEU ! The timestep times the unit conversion from J to Enth_units, in s?
real :: dtEU ! The timestep times the unit conversion from J to Enth_units [s]?
real :: dT_dEnth ! The partial derivative of temperature with enthalpy,
! in units of K / Enth_unit.
real :: En_J ! The enthalpy in Joules with 0 offset for liquid at 0 degC.
Expand Down
10 changes: 5 additions & 5 deletions src/SIS_continuity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ subroutine ice_continuity(u, v, hin, h, uh, vh, dt, G, IG, CS)
intent(out) :: uh !< Volume flux through zonal faces = u*h*dy, H m2 s-1.
real, dimension(SZI_(G),SZJB_(G),SZCAT_(IG)), &
intent(out) :: vh !< Volume flux through meridional faces = v*h*dx, in H m2 s-1.
real, intent(in) :: dt !< Time increment in s.
real, intent(in) :: dt !< Time increment [s]
type(SIS_continuity_CS), pointer :: CS !< The control structure returned by a
!! previous call to SIS_continuity_init.
! This subroutine time steps the category thicknesses, using a monotonically
Expand Down Expand Up @@ -219,7 +219,7 @@ subroutine summed_continuity(u, v, h_in, h, uh, vh, dt, G, IG, CS, h_ice)
!! = u*h*dy, H m2 s-1.
real, dimension(SZI_(G),SZJB_(G)), intent(out) :: vh !< Total mass flux through meridional faces
!! = v*h*dx, in H m2 s-1.
real, intent(in) :: dt !< Time increment in s.
real, intent(in) :: dt !< Time increment [s]
type(SIS_continuity_CS), pointer :: CS !< The control structure returned by a
!! previous call to SIS_continuity_init.
real, dimension(SZI_(G),SZJ_(G)), optional, intent(inout) :: h_ice !< Total ice mass per unit cell
Expand Down Expand Up @@ -432,7 +432,7 @@ subroutine proportionate_continuity(h_tot_in, uh_tot, vh_tot, dt, G, IG, CS, &
!! cell area in H.
real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: uh_tot !< Total mass flux through zonal faces, in H m2 s-1.
real, dimension(SZI_(G),SZJB_(G)), intent(in) :: vh_tot !< Total mass flux through meridional faces, in H m2 s-1.
real, intent(in) :: dt !< Time increment in s.
real, intent(in) :: dt !< Time increment [s]
type(SIS_continuity_CS), pointer :: CS !< The control structure returned by a
!! previous call to SIS_continuity_init.
real, dimension(SZI_(G),SZJ_(G),SZCAT_(IG)), &
Expand Down Expand Up @@ -705,7 +705,7 @@ subroutine zonal_mass_flux(u, dt, G, IG, CS, LB, h_in, uh, htot_in, uh_tot)
type(ice_grid_type), intent(inout) :: IG !< The sea-ice specific grid type
real, dimension(SZIB_(G),SZJ_(G)), &
intent(in) :: u !< Zonal ice velocity, in m s-1.
real, intent(in) :: dt !< Time increment in s
real, intent(in) :: dt !< Time increment [s]
type(SIS_continuity_CS), pointer :: CS !< The control structure returned by a
!! previous call to SIS_continuity_init.
type(loop_bounds_type), intent(in) :: LB !< A structure with the active loop bounds.
Expand Down Expand Up @@ -825,7 +825,7 @@ subroutine meridional_mass_flux(v, dt, G, IG, CS, LB, h_in, vh, htot_in, vh_tot)
type(ice_grid_type), intent(inout) :: IG !< The sea-ice specific grid type
real, dimension(SZI_(G),SZJB_(G)), &
intent(in) :: v !< Meridional ice velocity, in m s-1.
real, intent(in) :: dt !< Time increment in s
real, intent(in) :: dt !< Time increment [s]
type(SIS_continuity_CS), pointer :: CS !< The control structure returned by a
!! previous call to SIS_continuity_init.
type(loop_bounds_type), intent(in) :: LB !< A structure with the active loop bounds.
Expand Down
6 changes: 0 additions & 6 deletions src/SIS_debugging.F90
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ subroutine check_redundant_vC3d(mesg, u_comp, v_comp, G, is, ie, js, je, &
integer, optional, intent(in) :: js !< The starting j-index to work on
integer, optional, intent(in) :: je !< The ending j-index to work on
integer, optional, intent(in) :: direction !< The direction flag to pass to pass_vector
! Arguments: u_comp - The u-component of the vector being checked.
! (in) v_comp - The v-component of the vector being checked.
! (in) mesg - A message indicating what is being checked.
! (in) G - The ocean's grid structure.
! (in/opt) is, ie, js, je - the i- and j- range of indices to check.
! (in/opt) direction - the direction flag to be passed to pass_vector.

character(len=24) :: mesg_k
integer :: k
Expand Down
6 changes: 3 additions & 3 deletions src/SIS_diag_mediator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ end subroutine post_data_3d

!> Enable the accumulation of time averages over the specified time interval.
subroutine enable_SIS_averaging(time_int_in, time_end_in, diag_cs)
real, intent(in) :: time_int_in !< The time interval in s over which any
! !! values that are offered are valid.
real, intent(in) :: time_int_in !< The time interval over which any values
! !! that are offered are valid [s].
type(time_type), intent(in) :: time_end_in !< The end time of the valid interval.
type(SIS_diag_ctrl), intent(inout) :: diag_cs !< A structure that is used to regulate diagnostic output
! This subroutine enables the accumulation of time averages over the
Expand All @@ -503,7 +503,7 @@ end subroutine disable_SIS_averaging
!> Indicate whether averaging diagnostics is currently enabled
logical function query_SIS_averaging_enabled(diag_cs, time_int, time_end)
type(SIS_diag_ctrl), intent(in) :: diag_cs !< A structure that is used to regulate diagnostic output
real, optional, intent(out) :: time_int !< The current setting of diag_cs%time_int, in s.
real, optional, intent(out) :: time_int !< The current setting of diag_cs%time_int [s].
type(time_type), optional, intent(out) :: time_end !< The current setting of diag_cs%time_end.

if (present(time_int)) time_int = diag_cs%time_int
Expand Down
14 changes: 7 additions & 7 deletions src/SIS_dyn_bgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ subroutine SIS_B_dynamics(ci, misp, mice, ui, vi, uo, vo, &
logical, intent(in ) :: do_ridging !< If true, the ice can ridge
real, dimension(SZIB_(G),SZJB_(G)), intent( out) :: rdg_rate !< ridging rate from drift state in UNITS?
real, intent(in ) :: dt_slow !< The amount of time over which the ice
!! dynamics are to be advanced, in s.
!! dynamics are to be advanced [s].
type(SIS_B_dyn_CS), pointer :: CS !< The control structure for this module

! Local variables
Expand Down Expand Up @@ -301,7 +301,7 @@ subroutine SIS_B_dynamics(ci, misp, mice, ui, vi, uo, vo, &

! for velocity calculation
real, dimension(SZIB_(G),SZJB_(G)) :: dtmiv
real :: dt_Rheo ! The short timestep associated with the rheology, in s.
real :: dt_Rheo ! The short timestep associated with the rheology [s].
real :: I_2dt_Rheo ! 1.0 / (2*dt_Rheo)
integer :: EVP_steps ! The number of EVP sub-steps that will actually be taken.
real :: I_sub_steps
Expand Down Expand Up @@ -741,16 +741,16 @@ subroutine ice_stress_old(isc,iec,jsc,jec,prs,strn11,strn22,strn12,edt,EC, &
integer, intent(in ) :: jsc !< The starting i-index to work on
integer, intent(in ) :: jec !< The ending j-index to work on
real, dimension(isc:iec,jsc:jec), intent(in ) :: prs !< The internal ice pressure [Pa m].
real, dimension(isc:iec,jsc:jec), intent(in ) :: strn11 !< The xx component of the strain rate, in s-1
real, dimension(isc:iec,jsc:jec), intent(in ) :: strn22 !< The yy component of the strain rate, in s-1
real, dimension(isc:iec,jsc:jec), intent(in ) :: strn12 !< The xy & yx component of the strain rate, in s-1
real, dimension(isc:iec,jsc:jec), intent(in ) :: strn11 !< The xx component of the strain rate [s-1]
real, dimension(isc:iec,jsc:jec), intent(in ) :: strn22 !< The yy component of the strain rate [s-1]
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( out) :: del2 !< An elipticity modulated estimate of
!! the squared strain rate, in s-2.
!! 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
!
integer :: i, j
Expand Down Expand Up @@ -823,7 +823,7 @@ subroutine ice_stress_new(isc,iec,jsc,jec,prs,strn11,strn22,strn12,edt, EC, &
real, dimension(isc:iec,jsc:jec), intent(inout) :: sig22 !< The yy component of the stress tensor
real, dimension(isc:iec,jsc:jec), intent(inout) :: sig12 !< The xy & yx component of the stress tensor
real, dimension(isc:iec,jsc:jec), intent( out) :: del2 !< An elipticity modulated estimate of
!! the squared strain rate, in s-2.
!! 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
!
integer :: i, j
Expand Down
Loading

0 comments on commit e8d65be

Please sign in to comment.