SNOWPACK 3.7.0
SnowpackIO.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*/
20
21#ifndef SNOWPACKIO_H
22#define SNOWPACKIO_H
23
24#include <meteoio/MeteoIO.h>
25
29
30#include <string>
31#include <vector>
32
115
116 public:
117 SnowpackIO(const SnowpackConfig& cfg);
118 SnowpackIO(const SnowpackIO& source);
119 ~SnowpackIO();
120
121 virtual bool snowCoverExists(const std::string& i_snowfile, const std::string& stationID) const;
122
123 virtual void readSnowCover(const std::string& i_snowfile, const std::string& stationID,
124 SN_SNOWSOIL_DATA& SSdata, ZwischenData& Zdata, const bool& read_salinity);
125
126 virtual void writeSnowCover(const mio::Date& date, const SnowStation& Xdata,
127 const ZwischenData& Zdata, const bool& forbackup=false);
128
129 virtual void writeTimeSeries(const SnowStation& Xdata, const SurfaceFluxes& Sdata, const CurrentMeteo& Mdata,
130 const ProcessDat& Hdata, const double wind_trans24);
131
132 virtual void writeProfile(const mio::Date& date, const SnowStation& Xdata);
133
134 virtual bool writeHazardData(const std::string& stationID, const std::vector<ProcessDat>& Hdata,
135 const std::vector<ProcessInd>& Hdata_ind, const size_t& num);
136
137 std::vector<std::string> getExtensions();
138
139 SnowpackIO& operator=(const SnowpackIO& source);
140
141 private:
142 std::vector< std::string > vecExtension;
143 SnowpackIOInterface *imisdbio;
144 SnowpackIOInterface *caamlio;
145 SnowpackIOInterface *smetio;
146 SnowpackIOInterface *asciiio;
147 bool input_snow_as_smet, output_snow_as_smet;
148 bool input_snow_as_caaml, output_snow_as_caaml;
149 bool input_snow_as_ascii, output_snow_as_ascii;
150 bool output_prf_as_ascii, output_prf_as_caaml, output_prf_as_imis;
151 bool output_ts_as_ascii, output_ts_as_smet, output_haz_as_imis;
152};
153
154#endif //End of SnowpackIO.h
CurrentMeteo is the class of interpolated meteo data for the current calculation time step It contai...
Definition: DataClasses.h:83
SN_SNOWSOIL_DATA includes all important station parameters as well as LayerData.
Definition: DataClasses.h:230
Definition: DataClasses.h:604
Definition: SnowpackConfig.h:28
Definition: SnowpackIOInterface.h:27
Definition: SnowpackIO.h:114
~SnowpackIO()
Definition: SnowpackIO.cc:149
virtual void writeProfile(const mio::Date &date, const SnowStation &Xdata)
Definition: SnowpackIO.cc:213
virtual void writeSnowCover(const mio::Date &date, const SnowStation &Xdata, const ZwischenData &Zdata, const bool &forbackup=false)
Definition: SnowpackIO.cc:190
virtual bool writeHazardData(const std::string &stationID, const std::vector< ProcessDat > &Hdata, const std::vector< ProcessInd > &Hdata_ind, const size_t &num)
Definition: SnowpackIO.cc:238
virtual void readSnowCover(const std::string &i_snowfile, const std::string &stationID, SN_SNOWSOIL_DATA &SSdata, ZwischenData &Zdata, const bool &read_salinity)
Definition: SnowpackIO.cc:176
virtual bool snowCoverExists(const std::string &i_snowfile, const std::string &stationID) const
Definition: SnowpackIO.cc:163
SnowpackIO & operator=(const SnowpackIO &source)
Definition: SnowpackIO.cc:245
virtual void writeTimeSeries(const SnowStation &Xdata, const SurfaceFluxes &Sdata, const CurrentMeteo &Mdata, const ProcessDat &Hdata, const double wind_trans24)
Definition: SnowpackIO.cc:204
SnowpackIO(const SnowpackConfig &cfg)
Definition: SnowpackIO.cc:40
std::vector< std::string > getExtensions()
Definition: SnowpackIO.cc:158
Definition: DataClasses.h:733
ZwischenData contains "memory" information mainly for operational use It is used to prepare some para...
Definition: DataClasses.h:65
Structure of double values for output to SDB.
Definition: Hazard.h:37