Alpine3D  Alpine3D-3.2.0
RadiationField.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 RADIATIONFIELD_H
19 #define RADIATIONFIELD_H
20 
21 #include <meteoio/MeteoIO.h>
22 
24  public:
26  RadiationField(const mio::DEMObject& in_dem, const size_t& in_startx, const size_t& in_nx);
27 
28  void setDEM(const mio::DEMObject& in_dem);
29  void setDEM(const mio::DEMObject& in_dem, const size_t& in_startx, const size_t& in_nx);
30  void setStations(const std::vector<mio::MeteoData>& vecMeteo, const mio::Grid2DObject& albedo);
31 
32  void setMeteo(const mio::Grid2DObject& in_ta, const mio::Grid2DObject& in_rh, const mio::Grid2DObject& in_p, const mio::Grid2DObject& in_albedo);
33 
34  void getPositionSun(double& o_solarAzimuth, double& o_solarElevation) const;
35  void getRadiation(mio::Array2D<double>& o_direct, mio::Array2D<double>& o_diffuse) const;
36  void getBandOffsets(size_t& o_startx, size_t& o_stopx) const;
37 
38  private:
39  mio::Date date;
40  mio::DEMObject dem;
41  mio::Grid2DObject dem_band, direct, diffuse;
42  mio::SunObject Sun;
43  std::vector<mio::StationData> vecMeta;
44  std::vector<double> vecMd, vecCorr;
45  double dem_mean_altitude;
46  double cellsize;
47  size_t dem_dimx, band_dimx, dimy;
48  size_t startx;
49  bool day, night;
50 };
51 
52 #endif
void setStations(const std::vector< mio::MeteoData > &vecMeteo, const mio::Grid2DObject &albedo)
Definition: RadiationField.cc:66
RadiationField()
Definition: RadiationField.cc:24
void getRadiation(mio::Array2D< double > &o_direct, mio::Array2D< double > &o_diffuse) const
Definition: RadiationField.cc:204
void setDEM(const mio::DEMObject &in_dem)
Definition: RadiationField.cc:39
void getPositionSun(double &o_solarAzimuth, double &o_solarElevation) const
Definition: RadiationField.cc:190
void getBandOffsets(size_t &o_startx, size_t &o_stopx) const
Definition: RadiationField.cc:198
Definition: RadiationField.h:23
void setMeteo(const mio::Grid2DObject &in_ta, const mio::Grid2DObject &in_rh, const mio::Grid2DObject &in_p, const mio::Grid2DObject &in_albedo)
Definition: RadiationField.cc:124