CLASSIC
Canadian Land Surface Scheme including Biogeochemical Cycles
soilHeatFluxCleanup.f90 File Reference

Soil heat flux calculations and cleanup after surface energy budget calculations. More...

Functions/Subroutines

subroutine soilheatfluxcleanup (TBARPR, G12, G23, TPOND, GZERO, QFREZG, GCONST, GCOEFF, TBAR, TCTOP, TCBOT, HCP, ZPOND, TSURF, TBASE, TBAR1P, A1, A2, B1, B2, C2, FI, IWATER, ISAND, DELZ, DELZW, ILG, IL1, IL2, JL, IG)
 

Detailed Description

Soil heat flux calculations and cleanup after surface energy budget calculations.

Author
D. Verseghy, M. Lazare

Function/Subroutine Documentation

◆ soilheatfluxcleanup()

subroutine soilheatfluxcleanup ( real, dimension(ilg,ig), intent(out)  TBARPR,
real, dimension (ilg), intent(inout)  G12,
real, dimension (ilg), intent(out)  G23,
real, dimension (ilg), intent(inout)  TPOND,
real, dimension (ilg), intent(inout)  GZERO,
real, dimension(ilg), intent(inout)  QFREZG,
real, dimension(ilg), intent(in)  GCONST,
real, dimension(ilg), intent(in)  GCOEFF,
real, dimension (ilg,ig), intent(in)  TBAR,
real, dimension (ilg,ig), intent(in)  TCTOP,
real, dimension (ilg,ig), intent(in)  TCBOT,
real, dimension (ilg,ig), intent(in)  HCP,
real, dimension (ilg), intent(in)  ZPOND,
real, dimension (ilg), intent(in)  TSURF,
real, dimension (ilg), intent(in)  TBASE,
real, dimension(ilg), intent(in)  TBAR1P,
real, dimension (ilg), intent(in)  A1,
real, dimension (ilg), intent(in)  A2,
real, dimension (ilg), intent(in)  B1,
real, dimension (ilg), intent(in)  B2,
real, dimension (ilg), intent(in)  C2,
real, dimension (ilg), intent(in)  FI,
integer, dimension(ilg), intent(in)  IWATER,
integer, dimension (ilg,ig), intent(in)  ISAND,
real, dimension (ig), intent(in)  DELZ,
real, dimension (ilg,ig), intent(in)  DELZW,
integer, intent(in)  ILG,
integer, intent(in)  IL1,
integer, intent(in)  IL2,
integer, intent(in)  JL,
integer, intent(in)  IG 
)
Parameters
[out]tbarprTemperatures of soil layers for subarea [C]
[in,out]g12Heat conduction between first and second soil layers \([W m^{-2}] (G(\Delta z))\)
[out]g23Heat conduction between second and third soil layers \([W m^{-2}]\)
[in,out]tpondTemperature of ponded water \([C] (T_p)\)
[in,out]gzeroHeat conduction into soil surface \([W m^{-2}] (G(0))\)
[in,out]qfrezgEnergy sink to be applied to freezing of ponded water \([W m^{-2}]\)
[in]tbarTemperatures of soil layers, averaged over modelled area [K]
[in]tctopThermal conductivity of soil at top of layer \([W m^{-1} K^{-1}] (\lambda)\)
[in]tcbotThermal conductivity of soil at bottom of layer \([W m^{-1} K^{-1}] (\lambda)\)
[in]hcpHeat capacity of soil layer \([J m^{-3} K^{-1}]\)
[in]delzwPermeable thickness of soil layer [m]
[in]zpondDepth of ponded water on surface \([m] (\Delta z_p)\)
[in]tsurfGround surface temperature [K]
[in]tbaseTemperature of bedrock in third soil layer [K]
[in]tbar1pLumped temperature of ponded water and first soil layer \([K] (T_{1p})\)
[in]a1Work array used in calculation of GCONST and GCOEFF
[in]a2Work array used in calculation of GCONST and GCOEFF
[in]b1Work array used in calculation of GCONST and GCOEFF
[in]b2Work array used in calculation of GCONST and GCOEFF
[in]c2Work array used in calculation of GCONST and GCOEFF
[in]fiFractional coverage of subarea in question on modelled area [ ]
[in]gconstIntercept used in equation relating ground surface heat flux to surface temperature \([W m^{-2}]\)
[in]gcoeffMultiplier used in equation relating ground surface heat flux to surface temperature \([W m^{-2} K^{-1}]\)
[in]iwaterFlag indicating condition of surface (dry, water-covered or snow-covered)
[in]isandSand content flag
[in]delzOverall thickness of soil layer \([m] (\Delta z)\)

In the 100 loop, the heat flux into the ground (without adjustments that may have been applied owing to phase changes of water at the surface or partitioning the residual of the surface energy balance among the surface flux terms) is calculated from the ground surface temperature TSURF, using the GCOEFF and GCONST terms (see documentation of subroutine soilHeatFluxPrep). This flux is then used to back-calculate the heat conduction between the first and second, and the second and third soil layers.

If the depth of water ponded on the surface is greater than zero, the total thickness of the lumped layer consisting of the first soil layer and the ponded water, \(\Delta z_{1p}\), is calculated as the sum of the two depths. The temperature of the ponded water over the subarea in question is disaggregated from the temperature of the lumped layer, \(T_{1p}\), by making use of the calculated heat fluxes at the top and bottom of the layer, and the assumption (discussed in the documentation of subroutine soilHeatFluxPrep) that that the variation of temperature T with depth z within a soil layer can be modelled using a quadratic equation:

\(T(z) = 1/2 T''(0)z^2 + T'(0)z +T(0)\)

Integrating this equation separately over the ponded water depth \(\Delta z_p\) and over the thickness of the lumped layer produces expressions for the ponded water temperature \(T_p\) and the temperature of the lumped layer. Making use of the fact that

\(T''(0) = [T'(\Delta z) - T'(0)]/\Delta z\)

where \(\Delta z\) is a depth interval, and

\(G(z) = - \lambda(z)T'(z)\) where \(\lambda\) represents the thermal conductivity, an expression for \(T_p\) can be derived:

\(T_p = [G(0)/ \lambda(0) – G(\Delta z_{1p})/ \lambda(\Delta z_{1p})] [\Delta z_p^2 - \Delta z_{1p}^2]/ 6 \Delta z_{1p} – G(0) [\Delta z_p - \Delta z_{1p}]/ 2 \lambda(0) – T_{1P}\)

The temperature TBARPR of the first soil layer over the subarea in question can then be obtained by disaggregating the ponded water temperature from the lumped layer temperature using the respective heat capacities of the ponded water and the soil layer. (The heat capacity of the soil is determined as the weighted average of HCP over the permeable thickness DELZW, and the heat capacity of rock, HCPSND, over the impermeable thickness, DELZ-DELZW.) Both the ponded water temperature and the soil layer temperature are converted to C. Lastly, if there is ponded water on the surface (IWATER = 1) and QFREZG, the surface energy available for phase change of water, is positive (indicating an energy source), or if there is snow on the ground (IWATER = 2) and QFREZG is negative (indicating an energy sink), or if there is no liquid or frozen water on the surface (IWATER = 0), QFREZG is added to the heat flux into the ground, GZERO, and then reset to zero.

In loop 200, the subarea soil layer temperatures TBARPR are set for the remaining soil layers. In all cases the temperature of the layer is set to that for the modelled area, TBAR, converted to C, except in the case of the third soil layer if the standard three-layer configuration is being modelled (with a very thick third soil layer of 3.75 m). In this case TBARPR and the layer heat capacity HCP are considered to apply to the permeable depth DELZW of the layer, and the bedrock temperature TBASE and the rock heat capacity HCPSND apply to the remainder, DELZ-DELZW. The disaggregation of TBARPR from TBAR and TBASE is carried out on this basis. TBARPR for this layer is also converted to C.