SOL_WB.h
Go to the documentation of this file.
1/*!
2 * \file SOL_WB.h
3 * \brief Check soil water balance.
4 *
5 * Changelog:
6 * - 1. 2016-07-28 - lj - Move subbasin class to base/data/clsSubbasin, to keep consistent with other modules.
7 * - 2. 2022-08-22 - lj - Change float to FLTPT.
8 *
9 * \author Chunping Ou, Liangjun Zhu
10 */
11#ifndef SEIMS_MODULE_SOL_WB_H
12#define SEIMS_MODULE_SOL_WB_H
13
14#include "SimulationModule.h"
15#include "clsSubbasin.h"
16
17/*!
18 * \defgroup SOL_WB
19 * \ingroup Hydrology
20 * \brief Soil water balance calculation
21 *
22 */
23
24/*!
25 * \class SOL_WB
26 * \ingroup SOL_WB
27 * \brief Soil water balance calculation
28 *
29 */
30
31class SOL_WB: public SimulationModule {
32public:
33 SOL_WB();
34
35 ~SOL_WB();
36
37 void SetValue(const char* key, int value) OVERRIDE;
38
39 void Set1DData(const char* key, int nrows, FLTPT* data) OVERRIDE;
40
41 void Set1DData(const char* key, int nrows, int* data) OVERRIDE;
42
43 void Set2DData(const char* key, int nrows, int ncols, FLTPT** data) OVERRIDE;
44
46
48
50
52
53 void Get2DData(const char* key, int* nrows, int* ncols, FLTPT*** data) OVERRIDE;
54
55private:
56 /*!
57 * \brief Set parameter values to subbasins
58 */
59 void SetValueToSubbasins();
60private:
61 //! valid cells number
62 int m_nCells;
63 //! maximum soil layers number
64 int m_maxSoilLyrs;
65 //! soil layers number of each cell
66 int* m_nSoilLyrs;
67 //! soil thickness of each layer
68 FLTPT** m_soilThk;
69 //! the maximum soil depth
70 FLTPT* m_soilMaxRootD;
71
72 //! Net precipitation (include snow melt if stated) (mm)
73 FLTPT* m_netPcp;
74 //! infiltration water (mm)
75 FLTPT* m_infil;
76 //! evaporation from the soil water storage, es_day in SWAT (mm)
77 FLTPT* m_soilET;
78 //! revaporization from groundwater to the last soil layer (mm)
79 FLTPT* m_Revap;
80 //! subsurface runoff
81 FLTPT** m_subSurfRf;
82 //! percolation (mm)
83 FLTPT** m_soilPerco;
84 //! soil storage (mm)
85 FLTPT** m_soilWtrSto;
86 // Outputs
87 // used to output time series result for soil water balance
88
89 //! precipitation on the current day (mm)
90 FLTPT* m_PCP;
91 //! interception loss (mm)
92 FLTPT* m_intcpLoss;
93 //! evaporation from the interception storage (mm)
94 FLTPT* m_IntcpET;
95 //! depression (mm)
96 FLTPT* m_deprSto;
97 //! evaporation from depression storage (mm)
98 FLTPT* m_deprStoET;
99 //! surface runoff generated (mm)
100 FLTPT* m_surfRf;
101 //! groundwater runoff
102 FLTPT* m_RG;
103 //! snow sublimation
104 FLTPT* m_snowSublim;
105 //! mean temperature
106 FLTPT* m_meanTemp;
107 //! soil temperature
108 FLTPT* m_soilTemp;
109 //! subbasins number
110 int m_nSubbsns;
111 //! subbasin IDs
112 vector<int> m_subbasinIDs;
113 //! All subbasins information
114 clsSubbasins* m_subbasinsInfo;
115 /* soil water balance, time series result
116 * the row index is subbasinID
117 */
118 FLTPT** m_soilWtrBal;
119};
120#endif /* SEIMS_MODULE_SOL_WB_H */
Parent class for all modules in SEIMS.
#define OVERRIDE
A compatible reference to override or blank if not supported by the compiler.
Definition: basic.h:160
Class for managing subbasin data.
int Execute() OVERRIDE
Execute the simulation. Return 0 for success.
void Set2DData(const char *key, int nrows, int ncols, FLTPT **data) OVERRIDE
Set 2D data, by default, DT_Raster2D, float.
void Get2DData(const char *key, int *nrows, int *ncols, FLTPT ***data) OVERRIDE
Get 2D data, by default, DT_Raster2D, float.
void Set1DData(const char *key, int nrows, int *data) OVERRIDE
Set 1D data, by default, DT_Raster1D, integer.
void Set1DData(const char *key, int nrows, FLTPT *data) OVERRIDE
Set 1D data, by default, DT_Raster1D, float.
void SetValue(const char *key, int value) OVERRIDE
Set data, DT_Single, integer.
void SetSubbasins(clsSubbasins *subbasins) OVERRIDE
Set pointer of clsSubbasins class which contains all subbasins information. Added by LJ,...
bool CheckInputData() OVERRIDE
Check the input data.
void InitialOutputs() OVERRIDE
Initialize output variables.
Soil water balance calculation.
Definition: SOL_WB.h:31
Manager all Subbasin related parameters and methods.
Definition: clsSubbasin.h:214
Base module for all simulation modules in SEIMS.
Definition: SimulationModule.h:46