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

#include <ProcessRefreezeDegreeDay.h>

Inheritance diagram for ProcessRefreezeDegreeDay:
ProcessTransform Process

Public Member Functions

 ProcessRefreezeDegreeDay (WaterContainer *container)
 
bool IsValid () const override
 
void SetParameters (const ProcessSettings &processSettings) override
 
void AttachForcing (Forcing *forcing) override
 
- Public Member Functions inherited from ProcessTransform
 ProcessTransform (WaterContainer *container)
 
bool IsValid () const override
 
int GetConnectionCount () const override
 
double * GetValuePointer (std::string_view name) override
 
- Public Member Functions inherited from Process
 Process (WaterContainer *container)
 
virtual void Reset ()
 
virtual void Validate () const
 
virtual void SetHydroUnitProperties (HydroUnit *unit, Brick *brick)
 
void AttachFluxOut (std::unique_ptr< Flux > flux)
 
int GetOutputFluxCount () const
 
FluxGetOutputFlux (size_t index) const
 
virtual bool ToAtmosphere () const
 
virtual bool NeedsTargetBrickLinking () const
 
virtual 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
 
bool HasOutputFluxes () const noexcept
 
bool HasWaterContainer () const noexcept
 

Static Public Member Functions

static void RegisterProcessSettings (SettingsModel *modelSettings)
 
- Static Public Member Functions inherited from ProcessTransform
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)
 
static const float * GetParameterValuePointer (const ProcessSettings &processSettings, std::string_view name)
 

Protected Member Functions

vecDouble GetRates () override
 
- Protected Member Functions inherited from Process
double GetSumChangeRatesOtherProcesses () const
 

Protected Attributes

Forcing_temperature
 
const float * _refreezingFactor
 
- Protected Attributes inherited from Process
string _name
 
WaterContainer_container
 
TimeMachine_timeMachine {nullptr}
 
std::vector< std::unique_ptr< Flux > > _outputs
 

Detailed Description

Degree-day refreezing of the snowpack liquid water (HBV; Lindström et al., 1997).

Lives on the water container of a snowpack brick (requires snowpacks generated with water retention) and refreezes the retained liquid water back to snow when the air temperature is below the melting temperature: RF = cfr × cfmax × (TT − T) for T < TT

The degree-day factor (cfmax) and the melting temperature (TT) are read from the melt:degree_day process of the same brick, so that melt and refreeze stay consistent; only the dimensionless refreezing coefficient cfr is a parameter of this process. The output flux must target the same brick with the snow content type (e.g. 'ground_snowpack:snow').

Member Function Documentation

◆ AttachForcing()

void ProcessRefreezeDegreeDay::AttachForcing ( Forcing * forcing)
overridevirtual

Attach forcing to the process.

Parameters
forcingforcing to attach.

Reimplemented from Process.

◆ GetRates()

vecDouble ProcessRefreezeDegreeDay::GetRates ( )
overrideprotectedvirtual

Get the rates of the process.

Returns
vector of rates.

Implements Process.

◆ IsValid()

bool ProcessRefreezeDegreeDay::IsValid ( ) const
nodiscardoverridevirtual

Check that everything is correctly defined.

Returns
true if everything is correctly defined.

Implements Process.

◆ RegisterProcessSettings()

void ProcessRefreezeDegreeDay::RegisterProcessSettings ( SettingsModel * modelSettings)
static

Register the process parameters and forcing in the settings model.

Parameters
modelSettingsThe settings model to register the parameters in.

◆ SetParameters()

void ProcessRefreezeDegreeDay::SetParameters ( const ProcessSettings & processSettings)
overridevirtual

Assign the parameters to the process.

Parameters
processSettingssettings of the process containing the parameters.

Reimplemented from Process.


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