|
hydrobricks
|
#include <ProcessETPrevah.h>
Public Member Functions | |
| ProcessETPrevah (WaterContainer *container) | |
| bool | IsValid () const override |
| void | SetParameters (const ProcessSettings &processSettings) override |
Public Member Functions inherited from ProcessETHBV | |
| ProcessETHBV (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 |
| Flux * | GetOutputFlux (size_t index) const |
| virtual bool | RequiresDailyTimeStep () const |
| virtual bool | NeedsTargetBrickLinking () const |
| virtual bool | NeedsGateBrickLinking () 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) |
| WaterContainer * | GetWaterContainer () const |
| virtual void | SetTargetBrick (Brick *) |
| virtual void | AddGateBrick (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 |
Static Public Member Functions | |
| static void | RegisterProcessSettings (SettingsModel *modelSettings) |
Static Public Member Functions inherited from ProcessETHBV | |
| static void | RegisterProcessSettings (SettingsModel *modelSettings) |
Static Public Member Functions inherited from Process | |
| static std::unique_ptr< Process > | Factory (const ProcessSettings &processSettings, Brick *brick) |
| static bool | RegisterSettings (SettingsModel *modelSettings, const string &processType) |
| static bool | HasParameter (const ProcessSettings &processSettings, std::string_view name) |
Protected Member Functions | |
| const vecDouble & | GetRates () override |
Protected Member Functions inherited from ProcessETHBV | |
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 | |
| const float * | _albedoLand |
Protected Attributes inherited from ProcessETHBV | |
| Forcing * | _pet |
| const float * | _lp |
| const float * | _etCorrectionFactor |
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 |
PREVAH actual evapotranspiration: the HBV soil-moisture limitation with the PREVAH snow-albedo reduction of the potential rate.
PREVAH's PET carries a (1 - albedo)/0.8 term: over snow (albedo ~0.7-0.8) the potential evaporation drops to ~0.25-0.4x, which also acts as the ET-under-snow suppression. Here the albedo is derived at runtime rom the hydro unit's snowpacks: the snow-covered fraction is the sum of the parent land-cover fractions of the snowpacks currently holding snow, and the albedo interpolates between the snow-free and snow albedo accordingly: snowfrac = sum_c fraction_c * (SWE_c > 0) albedo = albedo_land + snowfrac * (albedo_snow - albedo_land) Ea = cevpf * PET * (1 - albedo)/0.8 * min(SM / (LP * FC), 1)
With no snow (and the default albedo_land = 0.2) the factor is exactly 1, so the process then behaves identically to 'et:hbv'. Requires a hydro-unit context (the process must live on a hydro-unit brick, e.g. the soil moisture store).
|
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.
Reimplemented from ProcessETHBV.
|
nodiscardoverridevirtual |
Check that everything is correctly defined.
Reimplemented from ProcessETHBV.
|
static |
Register the process parameters and forcing in the settings model.
| modelSettings | The settings model to register the parameters in. |
|
overridevirtual |
Assign the parameters to the process.
| processSettings | settings of the process containing the parameters. |
Reimplemented from ProcessETHBV.