LandscapeDNDC 1.37.0
ld_icesnow.h
1
9#ifndef LD_ICESNOW_H_
10#define LD_ICESNOW_H_
11
12#include "ld_modelsconfig.h"
13#include <input/siteparameters/siteparameters.h>
14#include <containers/cbm_vector.h>
15#include "state/mbe_state.h"
16
17namespace ldndc {
18
19class LDNDC_API WaterCycleSnowDNDC
20{
21public:
22
24 static const double TLIMIT;
25
27 static const double RMCOEFF;
28
30 static const double SNALBEDO;
31
32public:
33 WaterCycleSnowDNDC( cbm::io_kcomm_t *);
34 ~WaterCycleSnowDNDC();
35
37 double dt;
38
39public:
40
41 struct SnowPackStateIn
42 {
44 double air_temperature_above_canopy;
45 double air_temperature_below_canopy;
46
48 double throughfall_rain_snow;
49
51 double canopy_snow;
52 double surface_snow;
53
55 double canopy_water;
56 double surface_water;
57
59 double shortwave_radiation_above_canopy;
60 double shortwave_radiation_below_canopy;
61 };
62
63 struct SnowPackStateOut
64 {
66 double rain_throughfall;
67
69 double snow_throughfall;
70
72 double canopy_snow_melt;
73 double surface_snow_melt;
74
76 double canopy_snow;
77 double surface_snow;
78
80 double canopy_water;
81 double surface_water;
82 };
83 lerr_t SnowPack( SnowPackStateIn const &, SnowPackStateOut &);
84
85 struct IceContentStateIn
86 {
87 /*in*/
88 lvector_t<double> h_sl;
89 lvector_t<double> bulkdensity_sl;
90 lvector_t<double> fcorg_sl;
91
92 /*in/out*/
93 lvector_t<double> wc_sl;
94 lvector_t<double> ice_sl;
95 lvector_t<double> soil_temperature_sl;
96 };
97
98 struct IceContentStateOut
99 {
100 /*in/out*/
101 lvector_t<double> wc_sl;
102 lvector_t<double> ice_sl;
103 lvector_t<double> soil_temperature_sl;
104 };
105
106 lerr_t IceContent( IceContentStateIn const &, IceContentStateOut &);
107
108private:
109 static double snow_age_top_layer; // for SnowDNDCGetSnowAlbedo but not in use yet
110
111 siteparameters::input_class_siteparameters_t const * m_param;
112
117 double
118 SnowDNDCGetIceTemperature(
119 double /* water mass [kg] */,
120 double /* ice mass [kg] */);
121
126 double
127 SnowDNDCGetSoilHeatCapacity(
128 double /* organic carbon fraction [-] */,
129 double /* soil mass [kg] */,
130 double /* water mass [kg] */,
131 double /* ice mass [kg] */);
132
138 double
139 SnowDNDCGetSnowAlbedo(
140 double /* age of the snow in days */,
141 double /* amount of snow in m */,
142 double /* amount of surface water in m */);
143
149 double
150 SnowDNDCGetSnowAgeTopLayer(
151 double /* amount of snow in the previous timestep [m] */,
152 double /* amount of snow now [m] */,
153 double /* age of the snow top layer in days */);
154};
155
156} /* namespace ldndc */
157
158#endif /* LD_ICESNOW_H_ */
Spatially explicit groundwater model.
Definition: airchemistryput.h:15