meteo_v001¶
Model for calculating radiation terms based on sunshine duration following the FAO reference evapotranspiration model.
Version 1 of HydPy-Meteo follows the guide-line provided by Allen et al. (1998). There are a few differences, but, at least for the following example calculations, they seem to be of minor importance. See the documentation on the individual methods for more detailed information.
meteo_v001
is tested for daily and hourly simulation time steps. We are 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 to
extend 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 meteo_v001
calculates multiple meteorological factors hydrological
models could require. Many require GlobalRadiation
for calculating net
shortwave radiation. Some also require PossibleSunshineDuration
or
ClearSkySolarRadiation
to guess cloudiness for calculating net longwave radiation.
Here, we select GlobalRadiation
and ClearSkySolarRadiation
by
importing their globally available aliases, which we hand over to the Node
instances
node1 and node2:
>>> from hydpy import Element, Node
>>> from hydpy.outputs import meteo_GlobalRadiation, meteo_ClearSkySolarRadiation
>>> node1 = Node("node1", variable=meteo_GlobalRadiation)
>>> node2 = Node("node2", variable=meteo_ClearSkySolarRadiation)
Now we can prepare an instance of meteo_v001
and assign it to an element connected to
the prepared nodes:
>>> from hydpy.models.meteo_v001 import *
>>> parameterstep()
>>> element = Element("element", outputs=(node1, node2))
>>> element.model = model
daily simulation¶
The first example deals with a daily simulation time step. We calculate the radiation terms on 6 July in Uccle (Brussels, Belgium) and take all input data from example 18 of Allen et al. (1998):
>>> from hydpy import IntegrationTest, pub
>>> pub.timegrids = "2000-07-06", "2000-07-07", "1d"
>>> latitude(50.8)
>>> angstromconstant(0.25)
>>> angstromfactor(0.5)
>>> parameters.update()
>>> test = IntegrationTest(element)
>>> test.dateformat = "%Y-%d-%m"
>>> inputs.sunshineduration.series = 9.25
Both for GlobalRadiation
and ClearSkySolarRadiation
, the differences
to the results given by Allen et al. (1998) are significantly less than 1 %:
>>> test()
Click to see the table
hourly simulation¶
The second example deals with an hourly simulation over multiple time steps. We calculate the different radiation terms 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 et al. (1998).
Example 19 of Allen et al. (1998) gives results for the intervals between 2 and 3 o’clock and between 14 and 15 o’clock only. We assume these clock times refer to UTC-1:
>>> pub.options.utcoffset = -60
>>> pub.options.utclongitude = -15
>>> pub.timegrids = "2001-09-30 02:00", "2001-10-01 15:00", "1h"
>>> latitude(16.0 + 0.13 / 60 * 100)
>>> longitude(-16.25)
We reuse the Ångström coefficients from the first example:
>>> angstromconstant(0.25)
>>> angstromfactor(0.5)
>>> parameters.update()
>>> test = IntegrationTest(element)
>>> test.dateformat = "%Y-%d-%m %H:00"
We set the sunshine duration constantly to 80 % during the first daytime period and let it linearly increase from 82 % to 88 % in the (incomplete) second daytime period. The exceedance of the potential sunshine duration during both sunsets does not affect the results negatively. At the end of the simulation period, the given sunshine duration of 88 % corresponds to a ratio of global radiation and clear sky radiation of approximately 0.92, which is an intermediate result of Allen et al. (1998):
>>> import numpy
>>> inputs.sunshineduration.series = 0.0
>>> inputs.sunshineduration.series[3:16] = 0.8
>>> inputs.sunshineduration.series[27:] = numpy.linspace(0.82, 0.88, 10)
Again, the calculated GlobalRadiation
and ClearSkySolarRadiation
differs significantly less than 1 % from the results given by Allen et al. (1998):
>>> test("meteo_v001_hourly",
... axis1=(fluxes.globalradiation, fluxes.clearskysolarradiation))
Click to see the table
Click to see the graph
- class hydpy.models.meteo_v001.Model[source]¶
Bases:
AdHocModel
Version 1 of the Meteo model.
- The following “run methods” are called in the given sequence during each simulation step:
Calc_EarthSunDistance_V1
Calculate the relative inverse distance between the earth and the sun according to Allen et al. (1998).Calc_SolarDeclination_V1
Calculate the solar declination according to Allen et al. (1998).Calc_SunsetHourAngle_V1
Calculate the sunset hour angle according to Allen et al. (1998).Calc_SolarTimeAngle_V1
Calculate the solar time angle at the midpoint of the current period according to Allen et al. (1998).Calc_PossibleSunshineDuration_V1
Calculate the astronomically possible sunshine duration according to Allen et al. (1998).Calc_ExtraterrestrialRadiation_V1
Calculate the extraterrestrial radiation according to Allen et al. (1998).Calc_ClearSkySolarRadiation_V1
Calculate the clear sky solar radiation according to Allen et al. (1998).Calc_GlobalRadiation_V1
Calculate the global radiation according to Allen et al. (1998).
- class hydpy.models.meteo_v001.ControlParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Control parameters of model meteo_v001.
- The following classes are selected:
Latitude()
The latitude [decimal degrees].Longitude()
The longitude [decimal degrees].AngstromConstant()
The Ångström “a” coefficient for calculating global radiation [-].AngstromFactor()
The Ångström “b” coefficient for calculating global radiation [-].
- class hydpy.models.meteo_v001.DerivedParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Derived parameters of model meteo_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 [-].Hours()
The length of the actual simulation step size in hours [h].Days()
The length of the actual simulation step size in days [d].SCT()
References the “global” standard clock time array [h].UTCLongitude()
Longitude of the centre of the local time zone [°].LatitudeRad()
The latitude [rad].
- class hydpy.models.meteo_v001.FactorSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FactorSequences
Factor sequences of model meteo_v001.
- The following classes are selected:
EarthSunDistance()
The relative inverse distance between the earth and the sun [-].SolarDeclination()
Solar declination [-].SunsetHourAngle()
Sunset hour angle [rad].SolarTimeAngle()
Solar time angle [rad].PossibleSunshineDuration()
Astronomically possible sunshine duration [h].
- class hydpy.models.meteo_v001.FixedParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Fixed parameters of model meteo_v001.
- The following classes are selected:
Pi()
π [-].SolarConstant()
Solar constant [W/m²].
- class hydpy.models.meteo_v001.FluxSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FluxSequences
Flux sequences of model meteo_v001.
- The following classes are selected:
ExtraterrestrialRadiation()
Extraterrestial radiation [W/m²].ClearSkySolarRadiation()
Clear sky solar radiation [W/m²].GlobalRadiation()
Global radiation [W/m²].
- class hydpy.models.meteo_v001.InputSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InputSequences
Input sequences of model meteo_v001.
- The following classes are selected:
SunshineDuration()
Sunshine duration [h].