HydPy-Meteo-Glob-MORSIM (global radiation estimation adopted from MORECS/LARSIM)

meteo_glob_morsim applies the equations given in LEG (2020) and LEG (2020) to estimate global radiation. It is pretty similar to meteo_glob_fao56 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_glob_morsim works slightly differently 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_glob_morsim 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_glob_morsim, 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 Integration Tests first.

Application model meteo_glob_morsim 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_knauf. Among others, lland_knauf 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.aliases import meteo_fluxes_GlobalRadiation, meteo_factors_PossibleSunshineDuration
>>> node1 = Node("node1", variable=meteo_fluxes_GlobalRadiation)
>>> node2 = Node("node2", variable=meteo_factors_PossibleSunshineDuration)

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

>>> from hydpy.models.meteo_glob_morsim 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, round_
>>> 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_glob_morsim_daily_summer")
Click to see the table
Click to see the graph

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

>>> round_(model.get_possiblesunshineduration())
13.618831
>>> round_(model.get_sunshineduration())
3.8
>>> round_(model.get_clearskysolarradiation())
244.001173
>>> round_(model.get_globalradiation())
126.722078

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_glob_morsim_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_glob_morsim_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_glob_morsim_hourly_winter")
Click to see the table
Click to see the graph
class hydpy.models.meteo_glob_morsim.Model[source]

Bases: AdHocModel, RadiationModel_V1

HydPy-Meteo-Glob-MORSIM (global radiation estimation adopted from MORECS/LARSIM).

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:
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:
DOCNAME: DocName = ('Meteo-Glob-MORSIM', 'global radiation estimation adopted from MORECS/LARSIM')
REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = (<class 'hydpy.models.meteo.meteo_model.Process_Radiation_V1'>,)
class hydpy.models.meteo_glob_morsim.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)

Bases: SubParameters

Control parameters of model meteo_glob_morsim.

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

Bases: SubParameters

Derived parameters of model meteo_glob_morsim.

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

Bases: FactorSequences

Factor sequences of model meteo_glob_morsim.

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

Bases: SubParameters

Fixed parameters of model meteo_glob_morsim.

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

Bases: FluxSequences

Flux sequences of model meteo_glob_morsim.

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

Bases: InputSequences

Input sequences of model meteo_glob_morsim.

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

Bases: LogSequences

Log sequences of model meteo_glob_morsim.

The following classes are selected: