meteo_v004

Model for estimating sunshine duration based on global radiation following the LARSIM model.

meteo_v004 is similar to meteo_v003 but uses GlobalRadiation to estimate SunshineDuration, while meteo_v003 uses SunshineDuration to estimate GlobalRadiation. So, the relationship of meteo_v004 and meteo_v003 corresponds to the one of meteo_v002 and meteo_v001. However, opposed to meteo_v002 and meteo_v001, meteo_v004 “inverts” meteo_v003 only approximately for sub-daily simulation time steps. This deficit is primarily due to the “daily radiation adjustment” described in the documentation of meteo_v003.

Note

meteo_v004 is still under discussion. Please be aware that we might modify it later if we find a way to achieve higher agreements with meteo_v003.

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_v003. 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_v004 import *
>>> parameterstep()
>>> element = Element("element", outputs=(node1, node2))
>>> element.model = model

We take all parameter values without modifications. But note that meteo_v004 does not use the parameter AngstromAlternative (ideas to include it sensibly are welcome):

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

daily simulation summer

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

>>> from hydpy import IntegrationTest, pub
>>> pub.timegrids = "1997-08-01", "1997-09-01", "1d"
>>> test = IntegrationTest(element)
>>> test.axis1 = (inputs.globalradiation,)
>>> test.axis2 = (factors.sunshineduration, factors.possiblesunshineduration,)
>>> test.dateformat = "%Y-%d-%m"
>>> inputs.globalradiation.series = (
...     190.25149, 127.660782, 164.401298, 269.020502, 287.848667, 274.674263,
...     284.047892, 262.971263, 272.256414, 267.019218, 269.626547, 270.878291,
...     261.697164, 227.962115, 216.356321, 226.637904, 235.528503, 232.849428,
...     199.71349, 233.771902, 246.121286, 90.58551, 171.944993, 216.549813, 166.91683,
...     145.985611, 165.54389, 87.693346, 84.356885, 142.309203, 126.722078)

meteo_v004 calculates a sunshine duration series equal to the one we use in the daily simulation summer example of meteo_v003 as input:

>>> test("meteo_v004_daily_summer")
Click to see the table
Click to see the graph

daily simulation winter

We repeat the daily simulation winter example of meteo_v003 but use its global radiation results as input:

>>> pub.timegrids = "2010-12-01", "2011-01-01", "1d"
>>> inputs.globalradiation.series = (
...     31.942798, 9.873898, 16.6835, 31.807427, 9.532511, 16.141484, 9.341429,
...     9.256764, 33.405815, 15.591158, 15.891544, 17.823519, 8.941324, 19.668068,
...     26.831581, 8.837738, 8.817416, 8.804185, 8.798044, 15.464746, 17.879541,
...     8.822161, 8.844396, 8.873743, 27.759642, 32.328755, 9.004582, 28.982321,
...     9.127645, 9.19999, 32.062234)

Again, there is a perfect agreement regarding the sunshine duration:

>>> test("meteo_v004_daily_winter")
Click to see the table
Click to see the graph

hourly simulation summer

We repeat the hourly simulation summer example of meteo_v003 but use its global radiation results as input and prepare the log sequences LoggedGlobalRadiation and LoggedUnadjustedSunshineDuration instead of LoggedSunshineDuration and LoggedUnadjustedSunshineDuration:

>>> pub.timegrids = "1997-08-03", "1997-08-06", "1h"
>>> test = IntegrationTest(element)
>>> test.axis1 = (inputs.globalradiation,)
>>> test.axis2 = (factors.sunshineduration, factors.possiblesunshineduration,)
>>> test.dateformat = "%Y-%d-%m %H:00"
>>> inputs.globalradiation.series = (
...     0.0, 0.0, 0.0, 0.0, 1.943686, 21.932441, 57.256187, 109.332844, 170.949152,
...     311.762624, 501.583299, 615.018727, 626.544326, 496.133417, 419.520994,
...     387.887354, 278.496873, 137.138608, 51.080715, 13.632816, 0.185943, 0.0, 0.0,
...     0.0, 0.0, 0.0, 0.0, 0.0, 1.590516, 19.950903, 62.985774, 285.776389, 475.225247,
...     614.006719, 643.806508, 600.26298, 620.51414, 599.441386, 613.551223,
...     517.107047, 377.836616, 252.204639, 128.576715, 42.072585, 0.812898, 0.0, 0.0,
...     0.0, 0.0, 0.0, 0.0, 0.0, 1.482348, 21.135568, 125.883451, 305.954943,
...     511.104575, 629.51924, 765.81659, 767.145843, 736.263854, 768.006183, 735.92937,
...     620.374953, 450.095263, 273.614141, 133.368104, 40.326502, 0.867122, 0.0, 0.0,
...     0.0)
>>> test.inits = (
...     (logs.loggedglobalradiation,
...      [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]),
...     (logs.loggedunadjustedsunshineduration,
...      [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]))

For this hourly simulation, there are relevant differences between the “real” sunshine durations defined in the hourly simulation summer example and the estimates of meteo_v004. The “daily sunshine adjustment” approach implemented by method Calc_SunshineDuration_V2 improves the agreement but cannot achieve equality:

>>> test("meteo_v004_hourly_summer")
Click to see the table
Click to see the graph

hourly simulation winter

We repeat the hourly simulation winter example of meteo_v003 but use its global radiation results as input and prepare the log sequences LoggedGlobalRadiation and LoggedUnadjustedSunshineDuration instead of LoggedSunshineDuration and LoggedUnadjustedSunshineDuration:

>>> pub.timegrids = "2010-12-10", "2010-12-13", "1h"
>>> inputs.globalradiation.series = (
...     0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.10761, 18.663203, 56.267907,
...     107.168237, 91.473333, 80.475535, 43.120591, 10.320091, 0.028102, 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.900734,
...     17.26751, 52.61761, 80.135633, 80.276118, 75.835403, 42.227911, 12.613921,
...     0.021912, 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.894145, 17.71254, 54.302585, 81.504146, 81.665294, 77.078959, 60.254042,
...     14.837301, 0.168856, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
>>> test.inits = (
...     (logs.loggedglobalradiation,
...      [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]),
...     (logs.loggedunadjustedsunshineduration,
...      [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]))

In this short period with little sunshine, relative differences between the original and the estimated sunshine duration are more severe than in the summer example. The “daily sunshine adjustment” approach does not improve the agreement but worsens it slightly (which needs further investigation):

>>> test("meteo_v004_hourly_winter")
Click to see the table
Click to see the graph
class hydpy.models.meteo_v004.Model[source]

Bases: AdHocModel

Version 4 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_v004.ControlParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)

Bases: SubParameters

Control parameters of model meteo_v004.

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

Bases: SubParameters

Derived parameters of model meteo_v004.

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

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

Bases: FactorSequences

Factor sequences of model meteo_v004.

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

Bases: SubParameters

Fixed parameters of model meteo_v004.

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

Bases: FluxSequences

Flux sequences of model meteo_v004.

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

Bases: InputSequences

Input sequences of model meteo_v004.

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

Bases: LogSequences

Log sequences of model meteo_v004.

The following classes are selected: