SNOWPACK 20260312.9ea114d3
Physically based, energy balance snow cover model
Loading...
Searching...
No Matches
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
35
36class 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
50
51 Meteo(const SnowpackConfig& i_cfg);
52
53 void compMeteo(CurrentMeteo &Mdata, SnowStation &Xdata, const bool runCanopyModel);
54 void compMeteo(CurrentMeteo &Mdata, SnowStation &Xdata, const bool runCanopyModel, const bool i_adjust_height_of_wind_value);
55 void setStability(const ATM_STABILITY& i_stability);
56 static ATM_STABILITY getStability(const std::string& stability_model);
58
59 private:
60 void MicroMet(const SnowStation& Xdata, CurrentMeteo& Mdata, const double& roughness_length, const bool& adjust_VW_height=true) const;
61 static double getParameterAverage(mio::IOManager& io, const mio::MeteoData::Parameters& param,
62 const mio::Date& current_date, const int& time_span, const int& increment);
63 static void RichardsonStability(const double& ta_v, const double& t_surf_v, const double& zref,
64 const double& vw, const double& z_ratio, double &ustar, double &psi_s);
65 static void MOStability(const ATM_STABILITY& use_stability, const double& ta_v, const double& t_surf_v, const double& t_surf,
66 const double& zref, const double& vw, const double& z_ratio, double &ustar, double &psi_s, double &psi_m);
67
68 Canopy canopy;
69 const double roughness_length_dflt;
70 double height_of_wind_value;
71 ATM_STABILITY stability;
72 bool research_mode;
73 bool useCanopyModel;
74 bool adjust_height_of_wind_value;
75};
76
77#endif //END of Meteo.h
Computes interception of precipitation and radiation, and reduction of windspeed in a canopy layer ab...
Definition Canopy.h:79
Class of interpolated meteo data for the current calculation time step.
Definition DataClasses.h:887
Definition Meteo.h:36
void setStability(const ATM_STABILITY &i_stability)
Set the atmospheric stability to a given value.
Definition Meteo.cc:90
void compMeteo(CurrentMeteo &Mdata, SnowStation &Xdata, const bool runCanopyModel)
Compute atmospheric stability related parameters and if necessary run canopy model.
Definition Meteo.cc:356
ATM_STABILITY
Definition Meteo.h:39
@ RICHARDSON
Simplified Richardson number stability correction.
Definition Meteo.h:40
@ MO_HOLTSLAG
Holtslag and DeBruin (1988) prepared from Ed Andreas.
Definition Meteo.h:43
@ MO_SCHLOEGL_MULTI
Schloegl multivariate without offset.
Definition Meteo.h:47
@ MO_STEARNS
Stearns C. and Weidner G., "sensible and latent heat flux estimates in antarctica",...
Definition Meteo.h:44
@ MO_MICHLMAYR
Stearns & Weidner, 1993 modified by Michlmayr, 2008.
Definition Meteo.h:45
@ MO_SCHLOEGL_MULTI_OFFSET
Schloegl multivariate with offset.
Definition Meteo.h:48
@ MO_LOG_LINEAR
Simple log-linear model.
Definition Meteo.h:42
@ MO_SCHLOEGL_UNI
Schloegl univariate, see Schlögl et al. "How do stability corrections perfom over snow in the stable ...
Definition Meteo.h:46
@ NEUTRAL
Assume neutral stratification.
Definition Meteo.h:41
ATM_STABILITY getStability() const
Get the atmospheric stability.
Definition Meteo.cc:99
Station data including all information on snowpack layers (elements and nodes) and on canopy.
Definition DataClasses.h:533
Definition SnowpackConfig.h:28