WSL/SLF GitLab Repository

Commit 3fdc84f5 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Another commit related to timezones... The Unix date always being in UTC, this...

Another commit related to timezones... The Unix date always being in UTC, this has been fixed. The resampling was not using dates in a proper way, this has been fixed. The GSN plugin has also been fixed, it now rounds time to the closest minute (in order to be consistent with our advertised "1 minute time resolution"). A rounding method has been implemented for dates.

The timezone parameter in io.ini is now named TIME_ZONE instead of TZ for clarity. 

Undefined dates should now be fully handled (ie: also in arithmetic).
parent 8c40e39c
......@@ -64,8 +64,7 @@ A3DIO::A3DIO(const std::string& configfile) : IOInterface(NULL), cfg(configfile)
{
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
in_tz = out_tz = 0.;
cfg.getValue("TZ","Input",in_tz,Config::nothrow);
cfg.getValue("TZ","Output",out_tz,Config::nothrow);
IOUtils::getTimeZoneParameters(cfg, in_tz, out_tz);
}
//Copy constructor
......@@ -73,16 +72,14 @@ A3DIO::A3DIO(const A3DIO& aio) : IOInterface(NULL), cfg(aio.cfg)
{
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
in_tz = out_tz = 0.;
cfg.getValue("TZ","Input",in_tz,Config::nothrow);
cfg.getValue("TZ","Output",out_tz,Config::nothrow);
IOUtils::getTimeZoneParameters(cfg, in_tz, out_tz);
}
A3DIO::A3DIO(const Config& in_cfg) : IOInterface(NULL), cfg(in_cfg)
{
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
in_tz = out_tz = 0.;
cfg.getValue("TZ","Input",in_tz,Config::nothrow);
cfg.getValue("TZ","Output",out_tz,Config::nothrow);
IOUtils::getTimeZoneParameters(cfg, in_tz, out_tz);
}
A3DIO::~A3DIO() throw()
......
This diff is collapsed.
/***********************************************************************************/
/* Copyright 2009 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
/***********************************************************************************/
/* This file is part of MeteoIO.
MeteoIO is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MeteoIO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __DATE_H__
#define __DATE_H__
#include <meteoio/IOExceptions.h>
#include <string>
#include <sstream>
#include <utility>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <ctime>
///Using the following namespace for the comparison operator overloading
//using namespace rel_ops;
namespace mio {
/**
* @class Date
* @brief A class to handle timestamps.
* This class handles conversion between different time display formats (ISO, numeric) as well as different
* time representation (julian date, modified julian date, etc). It also handles time zones as well as
* very basic Daylight Saving Time (DST). Since the activation dates of DST are political and not technical,
* it can not be automatically calculated. Therefore, it has to be provided by the caller: when the dst flag
* is set, the dst time shift is automatically applied. When the dst flag ceases to be set, the dst time shift
* is no longer applied. This is very crude, but please keep in mind that using DST for monitoring data is
* usually a bad idea...
*
* Internally, the date is stored as true julian date in GMT.
* The maximal precision is 1 minute (that can be easily brought to 1 seconds if
* it would appear necessary/useful, with the limitation that leap seconds are currently not handled).
*
* Please see Date::FORMATS for supported display formats and http://en.wikipedia.org/wiki/Julian_day for
* the various date representation definitions. The following data representation are currently supported:
* - julian date, see Date::getJulianDate
* - modified julian date, see Date::getModifiedJulianDate
* - truncated julian date, see Date::getTruncatedJulianDate
* - Unix date, see Date::getUnixDate
* - Excel date, see Date::getExcelDate
*
* @ingroup data_str
* @author Mathias Bavay
* @date 2010-04-15
*/
#ifdef _POPC_
class DateDummy {}; //HACK for POPC
class Date : POPBase {
public:
void Serialize(POPBuffer &buf, bool pack);
#else
class Date {
#endif
public:
///Keywords for selecting the date formats
typedef enum {
ISO, ///< ISO 8601 extended format combined date: YYYY-MM-DDTHH:mm:SS (fields might be dropped, in the least to the most significant order)
FULL, ///< ISO 8601 followed by the julian date (in parenthesis)
NUM, ///< ISO 8601 basic format date: YYYYMMDDHHmmSS (fields might be dropped, in the least to the most significant order)
DIN ///<DIN5008 format: DD.MM.YYYY HH:MM
} FORMATS;
static const int daysLeapYear[];
static const int daysNonLeapYear[];
static const double DST_shift;
static const float MJD_offset;
static const float Unix_offset;
static const float Excel_offset;
Date();
Date(const double& julian_in, const double& in_timezone, const bool& in_dst=false);
Date(const int& year, const int& month, const int& day, const int& hour, const int& minute, const double& in_timezone, const bool& in_dst=false);
Date(const time_t&, const double& in_timezone, const bool& in_dst=false);
Date(const Date& in_date);
void setFromSys(const double& in_timezone);
void setTimeZone(const double& in_timezone, const bool& in_dst=false);
void setDate(const double& julian_in, const double& in_timezone, const bool& _dst=false);
void setDate(const int& year, const int& month, const int& day, const int& hour, const int& minute, const double& in_timezone, const bool& _dst=false);
void setDate(const time_t& in_time, const double& in_timezone, const bool& _dst=false);
void setModifiedJulianDate(const double& julian_in, const double& in_timezone, const bool& _dst=false);
void setUnixDate(const time_t& in_time, const double& in_timezone, const bool& _dst=false);
void setExcelDate(const double excel_in, const double& in_timezone, const bool& _dst=false);
void setUndef(const bool& flag);
bool isUndef() const;
double getTimeZone() const;
bool getDST() const;
double getJulianDate(const bool& gmt=false) const;
double getModifiedJulianDate(const bool& gmt=false) const;
double getTruncatedJulianDate(const bool& gmt=false) const;
time_t getUnixDate(const bool& gmt=false) const;
double getExcelDate(const bool& gmt=false) const;
void getDate(double& julian_out, const bool& gmt=false) const;
void getDate(int& year, int& month, int& day, const bool& gmt=false) const;
void getDate(int& year, int& month, int& day, int& hour, const bool& gmt=false) const;
void getDate(int& year, int& month, int& day, int& hour, int& minute, const bool& gmt=false) const;
int getYear(const bool& gmt=false) const;
int getJulianDayNumber() const;
bool isLeapYear() const;
double rndJulianDate() const;
const std::string toString(FORMATS type, const bool& gmt=false) const;
friend std::ostream& operator<<(std::ostream& os, const Date& date);
//Operator Prototypes
bool operator==(const Date&) const;
bool operator!=(const Date&) const;
bool operator<(const Date&) const;
bool operator<=(const Date&) const;
bool operator>(const Date&) const;
bool operator>=(const Date&) const;
///Intervals arithmetic
///Can be used to add an interval to an existing Date object.
///Construct a Date object representing the interval e.g. Date(1.0) for 1 day and add that to another Date object.
Date& operator+=(const Date&);
Date& operator-=(const Date&);
Date& operator+=(const double&);
Date& operator-=(const double&);
Date& operator*=(const double&);
Date& operator/=(const double&);
const Date operator+(const Date&) const;
const Date operator-(const Date&) const;
const Date operator+(const double&) const;
const Date operator-(const double&) const;
const Date operator*(const double&) const;
const Date operator/(const double&) const;
protected:
double localToGMT(const double& in_julian)const;
double GMTToLocal(const double& in_gmt_julian) const;
double calculateJulianDate(const int& in_year, const int& in_month, const int& in_day, const int& in_hour, const int& in_minute) const;
void calculateValues(const double& julian, int& out_year, int& out_month, int& out_day, int& out_hour, int& out_minute) const;
long getJulianDayNumber(const int&, const int&, const int&) const;
bool isLeapYear(const int&) const;
void plausibilityCheck(const int& in_year, const int& in_month, const int& in_day, const int& in_hour, const int& in_minute) const;
double timezone;
bool dst;
double gmt_julian;
int gmt_year, gmt_month, gmt_day, gmt_hour, gmt_minute;
bool undef;
};
typedef Date Duration; //so that later, we can implement a true Interval/Duration class
} //end namespace
#endif
/***********************************************************************************/
/* Copyright 2009 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
/***********************************************************************************/
/* This file is part of MeteoIO.
MeteoIO is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MeteoIO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __DATE_H__
#define __DATE_H__
#include <meteoio/IOExceptions.h>
#include <string>
#include <sstream>
#include <utility>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <ctime>
namespace mio {
/**
* @class Date
* @brief A class to handle timestamps.
* This class handles conversion between different time display formats (ISO, numeric) as well as different
* time representation (julian date, modified julian date, etc). It also handles time zones as well as
* very basic Daylight Saving Time (DST). Since the activation dates of DST are political and not technical,
* it can not be automatically calculated. Therefore, it has to be provided by the caller: when the dst flag
* is set, the dst time shift is automatically applied. When the dst flag ceases to be set, the dst time shift
* is no longer applied. This is very crude, but please keep in mind that using DST for monitoring data is
* usually a bad idea...
*
* Internally, the date is stored as true julian date in GMT.
* The maximal precision is 1 minute (that can be easily brought to 1 seconds if
* it would appear necessary/useful, with the limitation that leap seconds are currently not handled).
*
* Please see Date::FORMATS for supported display formats and http://en.wikipedia.org/wiki/Julian_day for
* the various date representation definitions. The following data representation are currently supported:
* - julian date, see Date::getJulianDate
* - modified julian date, see Date::getModifiedJulianDate
* - truncated julian date, see Date::getTruncatedJulianDate
* - Unix date, see Date::getUnixDate
* - Excel date, see Date::getExcelDate
*
* @ingroup data_str
* @author Mathias Bavay
* @date 2010-04-15
*/
#ifdef _POPC_
class DateDummy {}; //HACK for POPC
class Date : POPBase {
public:
void Serialize(POPBuffer &buf, bool pack);
#else
class Date {
#endif
public:
///Keywords for selecting the date formats
typedef enum {
ISO, ///< ISO 8601 extended format combined date: YYYY-MM-DDTHH:mm:SS (fields might be dropped, in the least to the most significant order)
FULL, ///< ISO 8601 followed by the julian date (in parenthesis)
NUM, ///< ISO 8601 basic format date: YYYYMMDDHHmmSS (fields might be dropped, in the least to the most significant order)
DIN ///<DIN5008 format: DD.MM.YYYY HH:MM
} FORMATS;
///Keywords for selecting rounding strategy
typedef enum RND_TYPE {
UP, ///< rounding toward highest absolute value
DOWN, ///< rounding toward smallest absolute value
CLOSEST ///< rounding toward closest
} RND;
static const int daysLeapYear[];
static const int daysNonLeapYear[];
static const double DST_shift;
static const float MJD_offset;
static const float Unix_offset;
static const float Excel_offset;
Date();
Date(const double& julian_in, const double& in_timezone, const bool& in_dst=false);
Date(const int& year, const int& month, const int& day, const int& hour, const int& minute, const double& in_timezone, const bool& in_dst=false);
Date(const time_t&, const bool& in_dst=false);
Date(const Date& in_date);
void setFromSys();
void setTimeZone(const double& in_timezone, const bool& in_dst=false);
void setDate(const double& julian_in, const double& in_timezone, const bool& _dst=false);
void setDate(const int& year, const int& month, const int& day, const int& hour, const int& minute, const double& in_timezone, const bool& _dst=false);
void setDate(const time_t& in_time, const bool& _dst=false);
void setModifiedJulianDate(const double& julian_in, const double& in_timezone, const bool& _dst=false);
void setUnixDate(const time_t& in_time, const bool& _dst=false);
void setExcelDate(const double excel_in, const double& in_timezone, const bool& _dst=false);
void setUndef(const bool& flag);
bool isUndef() const;
double getTimeZone() const;
bool getDST() const;
double getJulianDate(const bool& gmt=false) const;
double getModifiedJulianDate(const bool& gmt=false) const;
double getTruncatedJulianDate(const bool& gmt=false) const;
time_t getUnixDate(const bool& gmt=false) const;
double getExcelDate(const bool& gmt=false) const;
void getDate(double& julian_out, const bool& gmt=false) const;
void getDate(int& year, int& month, int& day, const bool& gmt=false) const;
void getDate(int& year, int& month, int& day, int& hour, const bool& gmt=false) const;
void getDate(int& year, int& month, int& day, int& hour, int& minute, const bool& gmt=false) const;
int getYear(const bool& gmt=false) const;
int getJulianDayNumber() const;
bool isLeapYear() const;
void rnd(const double& precision, const RND& type=CLOSEST);
static const Date rnd(const Date& indate, const double& precision, const RND& type=CLOSEST);
const std::string toString(FORMATS type, const bool& gmt=false) const;
friend std::ostream& operator<<(std::ostream& os, const Date& date);
//Operator Prototypes
bool operator==(const Date&) const;
bool operator!=(const Date&) const;
bool operator<(const Date&) const;
bool operator<=(const Date&) const;
bool operator>(const Date&) const;
bool operator>=(const Date&) const;
///Intervals arithmetic
///Can be used to add an interval to an existing Date object.
///Construct a Date object representing the interval e.g. Date(1.0) for 1 day and add that to another Date object.
Date& operator+=(const Date&);
Date& operator-=(const Date&);
Date& operator+=(const double&);
Date& operator-=(const double&);
Date& operator*=(const double&);
Date& operator/=(const double&);
const Date operator+(const Date&) const;
const Date operator-(const Date&) const;
const Date operator+(const double&) const;
const Date operator-(const double&) const;
const Date operator*(const double&) const;
const Date operator/(const double&) const;
protected:
double localToGMT(const double& in_julian)const;
double GMTToLocal(const double& in_gmt_julian) const;
double calculateJulianDate(const int& in_year, const int& in_month, const int& in_day, const int& in_hour, const int& in_minute) const;
void calculateValues(const double& julian, int& out_year, int& out_month, int& out_day, int& out_hour, int& out_minute) const;
long getJulianDayNumber(const int&, const int&, const int&) const;
bool isLeapYear(const int&) const;
void plausibilityCheck(const int& in_year, const int& in_month, const int& in_day, const int& in_hour, const int& in_minute) const;
double timezone;
bool dst;
double gmt_julian;
int gmt_year, gmt_month, gmt_day, gmt_hour, gmt_minute;
bool undef;
};
typedef Date Duration; //so that later, we can implement a true Interval/Duration class
} //end namespace
#endif
......@@ -38,6 +38,7 @@ namespace mio {
* So far the following children have been implemented (by keyword for the io.ini key/value config file). Please read the documentation for each plugin in order to know the plugin-specific keywords:
* - \subpage a3d "A3D" for reading original Alpine3D meteo files (no extra requirements)
* - \subpage borma "BORMA" for reading Borma xml meteo files (requires libxml)
* - \subpage cosmoxml "COSMO" for treading XML files produced by MeteoSwiss COSMO's postprocessing (requires libxml)
* - \subpage imis "IMIS" for reading meteo data out of the IMIS database (requires Oracle's OCCI library)
* - \subpage geotop "GEOTOP" for reading original GeoTop meteo files (no extra requirements)
* - \subpage snowpack "SNOWPACK" for reading original SNOWPACK meteo files (no extra requirements)
......
......@@ -25,7 +25,7 @@ IOManager::IOManager(const Config& i_cfg) : cfg(i_cfg), rawio(i_cfg), bufferedio
{
setProcessingLevel(IOManager::filtered | IOManager::resampled);
fcache_start = fcache_end = Date(0.0, 0.); //HACK this should not matter, since 0 is still way back before any real data...
fcache_start = fcache_end = Date(0.0, 0.); //this should not matter, since 0 is still way back before any real data...
meteoprocessor.getWindowSize(proc_properties);
}
......
/***********************************************************************************/
/* Copyright 2009 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
/***********************************************************************************/
/* This file is part of MeteoIO.
MeteoIO is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MeteoIO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __IOMANAGER_H__
#define __IOMANAGER_H__
#include <meteoio/BufferedIOHandler.h>
#include <meteoio/Meteo2DInterpolator.h>
#include <meteoio/MeteoProcessor.h>
#include <meteoio/marshal_meteoio.h>
namespace mio {
/**
* @file IOManager.ph
* The is the parclass implementing the user accessible interface.
*/
parclass IOManager {
classuid(1005);
public:
enum ProcessingLevel {
raw = 1,
filtered = 1 << 1,
resampled = 1 << 2,
num_of_levels = 1 << 3
};
IOManager(const Config& i_cfg);
//Legacy support to support functionality of the IOInterface superclass:
void read2DGrid(Grid2DObject& grid_out, const std::string& parameter="");
void readDEM(DEMObject& dem_out);
void readAssimilationData(const Date& date_in, Grid2DObject& da_out);
void readLanduse(Grid2DObject& landuse_out);
void readSpecialPoints(std::vector<Coords>& pts);
void write2DGrid(const Grid2DObject& grid_in, const std::string& options="");
//end legacy support
unsigned int getStationData(const Date& date, std::vector<StationData>& vecStation);
unsigned int getMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo);
unsigned int getMeteoData(const Date& i_date, std::vector<MeteoData>& vecMeteo);
void interpolate(const Date& date, const DEMObject& dem, const MeteoData::Parameters& meteoparam,
Grid2DObject& result, std::string& info_string);
void interpolate(const Date& date, const DEMObject& dem, const MeteoData::Parameters& meteoparam,
Grid2DObject& result);
void setProcessingLevel(const unsigned int& i_level);
double getAvgSamplingRate();
void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo, const std::string& name="");
friend std::ostream& operator<<(std::ostream& os, const IOManager& io);
private:
void add_to_cache(const Date& i_date, const std::vector<MeteoData>& vecMeteo);
void fill_filtered_cache();
bool read_filtered_cache(const Date& start_date, const Date& end_date,
std::vector<METEO_DATASET>& vec_meteo);
const Config& cfg;
IOHandler rawio;
BufferedIOHandler bufferedio;
MeteoProcessor meteoprocessor;
ProcessingProperties proc_properties;
std::map<Date, std::vector<MeteoData> > meteo_cache;
std::vector< std::vector<MeteoData> > filtered_cache;
Date fcache_start, fcache_end;
unsigned int processing_level;
};
} //end namespace
#endif
......@@ -415,7 +415,7 @@ template<> bool IOUtils::convertString<Coords>(Coords& t, const std::string& str
void IOUtils::getProjectionParameters(const Config& cfg, std::string& coordin, std::string& coordinparam,
std::string& coordout, std::string& coordoutparam) {
std::string& coordout, std::string& coordoutparam) {
cfg.getValue("COORDSYS", "Input", coordin);
cfg.getValue("COORDPARAM", "Input", coordinparam, Config::nothrow);
cfg.getValue("COORDSYS", "Output", coordout, Config::nothrow);
......@@ -449,7 +449,7 @@ unsigned int IOUtils::seek(const Date& soughtdate, const std::vector<MeteoData>&
}
//if we reach this point: the date is spanned by the buffer and there are at least two elements
//HACK: would it be better to create a timesries object and call vector's binary search on it?
//HACK: would it be better to create a timeseries object and call vector's binary search on it?
if (exactmatch){
unsigned int first = 1, last = vecM.size()-1;
......
......@@ -290,7 +290,7 @@ namespace IOUtils {
std::string& coordout, std::string& coordoutparam);
/**
* @brief A function that parses a Config object for the TZ keyword and returns the timezone
* @brief A function that parses a Config object for the time_zone keyword and returns the timezone
* @param[in] cfg A Config object
* @param[out] tz_in value to be used for the input timezone
* @param[out] tz_out value to be used for the output timezone
......
......@@ -21,7 +21,7 @@ using namespace std;
namespace mio {
Meteo1DInterpolator::Meteo1DInterpolator(const Config& _cfg) : cfg(_cfg) {
Meteo1DInterpolator::Meteo1DInterpolator(const Config& in_cfg) : cfg(in_cfg) {
/*
* By reading the Config object build up a list of user configured resampling algorithm
* for each MeteoData::Parameters parameter (i.e. each member variable like ta, p, hnw, ...)
......@@ -47,8 +47,7 @@ Meteo1DInterpolator::Meteo1DInterpolator(const Config& _cfg) : cfg(_cfg) {
if (window_size <= 0.01)
throw IOException("WINDOW_SIZE not valid", AT);
/*//For debugging only:
/*//For debugging only:
for (unsigned int jj=0; jj<tasklist.size(); jj++){
cout << MeteoData::getParameterName(jj) << "::" << tasklist[jj] << endl;
for (unsigned int ii=0; ii<taskargs[jj].size(); ii++){
......@@ -97,8 +96,6 @@ unsigned int Meteo1DInterpolator::resampleData(const Date& date, std::vector<Met
unsigned int ii = 0;
for (ii=0; ii<tasklist.size(); ii++){ //For all meteo parameters
//cout << "For parameter: " << MeteoData::getParameterName(ii) << ": " << tasklist[ii] << endl;
if (tasklist[ii] != "no") //resampling can be disabled by stating e.g. TA::resample = no
ResamplingAlgorithms::getAlgorithm(tasklist[ii])(position, ii, taskargs[ii], vecM);
}
......
......@@ -56,7 +56,7 @@ class Meteo1DInterpolator {
*
* @param[in] _cfg Config object that holds the MeteoFilter configuration in the [Filters] section
*/
Meteo1DInterpolator(const Config& _cfg);
Meteo1DInterpolator(const Config& in_cfg);
/**
* @brief A function that executes all the resampling algorithms that have been setup in the constructor
......
......@@ -73,7 +73,7 @@ const std::string& MeteoData::getNameForParameter(const unsigned int& parindex)
}
void MeteoData::initParameterMap()
{
{//NOTE: any performace improvement here would make a big difference...
//Associate unsigned int value and a string representation of a meteo parameter
meteoparamname[TA] = "TA";
meteoparamname[ISWR] = "ISWR";
......@@ -167,6 +167,7 @@ MeteoData::MeteoData(const MeteoData& md)
MeteoData& MeteoData::operator=(const MeteoData& rhs)
{
//NOTE: any performace improvement here would make a big difference...
if (this == &rhs) //Test self assignment
return *this;
......
......@@ -58,7 +58,7 @@
#include <meteoio/meteofilters/ProcessingStack.h>
#include <meteoio/meteofilters/RateFilter.h>
#include <meteoio/meteofilters/WindowedFilter.h>
#include <meteoio/MeteoIO.h>
//#include <meteoio/MeteoIO.h>
#include <meteoio/meteolaws/Atmosphere.h>
#include <meteoio/meteolaws/Meteoconst.h>
#include <meteoio/meteolaws/Sun.h>
......
......@@ -25,15 +25,12 @@ MeteoProcessor::MeteoProcessor(const Config& cfg) : mi1d(cfg)
{
//Parse [Filters] section, create processing stack for each configured parameter
set<string> set_of_used_parameters;
//unsigned int nr_of_parameters =
get_parameters(cfg, set_of_used_parameters);
for (set<string>::const_iterator it = set_of_used_parameters.begin(); it != set_of_used_parameters.end(); it++){
//cout << "Creating stack for parameter: " << *it << endl;
ProcessingStack* tmp = new ProcessingStack(cfg, *it);
processing_stack[*it] = tmp;
}
//cout << "NrOfParameters: " << nr_of_parameters << endl;
}
MeteoProcessor::~MeteoProcessor()
......@@ -91,9 +88,8 @@ void MeteoProcessor::process(const std::vector< std::vector<MeteoData> >& ivec,
{
//call the different processing stacks
std::vector< std::vector<MeteoData> > vec_tmp;
//cout << "Calling processing stacks for all parameters" << endl;