meteo_v003

Model for calculating radiation terms based on sunshine duration following the LARSIM model.

Version 3 of HydPy-Meteo applies the equations given in LEG (2020) and LEG (2020) for estimating global radiation. It is pretty similar to meteo_v001 for daily simulations. However, it is more complicated for hourly (or other short) timesteps, as it implements an approach of adjusting hourly global radiation values to directly calculated daily global radiation sums. The documentation on method Calc_GlobalRadiation_V2 explains this in more detail.

Users that strive for high consistency with LARSIM’s results should note meteo_v003 works slightly different regarding the mentioned approach for adjusting hourly global radiation values. LARSIM normalises them so that their sum is identical with the directly calculated global radiation sum of the current calendar day. Hence, estimating the global radiation for the early morning takes the sunshine duration measured for the late evening into account. HydPy generally does not support looking into the future for calculating current states or fluxes. Instead, we decided to let meteo_v003 always uses data of the last 24 hours for this adjustment process. Hence, there are noticeable differences in individual hourly radiation estimates of LARSIM and meteo_v003, but these are random short term fluctuations that do not introduce any long term bias.

Integration tests

Note

When new to HydPy, consider reading section How to understand integration tests? first.

Application model meteo_v003 calculates multiple meteorological factors hydrological models could require. We design the following integration tests so that their output can serve as input for the integration tests of lland_v3. Among others, lland_v3 requires global radiation and possible sunshine duration as input, which is why we select the corresponding sequences GlobalRadiation and PossibleSunshineDuration as outputs. We hand them over to the Node instances node1 and node2:

>>> from hydpy import Element, Node
>>> from hydpy.outputs import meteo_GlobalRadiation, meteo_PossibleSunshineDuration
>>> node1 = Node("node1", variable=meteo_GlobalRadiation)
>>> node2 = Node("node2", variable=meteo_PossibleSunshineDuration)

We prepare a meteo_v003 instance and assign it to an element connected to those nodes:

>>> from hydpy.models.meteo_v003 import *
>>> parameterstep()
>>> element = Element("element", outputs=(node1, node2))
>>> element.model = model

We will use the same coordinates and Ångström coefficients in all examples:

>>> latitude(54.1)
>>> longitude(9.7)
>>> angstromconstant(0.25)
>>> angstromfactor(0.5)
>>> angstromalternative(0.15)

daily simulation summer

The first example takes place in a summer period, for which we calculate daily values of global radiation and possible sunshine duration. Besides preparing an IntegrationTest instance for running the test, we only need to provide the time series of (measured) sunshine duration:

>>> from hydpy import IntegrationTest, pub
>>> pub.timegrids = "1997-08-01", "1997-09-01", "1d"
>>> test = IntegrationTest(element)
>>> test.axis1 = (fluxes.globalradiation,)
>>> test.axis2 = (factors.possiblesunshineduration,)
>>> test.dateformat = "%Y-%d-%m"
>>> inputs.sunshineduration.series = (
...     6.3, 1.7, 4.5, 12.4, 13.9, 13.0, 13.8, 12.3, 13.1, 12.8, 13.1, 13.3, 12.7,
...     10.2, 9.4, 10.3, 11.1, 11.0, 8.5, 11.3, 12.4, 0.1, 6.7, 10.4, 6.5, 4.9, 6.6,
...     0.3, 0.1, 5.0, 3.8)
>>> test("meteo_v003_daily_summer")
Click to see the table
Click to see the graph

daily simulation winter

This test is similar to the daily simulation summer example but deals with winter conditions:

>>> pub.timegrids = "2010-12-01", "2011-01-01", "1d"
>>> inputs.sunshineduration.series = (
...     3.5, 0.0, 0.1, 3.7, 0.0, 0.1, 0.0, 0.0, 4.4, 0.1, 0.2, 0.7, 0.0, 1.2, 3.0, 0.0,
...     0.0, 0.0, 0.0, 0.2, 0.8, 0.0, 0.0, 0.0, 3.2, 4.3, 0.0, 3.4, 0.0, 0.0, 4.0)
>>> test("meteo_v003_daily_winter")
Click to see the table
Click to see the graph

hourly simulation summer

When choosing a simulation timestep smaller one day, we additionally must provide sunshine duration and “unadjusted” global radiation values for the last 24 hours, which we pass to the sequences LoggedSunshineDuration and LoggedUnadjustedGlobalRadiation:

>>> pub.timegrids = "1997-08-03", "1997-08-06", "1h"
>>> test = IntegrationTest(element)
>>> test.axis1 = (fluxes.globalradiation,)
>>> test.axis2 = (factors.possiblesunshineduration,)
>>> test.dateformat = "%Y-%d-%m %H:00"
>>> inputs.sunshineduration.series = (
...     0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.5, 0.7, 0.8, 0.5, 0.4, 0.5,
...     0.5, 0.3, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.9,
...     1.0, 1.0, 0.9, 0.8, 0.9, 0.8, 0.9, 0.9, 0.9, 1.0, 1.0, 1.0, 0.3, 0.0, 0.0, 0.0,
...     0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.6, 0.9, 1.0, 0.9, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
...     1.0, 1.0, 1.0, 1.0, 0.5, 0.0, 0.0, 0.0)
>>> test.inits = (
...     (logs.loggedsunshineduration,
...      [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.1, 0.2, 0.1, 0.2, 0.2, 0.3, 0.0,
...       0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]),
...     (logs.loggedunadjustedglobalradiation,
...      [0.0, 0.0, 0.0, 0.0, 0.0, 27.777778, 55.555556, 138.888889, 222.222222,
...       305.555556, 333.333333, 388.888889, 527.777778, 444.444444, 250.0,
...       222.222222, 166.666667, 111.111111, 55.555556, 27.777778, 0.0, 0.0, 0.0,
...       0.0]))
>>> test("meteo_v003_hourly_summer")
Click to see the table
Click to see the graph

hourly simulation winter

This test is similar to the hourly simulation summer example but deals with winter conditions:

>>> pub.timegrids = "2010-12-10", "2010-12-13", "1h"
>>> inputs.sunshineduration.series = (
...     0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0,
...     0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
...     0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
...     0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.2,
...     0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
>>> test.inits = (
...     (logs.loggedsunshineduration,
...      [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.04, 0.25, 0.59, 0.91,
...       0.97, 1.0, 0.65, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]),
...     (logs.loggedunadjustedglobalradiation,
...      [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 27.777778, 55.555556,
...       111.111111, 166.666667, 138.888889, 55.555556, 0.0,0.0, 0.0, 0.0, 0.0, 0.0,
...       0.0, 0.0, 0.0]))
>>> test("meteo_v003_hourly_winter")
Click to see the table
Click to see the graph
class hydpy.models.meteo_v003.Model[source]

Bases: AdHocModel

Version 3 of the Meteo model.

The following “run methods” are called in the given sequence during each simulation step:
The following “additional methods” might be called by one or more of the other methods or are meant to be directly called by the user:
class hydpy.models.meteo_v003.ControlParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)

Bases: SubParameters

Control parameters of model meteo_v003.

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

Bases: SubParameters

Derived parameters of model meteo_v003.

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].

  • NmbLogEntries() The number of log entries required for memorising one day’s data [-].

  • UTCLongitude() Longitude of the centre of the local time zone [°].

  • LatitudeRad() The latitude [rad].

class hydpy.models.meteo_v003.FactorSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)

Bases: FactorSequences

Factor sequences of model meteo_v003.

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

Bases: SubParameters

Fixed parameters of model meteo_v003.

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

Bases: FluxSequences

Flux sequences of model meteo_v003.

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

Bases: InputSequences

Input sequences of model meteo_v003.

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

Bases: LogSequences

Log sequences of model meteo_v003.

The following classes are selected: