soilinterfaces

This module defines submodel interfaces for soil-related processes.

Module soilinterfaces implements the following members:

  • SoilModel_V1 Soil submodel interface for calculating infiltration and percolation in multiple soil compartments.


class hydpy.interfaces.soilinterfaces.SoilModel_V1[source]

Bases: SubmodelInterface

Soil submodel interface for calculating infiltration and percolation in multiple soil compartments.

SoilModel_V1 is for submodels that update their states internally. If the submodel calculates infiltration and percolation based on the given soil surface water supply, it also adjusts its soil moisture content. Hence, it offers a method for getting the current soil water content (get_soilwatercontent()) but not for setting it.

The reason for implementing SoilModel_V1 was to couple lland with ga_garto, as discussed in issue 89.

All units in mm or mm/T. The method parameter “k” is the index of the considered soil compartment.

typeid: ClassVar[Literal[1]] = 1

Type identifier for SoilModel_V1 submodels.

prepare_nmbzones(nmbzones: int) None[source]

Set the number of zones in which the actual calculations take place.

set_initialsurfacewater(k: int, v: float) None[source]

Set the surface water depth initially ponded at the soil’s surface.

If the caller subtracts a fraction from the water reaching the surface before executing execute_infiltration(), he should pass the original (unreduced) water amount to set_initialsurfacewater().

set_actualsurfacewater(k: int, v: float) None[source]

Set the surface water depth that is actually available for infiltration.

If the caller subtracts a fraction from the water reaching the surface before executing execute_infiltration(), he should pass the resulting (reduced) water amount to set_actualsurfacewater().

set_soilwatersupply(k: int, v: float) None[source]

Set the direct water supply to the soil’s body (e.g. due to capillary rise).

set_soilwaterdemand(k: int, v: float) None[source]

Set the direct water demand from the soil’s body (e.g. due to evapotranspiration).

execute_infiltration(k: int) None[source]

Execute the infiltration routine (that might also calculate percolation) based on the given surface water supply.

add_soilwater(k: int) None[source]

Add the given (direct) soil water supply.

remove_soilwater(k: int) None[source]

Remove the given (direct) soil water demand.

get_infiltration(k: int) float[source]

Get the previously calculated infiltration rate.

get_percolation(k: int) float[source]

Get the previously calculated percolation rate.

get_soilwateraddition(k: int) float[source]

Get the previously calculated actual soil water addition.

get_soilwaterremoval(k: int) float[source]

Get the previously calculated actual soil water removal.

get_soilwatercontent(k: int) float[source]

Get the current soil water content.