CLASSIC
Canadian Land Surface Scheme including Biogeochemical Cycles
|
Checks for closure of surface water budget, and for unphysical values of certain variables. More...
Functions/Subroutines | |
subroutine | checkwaterbudget (ISFC, PCPR, EVAP, RUNOFF, WLOST, RAICAN, SNOCAN, RAICNI, SNOCNI, ZPOND, ZPONDI, THLIQ, THICE, THLIQI, THICEI, ZSNOW, RHOSNO, XSNOW, SNOWI, WSNOW, WSNOWI, FCS, FGS, FI, BAL, THPOR, THLMIN, DELZW, ISAND, IG, ILG, IL1, IL2, JL, N) |
Checks for closure of surface water budget, and for unphysical values of certain variables.
subroutine checkwaterbudget | ( | integer, intent(in) | ISFC, |
real, dimension (ilg), intent(in) | PCPR, | ||
real, dimension (ilg), intent(in) | EVAP, | ||
real, dimension(ilg), intent(in) | RUNOFF, | ||
real, dimension (ilg), intent(in) | WLOST, | ||
real, dimension(ilg), intent(in) | RAICAN, | ||
real, dimension(ilg), intent(in) | SNOCAN, | ||
real, dimension(ilg), intent(in) | RAICNI, | ||
real, dimension(ilg), intent(in) | SNOCNI, | ||
real, dimension (ilg), intent(in) | ZPOND, | ||
real, dimension(ilg), intent(in) | ZPONDI, | ||
real, dimension (ilg,ig), intent(in) | THLIQ, | ||
real, dimension (ilg,ig), intent(in) | THICE, | ||
real, dimension(ilg,ig), intent(in) | THLIQI, | ||
real, dimension(ilg,ig), intent(in) | THICEI, | ||
real, dimension (ilg), intent(in) | ZSNOW, | ||
real, dimension(ilg), intent(in) | RHOSNO, | ||
real, dimension (ilg), intent(inout) | XSNOW, | ||
real, dimension (ilg), intent(in) | SNOWI, | ||
real, dimension (ilg), intent(in) | WSNOW, | ||
real, dimension(ilg), intent(in) | WSNOWI, | ||
real, dimension (ilg), intent(in) | FCS, | ||
real, dimension (ilg), intent(in) | FGS, | ||
real, dimension (ilg), intent(in) | FI, | ||
real, dimension(ilg), intent(inout) | BAL, | ||
real, dimension (ilg,ig), intent(in) | THPOR, | ||
real, dimension(ilg,ig), intent(in) | THLMIN, | ||
real, dimension (ilg,ig), intent(in) | DELZW, | ||
integer, dimension (ilg,ig), intent(in) | ISAND, | ||
integer, intent(in) | IG, | ||
integer, intent(in) | ILG, | ||
integer, intent(in) | IL1, | ||
integer, intent(in) | IL2, | ||
integer, intent(in) | JL, | ||
integer, intent(in) | N | ||
) |
[in] | isfc | Type of surface (1 = canopy over snow, 2 = snow covered ground, 3 = canopy over bare ground, 4 = bare ground) |
[in] | pcpr | Precipitation rate over modelled subarea \([kg m^{-2} s^{-1}]\) |
[in] | evap | Evapotranspiration rate over modelled subarea \([kg m^{-2} s^{-1}]\) |
[in] | runoff | Total runoff over modelled subarea [m] |
[in] | wlost | Residual amount of water that cannot be supplied by surface stores \([kg m^{-2}]\) |
[in] | raican | Intercepted liquid water on canopy at end of time step \([kg m^{-2}]\) |
[in] | snocan | Intercepted frozen water on canopy at end of time step \([kg m^{-2}]\) |
[in] | raicni | Intercepted liquid water on canopy at beginning of time step \([kg m^{-2}]\) |
[in] | snocni | Intercepted frozen water on canopy at beginning of time step \([kg m^{-2}]\) |
[in] | zpond | Depth of ponded water on ground at end of time step [m] |
[in] | zpondi | Depth of ponded water on ground at beginning of time step [m] |
[in] | zsnow | Depth of snow pack [m] |
[in] | rhosno | Density of snow pack \([kg m^{-3}]\) |
[in,out] | xsnow | Switch to indicate presence of snow cover [ ] |
[in] | snowi | Snow pack mass at beginning of time step \([kg m^{-2}]\) |
[in] | wsnow | Liquid water content of snow pack at end of time step \([kg m^{-2}]\) |
[in] | wsnowi | Liquid water content of snow pack at beginning of time step \([kg m^{-2}]\) |
[in] | fcs | Fractional coverage of canopy over snow on modelled area [ ] |
[in] | fgs | Fractional coverage of snow over bare ground on modelled area [ ] |
[in] | fi | Fractional coverage of subarea in question on modelled area [ ] |
[in] | thliq | Volumetric liquid water content of soil layers at end of time step \([m^3 m^{-3}]\) |
[in] | thice | Volumetric frozen water content of soil layers at end of time step \([m^3 m^{-3}]\) |
[in] | thliqi | Volumetric frozen water content of soil layers at beginning of time step \([m^3 m^{-3}]\) |
[in] | thicei | Volumetric frozen water content of soil layers at beginning of time step \([m^3 m^{-3}]\) |
[in] | thpor | Pore volume in soil layer \([m^3 m^{-3}]\) |
[in] | thlmin | Residual soil liquid water content remaining after freezing or evaporation \([m^3 m^{-3}]\) |
[in] | delzw | Permeable depth of soil layer [m] |
This subroutine is called from waterBudgetDriver to perform water balance checks for each of the four subareas. The flag ISFC indicates which subarea is being addressed: ISFC=1 for vegetation over snow, ISFC=2 for snow over bare ground, ISFC=3 for vegetation over bare ground, and ISFC=4 for bare ground. If a problem is discovered, a flag is set to the index of the modelled area, and a call to errorHandler is performed with an error message. Checks for unphysical values of certain water balance variables are performed against an accuracy limit ACCLMT, currently set to \(1x10^{-3} kg m^{-2}\) or \(m^3 m^{-3}\). The overall water balance of the subarea is checked against an accuracy limit BALLMT, currently set to \(1x10^{-1} kg m^{-2}\). (These values reflect expected roundoff errors associated with 32-bit computation.)
In loop 100, for canopy-covered subareas, the intercepted rain RAICAN and snow SNOCAN are checked to ensure that if they are negative, they are vanishingly small. A similar check is done for the runoff.
In the 150 loop, for all areas that are not continental ice sheets (ISAND=-4), the liquid water content in each soil layer is checked to ensure that it is not larger than the pore volume and that it is not smaller than the minimum liquid water content (except for rock layers). The ice content is similarly checked to ensure that the sum of it, converted to an equivalent liquid water content, plus the minimum water content, is not greater than the pore volume (except for rock layers). It is also checked to ensure that if it is negative, it is vanishingly small.
Finally, in loop 300, the overall water balance BAL is calculated and compared to BALLMT. BAL is evaluated as the residual of the precipitation, the evaporation, the runoff, the water loss term WLOST, the change in canopy intercepted liquid and frozen water (for vegetation-covered areas), the change in surface ponded water, the change in snow pack and snow liquid water content (for snow-covered areas), and the changes in the soil layer liquid and frozen water contents. If the absolute value of BAL is greater than BALLMT, a flag is set, all of the terms entering BAL are printed out, and a call to errorHandler is performed.