18#ifndef TERRAINRadiationComplex_H
19#define TERRAINRadiationComplex_H
21#include <meteoio/MeteoIO.h>
74 virtual void getRadiation(mio::Array2D<double>& direct, mio::Array2D<double>& diffuse,
75 mio::Array2D<double>& terrain,
const mio::Array2D<double>& direct_unshaded_horizontal,
76 const mio::Array2D<double>& total_ilwr, mio::Array2D<double>& sky_ilwr,
77 mio::Array2D<double>& terrain_ilwr,
double solarAzimuth,
double solarElevation);
78 virtual void setMeteo(
const mio::Array2D<double>& albedo,
const mio::Array2D<double>& ta);
81 void setSP(
const mio::Date timestamp,
const double solarAzimuth,
const double solarElevation);
82 void writeSP(
const unsigned int max_steps);
85 typedef std::array<double, 3> Vec3D;
88 void initBasicSetHorizontal();
89 void initBasicSetRotated();
97 void TriangleNormal(
size_t ii_dem,
size_t jj_dem,
int which_triangle, Vec3D &v_out);
98 double IntersectionRayTriangle(
const Vec3D &v_view,
size_t ii_0,
size_t jj_0,
size_t ii_dem,
size_t jj_dem,
size_t which_triangle);
99 size_t vectorToSPixel(
const Vec3D &vec_in,
size_t ii_dem,
size_t jj_dem,
size_t which_triangle);
100 void initSkyViewFactor();
101 double computeSkyViewFactor(
size_t ii_dem,
size_t jj_dem,
size_t which_triangle);
102 double getLandViewFactor(
size_t ii_dem,
size_t jj_dem,
size_t which_triangle);
103 double getSkyViewFactor(
size_t ii_dem,
size_t jj_dem,
size_t which_triangle);
104 void getVectorSun(
double solarAzimuth,
double solarElevation, Vec3D &v_out);
105 double TerrainBiggestDifference(
const mio::Array3D<double> &terrain_old,
const mio::Array3D<double> &terrain_new);
108 double NormOfVector(
const Vec3D &vec1);
109 void normalizeVector(
const Vec3D &vec1, Vec3D &v_out);
110 double VectorScalarProduct(
const Vec3D &vec1,
const Vec3D &vec2);
111 void VectorCrossProduct(
const Vec3D &vec1,
const Vec3D &vec2, Vec3D &v_out);
112 void VectorSum(
const Vec3D &vec1,
const Vec3D &vec2, Vec3D &v_out);
113 void VectorDifference(
const Vec3D &vec1,
const Vec3D &vec2, Vec3D &v_out);
114 void VectorStretch(
const Vec3D &vec1,
double factor, Vec3D &v_out);
115 void RotN(
const Vec3D &axis,
const Vec3D &vec_in,
double rad, Vec3D &v_out);
116 void ProjectVectorToPlane(
const Vec3D &vec1,
const Vec3D &plane_normal, Vec3D &v_out);
117 double AngleBetween2Vectors(
const Vec3D &vec1,
const Vec3D &vec2);
127 void PrintProgress(
double percentage);
130 const size_t dimx, dimy;
134 const mio::Config &cfg;
138 std::vector<std::vector<double> > pv_points;
140 mio::Array3D<std::vector<double>> SortList;
141 std::vector<Vec3D> BasicSet_Horizontal;
142 mio::Array4D<Vec3D> BasicSet_rotated;
143 mio::Array4D<std::vector<double>> ViewList;
144 mio::Array2D<double> RList;
145 mio::Array2D<double> albedo_grid;
147 mio::Array2D<double> sky_vf_mean;
148 std::vector<mio::Array2D<double>> sky_vf;
149 unsigned int M_epsilon;
155 bool if_anisotropy =
false;
156 bool if_multiple =
false;
157 bool if_write_view_list =
true;
158 bool if_read_view_list =
false;
Definition: SolarPanel.h:11
Definition: TerrainRadiationAlgorithm.h:37
This module calculates the radiative transfer of SW radiation in snow-covered terrain....
Definition: TerrainRadiationComplex.h:68
TerrainRadiationComplex(const mio::Config &cfg, const mio::DEMObject &dem_in, const std::string &method)
Definition: TerrainRadiationComplex.cc:31
void getSkyViewFactor(mio::Array2D< double > &o_sky_vf)
Definition: TerrainRadiationComplex.cc:1132
~TerrainRadiationComplex()
Definition: TerrainRadiationComplex.cc:187
virtual void setMeteo(const mio::Array2D< double > &albedo, const mio::Array2D< double > &ta)
Definition: TerrainRadiationComplex.cc:903
void setSP(const mio::Date timestamp, const double solarAzimuth, const double solarElevation)
Definition: TerrainRadiationComplex.cc:1417
void writeSP(const unsigned int max_steps)
Definition: TerrainRadiationComplex.cc:1422
virtual void getRadiation(mio::Array2D< double > &direct, mio::Array2D< double > &diffuse, mio::Array2D< double > &terrain, const mio::Array2D< double > &direct_unshaded_horizontal, const mio::Array2D< double > &total_ilwr, mio::Array2D< double > &sky_ilwr, mio::Array2D< double > &terrain_ilwr, double solarAzimuth, double solarElevation)
Computes direct, diffuse and terrain radiation for each gridpoint. Terrain radiation.
Definition: TerrainRadiationComplex.cc:606