Node
- class cosipy.cpkernel.node.Node(*args, **kwargs)[source]
Bases:
NodeA
Nodeclass stores a layer’s state variables.A node stores the information of an individual layer. The class provides various setter/getter functions to read or overwrite the state of an individual layer.
- height
Layer height [m].
- Type:
float
- snow_density
Layer snow density [kg m -3].
- Type:
float
- temperature
temperature [K].
- Type:
float
- liquid_water_content
Liquid water content [m w.e.].
- Type:
float
- ice_fraction
Volumetric ice fraction [-].
- Type:
float
- refreeze
Amount of refrozen liquid water [m w.e.].
- Type:
float
Attributes
class_typeMethods
__init__(height, snow_density, temperature, ...)Get the fraction of air in the node.
Get the node's cold content.
Get the node's mean density including ice and liquid.
Get the node's layer height.
Get the node's volumetric ice fraction.
Get the node's irreducible water content.
Get the node's liquid water content.
Get the node's porosity.
Get the amount of refrozen water in the node.
Get the node's volume-weighted specific heat capacity.
Get the node's snow layer temperature.
Get the node's volume-weighted thermal conductivity.
Get the node's thermal diffusivity.
set_layer_height(height)Set the node's layer height.
Set the node's volumetric ice fraction.
Set the node's liquid water content.
set_layer_refreeze(refr)Set the amount of refrozen water in the node.
Set the node's mean temperature.
- __init__(height, snow_density, temperature, liquid_water_content, ice_fraction=None)[source]
- Parameters:
height (float)
snow_density (float)
temperature (float)
liquid_water_content (float)
ice_fraction (float)
- get_layer_air_porosity()[source]
Get the fraction of air in the node.
- Returns:
Air porosity, \(\phi_{v}\) [-].
- Return type:
float
- get_layer_cold_content()[source]
Get the node’s cold content.
- Returns:
Cold content [J m -2].
- Return type:
float
- get_layer_density()[source]
Get the node’s mean density including ice and liquid.
- Returns:
Layer density [kg m -3].
- Return type:
float
- get_layer_height()[source]
Get the node’s layer height.
- Returns:
Snow layer height [m].
- Return type:
float
- get_layer_ice_fraction()[source]
Get the node’s volumetric ice fraction.
- Returns:
The volumetric ice fraction, \(\theta_{i}\) [-].
- Return type:
float
- get_layer_irreducible_water_content()[source]
Get the node’s irreducible water content.
- Returns:
Irreducible water content, \(\theta_{e}\) [-].
- Return type:
float
- get_layer_liquid_water_content()[source]
Get the node’s liquid water content.
- Returns:
Liquid water content, [m w.e].
- Return type:
float
- get_layer_porosity()[source]
Get the node’s porosity.
- Returns:
Layer porosity, \(\phi\) [-].
- Return type:
float
- get_layer_refreeze()[source]
Get the amount of refrozen water in the node.
- Returns:
Amount of refrozen water per time step [m w.e.].
- Return type:
float
- get_layer_specific_heat()[source]
Get the node’s volume-weighted specific heat capacity.
- Returns:
Specific heat capacity [J \(\cdot\) kg -1 K -1].
- Return type:
float
- get_layer_temperature()[source]
Get the node’s snow layer temperature.
- Returns:
Snow layer temperature [K].
- Return type:
float
- get_layer_thermal_conductivity()[source]
Get the node’s volume-weighted thermal conductivity.
- Returns:
Thermal conductivity, \(\kappa\) [W m -1 K -1].
- Return type:
float
- get_layer_thermal_diffusivity()[source]
Get the node’s thermal diffusivity.
- Returns:
Thermal diffusivity, \(\lambda\) [m 2 s -1].
- Return type:
float
- set_layer_height(height)[source]
Set the node’s layer height.
- Parameters:
height (float) – Layer height [m].
- set_layer_ice_fraction(ifr)[source]
Set the node’s volumetric ice fraction.
- Parameters:
ifr (float) – Volumetric ice fraction, \(\theta_{i}\) [-].
- set_layer_liquid_water_content(lwc)[source]
Set the node’s liquid water content.
- Parameters:
lwc (float) – Liquid water content [m w.e].