SNOWPACK  SNOWPACK-3.6.0
Meteo.h
Go to the documentation of this file.
1 /*
2  * SNOWPACK stand-alone
3  *
4  * Copyright WSL Institute for Snow and Avalanche Research SLF, DAVOS, SWITZERLAND
5 */
6 /* This file is part of Snowpack.
7  Snowpack is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Snowpack is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Snowpack. If not, see <http://www.gnu.org/licenses/>.
19 */
27 #ifndef METEO_H
28 #define METEO_H
29 
30 #include <meteoio/MeteoIO.h>
31 
34 #include <snowpack/DataClasses.h>
35 
36 class Meteo {
37  public:
38  //except Richardson and Neutral, all are standard MO iterations with the specified stability correction. In unstable conditions, they use Paulson and Stearns & Weidner, 1993, for scalars
39  typedef enum {
49  } ATM_STABILITY;
50 
51  Meteo(const SnowpackConfig& i_cfg);
52 
53  static void projectPrecipitations(const double& SlopeAngle, double& precips, double& hs);
54  static bool compHSrate(CurrentMeteo& Mdata, const SnowStation& vecXdata, const double& hs_a3hl6);
55  void compMeteo(CurrentMeteo &Mdata, SnowStation &Xdata, const bool& runCanopyModel);
56  static void compRadiation(const SnowStation &station, mio::SunObject &sun, SnowpackConfig &cfg, CurrentMeteo &Mdata);
57  static void radiationOnSlope(const SnowStation &sector, const mio::SunObject &sun, CurrentMeteo &Mdata, SurfaceFluxes &surfFluxes);
58  void setStability(const ATM_STABILITY& i_stability);
59  static ATM_STABILITY getStability(const std::string& stability_model);
60  ATM_STABILITY getStability() const;
61 
62  private:
63  void MicroMet(const SnowStation& Xdata, CurrentMeteo& Mdata, const bool& adjust_VW_height=true) const;
64  static double getParameterAverage(mio::IOManager& io, const mio::MeteoData::Parameters& param,
65  const mio::Date& current_date, const int& time_span, const int& increment);
66  static void RichardsonStability(const double& ta_v, const double& t_surf_v, const double& zref,
67  const double& vw, const double& z_ratio, double &ustar, double &psi_s);
68  static void MOStability(const ATM_STABILITY& use_stability, const double& ta_v, const double& t_surf_v, const double& t_surf,
69  const double& zref, const double& vw, const double& z_ratio, double &ustar, double &psi_s, double &psi_m);
70 
71  Canopy canopy;
72  double roughness_length, height_of_wind_value;
73  bool adjust_height_of_wind_value;
74  ATM_STABILITY stability;
75  bool research_mode, useCanopyModel;
76  const SnowpackConfig& cfg;
77 };
78 
79 #endif //END of Meteo.h
ATM_STABILITY getStability() const
get the atmosphere stability
Definition: Meteo.cc:106
Definition: SnowpackConfig.h:28
Schloegl multivariate with offset.
Definition: Meteo.h:48
Holtslag and DeBruin (1988) prepared from Ed Andreas.
Definition: Meteo.h:43
Computes interception of precipitation and radiation, and reduction of windspeed in a canopy layer ab...
Definition: Canopy.h:78
void compMeteo(CurrentMeteo &Mdata, SnowStation &Xdata, const bool &runCanopyModel)
Definition: Meteo.cc:348
Definition: DataClasses.h:589
Schloegl multivariate without offset.
Definition: Meteo.h:47
CurrentMeteo is the class of interpolated meteo data for the current calculation time step It contai...
Definition: DataClasses.h:81
static bool compHSrate(CurrentMeteo &Mdata, const SnowStation &vecXdata, const double &hs_a3hl6)
Compute measured snow depth change rate to detect growing grass (canopy) vs. snowfall on bare ground...
Definition: Meteo.cc:304
static void projectPrecipitations(const double &SlopeAngle, double &precips, double &hs)
Projects precipitations and snow height perpendicular to slope.
Definition: Meteo.cc:117
Definition: Meteo.h:36
Assume neutral stratification.
Definition: Meteo.h:41
ATM_STABILITY
Definition: Meteo.h:39
void setStability(const ATM_STABILITY &i_stability)
set the atmosphere stability to a given value
Definition: Meteo.cc:97
Stearns C. and Weidner G., "sensible and latent heat flux estimates in antarctica", Antarctic meteorology and climatology: studies based on automatic weather stations, Antarctic Research Series, 61, pp 190–138, 1993.
Definition: Meteo.h:44
Simplified Richardson number stability correction.
Definition: Meteo.h:40
static void radiationOnSlope(const SnowStation &sector, const mio::SunObject &sun, CurrentMeteo &Mdata, SurfaceFluxes &surfFluxes)
Definition: Meteo.cc:423
static void compRadiation(const SnowStation &station, mio::SunObject &sun, SnowpackConfig &cfg, CurrentMeteo &Mdata)
Definition: Meteo.cc:363
Stearns & Weidner, 1993 modified by Michlmayr, 2008.
Definition: Meteo.h:45
Schloegl univariate, see Schlögl et al. "How do stability corrections perfom over snow in the stable ...
Definition: Meteo.h:46
Station data including all information on snowpack layers (elements and nodes) and on canopy This is...
Definition: DataClasses.h:468
Simple log-linear model.
Definition: Meteo.h:42
Meteo(const SnowpackConfig &i_cfg)
Definition: Meteo.cc:40