meteo_v002¶
Model for estimating sunshine duration based on global radiation following the FAO reference evapotranspiration model.
meteo_v002
is nearly identical with meteo_v001
, except that it expects
GlobalRadiation
as input and estimates SunshineDuration
,
while meteo_v001
expects SunshineDuration
as input and estimates
GlobalRadiation
. Hence, please read the documentation on meteo_v001
.
The following explanations focus only on the differences between both models.
Integration tests¶
Note
When new to HydPy, consider reading section How to understand integration tests? first.
We design all integration tests as similar to those of meteo_v001
. This time, we
select SunshineDuration
and PossibleSunshineDuration
as
output sequences:
>>> from hydpy import Element, Node
>>> from hydpy.outputs import meteo_SunshineDuration, meteo_PossibleSunshineDuration
>>> node1 = Node("node1", variable=meteo_SunshineDuration)
>>> node2 = Node("node2", variable=meteo_PossibleSunshineDuration)
>>> from hydpy.models.meteo_v002 import *
>>> parameterstep()
>>> element = Element("element", outputs=(node1, node2))
>>> element.model = model
daily simulation¶
We repeat the daily simulation example of meteo_v001
but use its
global radiation result as input:
>>> 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.globalradiation.series = 255.367464
meteo_v002
calculates the same radiation terms and a sunshine duration of 9.25 h,
which is the input value used in the daily simulation example of
meteo_v001
:
>>> test()
Click to see the table
hourly simulation¶
We repeat the hourly simulation example of meteo_v001
but use its
global radiation results as input:
>>> 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)
>>> angstromconstant(0.25)
>>> angstromfactor(0.5)
>>> parameters.update()
>>> test = IntegrationTest(element)
>>> test.dateformat = "%Y-%d-%m %H:00"
>>> 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)
Again, there is a good agreement with the results of meteo_v001
:
>>> test("meteo_v002_hourly",
... axis1=(factors.sunshineduration, factors.possiblesunshineduration))
Click to see the table
Click to see the graph
- class hydpy.models.meteo_v002.Model[source]¶
Bases:
AdHocModel
Version 2 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_SunshineDuration_V1
Calculate the sunshine duration according to Allen et al. (1998).
- class hydpy.models.meteo_v002.ControlParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Control parameters of model meteo_v002.
- 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_v002.DerivedParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Derived parameters of model meteo_v002.
- 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_v002.FactorSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FactorSequences
Factor sequences of model meteo_v002.
- 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].SunshineDuration()
Actual sunshine duration [h].
- class hydpy.models.meteo_v002.FixedParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Fixed parameters of model meteo_v002.
- The following classes are selected:
Pi()
π [-].SolarConstant()
Solar constant [W/m²].
- class hydpy.models.meteo_v002.FluxSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FluxSequences
Flux sequences of model meteo_v002.
- The following classes are selected:
ExtraterrestrialRadiation()
Extraterrestial radiation [W/m²].ClearSkySolarRadiation()
Clear sky solar radiation [W/m²].
- class hydpy.models.meteo_v002.InputSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InputSequences
Input sequences of model meteo_v002.
- The following classes are selected:
GlobalRadiation()
Global radiation [W/m²].