PHP 7.2 implementation of evapotranspiration prediction. Various calculation procedures for estimating missing data are also provided : weather, climatological, physical and agronomic datas.
GNU GPLv3 2014/2019 by Philippe M.
Computation of all data required for the calculation of the reference evapotranspiration (ETc) by means of the FAO Penman-Monteith method.
Also computation of crop evapotranspiration (ETc) with crop and plant datas.
Explanation : https://en.wikipedia.org/wiki/Evapotranspiration
Sources for algorithmes and test datas : http://www.fao.org/docrep/X0490E/x0490e07.htm
(Image (CC) Salsero35 / Wikimedia Commons)
Meteorological factors determining ET : Solar radiation Air temperature Air humidity Wind speed to determined height
Atmospheric parameters :
- Atmospheric pressure (P)
- Latent heat of vaporization (l)
- Psychrometric constant (g)
Estimation of missing datas :
- climatic data (wind speed, humidity)
- radiation data (solar, extraterrestrial)
Simplistic equation for ETo when weather data are missing
See also http://www.cesbio.ups-tlse.fr/multitemp/?p=4802
composer require dispositif/evapotrans
use Evapotrans\Location;
use Evapotrans\MeteoData;
use Evapotrans\ValueObjects\Temperature;
use Evapotrans\ValueObjects\Wind2m;
use Evapotrans\PenmanCalc;
//require_once __DIR__.'/vendor/autoload.php';
$location = new Location(43.29504, 5.3865, 35);
$data = new MeteoData($location, new \DateTime('2019-02-15'));
$data->setTmin(new Temperature(2.7));
$data->setTmax(new Temperature(61, 'F'));
$data->setActualSunnyHours(7.2); // mesured today
$data->setWind2(new Wind2m(20, 'km/h', 2));
// optional if Tdew defined
$data->setRHmax(0.90);
$data->setRHmin(0.38);
$ETcalc = new PenmanCalc();
$ETo = $ETcalc->EToPenmanMonteith($data);
dump("ETo $ETo mm/day"); // ETo 5.7 mm/day
// Crop evapotranspiration (work in progress)
$radish = new Plant(
'Radish',
['initial' => 0.7, 'mid-season' => 0.9, 'late-season' => 0.85]
);
$area = new Area($radish);
$area->setGrowStade('initial');
$area->setFractionWetted(1);
$area->setStressFactor(1.1);
$ETc = (new CropEvapotrans($area, $ETo))->calcETc();
// ETc : 4.0 mm/day