CLASSIC
Canadian Land Surface Scheme including Biogeochemical Cycles
|
Checks for energy and water balance closure over modelled area. More...
Functions/Subroutines | |
subroutine | energywaterbalancecheck (ISTEP, CTVSTP, CTSSTP, CT1STP, CT2STP, CT3STP, WTVSTP, WTSSTP, WTGSTP, FSGV, FLGV, HFSC, HEVC, HMFC, HTCC, FSGS, FLGS, HFSS, HEVS, HMFN, HTCS, FSGG, FLGG, HFSG, HEVG, HMFG, HTC, PCFC, PCLC, QFCF, QFCL, ROFC, WTRC, PCPN, QFN, ROFN, WTRS, PCPG, QFG, QFC, ROF, WTRG, CMAI, RCAN, SCAN, TCAN, SNO, WSNOW, TSNOW, THLIQ, THICE, HCPS, THPOR, DELZW, TBAR, ZPOND, TPOND, DELZ, FCS, FGS, FC, FG, IL1, IL2, ILG, IG, N) |
Checks for energy and water balance closure over modelled area.
subroutine energywaterbalancecheck | ( | integer, intent(in) | ISTEP, |
real, dimension(ilg), intent(inout) | CTVSTP, | ||
real, dimension(ilg), intent(inout) | CTSSTP, | ||
real, dimension(ilg), intent(inout) | CT1STP, | ||
real, dimension(ilg), intent(inout) | CT2STP, | ||
real, dimension(ilg), intent(inout) | CT3STP, | ||
real, dimension(ilg), intent(inout) | WTVSTP, | ||
real, dimension(ilg), intent(inout) | WTSSTP, | ||
real, dimension(ilg), intent(inout) | WTGSTP, | ||
real, dimension (ilg), intent(in) | FSGV, | ||
real, dimension (ilg), intent(in) | FLGV, | ||
real, dimension (ilg), intent(in) | HFSC, | ||
real, dimension (ilg), intent(in) | HEVC, | ||
real, dimension (ilg), intent(in) | HMFC, | ||
real, dimension (ilg), intent(in) | HTCC, | ||
real, dimension (ilg), intent(in) | FSGS, | ||
real, dimension (ilg), intent(in) | FLGS, | ||
real, dimension (ilg), intent(in) | HFSS, | ||
real, dimension (ilg), intent(in) | HEVS, | ||
real, dimension (ilg), intent(in) | HMFN, | ||
real, dimension (ilg), intent(in) | HTCS, | ||
real, dimension (ilg), intent(in) | FSGG, | ||
real, dimension (ilg), intent(in) | FLGG, | ||
real, dimension (ilg), intent(in) | HFSG, | ||
real, dimension (ilg), intent(in) | HEVG, | ||
real, dimension (ilg,ig), intent(in) | HMFG, | ||
real, dimension (ilg,ig), intent(in) | HTC, | ||
real, dimension (ilg), intent(in) | PCFC, | ||
real, dimension (ilg), intent(in) | PCLC, | ||
real, dimension (ilg), intent(in) | QFCF, | ||
real, dimension (ilg), intent(in) | QFCL, | ||
real, dimension (ilg), intent(in) | ROFC, | ||
real, dimension (ilg), intent(in) | WTRC, | ||
real, dimension (ilg), intent(in) | PCPN, | ||
real, dimension (ilg), intent(in) | QFN, | ||
real, dimension (ilg), intent(in) | ROFN, | ||
real, dimension (ilg), intent(in) | WTRS, | ||
real, dimension (ilg), intent(in) | PCPG, | ||
real, dimension (ilg), intent(in) | QFG, | ||
real, dimension (ilg,ig), intent(in) | QFC, | ||
real, dimension (ilg), intent(in) | ROF, | ||
real, dimension (ilg), intent(in) | WTRG, | ||
real, dimension (ilg), intent(in) | CMAI, | ||
real, dimension (ilg), intent(in) | RCAN, | ||
real, dimension (ilg), intent(in) | SCAN, | ||
real, dimension (ilg), intent(in) | TCAN, | ||
real, dimension (ilg), intent(in) | SNO, | ||
real, dimension (ilg), intent(in) | WSNOW, | ||
real, dimension (ilg), intent(in) | TSNOW, | ||
real, dimension (ilg,ig), intent(in) | THLIQ, | ||
real, dimension (ilg,ig), intent(in) | THICE, | ||
real, dimension (ilg,ig), intent(in) | HCPS, | ||
real, dimension (ilg,ig), intent(in) | THPOR, | ||
real, dimension (ilg,ig), intent(in) | DELZW, | ||
real, dimension (ilg,ig), intent(in) | TBAR, | ||
real, dimension (ilg), intent(in) | ZPOND, | ||
real, dimension (ilg), intent(in) | TPOND, | ||
real, dimension (ig), intent(in) | DELZ, | ||
real, dimension (ilg), intent(in) | FCS, | ||
real, dimension (ilg), intent(in) | FGS, | ||
real, dimension (ilg), intent(in) | FC, | ||
real, dimension (ilg), intent(in) | FG, | ||
integer, intent(in) | IL1, | ||
integer, intent(in) | IL2, | ||
integer, intent(in) | ILG, | ||
integer, intent(in) | IG, | ||
integer, intent(in) | N | ||
) |
[in] | istep | Flag indicating position at beginning or end of time step |
[in,out] | ctvstp | Change in internal energy of vegetation over current time step \([W m^{-2}] \) |
[in,out] | ctsstp | Change in internal energy of snow pack over current time step \([W m^{-2}] \) |
[in,out] | ct1stp | Change in internal energy of first soil layer over current time step \([W m^{-2}] \) |
[in,out] | ct2stp | Change in internal energy of second soil layer over current time step \([W m^{-2}] \) |
[in,out] | ct3stp | Change in internal energy of third soil layer over current time step \([W m^{-2}] \) |
[in,out] | wtvstp | Change in vegetation mass over current time step \([kg m^{-2}]\) |
[in,out] | wtsstp | Change in snow mass over current time step \([kg m^{-2}]\) |
[in,out] | wtgstp | Change in soil water storage over current time step \([kg m^{-2}]\) |
[in] | fsgv | Diagnosed net shortwave radiation on vegetation canopy \([W m^{-2}] (K_{*,c})\) |
[in] | flgv | Diagnosed net longwave radiation on vegetation canopy \([W m^{-2}] (L_{*,c})\) |
[in] | hfsc | Diagnosed sensible heat flux on vegetation canopy \([W m^{-2}] (Q_{H,c})\) |
[in] | hevc | Diagnosed latent heat flux on vegetation canopy \([W m^{-2}] (Q_{E,c})\) |
[in] | hmfc | Diagnosed energy associated with phase change of water on vegetation \([W m^{-2}] (Q_{M,c})\) |
[in] | htcc | Diagnosed internal energy change of vegetation canopy due to conduction and/or change in mass \([W m^{-2}] (Q_{I,c})\) |
[in] | fsgs | Diagnosed net shortwave radiation at snow surface \([W m^{-2}] (K_{*,s})\) |
[in] | flgs | Diagnosed net longwave radiation at snow surface \([W m^{-2}] (L_{*,s})\) |
[in] | hfss | Diagnosed sensible heat flux at snow surface \([W m^{-2}] (Q_{H,s})\) |
[in] | hevs | Diagnosed latent heat flux at snow surface \([W m^{-2}] (Q_{E,s})\) |
[in] | hmfn | Diagnosed energy associated with phase change of water in snow pack \([W m^{-2}] (Q_{M,s})\) |
[in] | htcs | Diagnosed internal energy change of snow pack due to conduction and/or change in mass \([W m^{-2}] (Q_{I,s})\) |
[in] | fsgg | Diagnosed net shortwave radiation at soil surface \([W m^{-2}] (K_{*,g})\) |
[in] | flgg | Diagnosed net longwave radiation at soil surface \([W m^{-2}] (L_{*,g})\) |
[in] | hfsg | Diagnosed sensible heat flux at soil surface \([W m^{-2}] (Q_{H,g})\) |
[in] | hevg | Diagnosed latent heat flux at soil surface \([W m^{-2}] (Q_{E,g})\) |
[in] | hmfg | Diagnosed energy associated with phase change of water in soil layers \([W m^{-2}] (Q_{M,g})\) |
[in] | htc | Diagnosed internal energy change of soil layer due to conduction and/or change in mass \([W m^{-2}] (Q_{I,g})\) |
[in] | pcfc | Diagnosed frozen precipitation intercepted by vegetation \([kg m^{-2} s^{-1}] (P_{f,c})\) |
[in] | pclc | Diagnosed liquid precipitation intercepted by vegetation \([kg m^{-2} s^{-1}] (P_{l,c})\) |
[in] | qfcf | Diagnosed vapour flux from frozen water on vegetation \([kg m^{-2} s^{-1}] (E_{f,c})\) |
[in] | qfcl | Diagnosed vapour flux from liquid water on vegetation \([kg m^{-2} s^{-1}] (E_{l,c})\) |
[in] | rofc | Liquid/frozen water runoff from vegetation \([kg m^{-2} s^{-1}] (R_c)\) |
[in] | wtrc | Diagnosed water transferred off the vegetation canopy \([kg m^{-2} s^{-1}] (A_c)\) |
[in] | pcpn | Diagnosed precipitation incident on snow pack \([kg m^{-2} s^{-1}] (P_s)\) |
[in] | qfn | Diagnosed water vapour flux from snow pack \([kg m^{-2} s^{-1}] (E_s)\) |
[in] | rofn | Liquid water runoff from snow pack \([kg m^{-2} s^{-1}] (R_s)\) |
[in] | wtrs | Diagnosed water transferred into or out of the snow pack \([kg m^{-2} s^{-1}] (A_s)\) |
[in] | pcpg | Diagnosed precipitation incident on ground \([kg m^{-2} s^{-1}] (P_g)\) |
[in] | qfg | Diagnosed water vapour flux from ground surface \([kg m^{-2} s^{-1}] (E_g)\) |
[in] | qfc | Diagnosed vapour flux from transpiration over modelled area \([W m^{-2}] (E_c)\) |
[in] | rof | Total runoff from soil \([kg m^{-2} s^{-1}] (R_g)\) |
[in] | wtrg | Diagnosed water transferred into or out of the soil \([kg m^{-2} s^{-1}] (A_g)\) |
[in] | cmai | Current mass of vegetation canopy \([kg m^{-2}] (W_c)\) |
[in] | rcan | Intercepted liquid water stored on canopy \([kg m^{-2}] (W_{l,c})\) |
[in] | scan | Intercepted frozen water stored on canopy \([kg m^{-2}] (W_{f,c})\) |
[in] | tcan | Vegetation canopy temperature \([K] (T_c)\) |
[in] | sno | Mass of snow pack \([kg m^{-2}] (W_s)\) |
[in] | wsnow | Liquid water content of snow pack \([kg m^{-2}] (W_{l,s})\) |
[in] | tsnow | Snowpack temperature \([K] (T_s)\) |
[in] | thliq | Volumetric liquid water content of soil layers \([m^3 m^{-3}] (\theta_l)\) |
[in] | thice | Volumetric frozen water content of soil layers \([m^3 m^{-3}] (\theta_f)\) |
[in] | hcps | Volumetric heat capacity of soil particles \([J m^{-3}] (C_g)\) |
[in] | thpor | Pore volume in soil layer \([m^3 m^{-3}]\) |
[in] | delzw | Permeable thickness of soil layer \([m] (\Delta_zw)\) |
[in] | delz | Total thickness of soil layer \([m] (\Delta_z)\) |
[in] | tbar | Temperature of soil layers \([K] (T_g)\) |
[in] | zpond | Depth of ponded water on surface \([m] (z_p)\) |
[in] | tpond | Total thickness of soil layer \([m] (\Delta_z)\) |
[in] | fcs | Fractional coverage of vegetation over snow on modelled area [ ] |
[in] | fgs | Fractional coverage of snow over bare ground on modelled area [ ] |
[in] | fc | Fractional coverage of vegetation over bare ground on modelled area [ ] |
[in] | fg | Fractional coverage of bare ground on modelled area [ ] |
In this subroutine, checks are carried out to ensure that the change in energy storage in each of the components of the modelled area (canopy, snow and soil) is equal to the sum of the energy fluxes into and out of them; and that the change in moisture storage in each of the components is equal to the sum of the water fluxes into and out of them. The subroutine is called twice, once at the beginning (ISTEP=0) and once at the end (ISTEP=1) of each time step. At the beginning, the instantaneous energy and moisture storage terms are evaluated, and at the end the differences over the time step are calculated:
Change in canopy energy storage = \(\Delta [(c_c W_c + c_w W_{l,c} + c_i W_{f,c} )T_c ] / \Delta t\)
Change in snow energy storage = \(\Delta [(C_i W_s /\rho_i + C_w W_{l,s} / \rho_w)T_s ]/ \Delta t \)
Change in soil layer energy storage = \(\Delta {[(C_w \theta_l + C_i \theta_f + C_g \theta_g) \Delta z_w + C_b (\Delta z – \Delta z_w)]T_j }/ \Delta t\) (For the first soil layer, the numerator contains the additional term \(C_w z_p T_p\).)
Change in canopy moisture storage = \(\Delta[W_{l,c} + W_{f,c}]\)
Change in snow moisture storage = \(\Delta[W_s + W_{l,s}]\)
Change in soil moisture storage = \(\Delta [(\theta_l \rho_w + \theta_f \rho_i) \Delta z_w + z_p \rho_w ]\)
The net energy and moisture fluxes are also evaluated at the end of the time step:
Net energy flux for canopy = \(K_{*,c} + L_{*,c} – Q_{H,c} – Q_{E,c} – Q_{M,c} + Q_{I,c}\)
Net energy flux for snow = \(K_{*,s} + L_{*,s} – Q_{H,s} – Q_{E,s} – Q_{M,s} + Q_{I,s}\)
Net energy flux for first soil layer = \(K_{*,g} + L_{*,g} – Q_{H,g} – Q_{E,g} – Q_{M,1} + Q_{I,1}\)
Net energy flux for other soil layers = \(- Q_{M,j} + Q_{I,j}\)
Net moisture flux for canopy = \(P_{l,c} + P_{f,c} – E_{l,c} – E_{f,c} – R_c + A_c\)
Net moisture flux for snow = \(P_s – E_s – R_s + A_s\)
Net moisture flux for soil = \(P_g – E_g – R_g + A_g - E_c\)
In these equations the \(K_*\) terms refer to net shortwave radiation, the \(L_*\) terms to net longwave radiation, the \(Q_H\) terms to sensible heat flux, the \(Q_E\) terms to latent heat flux, the \(Q_M\) terms to heat associated with melting or freezing of water, and the \(Q_I\) terms to changes in heat storage caused by conduction or redistribution of water. The P terms refer to precipitation, the E terms to evaporation, the R terms to runoff and the A terms to water transferred between different components of the landscape. The subscript 1 refers to the first soil layer, and j to a generalized other layer.
Finally, each change in energy or moisture storage is compared in turn with the corresponding net flux of energy or moisture, and if the difference is greater than a selected threshold value, an error message is printed out and the run is stopped.