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

Initializes subarea variables for surface water budget calculations, and performs preliminary calculations for diagnostic variables. More...

Functions/Subroutines

subroutine watercalcprep (THLQCO, THLQGO, THLQCS, THLQGS, THICCO, THICGO, THICCS, THICGS, HCPCO, HCPGO, HCPCS, HCPGS, GRKSC, GRKSG, GRKSCS, GRKSGS, SPCC, SPCG, SPCCS, SPCGS, TSPCC, TSPCG, TSPCCS, TSPCGS, RPCC, RPCG, RPCCS, RPCGS, TRPCC, TRPCG, TRPCCS, TRPCGS, EVPIC, EVPIG, EVPICS, EVPIGS, ZPONDC, ZPONDG, ZPNDCS, ZPNDGS, XSNOWC, XSNOWG, XSNOCS, XSNOGS, ZSNOWC, ZSNOWG, ZSNOCS, ZSNOGS, ALBSC, ALBSG, ALBSCS, ALBSGS, RHOSC, RHOSG, HCPSC, HCPSG, HCPSCS, HCPSGS, RUNFC, RUNFG, RUNFCS, RUNFGS, TRUNFC, TRUNFG, TRNFCS, TRNFGS, TBASC, TBASG, TBASCS, TBASGS, GFLXC, GFLXG, GFLXCS, GFLXGS, SUBLC, SUBLCS, WLOSTC, WLOSTG, WLSTCS, WLSTGS, RAC, RACS, SNC, SNCS, TSNOWC, TSNOWG, OVRFLW, SUBFLW, BASFLW, TOVRFL, TSUBFL, TBASFL, PCFC, PCLC, PCPN, PCPG, QFCF, QFCL, QFN, QFG, QFC, HMFG, ROVG, ROFC, ROFN, TRUNOF, THLIQX, THICEX, THLDUM, THIDUM, DT, RDUMMY, ZERO, IZERO, DELZZ, FC, FG, FCS, FGS, THLIQC, THLIQG, THICEC, THICEG, HCPC, HCPG, TBARC, TBARG, TBARCS, TBARGS, TBASE, TSURX, FSVF, FSVFS, RAICAN, SNOCAN, RAICNS, SNOCNS, EVAPC, EVAPCG, EVAPG, EVAPCS, EVPCSG, EVAPGS, RPCP, TRPCP, SPCP, TSPCP, RHOSNI, ZPOND, ZSNOW, ALBSNO, WSNOCS, WSNOGS, RHOSCS, RHOSGS, THPOR, HCPS, GRKSAT, ISAND, DELZW, DELZ, ILG, IL1, IL2, JL, IG, IGP1, NLANDCS, NLANDGS, NLANDC, NLANDG, RADD, SADD)
 

Detailed Description

Initializes subarea variables for surface water budget calculations, and performs preliminary calculations for diagnostic variables.

Author
D. Verseghy, M. Lazare, Y. Delage, R. Harvey, R. Soulis, P. Bartlett

Function/Subroutine Documentation

◆ watercalcprep()

subroutine watercalcprep ( real, dimension(ilg,ig), intent(out)  THLQCO,
real, dimension(ilg,ig), intent(out)  THLQGO,
real, dimension(ilg,ig), intent(out)  THLQCS,
real, dimension(ilg,ig), intent(out)  THLQGS,
real, dimension(ilg,ig), intent(out)  THICCO,
real, dimension(ilg,ig), intent(out)  THICGO,
real, dimension(ilg,ig), intent(out)  THICCS,
real, dimension(ilg,ig), intent(out)  THICGS,
real, dimension (ilg,ig), intent(out)  HCPCO,
real, dimension (ilg,ig), intent(out)  HCPGO,
real, dimension (ilg,ig), intent(out)  HCPCS,
real, dimension (ilg,ig), intent(out)  HCPGS,
real, dimension (ilg,ig), intent(out)  GRKSC,
real, dimension (ilg,ig), intent(out)  GRKSG,
real, dimension(ilg,ig), intent(out)  GRKSCS,
real, dimension(ilg,ig), intent(out)  GRKSGS,
real, dimension (ilg), intent(out)  SPCC,
real, dimension (ilg), intent(out)  SPCG,
real, dimension (ilg), intent(out)  SPCCS,
real, dimension (ilg), intent(out)  SPCGS,
real, dimension (ilg), intent(out)  TSPCC,
real, dimension (ilg), intent(out)  TSPCG,
real, dimension(ilg), intent(out)  TSPCCS,
real, dimension(ilg), intent(out)  TSPCGS,
real, dimension (ilg), intent(out)  RPCC,
real, dimension (ilg), intent(out)  RPCG,
real, dimension (ilg), intent(out)  RPCCS,
real, dimension (ilg), intent(out)  RPCGS,
real, dimension (ilg), intent(out)  TRPCC,
real, dimension (ilg), intent(out)  TRPCG,
real, dimension(ilg), intent(out)  TRPCCS,
real, dimension(ilg), intent(out)  TRPCGS,
real, dimension (ilg), intent(out)  EVPIC,
real, dimension (ilg), intent(out)  EVPIG,
real, dimension(ilg), intent(out)  EVPICS,
real, dimension(ilg), intent(out)  EVPIGS,
real, dimension(ilg), intent(out)  ZPONDC,
real, dimension(ilg), intent(out)  ZPONDG,
real, dimension(ilg), intent(out)  ZPNDCS,
real, dimension(ilg), intent(out)  ZPNDGS,
real, dimension(ilg), intent(out)  XSNOWC,
real, dimension(ilg), intent(out)  XSNOWG,
real, dimension(ilg), intent(out)  XSNOCS,
real, dimension(ilg), intent(out)  XSNOGS,
real, dimension(ilg), intent(out)  ZSNOWC,
real, dimension(ilg), intent(out)  ZSNOWG,
real, dimension(ilg), intent(out)  ZSNOCS,
real, dimension(ilg), intent(out)  ZSNOGS,
real, dimension (ilg), intent(out)  ALBSC,
real, dimension (ilg), intent(out)  ALBSG,
real, dimension(ilg), intent(out)  ALBSCS,
real, dimension(ilg), intent(out)  ALBSGS,
real, dimension (ilg), intent(out)  RHOSC,
real, dimension (ilg), intent(out)  RHOSG,
real, dimension (ilg), intent(out)  HCPSC,
real, dimension (ilg), intent(out)  HCPSG,
real, dimension(ilg), intent(out)  HCPSCS,
real, dimension(ilg), intent(out)  HCPSGS,
real, dimension (ilg), intent(out)  RUNFC,
real, dimension (ilg), intent(out)  RUNFG,
real, dimension(ilg), intent(out)  RUNFCS,
real, dimension(ilg), intent(out)  RUNFGS,
real, dimension(ilg), intent(out)  TRUNFC,
real, dimension(ilg), intent(out)  TRUNFG,
real, dimension(ilg), intent(out)  TRNFCS,
real, dimension(ilg), intent(out)  TRNFGS,
real, dimension (ilg), intent(out)  TBASC,
real, dimension (ilg), intent(out)  TBASG,
real, dimension(ilg), intent(out)  TBASCS,
real, dimension(ilg), intent(out)  TBASGS,
real, dimension (ilg,ig), intent(out)  GFLXC,
real, dimension (ilg,ig), intent(out)  GFLXG,
real, dimension(ilg,ig), intent(out)  GFLXCS,
real, dimension(ilg,ig), intent(out)  GFLXGS,
real, dimension (ilg), intent(inout)  SUBLC,
real, dimension(ilg), intent(inout)  SUBLCS,
real, dimension(ilg), intent(out)  WLOSTC,
real, dimension(ilg), intent(out)  WLOSTG,
real, dimension(ilg), intent(out)  WLSTCS,
real, dimension(ilg), intent(out)  WLSTGS,
real, dimension (ilg), intent(out)  RAC,
real, dimension (ilg), intent(out)  RACS,
real, dimension (ilg), intent(out)  SNC,
real, dimension (ilg), intent(out)  SNCS,
real, dimension(ilg), intent(out)  TSNOWC,
real, dimension(ilg), intent(out)  TSNOWG,
real, dimension(ilg), intent(out)  OVRFLW,
real, dimension(ilg), intent(out)  SUBFLW,
real, dimension(ilg), intent(out)  BASFLW,
real, dimension(ilg), intent(out)  TOVRFL,
real, dimension(ilg), intent(out)  TSUBFL,
real, dimension(ilg), intent(out)  TBASFL,
real, dimension (ilg), intent(inout)  PCFC,
real, dimension (ilg), intent(inout)  PCLC,
real, dimension (ilg), intent(inout)  PCPN,
real, dimension (ilg), intent(inout)  PCPG,
real, dimension (ilg), intent(inout)  QFCF,
real, dimension (ilg), intent(inout)  QFCL,
real, dimension (ilg), intent(inout)  QFN,
real, dimension (ilg), intent(inout)  QFG,
real, dimension (ilg,ig), intent(out)  QFC,
real, dimension (ilg,ig), intent(out)  HMFG,
real, dimension (ilg), intent(out)  ROVG,
real, dimension (ilg), intent(out)  ROFC,
real, dimension (ilg), intent(out)  ROFN,
real, dimension(ilg), intent(out)  TRUNOF,
real, dimension(ilg,igp1), intent(out)  THLIQX,
real, dimension(ilg,igp1), intent(out)  THICEX,
real, dimension(ilg,ig), intent(out)  THLDUM,
real, dimension(ilg,ig), intent(out)  THIDUM,
real, dimension (ilg), intent(out)  DT,
real, dimension(ilg), intent(out)  RDUMMY,
real, dimension (ilg), intent(out)  ZERO,
integer, dimension (ilg), intent(out)  IZERO,
real, dimension (ilg,ig), intent(out)  DELZZ,
real, dimension (ilg), intent(in)  FC,
real, dimension (ilg), intent(in)  FG,
real, dimension (ilg), intent(in)  FCS,
real, dimension (ilg), intent(in)  FGS,
real, dimension(ilg,ig), intent(in)  THLIQC,
real, dimension(ilg,ig), intent(in)  THLIQG,
real, dimension(ilg,ig), intent(in)  THICEC,
real, dimension(ilg,ig), intent(in)  THICEG,
real, dimension (ilg,ig), intent(in)  HCPC,
real, dimension (ilg,ig), intent(in)  HCPG,
real, dimension (ilg,ig), intent(in)  TBARC,
real, dimension (ilg,ig), intent(in)  TBARG,
real, dimension(ilg,ig), intent(in)  TBARCS,
real, dimension(ilg,ig), intent(in)  TBARGS,
real, dimension (ilg), intent(in)  TBASE,
real, dimension(ilg,4), intent(in)  TSURX,
real, dimension (ilg), intent(in)  FSVF,
real, dimension (ilg), intent(in)  FSVFS,
real, dimension(ilg), intent(in)  RAICAN,
real, dimension(ilg), intent(in)  SNOCAN,
real, dimension(ilg), intent(in)  RAICNS,
real, dimension(ilg), intent(in)  SNOCNS,
real, dimension (ilg), intent(inout)  EVAPC,
real, dimension(ilg), intent(in)  EVAPCG,
real, dimension (ilg), intent(inout)  EVAPG,
real, dimension(ilg), intent(inout)  EVAPCS,
real, dimension(ilg), intent(in)  EVPCSG,
real, dimension(ilg), intent(inout)  EVAPGS,
real, dimension (ilg), intent(in)  RPCP,
real, dimension (ilg), intent(in)  TRPCP,
real, dimension (ilg), intent(in)  SPCP,
real, dimension (ilg), intent(in)  TSPCP,
real, dimension(ilg), intent(in)  RHOSNI,
real, dimension (ilg), intent(in)  ZPOND,
real, dimension (ilg), intent(in)  ZSNOW,
real, dimension(ilg), intent(in)  ALBSNO,
real, dimension(ilg), intent(in)  WSNOCS,
real, dimension(ilg), intent(in)  WSNOGS,
real, dimension(ilg), intent(in)  RHOSCS,
real, dimension(ilg), intent(in)  RHOSGS,
real, dimension (ilg,ig), intent(in)  THPOR,
real, dimension (ilg,ig), intent(in)  HCPS,
real, dimension(ilg,ig), intent(in)  GRKSAT,
integer, dimension (ilg,ig), intent(in)  ISAND,
real, dimension (ilg,ig), intent(in)  DELZW,
real, dimension (ig), intent(in)  DELZ,
integer, intent(in)  ILG,
integer, intent(in)  IL1,
integer, intent(in)  IL2,
integer, intent(in)  JL,
integer, intent(in)  IG,
integer, intent(in)  IGP1,
integer, intent(in)  NLANDCS,
integer, intent(in)  NLANDGS,
integer, intent(in)  NLANDC,
integer, intent(in)  NLANDG,
real, dimension(ilg), intent(inout)  RADD,
real, dimension(ilg), intent(inout)  SADD 
)
Parameters
[out]thlqcoSubarea volumetric liquid water content of soil layers \([m^3 m^{-3}]\)
[out]thlqgoSubarea volumetric liquid water content of soil layers \([m^3 m^{-3}]\)
[out]thlqcsSubarea volumetric liquid water content of soil layers \([m^3 m^{-3}]\)
[out]thlqgsSubarea volumetric liquid water content of soil layers \([m^3 m^{-3}]\)
[out]thiccoSubarea volumetric frozen water content of soil layers \([m^3 m^{-3}] (\theta_i)\)
[out]thicgoSubarea volumetric frozen water content of soil layers \([m^3 m^{-3}] (\theta_i)\)
[out]thiccsSubarea volumetric frozen water content of soil layers \([m^3 m^{-3}] (\theta_i)\)
[out]thicgsSubarea volumetric frozen water content of soil layers \([m^3 m^{-3}] (\theta_i)\)
[out]hcpcoSubarea heat capacity of soil layers \([J m^{-3} K^{-1}]\)
[out]hcpgoSubarea heat capacity of soil layers \([J m^{-3} K^{-1}]\)
[out]hcpcsSubarea heat capacity of soil layers \([J m^{-3} K^{-1}]\)
[out]hcpgsSubarea heat capacity of soil layers \([J m^{-3} K^{-1}]\)
[out]grkscSubarea saturated hydraulic conductivity \([m s^{-1}] (K_{sat})\)
[out]grksgSubarea saturated hydraulic conductivity \([m s^{-1}] (K_{sat})\)
[out]grkscsSubarea saturated hydraulic conductivity \([m s^{-1}] (K_{sat})\)
[out]grksgsSubarea saturated hydraulic conductivity \([m s^{-1}] (K_{sat})\)
[out]gflxcSubarea heat flux between soil layers \([W m^{-2}]\)
[out]gflxgSubarea heat flux between soil layers \([W m^{-2}]\)
[out]gflxcsSubarea heat flux between soil layers \([W m^{-2}]\)
[out]gflxgsSubarea heat flux between soil layers \([W m^{-2}]\)
[out]thldumInternal waterBudgetDriver dummy variable for soil frozen water \([m^3 m^{-3}]\)
[out]thidumInternal waterBudgetDriver dummy variable for soil frozen water \([m^3 m^{-3}]\)
[out]qfcWater removed from soil layers by transpiration \([kg m^{-2} s^{-1}]\)
[out]hmfgEnergy associated with phase change of water in soil layers \([W m^{-2}]\)
[out]thliqxInternal waterBudgetDriver work array for soil frozen water \([m^3 m^{-3}]\)
[out]thicexInternal waterBudgetDriver work array for soil frozen water \([m^3 m^{-3}]\)
[out]spccSubarea snowfall rate \([m s^{-1}]\)
[out]spcgSubarea snowfall rate \([m s^{-1}]\)
[out]spccsSubarea snowfall rate \([m s^{-1}]\)
[out]spcgsSubarea snowfall rate \([m s^{-1}]\)
[out]tspccSubarea snowfall temperature [K/C]
[out]tspcgSubarea snowfall temperature [K/C]
[out]tspccsSubarea snowfall temperature [K/C]
[out]tspcgsSubarea snowfall temperature [K/C]
[out]rpccSubarea rainfall rate \([m s^{-1}]\)
[out]rpcgSubarea rainfall rate \([m s^{-1}]\)
[out]rpccsSubarea rainfall rate \([m s^{-1}]\)
[out]rpcgsSubarea rainfall rate \([m s^{-1}]\)
[out]trpccSubarea rainfall temperature [K/C]
[out]trpcgSubarea rainfall temperature [K/C]
[out]trpccsSubarea rainfall temperature [K/C]
[out]trpcgsSubarea rainfall temperature [K/C]
[out]evpicSubarea evapotranspiration rate going into waterBudgetDriver \([m s^{-1}]\)
[out]evpigSubarea evapotranspiration rate going into waterBudgetDriver \([m s^{-1}]\)
[out]evpicsSubarea evapotranspiration rate going into waterBudgetDriver \([m s^{-1}]\)
[out]evpigsSubarea evapotranspiration rate going into waterBudgetDriver \([m s^{-1}]\)
[out]zpondcSubarea depth of surface ponded water [m]
[out]zpondgSubarea depth of surface ponded water [m]
[out]zpndcsSubarea depth of surface ponded water [m]
[out]zpndgsSubarea depth of surface ponded water [m]
[out]xsnowcSubarea fractional snow coverage [ ]
[out]xsnowgSubarea fractional snow coverage [ ]
[out]xsnocsSubarea fractional snow coverage [ ]
[out]xsnogsSubarea fractional snow coverage [ ]
[out]zsnowcSubarea depth of snow pack
[out]zsnowgSubarea depth of snow pack
[out]zsnocsSubarea depth of snow pack
[out]zsnogsSubarea depth of snow pack
[out]albscSubarea snow albedo [ ]
[out]albsgSubarea snow albedo [ ]
[out]albscsSubarea snow albedo [ ]
[out]albsgsSubarea snow albedo [ ]
[out]rhoscSubarea snow density \([kg m^{-3}]\)
[out]rhosgSubarea snow density \([kg m^{-3}]\)
[out]hcpscSubarea heat capacity of snow \([J m^{-3} K^{-1}] (C_s)\)
[out]hcpsgSubarea heat capacity of snow \([J m^{-3} K^{-1}] (C_s)\)
[out]hcpscsSubarea heat capacity of snow \([J m^{-3} K^{-1}] (C_s)\)
[out]hcpsgsSubarea heat capacity of snow \([J m^{-3} K^{-1}] (C_s)\)
[out]runfcSubarea total runoff [m]
[out]runfgSubarea total runoff [m]
[out]runfcsSubarea total runoff [m]
[out]runfgsSubarea total runoff [m]
[out]trunfcSubarea total runoff temperature [K]
[out]trunfgSubarea total runoff temperature [K]
[out]trnfcsSubarea total runoff temperature [K]
[out]trnfgsSubarea total runoff temperature [K]
[out]tbascSubarea temperature of bedrock in third soil layer [C]
[out]tbasgSubarea temperature of bedrock in third soil layer [C]
[out]tbascsSubarea temperature of bedrock in third soil layer [C]
[out]tbasgsSubarea temperature of bedrock in third soil layer [C]
[in,out]sublcSubarea sublimation rate from vegetation \([m s^{-1}]\)
[in,out]sublcsSubarea sublimation rate from vegetation \([m s^{-1}]\)
[out]wlostcSubarea residual water not met by surface stores \([kg m^{-2}]\)
[out]wlostgSubarea residual water not met by surface stores \([kg m^{-2}]\)
[out]wlstcsSubarea residual water not met by surface stores \([kg m^{-2}]\)
[out]wlstgsSubarea residual water not met by surface stores \([kg m^{-2}]\)
[out]racSubarea liquid water on canopy going into waterBudgetDriver \([kg m^{-2}]\)
[out]racsSubarea liquid water on canopy going into waterBudgetDriver \([kg m^{-2}]\)
[out]sncSubarea frozen water on canopy going into waterBudgetDriver \([kg m^{-2}]\)
[out]sncsSubarea frozen water on canopy going into waterBudgetDriver \([kg m^{-2}]\)
[out]tsnowcSubarea snowpack temperature [K]
[out]tsnowgSubarea snowpack temperature [K]
[out]ovrflwOverland flow from top of soil column [m]
[out]subflwInterflow from sides of soil column [m]
[out]basflwBase flow from bottom of soil column [m]
[out]tovrflTemperature of overland flow from top of soil column [K]
[out]tsubflTemperature of interflow from sides of soil column [K]
[out]tbasflTemperature of base flow from bottom of soil column [K]
[in,out]pcfcFrozen precipitation intercepted by vegetation \([kg m^{-2} s^{-1}]\)
[in,out]pclcLiquid precipitation intercepted by vegetation \([kg m^{-2} s^{-1}]\)
[in,out]pcpnPrecipitation incident on snow pack \([kg m^{-2} s^{-1}]\)
[in,out]pcpgPrecipitation incident on ground \([kg m^{-2} s^{-1}]\)
[in,out]qfcfSublimation from frozen water on vegetation \([kg m^{-2} s^{-1}]\)
[in,out]qfclEvaporation from liquid water on vegetation \([kg m^{-2} s^{-1}]\)
[in,out]qfnSublimation from snow pack \([kg m^{-2} s^{-1}]\)
[in,out]qfgEvaporation from ground \([kg m^{-2} s^{-1}]\)
[out]rovgLiquid/frozen water runoff from vegetation to ground surface \([kg m^{-2} s^{-1}]\)
[out]rofcLiquid/frozen water runoff from vegetation \([kg m^{-2} s^{-1}]\)
[out]rofnLiquid water runoff from snow pack \([kg m^{-2} s^{-1}]\)
[out]trunofTemperature of total runoff [K]
[out]dtTime stepping variable used in waterFlowInfiltrate/waterFlowNonInfiltrate [s]
[out]rdummyDummy variable
[out]zeroZero vector used in several subroutines [ ]
[out]izeroZero integer :: flag used in waterFlowInfiltrate
[in]fcSubarea fractional coverage of modelled area [ ]
[in]fgSubarea fractional coverage of modelled area [ ]
[in]fcsSubarea fractional coverage of modelled area [ ]
[in]fgsSubarea fractional coverage of modelled area [ ]
[in]fsvfSky view factor of ground under vegetation canopy [ ]
[in]fsvfsSky view factor of snow under vegetation canopy [ ]
[in]raicanIntercepted liquid water stored on canopy over ground \([kg m^{-2}]\)
[in]snocanIntercepted frozen water stored on canopy over ground \([kg m^{-2}]\)
[in]raicnsIntercepted liquid water stored on canopy over snow \([kg m^{-2}]\)
[in]snocnsIntercepted frozen water stored on canopy over snow \([kg m^{-2}]\)
[in,out]evapcEvaporation from vegetation over ground \([m s^{-1}]\)
[in]evapcgEvaporation from ground under vegetation \([m s^{-1}]\)
[in,out]evapgEvaporation from bare ground \([m s^{-1}]\)
[in,out]evapcsEvaporation from vegetation over snow \([m s^{-1}]\)
[in]evpcsgEvaporation from snow under vegetation \([m s^{-1}]\)
[in,out]evapgsEvaporation from snow on bare ground \([m s^{-1}]\)
[in]rpcpRainfall rate over modelled area \([m s^{-1}]\)
[in]trpcpRainfall temperature over modelled area [C]
[in]spcpSnowfall rate over modelled area \([m s^{-1}]\)
[in]tspcpSnowfall temperature over modelled area [C]
[in]rhosniDensity of fresh snow \([kg m^{-3}]\)
[in]zpondDepth of ponded water on surface [m]
[in]zsnowDepth of snow pack \([m] (z_s)\)
[in]albsnoAlbedo of snow [ ]
[in]wsnocsLiquid water content of snow pack under vegetation \([kg m^{-2}] (w_s)\)
[in]wsnogsLiquid water content of snow pack in bare areas \([kg m^{-2}] (w_s)\)
[in]rhoscsDensity of snow under vegetation \([kg m^{-3}] (\rho_s)\)
[in]rhosgsDensity of snow in bare areas \([kg m^{-3}] (\rho_s)\)
[in]tbaseTemperature of bedrock in third soil layer [K]
[in]tsurxGround surface temperature over subarea [K]
[in]thliqcLiquid water content of soil layers under vegetation \([m^3 m^{-3}]\)
[in]thliqgLiquid water content of soil layers in bare areas \([m^3 m^{-3}]\)
[in]thicecFrozen water content of soil layers under vegetation \([m^3 m^{-3}]\)
[in]thicegFrozen water content of soil layers in bare areas \([m^3 m^{-3}]\)
[in]tbarcSubarea temperatures of soil layers \([C] (T_g)\)
[in]tbargSubarea temperatures of soil layers \([C] (T_g)\)
[in]tbarcsSubarea temperatures of soil layers \([C] (T_g)\)
[in]tbargsSubarea temperatures of soil layers \([C] (T_g)\)
[in]hcpcHeat capacity of soil layers under vegetation \([J m^{-3} K^{-1}]\)
[in]thporPore volume in soil layer \([m^3 m^{-3}] (\theta_p)\)
[in]hcpsHeat capacity of soil material \([J m^{-3} K^{-1}]\)
[in]grksatSaturated hydraulic conductivity of soil layers \([m s^{-1}]\)
[out]delzzSoil layer depth variable used in soilWaterPhaseChg/waterUpdates [m]
[in]delzwPermeable thickness of soil layer [m]
[in]delzOverall thickness of soil layer [m]
[in]isandSand content flag

In the first three loops, various subarea arrays and internal waterBudgetDriver variables are initialized.

At the end of the 100 loop, a preliminary calculation of the precipitation diagnostics over the four subareas is carried out, as follows:

The rainfall incident on the vegetation, PCLC, is summed over the vegetated subareas FC and FCS, minus the fraction that falls through the gaps in the canopy (denoted by the sky view factors FSVF and FSVFS respectively). The rainfall incident on the snowpack PCPN is the sum of the rainfall on the snow- covered bare area FGS, and that on the snow under the gaps in the canopy in subarea FCS. The rainfall incident on bare ground, PCPG, is the sum of the rainfall on the snow-free bare area FG, and that on the ground under the gaps in the canopy in subarea FC. The snowfall incident on the vegetation, PCFC, as in the case of rainfall, is summed over the vegetation subareas FC and FCS, minus the fraction that falls through the gaps in the canopy. The remaining amount is assigned to snowfall incident on the snow pack, PCPN.

In loops 200 to 550, each of the four subareas is addressed in turn. Additional variables are initialized, and an empirical correction is applied to the saturated hydraulic conductivity in each of the soil layers over the subarea, to account for the viscosity of water at the layer temperature (Dingman, 2002) [56] :

\(K_{sat}' = (1.7915 * 10^{-3}) K_{sat} / [(2.0319 * 10^{-4})+(1.5883 * 10^{-3}) exp(-T_g^{0.9}/22.0)]\)

Next, a preliminary calculation of the water vapour flux diagnostics for each subarea is carried out. Over the vegetated subareas, first the canopy evaporative flux is assigned to sublimation if there is snow present on the canopy (since it is assumed that any water present exists within or underneath the snow). Then, if the sublimation rate is upward, it is assigned to the diagnostic variable QFCF; if it is downward, the portion of the flux corresponding to the canopy-covered area is assigned to QFCF and that corresponding to the gap area to QFN. Similarly, if the evaporation rate is upward it is assigned to the diagnostic variable QFCL; if it is downward, the flux corresponding to the canopy-covered area is assigned to QFCL and that corresponding to the gap area to QFN over subarea FCS and to QFG over subarea FC. Over the non-vegetated subareas, the evaporation rates are assigned to QFN for subarea GS, and to QFG for subarea G.

For the purposes of the subsequent water balance calculations done in the other waterBudgetDriver subroutines, the subarea snowfall is lumped together with any simultaneously occurring sublimation, and the subarea rainfall with any simultaneously occurring evaporation. Depending on whether the sum of the snowfall and the sublimation, and the sum of the rainfall and the evaporation, are positive (downward) or negative (upward), corrections are applied to the appropriate diagnostic variables, and the snowfall/rainfall are set to the net flux if downward and the sublimation/evaporation are set to the net flux if upward. The smaller of the two fluxes in the sums are set to zero.

Finally, ponded water and snow pack physical characteristics are set, including the snow heat capacity, which is calculated from the heat capacities of ice and water \(C_i\) and \(C_w\), the snow, ice and water densities \(\rho_s\) \(\rho_i\), and \(\rho_w\), and the water content and depth of the snow pack \(w_s\) and \(z_s\), as follows:

\(C_s = C_i [\rho_s /\rho_i] + C_w w_s /[\rho_w z_s]\)