WSL/SLF GitLab Repository

Commit f6908352 authored by Marc Diebold's avatar Marc Diebold
Browse files

A few missing/wrong includes have been found after the commit of Thomas. This has been fixed.

A new version of the CosmoXMLIO plugin is also part of this commit, with some necessary fixes in the CMakeLists
parent 908036d4
......@@ -76,6 +76,7 @@ void IOHandler::registerPlugins()
mapPlugins["ARPS"] = IOPlugin("libarpsio"+popc_extra+libsuffix, "ARPSIO", NULL, NULL);
mapPlugins["PGM"] = IOPlugin("libpgmio"+popc_extra+libsuffix, "PGMIO", NULL, NULL);
mapPlugins["SMET"] = IOPlugin("libsmetio"+popc_extra+libsuffix, "SMETIO", NULL, NULL);
mapPlugins["COSMOXML"] = IOPlugin("libcosmoxmlio"+popc_extra+libsuffix, "CosmoXMLIO", NULL, NULL);
}
#ifdef _POPC_
......
......@@ -76,12 +76,12 @@ namespace mio {
* MeteoIO can be seen as a set of modules that is focused on the handling of input/output operations (including data preparation) for numerical simulations in the realm of earth sciences. On the visible side, it offers the following modules:
* - a set of plugins for accessing the data (for example, a plugin might be responsible for fetching the raw data from a given database)
* - a set of filters and processing elements for applying transformations to the data (for example, a filter might remove all data that is out of range)
* - a set of spatial interpolation algorithms (for example, such an algorithm might perform Inverse DIstance Weighting for filling a grid with spatially interpolated data)
* - a set of spatial interpolation algorithms (for example, such an algorithm might perform Inverse Distance Weighting for filling a grid with spatially interpolated data)
*
* Moreover, a few assumptions are made about the data that you are using: each data point has to be associated with a geographic location (defined by some sort of coordinates) and very often you will also need to provide a Digital Elevation Model. Therefore, you will also notice a few extra modules that come to play on the visible side:
* - a module to deal with Digital Elevation Models. Such module will, for example, interpret a grid of data as a grid of elevations and compute a grid of slopes.
* - a module to deal with coordinate systems. Such module will require you to define which coordinate system are your data in and transparently handle potential coordinate conversions in the program that you are using.
* - a module to deal with... configuration files. The program that you are using might be using this module for other configuration files.
* - a module to deal with configuration files. The program that you are using might be using this module for other configuration files.
*
* @section Config Configuration file
* @subsection Config_syntax Configuration file syntax
......
......@@ -22,7 +22,7 @@
#include <meteoio/StationData.h>
#include <meteoio/Config.h>
#include <meteoio/ResamplingAlgorithms.h>
#include <meteoio/ProcessingBlock.h>
#include <meteoio/meteofilters/ProcessingBlock.h>
#include <iostream>
#include <string>
......
......@@ -45,9 +45,12 @@
#include <meteoio/Meteo1DInterpolator.h>
#include <meteoio/Meteo2DInterpolator.h>
#include <meteoio/MeteoData.h>
#include <meteoio/MeteoFilter.h>
#include <meteoio/MeteoProcessor.h>
#include <meteoio/ResamplingAlgorithms.h>
//#include <meteoio/MeteoFilter.h> //HACK: is it obsolete?
#include <meteoio/MeteoProcessor.h> //HACK: is it obsolete?
#include <meteoio/meteofilters/FilterBlock.h>
#include <meteoio/meteofilters/ProcessingBlock.h>
#include <meteoio/meteofilters/ProcessingStack.h>
#include <meteoio/ResamplingAlgorithms.h> //HACK: is it obsolete?
#include <meteoio/StationData.h>
#include <meteoio/IOManager.h>
......
#include <meteoio/FilterBlock.h>
/***********************************************************************************/
/* 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/>.
*/
#include <meteoio/meteofilters/FilterBlock.h>
namespace mio {
......
......@@ -19,7 +19,7 @@
#define __FILTERBLOCK_H__
#include <meteoio/MeteoData.h>
#include <meteoio/ProcessingBlock.h>
#include <meteoio/meteofilters/ProcessingBlock.h>
#include <vector>
#include <string>
#include <set>
......
......@@ -17,6 +17,7 @@ IF(DEST MATCHES "par")
SET(GSNIONAME gsniopopc)
SET(IMISIONAME imisiopopc)
SET(BORMAIONAME bormaiopopc)
SET(COSMOXMLIONAME cosmoxmliopopc)
INCLUDE(CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(popcc POPCC)
......@@ -33,6 +34,7 @@ ELSE(DEST)
SET(GSNIONAME gsnio)
SET(IMISIONAME imisio)
SET(BORMAIONAME bormaio)
SET(COSMOXMLIONAME cosmoxmlio)
SET(SHAREDNAME ${PROJECT_NAME})
ENDIF(DEST MATCHES "par")
......@@ -150,6 +152,18 @@ IF(PLUGIN_BORMAIO)
SET(MYPLUGINS ${MYPLUGINS} ${BORMAIONAME})
ENDIF(PLUGIN_BORMAIO)
IF(PLUGIN_COSMOXMLIO)
FIND_PACKAGE(LibXML++ REQUIRED)
INCLUDE_DIRECTORIES(${LibXML++_INCLUDE_DIRS})
ADD_LIBRARY(${COSMOXMLIONAME} CosmoXMLIO.cc)
TARGET_LINK_LIBRARIES(${COSMOXMLIONAME} ${LibXML++_LIBRARIES} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${COSMOXMLIONAME} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${COSMOXMLIONAME})
ENDIF(PLUGIN_COSMOXMLIO)
INSTALL(TARGETS ${MYPLUGINS}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib/meteoio/plugins
......
......@@ -15,8 +15,8 @@
You should have received a copy of the GNU Lesser General Public License
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CosmoXMLIO.h"
#include <Atmosphere.h>
#include <meteoio/plugins/CosmoXMLIO.h>
#include <meteoio/meteolaws/Atmosphere.h>
using namespace std;
......@@ -203,7 +203,7 @@ void CosmoXMLIO::readMeteoData(const Date& /*dateStart*/, const Date& /*dateEnd*
//Initialize variables
double altitude=IOUtils::nodata, latitude=IOUtils::nodata, longitude=IOUtils::nodata;
double nodata=IOUtils::nodata;
double temperature=IOUtils::nodata, dew_point=IOUtils::nodata, global_radiation=IOUtils::nodata;
double temperature=IOUtils::nodata, dew_point=IOUtils::nodata, humidity=IOUtils::nodata, global_radiation=IOUtils::nodata;
double rain=IOUtils::nodata, wind_speed=IOUtils::nodata, max_wind_speed=IOUtils::nodata;
Date olddate=IOUtils::nodata, newdate=IOUtils::nodata;
int write=0;
......@@ -250,7 +250,7 @@ void CosmoXMLIO::readMeteoData(const Date& /*dateStart*/, const Date& /*dateEnd*
meteo.meta = station;
meteo.ta=temperature;
//meteo.rh=humidity;
meteo.rh=DewPointtoRh(humidity,temperature,TRUE) //Create humidity from the dew point
meteo.rh=Atmosphere::DewPointtoRh(humidity,temperature,TRUE); //Create humidity from the dew point
meteo.iswr=global_radiation;
meteo.hnw=rain;
meteo.vw=wind_speed;
......@@ -270,7 +270,7 @@ void CosmoXMLIO::readMeteoData(const Date& /*dateStart*/, const Date& /*dateEnd*
}
meteo.meta = station;
meteo.ta=temperature;
meteo.rh=DewPointtoRh(humidity,temperature,TRUE) //Create humidity from the dew point
meteo.rh=Atmosphere::DewPointtoRh(humidity,temperature,TRUE); //Create humidity from the dew point
meteo.iswr=global_radiation;
meteo.hnw=rain;
meteo.vw=wind_speed;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment