Difference between revisions of "ETo Calculation"

From Agrineer.org Wiki
Jump to: navigation, search
m (Agrineer moved page WRF ETo Calculation to ETo Calculation without leaving a redirect)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
This package calculates standard evapotranspiration data, ETo, and merges it into a netCDF file along with WRF precipitation, and temperature data.
+
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  
+
The merged file is used as input data for the [[Soil Moisture Estimator]] (SME) application.
 
+
[Agrineer_Wiki:Soil_Moisture_Estimator SME ]
+
application.
+
 
   
 
   
 
A GUI implementation of the SME is on the Agrineer.org [https://agrineer.org/sme/sme.php website]
 
A GUI implementation of the SME is on the Agrineer.org [https://agrineer.org/sme/sme.php website]
and covers about half of the western United States, with a ~3km pixel resolution.
+
and currently covers about half of the western United States, with a ~3km pixel resolution.
 +
You can go [https://gitlab.com/agrineer/sme here] to download a command-line version of the SME software.
  
 
This package was developed using GNU/Linux Mint 17, but other  
 
This package was developed using GNU/Linux Mint 17, but other  
Line 17: Line 15:
 
- eto.py -  Calculates standard evapotranspiration (ETo) using Weather, Research, and Forecasting (WRF) model data as input, accumulated hourly per day.
 
- 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 to the SME package.  
+
- 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 produced by "merge.py" are archived as input for the SME application [here](https://www.agrineer.org/downloads/sectors.php).
+
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 [https://www.agrineer.org/downloads/sectors.php 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).
 
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 [http://www.fao.org/docrep/X0490E/x0490e08.htm FAO paper #56, Chapter 4]:
  
## Dependencies
+
<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)
 
+
  - Python 3 versions of:
+
      - Numpy
+
      - netCDF4
+
      - osgeo
+
   
+
  - Try:
+
 
+
          > pip3 numpy
+
          > pip3 netCDF4
+
          > pip3 osgeo
+
 
+
## Installation
+
 
+
  Determine or create a directory to house the ETo package, eg. /home/user/projects
+
 
+
  Change into this directory and either unpack or clone this project. 
+
   
+
          > cd /home/user/projects 
+
         
+
          > tar xvf eto.tar
+
          or 
+
          > git clone https://gitlab.com/agrineer/eto
+
 
+
## How to Run:
+
 
+
  * Must have output from a WRF run
+
  * Implemented WRF data tree based on dates
+
  * Must review and change hardcoded paths
+
  
Run eto.py first, 
+
where:
   
+
          > ./eto.py -s sectorname <-r date>
+
         
+
      Remember, the sector directory is hard coded in eto.py. 
+
      If run date is not given it will use yesterday's date.
+
  
  Then run mergy.py 
+
{|
    
+
|-
          > merge.py -s sectorname <-l True/False> <-r date>
+
|<math>ET_o</math> 
  Set the -l flag to "True" for lat,long output. Default is False since static geo files used SME have the lat,long values.
+
|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>.
 +
|}

Latest revision as of 11:13, 16 January 2019

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].