21#include <meteoio/MeteoIO.h>
22#include <snowpack/libsnowpack.h>
84 static std::vector<std::string> paramname;
85 static const bool __init;
86 static bool initStaticData();
92 MeteoObj(
const mio::Config& config,
const mio::DEMObject& in_dem);
96 void prepare(
const mio::Date& in_date);
97 void get(
const mio::Date& in_date,
98 mio::Grid2DObject& ta,
99 mio::Grid2DObject& rh,
100 mio::Grid2DObject& psum,
101 mio::Grid2DObject& psum_ph,
102 mio::Grid2DObject& vw,
103 mio::Grid2DObject& dw,
104 mio::Grid2DObject& p,
105 mio::Grid2DObject& ilwr,
106 mio::Grid2DObject& iswr_dir,
107 mio::Grid2DObject& iswr_diff);
108 void get(
const mio::Date& in_date, std::vector<mio::MeteoData>& o_vecMeteo);
112 void setDEM(
const mio::DEMObject& in_dem);
116 static void checkLapseRate(
const std::vector<mio::MeteoData>& i_vecMeteo,
const mio::MeteoData::Parameters& param);
117 static void checkGridRange(
const mio::Date& calcDate,
const mio::Grid2DObject& grid,
const mio::MeteoData::Parameters& param);
118 static void checkInputsRequirements(std::vector<mio::MeteoData>& vecData);
119 void fillMeteoGrids(
const mio::Date& calcDate);
120 void getMeteo(
const mio::Date& calcDate);
123 const mio::Config &config;
126 mio::Grid2DObject ta, rh, psum, psum_ph, vw, dw, p, ilwr, iswr_dir, iswr_diff;
127 mio::Grid2DObject sum_ta, sum_rh, sum_rh_psum, sum_psum, sum_psum_ph, sum_vw, sum_ilwr;
128 std::vector<mio::MeteoData> vecMeteo;
131 unsigned int count_sums, count_precip;
void setDEM(const mio::DEMObject &in_dem)
Definition MeteoObj.cc:389
bool fillPrecSplitting()
Definition MeteoObj.cc:291
void setGlacierMask(const mio::Grid2DObject &glacierMask)
Definition MeteoObj.cc:381
double getTiming() const
Definition MeteoObj.cc:213
void prepare(const mio::Date &in_date)
Definition MeteoObj.cc:134
void setSkipWind(const bool &i_skipWind)
Definition MeteoObj.cc:130
~MeteoObj()
Definition MeteoObj.cc:125
void checkMeteoForcing(const mio::Date &calcDate)
Definition MeteoObj.cc:399
void get(const mio::Date &in_date, mio::Grid2DObject &ta, mio::Grid2DObject &rh, mio::Grid2DObject &psum, mio::Grid2DObject &psum_ph, mio::Grid2DObject &vw, mio::Grid2DObject &dw, mio::Grid2DObject &p, mio::Grid2DObject &ilwr, mio::Grid2DObject &iswr_dir, mio::Grid2DObject &iswr_diff)
Definition MeteoObj.cc:143
static const std::string & getParameterName(const size_t &parindex)
Definition MeteoObj.cc:93
static size_t getParameterIndex(const std::string &parname)
Definition MeteoObj.cc:101
static const size_t nrOfParameters
holds the number of meteo parameters stored in MeteoData
Definition MeteoObj.h:79
Parameters
this enum provides names for possible Snowpack grids
Definition MeteoObj.h:31
@ MS_ICE_SOIL
The total amount of ice in the soil at the present time.
Definition MeteoObj.h:64
@ DW
Wind direction (deg)
Definition MeteoObj.h:35
@ TSNOW_AVG
Average snow temperature in the top xxx m.
Definition MeteoObj.h:49
@ TOP_ALB
Albedo from the top (ie above canopy)
Definition MeteoObj.h:53
@ PSUM_PH
Precipitation phase, between 0 (fully solid) and 1 (fully liquid)
Definition MeteoObj.h:42
@ RG
grain radius
Definition MeteoObj.h:57
@ TA
Air temperature.
Definition MeteoObj.h:32
@ RSNO
Snow mean density.
Definition MeteoObj.h:52
@ MS_SOIL_RUNOFF
runoff at the bottom of the snow/soil column
Definition MeteoObj.h:61
@ TSOIL1
Definition MeteoObj.h:74
@ SOIL_RUNOFF_MAX
Definition MeteoObj.h:75
@ MS_SURFACE_MASS_FLUX
mass flux through the soil surface
Definition MeteoObj.h:60
@ PSUM
Water equivalent of precipitations, either solid or liquid.
Definition MeteoObj.h:41
@ MS_WATER_SOIL
The total amount of water in the soil at the present time.
Definition MeteoObj.h:63
@ ISWR_TERRAIN
Short wave received by terrain reflection.
Definition MeteoObj.h:71
@ PSUM_TECH
Water equivalent precipitation from artificial snow production.
Definition MeteoObj.h:43
@ lastparam
Definition MeteoObj.h:76
@ TS0
Temperature soil surface.
Definition MeteoObj.h:47
@ MNS
drifted mass (when snowdrift is enabled)
Definition MeteoObj.h:66
@ TSOIL4
Definition MeteoObj.h:74
@ TSOIL3
Definition MeteoObj.h:74
@ VW
Wind velocity.
Definition MeteoObj.h:34
@ SURF_ALB
Albedo of the surface (ie below canopy)
Definition MeteoObj.h:54
@ RHOSNOW_AVG
Average snow density in the top xxx m.
Definition MeteoObj.h:50
@ ISWR_DIR
Incoming short wave, direct.
Definition MeteoObj.h:38
@ STORE
internal usage (precipitation events that are delayed because they are too small)
Definition MeteoObj.h:67
@ RB
bond radius
Definition MeteoObj.h:56
@ SP
sphericity
Definition MeteoObj.h:55
@ ET
Evapotranspiration.
Definition MeteoObj.h:70
@ HS
Height of snow.
Definition MeteoObj.h:40
@ SOIL_RUNOFF3
Definition MeteoObj.h:75
@ RH
Relative humidity.
Definition MeteoObj.h:33
@ ISWR
Incoming short wave radiation.
Definition MeteoObj.h:36
@ firstparam
Definition MeteoObj.h:31
@ TSOIL2
Definition MeteoObj.h:74
@ SOIL_RUNOFF2
Definition MeteoObj.h:75
@ ISWR_DIFF
Incoming short wave, diffuse.
Definition MeteoObj.h:37
@ GROOMING
Used as a boolean flag to decide whever a pixel is scheduled for grooming or not.
Definition MeteoObj.h:44
@ MS_SNOWPACK_RUNOFF
runoff on the surface of the soil (vitual lysimeter)
Definition MeteoObj.h:59
@ SOIL_RUNOFF1
Definition MeteoObj.h:75
@ N3
grain Coordination number
Definition MeteoObj.h:58
@ MS_WATER
The total amount of water in the snowpack at the present time.
Definition MeteoObj.h:62
@ TSG
Temperature ground surface.
Definition MeteoObj.h:45
@ GLACIER
mask showing the glaciated pixels
Definition MeteoObj.h:68
@ TSOIL_MAX
Temperature within the soil, at a given depth.
Definition MeteoObj.h:74
@ SWE
Snow Water Equivalent.
Definition MeteoObj.h:51
@ ILWR
Incoming long wave radiation.
Definition MeteoObj.h:39
@ ISWR_BELOW_CAN
Definition MeteoObj.h:73
@ TSS
Temperature snow surface.
Definition MeteoObj.h:46
@ ILWR_TERRAIN
Long wave received by terrain emission.
Definition MeteoObj.h:72
@ SFC_SUBL
The mass loss or gain of the top element due to snow (ice) sublimating.
Definition MeteoObj.h:65
@ SOIL_RUNOFF4
Definition MeteoObj.h:75
@ GLACIER_EXPOSED
mask showing the exposed glaciated pixels (ie not snow covered)
Definition MeteoObj.h:69
@ TSNOW
Snow temperature at depth xxx m.
Definition MeteoObj.h:48