evap_v001

Implementation of the FAO reference evapotranspiration model.

Version 1 of the HydPy-E model (Evap) follows the guide-line provided by Allen et al. (1998). However, there are some differences in input data assumptions (averaged daily temperature and relative humidity values instead of maximum and minimum values). You can use the models of the HydPy-Meteo family to “pre-process” some of the required input data. A suitable choice for GlobalRadiation and ClearSkySolarRadiation might be the application model evap_v001, which also follows the FAO guide-line.

Integration tests

Note

When new to HydPy, consider reading section How to understand integration tests? first.

Application model evap_v001 does not calculate runoff and thus does not define an outlet sequence. Hence, we must manually select an output sequence, which is usually ReferenceEvapotranspiration. We import its globally available alias and prepare the corresponding output node:

>>> from hydpy import Element, Node
>>> from hydpy.outputs import evap_ReferenceEvapotranspiration
>>> node = Node("node", variable=evap_ReferenceEvapotranspiration)

Now we can prepare an instance of evap_v001 and assign it to an element connected to the prepared node:

>>> from hydpy.models.evap_v001 import *
>>> parameterstep()
>>> element = Element("element", outputs=node)
>>> element.model = model

daily simulation

The first example deals with a daily simulation time step. We calculate the reference evapotranspiration on 6 July in Uccle (Brussels, Belgium) and take the following parameter values and input values from example 18 of Allen et al. (1998):

>>> from hydpy import IntegrationTest, pub
>>> pub.timegrids = "2000-07-06", "2000-07-07", "1d"
>>> measuringheightwindspeed(10.0)
>>> parameters.update()
>>> test = IntegrationTest(element)
>>> test.dateformat = "%Y-%d-%m"
>>> inputs.airtemperature.series = 16.9
>>> inputs.relativehumidity.series = 73.0
>>> inputs.windspeed.series = 10.0 * 1000.0 / 60 / 60
>>> inputs.atmosphericpressure.series = 1001.0

The following global and clear sky solar radiation values are results of the daily simulation integration test of meteo_v001 that also recalculates example 18 of Allen et al. (1998):

>>> inputs.globalradiation.series = 255.367464
>>> inputs.clearskysolarradiation.series = 356.40121

The calculated reference evapotranspiration is about 0.1 mm (3 %) smaller than the one given by Allen et al. (1998). This discrepancy is mainly due to different ways to calculate SaturationVapourPressure. Allen et al. (1998) estimates it both for the minimum and maximum temperature and averages the results, while evap_v001 directly applies the corresponding formula on the average air temperature. The first approach results in higher pressure values due to the nonlinearity of the vapour pressure curve. All other methodical differences show, at least in this example, less severe impacts:

>>> test()
Click to see the table

hourly simulation

The second example deals with an hourly simulation over multiple time steps. We calculate the reference evapotranspiration from 30 September to 1 October in N’Diaye (Senegal) and take (or try to derive as good as possible) all parameter and input values from example 19 of FAO:

>>> measuringheightwindspeed(2.0)

Example 19 of :t:ref-Allen1998` gives results for the intervals between 2 and 3 o’clock and between 14 and 15 o’clock only. We assume these clock times are referring to UTC-1:

>>> pub.options.utcoffset = -60
>>> pub.options.utclongitude = -15
>>> pub.timegrids = "2001-09-30 02:00", "2001-10-01 15:00", "1h"
>>> parameters.update()
>>> test = IntegrationTest(element)
>>> test.dateformat = "%Y-%d-%m %H:00"

We set constant input sequence values from the start of the simulation period to the first interval and interpolate linearly between the first and the second interval, which is also the end of the simulation period:

>>> import numpy
>>> def interpolate(sequence, value1, value2):
...     sequence.series[:-13] = value1
...     sequence.series[-13:] = numpy.linspace(value1, value2, 13)
>>> interpolate(inputs.airtemperature, 28.0, 38.0)
>>> interpolate(inputs.relativehumidity, 90.0, 52.0)
>>> interpolate(inputs.windspeed, 1.9, 3.3)
>>> interpolate(inputs.atmosphericpressure, 1001.0, 1001.0)

We again take global and clear sky solar radiation from meteo_v001, that recalculates example 19 of Allen et al. (1998) in its hourly simulation integration test:

>>> inputs.globalradiation.series = (
...     0.0, 0.0, 0.0, 0.0, 115.964852, 328.283435, 517.046121, 669.389046, 774.930291,
...     826.477395, 820.517508, 757.456786, 641.592713, 480.821234, 286.098661,
...     80.296089, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
...     117.778042, 336.055513, 532.152561, 692.390544, 805.415479, 863.000911,
...     860.643794, 797.910345, 678.505661)
>>> inputs.clearskysolarradiation.series = (
...     0.0, 0.0, 0.0, 0.0, 133.805599, 378.788578, 596.591678, 772.371976, 894.150336,
...     953.627764, 946.75097, 873.988599, 740.299284, 554.793732, 330.113839,
...     81.571169, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
...     133.166127, 378.062452, 595.693165, 771.227092, 892.701885, 951.83924,
...     944.609042, 871.504018, 737.506154)

To avoid calculating nan values during the night periods within the first 24 hours, we arbitrarily set the values of both log sequences to one:

>>> logs.loggedclearskysolarradiation = 277.777778
>>> logs.loggedglobalradiation = 277.777778

Regarding reference evapotranspiration, the results match perfectly within the specified accuracy. The better agreement with the results reported by Allen et al. (1998) compared with the above example is due to the more consistent calculation of the saturation vapour pressure:

>>> test("evap_v001_hourly", update_parameters=False,
...      axis1=fluxes.referenceevapotranspiration)
Click to see the table
Click to see the graph
class hydpy.models.evap_v001.Model[source]

Bases: AdHocModel

Version 1 of the Evap model.

The following “run methods” are called in the given sequence during each simulation step:
class hydpy.models.evap_v001.ControlParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)

Bases: SubParameters

Control parameters of model evap_v001.

The following classes are selected:
class hydpy.models.evap_v001.DerivedParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)

Bases: SubParameters

Derived parameters of model evap_v001.

The following classes are selected:
  • Hours() The length of the actual simulation step size in hours [h].

  • Days() The length of the actual simulation step size in days [d].

  • NmbLogEntries() The number of log entries required for a memory duration of 24 hours [-].

class hydpy.models.evap_v001.FactorSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)

Bases: FactorSequences

Factor sequences of model evap_v001.

The following classes are selected:
class hydpy.models.evap_v001.FluxSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)

Bases: FluxSequences

Flux sequences of model evap_v001.

The following classes are selected:
class hydpy.models.evap_v001.InputSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)

Bases: InputSequences

Input sequences of model evap_v001.

The following classes are selected:
class hydpy.models.evap_v001.LogSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)

Bases: LogSequences

Log sequences of model evap_v001.

The following classes are selected: