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
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
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
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
Method features¶
- class hydpy.models.meteo_glob_morsim.Model[source]¶
Bases:
AdHocModel,RadiationModel_V1HydPy-Meteo-Glob-MORSIM (global radiation estimation adopted from MORECS/LARSIM).
- The following “run methods” are called in the given sequence during each simulation step:
Calc_EarthSunDistance_V1Calculate the relative inverse distance between the Earth and the sun according to Allen et al. (1998).Calc_SolarDeclination_V2Calculate the solar declination according to LEG (2020).Calc_TimeOfSunrise_TimeOfSunset_V1Calculate the time of sunrise and sunset of the current day according to LEG (2020), based on Thompson et al. (1981).Calc_DailyPossibleSunshineDuration_V1Calculate the astronomically possible daily sunshine duration.Calc_PossibleSunshineDuration_V2Calculate the astronomically possible sunshine duration according to LEG (2020).Update_LoggedSunshineDuration_V1Log the sunshine duration values of the last 24 hours.Calc_DailySunshineDuration_V1Calculate the sunshine duration sum of the last 24 hours.Calc_ExtraterrestrialRadiation_V2Calculate the amount of extraterrestrial radiation according to LEG (2020), based on Thompson et al. (1981).Calc_ClearSkySolarRadiation_V1Calculate the clear sky solar radiation according to Allen et al. (1998).Calc_DailyGlobalRadiation_V1Calculate the daily global radiation.Calc_PortionDailyRadiation_V1Calculate the relative sum of radiation according to LEG (2020).Adjust_ClearSkySolarRadiation_V1Use the portion of the daily radiation sum to adjust the clear sky solar radiation’s daily average to the current simulation step.Calc_UnadjustedGlobalRadiation_V1Calculate the unadjusted global radiation according to LEG (2020).Update_LoggedUnadjustedGlobalRadiation_V1Log the unadjusted global radiation values of the last 24 hours.Calc_GlobalRadiation_V2Adjust the current global radiation to the daily global radiation according to LEG (2020).
- The following interface methods are available to main models using the defined model as a submodel:
Process_Radiation_V1Interface method for radiation-related submodels that executes all “run methods”.Get_PossibleSunshineDuration_V1Get the potential sunshine duration in h.Get_SunshineDuration_V2Get the actual sunshine duration in h.Get_ClearSkySolarRadiation_V1Get the clear sky solar radiation in W/m².Get_GlobalRadiation_V1Get the global radiation in W/m².
- 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:
Return_DailyGlobalRadiation_V1Calculate and return the daily global radiation according to LEG (2020).
- DOCNAME = ('Meteo-Glob-MORSIM', 'global radiation estimation adopted from MORECS/LARSIM')¶
- REUSABLE_METHODS = (<class 'hydpy.models.meteo.meteo_model.Process_Radiation_V1'>,)¶
Parameter features¶
- class hydpy.models.meteo_glob_morsim.ControlParameters(master: Parameters[TM_co], cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
ControlParametersControl parameters of model meteo_glob_morsim.
- The following classes are selected:
LatitudeThe latitude [decimal degrees].LongitudeThe longitude [decimal degrees].AngstromConstantThe Ångström “a” coefficient for calculating global radiation [-].AngstromFactorThe Ångström “b” coefficient for calculating global radiation [-].AngstromAlternativeAn alternative Ångström coefficient for replacing coefficient “c” (AngstromConstant) on days without any direct sunshine [-].
- class hydpy.models.meteo_glob_morsim.DerivedParameters(master: Parameters[TM_co], cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
DerivedParametersDerived parameters of model meteo_glob_morsim.
- The following classes are selected:
DOYReferences the “global” day of the year index array [-].MOYReferences the “global” month of the year index array [-].HoursThe length of the actual simulation step size in hours [h].DaysThe length of the actual simulation step size in days [d].SCTReferences the “global” standard clock time array [h].NmbLogEntriesThe number of log entries required for memorising one day’s data [-].UTCLongitudeLongitude of the centre of the local time zone [°].LatitudeRadThe latitude [rad].
- class hydpy.models.meteo_glob_morsim.FixedParameters(master: Parameters[TM_co], cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FixedParametersFixed parameters of model meteo_glob_morsim.
- The following classes are selected:
Piπ [-].SolarConstantSolar constant [W/m²].
Sequence features¶
- class hydpy.models.meteo_glob_morsim.InputSequences(master: Sequences[TM_co], cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InputSequencesInput sequences of model meteo_glob_morsim.
- The following classes are selected:
SunshineDurationSunshine duration [h].
- class hydpy.models.meteo_glob_morsim.FactorSequences(master: Sequences[TM_co], cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FactorSequencesFactor sequences of model meteo_glob_morsim.
- The following classes are selected:
EarthSunDistanceThe relative inverse distance between the Earth and the sun [-].SolarDeclinationSolar declination [-].TimeOfSunriseTime of sunrise [h].TimeOfSunsetTime of sunset [h].PossibleSunshineDurationAstronomically possible sunshine duration [h].DailyPossibleSunshineDurationAstronomically possible daily sunshine duration [h/d].DailySunshineDurationActual daily sunshine duration [h/d].PortionDailyRadiationPortion of the daily radiation sum [%].
- class hydpy.models.meteo_glob_morsim.FluxSequences(master: Sequences[TM_co], cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FluxSequencesFlux sequences of model meteo_glob_morsim.
- The following classes are selected:
ExtraterrestrialRadiationExtraterrestial radiation [W/m²].ClearSkySolarRadiationClear sky solar radiation [W/m²].UnadjustedGlobalRadiationUnadjusted global radiation [W/m²].DailyGlobalRadiationDaily sum of global radiation [W/m²].GlobalRadiationGlobal radiation [W/m²].
- class hydpy.models.meteo_glob_morsim.LogSequences(master: Sequences[TM_co], cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
LogSequencesLog sequences of model meteo_glob_morsim.
- The following classes are selected:
LoggedSunshineDurationLogged sunshine duration [h].LoggedUnadjustedGlobalRadiationLogged unadjusted global radiation [W/m²].