2.0.0b10
catchment modelling framework
|
This class is the basic landscape object. More...
This class is the basic landscape object.
It is the owner of water storages, and the upper and lower boundary conditions of the system (rainfall, atmospheric vapor, deep groundwater)
Public Member Functions | |
Saturation | |
void | InvalidateSatDepth () const |
Marks the saturated depth as unvalid. This is done automatically, when the state of a layer changes. | |
real | get_saturated_depth () const |
Returns the potential \(\Psi_{total}\) of the deepest unsaturated layer as distance from the surface. | |
void | set_saturated_depth (real depth) |
Sets the potential \(\Psi_{total}\) of each layer as distance from the surface. | |
Flux nodes of the cell | |
cmf::upslope::vegetation::Vegetation | vegetation |
The vegetation object of the cell. | |
cmf::atmosphere::Meteorology & | get_meteorology () const |
Returns the meteorological data source. | |
void | set_aerodynamic_resistance (cmf::atmosphere::aerodynamic_resistance::ptr Ra) |
Sets the method to calculate aerodynamic resistance against turbulent sensible heat fluxes. | |
void | set_meteorology (const cmf::atmosphere::Meteorology &new_meteo) |
Sets a meteorological data source. | |
void | set_weather (const cmf::atmosphere::Weather &weather) |
Sets the weather for this cell. Connectivity to a meteorological station is lost. | |
void | set_rainfall (double rainfall) |
Exchanges a timeseries of rainfall with a constant flux. | |
double | get_rainfall (cmf::math::Time t) const |
Returns the current rainfall flux in m3/day. | |
void | set_rain_source (cmf::atmosphere::RainSource::ptr new_source) |
Changes the current source of rainfall. | |
cmf::atmosphere::RainSource::ptr | get_rain_source () |
Returns the current source for rainfall. | |
void | set_uptakestress (const cmf::upslope::ET::RootUptakeStressFunction &stressfunction) |
Uses the given WaterStressFunction for all stressedET like connections to the transpiration target. | |
cmf::water::flux_node::ptr | get_evaporation () |
Returns the end point of all evaporation of this cell (a cmf::water::flux_node) | |
cmf::water::flux_node::ptr | get_transpiration () |
Returns the end point of all transpiration of this cell (a cmf::water::flux_node) | |
cmf::water::flux_node::ptr | get_surfacewater () |
returns the surface water of this cell. This is either a flux node or a cmf::upslope::SurfaceWater | |
surfacewater_ptr | surfacewater_as_storage () |
Makes the surfacewater of this cell a cmf::upslope::SurfaceWater storage. | |
cmf::water::WaterStorage::ptr | add_storage (std::string Name, char storage_role='N', bool isopenwater=false) |
Adds a new storage to the cell. | |
ptrdiff_t | add_storage (cmf::water::WaterStorage::ptr storage) |
Bounds an existing storage to the cell. | |
real | surface_water_coverage () const |
Returns the coverage of the surface water. | |
real | heat_flux (cmf::math::Time t) const |
Calculates the surface heat balance. | |
real | leave_wetness () const |
Return the fraction of wet leaves in the canopy if a canopy water storage exists. | |
cmf::atmosphere::Weather | get_weather (cmf::math::Time t) const |
Returns the current meteorological conditions of the cell at time t. | |
Location | |
cmf::geometry::point | get_position () const |
Returns the location of the cell. | |
double | get_area () const |
Returns the area of the cell. | |
double | m3_to_mm (double volume) const |
Converts a volume in m3 in mm for the cell area. | |
Layers | |
size_t | layer_count () const |
Returns the number of layers of the cell. | |
cmf::upslope::SoilLayer::ptr | get_layer (ptrdiff_t ndx) const |
Returns the layer at position ndx. | |
const layer_list & | get_layers () const |
Returns the list of layers. | |
cmf::upslope::SoilLayer::ptr | add_layer (real lowerboundary, const cmf::upslope::RetentionCurve &r_curve, real saturateddepth=10) |
Adds a layer to the cell. | |
cmf::upslope::SoilLayer::ptr | add_layer (real lowerboundary) |
Adds a rather conceptual layer to the cell. Use this version for conceptual models. The retention curve resambles an empty bucket. | |
void | remove_last_layer () |
Remove the lowest layer from this cell. | |
void | remove_layers () |
Removes all layers from this cell. | |
double | get_soildepth () const |
Returns the lower boundary of the lowest layer in m. | |
cmf::upslope::SoilLayer::ptr add_layer | ( | real | lowerboundary, |
const cmf::upslope::RetentionCurve & | r_curve, | ||
real | saturateddepth = 10 ) |
Adds a layer to the cell.
Layers are created using this function
lowerboundary | The maximum depth of the layer in m. If lowerboundary is smaller or equal than the lowerboundary of thelowest layer, an error is raised |
r_curve | A retention curve. See here for a discussion on retention curves in cmf. |
saturateddepth | The initial potential of the new layer in m below surface. Default = 10m (=quite dry) |
cmf::water::WaterStorage::ptr add_storage | ( | std::string | Name, |
char | storage_role = 'N', | ||
bool | isopenwater = false ) |
Adds a new storage to the cell.
Name | The name of the storage |
storage_role | A shortcut to describe the functional role of the storage new storage. Possible Values:
|
isopenwater | If true, an open water storage with a cmf::river::Prism height function is created |
cmf::upslope::SoilLayer::ptr get_layer | ( | ptrdiff_t | ndx | ) | const |
Returns the layer at position ndx.
From python this function is masked as a sequence:
const layer_list & get_layers | ( | ) | const |
Returns the list of layers.
From python this function is masked as a property:
real get_saturated_depth | ( | ) | const |
Returns the potential \(\Psi_{total}\) of the deepest unsaturated layer as distance from the surface.
This function is wrapped as the property saturated_depth
in Python
real heat_flux | ( | cmf::math::Time | t | ) | const |
Calculates the surface heat balance.
t | Time step |
real leave_wetness | ( | ) | const |
Return the fraction of wet leaves in the canopy if a canopy water storage exists.
If no canopy storage is present, it returns 0.0 (=empty). The fraction of wet leaves are calculated as the linear filling of the canopy storage.
void set_saturated_depth | ( | real | depth | ) |
Sets the potential \(\Psi_{total}\) of each layer as distance from the surface.
This function is wrapped as the property saturated_depth
in Python
real surface_water_coverage | ( | ) | const |
Returns the coverage of the surface water.
The covered fraction (0..1) is simply modelled as a piecewise linear function of the surface water depth. If the depth is above the aggregate height, the coverage is 1, below it is given as
\[ c = \frac{h_{water}}{\Delta h_{surface}}\]
with c the coverage, \(h_{water}\) the depth of the surface water and \(\Delta h_{surface}\) the amplitude of the surface roughness