Skip to content

Commit

Permalink
ocumented 142 thermodynamic 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 142 variables, including changing the units of temperature to degC in
many places.  Only comments have been changed and all answers are bitwise
identical.
  • Loading branch information
Hallberg-NOAA committed Jan 31, 2019
1 parent 2d08207 commit e84a0ce
Show file tree
Hide file tree
Showing 13 changed files with 171 additions and 172 deletions.
202 changes: 101 additions & 101 deletions src/SIS2_ice_thm.F90

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/SIS_dyn_trans.F90
Original file line number Diff line number Diff line change
Expand Up @@ -679,9 +679,9 @@ subroutine post_ice_state_diagnostics(CS, IST, OSS, IOF, dt_slow, Time, G, IG, d
! Local variables
real, dimension(G%isc:G%iec,G%jsc:G%jec) :: mass, mass_ice, mass_snow, tmp2d
real, dimension(SZI_(G),SZJ_(G),IG%CatIce,IG%NkIce) :: &
temp_ice ! A diagnostic array with the ice temperature in degC.
temp_ice ! A diagnostic array with the ice temperature [degC].
real, dimension(SZI_(G),SZJ_(G),IG%CatIce) :: &
temp_snow ! A diagnostic array with the snow temperature in degC.
temp_snow ! A diagnostic array with the snow temperature [degC].
! ### This diagnostic does not exist yet.
! real, dimension(SZI_(G),SZJ_(G),IG%CatIce) :: &
! rdg_frac ! fraction of ridged ice per category
Expand Down Expand Up @@ -1262,7 +1262,6 @@ subroutine set_ocean_top_stress_B2(IOF, windstr_x_water, windstr_y_water, &
(windstr_x_water(I-1,J) + windstr_x_water(I,J-1))) + &
ps_ice * ((str_ice_oce_x(I,J) + str_ice_oce_x(I-1,J-1)) + &
(str_ice_oce_x(I-1,J) + str_ice_oce_x(I,J-1))) )

IOF%flux_v_ocn(i,j) = IOF%flux_v_ocn(i,j) + 0.25 * &
(ps_ocn * ((windstr_y_water(I,J) + windstr_y_water(I-1,J-1)) + &
(windstr_y_water(I-1,J) + windstr_y_water(I,J-1))) + &
Expand Down
50 changes: 25 additions & 25 deletions src/SIS_fast_thermo.F90
Original file line number Diff line number Diff line change
Expand Up @@ -126,27 +126,27 @@ subroutine sum_top_quantities (FIA, ABT, flux_u, flux_v, flux_sh, evap, &
!! evaporation, in W m-2.
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce), &
intent(in) :: sh_T0 !< The upward sensible heat flux from the top of the ice into
!! the atmosphere when the skin temperature is 0 C, in W m-2.
!! 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 C,
intent(in) :: evap_T0 !< The sublimation rate when the skin temperature is 0 degC,
!! in 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 C, in W m-2.
!! ice or ocean 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) :: dshdt !< The derivative of the upward sensible heat flux from the
!! the top of the ice into the atmosphere with ice skin
!! temperature in W m-2 K-1.
!! temperature [W m-2 degC-1].
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce), &
intent(in) :: devapdt !< The derivative of the sublimation rate with the surface
!! temperature, in kg m-2 s-1 K-1.
!! temperature [kg m-2 s-1 degC-1].
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce), &
intent(in) :: dlwdt !< The derivative of the longwave heat flux from the atmosphere
!! into the ice or ocean with ice skin temperature, in W m-2 K-1.
!! into the ice or ocean with ice skin temperature [W m-2 degC-1].
real, dimension(G%isd:G%ied,G%jsd:G%jed,IG%CatIce), &
intent(in) :: t_skin !< The sea ice surface skin temperature in deg C.
intent(in) :: t_skin !< The sea ice surface skin temperature [degC].
real, dimension(G%isd:G%ied,G%jsd:G%jed), &
intent(in) :: SST !< The sea surface temperature in deg C.
intent(in) :: SST !< The sea surface temperature [degC].
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce,size(FIA%flux_sw_top,4)), &
intent(in) :: flux_sw !< The downward shortwave heat fluxes in W m-2. The 4th
!! dimension is a combination of angular orientation & frequency.
Expand Down Expand Up @@ -597,29 +597,29 @@ subroutine do_update_ice_model_fast(Atmos_boundary, IST, sOSS, Rad, FIA, &
flux_u, flux_v, lprec, fprec, &

sh_T0, & ! The upward sensible heat flux from the top of the ice into
! the atmosphere when the skin temperature is 0 C, in W m-2.
evap_T0, & ! The sublimation rate when the skin temperature is 0 C,
! 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.
lw_T0, & ! The downward longwave heat flux from the atmosphere into the
! ice or ocean when the skin temperature is 0 C, in W m-2.
! 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
! temperature in W m-2 K-1.
! temperature [W m-2 degC-1].
devapdt, & ! The derivative of the sublimation rate with the surface
! temperature, in kg m-2 s-1 K-1.
! temperature [kg m-2 s-1 degC-1].
dlwdt ! The derivative of the downward radiative heat flux with surface
! temperature (i.e. d(flux_lw)/d(surf_temp)) in W m-2 K-1.
! temperature (i.e. d(flux_lw)/d(surf_temp)) [W m-2 degC-1].
real, dimension(G%isd:G%ied,G%jsd:G%jed,0:IG%CatIce,size(FIA%flux_sw_top,4)) :: &
flux_sw ! The downward shortwave heat fluxes in W m-2. The fourth
! dimension is a combination of angular orientation and frequency.
real, dimension(0:IG%NkIce) :: T_col ! The temperature of a column of ice and snow in degC.
real, dimension(0:IG%NkIce) :: T_col ! The temperature of a column of ice and snow [degC].
real, dimension(IG%NkIce) :: S_col ! The thermodynamic salinity of a column of ice, in g/kg.
real, dimension(0:IG%NkIce) :: enth_col ! The enthalpy of a column of snow and ice, in enth_unit (J/kg?).
real, dimension(0:IG%NkIce) :: SW_abs_col ! The shortwave absorption within a column of snow and ice, in W m-2.
real :: dt_fast ! The fast thermodynamic time step, in s.
real :: Tskin ! The new skin temperature in deg C.
real :: dTskin ! The change in the skin temperatue in deg C.
real :: Tskin ! The new skin temperature [degC].
real :: dTskin ! The change in the skin temperatue [degC].
real :: latent ! The latent heat of sublimation of ice or snow, in J kg.
real :: hf_0 ! The positive upward surface heat flux when T_sfc = 0 C, in W m-2.
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 all shortwave (dir/dif and vis/nir) components
real :: snow_wt ! A fractional weighting of snow in the category surface area.
Expand Down Expand Up @@ -734,7 +734,7 @@ subroutine do_update_ice_model_fast(Atmos_boundary, IST, sOSS, Rad, FIA, &
enth_col(0) = IST%enth_snow(i,j,k,1)
do m=1,NkIce ; enth_col(m) = IST%enth_ice(i,j,k,m) ; enddo

! This is for sublimation into water vapor at 0 C; if the vapor should be
! This is for sublimation into water vapor at 0 degC; if the vapor should be
! at a different temperature, a correction would be made here.
snow_wt = 0.0 ; if (IST%mH_snow(i,j,k)>0.0) snow_wt = 1.0
latent = latent_sublimation(IST%enth_snow(i,j,k,1), IST%enth_ice(i,j,k,1), snow_wt, IST%ITV)
Expand Down Expand Up @@ -875,16 +875,16 @@ subroutine redo_update_ice_model_fast(IST, sOSS, Rad, FIA, TSF, optics_CSp, &
real, dimension(IG%NkIce) :: &
S_col ! The thermodynamic salinity of a column of ice, in g/kg.
real, dimension(0:IG%NkIce) :: &
T_col, & ! The temperature of a column of ice and snow in degC.
T_col, & ! The temperature of a column of ice and snow [degC].
SW_abs_col, & ! The shortwave absorption within a column of snow and ice, in W m-2.
enth_col, & ! The enthalpy of a column of snow and ice, in enth_unit (J/kg?).
enth_col_in ! The initial enthalpy of a column of snow and ice,
! in enth_unit (J/kg?).

real :: dt_here ! The time step here, in s.
real :: Tskin ! The new skin temperature in deg C.
real :: Tskin ! The new skin temperature [degC].
real :: latent ! The latent heat of sublimation of ice or snow, in J kg.
real :: hf_0 ! The positive upward surface heat flux when T_sfc = 0 C, in W m-2.
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.
Expand All @@ -908,7 +908,7 @@ subroutine redo_update_ice_model_fast(IST, sOSS, Rad, FIA, TSF, optics_CSp, &
real :: dSWt_dt ! The derivative of SW_tot with skin temperature, in W m-2 C-1.
real :: Tskin_prev ! The previous value of Tskin
real :: T_bright ! A skin temperature below which the snow and ice attain
! their greatest brightness and albedo no longer varies, in deg C.
! their greatest brightness and albedo no longer varies [degC].
! real :: Tskin_itt(0:max(1,CS%max_tskin_itt))
! real :: SW_tot_itt(max(1,CS%max_tskin_itt))
logical :: do_optics(G%isd:G%ied,G%jsd:G%jed)
Expand Down Expand Up @@ -1023,7 +1023,7 @@ subroutine redo_update_ice_model_fast(IST, sOSS, Rad, FIA, TSF, optics_CSp, &
enth_col_in(0) = IST%enth_snow(i,j,k,1)
do m=1,NkIce ; enth_col_in(m) = IST%enth_ice(i,j,k,m) ; enddo

! This is for sublimation into water vapor at 0 C; if the vapor should be
! This is for sublimation into water vapor at 0 degC; if the vapor should be
! at a different temperature, a correction would be made here.
snow_wt = 0.0 ; if (IST%mH_snow(i,j,k)>0.0) snow_wt = 1.0
latent = latent_sublimation(IST%enth_snow(i,j,k,1), IST%enth_ice(i,j,k,1), snow_wt, IST%ITV)
Expand Down Expand Up @@ -1148,7 +1148,7 @@ subroutine redo_update_ice_model_fast(IST, sOSS, Rad, FIA, TSF, optics_CSp, &
enth_col(0) = IST%enth_snow(i,j,k,1)
do m=1,NkIce ; enth_col(m) = IST%enth_ice(i,j,k,m) ; enddo

! This is for sublimation into water vapor at 0 C; if the vapor should be
! This is for sublimation into water vapor at 0 degC; if the vapor should be
! at a different temperature, a correction would be made here.
snow_wt = 0.0 ; if (IST%mH_snow(i,j,k)>0.0) snow_wt = 1.0
latent = latent_sublimation(IST%enth_snow(i,j,k,1), IST%enth_ice(i,j,k,1), snow_wt, IST%ITV)
Expand Down
8 changes: 4 additions & 4 deletions src/SIS_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ subroutine ice_optics_SIS2(mp, hs, hi, ts, tfw, NkIce, albedos, abs_sfc, &
real, intent(in ) :: mp !< pond mass (kg/m2)
real, intent(in ) :: hs !< snow thickness (m-snow)
real, intent(in ) :: hi !< ice thickness (m-ice)
real, intent(in ) :: ts !< surface temperature in deg C.
real, intent(in ) :: ts !< surface temperature [degC].
real, intent(in ) :: tfw !< seawater freezing temperature
integer, intent(in) :: NkIce !< The number of sublayers in the ice
real, dimension(:), intent( out) :: albedos !< ice surface albedos (0-1)
Expand Down Expand Up @@ -191,7 +191,7 @@ subroutine ice_optics_SIS2(mp, hs, hi, ts, tfw, NkIce, albedos, abs_sfc, &
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 :: temp_ice_freeze ! The freezing temperature of the top ice layer, in C.
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 @@ -394,7 +394,7 @@ subroutine ice_optics_SIS2(mp, hs, hi, ts, tfw, NkIce, albedos, abs_sfc, &

end subroutine ice_optics_SIS2

!> bright_ice_temp returns the skin temperature (in deg C) below which the snow
!> bright_ice_temp returns the skin temperature (in degC) below which the snow
!! and ice attain their greatest brightness and albedo no longer varies, for
!! the highest attainable salinity.
function bright_ice_temp(CS, ITV) result(bright_temp)
Expand All @@ -403,7 +403,7 @@ function bright_ice_temp(CS, ITV) result(bright_temp)
real :: bright_temp

real :: salin_max ! The maximum attainable salinity, in PSU.
real :: temp_freeze_min ! The freezing temperature of water at salin_max, in C.
real :: temp_freeze_min ! The freezing temperature of water at salin_max [degC].

salin_max = 40.0

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 @@ -594,9 +594,9 @@ subroutine SIS2_thermodynamics(IST, dt_slow, CS, OSS, FIA, IOF, G, IG)
! layer in g/kg, with the salinity of
! newly formed ice in layer NkIce+1.
real, dimension(0:IG%NkIce) :: m_lay ! The masses of a column of ice and snow, in kg m-2.
real, dimension(0:IG%NkIce) :: Tcol0 ! The temperature of a column of ice and snow, in degC.
real, dimension(0:IG%NkIce) :: Tcol0 ! The temperature of a column of ice and snow [degC].
real, dimension(0:IG%NkIce) :: S_col0 ! The salinity of a column of ice and snow, in g/kg.
real, dimension(0:IG%NkIce) :: Tfr_col0 ! The freezing temperature of a column of ice and snow, in degC.
real, dimension(0:IG%NkIce) :: Tfr_col0 ! The freezing temperature of a column of ice and snow [degC].
real, dimension(0:IG%NkIce+1) :: &
enthalpy ! The initial enthalpy of a column of ice and snow
! and the surface ocean, in enth_units (often J/kg).
Expand Down
4 changes: 2 additions & 2 deletions src/SIS_sum_output.F90
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ subroutine write_ice_statistics(IST, day, n, G, IG, CS, message, check_column, t
real :: Heat_anom ! The change in heat that cannot be accounted for by
! the surface fluxes, in Joules.
real :: Heat_anom_norm ! The heat anomaly normalized by heat (if it is nonzero).
real :: temp ! The mean potential temperature of the ocean, in C.
real :: temp ! The mean potential temperature of the ocean [degC].
real :: temp_anom ! The change in total heat that cannot be accounted for
! by the surface fluxes, divided by the total heat
! capacity of the ocean, in C.
! capacity of the ocean [degC].
real :: Area ! The total area of the sea ice in m2.
real :: Extent ! The total extent of the sea ice in m2.
real :: heat_imb ! The column integrated heat imbalance in enth_unit kg m-2.
Expand Down
26 changes: 13 additions & 13 deletions src/SIS_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ module SIS_types
! 7 of the following 9 variables describe the ocean state as seen by the sea ice.
real, allocatable, dimension(:,:) :: &
s_surf , & !< The ocean's surface salinity in g/kg.
SST_C , & !< The ocean's bulk surface temperature in degC.
T_fr_ocn, & !< The freezing point temperature in degC at the ocean's surface salinity.
SST_C , & !< The ocean's bulk surface temperature [degC].
T_fr_ocn, & !< The freezing point temperature at the ocean's surface salinity [degC].
u_ocn_B, & !< The ocean's zonal velocity on B-grid points in m s-1.
v_ocn_B, & !< The ocean's meridional velocity on B-grid points in m s-1.
u_ocn_C, & !< The ocean's zonal velocity on C-grid points, in m s-1.
Expand All @@ -122,7 +122,7 @@ module SIS_types
! type(coupler_3d_bc_type) :: ocean_fields ! array of fields used for additional tracers

real :: kmelt !< A constant that is used in the calculation of the ocean/ice basal heat flux,
!! in W m-2 K-1. This could be replaced with an array reflecting the turbulence
!! [W m-2 degC-1]. This could be replaced with an array reflecting the turbulence
!! in the under-ice ocean boundary layer and the effective depth of the reported
!! value of t_ocn.

Expand All @@ -140,8 +140,8 @@ module SIS_types
! atmosphere and use for the rapid thermodynamic sea ice changes.
real, allocatable, dimension(:,:) :: &
s_surf , & !< The ocean's surface salinity in g/kg.
SST_C , & !< The ocean's bulk surface temperature in degC.
T_fr_ocn, & !< The freezing point temperature in degC at the ocean's surface salinity.
SST_C , & !< The ocean's bulk surface temperature [degC].
T_fr_ocn, & !< The freezing point temperature at the ocean's surface salinity [degC].
u_ocn_A, & !< The ocean's zonal surface velocity on A-grid points in m s-1.
v_ocn_A, & !< The ocean's meridional surface velocity on A-grid points in m s-1.
u_ice_A, & !< The sea ice's zonal velocity on A-grid points in m s-1.
Expand Down Expand Up @@ -179,7 +179,7 @@ module SIS_types
fprec_top , & !< The downward flux of frozen precipitation at the top of the ice, in kg m-2 s-1.
tmelt , & !< Ice-top melt energy into the ice/snow in J m-2.
bmelt , & !< Ice-bottom melting energy into the ice in J m-2.
Tskin_cat !< The ice skin temperature by category, in degC.
Tskin_cat !< The ice skin temperature by category [degC].
real, allocatable, dimension(:,:,:) :: sw_abs_ocn !< The fraction of the absorbed
!! shortwave radiation that is absorbed in the ocean, nondim and <=1.
!! Equivalent sw_abs_ocn fields are in both the fast_ice_avg_type and the
Expand Down Expand Up @@ -210,7 +210,7 @@ module SIS_types
!! exclusive of any iceberg contributions, based on the temperature difference
!! relative to a reference temperature, in ???.
real, allocatable, dimension(:,:) :: Tskin_avg !< The area-weighted average skin temperature
!! across all ice thickness categories, in deg C, or 0 if there is no ice.
!! across all ice thickness categories [degC], or 0 if there is no ice.
real, allocatable, dimension(:,:) :: ice_free !< The fractional open water used in calculating
!! WindStr_[xy]_A; nondimensional, between 0 & 1.
real, allocatable, dimension(:,:) :: ice_cover !< The fractional ice coverage, summed across all
Expand All @@ -225,15 +225,15 @@ module SIS_types
! then interpolated into unoccupied categories for the purpose of redoing
! the application of the fast thermodynamics
real, allocatable, dimension(:,:,:) :: flux_sh0 !< The upward sensible heat flux at the ice top
!! extrapolated to a skin temperature of 0 deg C, in W m-2.
!! extrapolated to a skin temperature of 0 degC, in W m-2.
real, allocatable, dimension(:,:,:) :: evap0 !< The upward evaporative moisture flux
!! at the top of the ice extrapolated to a skin temperature of 0 deg C, in kg m-2 s-1.
!! at the top of the ice extrapolated to a skin temperature of 0 degC, in kg m-2 s-1.
real, allocatable, dimension(:,:,:) :: flux_lw0 !< The net downward flux of longwave radiation
!! at the top of the ice extrapolated to a skin temperature of 0 deg C, in W m-2.
!! at the top of the ice extrapolated to a skin temperature of 0 degC, in W m-2.
real, allocatable, dimension(:,:,:) :: &
dshdt, & !< The partial derivative of flux_sh0 with ice skin temperature in W m-2 K-1.
devapdt, & !< The partial derivative of evap0 with ice skin temperature in kg m-2 s-1 K-1.
dlwdt !< The partial derivative of flux_lw0 with ice skin temperature in W m-2 K-1.
dshdt, & !< The partial derivative of flux_sh0 with ice skin temperature [W m-2 degC-1].
devapdt, & !< The partial derivative of evap0 with ice skin temperature [kg m-2 s-1 degC-1].
dlwdt !< The partial derivative of flux_lw0 with ice skin temperature [W m-2 degC-1].

!SLOW ONLY
real, allocatable, dimension(:,:) :: frazil_left !< The frazil heat flux that has not yet been
Expand Down
Loading

0 comments on commit e84a0ce

Please sign in to comment.