Exemplo n.º 1
0
class WATS(lland_sequences.State1DSequence):
    """Wasseräquivalent Trockenschnee auf der Bodenoberfläche (frozen water equivalent
    of the snow cover) [mm]."""

    NDIM, NUMERIC, SPAN = 1, False, (0.0, None)
    mask = lland_masks.Land()

    def trim(self, lower=None, upper=None):
        """Trim values in accordance with :math:`WAeS \\leq PWMax \\cdot WATS`,
        or at least in accordance with if :math:`WATS \\geq 0`.

        >>> from hydpy.models.lland import *
        >>> parameterstep("1d")
        >>> nhru(7)
        >>> pwmax(2.0)
        >>> states.waes = -1., 0., 1., -1., 5., 10., 20.
        >>> states.wats(-1., 0., 0., 5., 5., 5., 5.)
        >>> states.wats
        wats(0.0, 0.0, 0.5, 5.0, 5.0, 5.0, 10.0)
        """
        pwmax = self.subseqs.seqs.model.parameters.control.pwmax
        waes = self.subseqs.waes
        if lower is None:
            lower = numpy.clip(waes / pwmax, 0.0, numpy.inf)
            lower[numpy.isnan(lower)] = 0.0
        super().trim(lower, upper)
Exemplo n.º 2
0
class NetRadiationSnow(lland_sequences.Flux1DSequence):
    """Total net radiation for snow-surfaces [W/m²].

    With positive values, the snow-layer gains heat from radiation.
    """

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 3
0
class NetShortwaveRadiationSnow(lland_sequences.Flux1DSequence):
    """Kurzwellige Netto-Strahlungsbilanz für Schneeoberflächen (net shortwave
    radiation for snow surfaces) [W/m²].

    With positive values, the soil gains heat from radiation.
    """

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 4
0
class WSurf(lland_sequences.Flux1DSequence):
    """Wärmestrom von der Schneedecke zur Schneeoberfläche (heat flux from
    the snow layer to the snow surface) [W/m²].

    With positive values, the snow-layer looses heat to the atmosphere.
    """

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 5
0
class TauS(lland_sequences.State1DSequence):
    """Dimensionsloses Alter der Schneedecke (dimensionless age of the snow
    layer) [-].

    If there is no snow-layer, the value of |TauS| is |numpy.nan|.
    """

    NDIM, NUMERIC, SPAN = 1, False, (0.0, None)
    mask = lland_masks.Land()
Exemplo n.º 6
0
class WLatSnow(lland_sequences.Flux1DSequence):
    """Latente Wärmestrom Schnee/Atmosphäre (latent heat flux between
    the snow-layer and the atmosphere) [MJ/m²].

    With positive values, the snow-layer looses heat to the atmosphere.
    """

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 7
0
class WNied(lland_sequences.Flux1DSequence):
    """Niederschlagsbedingter Wärmestrom in die Schneedecke (heat flux
    into the snow layer due to precipitation) [W/m²].

    With positive values, the snow layer gains heat from precipitation.
    """

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 8
0
class WG(lland_sequences.Flux1DSequence):
    """ "Dynamischer" Bodenwärmestrom ("dynamic" soil heat flux) [W/m²].

    With positive values, the soil looses heat to the atmosphere or the
    snow-layer.
    """

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 9
0
class WSensSnow(lland_sequences.Flux1DSequence):
    """Fühlbare Wärmestrom Schnee/Atmosphäre (sensible heat flux between
    the snow-layer and the atmosphere) [W/m²].

    With positive values, the snow-layer looses heat to the atmosphere.
    """

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 10
0
class TempSSurface(lland_sequences.Flux1DSequence):
    """Schneetemperatur an der Schneeoberfläche (the snow temperature at the
    snow surface) [°C].

    Note that the value of sequence |TempSSurface| is |numpy.nan| for
    snow-free surfaces.
    """

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 11
0
class WGTF(lland_sequences.Flux1DSequence):
    """Mit dem Grad-Tag-Verfahren berechneter Wärmeestrom in die Schneedecke
    (heat flux into the snow layer calculated with the degree-day method)
    [W/m²].

    With positive values, the snow layer gains heat from the atmosphere and
    from radiation.
    """

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 12
0
class Inzp(lland_sequences.State1DSequence):
    """Interzeptionsspeicherung (interception storage) [mm].

    Note that |Inzp| of HydPy-L implements no specialized trim method
    (as opposed to |hland_states.Ic| of |hland|).  This is due the
    discontinuous evolution of |KInz| in time.  In accordance with the
    original LARSIM implementation, |Inzp| can be temporarily overfilled
    during rain periods whenever |KInz| drops rapidly between two months.
    A specialized trim method would just make the excess water vanish.
    But in HydPy-L, the excess water becomes |NBes| in the first
    simulation step of the new month.
    """
    NDIM, NUMERIC, SPAN = 1, False, (0., None)
    mask = lland_masks.Land()
Exemplo n.º 13
0
class WAeS(lland_sequences.State1DSequence):
    """Wasseräquivalent Gesamtschnee (total water equivalent of the snow
    cover) [mm]."""
    NDIM, NUMERIC, SPAN = 1, False, (0., None)
    mask = lland_masks.Land()

    def trim(self, lower=None, upper=None):
        """Trim values in accordance with :math:`WAeS \\leq PWMax \\cdot WATS`.

        >>> from hydpy.models.lland import *
        >>> parameterstep('1d')
        >>> nhru(7)
        >>> pwmax(2.)
        >>> states.wats = 0., 0., 0., 5., 5., 5., 5.
        >>> states.waes(-1., 0., 1., -1., 5., 10., 20.)
        >>> states.waes
        waes(0.0, 0.0, 0.0, 0.0, 5.0, 10.0, 10.0)
        """
        pwmax = self.subseqs.seqs.model.parameters.control.pwmax
        wats = self.subseqs.wats
        if upper is None:
            upper = pwmax * wats
        super().trim(lower, upper)
Exemplo n.º 14
0
class ParameterLand(ParameterComplete):
    """Base class for 1-dimensional parameters relevant for all hydrological
    response units except those of type |WASSER|, |FLUSS|, and |SEE|.

    |ParameterLand| works similar to |lland_parameters.ParameterComplete|.
    Some examples based on parameter |TGr|:

    >>> from hydpy.models.lland import *
    >>> parameterstep('1d')
    >>> nhru(5)
    >>> lnk(WASSER, ACKER, FLUSS, VERS, ACKER)
    >>> tgr(wasser=2.0, acker=1.0, fluss=4.0, vers=3.0)
    >>> tgr
    tgr(acker=1.0, vers=3.0)
    >>> tgr(acker=2.0, default=8.0)
    >>> tgr
    tgr(acker=2.0, vers=8.0)
    >>> derived.absfhru(nan, 1.0, nan, 1.0, 1.0)
    >>> from hydpy import round_
    >>> round_(tgr.average_values())
    4.0
    """
    mask = lland_masks.Land()
Exemplo n.º 15
0
class AerodynamicResistance(lland_sequences.Flux1DSequence):
    """Aerodynamischer Widerstand (aerodynamic resistance) [s/m]."""

    NDIM, NUMERIC, SPAN = 1, False, (0.0, None)
    mask = lland_masks.Land()
Exemplo n.º 16
0
class Gefr(lland_sequences.Flux1DSequence):
    """Tatsächliche Schnee-Wiedergefrieren (actual amount of water
    refreezing within the snow cover) [mm/T]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 17
0
class GefrPot(lland_sequences.Flux1DSequence):
    """Potentielles Schnee-Wiedergefrieren (potential amount of water
    refreezing within the snow cover) [mm/T]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 18
0
class Schm(lland_sequences.Flux1DSequence):
    """Tatsächliche Schneeschmelze (actual amount of water melting within the
    snow cover) [mm/T]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 19
0
class SchmPot(lland_sequences.Flux1DSequence):
    """Potentielle Schneeschmelze (potential amount of water melting within the
    snow cover) [mm/T]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 20
0
class ASInz(lland_sequences.State1DSequence):
    """Dimensionsloses Alter der Schneedecke des Interzeptionsspeichers."""

    NDIM, NUMERIC, SPAN = 1, False, (0.0, None)
    mask = lland_masks.Land()
Exemplo n.º 21
0
class ESnow(lland_sequences.State1DSequence):
    """Thermischer Energieinhalt der Schneedecke bezogen auf 0°C (thermal
    energy content of the snow layer with respect to 0°C) [WT/m²]."""

    NDIM, NUMERIC, SPAN = 1, False, (None, None)
    mask = lland_masks.Land()
Exemplo n.º 22
0
class EvS(lland_sequences.Flux1DSequence):
    """Tatsächliche Schneeverdunstung (actual evaporation of snow-water) [mm/T]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 23
0
class EvB(lland_sequences.Flux1DSequence):
    """Tatsächliche Verdunstung von Bodenwasser (actual evaporation of soil
    water) [mm/T]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 24
0
class SBes(lland_sequences.Flux1DSequence):
    """Schneeanteil Bestandsniederschlag (frozen stand precipitation) [mm/T]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 25
0
class NBes(lland_sequences.Flux1DSequence):
    """Gesamter Bestandsniederschlag (total stand precipitation) [mm/T]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 26
0
class EBdn(lland_sequences.State1DSequence):
    """Energiegehalt des Bodenwassers (energy content of the soil water)
    [WT/m²]."""

    NDIM, NUMERIC, SPAN = 1, False, (None, None)
    mask = lland_masks.Land()
Exemplo n.º 27
0
class SaturationVapourPressureSnow(lland_sequences.Flux1DSequence):
    """Saturation vapour pressure snow [hPa]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 28
0
class TZ(lland_sequences.Flux1DSequence):
    """Bodentemperatur in der Tiefe z (soil temperature at depth z) [°C]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 29
0
class WaDa(lland_sequences.Flux1DSequence):
    """Wasserdargebot (water reaching the soil routine) [mm/T]."""

    NDIM, NUMERIC = 1, False
    mask = lland_masks.Land()
Exemplo n.º 30
0
class ActualSurfaceResistance(lland_sequences.Flux1DSequence):
    """Oberflächenwiderstand (surface resistance) [s/m]."""

    NDIM, NUMERIC, SPAN = 1, False, (0.0, None)
    mask = lland_masks.Land()