Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5d0509f
Erstelle statcorr_control.py
parvumflumen Apr 29, 2026
f84eaef
Implementierung des statcorr-Modells
parvumflumen Jul 21, 2026
26fe500
Behebe Mypy-Problem in statcorr_main.py
parvumflumen Jul 21, 2026
7b21f53
Mache versehentliche Änderung in optiontools.py rückgängig
parvumflumen Jul 23, 2026
8710426
Remove unused method Pass_Q_V1
parvumflumen Jul 27, 2026
8b61bd6
Fix bug in statcorr_derived.py
parvumflumen Jul 27, 2026
c7500bd
Create HydPy-StatCorr.rst
parvumflumen Jul 27, 2026
de3e3f9
Add HydPy-StatCorr.rst
parvumflumen Jul 27, 2026
57dad37
Add # type: ignore[call-overload] in statcorr_main.py and statcorr_mo…
parvumflumen Jul 27, 2026
f3f9214
Remove unused import from statcorr_control.py
parvumflumen Jul 27, 2026
c7ff0b3
Change DOCNAME for statcorr to CamelCase for sphinx
parvumflumen Jul 29, 2026
fc05310
Revert change in statcorr_model.py and insert pylint disable statemen…
parvumflumen Jul 29, 2026
d422b7b
Fix pylint statement in statcorr_model.py
parvumflumen Jul 30, 2026
7e46381
Minor corrections of docstrings
parvumflumen Sep 1, 2026
ff15ba7
Implement states Residual and ResidualAnchor
parvumflumen Sep 1, 2026
746e3f0
Rename Parameter NmbOutputCorrModels to NmbSubmodels
parvumflumen Oct 27, 2026
951e9a1
Rename Parameter PropagateCorrection to Propagate
parvumflumen Oct 27, 2026
4c5f65c
Implement LowerLimit and UpperLimit instead of fixed NQ, MQ and HQ fl…
parvumflumen Oct 27, 2026
d0f4c18
Implement VariabilityCheck (LARSIMs rel. SumDeltaQ Check)
parvumflumen Oct 27, 2026
4911b35
Rename MaxResidualLookback to MaxNaNSkip
parvumflumen Oct 27, 2026
22dbcf2
Rename MaxRelativeshift to MaxRelShift, MaxAbsoluteShift to MaxAbsShi…
parvumflumen Oct 27, 2026
10785d9
Remove Parameter LoggingWindow
parvumflumen Oct 27, 2026
1ef36a9
Rename parameters that referred to discharge
parvumflumen Oct 27, 2026
399e747
Change unit of MaxRelShift from percent to fraction
parvumflumen Nov 3, 2026
513287e
Implement requested changes from review
parvumflumen Nov 5, 2026
620d49a
Implement requested changes from review
parvumflumen Nov 5, 2026
6f55820
Fix typing problems after update of mypy plugin
parvumflumen Nov 5, 2026
189d286
Implement further requested changes from Review
parvumflumen Nov 5, 2026
9a61616
Merge branch 'master' into feature/outputcorr
parvumflumen Nov 6, 2026
1d14730
Implement further requested changes from Review
parvumflumen Nov 9, 2026
1254a68
Restructure the statcorr base model so that it knows all methods and …
parvumflumen Nov 9, 2026
1e77c93
Merge branch 'master' into feature/outputcorr
parvumflumen Nov 9, 2026
d4dbcca
Add reference to LARSIM Website to hydpy-statcorr.rst
parvumflumen Nov 10, 2026
1c25fde
Simplify docstring of statcorr interface
parvumflumen Nov 10, 2026
b455939
Implement requested changes from review
parvumflumen Nov 10, 2026
0070df6
combine stationaritycheck and variabilitycheck to one parameter
parvumflumen Nov 11, 2026
896e7a5
Rewrite docstrings and integration tests in statcorr_arima010.py
parvumflumen Nov 11, 2026
175b3fe
Clean docstrings in statcorr_control.py
parvumflumen Nov 11, 2026
4c49a79
Clean docstrings in statcorr_derived.py
parvumflumen Nov 11, 2026
7511e76
Rewrite integration tests in statcorr_main.py
parvumflumen Nov 12, 2026
5dd5618
Clean docstrings in statcorr_model.py
parvumflumen Nov 12, 2026
d110bc0
Harmonize docstrings in statcorr_model.py with other hydpy models
parvumflumen Nov 12, 2026
1b8e1dc
Simplify docstrings and examples in statcorr_model.py
parvumflumen Nov 12, 2026
9f53bed
Simplify docstrings and examples in statcorr_model.py
parvumflumen Nov 12, 2026
e3e9648
Implement new parameters MinValue and MaxValue
parvumflumen Nov 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions hydpy/conf/HydPyConfigBase.xsdt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
</restriction>
</simpleType>
</element>
<element name="simulationmode"
minOccurs="0">
<simpleType>
<restriction base="string">
<enumeration value="historical"/>
<enumeration value="forecast"/>
</restriction>
</simpleType>
</element>
<element name="threads"
minOccurs="0">
<simpleType>
Expand Down
2 changes: 2 additions & 0 deletions hydpy/core/sequencetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ class StandardInputNames(enum.StrEnum):
"""Capillary rise [mm/T]."""
CLEAR_SKY_SOLAR_RADIATION = "clear_sky_solar_radiation"
"""Clear sky solar radiation [W/m²]."""
DISCHARGE = "discharge"
"""Discharge [m³/s]."""
EVAPOTRANSPIRATION = "evapotranspiration"
"""Actual evapotranspiration [mm/T]."""
GLOBAL_RADIATION = "global_radiation"
Expand Down
1 change: 1 addition & 0 deletions hydpy/data/HydPy-H-Lahn/single_run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<checkseries>true</checkseries>
<parameterstep>1d</parameterstep>
<reprdigits>6</reprdigits>
<simulationmode>historical</simulationmode>
<usecython>true</usecython>
<usedefaultvalues>false</usedefaultvalues>
<utcoffset>60</utcoffset>
Expand Down
23 changes: 23 additions & 0 deletions hydpy/docs/rst/HydPy-StatCorr.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. _HydPy-StatCorr:

HydPy-StatCorr
==============

All HydPy-StatCorr models deal with the statistical correction of simulated values
based on observed values, for example, to improve forecasts. The models are
designed for different kinds of variables, and the submodels complying with the
|OutputCorrModel_V1| interface are not restricted to a specific variable. However,
the currently available application model |statcorr_main| focuses on discharge: it
reads the simulated discharge from its inlet node(s), passes it through one or more
|OutputCorrModel_V1| submodels, and delivers the corrected discharge to its outlet
node. |statcorr_arima010| is such a submodel; it estimates the correction with an
ARIMA(0,1,0) error model, following the LARSIM approach (see https://larsim.info).

Available models:

.. toctree::
:maxdepth: 1

statcorr
statcorr_main
statcorr_arima010
1 change: 1 addition & 0 deletions hydpy/docs/rst/model_families.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ the :ref:`model_overview` section, which clarifies this distinction more clearly
HydPy-Musk
HydPy-Rconc
HydPy-Snow
HydPy-StatCorr
HydPy-SW1D
HydPy-Test
HydPy-W
Expand Down
1 change: 1 addition & 0 deletions hydpy/docs/rst/submodel_interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ available in the :ref:`model_overview` section, which covers all user-relevant m
rconcinterfaces
routinginterfaces
soilinterfaces
statcorrinterfaces
stateinterfaces
tempinterfaces
transferinterfaces
1 change: 1 addition & 0 deletions hydpy/exe/xmltools.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ def update_options(self) -> None:
>>> pub.options.parameterstep = "1h"
>>> pub.options.printprogress = True
>>> pub.options.reprdigits = -1
>>> pub.options.simulationmode = "forecast"
>>> pub.options.utcoffset = -60
>>> pub.options.threads = 4
>>> pub.options.timestampleft = False
Expand Down
36 changes: 36 additions & 0 deletions hydpy/interfaces/statcorrinterfaces.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""This module defines submodel interfaces for the statistical output correction of
simulated values (for example, discharge forecasts) based on observed values."""

from hydpy.core import modeltools
from hydpy.core.typingtools import *


class OutputCorrModel_V1(modeltools.SubmodelInterface):
"""Simple interface for the statistical output correction of simulated values."""

typeid: ClassVar[Literal[1]] = 1
"""Type identifier for |OutputCorrModel_V1| submodels."""

@modeltools.abstractmodelmethod
def set_simulatedvalue(self, simulatedvalue: float) -> None:
"""Set the simulated value."""

@modeltools.abstractmodelmethod
def set_observedvalue(self, observedvalue: float) -> None:
"""Set the observed value."""

@modeltools.abstractmodelmethod
def determine_outputcorrection(self) -> None:
"""Calculate the corrected output value."""

@modeltools.abstractmodelmethod
def is_active(self) -> bool:
"""Tell whether |OutputCorrModel_V1.determine_outputcorrection|
succeeded.
"""

@modeltools.abstractmodelmethod
def get_correctedoutput(self) -> float:
"""Get the previously calculated corrected value (which can be
the originally simulated value, if the output correction is not active).
"""
10 changes: 10 additions & 0 deletions hydpy/models/statcorr/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
The |statcorr.DOCNAME.long| base model provides features for the statistical
correction of simulated variables based on observed values.
"""

from hydpy.exe.modelimports import *
from hydpy.models.statcorr.statcorr_model import Model

tester = Tester()
cythonizer = Cythonizer()
Loading