Alpine3D  Alpine3D-3.2.0
TerrainRadiationSimple.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 TERRAINRADIATIONSIMPLE_H
19 #define TERRAINRADIATIONSIMPLE_H
20 
21 #include <alpine3d/MPIControl.h>
22 #include <meteoio/MeteoIO.h>
25 
38 
39  public:
40  TerrainRadiationSimple(const mio::DEMObject &dem_in, const std::string& method);
42 
43  void getRadiation(const mio::Array2D<double>& direct, mio::Array2D<double>& diffuse, mio::Array2D<double>& terrain);
44  void setMeteo(const mio::Array2D<double>& albedo, const mio::Array2D<double>& ta, const mio::Array2D<double>& rh,const mio::Array2D<double>& ilwr);
45  void getSkyViewFactor(mio::Array2D<double> &o_sky_vf) const;
46 
47  private:
48  double getAlbedo(const size_t& ii, const size_t& jj);
49  void initSkyViewFactors(const mio::DEMObject &dem);
50 
51  mio::Array2D<double> albedo_grid, sky_vf;
52 
53  const size_t dimx, dimy;
54  size_t startx, endx;
55 };
56 
57 #endif
Definition: TerrainRadiationAlgorithm.h:35
void getRadiation(const mio::Array2D< double > &direct, mio::Array2D< double > &diffuse, mio::Array2D< double > &terrain)
Definition: TerrainRadiationSimple.cc:38
void setMeteo(const mio::Array2D< double > &albedo, const mio::Array2D< double > &ta, const mio::Array2D< double > &rh, const mio::Array2D< double > &ilwr)
Definition: TerrainRadiationSimple.cc:98
void getSkyViewFactor(mio::Array2D< double > &o_sky_vf) const
Definition: TerrainRadiationSimple.cc:103
TerrainRadiationSimple(const mio::DEMObject &dem_in, const std::string &method)
Definition: TerrainRadiationSimple.cc:23
~TerrainRadiationSimple()
Definition: TerrainRadiationSimple.cc:36
Simple guess of terrain reflected radiation. For each cell of the domain, a sky view factor is comput...
Definition: TerrainRadiationSimple.h:37