LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
ld_icesnow.h
1/*
2 * SPDX-FileCopyrightText: Karlsruhe Institute of Technology (KIT)
3 * SPDX-License-Identifier: LicenseRef-LandscapeDNDC
4 * This file is part of LandscapeDNDC. See LICENSE.
5 */
13
14#ifndef LD_ICESNOW_H_
15#define LD_ICESNOW_H_
16
17#include "ld_modelsconfig.h"
18#include <input/siteparameters/siteparameters.h>
19#include <containers/cbm_vector.h>
20#include "state/mbe_state.h"
21
22namespace ldndc {
23
24class LDNDC_API WaterCycleSnowDNDC
25{
26public:
27
29 static const double TLIMIT;
30
32 static const double RMCOEFF;
33
35 static const double SNALBEDO;
36
38 static const double DSNO_NEW;
39
41 static const double DSNO_MAX;
42
44 static const double SETTLING;
45
46public:
47 WaterCycleSnowDNDC( cbm::io_kcomm_t *);
48 ~WaterCycleSnowDNDC();
49
51 double dt;
52
53public:
54
55 struct SnowPackStateIn
56 {
58 double air_temperature_above_canopy;
59 double air_temperature_below_canopy;
60
62 double throughfall_rain_snow;
63
65 double canopy_snow;
66 double surface_snow;
67
69 double surface_snow_density;
70
72 double canopy_water;
73 double surface_water;
74
76 double shortwave_radiation_above_canopy;
77 double shortwave_radiation_below_canopy;
78 };
79
80 struct SnowPackStateOut
81 {
83 double rain_throughfall;
84
86 double snow_throughfall;
87
89 double canopy_snow_melt;
90 double surface_snow_melt;
91
93 double canopy_snow;
94 double surface_snow;
95
97 double surface_snow_density;
98
100 double canopy_water;
101 double surface_water;
102 };
103 lerr_t SnowPack( SnowPackStateIn const &, SnowPackStateOut &);
104
105 struct IceContentStateIn
106 {
107 /*in*/
108 lvector_t<double> h_sl;
109 lvector_t<double> bulkdensity_sl;
110 lvector_t<double> fcorg_sl;
111
112 /*in/out*/
113 lvector_t<double> wc_sl;
114 lvector_t<double> ice_sl;
115 lvector_t<double> soil_temperature_sl;
116 };
117
118 struct IceContentStateOut
119 {
120 /*in/out*/
121 lvector_t<double> wc_sl;
122 lvector_t<double> ice_sl;
123 lvector_t<double> soil_temperature_sl;
124 };
125
126 lerr_t IceContent( IceContentStateIn const &, IceContentStateOut &);
127
128private:
129 static double snow_age_top_layer; // for SnowDNDCGetSnowAlbedo but not in use yet
130
131 siteparameters::input_class_siteparameters_t const * m_param;
132
137 double
138 SnowDNDCGetIceTemperature(
139 double /* water mass [kg] */,
140 double /* ice mass [kg] */);
141
146 double
147 SnowDNDCGetSoilHeatCapacity(
148 double /* organic carbon fraction [-] */,
149 double /* soil mass [kg] */,
150 double /* water mass [kg] */,
151 double /* ice mass [kg] */);
152
158 double
159 SnowDNDCGetSnowAlbedo(
160 double /* age of the snow in days */,
161 double /* amount of snow in m */,
162 double /* amount of surface water in m */);
163
169 double
170 SnowDNDCGetSnowAgeTopLayer(
171 double /* amount of snow in the previous timestep [m] */,
172 double /* amount of snow now [m] */,
173 double /* age of the snow top layer in days */);
174};
175
176} /* namespace ldndc */
177
178#endif /* LD_ICESNOW_H_ */
Spatially explicit groundwater model.
Definition airchemistryput.h:21