Alpine3D  Alpine3D-3.2.0
prevah_runoff/Runoff.h
Go to the documentation of this file.
1 /***********************************************************************************/
2 /* Copyright 2009-2015 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
3 /***********************************************************************************/
4 /* This file is part of Alpine3D.
5  Alpine3D is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Alpine3D is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with Alpine3D. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef RUNOFF_H
19 #define RUNOFF_H
20 
21 #include <meteoio/MeteoIO.h>
22 #include <iostream>
23 
123 class Runoff
124 {
125  public:
126  Runoff(mio::IOManager& sn_io, const double& /*in_thresh_rain*/);
127  ~Runoff();
128  bool initialize(const mio::DEMObject& in_dem, const mio::Config& cfg);
129  void setRunoff(const mio::Array2D<double>& /*runoff_surface*/, const mio::Array2D<double>& runoff_soil, const mio::Array2D<double>& /*glacier*/, const mio::Array2D<double>& /*psum*/, const mio::Array2D<double>& /*ta*/);
130  void output(const mio::Date& i_date);
131 
132  private:
133  void fillHydroTables(const unsigned int& ix, const unsigned int& iy, const double& soil_runoff);
134 
135  int nx, ny;
136  mio::Array1D<double> runoff_total;
137 
138  mio::IOManager *io;
139  mio::DEMObject dem;
140 };
141 
142 #endif
143 
144 
145 
146 
virtual ~Runoff()
Destructor of class Runoff.
Definition: Runoff.cc:220
void setRunoff(const mio::Array2D< double > &, const mio::Array2D< double > &runoff_soil, const mio::Array2D< double > &, const mio::Array2D< double > &, const mio::Array2D< double > &)
Definition: prevah_runoff/Runoff.cc:82
bool initialize(const mio::DEMObject &in_dem, const mio::Config &cfg)
This method initialize the importent parameters of Runoff.
Definition: prevah_runoff/Runoff.cc:56
virtual void output(const mio::Date &i_date, const mio::Grid2DObject &psum, const mio::Grid2DObject &ta, mio::IOManager &io_in)
Writes the results for a specific day.
Definition: Runoff.cc:149
mio::IOManager * io
Definition: Runoff.h:100
Runoff(const mio::Config &in_cfg, const mio::DEMObject &in_dem, const double &in_thresh_rain)
Constructor of Runoff instance.
Definition: Runoff.cc:29
Definition: Runoff.h:82