HydPy-Meteo-Sun-FAO56 (sunshine duration estimation adopted from FAO56)

meteo_sun_fao56 is nearly identical to meteo_glob_fao56, except that it expects GlobalRadiation as input and estimates SunshineDuration, while meteo_glob_fao56 expects SunshineDuration as input and estimates GlobalRadiation. Hence, please read the documentation on meteo_glob_fao56. The following explanations focus only on the differences between both models.

Integration tests

Note

When new to HydPy, consider reading section Integration Tests first.

We design all integration tests similar to those of meteo_glob_fao56. This time, we select SunshineDuration and PossibleSunshineDuration as output sequences:

>>> from hydpy import Element, Node
>>> from hydpy.aliases import meteo_factors_SunshineDuration, meteo_factors_PossibleSunshineDuration
>>> node1 = Node("node1", variable=meteo_factors_SunshineDuration)
>>> node2 = Node("node2", variable=meteo_factors_PossibleSunshineDuration)
>>> from hydpy.models.meteo_sun_fao56 import *
>>> parameterstep()
>>> element = Element("element", outputs=(node1, node2))
>>> element.model = model

daily simulation

We repeat the daily simulation example of meteo_glob_fao56 but use its global radiation result as input:

>>> from hydpy import IntegrationTest, pub, round_
>>> 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_sun_fao56 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_glob_fao56:

>>> test()
Click to see the table

All getters specified by the RadiationModel_V1 interface return the correct data.

>>> round_(model.get_possiblesunshineduration())
16.093247
>>> round_(model.get_sunshineduration())
9.25
>>> round_(model.get_clearskysolarradiation())
356.40121
>>> round_(model.get_globalradiation())
255.367464

hourly simulation

We repeat the hourly simulation example of meteo_glob_fao56 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_glob_fao56:

>>> test("meteo_sun_fao56_hourly",
...      axis1=(factors.sunshineduration, factors.possiblesunshineduration))
Click to see the table
Click to see the graph
class hydpy.models.meteo_sun_fao56.Model[source]

Bases: AdHocModel, RadiationModel_V1

HydPy-Meteo-Sun-FAO56 (sunshine duration estimation adopted from FAO56).

The following “run methods” are called in the given sequence during each simulation step:
The following interface methods are available to main models using the defined model as a submodel:
DOCNAME: DocName = ('Meteo-Sun-FAO56', 'sunshine duration estimation adopted from FAO56')
REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = (<class 'hydpy.models.meteo.meteo_model.Process_Radiation_V1'>,)
class hydpy.models.meteo_sun_fao56.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)

Bases: SubParameters

Control parameters of model meteo_sun_fao56.

The following classes are selected:
class hydpy.models.meteo_sun_fao56.DerivedParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)

Bases: SubParameters

Derived parameters of model meteo_sun_fao56.

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_sun_fao56.FactorSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)

Bases: FactorSequences

Factor sequences of model meteo_sun_fao56.

The following classes are selected:
class hydpy.models.meteo_sun_fao56.FixedParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)

Bases: SubParameters

Fixed parameters of model meteo_sun_fao56.

The following classes are selected:
class hydpy.models.meteo_sun_fao56.FluxSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)

Bases: FluxSequences

Flux sequences of model meteo_sun_fao56.

The following classes are selected:
class hydpy.models.meteo_sun_fao56.InputSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)

Bases: InputSequences

Input sequences of model meteo_sun_fao56.

The following classes are selected: