# ETo Calculation

This package calculates standard evapotranspiration data, ETo, for a given sector and merges it into a netCDF file along with WRF precipitation, and temperature data. Refer to WRF Hindcast for more information on sectors.

The merged file is used as input data for the Soil Moisture Estimator (SME) application.

A GUI implementation of the SME is on the Agrineer.org website and currently covers about half of the western United States, with a ~3km pixel resolution. You can go here to download a command-line version of the SME software.

This package was developed using GNU/Linux Mint 17, but other Debian platforms are known to work (Ubuntu 12,14; Mint 18,19).

There are two class/main programs in this package:

- eto.py - Calculates standard evapotranspiration (ETo) using Weather, Research, and Forecasting (WRF) model data as input, accumulated hourly per day.

- merge.py - Selectively reads WRF meta and data variables (lat, long, min/max temp, rain) used for ETo calculation in "eto.py" class, then merges these variables with the output ETo data, to be used as input for the SME package.

Data generated daily by Agrineer.org are produced by "merge.py" and serve as input for the SME application. Zipped versions of the daily runs can be found here here.

These programs are provided for review purposes on the data flow. They show how the ETo is calculated and merged with other data. They are made available in case you want to modify and run your own WRF/Eto runs. You can find WRF input namelist files for each sector used [here](https://www.agrineer.org/downloads/sectors.php).

The FAO Penman-Monteith equation for hourly time steps is given below. Equation numbers refer to FAO paper #56, Chapter 4:

$ET_o=\frac{0.408\Delta(R_n-G)+\gamma\frac{37}{T_{hr}+273}u_2(e^o(T_{hr})-e_a)}{\Delta+\gamma(1+0.34u_2)}$ (Equation 53)

where:

 $ET_o$ reference evapotranspiration $[mm~hour^{-1}]$, $R_n$ net radiation at the grass surface $[MJ~m^{-2}~hour^{-1}]$ (Equation 40), $G$ soil heat flux density $[MJ~m^{-2}~hour^{-1}]$(Equations 45 and 46), $T_{hr}$ mean hourly air temperature at 2 meter height $[°C]$, $\Delta$ saturation slope vapour pressure curve at $T_{hr}~[kPa~°C^{-1}]$ (Equation 13), $\gamma$ psychrometric constant $[kPa~°C^{-1}]$(Equation 8), $e^o(T_{hr})$ saturation vapour pressure at air temperature $T_{hr}~[kPa]$ (Equation 11), $e_a$ average hourly actual vapour pressure $[kPa]$ (Equation 54), $u_2$ average hourly wind speed at 2 meter height $[m~s^{-1}]$.