|
|
std::unique_ptr< SnowContainer > | _snow |
| |
|
double | _snowAge = 0 |
| |
|
double | _initialSnowAge = 0 |
| |
|
double | _snowfallInput = 0 |
| |
|
LandCover * | _parent |
| |
|
double | _areaFraction |
| |
|
string | _name |
| |
|
bool | _needsSolver |
| |
|
BrickCategory | _category |
| |
|
std::unique_ptr< WaterContainer > | _water |
| |
|
std::vector< std::unique_ptr< Process > > | _processes |
| |
|
HydroUnit * | _hydroUnit |
| |
|
|
static constexpr double | kFreshSnowfallRate = 0.01 |
| |
|
static constexpr double | kEmptySnowContent = 0.01 |
| |
◆ ApplyConstraints()
| void Snowpack::ApplyConstraints |
( |
double | timeStep | ) |
|
|
overridevirtual |
Apply the constraints to the water container.
- Parameters
-
| timeStep | time step for the simulation. |
Reimplemented from Brick.
◆ AttachFluxIn()
| void Snowpack::AttachFluxIn |
( |
Flux * | flux | ) |
|
|
overridevirtual |
Attach incoming flux (non-owning; caller retains ownership).
- Parameters
-
| flux | incoming flux (non-owning reference, owned by process) |
Reimplemented from Brick.
◆ Finalize()
| void Snowpack::Finalize |
( |
| ) |
|
|
overridevirtual |
Finalize the water transfer.
Reimplemented from Brick.
◆ GetContent()
| double Snowpack::GetContent |
( |
ContentType | type | ) |
const |
|
nodiscardoverridevirtual |
Get the content of the water container.
- Parameters
-
| type | the type of content to get. |
- Returns
- the content of the water container.
Reimplemented from Brick.
◆ GetDynamicContentChanges()
| vecDoublePt Snowpack::GetDynamicContentChanges |
( |
| ) |
|
|
overridevirtual |
Get pointers to the state variables.
- Returns
- vector of pointers to the state variables.
Reimplemented from Brick.
◆ GetSnowAge()
| double Snowpack::GetSnowAge |
( |
| ) |
const |
|
nodiscard |
Get the age of the snow surface since the last snowfall. The age (in days) is reset on snowfall and when the snowpack is empty, and incremented by the time step length each step the snow persists. Used by age-dependent albedo parameterizations (e.g. PrevahSnowAlbedo).
- Returns
- the snow surface age [d].
◆ GetSnowContainer()
Get the snow container.
- Returns
- A pointer to the snow container.
◆ GetValuePointer()
| double * Snowpack::GetValuePointer |
( |
std::string_view | name | ) |
|
|
overridevirtual |
Get the pointer to a state value specific to this brick type. The base implementation returns nullptr; land cover bricks override it to expose their own container (e.g. the snow content for a snowpack or the ice content for a glacier).
- Parameters
-
| name | name of the value (e.g., "snow", "ice"). |
- Returns
- pointer to the value, or nullptr if the name is not recognized.
Reimplemented from Brick.
◆ HasSnow()
| bool Snowpack::HasSnow |
( |
| ) |
const |
|
nodiscard |
Check if the snowpack has snow.
- Returns
- True if the snowpack has snow, false otherwise.
◆ IsValid()
| bool Snowpack::IsValid |
( |
bool | checkProcesses = true | ) |
const |
|
nodiscardoverridevirtual |
Check that everything is correctly defined.
- Returns
- true if everything is correctly defined.
Reimplemented from Brick.
◆ Reset()
Reset the brick to its initial state.
Reimplemented from Brick.
◆ ResetInputBooking()
| void Snowpack::ResetInputBooking |
( |
| ) |
|
|
overridevirtual |
◆ SaveAsInitialState()
| void Snowpack::SaveAsInitialState |
( |
| ) |
|
|
overridevirtual |
Save the current state of the brick as the initial state.
Reimplemented from Brick.
◆ SetInitialState()
| void Snowpack::SetInitialState |
( |
double | value, |
|
|
ContentType | type ) |
|
overridevirtual |
Set the initial state of the water container.
- Parameters
-
| value | initial state value. |
| type | type of the content. |
Reimplemented from Brick.
◆ SetParameters()
| void Snowpack::SetParameters |
( |
const BrickSettings & | brickSettings | ) |
|
|
overridevirtual |
Assign the parameters to the brick element.
- Parameters
-
| brickSettings | settings of the brick containing the parameters. |
Reimplemented from Brick.
◆ UpdateContent()
| void Snowpack::UpdateContent |
( |
double | value, |
|
|
ContentType | type ) |
|
overridevirtual |
Update the content of the water container.
- Parameters
-
| value | new content value. |
| type | type of the content |
Reimplemented from Brick.
◆ UpdateContentFromInputs()
| void Snowpack::UpdateContentFromInputs |
( |
double | timeStepInDays = 1.0 | ) |
|
|
overridevirtual |
Update the content of the water container from the inputs.
Reimplemented from Brick.
The documentation for this class was generated from the following files:
- /github/workspace/core/src/bricks/Snowpack.h
- /github/workspace/core/src/bricks/Snowpack.cpp