canexch.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. ///////////////////////////////////////////////////////////////////////////////////////
  2. /// \file canexch.h
  3. /// \brief The canopy exchange module header file
  4. ///
  5. /// Vegetation-atmosphere exchange of H2O and CO2 via
  6. /// production, respiration and evapotranspiration.
  7. ///
  8. /// \author Ben Smith
  9. /// $Date: 2018-02-02 18:01:35 +0100 (ven, 02 fév 2018) $
  10. ///
  11. ///////////////////////////////////////////////////////////////////////////////////////
  12. // WHAT SHOULD THIS FILE CONTAIN?
  13. // Module header files need normally contain only declarations of functions defined in
  14. // the module that are to be accessible to the calling framework or to other modules.
  15. #ifndef LPJ_GUESS_CANEXCH_H
  16. #define LPJ_GUESS_CANEXCH_H
  17. #include "guess.h"
  18. void interception(Patch& patch, Climate& climate);
  19. void canopy_exchange(Patch& patch, Climate& climate);
  20. void photosynthesis(double co2, double temp, double par, double daylength,
  21. double fpar, double lambda, const Pft& pft,
  22. double nactive, bool ifnlimvmax,
  23. PhotosynthesisResult& result, double vm);
  24. /// Nitrogen- and landuse specific alpha a
  25. double alphaa(const Pft& pft);
  26. // Constants for photosynthesis calculations
  27. /// conversion factor for solar radiation at 550 nm from J/m2 to mol_quanta/m2 (E=mol quanta); mol J-1
  28. const double CQ = 4.6e-6;
  29. /// intrinsic quantum efficiency of CO2 uptake, C3 plants
  30. const double ALPHA_C3 = 0.08;
  31. /// intrinsic quantum efficiency of CO2 uptake, C4 plants
  32. const double ALPHA_C4 = 0.053;
  33. /// O2 partial pressure (Pa)
  34. const double PO2 = 2.09e4;
  35. /// colimitation (shape) parameter
  36. const double THETA = 0.7;
  37. /// 'saturation' ratio of intercellular to ambient CO2 partial pressure for C4 plants
  38. const double LAMBDA_SC4 = 0.4;
  39. /// leaf respiration as fraction of maximum rubisco, C3 plants
  40. const double BC3 = 0.015;
  41. /// leaf respiration as fraction of maximum rubisco, C4 plants
  42. const double BC4 = 0.02;
  43. const double CMASS = 12.0; // atomic mass of carbon
  44. const double ALPHAA = 0.45; // value chosen to give global carbon pool and flux values that
  45. // agree with published estimates.
  46. // scaling factor for PAR absorption from leaf to plant projective area level
  47. // alias "twigloss". Should normally be in the range 0-1
  48. const double ALPHAA_NLIM = 0.6; // Same as ALPHAA above but chosen to give pools and flux values
  49. // that agree with published estimates when Nitrogen limitation is
  50. // switched on.
  51. const double ALPHAA_CROP = 0.65; // Value for crops without N limitation.
  52. const double ALPHAA_CROP_NLIM = 0.85; // Value for crops with N limitation
  53. // ecev3 - increased from the CRU-NCEP values since IFS provides net SW at the surface, i.e. after subtraction of a spatiotemporally varying albedo
  54. const double ALPHAA_NLIM_ECE = 0.75;
  55. const double ALPHAA_CROP_NLIM_ECE = 0.85;
  56. /// Lambert-Beer extinction law (Prentice et al 1993; Monsi & Saeki 1953)
  57. inline double lambertbeer(double lai) {
  58. if (lai>500) lai = 500; // ecev3 - Peter Anthoni (KIT) - prevent SIGFE
  59. return exp(-.5 * lai);
  60. }
  61. /// Alternative parameterisations of the convective boundary layer
  62. /**
  63. * AET_MONTEITH_HYPERBOLIC = hyperbolic parameterisation (Huntington & Monteith 1998)
  64. * AET_MONTEITH_EXPONENTIAL = exponential parameterisation (Monteith 1995)
  65. * aet_monteith Returns AET given equilibrium evapotranspiration and canopy conductance
  66. * gc_monteith Returns canopy conductance given AET and equilibrium evapotranspiration
  67. */
  68. // Comment out one of the following two lines:
  69. #define AET_MONTEITH_HYPERBOLIC
  70. //#define AET_MONTEITH_EXPONENTIAL
  71. // Check:
  72. #if defined(AET_MONTEITH_HYPERBOLIC) && defined(AET_MONTEITH_EXPONENTIAL)
  73. #error Only one of AET_MONTEITH_HYPERBOLIC and AET_MONTEITH_EXPONENTIAL should be #defined
  74. #elif !defined(AET_MONTEITH_HYPERBOLIC) && !defined(AET_MONTEITH_EXPONENTIAL)
  75. #error One of AET_MONTEITH_HYPERBOLIC and AET_MONTEITH_EXPONENTIAL must be #defined
  76. #endif
  77. #if defined(AET_MONTEITH_EXPONENTIAL)
  78. const double ALPHAM = 1.4;
  79. const double GM = 5.0;
  80. inline double aet_monteith(double& eet, double& gc) {
  81. return negligible(gc) ? 0.0 : eet*ALPHAM*(1.0-exp(-gc/GM));
  82. }
  83. inline double gc_monteith(double& aet, double& eet) {
  84. if (negligible(eet)) return 0.0;
  85. double t = aet/eet/ALPHAM;
  86. if (t >= 1.0) fail("gc_monteith: invalid value for aet/eet/ALPHAM");
  87. return -GM * log(1.0 - t);
  88. }
  89. #elif defined(AET_MONTEITH_HYPERBOLIC)
  90. const double ALPHAM = 1.391;
  91. const double GM = 3.26;
  92. inline double aet_monteith(double& eet, double& gc) {
  93. return eet*ALPHAM*gc/(gc+GM);
  94. }
  95. inline double gc_monteith(double& aet, double& eet) {
  96. return (aet*GM) / (eet*ALPHAM-aet);
  97. }
  98. #endif
  99. #endif // LPJ_GUESS_CANEXCH_H