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

Calculates various land surface parameters. More...

Functions/Subroutines

subroutine calclandsurfparams (FC, FG, FCS, FGS, PAICAN, PAICNS, FSVF, FSVFS, FRAINC, FSNOWC, FRAICS, FSNOCS, RAICAN, RAICNS, SNOCAN, SNOCNS, DISP, DISPS, ZOMLNC, ZOMLCS, ZOELNC, ZOELCS, ZOMLNG, ZOMLNS, ZOELNG, ZOELNS, CHCAP, CHCAPS, CMASSC, CMASCS, CWLCAP, CWFCAP, CWLCPS, CWFCPS, RBCOEF, ZPLIMC, ZPLIMG, ZPLMCS, ZPLMGS, HTCC, HTCS, HTC, FROOT, FROOTS, WTRC, WTRS, WTRG, CMAI, PAI, PAIS, AIL, FCAN, FCANS, PSIGND, FCANMX, ZOLN, PAIMAX, PAIMIN, CWGTMX, ZRTMAX, PAIDAT, HGTDAT, THLIQ, THICE, TBAR, RCAN, SNCAN, TCAN, GROWTH, ZSNOW, TSNOW, FSNOW, RHOSNO, SNO, Z0ORO, ZBLEND, ZPLMG0, ZPLMS0, TA, RHOAIR, RADJ, DLON, RHOSNI, DELZ, DELZW, ZBOTW, THPOR, THLMIN, PSISAT, BI, PSIWLT, HCPS, ISAND, ILG, IL1, IL2, JL, IC, ICP1, IG, IDAY, IDISP, IZREF, IWF, IPAI, IHGT, RMAT, H, HS, CWCPAV, GROWA, GROWN, GROWB, RRESID, SRESID, FRTOT, FRTOTS, FCANCMX, ICTEM, ctem_on, RMATC, AILC, PAIC, AILCG, NOL2PFTS, AILCGS, FCANCS, FCANC, ZOLNC, CMASVEGC, SLAIC, ipeatland)
 

Detailed Description

Calculates various land surface parameters.

Author
D. Verseghy, M. Lazare, V. Fortin, V. Arora, E. Chan, P. Bartlett, Y. Wu, J. Melton, A. Wu, Y. Delage

This subroutine is adaptable to any number of vegetation categories recognized by CLASS (e.g. needleleaf trees, broadleaf trees, crops and grass), if an unknown PFT is present, a call to abort number of is performed.

Function/Subroutine Documentation

◆ calclandsurfparams()

subroutine calclandsurfparams ( real, dimension (ilg), intent(out)  FC,
real, dimension (ilg), intent(out)  FG,
real, dimension (ilg), intent(out)  FCS,
real, dimension (ilg), intent(out)  FGS,
real, dimension(ilg), intent(out)  PAICAN,
real, dimension(ilg), intent(out)  PAICNS,
real, dimension (ilg), intent(out)  FSVF,
real, dimension (ilg), intent(out)  FSVFS,
real, dimension(ilg), intent(out)  FRAINC,
real, dimension(ilg), intent(out)  FSNOWC,
real, dimension(ilg), intent(out)  FRAICS,
real, dimension(ilg), intent(out)  FSNOCS,
real, dimension(ilg), intent(out)  RAICAN,
real, dimension(ilg), intent(out)  RAICNS,
real, dimension(ilg), intent(out)  SNOCAN,
real, dimension(ilg), intent(out)  SNOCNS,
real, dimension (ilg), intent(out)  DISP,
real, dimension (ilg), intent(out)  DISPS,
real, dimension(ilg), intent(out)  ZOMLNC,
real, dimension(ilg), intent(out)  ZOMLCS,
real, dimension(ilg), intent(out)  ZOELNC,
real, dimension(ilg), intent(out)  ZOELCS,
real, dimension(ilg), intent(out)  ZOMLNG,
real, dimension(ilg), intent(out)  ZOMLNS,
real, dimension(ilg), intent(out)  ZOELNG,
real, dimension(ilg), intent(out)  ZOELNS,
real, dimension (ilg), intent(out)  CHCAP,
real, dimension(ilg), intent(out)  CHCAPS,
real, dimension(ilg), intent(out)  CMASSC,
real, dimension(ilg), intent(out)  CMASCS,
real, dimension(ilg), intent(out)  CWLCAP,
real, dimension(ilg), intent(out)  CWFCAP,
real, dimension(ilg), intent(out)  CWLCPS,
real, dimension(ilg), intent(out)  CWFCPS,
real, dimension(ilg), intent(out)  RBCOEF,
real, dimension(ilg), intent(out)  ZPLIMC,
real, dimension(ilg), intent(out)  ZPLIMG,
real, dimension(ilg), intent(out)  ZPLMCS,
real, dimension(ilg), intent(out)  ZPLMGS,
real, dimension (ilg), intent(out)  HTCC,
real, dimension (ilg), intent(out)  HTCS,
real, dimension (ilg,ig), intent(out)  HTC,
real, dimension (ilg,ig), intent(out)  FROOT,
real, dimension(ilg,ig), intent(out)  FROOTS,
real, dimension (ilg), intent(out)  WTRC,
real, dimension (ilg), intent(out)  WTRS,
real, dimension (ilg), intent(out)  WTRG,
real, dimension (ilg), intent(out)  CMAI,
real, dimension (ilg,ic), intent(inout)  PAI,
real, dimension (ilg,ic), intent(inout)  PAIS,
real, dimension (ilg,ic), intent(inout)  AIL,
real, dimension (ilg,ic), intent(inout)  FCAN,
real, dimension (ilg,ic), intent(inout)  FCANS,
real, dimension(ilg), intent(inout)  PSIGND,
real, dimension(ilg,icp1), intent(in)  FCANMX,
real, dimension (ilg,icp1), intent(inout)  ZOLN,
real, dimension(ilg,ic), intent(in)  PAIMAX,
real, dimension(ilg,ic), intent(in)  PAIMIN,
real, dimension(ilg,ic), intent(in)  CWGTMX,
real, dimension(ilg,ic), intent(in)  ZRTMAX,
real, dimension(ilg,ic), intent(in)  PAIDAT,
real, dimension(ilg,ic), intent(in)  HGTDAT,
real, dimension (ilg,ig), intent(inout)  THLIQ,
real, dimension (ilg,ig), intent(inout)  THICE,
real, dimension (ilg,ig), intent(inout)  TBAR,
real, dimension (ilg), intent(inout)  RCAN,
real, dimension (ilg), intent(inout)  SNCAN,
real, dimension (ilg), intent(inout)  TCAN,
real, dimension(ilg), intent(in)  GROWTH,
real, dimension (ilg), intent(inout)  ZSNOW,
real, dimension (ilg), intent(inout)  TSNOW,
real, dimension (ilg), intent(inout)  FSNOW,
real, dimension(ilg), intent(in)  RHOSNO,
real, dimension (ilg), intent(inout)  SNO,
real, dimension (ilg), intent(in)  Z0ORO,
real, dimension(ilg), intent(in)  ZBLEND,
real, dimension(ilg), intent(in)  ZPLMG0,
real, dimension(ilg), intent(in)  ZPLMS0,
real, dimension (ilg), intent(in)  TA,
real, dimension(ilg), intent(in)  RHOAIR,
real, dimension (ilg), intent(in)  RADJ,
real, dimension (ilg), intent(in)  DLON,
real, dimension(ilg), intent(in)  RHOSNI,
real, dimension (ig), intent(in)  DELZ,
real, dimension (ilg,ig), intent(in)  DELZW,
real, dimension (ilg,ig), intent(in)  ZBOTW,
real, dimension (ilg,ig), intent(in)  THPOR,
real, dimension(ilg,ig), intent(in)  THLMIN,
real, dimension(ilg,ig), intent(in)  PSISAT,
real, dimension (ilg,ig), intent(in)  BI,
real, dimension(ilg,ig), intent(in)  PSIWLT,
real, dimension (ilg,ig), intent(in)  HCPS,
integer, dimension (ilg,ig), intent(in)  ISAND,
integer, intent(in)  ILG,
integer, intent(in)  IL1,
integer, intent(in)  IL2,
integer, intent(in)  JL,
integer, intent(in)  IC,
integer, intent(in)  ICP1,
integer, intent(in)  IG,
integer, intent(in)  IDAY,
integer, intent(in)  IDISP,
integer, intent(in)  IZREF,
integer, intent(in)  IWF,
integer, intent(in)  IPAI,
integer, intent(in)  IHGT,
real, dimension (ilg,ic,ig), intent(inout)  RMAT,
real, dimension(ilg,ic), intent(inout)  H,
real, dimension(ilg,ic), intent(inout)  HS,
real, dimension(ilg), intent(inout)  CWCPAV,
real, dimension(ilg), intent(inout)  GROWA,
real, dimension(ilg), intent(inout)  GROWN,
real, dimension(ilg), intent(inout)  GROWB,
real, dimension(ilg), intent(inout)  RRESID,
real, dimension(ilg), intent(inout)  SRESID,
real, dimension(ilg), intent(inout)  FRTOT,
real, dimension(ilg), intent(inout)  FRTOTS,
real, dimension(ilg,ictem), intent(in)  FCANCMX,
integer, intent(in)  ICTEM,
logical, intent(in)  ctem_on,
real, dimension(ilg,ic,ig), intent(in)  RMATC,
real, dimension(ilg,ic), intent(in)  AILC,
real, dimension(ilg,ic), intent(in)  PAIC,
real, dimension(ilg,ictem), intent(in)  AILCG,
integer, dimension(ic), intent(in)  NOL2PFTS,
real, dimension(ilg,ictem), intent(out)  AILCGS,
real, dimension(ilg,ictem), intent(out)  FCANCS,
real, dimension(ilg,ictem), intent(out)  FCANC,
real, dimension(ilg,ic), intent(in)  ZOLNC,
real, dimension(ilg,ic), intent(in)  CMASVEGC,
real, dimension(ilg,ic), intent(in)  SLAIC,
integer, dimension (ilg), intent(in)  ipeatland 
)
Parameters
[out]fcSubarea fractional coverage of modelled area (X) [ ]
[out]fgSubarea fractional coverage of modelled area (X) [ ]
[out]fcsSubarea fractional coverage of modelled area (X) [ ]
[out]fgsSubarea fractional coverage of modelled area (X) [ ]
[out]paicanPlant area index of canopy over bare ground ( \(\Lambda_p\)) [ ]
[out]paicnsPlant area index of canopy over snow ( \(\Lambda_p\)) [ ]
[out]fsvfSky view factor for bare ground under canopy ( \(\chi\)) [ ]
[out]fsvfsSky view factor for snow under canopy ( \(\chi\)) [ ]
[out]fraincFractional coverage of canopy by liquid water over snow-free subarea [ ]
[out]fsnowcFractional coverage of canopy by frozen water over snow-free subarea [ ]
[out]fraicsFractional coverage of canopy by liquid water over snow-covered subarea [ ]
[out]fsnocsFractional coverage of canopy by frozen water over snow-covered subarea [ ]
[out]raicanIntercepted liquid water stored on canopy over bare ground ( \(W_l\)) [ \(kg m^{-2}\)]
[out]raicnsIntercepted liquid water stored on canopy over snow ( \(W_l\)) [ \(kg m^{-2}\)]
[out]snocanIntercepted frozen water stored on canopy over bare soil ( \(W_f\)) [ \(kg m^{-2}\)]
[out]snocnsIntercepted frozen water stored on canopy over snow ( \(W_f\)) [ \(kg m^{-2}\)]
[out]dispDisplacement height of vegetation over bare ground (d) [m]
[out]dispsDisplacement height of vegetation over snow (d) [m]
[out]zomlncLogarithm of roughness length for momentum of vegetation over bare ground [ ]
[out]zomlcsLogarithm of roughness length for momentum of vegetation over snow [ ]
[out]zoelncLogarithm of roughness length for heat of vegetation over bare ground [ ]
[out]zoelcsLogarithm of roughness length for heat of vegetation over snow [ ]
[out]zomlngLogarithm of roughness length for momentum of bare ground [ ]
[out]zomlnsLogarithm of roughness length for momentum of snow [ ]
[out]zoelngLogarithm of roughness length for heat of bare ground [ ]
[out]zoelnsLogarithm of roughness length for heat of snow [ ]
[out]rbcoefParameter for calculation of leaf boundary resistance ( \(C_{rb}\))
[out]chcapHeat capacity of canopy over bare ground [ \(J m^{-2} K^{-1}\)]
[out]chcapsHeat capacity of canopy over snow [ \(J m^{-2} K^{-1}\)]
[out]cmasscMass of canopy over bare ground [ \(kg m^{-2}\)]
[out]cmascsMass of canopy over snow [ \(kg m^{-2}\)]
[out]cwlcapStorage capacity of canopy over bare ground for liquid water ( \(W_{l,max}\)) [ \(kg m^{-2}\)]
[out]cwfcapStorage capacity of canopy over bare ground for frozen water ( \(W_{f,max}\)) [ \(kg m^{-2}\)]
[out]cwlcpsStorage capacity of canopy over snow for liquid water ( \(W_{l,max}\)) [ \(kg m^{-2}\)]
[out]cwfcpsStorage capacity of canopy over snow for frozen water ( \(W_{f,max}\)) [ \(kg m^{-2}\)]
[out]zplimcMaximum water ponding depth for ground under canopy [m]
[out]zplimgMaximum water ponding depth for bare ground [m]
[out]zplmcsMaximum water ponding depth for ground under snow under canopy [m]
[out]zplmgsMaximum water ponding depth for ground under snow [m]
[out]htccDiagnosed internal energy change of vegetation canopy due to conduction and/or change in mass [ \(W m^{-2}\)]
[out]htcsDiagnosed internal energy change of snow pack due to conduction and/or change in mass [ \(W m^{-2}\)]
[out]wtrcDiagnosed residual water transferred off the vegetation canopy [ \(kg m^{-2} s^{-1}\)]
[out]wtrsDiagnosed residual water transferred into or out of the snow pack [ \(kg m^{-2} s^{-1}\)]
[out]wtrgDiagnosed residual water transferred into or out of the soil [ \(kg m^{-2} s^{-1}\)]
[out]cmaiAggregated mass of vegetation canopy [ \(kg m^{-2}\)]
[out]frootFraction of total transpiration contributed by soil layer over snow-free subarea [ ]
[out]frootsFraction of total transpiration contributed by soil layer over snow-covered subarea [ ]
[out]htcDiagnosed internal energy change of soil layer due to conduction and/or change in mass [ \(W m^{-2}\)]
[in,out]paiPlant area index of vegetation category over bare ground [ ]
[in,out]paisPlant area index of vegetation category over snow [ ]
[in,out]ailLeaf area index of vegetation category over bare ground [ ]
[in,out]fcanFractional coverage of vegetation category over bare ground ( \(X_i\)) [ ]
[in,out]fcansFractional coverage of vegetation category over snow ( \(X_i\)) [ ]
[in,out]psigndMinimum liquid moisture suction in soil layers [m]
[in]ipeatlandPeatland flag: 0 = not a peatland,1= bog,2 = fen
[in]fcanmxMaximum fractional coverage of modelled area by vegetation category [ ]
[in,out]zolnNatural logarithm of maximum roughness length of vegetation category [ ]
[in]paimaxMaximum plant area index of vegetation category [ ]
[in]paiminMinimum plant area index of vegetation category [ ]
[in]cwgtmxMaximum canopy mass for vegetation category [ \(kg m^{-2}\)]
[in]zrtmaxMaximum rooting depth of vegetation category [m]
[in]paidatOptional user-specified value of plant area indices of vegetation categories to override CLASS-calculated values [ ]
[in]hgtdatOptional user-specified values of height of vegetation categories to override CLASS-calculated values [m]
[in,out]thliqVolumetric liquid water content of soil layers ( \(\theta\) l) [ \(m^3 m^{-3}\)]
[in,out]thiceFrozen water content of soil layers under vegetation [ \(m^3 m^{-3}\)]
[in,out]tbarTemperature of soil layers [K]
[in,out]rcanIntercepted liquid water stored on canopy ( \(W_l\)) [ \(kg m^{-2}\)]
[in,out]sncanIntercepted frozen water stored on canopy ( \(W_f\)) [ \(kg m^{-2}\)]
[in,out]tcanVegetation canopy temperature [K]
[in]growthVegetation growth index [ ]
[in,out]zsnowDepth of snow pack ( \(z_s\)) [m]
[in,out]tsnowSnowpack temperature [K]
[in,out]fsnowDiagnosed fractional snow coverage [ ]
[in]rhosnoDensity of snow ( \( s\)) [ \(kg m^{-3}\)]
[in,out]snoMass of snow pack ( \(W_s\)) [ \(kg m^{-2}\)]
[in]taAir temperature at reference height [K]
[in]rhoairDensity of air [ \(kg m^{-3}\)]
[in]dlonLongitude of grid cell (east of Greenwich) [degrees]
[in]z0oroOrographic roughness length [m]
[in]zblendAtmospheric blending height for surface roughness length averaging ( \(z_b\)) [m]
[in]rhosniDensity of fresh snow ( \(\rho\) s,f) [ \(kg m^{-3}\)]
[in]zplmg0Maximum water ponding depth for snow-free subareas (user-specified when running MESH code) [m]
[in]zplms0Maximum water ponding depth for snow-covered subareas (user-specified when running MESH code) [m]
[in]radjLatitude of grid cell (positive north of equator) [rad]
[in]delzwPermeable thickness of soil layer [m]
[in]zbotwDepth to permeable bottom of soil layer [m]
[in]thporPore volume in soil layer ( \(\theta\) p) [ \(m^3 m^{-3}\)]
[in]thlminResidual soil liquid water content remaining after freezing or evaporation [ \(m^3 m^{-3}\)]
[in]psisatSoil moisture suction at saturation ( \(\Psi\) sat) [m]
[in]biClapp and Hornberger empirical "b" parameter [ ]
[in]psiwltSoil moisture suction at wilting point ( \(\Psi\) w) [m]
[in]hcpsVolumetric heat capacity of soil particles [ \(J m^{-3}\)]
[in]delzSoil layer thickness [m]
[in]isandSand content flag
[in]ailcgGREEN LAI FOR USE WITH PHTSYN SUBROUTINE
[out]ailcgsGREEN LAI FOR CANOPY OVER SNOW SUB-AREA
[out]fcancFRACTION OF CANOPY OVER GROUND FOR CTEM's 9 PFTs
[out]fcancsFRACTION OF CANOPY OVER SNOW FOR CTEM's 9 PFTs

In the 120 loop, the growth index for crops, GROWA, is calculated (if CLASS is not being run coupled to CTEM). This is done by referring to the three-dimensional array GROWYR, which contains values corresponding to the four Julian days of the year on which crops are planted, on which they reach maturity, on which harvesting begins, and on which the harvest is complete, for each ten-degree latitude half-circle in each hemisphere. These are generic, average dates, approximated using information gleaned from annual UN FAO (Food and Agriculture Organization) reports. (In the tropics, it is assumed that areas classified as agricultural are constantly under cultivation, so all four values are set to zero.)

First, the latitude of the modelled area is converted from a value in radians to a value from 1 to 18, IN, corresponding to the index of the latitude circle (1 for latitudes \(80-90^o S\), 18 for latitudes \(80-90^o N\)). Then the hemisphere index, NL, is set to 1 for the Eastern Hemisphere, and 2 for the Western Hemisphere. If the planting date for the modelled area is zero (indicating a location in the tropics), GROWA is set to 1. Otherwise, GROWA is set to 1 if the day of the year lies between the maturity date and the start of the harvest, and to zero if the day of the year lies between the end of the harvest and the planting date. For dates in between, the value of GROWA is interpolated between 0 and 1. Checks are performed at the end to ensure that GROWA is not less than 0 or greater than 1. If the calculated value of GROWA is vanishingly small, it is set to zero.

In the 150 loop the other three growth indices are evaluated, as well as the vegetation heights and plant area indices for the four vegetation categories over snow-covered and snow-free ground. The background growth index for trees, GROWTH, is evaluated separately in subroutine classGrowthIndex. It varies from a value of 0 for dormant or leafless periods to 1 for fully-leafed periods, with a sixty-day transition between the two. When senescence begins, it is set instantaneously to -1 and thereafter increases over a sixty-day period back to 0. (The onset of spring budburst and fall senescence are triggered by near-zero values of the air temperature and the first soil layer temperature.) For needleleaf trees, the growth index GROWN is simply set to the absolute value of GROWTH. For broadleaf trees, the transition period is assumed to last thirty days instead of sixty, and so the growth index GROWB is set to the absolute value of double the value of GROWTH, with upper and lower limits of 1 and 0. Finally, the growth index of grasses is set to 1 all year round.

A branch in the code occurs next, depending on the value of the flag IHGT. If IHGT=0, the values of vegetation height calculated by CLASS are to be used. For trees and grass, the vegetation height under snow-free conditions is assumed to be constant year-round, and is calculated as 10 times the exponential of ZOLN, the logarithm of the maximum vegetation roughness length. For crops, this maximum height is multiplied by GROWA. If IHGT=1, vegetation heights specified by the user are utilized instead. This height H for each of the four vegetation categories is used to calculate the height HS over snow-covered areas. For needleleaf and broadleaf trees, HS is set to H. For crops and grass, HS is calculated by subtracting the snow depth ZSNOW from H, to account for the burying of short vegetation by snow.

Now account for burying under snow:

If CLASS is being run uncoupled to CTEM, a second branch now occurs, depending on the value of the flag IPAI. If IPAI=0, the values of plant area index calculated by CLASS are to be used. For all four vegetation categories, the plant area index over snow-free ground, PAI, is determined by interpolating between the annual maximum and minimum plant area indices using the growth index. If IPAI=1, plant area index values specified by the user are utilized instead. For trees, the plant area index over snow- covered ground, PAIS, is set to PAI. For crops and grass, if H>0, PAIS is set to PAI scaled by the ratio of HS/H; otherwise, it is set to zero. Lastly, the leaf area indices for the four vegetation categories over snow-free ground, AIL, are determined from the PAI values. For needleleaf trees, AIL is estimated as 0.90 PAI; for broadleaf trees it is estimated as the excess PAI over the annual minimum value. For crops and grass AIL is assumed to be equal to PAI. (If CLASS is being run coupled to CTEM, the CTEM- generated values of PAI and AIL are used instead.)

In the 175 loop, the fractional coverage of the modelled area by each of the four vegetation categories is calculated, for snow-free (FCAN) and snow-covered ground (FCANS). For needleleaf and broadleaf trees, FCAN is set to the maximum coverage FCANMX of the vegetation category, scaled by the snow- free fraction of the modelled area, 1-FSNOW. For crops and grass, this calculation is modified for cases where the plant area index has been calculated as falling below a threshold value owing to growth stage or burying by snow. (If CLASS is being run coupled to CTEM, this threshold value is set to 0.05; otherwise it is set to 1.) In such cases the vegetation coverage is assumed to become discontinuous, and so an additional multiplication by PAI is performed to produce a reduced value of FCAN, and PAI is reset to the threshold value. An identical procedure is followed to determine the FCANS values.

The areal :: fractions of each of the four CLASS subareas, vegetation over bare soil (FC), bare soil (FG), vegetation over snow (FCS) and snow (FGS) are then calculated, using the FCAN and FCANS values and FSNOW. Checks are carried out, and adjustments performed if necessary, to ensure that none of the four subareas is vanishingly small. The values of FSNOW and of the four FCANs and FCANSs are recalculated accordingly. Finally, checks are carried out to ensure that each of the four subareas is greater than zero, and that their sum is unity. If this is not the case, a call to abort is performed. In the last part of the 175 loop, the limiting ponding depth for surface water is determined for each of the four subareas. If the flag IWF is zero, indicating that lateral flow of water within the soil is to be neglected, these values are assigned as follows. If the index ISAND of the first soil layer is -3 or -4, indicating a rock surface or an ice sheet, the bare soil ponding limit, ZPLIMG, is set to 1 mm; otherwise ZPLIMG is set to 2 mm. If the fractional area of snow on bare soil is greater than zero, the subarea ponding limit ZPLMGS is set to the weighted average of ZPLIMG over the areas where snow has not buried vegetation and where it has buried crops, and to 3 mm over areas where it has buried grass otherwise to zero. If the fractional area of canopy over bare soil is greater than zero, the subarea ponding depth ZPLIMC is set to the weighted average of 1 cm under trees and 3 mm under crops and grass otherwise to zero. If the fractional area of canopy over snow is greater than zero, the subarea ponding depth ZPLMCS is also currently set to the weighted average of 1 cm under trees and 3 mm under crops and grass; otherwise to zero. Finally, if the flag IWF is greater than zero, indicating that lateral flow of soil water is being modelled, externally derived user-specified values of the ponding limit for the four subareas are assigned.

In loop 200, calculations are done related to the interception of water on vegetation. First, the plant area indices of the composite vegetation canopy over the snow-free and snow-covered subareas are calculated as weighted averages of the plant area indices of the four vegetation categories over each subarea. The liquid water interception capacity \(W_{l, max}\) on each of the two subareas is calculated as \(W_{l, max} = 0.20 \Lambda_p\) where \(\Lambda_p\) is the plant area index of the composite canopy. This simple relation has been found to work well for a wide range of canopy types and precipitation events (see Verseghy et al, 1993). If either the average amount of liquid water on the canopy, RCAN, or the total cancpy coverage, FC+FCS, is less than a small threshold value, the value of RCAN is stored in a residual water array RRESID, and RCAN is set to zero. Next the intercepted liquid water is partitioned between FC and FCS. First RCAN is re- evaluated as an average value over the canopy-covered area only, rather than over the whole modelled area. Then the intercepted liquid water amounts on vegetation over snow-free (RAICAN) and snow- covered areas (RAICNS) are calculated by making use of the relations

\(W_{L, 0} / \Lambda_{p, 0} = W_{L, s} / \Lambda_{p, s}\) and

\(W_l (X_0 + X_s) = W_{l, 0} X_0 + W_{l, s} X_s\)

where \(W_l\) is the liquid water on the canopy, \(X\) is the fractional area, and the subscripts \(0\) and \(s\) refer to snow-free and snow-covered areas respectively.

For snow interception on the canopy, a modified calculation of the plant area indices \(\Lambda_{p, 0}\) and \(\Lambda_{p, s}\) is performed, assigning a weight of 0.7 to the plant area index of needleleaf trees, to account for the effect of needle clumping. The interception capacity for snow, \(W_{f, max}\), is calculated following Bartlett et al. (2006) [16], using a relation developed by Schmidt and Gluns (1991): \(W_{f, max} = 6.0 \Lambda_p [0.27 + 46.0 \rho_{s, f} ]\) where \(\rho_{s, f}\) is the density of fresh snow. As was done for the intercepted liquid water, if either the average amount of snow on the canopy, SNCAN, or the total cancpy coverage is less than a small threshold value, the value of SNCAN is stored in a residual water array SRESID, and SNCAN is set to zero. Next the intercepted snow is partitioned between FC and FCS. First SNCAN is recalculated as an average over the canopy-covered area only, rather than over the whole modelled area. Then the intercepted snow amounts on vegetation over snow-free (SNOCAN) and snow-covered areas (SNOCNS) are calculated in the same way as for RAICAN and RAICNS.

The fractional canopy coverages of snow and liquid water are calculated as the ratio of the intercepted snow or liquid water to their respective interception capacities. Separate values are determined for the snow-covered (FSNOCS, FRAICS) and snow-free (FSNOWC, FRAINC) subareas. If intercepted snow and liquid water are both present on the canopy, part of the liquid water cover is assumed to underlie the snow cover, so the fractional liquid water coverage is decreased by the fractional snow coverage, to yield the fractional coverage of liquid water that is exposed to the air.

Next, tests are performed to ascertain whether the liquid water and snow on the canopy exceed their respective interception capacities. If so, the excess is assigned to RRESID for liquid water and SRESID for snow, and the intercepted liquid water or snow is reset to the respective interception capacity. The sum of RRESID and SRESID is added to WTRC, the diagnosed residual water transferred off the canopy, and the diagnosed change in internal energy of the canopy, HTCC, is updated. If the fractional coverage of snow on the modelled area is greater than zero, SRESID is added to the snow pack; the snow depth, mass, and temperature are recalculated, the diagnosed change in internal energy of the snow pack HTCS is updated, and SRESID is added to WTRS, the diagnosed residual water transferred to or from the snow pack. The remaining amounts of RRESID and SRESID are added to the soil. For each layer in turn whose permeable depth is greater than zero, if the sum of RRESID, SRESID and the ambient soil liquid and frozen moisture contents is less than the pore volume THPOR, RRESID is added to the liquid water content and SRESID is added to the frozen moisture content. The layer temperature is recalculated, the diagnosed change in internal energy HTC is updated, and RRESID and SRESID are added to WTRG, the diagnosed residual water transferred into or out of the soil, and are then set to zero.

In loops 250 and 275, calculations of the displacement height and the logarithms of the roughness lengths for heat and momentum are performed for the vegetated subareas. The displacement height \(d_i\) and the roughness length \(z_{0, i}\) for the separate vegetation categories are obtained as simple ratios of the canopy height H: \(d_i = 0.70 H\) \(z_{0, i} = 0.10 H\)

The averaged displacement height d over the vegetated subareas is only calculated if the flag IDISP has been set to 1. If IDISP = 0, this indicates that the atmospheric model is using a terrain-following coordinate system, and thus the displacement height is treated as part of the "terrain". If DISP = 1, d is calculated as a logarithmic average over the vegetation categories: \(X ln(d) = \Sigma [X_i ln(d_i)]\) where X is the fractional coverage of the subarea. The averaged roughness length for momentum \(z_{0m}\) over the subarea is determined based on the assumption that averaging should be performed on the basis of the drag coefficient formulation. Thus, following Delage et al. (1999) [32], and after Mason (1988): \(X/ln^2 (z_b /z_{0m}) = \Sigma [X_i /ln^2 (z_b /z_{0i})]\)

The averaged roughness length for heat \(z_{0e}\) over the subarea is calculated as a geometric mean over the vegetation categories: \(z_{0e} z_{0mX} = \Pi ( z_{0i}^{2Xi} )\)

In loop 300, calculations of the logarithms of the roughness lengths for heat and momentum are performed for the bare ground and snow-covered subareas. Background values of \(ln(z_{om})\) for soil, snow cover, ice sheets and urban areas are passed into the subroutine through common blocks. In CLASS, urban areas are treated very simply, as areas of bare soil with a high roughness length. The subarea values of \(ln(z_{om})\) for bare soil and snow are therefore adjusted for the fractional coverage of urban area. Values for the ratio between the roughness lengths for momentum and heat for bare soil and snow are also passed in via common blocks. These are used to derive subarea values of \(ln(z_{oe})\) from \(ln(z_{om})\).

In the same loop the roughness length for peatlands is also calculated assuming a natural log of the roughness length of the moss surface is -6.57 (parameter stored in classicParams.f90)

In loop 325, an adjustment is applied to \(ln(z_{om})\) if the effect of terrain roughness needs to be taken into account. If the surface orographic roughness length is not vanishingly small, its logarithm, LZ0ORO, is calculated. If it is greater than the calculated logarithm of the roughness length for momentum of any of the subareas, these are reset to LZ0ORO.

In loop 350, the canopy mass is calculated as a weighted average over the vegetation categories, for canopy over bare soil (CMASSC) and over snow (CMASCS). (For crops over bare soil, the mass is adjusted according to the growth index; for crops and grass over snow, the mass is additionally adjusted to take into account burying by snow.) If IDISP = 0, indicating that the vegetation displacement height is part of the "terrain", the mass of air within the displacement height is normalized by the vegetation heat capacity and added to the canopy mass. If IZREF = 2, indicating that the bottom of the atmosphere is taken to lie at the local roughness length rather than at the ground surface, the mass of air within the roughness length is likewise normalized by the vegetation heat capacity and added to the canopy mass. The canopy heat capacities over bare soil (CHCAP) and over snow (CHCAPS) are evaluated from the respective values of canopy mass and of intercepted liquid water and snow. The aggregated canopy mass CMAI is recalculated, and is used to determine the change in internal energy of the canopy, HTCC, owing to growth or disappearance of the vegetation.

if idisp=0, vegetation displacement heights are ignored, because the atmospheric model considers these to be part of the "terrain". if idisp=1, vegetation displacement heights are calculated.

if izref=1, the bottom of the atmospheric model is taken lie at the ground surface. if izref=2, the bottom of the atmospheric model is taken to lie at the local roughness height.

if idisp=0, vegetation displacement heights are ignored, because the atmospheric model considers these to be part of the "terrain". if idisp=1, vegetation displacement heights are calculated.

if izref=1, the bottom of the atmospheric model is taken lie at the ground surface. if izref=2, the bottom of the atmospheric model is taken to lie at the local roughness height.

In the 450 and 500 loops, the fraction of plant roots in each soil layer is calculated. If CLASS is being run coupled to CTEM, the CTEM-derived values are assigned. Otherwise, for each vegetation category the rooting depth ZROOT is set to the background maximum value, except in the case of crops, for which it is set to the maximum scaled by GROWA. If the soil permeable depth is less than ZROOT, ZROOT is set to this depth instead. Values are then assigned in the matrix RMAT, which stores the fraction of roots in each vegetation category for each soil layer. According to Feddes et al. (1974) [36], the fractional root volume R(z) below a depth z is well represented for many varieties of plants by the following exponential function: \(R(z) = a_1 exp(-3.0z) + a_2.\)

Making use of the boundary conditions \(R(0) = 1\) and \(R(z_r) = 0\), where \(z_r\) is the rooting depth ZROOT, it can be seen that the fraction of roots within a soil depth interval \(\Delta z\) can be obtained as the difference between R(z) evaluated at the top \((z_T)\) and bottom \((z_B)\) of the interval: \(R(\Delta z) = [exp(-3.0z_T) - exp(-3.0z_B)]/ [1 - exp(-3.0z_r)]\)

The total fraction of roots in each soil layer, FROOT for snow-free areas and FROOTS for snow-covered areas, can then be determined as weighted averages over the four vegetation categories.

In loop 450, a leaf boundary resistance parameter \(C_{rb}\) , incorporating the plant area indices of the four vegetation subareas, is also calculated for later use in subroutine energBalVegSolve: \(C_{rb} = C_l \Lambda_{p, i}^{0.5} /0.75 \bullet [1 - exp(-0.75 \Lambda_{p, i}^{0.5} )]\) where \(C_l\) is a parameter that varies with the vegetation category. The aggregated value of \(C_{rb}\) is obtained as a weighted average over the four vegetation categories over bare ground and snow cover.

In loop 600, the sky view factor \(\chi\) of the ground underlying the canopy is calculated for the vegetated subareas. The standard approach is to determine \(\chi\) as an exponential function of the plant area index \(\Lambda_p\) : \(\chi = exp[-c \Lambda_p ]\) where c is a constant depending on the vegetation category. The subarea values of \(\chi\) are obtained as weighted averages over the four vegetation categories.

In the 650 loop, the fraction of the total transpiration of water by plants that is extracted from each soil layer is determined. This is done by weighting the values of FROOT and FROOTS calculated above by the relative soil moisture suction in each layer: \(( \Psi_w - \Psi_i)/( \Psi_w - \Psi_{sat} )\) where \(\Psi_i\) , the soil moisture suction in the layer, is obtained as \(\Psi_i = \Psi_{sat} ( \theta_{l, i} / \theta_p)^{-b}\) In these equations \(\Psi_w\) is the soil moisture suction at the wilting point, \(\Psi_{sat}\) is the suction at saturation, \(\theta_{l, i}\) is the volumetric liquid water content of the soil layer, \(\theta_p\) is the pore volume, and b is an empirical parameter developed by Clapp and Hornberger (1978) [21]. The layer values of FROOT and FROOTS are then re-normalized so that their sum adds up to unity. In this loop, the representative soil moisture suction PSIGND is also calculated for later use in the vegetation stomatal resistance formulation, as the minimum value of \(\Psi_i\) and \(\Psi_w\) over all the soil layers.

Finally, in loop 800 the aggregated canopy plant area indices PAICAN and PAICNS are set back to their original values, from the modified values used for the snow interception calculations above; and if CLASS is being run coupled with CTEM, a set of CTEM-related calculations is performed.