{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Potential Evapotranspiration from CoAgMET data\n", "\n", "*M. Vremec, University of Graz, 2021*\n", "\n", "In this notebook it is shown how to compute (reference) evapotranspiration ($ET_0$) from meteorological data observed by the Colorado State University (CoAgMET) at Holyoke in Colorado, USA. The notebook also includes a comparison between $ET_0$ estimated using *pyet* (FAO56) and $ET_0$ available from CoAgMET. According to CoAgMET documentation, the provided reference evapotranspiration is estimated using ASCE reference evapotranspiration for short reference grass (Wright, 2000), which corresponds to the FAO-56 method used with *pyet*.\n", "\n", "Source: https://coagmet.colostate.edu/station/selector" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "\n", "import pyet as pyet\n", "pyet.show_versions()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Load CoAgMET Data" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "data = pd.read_csv(\"data/example_4/et_coagmet.txt\", parse_dates=True, index_col=\"date\")\n", "data" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "et0_coagmet = data[\"et_asce0\"]\n", "\n", "meteo = pd.DataFrame({\"tmean\":data[\"tavg\"], \n", " \"tmax\":data[\"tmax\"],\n", " \"tmin\":data[\"tmin\"], \n", " \"rhmax\":data[\"rhmax\"]*100,\n", " \"rhmin\":data[\"rhmin\"]*100, \n", " \"u2\":data[\"windrun\"]*1000/86400,\n", " \"rs\":data[\"solar\"]*86400/1000000})\n", "\n", "tmean, tmax, tmin, rhmax, rhmin, wind, rs = [meteo[col] for col in meteo.columns]\n", "lat = 40.49 * np.pi / 180" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Comparison: pyet FAO56 vs CoAgMET ASCE " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "et0_fao56 = pyet.pm_fao56(tmean, wind, rs=rs, elevation=1138, lat=lat, \n", " tmax=tmax, tmin=tmin, rhmax=rhmax, rhmin=rhmin)\n", "\n", "et0_fao56.plot()\n", "et0_coagmet.plot();" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3. Plot the results\n", "\n", "We now plot the evaporation time series against each other to see how these compare. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plt.scatter(et0_fao56, et0_coagmet)\n", "plt.plot([0,15],[0,15], color=\"red\", label=\"1:1 line\")\n", "plt.legend()\n", "plt.xlabel(\"ET0 pyet-FAO56 [mm]\")\n", "plt.ylabel(\"ET0 CoAgMET-ASCE [mm]\");" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.5" } }, "nbformat": 4, "nbformat_minor": 4 }