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:
AdHocModelVersion 1 of the Evap model.
- The following “run methods” are called in the given sequence during each simulation step:
Calc_AdjustedWindSpeed_V1Adjust the measured wind speed to a height of two meters above the ground according to Allen et al. (1998).Calc_SaturationVapourPressure_V1Calculate the saturation vapour pressure according to Allen et al. (1998).Calc_SaturationVapourPressureSlope_V1Calculate the slope of the saturation vapour pressure curve according to Allen et al. (1998).Calc_ActualVapourPressure_V1Calculate the actual vapour pressure according to Allen et al. (1998).Update_LoggedClearSkySolarRadiation_V1Log the clear sky solar radiation values of the last 24 hours.Update_LoggedGlobalRadiation_V1Log the global radiation values of the last 24 hours.Calc_NetShortwaveRadiation_V1Calculate the net shortwave radiation for the hypothetical grass reference crop according to Allen et al. (1998).Calc_NetLongwaveRadiation_V1Calculate the net longwave radiation according to Allen et al. (1998).Calc_NetRadiation_V1Calculate the total net radiation according to Allen et al. (1998).Calc_SoilHeatFlux_V1Calculate the soil heat flux according to Allen et al. (1998).Calc_PsychrometricConstant_V1Calculate the psychrometric constant according to Allen et al. (1998).Calc_ReferenceEvapotranspiration_V1Calculate the reference evapotranspiration constant according to Allen et al. (1998).
- class hydpy.models.evap_v001.ControlParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersControl parameters of model evap_v001.
- The following classes are selected:
MeasuringHeightWindSpeed()The height above ground of the wind speed measurements [m].
- class hydpy.models.evap_v001.DerivedParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersDerived 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:
FactorSequencesFactor sequences of model evap_v001.
- The following classes are selected:
AdjustedWindSpeed()Adjusted wind speed [m/s].SaturationVapourPressure()Saturation vapour pressure [hPa].SaturationVapourPressureSlope()The slope of the saturation vapour pressure curve [hPa/K].ActualVapourPressure()Actual vapour pressure [hPa].PsychrometricConstant()Psychrometric constant [hPa/K].
- class hydpy.models.evap_v001.FluxSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FluxSequencesFlux sequences of model evap_v001.
- The following classes are selected:
NetShortwaveRadiation()Net shortwave radiation [W/m²].NetLongwaveRadiation()Net longwave radiation [W/m²].NetRadiation()Total net radiation [W/m²].SoilHeatFlux()Soil heat flux [W/m²].ReferenceEvapotranspiration()Reference evapotranspiration [mm/T].
- class hydpy.models.evap_v001.InputSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InputSequencesInput sequences of model evap_v001.
- The following classes are selected:
AirTemperature()Air temperature [°C].RelativeHumidity()Relative humidity [%].WindSpeed()Wind speed [m/s].AtmosphericPressure()Atmospheric pressure [hPa].GlobalRadiation()Global radiation [W/m²].ClearSkySolarRadiation()Clear sky solar radiation [W/m²].
- class hydpy.models.evap_v001.LogSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
LogSequencesLog sequences of model evap_v001.
- The following classes are selected:
LoggedGlobalRadiation()Logged global radiation [W/m²].LoggedClearSkySolarRadiation()Logged clear sky radiation [W/m²].