WSL/SLF GitLab Repository

Commit ed696434 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

The plugins now export their symbols when compiled with Visual C++.

The arrays are now using the vector filling methods when possible. A specialized template for convertString(unsigned int) has been written. 

A two segments linear fit (for elevation detrending) has been implemented with a fixed inflection point. This is quite primitive but allows the LLIDW spatial interpolation to use it and therefore to behave like the traditional SLF SnowFit program. More work will be needed for fully configurable regression algorithm choice though... 

Some namming issues have been fixed in COSMOXML. A better emissivity handling has been implemented in SNIO to be closer to the original Snowpack (ie: compute clear sky ILWR when no cloudiness/emissivity is given).
parent 72822861
......@@ -282,8 +282,8 @@ template<class T> Array<T>& Array<T>::operator+=(const Array<T>& rhs)
//Add to every single member of the Array<T>
for (unsigned int ii=0; ii<nx; ii++) {
operator()(ii) += rhs(ii);
}
operator()(ii) += rhs(ii);
}
return *this;
}
......@@ -300,7 +300,7 @@ template<class T> Array<T>& Array<T>::operator+=(const T& rhs)
{
//Add to every single member of the Array<T>
for (unsigned int ii=0; ii<nx; ii++) {
operator()(ii) += rhs;
operator()(ii) += rhs;
}
return *this;
......@@ -322,7 +322,7 @@ template<class T> Array<T>& Array<T>::operator-=(const Array<T>& rhs)
//Substract to every single member of the Array<T>
for (unsigned int ii=0; ii<nx; ii++) {
operator()(ii) -= rhs(ii);
operator()(ii) -= rhs(ii);
}
return *this;
......@@ -340,7 +340,7 @@ template<class T> Array<T>& Array<T>::operator-=(const T& rhs)
{
//Substract to every single member of the Array<T>
for (unsigned int ii=0; ii<nx; ii++) {
operator()(ii) -= rhs;
operator()(ii) -= rhs;
}
return *this;
......@@ -362,7 +362,7 @@ template<class T> Array<T>& Array<T>::operator*=(const Array<T>& rhs)
//Add to every single member of the Array<T>
for (unsigned int ii=0; ii<nx; ii++) {
operator()(ii) *= rhs(ii);
operator()(ii) *= rhs(ii);
}
return *this;
......@@ -380,7 +380,7 @@ template<class T> Array<T>& Array<T>::operator*=(const T& rhs)
{
//Add to every single member of the Array<T>
for (unsigned int ii=0; ii<nx; ii++) {
operator()(ii) *= rhs;
operator()(ii) *= rhs;
}
return *this;
......@@ -402,7 +402,7 @@ template<class T> Array<T>& Array<T>::operator/=(const Array<T>& rhs)
//Divide every single member of the Array<T>
for (unsigned int ii=0; ii<nx; ii++) {
operator()(ii) /= rhs(ii);
operator()(ii) /= rhs(ii);
}
return *this;
......@@ -420,7 +420,7 @@ template<class T> Array<T>& Array<T>::operator/=(const T& rhs)
{
//Divide every single member of the Array<T>
for (unsigned int ii=0; ii<nx; ii++) {
operator()(ii) /= rhs;
operator()(ii) /= rhs;
}
return *this;
......
......@@ -248,10 +248,7 @@ template<class T> void Array2D<T>::resize(const unsigned int& anx, const unsigne
template<class T> void Array2D<T>::resize(const unsigned int& anx, const unsigned int& any, const T& init) {
resize(anx, any);
const unsigned int nxy = ny*nx;
for (unsigned int jj=0; jj<nxy; jj++)
operator()(jj) = init;
std::fill(vecData.begin(), vecData.end(), init);
}
template<class T> void Array2D<T>::size(unsigned int& anx, unsigned int& any) const{
......@@ -363,12 +360,6 @@ template<class T> Array2D<T>& Array2D<T>::operator=(const Array2D<T>& source) {
}
template<class T> Array2D<T>& Array2D<T>::operator=(const T& value) {
//reset every single member of the Array3D<T>
/*for (unsigned int ii=0; ii<nx; ii++) {
for (unsigned int jj=0; jj<ny; jj++) {
operator()(ii,jj) = value;
}
}*/
std::fill(vecData.begin(), vecData.end(), value);
return *this;
}
......
......@@ -280,14 +280,7 @@ template<class T> void Array3D<T>::resize(const unsigned int& anx, const unsigne
template<class T> void Array3D<T>::resize(const unsigned int& anx, const unsigned int& any, const unsigned int& anz, const T& init) {
resize(anx, any, anz);
for (unsigned int ii=0; ii<nz; ii++) {
for (unsigned int jj=0; jj<ny; jj++) {
for (unsigned int kk=0; kk<nx; kk++) {
operator()(kk,jj,ii) = init; //Running through the vector in order of memory alignment
}
}
}
std::fill(vecData.begin(), vecData.end(), init);
}
template<class T> void Array3D<T>::size(unsigned int& anx, unsigned int& any, unsigned int& anz) const {
......@@ -425,14 +418,6 @@ template<class T> Array3D<T>& Array3D<T>::operator=(const Array3D<T>& source) {
}
template<class T> Array3D<T>& Array3D<T>::operator=(const T& value) {
//reset every single member of the Array3D<T>
/*for (unsigned int ii=0; ii<nx; ii++) {
for (unsigned int jj=0; jj<ny; jj++) {
for(unsigned int kk=0; kk<nz; kk++) {
operator()(ii,jj,kk) = value;
}
}
}*/
std::fill(vecData.begin(), vecData.end(), value);
return *this;
}
......
......@@ -132,7 +132,7 @@ class Config {
}
template <typename T> std::vector<T> getValue(const std::string& key, const std::string& section,
const Options& opt=Config::dothrow) const
const Options& opt=Config::dothrow) const
{
std::vector<T> tmp;
getValue(key, section, tmp, opt);
......@@ -150,8 +150,8 @@ class Config {
* @param[in] opt indicating whether an exception should be raised, when key is not present
*/
template <typename T> void getValue(const std::string& key,
std::vector<T>& vecT,
const Options& opt=Config::dothrow) const
std::vector<T>& vecT,
const Options& opt=Config::dothrow) const
{
getValue(key, "GENERAL", vecT, opt);
}
......
......@@ -52,8 +52,8 @@ Grid3DObject::Grid3DObject(const Grid3DObject& _grid3Dobj,
llcorner = _grid3Dobj.llcorner;
if( (llcorner.getEasting()!=IOUtils::nodata) && (llcorner.getNorthing()!=IOUtils::nodata) ) {
llcorner.setXY( llcorner.getEasting()+_nx*_grid3Dobj.cellsize,
llcorner.getNorthing()+_ny*_grid3Dobj.cellsize,
llcorner.getAltitude()+_nz*_grid3Dobj.cellsize );
llcorner.getNorthing()+_ny*_grid3Dobj.cellsize,
llcorner.getAltitude()+_nz*_grid3Dobj.cellsize );
}
}
......
......@@ -253,9 +253,9 @@ void IOUtils::readDirectory(const std::string& path, std::list<std::string>& dir
#endif
void IOUtils::readKeyValueHeader(std::map<std::string,std::string>& headermap,
std::istream& fin,
const unsigned int& linecount,
const std::string& delimiter)
std::istream& fin,
const unsigned int& linecount,
const std::string& delimiter)
{
int linenr = 0;
std::string line="";
......@@ -402,6 +402,33 @@ template<> bool IOUtils::convertString<bool>(bool& t, const std::string& str, st
return true;
}
template<> bool IOUtils::convertString<unsigned int>(unsigned int& t, const std::string& str, std::ios_base& (*f)(std::ios_base&))
{
std::string s = str;
trim(s); //delete trailing and leading whitespaces and tabs
if (s.size() == 0) {
t = unodata;
return true;
} else {
std::istringstream iss(s);
iss.setf(std::ios::fixed);
iss.precision(std::numeric_limits<double>::digits10); //try to read values with maximum precision
iss >> f >> t; //Convert first part of stream with the formatter (e.g. std::dec, std::oct)
if (iss.fail()) {
//Conversion failed
return false;
}
std::string tmp="";
getline(iss, tmp); //get rest of line, if any
trim(tmp);
if ((tmp.length() > 0) && tmp[0] != '#' && tmp[0] != ';') {
//if line holds more than one value it's invalid
return false;
}
return true;
}
}
bool IOUtils::convertString(Date& t, const std::string& str, const double& time_zone, std::ios_base& (*f)(std::ios_base&))
{
std::string s = str;
......
......@@ -194,6 +194,7 @@ namespace IOUtils {
// fully specialized template functions (implementation must not be in header)
template<> bool convertString<std::string>(std::string& t, const std::string& str, std::ios_base& (*f)(std::ios_base&));
template<> bool convertString<bool>(bool& t, const std::string& str, std::ios_base& (*f)(std::ios_base&));
template<> bool convertString<unsigned int>(unsigned int& t, const std::string& str, std::ios_base& (*f)(std::ios_base&));
template<> bool convertString<Coords>(Coords& t, const std::string& str, std::ios_base& (*f)(std::ios_base&));
bool convertString(Date& t, const std::string& str, const double& time_zone, std::ios_base& (*f)(std::ios_base&) = std::dec);
......@@ -207,7 +208,7 @@ namespace IOUtils {
* @param[in] options Extra options, by default IOUtils::dothrow
*/
template <class T> void getValueForKey(const std::map<std::string,std::string>& properties,
const std::string& key, T& t, const unsigned int& options=IOUtils::dothrow){
const std::string& key, T& t, const unsigned int& options=IOUtils::dothrow){
if (key == "") {
throw InvalidArgumentException("Empty key", AT);
}
......
......@@ -290,7 +290,8 @@ class IDWLapseAlgorithm : public InterpolationAlgorithm {
* @brief Inverse Distance Weighting interpolation algorithm with elevation detrending/reprojection.
* The closest n stations (n being given as an extra argument of <i>"idw_lapse"</i>) to each pixel are
* used to compute the local lapse rate, allowing to project the contributions of these n stations to the
* local pixel with an inverse distance weight.
* local pixel with an inverse distance weight. We also assume a two segments regression for altitude detrending with
* a fixed 1200m above sea level inflection point.
*/
class LocalIDWLapseAlgorithm : public InterpolationAlgorithm {
public:
......
......@@ -269,9 +269,9 @@ int Interpol1D::NoisyLinRegression(const std::vector<double>& in_X, const std::v
mesg << "[W] only two points for linear regression!\n";
}
if(nb_pts<2) { //this should not be needed, we should have refrained from calling LinRegression in such a case
mesg << "[E] Not enough data point for linear regression!\n";
mesg << "[E] Not enough data points for linear regression!\n";
A=0.;
B=in_X[1];
if(in_X.size()>0) B=in_X[1]; else B=0.;
R=1.;
return EXIT_FAILURE;
}
......
......@@ -65,6 +65,7 @@ inline float fastSqrt_Q3(const float x) {
const double Interpol2D::wind_ys = 0.58;
const double Interpol2D::wind_yc = 0.42;
const double Interpol2D::bilin_inflection = 1200.;
double Interpol2D::getReferenceAltitude(const DEMObject& dem)
{
......@@ -191,6 +192,52 @@ int Interpol2D::LinRegression(const std::vector<double>& in_X, const std::vector
return code;
}
/**
* @brief Computes the bi-linear regression coefficients fitting the points given as X and Y in two vectors
* We consider that the regression can be made with 2 linear segments with a fixed inflection point (Interpol2D::bilin_inflection). It relies on Interpol1D::NoisyLinRegression.
* @param in_X vector of X coordinates
* @param in_Y vector of Y coordinates (same order as X)
* @param coeffs a,b,r coefficients in a vector
* @return EXIT_SUCCESS or EXIT_FAILURE
*/
int Interpol2D::BiLinRegression(const std::vector<double>& in_X, const std::vector<double>& in_Y, std::vector<double>& coeffs)
{
//build segments
std::vector<double> X1, Y1, X2, Y2;
for(unsigned int ii=0; ii<in_X.size(); ii++) {
if(in_X[ii]<bilin_inflection) { //first segment
X1.push_back( in_X[ii] );
Y1.push_back( in_Y.at(ii) );
} else if(in_X[ii]>bilin_inflection) { //second segment
X2.push_back( in_X[ii] );
Y2.push_back( in_Y.at(ii) );
} else { //point belongs to both segments
X1.push_back( in_X[ii] );
Y1.push_back( in_Y.at(ii) );
X2.push_back( in_X[ii] );
Y2.push_back( in_Y.at(ii) );
}
}
//first segment
std::stringstream mesg1;
const int code1 = Interpol1D::NoisyLinRegression(X1, Y1, coeffs[1], coeffs[2], coeffs[3], mesg1);
//second segment
std::stringstream mesg2;
const int code2 = Interpol1D::NoisyLinRegression(X2, Y2, coeffs[4], coeffs[5], coeffs[6], mesg2);
/*if(mesg1.str()!="")
std::cout << "[E] In Bilinear reg segment1, " << mesg1.str() << std::endl;
if(mesg2.str()!="")
std::cout << "[E] In Bilinear reg segment2, " << mesg2.str() << std::endl;*/
if(code1==EXIT_FAILURE && code2==EXIT_FAILURE)
return EXIT_FAILURE;
else
return EXIT_SUCCESS;
}
//Now, the core interpolation functions: they project a given parameter to a reference altitude, given a constant lapse rate
//example: Ta projected to 1500m with a rate of -0.0065K/m
......@@ -228,6 +275,27 @@ double Interpol2D::LinProject(const double& value, const double& altitude, const
return (value + coeffs[1] * (new_altitude - altitude));
}
/**
* @brief Projects a given parameter to another elevation:
* This implementation assumes a 2 segments linear dependency of the value as a function of the elevation.
* It uses Interpol2D::bilin_inflection as the inflection point altitude. This interface has to follow the interface of *LapseRateProjectPtr
* @param value original value
* @param altitude altitude of the original value
* @param new_altitude altitude of the reprojected value
* @param coeffs coefficients to use for the projection
* @return reprojected value
*/
double Interpol2D::BiLinProject(const double& value, const double& altitude, const double& new_altitude, const std::vector<double>& coeffs)
{
//linear lapse: coeffs must have been already computed
if (coeffs.size()<1) {
throw IOException("Linear regression coefficients not initialized", AT);
}
if(altitude<=bilin_inflection)
return (value + coeffs[1] * (new_altitude - altitude));
else
return (value + coeffs[4] * (new_altitude - altitude));
}
/**
* @brief Projects a given parameter to another elevation:
......@@ -396,7 +464,8 @@ void Interpol2D::LapseIDW(const std::vector<double>& vecData_in, const std::vect
/**
* @brief Grid filling function:
* Similar to Interpol2D::LapseIDW but using a limited number of stations for each cell
* Similar to Interpol2D::LapseIDW but using a limited number of stations for each cell. We also assume a two segments regression for altitude detrending with
* a fixed 1200m above sea level inflection point.
* @param vecData_in input values to use for the IDW
* @param vecStations_in position of the "values" (altitude and coordinates)
* @param dem array of elevations (dem)
......@@ -442,7 +511,6 @@ double Interpol2D::LLIDW_pixel(const unsigned int& i, const unsigned int& j,
std::vector< std::pair<double, unsigned int> > list;
std::vector<double> X, Y, coeffs;
coeffs.resize(4, 0.0);
//fill vectors with appropriate neighbors
const double x = dem.llcorner.getEasting()+i*dem.cellsize;
......@@ -462,8 +530,11 @@ double Interpol2D::LLIDW_pixel(const unsigned int& i, const unsigned int& j,
if(X.size()==0)
return IOUtils::nodata;
std::stringstream mesg;
Interpol1D::NoisyLinRegression(X, Y, coeffs[1], coeffs[2], coeffs[3], mesg);
r2=coeffs[3];
//coeffs.resize(4, 0.0);
//Interpol1D::NoisyLinRegression(X, Y, coeffs[1], coeffs[2], coeffs[3], mesg);
coeffs.resize(7,0.);
BiLinRegression(X, Y, coeffs);
r2=coeffs[3]*coeffs[6]; //Is it correct?
//compute local pixel value
unsigned int count=0;
......@@ -474,7 +545,8 @@ double Interpol2D::LLIDW_pixel(const unsigned int& i, const unsigned int& j,
const double value = vecData_in[st_index];
const double alt = vecStations_in[st_index].position.getAltitude();
if ((value != IOUtils::nodata) && (alt != IOUtils::nodata)) {
const double contrib = LinProject(value, alt, cell_altitude, coeffs);
//const double contrib = LinProject(value, alt, cell_altitude, coeffs);
const double contrib = BiLinProject(value, alt, cell_altitude, coeffs);
const double weight = invSqrt( list[st].first + scale + 1.e-6 );
pixel_value += weight*contrib;
norm += weight;
......
......@@ -76,11 +76,15 @@ class Interpol2D {
const std::vector<double>& coeffs);
static double LinProject(const double& value, const double& altitude, const double& new_altitude,
const std::vector<double>& coeffs);
static double BiLinProject(const double& value, const double& altitude, const double& new_altitude,
const std::vector<double>& coeffs);
static double FracProject(const double& value, const double& altitude, const double& new_altitude,
const std::vector<double>& coeffs);
static int LinRegression(const std::vector<double>& data_in,
const std::vector<double>& elevations, std::vector<double>& coeffs);
static int BiLinRegression(const std::vector<double>& data_in,
const std::vector<double>& elevations, std::vector<double>& coeffs);
private:
//generic functions
......@@ -94,8 +98,6 @@ class Interpol2D {
std::vector< std::pair<double, unsigned int> >& list);
//core methods
static void LinRegressionCore(const std::vector<double>& X, const std::vector<double>& Y,
const unsigned int imax, double& a, double& b, double& r);
static double IDWCore(const double& x, const double& y,
const std::vector<double>& vecData_in,
const std::vector<StationData>& vecStations_in);
......@@ -116,8 +118,9 @@ class Interpol2D {
private:
//static members
const static double wind_ys; ///coefficient for wind dependency on slope
const static double wind_yc; ///coefficient for wind dependency on curvature
const static double wind_ys; ///<coefficient for wind dependency on slope
const static double wind_yc; ///<coefficient for wind dependency on curvature
const static double bilin_inflection; ///<bilinear inflection point (m above sea level)
};
} //end namespace
......
......@@ -73,7 +73,7 @@ double Atmosphere::stdDryAirDensity(const double& altitude, const double& temper
/**
* @brief Calculates the water vapor density, for a given temperature and vapor pressure
* @param temperature air temperature (K)
* @param Temperature air temperature (K)
* @param VaporPressure water vapor pressure (Pa)
* @return water vapor density (kg/m^3)
*/
......
......@@ -16,6 +16,7 @@
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ARCIO.h"
#include "exports.h"
using namespace std;
......@@ -312,11 +313,11 @@ void ARCIO::write2DGrid(const Grid2DObject& grid_in, const std::string& name)
#ifndef _METEOIO_JNI
extern "C"
{
void deleteObject(void* obj) {
METEOIO_EXPORT void deleteObject(void* obj) {
delete reinterpret_cast<PluginObject*>(obj);
}
void* loadObject(const std::string& classname, const Config& cfg) {
METEOIO_EXPORT void* loadObject(const std::string& classname, const Config& cfg) {
if(classname == "ARCIO") {
//cerr << "Creating dynamic handle for " << classname << endl;
return new ARCIO(deleteObject, cfg);
......
......@@ -16,6 +16,7 @@
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ARPSIO.h"
#include "exports.h"
using namespace std;
......@@ -377,11 +378,11 @@ void ARPSIO::moveToMarker(const std::string& marker)
#ifndef _METEOIO_JNI
extern "C"
{
void deleteObject(void* obj) {
METEOIO_EXPORT void deleteObject(void* obj) {
delete reinterpret_cast<PluginObject*>(obj);
}
void* loadObject(const std::string& classname, const Config& cfg) {
METEOIO_EXPORT void* loadObject(const std::string& classname, const Config& cfg) {
if(classname == "ARPSIO") {
//cerr << "Creating dynamic handle for " << classname << endl;
return new ARPSIO(deleteObject, cfg);
......
......@@ -16,6 +16,7 @@
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#include "BormaIO.h"
#include "exports.h"
using namespace std;
......@@ -529,11 +530,11 @@ void BormaIO::convertUnits(MeteoData& meteo)
#ifndef _METEOIO_JNI
extern "C"
{
void deleteObject(void* obj) {
METEOIO_EXPORT void deleteObject(void* obj) {
delete reinterpret_cast<PluginObject*>(obj);
}
void* loadObject(const string& classname, const Config& cfg) {
METEOIO_EXPORT void* loadObject(const string& classname, const Config& cfg) {
if(classname == "BormaIO") {
//cerr << "Creating dynamic handle for " << classname << endl;
return new BormaIO(deleteObject, cfg);
......
......@@ -5,6 +5,8 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
set(LIBPREFIX "lib") #make sure ALL plugins are libXXX for ALL plateforms
IF(DEST MATCHES "par")
SET(CMAKE_CXX_OUTPUT_EXTENSION "popc.o")
SET(ARCIONAME arciopopc)
......@@ -45,6 +47,7 @@ IF(PLUGIN_SMETIO)
#SET_TARGET_PROPERTIES(${SMETIONAME} PROPERTIES LINKER_LANGUAGE C)
TARGET_LINK_LIBRARIES(${SMETIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${SMETIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......@@ -55,6 +58,7 @@ IF(PLUGIN_ARCIO)
ADD_LIBRARY(${ARCIONAME} ARCIO.cc)
TARGET_LINK_LIBRARIES(${ARCIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${ARCIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......@@ -64,7 +68,8 @@ ENDIF(PLUGIN_ARCIO)
IF(PLUGIN_PGMIO)
ADD_LIBRARY(${PGMIONAME} PGMIO.cc)
TARGET_LINK_LIBRARIES(${PGMIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${PGMIONAME} PROPERTIES
SET_TARGET_PROPERTIES(${PGMIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......@@ -75,6 +80,7 @@ IF(PLUGIN_ARPSIO)
ADD_LIBRARY(${ARPSIONAME} ARPSIO.cc)
TARGET_LINK_LIBRARIES(${ARPSIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${ARPSIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......@@ -84,7 +90,8 @@ ENDIF(PLUGIN_ARPSIO)
IF(PLUGIN_GRASSIO)
ADD_LIBRARY(${GRASSIONAME} GrassIO.cc)
TARGET_LINK_LIBRARIES(${GRASSIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${GRASSIONAME} PROPERTIES
SET_TARGET_PROPERTIES(${GRASSIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......@@ -94,7 +101,8 @@ ENDIF(PLUGIN_GRASSIO)
IF(PLUGIN_GEOTOPIO)
ADD_LIBRARY(${GEOTOPIONAME} GeotopIO.cc)
TARGET_LINK_LIBRARIES(${GEOTOPIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${GEOTOPIONAME} PROPERTIES
SET_TARGET_PROPERTIES(${GEOTOPIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......@@ -105,6 +113,7 @@ IF(PLUGIN_SNIO)
ADD_LIBRARY(${SNIONAME} SNIO.cc)
TARGET_LINK_LIBRARIES(${SNIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${SNIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......@@ -120,7 +129,8 @@ IF(PLUGIN_GSNIO)
ADD_LIBRARY(${GSNIONAME} GSNIO.cc gsn/soapA3DWebServiceSoap12BindingProxy.cpp gsn/soapC.cpp)
TARGET_LINK_LIBRARIES(${GSNIONAME} ${GSOAPPP} ${SHAREDNAME})
ADD_DEPENDENCIES(${GSNIONAME} wsdl2cpp gsnclient)
SET_TARGET_PROPERTIES(${GSNIONAME} PROPERTIES
SET_TARGET_PROPERTIES(${GSNIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......@@ -134,7 +144,8 @@ IF(PLUGIN_IMISIO)
INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${OCCI_INCLUDE_DIR})
ADD_LIBRARY(${IMISIONAME} ImisIO.cc)
TARGET_LINK_LIBRARIES(${IMISIONAME} ${OCCI_LIBRARIES} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${IMISIONAME} PROPERTIES
SET_TARGET_PROPERTIES(${IMISIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......@@ -150,6 +161,7 @@ IF(PLUGIN_BORMAIO)
ADD_LIBRARY(${BORMAIONAME} BormaIO.cc)
TARGET_LINK_LIBRARIES(${BORMAIONAME} ${LibXML++_LIBRARIES} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${BORMAIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......@@ -162,6 +174,7 @@ IF(PLUGIN_COSMOXMLIO)
ADD_LIBRARY(${COSMOXMLIONAME} CosmoXMLIO.cc)
TARGET_LINK_LIBRARIES(${COSMOXMLIONAME} ${LibXML++_LIBRARIES} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${COSMOXMLIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
......
......@@ -15,7 +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 <meteoio/plugins/CosmoXMLIO.h>
#include "exports.h"
#include "CosmoXMLIO.h"
#include <meteoio/meteolaws/Atmosphere.h>
#include <sstream>
......@@ -34,6 +35,7 @@ namespace mio {
* The files are outputted in Grib format and preprocessed by FieldExtra (MeteoSwiss)
* to get XML files.