Alpine3D 20241222.625fd38
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 void setGrids(const mio::Grid2DObject& in_iswr_dir, const mio::Grid2DObject& in_iswr_diff,
34 const mio::Grid2DObject& in_albedo, const mio::Date timestamp);
35
36
37 void getPositionSun(double& o_solarAzimuth, double& o_solarElevation) const;
38 void getRadiation(mio::Array2D<double>& o_direct, mio::Array2D<double>& o_diffuse, mio::Array2D<double>& o_direct_unshaded_horizontal) const;
39 void getBandOffsets(size_t& o_startx, size_t& o_stopx) const;
40 const mio::Date getDate() const {return timestamp;}
41
42 private:
43 mio::Date date;
44 mio::DEMObject dem;
45 mio::Grid2DObject dem_band, direct, diffuse, direct_unshaded_horizontal; // FELIX: direct_unshaded_horizontal;
46 mio::SunObject Sun;
47 std::vector<mio::StationData> vecMeta;
48 std::vector<double> vecMd, vecCorr;
49 mio::Date timestamp;
50 double dem_mean_altitude;
51 double cellsize;
52 size_t dem_dimx, band_dimx, dimy;
53 size_t startx;
54 bool day, night;
55};
56
57#endif
Definition: RadiationField.h:23
const mio::Date getDate() const
Definition: RadiationField.h:40
void getPositionSun(double &o_solarAzimuth, double &o_solarElevation) const
Definition: RadiationField.cc:244
void getRadiation(mio::Array2D< double > &o_direct, mio::Array2D< double > &o_diffuse, mio::Array2D< double > &o_direct_unshaded_horizontal) const
Definition: RadiationField.cc:255
void setGrids(const mio::Grid2DObject &in_iswr_dir, const mio::Grid2DObject &in_iswr_diff, const mio::Grid2DObject &in_albedo, const mio::Date timestamp)
Definition: RadiationField.cc:200
void setDEM(const mio::DEMObject &in_dem)
Definition: RadiationField.cc:39
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:125
RadiationField()
Definition: RadiationField.cc:24
void getBandOffsets(size_t &o_startx, size_t &o_stopx) const
Definition: RadiationField.cc:249
void setStations(const std::vector< mio::MeteoData > &vecMeteo, const mio::Grid2DObject &albedo)
Definition: RadiationField.cc:66