hydrobricks
Loading...
Searching...
No Matches
ProcessETWetSurfacePrevah Class Reference

#include <ProcessETWetSurfacePrevah.h>

Inheritance diagram for ProcessETWetSurfacePrevah:
ProcessETOpenWaterPrevah ProcessETOpenWater ProcessET Process

Public Member Functions

 ProcessETWetSurfacePrevah (WaterContainer *container)
 
bool IsValid () const override
 
bool NeedsGateBrickLinking () const override
 
void AddGateBrick (Brick *brick) override
 
double GetWetShare () const
 
- Public Member Functions inherited from ProcessETOpenWaterPrevah
 ProcessETOpenWaterPrevah (WaterContainer *container)
 
void SetParameters (const ProcessSettings &processSettings) override
 
- Public Member Functions inherited from ProcessETOpenWater
 ProcessETOpenWater (WaterContainer *container)
 
void AttachForcing (Forcing *forcing) override
 
- Public Member Functions inherited from ProcessET
 ProcessET (WaterContainer *container)
 
int GetConnectionCount () const override
 
double * GetValuePointer (std::string_view name) override
 
bool ToAtmosphere () const override
 
- Public Member Functions inherited from Process
 Process (WaterContainer *container)
 
virtual void Reset ()
 
virtual void Validate () const
 
const float * GetParameterValuePointer (const ProcessSettings &processSettings, std::string_view name)
 
void SetParentContext (HydroUnit *unit, Brick *brick)
 
virtual void SetHydroUnitProperties (HydroUnit *unit, Brick *brick)
 
void AttachFluxOut (std::unique_ptr< Flux > flux)
 
int GetOutputFluxCount () const
 
FluxGetOutputFlux (size_t index) const
 
virtual bool RequiresDailyTimeStep () const
 
virtual bool NeedsTargetBrickLinking () const
 
virtual bool HasConstraintPriority () const
 
virtual const vecDouble & GetChangeRates ()
 
virtual void StoreInOutgoingFlux (double *rate, int index)
 
void ApplyChange (int connectionIndex, double rate, double timeStepInDays)
 
virtual void Finalize ()
 
virtual vecDoublePt GetStateVariables ()
 
const string & GetName () const
 
void SetName (const string &name)
 
void SetTimeMachine (TimeMachine *timeMachine)
 
WaterContainerGetWaterContainer () const
 
virtual void SetTargetBrick (Brick *)
 
virtual bool LinksMultipleTargets () const
 
virtual void AddTargetBrickWithWeights (Brick *, const std::vector< Brick * > &)
 
virtual bool IsLateralProcess () const noexcept
 
virtual bool HasLinearResponse () const
 
virtual double GetLinearResponseRate () const
 
virtual double GetLinearResponseOffset () const
 
bool HasOutputFluxes () const noexcept
 
bool HasWaterContainer () const noexcept
 

Protected Member Functions

const vecDouble & GetRates () override
 
- Protected Member Functions inherited from ProcessETOpenWaterPrevah
- Protected Member Functions inherited from ProcessETOpenWater
- Protected Member Functions inherited from Process
double GetForcingRate (Forcing *forcing) const
 
double GetTimeStepInDays () const
 
int GetCurrentDayOfYear () const
 
const vecDouble & StoreRates (std::initializer_list< double > rates)
 
double GetSumChangeRatesOtherProcesses () const
 

Protected Attributes

vector< LandCover * > _wetlands
 
vector< ProcessOutflowSplit * > _wetSplits
 
- Protected Attributes inherited from ProcessETOpenWaterPrevah
const float * _albedoLand
 
const float * _etFactor {nullptr}
 
- Protected Attributes inherited from ProcessETOpenWater
Forcing_pet
 
- Protected Attributes inherited from Process
string _name
 
WaterContainer_container
 
TimeMachine_timeMachine {nullptr}
 
HydroUnit_hydroUnit {nullptr}
 
string _parentBrickName
 
std::vector< std::unique_ptr< Flux > > _outputs
 
vecDouble _changeRates
 

Additional Inherited Members

- Static Public Member Functions inherited from ProcessETOpenWaterPrevah
static void RegisterProcessSettings (SettingsModel *modelSettings)
 
- Static Public Member Functions inherited from ProcessETOpenWater
static void RegisterProcessSettings (SettingsModel *modelSettings)
 
- Static Public Member Functions inherited from Process
static std::unique_ptr< ProcessFactory (const ProcessSettings &processSettings, Brick *brick)
 
static bool RegisterSettings (SettingsModel *modelSettings, const string &processType)
 
static bool HasParameter (const ProcessSettings &processSettings, std::string_view name)
 

Detailed Description

PREVAH wet-surface evaporation, drawn from a groundwater store.

PREVAH evaporates its wet surfaces at et_pot * wet_surface from the groundwater, where wet_surface is the share of the hydrotope that is water or saturated (0.7 for wetlands). The same share routes the input of the wet surface directly to the groundwater. Here the wet share of the hydro unit is derived from its wetland land covers (the gate bricks): each contributes its live area fraction times its wet fraction, read from the split process that routes its input to the groundwater: wet = sum_c fraction_c * wet_fraction_c Ea = min(et_factor * wet * PET * (1 - albedo)/0.8, content / dt)

A unit without any wetland area therefore evaporates nothing, the wet share follows a calibrated wet_fraction and tracks land cover changes. The et_factor parameter (default 1) remains as an overall scaling. Requires a hydro-unit context and at least one gate brick (a wetland land cover whose input is split by 'outflow:split').

Member Function Documentation

◆ AddGateBrick()

void ProcessETWetSurfacePrevah::AddGateBrick ( Brick * brick)
overridevirtual

Add a gate brick to the process (read-only state access; no flux). Called once per gate brick; a process reading several aggregates their states.

Parameters
brickgate brick.

The gate brick must be a wetland land cover carrying an 'outflow:split' process, whose split fraction is the wet fraction of the cover.

Reimplemented from Process.

◆ GetRates()

const vecDouble & ProcessETWetSurfacePrevah::GetRates ( )
overrideprotectedvirtual

Get the rates of the process.

Implementations must store their result via StoreRates() (or directly in the _changeRates buffer) and return the reference, to avoid allocating on the hot path.

Returns
reference to the reusable buffer holding the rates.

Reimplemented from ProcessETOpenWaterPrevah.

◆ GetWetShare()

double ProcessETWetSurfacePrevah::GetWetShare ( ) const
nodiscard

Get the wet share of the hydro unit: the sum over the wetland covers of their area fraction times their wet fraction.

Returns
the wet share of the hydro unit [-].

◆ IsValid()

bool ProcessETWetSurfacePrevah::IsValid ( ) const
nodiscardoverridevirtual

Check that everything is correctly defined.

Returns
true if everything is correctly defined.

Reimplemented from ProcessETOpenWaterPrevah.

◆ NeedsGateBrickLinking()

bool ProcessETWetSurfacePrevah::NeedsGateBrickLinking ( ) const
inlinenodiscardoverridevirtual

Check if the process needs to link a gate brick (a brick whose state modulates the process rate without receiving its flux, e.g. the soil moisture store gating the PREVAH percolation).

Returns
true if the process needs to link a gate brick.

Reimplemented from Process.


The documentation for this class was generated from the following files: