|
The BioCro C++ Library
|
Include dependency graph for BioCro.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| ws_str | watstr (double precipit, double evapo, double cws, double soildepth, double fieldc, double wiltp, double soil_saturation_capacity, double soil_sand_content, double Ks, double air_entry, double b) |
| double | SoilEvapo (double LAI, double k, double air_temperature, double ppfd, double soil_water_content, double fieldc, double wiltp, double winds, double RelH, double rsec, double soil_clod_size, double soil_reflectance, double soil_transmission, double specific_heat_of_air, double par_energy_content) |
| soilML_str | soilML (double precipit, double transp, double *cws, double soildepth, double *depths, double soil_field_capacity, double soil_wilting_point, double soil_saturation_capacity, double soil_air_entry, double soil_saturated_conductivity, double soil_b_coefficient, double soil_sand_content, double phi1, double phi2, int wsFun, int layers, double rootDB, double LAI, double k, double AirTemp, double IRad, double winds, double RelH, int hydrDist, double rfl, double rsec, double rsdf, double soil_clod_size, double soil_reflectance, double soil_transmission, double specific_heat_of_air, double par_energy_content) |
| void | RHprof (double RH, int nlayers, double *relative_humidity_profile) |
| Calculates a relative humidity profile throughout a multilayer canopy. More... | |
| void | WINDprof (double WindSpeed, double LAI, std::vector< double > &wind_speed_profile) |
| double | AbiotEff (double smoist, double stemp) |
| double AbiotEff | ( | double | smoist, |
| double | stemp | ||
| ) |
| void RHprof | ( | double | RH, |
| int | nlayers, | ||
| double * | relative_humidity_profile | ||
| ) |
Calculates a relative humidity profile throughout a multilayer canopy.
| [in] | RH | relative humidity just above the canopy (0 <= RH <= 1) |
| [in] | nlayers | number of layers in the canopy (1 <= nlayers <= MAXLAY) |
| [out] | relative_humidity_profile | array of relative humidity values expressed as fractions between 0 and 1, where the value at index i represents relative humidity at the bottom of canopy layer i and i = 0 corresponds to the top canopy layer. |
One can derive an expression for the relative humidity (h) throughout a plant canopy by making the following assumptions:
h at the top of the canopy is the same as the ambient value (h = h0)h at the bottom of the canopy is one hundred percent (h = 1)h follows an exponential profile throughout the canopyTo enforce the exponential profile, we can write
h(x) = A * exp(B * x) [Equation (1)]
where x is a normalized expression of depth within the canopy (x = 0 at the canopy top and x = 1 at the bottom) and the values of A and B are yet to be determined.
To enforce the h value at the canopy top, we require h0 = h(0) = A; in other words, A = h0. To enforce the h value at the canopy bottom, we require 1 = h(1) = h0 * exp(B); in other words, B = -ln(h0). Putting it all together, we see that under these assumptions, h throughout the canopy is given by
h(x) = h0 * exp(-ln(h0) * x) [Equation (2)]
If we additionally assume that h0 is close to 1, we can simplify B = -ln(h0) by taking just the linear part of the Taylor series for -ln(h0) centered at h0 = 1, which is B = -(h0 - 1). With this modification, we have
h(x) = h0 * exp((1 - h0) * x) [Equation (3)]
When h0 = 1, Equations (2) and (3) are in perfect agreement, reducing to h(x) = 1. However, as h0 deviates further from h0 = 1, the linearization for B becomes less accurate and the two versions diverge, especially deeper in the canopy. For example, when h0 = 0.7, Equation (2) becomes h(x) = 0.7 * exp(0.357 * x) while Equation (3) becomes h(x) = 0.7 * exp(0.300 * x). Both versions agree at the top of the canopy where x = 0 and h(x) = 1, but are different at the bottom: 1.00 vs. 0.94. For lower h0 values, the difference at the canopy bottom becomes even more pronounced, significantly violating one of the original assumptions. However, there isn't a strong scientific justification for assuming humidity is 1 at the bottom of every canopy, so the error due to the approximation for B is deemed to be acceptable.
In BioCro, we divide the canopy into equally sized layers; i.e., the interval 0 <= x <= 1 is divided into n segments of length 1 / n by n + 1 boundaries occurring at x = 0, x = 1 / n, x = 2 / n, ..., x = 1. Here we wish to find the h value at the bottom of each layer, so we use Equation (3) with x = 1 / n, x = 2 / n, ..., x = 1.
In the code below, the RH input argument corresponds to h0, the exponential growth constant kh corresponds to B, and nlayers corresponds to n.
Note 1: the explanation for this code was "reverse engineered" by EBL from some crytpic documentation found in earlier versions of this function and from Stephen Humphries's thesis, which is not available online:
Humphries, S. "Will mechanistically rich models provide us with new insights into the response of plant production to climate change?: development and experiments with WIMOVAC: (Windows Intuitive Model of Vegetation response to Atmosphere & Climate Change)" (University of Essex, 2002).
Note 2: Equation (2) can be rewritten by noting that h0 = exp(ln(h0)). With this replacement, the equation becomes
h(x) = exp(ln(h0) - ln(h0) * x) = exp(-B * (1 - x))
The equation takes this form in Humphries's thesis.
Definition at line 166 of file AuxBioCro.cpp.
References MAXLAY.
| double SoilEvapo | ( | double | LAI, |
| double | k, | ||
| double | air_temperature, | ||
| double | ppfd, | ||
| double | soil_water_content, | ||
| double | fieldc, | ||
| double | wiltp, | ||
| double | winds, | ||
| double | RelH, | ||
| double | rsec, | ||
| double | soil_clod_size, | ||
| double | soil_reflectance, | ||
| double | soil_transmission, | ||
| double | specific_heat_of_air, | ||
| double | par_energy_content | ||
| ) |
Definition at line 202 of file AuxBioCro.cpp.
References saturation_vapor_pressure(), TempToDdryA(), TempToLHV(), TempToSFS(), and thick_layer_absorption().
Referenced by soilML().
Here is the call graph for this function:
Here is the caller graph for this function:| soilML_str soilML | ( | double | precipit, |
| double | transp, | ||
| double * | cws, | ||
| double | soildepth, | ||
| double * | depths, | ||
| double | soil_field_capacity, | ||
| double | soil_wilting_point, | ||
| double | soil_saturation_capacity, | ||
| double | soil_air_entry, | ||
| double | soil_saturated_conductivity, | ||
| double | soil_b_coefficient, | ||
| double | soil_sand_content, | ||
| double | phi1, | ||
| double | phi2, | ||
| int | wsFun, | ||
| int | layers, | ||
| double | rootDB, | ||
| double | LAI, | ||
| double | k, | ||
| double | AirTemp, | ||
| double | IRad, | ||
| double | winds, | ||
| double | RelH, | ||
| int | hydrDist, | ||
| double | rfl, | ||
| double | rsec, | ||
| double | rsdf, | ||
| double | soil_clod_size, | ||
| double | soil_reflectance, | ||
| double | soil_transmission, | ||
| double | specific_heat_of_air, | ||
| double | par_energy_content | ||
| ) |
Definition at line 419 of file AuxBioCro.cpp.
References soilML_str::cws, soilML_str::drainage, soilML_str::Nleach, soilML_str::rcoefPhoto, soilML_str::rcoefSpleaf, rootDist(), soilML_str::rootDist, rd_str::rootDist, SoilEvapo(), and soilML_str::SoilEvapo.
Here is the call graph for this function:| ws_str watstr | ( | double | precipit, |
| double | evapo, | ||
| double | cws, | ||
| double | soildepth, | ||
| double | fieldc, | ||
| double | wiltp, | ||
| double | soil_saturation_capacity, | ||
| double | soil_sand_content, | ||
| double | Ks, | ||
| double | air_entry, | ||
| double | b | ||
| ) |
Definition at line 352 of file AuxBioCro.cpp.
References ws_str::awc, ws_str::Nleach, ws_str::psim, and ws_str::runoff.
| void WINDprof | ( | double | WindSpeed, |
| double | LAI, | ||
| std::vector< double > & | wind_speed_profile | ||
| ) |