# 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:

[math]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)}[/math] (Equation 53)

where:

[math]ET_o[/math] | reference evapotranspiration [math][mm~hour^{-1}][/math], |

[math]R_n[/math] | net radiation at the grass surface [math][MJ~m^{-2}~hour^{-1}][/math] (Equation 40), |

[math]G[/math] | soil heat flux density [math][MJ~m^{-2}~hour^{-1}] [/math](Equations 45 and 46), |

[math]T_{hr}[/math] | mean hourly air temperature at 2 meter height [math][°C][/math], |

[math]\Delta[/math] | saturation slope vapour pressure curve at [math]T_{hr}~[kPa~°C^{-1}][/math] (Equation 13), |

[math]\gamma[/math] | psychrometric constant [math][kPa~°C^{-1}] [/math](Equation 8), |

[math]e^o(T_{hr})[/math] | saturation vapour pressure at air temperature [math]T_{hr}~[kPa] [/math] (Equation 11), |

[math]e_a[/math] | average hourly actual vapour pressure [math][kPa][/math] (Equation 54), |

[math]u_2[/math] | average hourly wind speed at 2 meter height [math][m~s^{-1}][/math]. |