WSL/SLF GitLab Repository

Commit 042e9854 authored by Thomas Egger's avatar Thomas Egger
Browse files

The changes to the IOInterface (no more vec<vec<StationData>>) have been...

The changes to the IOInterface (no more vec<vec<StationData>>) have been propagated into all plugins.
parent 3f940ba5
......@@ -253,18 +253,14 @@ void ARCIO::readStationData(const Date&, std::vector<StationData>&)
throw IOException("Nothing implemented here", AT);
}
void ARCIO::readMeteoData(const Date&, const Date&,
std::vector< std::vector<MeteoData> >&,
std::vector< std::vector<StationData> >&,
void ARCIO::readMeteoData(const Date&, const Date&, std::vector< std::vector<MeteoData> >&,
const unsigned int&)
{
//Nothing so far
throw IOException("Nothing implemented here", AT);
}
void ARCIO::writeMeteoData(const std::vector< std::vector<MeteoData> >&,
const std::vector< std::vector<StationData> >&,
const std::string&)
void ARCIO::writeMeteoData(const std::vector< std::vector<MeteoData> >&, const std::string&)
{
//Nothing so far
throw IOException("Nothing implemented here", AT);
......
......@@ -56,10 +56,8 @@ class ARCIO : public IOInterface {
virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex=IOUtils::npos);
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::vector< std::vector<StationData> >& vecStation,
const std::string& name="");
virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
virtual void readSpecialPoints(std::vector<Coords>& pts);
......
......@@ -157,17 +157,15 @@ void ARPSIO::readStationData(const Date&, std::vector<StationData>& /*vecStation
}
void ARPSIO::readMeteoData(const Date& /*dateStart*/, const Date& /*dateEnd*/,
std::vector< std::vector<MeteoData> >& /*vecMeteo*/,
std::vector< std::vector<StationData> >& /*vecStation*/,
const unsigned int&)
std::vector< std::vector<MeteoData> >& /*vecMeteo*/,
const unsigned int&)
{
//Nothing so far
throw IOException("Nothing implemented here", AT);
}
void ARPSIO::writeMeteoData(const std::vector< std::vector<MeteoData> >& /*vecMeteo*/,
const std::vector< std::vector<StationData> >& /*vecStation*/,
const std::string&)
const std::string&)
{
//Nothing so far
throw IOException("Nothing implemented here", AT);
......
......@@ -60,11 +60,9 @@ class ARPSIO : public IOInterface {
virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex=IOUtils::npos);
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::vector< std::vector<StationData> >& vecStation,
const std::string& name="");
virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
......
......@@ -96,7 +96,6 @@ void BormaIO::readLanduse(Grid2DObject&)
}
void BormaIO::writeMeteoData(const std::vector< std::vector<MeteoData> >&,
const std::vector< std::vector<StationData> >&,
const std::string&)
{
//Nothing so far
......@@ -112,7 +111,6 @@ void BormaIO::readStationData(const Date&, std::vector<StationData>&)
void BormaIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex)
{
if (vecStationName.size() == 0)
......@@ -123,12 +121,10 @@ void BormaIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
//The following part decides whether all the stations are rebuffered or just one station
if (stationindex == IOUtils::npos){
vecMeteo.clear();
vecStation.clear();
vecMeteo.insert(vecMeteo.begin(), vecStationName.size(), std::vector<MeteoData>());
vecStation.insert(vecStation.begin(), vecStationName.size(), std::vector<StationData>());
} else {
if ((stationindex < vecMeteo.size()) && (stationindex < vecStation.size())){
if (stationindex < vecMeteo.size()){
indexStart = stationindex;
indexEnd = stationindex+1;
} else {
......@@ -138,7 +134,7 @@ void BormaIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
for (unsigned int ii=indexStart; ii<indexEnd; ii++){ //loop through stations
//cout << vecStationName[ii] << endl;
bufferData(dateStart, dateEnd, vecMeteo, vecStation, ii);
bufferData(dateStart, dateEnd, vecMeteo, ii);
}
}
......@@ -221,7 +217,6 @@ void BormaIO::getFiles(const std::string& stationname, const Date& start_date, c
bool BormaIO::bufferData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationnr)
{
std::vector<std::string> vecFiles;
......@@ -232,7 +227,6 @@ bool BormaIO::bufferData(const Date& dateStart, const Date& dateEnd,
}
vecMeteo[stationnr].clear();
vecStation[stationnr].clear();
getFiles(vecStationName[stationnr], dateStart, dateEnd, vecFiles, vecDate);
//cout << "[i] Buffering station number: " << vecStationName[stationnr] << " " << vecFiles.size() << " files" << endl;
......@@ -245,8 +239,8 @@ bool BormaIO::bufferData(const Date& dateStart, const Date& dateEnd,
MeteoData meteoData;
StationData stationData;
xmlExtractData(vecFiles[ii], vecDate[ii], meteoData, stationData);
meteoData.meta = stationData;
vecMeteo[stationnr].push_back(meteoData);
vecStation[stationnr].push_back(stationData);
}
return true;
......
......@@ -57,11 +57,9 @@ class BormaIO : public IOInterface {
virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex=IOUtils::npos);
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::vector< std::vector<StationData> >& vecStation,
const std::string& name="");
virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
......@@ -89,7 +87,6 @@ class BormaIO : public IOInterface {
void readStationNames(void);
bool bufferData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationnr);
Config cfg;
......
......@@ -146,7 +146,6 @@ void GSNIO::readLanduse(Grid2DObject&)
}
void GSNIO::writeMeteoData(const std::vector< std::vector<MeteoData> >&,
const std::vector< std::vector<StationData> >&,
const std::string&)
{
//Nothing so far
......@@ -170,7 +169,6 @@ void GSNIO::readStationData(const Date&, std::vector<StationData>& vecStation)
void GSNIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex)
{
if (vecStationName.size() == 0)
......@@ -184,12 +182,9 @@ void GSNIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
//The following part decides whether all the stations are rebuffered or just one station
if (stationindex == IOUtils::npos){
vecMeteo.clear();
vecStation.clear();
vecMeteo.insert(vecMeteo.begin(), vecStationName.size(), vector<MeteoData>());
vecStation.insert(vecStation.begin(), vecStationName.size(), vector<StationData>());
} else {
if ((stationindex < vecMeteo.size()) && (stationindex < vecStation.size())){
if (stationindex < vecMeteo.size()){
indexStart = stationindex;
indexEnd = stationindex+1;
} else {
......@@ -201,7 +196,7 @@ void GSNIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
StationData sd;
readStationMetaData(sd, ii);
readData(dateStart, dateEnd, vecMeteo, vecStation, sd, ii);
readData(dateStart, dateEnd, vecMeteo, sd, ii);
}
}
......@@ -290,7 +285,7 @@ void GSNIO::convertStringToDouble(double& d, const std::string& in_string, const
}
void GSNIO::readData(const Date& dateStart, const Date& dateEnd, std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation, const StationData& sd, const unsigned int& stationindex)
const StationData& sd, const unsigned int& stationindex)
{
_ns1__getMeteoData meteodata_req;
_ns1__getMeteoDataResponse meteodata;
......@@ -324,11 +319,11 @@ void GSNIO::readData(const Date& dateStart, const Date& dateEnd, std::vector< st
cout << "\t[D] GSN: nr of datasets received for station "<< stationindex << ": " << meteodata.return_.size() << endl;
for (unsigned int jj=0; jj<meteodata.return_.size(); jj++){
MeteoData md;
md.meta = sd;
parseString(meteodata.return_[jj], vecString, md);
convertUnits(md);
vecMeteo[stationindex].push_back(md);
vecStation[stationindex].push_back(sd);
}
} else {
soap_print_fault(&gsn, stderr);
......
......@@ -54,11 +54,9 @@ class GSNIO : public IOInterface {
virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex=IOUtils::npos);
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::vector< std::vector<StationData> >& vecStation,
const std::string& name="");
virtual void read2DGrid(Grid2DObject& dem_out, const std::string& parameter="");
......@@ -76,7 +74,7 @@ class GSNIO : public IOInterface {
void readStationNames();
void readStationMetaData(StationData& sd, const unsigned int& stationindex);
void readData(const Date& dateStart, const Date& dateEnd, std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation, const StationData& sd, const unsigned int& stationindex);
const StationData& sd, const unsigned int& stationindex);
A3DWebServiceSoap12BindingProxy gsn;
Config cfg;
......
......@@ -107,7 +107,6 @@ void GeotopIO::initParamNames(std::map<std::string, unsigned int>& mapParam)
void GeotopIO::writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::vector< std::vector<StationData> >& vecStation,
const std::string&)
{
string path="";
......@@ -129,10 +128,10 @@ void GeotopIO::writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMe
fout.open(string(path + "/_meteo.txt").c_str());
fout << "/* Automatically generated by MeteoIO */" << endl << endl;
fout << "index{2}" << endl << endl;
fout << "1: double matrix meteo_station{" << vecStation.size() << ",13}" << endl;
for (unsigned int ii=0; ii<vecStation.size(); ii++){
if (vecStation.at(ii).size()>0){
Coords coord = vecStation.at(ii).at(0).position;
fout << "1: double matrix meteo_station{" << vecMeteo.size() << ",13}" << endl;
for (unsigned int ii=0; ii<vecMeteo.size(); ii++){
if (vecMeteo.at(ii).size()>0){
Coords coord = vecMeteo.at(ii).at(0).meta.position;
coord.setProj(coordout, coordoutparam); //Setting the output projection
fout.precision(12);
fout << coord.getEasting() << "\t" << coord.getNorthing() << "\t"
......@@ -202,16 +201,14 @@ void GeotopIO::readStationData(const Date&, std::vector<StationData>& vecStation
}
void GeotopIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex)
std::vector< std::vector<MeteoData> >& vecMeteo,
const unsigned int& stationindex)
{
vector<std::string> tmpvec, vecColumnNames;
string line="", filename="", path="", prefix="";
(void)stationindex;
vecMeteo.clear();
vecStation.clear();
cfg.getValue("METEOPATH", "Input", path);
cfg.getValue("METEOPREFIX", "Input", prefix);
......@@ -227,7 +224,6 @@ void GeotopIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
for (unsigned int ii=0; ii<myStations.size(); ii++) {
vecMeteo.push_back( vector<MeteoData>() );
vecStation.push_back( vector<StationData>() );
stringstream ss;
ss.fill('0');
......@@ -236,19 +232,16 @@ void GeotopIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
filename = ss.str();
//cout << ss.str() << endl;
if (!IOUtils::validFileName(filename)) {
if (!IOUtils::validFileName(filename))
throw InvalidFileNameException(filename, AT);
}
if (!IOUtils::fileExists(filename)) {
if (!IOUtils::fileExists(filename))
throw FileNotFoundException(filename, AT);
}
fin.clear();
fin.open (filename.c_str(), std::ifstream::in);
if (fin.fail()) {
if (fin.fail())
throw FileAccessException(filename, AT);
}
char eoln = IOUtils::getEoln(fin); //get the end of line character for the file
......@@ -269,6 +262,7 @@ void GeotopIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
getline(fin, line, eoln); //read complete line of data
MeteoData md;
md.meta = myStations[ii];
if (IOUtils::readLineToVec(line, tmpvec, ',') != ncols) {
break;
//throw InvalidFormatException("Premature End " + filename, AT);
......@@ -295,7 +289,6 @@ void GeotopIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
if ((md.date >= dateStart) && (md.date <= dateEnd)){
convertUnits(md);
vecMeteo[ii].push_back(md);
vecStation[ii].push_back(myStations[ii]);
}
}
} catch(std::exception& e) {
......
......@@ -52,12 +52,9 @@ class GeotopIO : public IOInterface {
virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex=IOUtils::npos);
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::vector< std::vector<StationData> >& vecStation,
const std::string& name="");
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo, const std::string& name="");
virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
virtual void readSpecialPoints(std::vector<Coords>& pts);
......
......@@ -202,17 +202,14 @@ void GrassIO::readStationData(const Date&, std::vector<StationData>&)
throw IOException("Nothing implemented here", AT);
}
void GrassIO::readMeteoData(const Date&, const Date&,
std::vector< std::vector<MeteoData> >&,
std::vector< std::vector<StationData> >&,
const unsigned int&)
void GrassIO::readMeteoData(const Date&, const Date&, std::vector< std::vector<MeteoData> >&,
const unsigned int&)
{
//Nothing so far
throw IOException("Nothing implemented here", AT);
}
void GrassIO::writeMeteoData(const std::vector< std::vector<MeteoData> >&,
const std::vector< std::vector<StationData> >&,
const std::string&)
{
//Nothing so far
......
......@@ -56,11 +56,9 @@ class GrassIO : public IOInterface {
virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex=IOUtils::npos);
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::vector< std::vector<StationData> >& vecStation,
const std::string& name="");
virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
......
......@@ -237,7 +237,6 @@ void ImisIO::write2DGrid(const Grid2DObject&, const std::string&)
}
void ImisIO::writeMeteoData(const std::vector< std::vector<MeteoData> >&,
const std::vector< std::vector<StationData> >&,
const std::string&)
{
//Nothing so far
......@@ -281,7 +280,7 @@ void ImisIO::readStationData(const Date&, std::vector<StationData>& vecStation)
}
}
vecStation = vecMyStation;
vecStation = vecMyStation; //vecMyStation is a global vector holding all meta data
}
/**
......@@ -403,9 +402,7 @@ void ImisIO::readStationNames(std::vector<std::string>& vecStationName)
}
void ImisIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
void ImisIO::readMeteoData(const Date& dateStart, const Date& dateEnd, std::vector< std::vector<MeteoData> >& vecMeteo,
const unsigned int& stationindex)
{
Environment *env = NULL;
......@@ -427,12 +424,9 @@ void ImisIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
//The following part decides whether all the stations are rebuffered or just one station
if (stationindex == IOUtils::npos){
vecMeteo.clear();
vecStation.clear();
vecMeteo.insert(vecMeteo.begin(), vecMyStation.size(), vector<MeteoData>());
vecStation.insert(vecStation.begin(), vecMyStation.size(), vector<StationData>());
} else {
if ((stationindex < vecMeteo.size()) && (stationindex < vecStation.size())){
if (stationindex < vecMeteo.size()){
indexStart = stationindex;
indexEnd = stationindex+1;
} else {
......@@ -444,18 +438,15 @@ void ImisIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
openDBConnection(env, conn);
for (unsigned int ii=indexStart; ii<indexEnd; ii++) //loop through stations
readData(dateStart, dateEnd, vecMeteo, vecStation, ii, vecMyStation, env, conn);
readData(dateStart, dateEnd, vecMeteo, ii, vecMyStation, env, conn);
if (useAnetz){ //Important: we don't care about the metadata for ANETZ stations
map<string, unsigned int> mapAnetzNames;
vector<StationData> vecAnetzStation;
vector< vector<MeteoData> > vecMeteoAnetz;
vector< vector<StationData> > vecStationAnetz;
findAnetzStations(indexStart, indexEnd, mapAnetzNames, vecAnetzStation);
vecMeteoAnetz.insert(vecMeteoAnetz.begin(), vecAnetzStation.size(), vector<MeteoData>());
vecStationAnetz.insert(vecStationAnetz.begin(), vecAnetzStation.size(), vector<StationData>());
//date_anetz_start/end must be changed to be a multiple of 6h before the original dateStart, dateEnd
Date date_anetz_start = Date(floor(dateStart.getJulianDate() * 4.0) / 4.0);
......@@ -463,10 +454,10 @@ void ImisIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
//read Anetz Data
for (unsigned int ii=0; ii<vecAnetzStation.size(); ii++)
readData(date_anetz_start, dateEnd, vecMeteoAnetz, vecStationAnetz, ii, vecAnetzStation, env, conn);
readData(date_anetz_start, dateEnd, vecMeteoAnetz, ii, vecAnetzStation, env, conn);
for (unsigned int ii=indexStart; ii<indexEnd; ii++) //loop through relevant stations
assimilateAnetzData(date_anetz_start, date_anetz_end, vecStation, vecMeteoAnetz, mapAnetzNames, ii, vecMeteo);
assimilateAnetzData(date_anetz_start, date_anetz_end, vecMeteoAnetz, mapAnetzNames, ii, vecMeteo);
}
closeDBConnection(env, conn);
......@@ -476,8 +467,8 @@ void ImisIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
}
}
void ImisIO::assimilateAnetzData(const Date& dateStart, const Date& dateEnd, const std::vector< std::vector<StationData> >& vecStation,
const std::vector< std::vector<MeteoData> >& vecMeteoAnetz,
void ImisIO::assimilateAnetzData(const Date& dateStart, const Date& dateEnd,
const std::vector< std::vector<MeteoData> >& vecMeteoAnetz,
const std::map<std::string, unsigned int>& mapAnetzNames, const unsigned int& stationindex,
std::vector< std::vector<MeteoData> >& vecMeteo)
......@@ -488,8 +479,8 @@ void ImisIO::assimilateAnetzData(const Date& dateStart, const Date& dateEnd, con
//2. do coefficient calculation (getHNW) for every single station and data point
string stationid = "";
if (vecStation.at(stationindex).size() > 0)
stationid = vecStation[stationindex][0].getStationID();
if (vecMeteoAnetz.at(stationindex).size() > 0)
stationid = vecMeteoAnetz[stationindex][0].meta.getStationID();
map<string,AnetzData>::const_iterator it = mapAnetz.find(stationid); //find the AnetzData for this station
if (it != mapAnetz.end()){
......@@ -652,15 +643,13 @@ void ImisIO::findAnetzStations(const unsigned int& indexStart, const unsigned in
* @param dateStart The beginning of the interval to retrieve data for
* @param dateEnd The end of the interval to retrieve data for
* @param vecMeteo The vector that will hold all MeteoData for each station
* @param vecStation The vector that will hold all StationData for each station
* @param stationindex The index of the station as specified in the Config
*/
void ImisIO::readData(const Date& dateStart, const Date& dateEnd, std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation, const unsigned int& stationindex,
const std::vector<StationData>& vecStationNames, oracle::occi::Environment*& env, oracle::occi::Connection*& conn)
const unsigned int& stationindex, const std::vector<StationData>& vecStationNames,
oracle::occi::Environment*& env, oracle::occi::Connection*& conn)
{
vecMeteo.at(stationindex).clear();
vecStation.at(stationindex).clear();
string stationName="", stationNumber="";
vector< vector<string> > vecResult;
......@@ -690,23 +679,21 @@ void ImisIO::readData(const Date& dateStart, const Date& dateEnd, std::vector< s
getImisData(stationName, stationNumber, datestart, dateend, vecResult, env, conn);
MeteoData tmpmd;
tmpmd.meta = vecStationNames.at(stationindex);
//tmpmd.date.setTimeZone(in_tz);
for (unsigned int ii=0; ii<vecResult.size(); ii++){
parseDataSet(vecResult[ii], tmpmd);
convertUnits(tmpmd);
const StationData& sd = vecStationNames.at(stationindex);
//For IMIS stations the hnw value is a rate (mm/h), therefore we need to
//divide it by two to conjure the accumulated value for the half hour
if (sd.stationID.length() > 0){
if (sd.stationID[0] != '*') //excludes ANETZ stations, they come in hourly sampling
if (tmpmd.meta.stationID.length() > 0){
if (tmpmd.meta.stationID[0] != '*') //excludes ANETZ stations, they come in hourly sampling
if (tmpmd.hnw != IOUtils::nodata)
tmpmd.hnw /= 2; //half hour accumulated value for IMIS stations only
}
//Now insert tmpmd and a StationData object
vecMeteo.at(stationindex).push_back(tmpmd);
vecStation.at(stationindex).push_back(sd);
vecMeteo.at(stationindex).push_back(tmpmd); //Now insert tmpmd
}
}
......
......@@ -92,11 +92,9 @@ class ImisIO : public IOInterface {
virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex=IOUtils::npos);
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::vector< std::vector<StationData> >& vecStation,
const std::string& name="");
virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
......@@ -121,9 +119,8 @@ class ImisIO : public IOInterface {
oracle::occi::Environment*& env, oracle::occi::Connection*& conn);
void parseDataSet(const std::vector<std::string>& meteo_in, MeteoData& md);
void readData(const Date& dateStart, const Date& dateEnd, std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation, const unsigned int& stationindex,
const std::vector<StationData>& vecStationNames,
oracle::occi::Environment*& env, oracle::occi::Connection*& conn);
const unsigned int& stationindex, const std::vector<StationData>& vecStationNames,
oracle::occi::Environment*& env, oracle::occi::Connection*& conn);
void readStationNames(std::vector<std::string>& vecStationName);
void parseStationName(const std::string& stationName, std::string& stName, std::string& stNumber);
void readStationMetaData(oracle::occi::Connection*& conn);
......@@ -135,12 +132,11 @@ class ImisIO : public IOInterface {
void getAnetzHNW(const AnetzData& ad, const std::map<std::string, unsigned int>& mapAnetzNames,
const std::vector< std::vector<double> >& vec_of_psums, std::vector<double>& psum);
void assimilateAnetzData(const Date& dateStart, const Date& dateEnd,
const std::vector< std::vector<StationData> >& vecStation,
const std::vector< std::vector<MeteoData> >& vecMeteoAnetz,
const std::map<std::string, unsigned int>& mapAnetzNames, const unsigned int& stationindex,
std::vector< std::vector<MeteoData> >& vecMeteo);
const std::vector< std::vector<MeteoData> >& vecMeteoAnetz,
const std::map<std::string, unsigned int>& mapAnetzNames, const unsigned int& stationindex,
std::vector< std::vector<MeteoData> >& vecMeteo);
void calculatePsum(const Date& dateStart, const Date& dateEnd, const std::vector< std::vector<MeteoData> >& vecMeteoAnetz,
std::vector< std::vector<double> >& vec_of_psums);
std::vector< std::vector<double> >& vec_of_psums);
static const double in_tz; //timezone
Config cfg;
......
......@@ -189,7 +189,6 @@ void PGMIO::readStationData(const Date&, std::vector<StationData>& /*vecStation*
void PGMIO::readMeteoData(const Date& /*dateStart*/, const Date& /*dateEnd*/,
std::vector< std::vector<MeteoData> >& /*vecMeteo*/,
std::vector< std::vector<StationData> >& /*vecStation*/,
const unsigned int&)
{
//Nothing so far
......@@ -197,8 +196,7 @@ void PGMIO::readMeteoData(const Date& /*dateStart*/, const Date& /*dateEnd*/,
}
void PGMIO::writeMeteoData(const std::vector< std::vector<MeteoData> >& /*vecMeteo*/,
const std::vector< std::vector<StationData> >& /*vecStation*/,
const std::string&)
const std::string&)
{
//Nothing so far
throw IOException("Nothing implemented here", AT);
......
......@@ -56,11 +56,9 @@ class PGMIO : public IOInterface {
virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
std::vector< std::vector<StationData> >& vecStation,
const unsigned int& stationindex=IOUtils::npos);
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::vector< std::vector<StationData> >& vecStation,
const std::string& name="");
virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
......
......@@ -302,13 +302,12 @@ void SMETIO::parseInputOutputSection()