1#ifndef LEAF_EVAPOTRANSPIRATION_CHECK_H
2#define LEAF_EVAPOTRANSPIRATION_CHECK_H
4#include "../framework/module.h"
5#include "../framework/state_map.h"
28 absorbed_shortwave{get_input(input_quantities,
"absorbed_shortwave")},
29 atmospheric_pressure{get_input(input_quantities,
"atmospheric_pressure")},
30 canopy_height{get_input(input_quantities,
"canopy_height")},
31 Gs{get_input(input_quantities,
"Gs")},
32 leaf_temperature{get_input(input_quantities,
"leaf_temperature")},
33 leafwidth{get_input(input_quantities,
"leafwidth")},
34 min_gbw_canopy{get_input(input_quantities,
"min_gbw_canopy")},
35 rh{get_input(input_quantities,
"rh")},
36 temp{get_input(input_quantities,
"temp")},
37 wind_speed_height{get_input(input_quantities,
"wind_speed_height")},
38 windspeed{get_input(input_quantities,
"windspeed")},
41 leaf_temp_check_op{get_op(output_quantities,
"leaf_temp_check")}
46 static std::string
get_name() {
return "leaf_evapotranspiration_check"; }
50 double const& absorbed_shortwave;
51 double const& atmospheric_pressure;
52 double const& canopy_height;
54 double const& leaf_temperature;
55 double const& leafwidth;
56 double const& min_gbw_canopy;
59 double const& wind_speed_height;
60 double const& windspeed;
63 double* leaf_temp_check_op;
66 void do_operation()
const;
73 "atmospheric_pressure",
93void leaf_evapotranspiration_check::do_operation()
const
96 double const absorbed_longwave =
97 1.0 * physical_constants::stefan_boltzmann *
98 pow(conversion_constants::celsius_to_kelvin + temp, 4);
108 double constexpr epsilon_s = 1.0;
118 double const gamma = rho_ta * c_p / lambda;
121 double const p_w_air = p_w_sat_air * rh;
123 double const rho_w_air =
127 double const rho_w_sat =
130 double const Delta_rho = rho_w_sat - rho_w_air;
133 double const J_a = absorbed_shortwave + absorbed_longwave;
137 atmospheric_pressure,
151 update(leaf_temp_check_op, leaf_temp_check);
double canopy_boundary_layer_conductance_thornley(double CanopyHeight, double WindSpeed, double minimum_gbw, double WindSpeedHeight)
Calculates the conductance for water vapor flow from the canopy across its boundary layer using a mod...
Uses check_leaf_temp() to calculate a temperature difference.
static string_vector get_outputs()
leaf_evapotranspiration_check(state_map const &input_quantities, state_map *output_quantities)
static string_vector get_inputs()
static std::string get_name()
double check_leaf_temp(double const air_pressure, double const air_temperature, double const Delta_rho, double const epsilon_s, double const gamma, double const gbw_canopy, double const J_a, double const lambda, double const leaf_temperature, double const leaf_width, double const s, double const stomatal_conductance, double const wind_speed)
Calculates a difference in leaf temperature; this function will return zero only if leaf temperature ...
This is the standard BioCro module library; it includes the essential modules used in typical BioCro ...
double TempToSFS(double air_temperature)
Determine the derivative of saturation water vapor density with respect to temperature at a particula...
double saturation_vapor_pressure(double air_temperature)
Determine saturation water vapor pressure (Pa) from air temperature (degrees C) using the Arden Buck ...
double TempToCp(double air_temperature)
Determine the specific heat capacity of dry air at constant pressure (c_p) at a particular value of a...
double dry_air_density(const double air_temperature, const double air_pressure)
Calculate the density of dry air from temperature and pressure using the ideal gas law.
double vapor_density_from_pressure(double density_of_dry_air, double total_pressure, double vapor_pressure)
Use Equation 14.5a from Thornley & Johnson (1990) to calculate water vapor density from water vapor p...
double water_latent_heat_of_vaporization_henderson(double temperature)
Determine the latent heat of vaporization of water from its temperature.