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

#include <ProcessSublimationPrevah.h>

Inheritance diagram for ProcessSublimationPrevah:
ProcessSublimation Process

Public Member Functions

 ProcessSublimationPrevah (WaterContainer *container)
 
bool IsValid () const override
 
void AttachForcing (Forcing *forcing) override
 
bool HasConstraintPriority () const override
 
- Public Member Functions inherited from ProcessSublimation
 ProcessSublimation (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)
 
virtual void SetParameters (const ProcessSettings &processSettings)
 
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 NeedsGateBrickLinking () 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 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 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)
 

Protected Member Functions

const vecDouble & GetRates () override
 
- 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

Forcing_pet
 
Snowpack_snowpack
 
- 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
 

Detailed Description

PREVAH snow evaporation.

PREVAH evaporates snow at the (albedo-reduced) potential rate whenever snow is present (s_snoevap1.f90, default: et_snow = et_pot): S = PET * (1 - albedo)/0.8 where the albedo is the snowpack's own age-dependent snow albedo (PrevahSnowAlbedo of Snowpack::GetSnowAge, 0.4-0.85). Old (spring) snow has a low albedo, so it evaporates strongly - the dominant snow-evaporation sink. Requires PET forcing and a hydro-unit snowpack context; no evaporation when the snow container is empty.

Member Function Documentation

◆ AttachForcing()

void ProcessSublimationPrevah::AttachForcing ( Forcing * forcing)
overridevirtual

Attach forcing to the process.

Parameters
forcingforcing to attach.

Reimplemented from Process.

◆ GetRates()

const vecDouble & ProcessSublimationPrevah::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.

Implements Process.

◆ HasConstraintPriority()

bool ProcessSublimationPrevah::HasConstraintPriority ( ) const
inlinenodiscardoverridevirtual

Check if the process takes its demand from the water container with priority when the container cannot satisfy all outgoing rates. Non-priority processes then share the remaining water proportionally. Mirrors sequential (operator-split) reference models such as PREVAH, where snow evaporation is served at the full potential rate before melt.

Returns
true if the process has priority on the container constraints.

PREVAH serves snow evaporation sequentially BEFORE melt, so it gets the full potential rate even on days the pack drains completely; melt only takes what remains.

Reimplemented from Process.

◆ IsValid()

bool ProcessSublimationPrevah::IsValid ( ) const
nodiscardoverridevirtual

Check that everything is correctly defined.

Returns
true if everything is correctly defined.

Reimplemented from ProcessSublimation.

◆ RegisterProcessSettings()

void ProcessSublimationPrevah::RegisterProcessSettings ( SettingsModel * modelSettings)
static

Register the process parameters and forcing in the settings model.

Parameters
modelSettingsThe settings model to register the parameters in.

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