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:
Calc_AdjustedWindSpeed_V1
Adjust the measured wind speed to a height of two meters above the ground.Calc_SaturationVapourPressure_V1
Calculate the saturation vapour pressure.Calc_SaturationVapourPressureSlope_V1
Calculate the slope of the saturation vapour pressure curve.Calc_ActualVapourPressure_V1
Calculate the actual vapour pressure.Calc_EarthSunDistance_V1
Calculate the relative inverse distance between the earth and the sun.Calc_SolarDeclination_V1
Calculate the solar declination.Calc_SunsetHourAngle_V1
Calculate the sunset hour angle.Calc_SolarTimeAngle_V1
Calculate the solar time angle at the midpoint of the current period.Calc_ExtraterrestrialRadiation_V1
Calculate the extraterrestrial radiation.Calc_PossibleSunshineDuration_V1
Calculate the possible astronomical sunshine duration.Calc_ClearSkySolarRadiation_V1
Calculate the clear sky solar radiation.Update_LoggedClearSkySolarRadiation_V1
Log the clear sky solar radiation values of the last 24 hours.Calc_GlobalRadiation_V1
Calculate the extraterrestrial radiation.Update_LoggedGlobalRadiation_V1
Log the global radiation values of the last 24 hours.Calc_NetShortwaveRadiation_V1
Calculate the net shortwave radiation for the hypothetical grass reference crop.Calc_NetLongwaveRadiation_V1
Calculate the net longwave radiation.Calc_NetRadiation_V1
Calculate the total net radiation.Calc_SoilHeatFlux_V1
Calculate the soil heat flux.Calc_PsychrometricConstant_V1
Calculate the psychrometric constant.Calc_ReferenceEvapotranspiration_V1
Calculate the reference evapotranspiration constant.
-
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:
Latitude()
The latitude [decimal degrees].Longitude()
The longitude [decimal degrees].MeasuringHeightWindSpeed()
The height above ground of the wind speed measurements [m].AngstromConstant()
The Ångström “a” coefficient for calculating global radiation [-].AngstromFactor()
The Ångström “b” coefficient for calculating global radiation [-].
-
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:
AdjustedWindSpeed()
Adjusted wind speed [m/s].SaturationVapourPressure()
Saturation vapour pressure [kPa].SaturationVapourPressureSlope()
The slope of the saturation vapour pressure curve [kPa/°C].ActualVapourPressure()
Actual vapour pressure [kPa].EarthSunDistance()
The relative inverse distance between the earth and the sun [-].SolarDeclination()
Solar declination [-].SunsetHourAngle()
Sunset hour angle [rad].SolarTimeAngle()
Solar time angle [rad].ExtraterrestrialRadiation()
Extraterrestial radiation [MJ/m²/T].PossibleSunshineDuration()
Possible astronomical sunshine duration [h].ClearSkySolarRadiation()
Clear sky solar radiation [MJ/m²/T].GlobalRadiation()
Global radiation [MJ/m²/T].NetShortwaveRadiation()
Net shortwave radiation [MJ/m²/T].NetLongwaveRadiation()
Net longwave radiation [MJ/m²/T].NetRadiation()
Total net radiation [MJ/m²/T].SoilHeatFlux()
Soil heat flux [MJ/m²/T].PsychrometricConstant()
Psychrometric constant [kPa/°C].ReferenceEvapotranspiration()
Reference evapotranspiration [mm/T].
-
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:
AirTemperature()
Air temperature [°C].RelativeHumidity()
Relative humidity [%].WindSpeed()
Wind speed [m/s].SunshineDuration()
Sunshine duration [h].AtmosphericPressure()
Atmospheric pressure [kPA].
-
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:
LoggedGlobalRadiation()
Logged global radiation [MJ/m²/T].LoggedClearSkySolarRadiation()
Logged clear sky radiation [MJ/m²/T].