evap_v001

Implementation of the FAO reference evapotranspiration model.

Version 1 of the HydPy-E model (Evap) follows the guide-line provided by Allen. There are only a few differences related to different input data assumptions (given averaged daily values of temperature and relative humidity instead of maximum and minimum values) and the calculation of the radiation terms. However, at least for the following example calculations, these differences seem to be of minor importance.

evap_v001 is tested for daily and hourly simulation time steps. We are quite confident that it also works fine for steps shorter than one hour. Applying it on step sizes longer one day or between one hour and one day is not advisable (your contributions the extent its applicability are welcome, of course). There is also a geographic restriction due to the calculation of the longwave radiation, which fails during polar nights (again, contributions are welcome).

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 need to manually select an output sequence, which usually is 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 all parameter and input values from example 18 of Allen:

>>> from hydpy import IntegrationTest, pub
>>> pub.timegrids = "2000-07-06", "2000-07-07", "1d"
>>> latitude(50.8)
>>> measuringheightwindspeed(10.0)
>>> angstromconstant(0.25)
>>> angstromfactor(0.5)
>>> 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./60/60
>>> inputs.sunshineduration.series = 9.25
>>> inputs.atmosphericpressure.series = 100.1

The calculated reference evapotranspiration is about 0.1 mm (3 %) smaller than the one given by Allen (This discrepancy is mainly due to different ways to calculate SaturationVapourPressure. Allen calculates it both for the minimum and the maximum temperature and average the results, while evap_v001 applies the corresponding formula on the average air temperature directly. 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(update_parameters=False)
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 Allen.

Example 19 of Allen 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"

We reuse the Ångström coefficients from the first example:

>>> latitude(16.0+0.13/60*100)
>>> longitude(-16.25)
>>> measuringheightwindspeed(2.0)
>>> angstromconstant(0.25)
>>> angstromfactor(0.5)
>>> parameters.update()
>>> test = IntegrationTest(element)
>>> IntegrationTest.plotting_options.activated = [
...     fluxes.referenceevapotranspiration]
>>> 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, 100.1, 100.1)

We define the end value of the sunshine duration in a way that the relation between global radiation and clear sky radiation is approximately 0.92, which is an intermediate result of Allen:

>>> interpolate(inputs.sunshineduration, 0.8, 0.88)

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 = 1.0
>>> logs.loggedglobalradiation = 1.0

Regarding reference evapotranspiration, the calculated values agree within the precision given by Allen (The stronger agreement compared with the above example is due to the consistent calculation of the saturation vapour pressure.):

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

Bases: hydpy.core.modeltools.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: hydpy.core.parametertools.Parameters, cls_fastaccess: Optional[Type[hydpy.core.parametertools.FastAccessParameter]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)

Bases: hydpy.core.variabletools.SubVariables[hydpy.core.parametertools.Parameters, Parameter, hydpy.core.parametertools.FastAccessParameter]

Control parameters of model evap_v001.

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

Bases: hydpy.core.variabletools.SubVariables[hydpy.core.parametertools.Parameters, Parameter, hydpy.core.parametertools.FastAccessParameter]

Derived parameters of model evap_v001.

The following classes are selected:
  • DOY() References the “global” day of the year index array [-].

  • MOY() References the “global” month of the year index array [-].

  • Seconds() The length of the actual simulation step size in seconds [s].

  • SCT() References the “global” standard clock time array [h].

  • UTCLongitude() Longitude of the centre of the local time zone [°].

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

  • LatitudeRad() The latitude [rad].

class hydpy.models.evap_v001.FluxSequences(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)

Bases: hydpy.core.sequencetools.OutputSequences[FluxSequence]

Flux sequences of model evap_v001.

The following classes are selected:
class hydpy.models.evap_v001.InputSequences(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)

Bases: hydpy.core.sequencetools.ModelIOSequences[InputSequence, hydpy.core.sequencetools.FastAccessInputSequence]

Input sequences of model evap_v001.

The following classes are selected:
class hydpy.models.evap_v001.LogSequences(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)

Bases: hydpy.core.sequencetools.ModelSequences[LogSequence, hydpy.core.variabletools.FastAccess]

Log sequences of model evap_v001.

The following classes are selected: