WSL/SLF GitLab Repository

Commit 5e5c7824 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

The documentation for spatial interpolations has been put together (with lots of new content).

The long wave radiation parameter is now ILWR instead of LWR (since some might have net long wave and this is also closer to short wave (with ISWR)).
parent 1d2c5b81
......@@ -28,7 +28,7 @@ bool AlgorithmFactory::initStaticData()
* Keywords for selecting the spatial interpolation algorithm among the
* available methods for single source and multiple sources interpolations.
* More details about some of these algorithms can be found in "A Meteorological
* Distribution System for High-Resolution Terrestrial Modeling (MicroMet)", Liston and Alder, 2006.
* Distribution System for High-Resolution Terrestrial Modeling (MicroMet)", Liston and Elder, 2006.
*/
setAlgorithms.insert("CST"); // constant fill
......
......@@ -27,6 +27,92 @@
class Meteo2DInterpolator; // forward declaration, cyclic header include
/**
* @page interpol2d Spatial interpolations
* Using the vectors of MeteoData and StationData as filled by the IOInterface::readMeteoData call
* as well as a grid of elevations (DEM, stored as a DEMObject), it is possible to get spatially
* interpolated parameters.
*
* Each parameter to be interpolated has to declare which interpolation method to use. Then the class computes
* the interpolation for each 2D grid point, combining the inputs provided by the available data sources.
* Any parameter of MeteoData can be interpolated, using the names given by \ref meteoparam. One has to keep
* in mind that the interpolations are time-independent: each interpolation is done at a given time step and no
* memory of (eventual) previous time steps is kept. This means that all parameters that are automatically calculated
* get recalculated anew for each time step.
*
* @section practical Practical use
* Practically, the user
* has to specify in his configuration file (typically io.ini), for each parameter to be interpolated, which
* spatial interpolations algorithms should be considered. This is provided as a space separated list of keywords
* (one per interpolation algorithm). Please notice that some algorithms may require extra arguments.
* Then, each algorithm will be evaluated (through the use of its rating method) and receive a grade (that might depend on the number of available data, the quality of the data, etc). The algorithm from the user selected list that receives the higher score will be used for the given interpolation.
*
* @section keywords Available algorithms
* The keywords defining the algorithms are the following:
* - STD_PRESS: standard atmospheric pressure as a function of the elevation of each cell (see StandardPressureAlgorithm)
* - CST: constant value in each cell (see ConstAlgorithm)
* - CST_LAPSE: constant value reprojected to the elevation of the cell (see ConstLapseRateAlgorithm)
* - IDW: Inverse Distance Weighting averaging (see IDWAlgorithm)
* - IDW_LAPSE: Inverse Distance Weighting averaging with reprojection to the elevation of the cell (see IDWLapseAlgorithm)
* - RH: the dew point temperatures are interpolated using IDW_LAPSE, then reconverted locally to relative humidity (see RHAlgorithm)
* - WIND_CURV: the wind field (VW and DW) is interpolated using IDW_LAPSE and then altered depending on the local curvature and slope (taken from the DEM, see SimpleWindInterpolationAlgorithm)
*
* @section example Example of configuration file
* Here is an example of the interpolation section of an configuration file (io.ini):
* @code
* [Interpolations2D]
* TA::algorithms = IDW_LAPSE CST_LAPSE
* TA::cst_lapse = -0.008
*
* RH::algorithms = RH IDW_LAPSE CST_LAPSE CST
*
* HNW::algorithms = IDW_LAPSE CST_LAPSE CST
*
* VW::algorithms = IDW_LAPSE CST_LAPSE
*
* P::algorithms = STD_PRESS
* @endcode
*
* @section lapse Lapse rates
* Several algorithms use elevation trends, currently modelled as a linear relation. The slope of this linear relation can
* sometimes be provided by the end user (through his io.ini configuration file), otherwise it is computed from the data.
* In order to bring slightly more robustness, if the correlation between the input data and the computed linear regression
* is not good enought (below 0.7, as defined in Interpol2D::LinRegression), the same regression will get re-calculated
* with one point less (cycling throught all the points). The best result (ie: highest correlation coefficient) will be
* kept. If the final correlation coefficient is less than 0.7, a warning is displayed.
*
* @section dev_use Developer usage
* From the developer's point of view, all that has to be done is instantiate a Meteo2DInterpolator object and call its
* Meteo2DInterpolator::interpolate method.
* @code
* std::vector<MeteoData> vecMeteo;
* std::vector<StationData> vecStation;
* ConfigReader cfg("io.ini");
* DEMObject dem;
*
* [...]
*
* //performing spatial interpolations
* Meteo2DInterpolator mi(cfg, dem, vecMeteo, vecStation);
* Grid2DObject param;
* mi.interpolate(MeteoData::RH, param);
* @endcode
*
* @section biblio Bibliography
* The interpolation algorithms have been inspired by the following papers:
* - "A Meteorological Distribution System for High-Resolution Terrestrial Modeling (MicroMet)", Liston and Elder, Journal of Hydrometeorology 7 (2006), 217-234.
* - "Simulating wind fields and snow redistribution using terrain-based parameters to model snow accumulation and melt over a semi-arid mountain catchment", Adam Winstral and Danny Marks, Hydrol. Process. 16 (2002), 3585– 3603. DOI: 10.1002/hyp.1238 [NOT YET IMPLEMENTED]
*
* @author Mathias Bavay
* @date 2010-04-12
*/
/**
* @class InterpolationAlgorithm
* @brief A class to perform 2D spatial interpolations. For more, see \ref interpol2d
* @author Thomas Egger
* @date 2010-04-01
*/
class InterpolationAlgorithm {
public:
......@@ -73,7 +159,11 @@ class AlgorithmFactory {
static bool initStaticData();///<initialize the static setAlgorithms
};
/**
* @class ConstAlgorithm
* @brief Constant filling interpolation algorithm.
* Fill the grid with the average of the inputs for this parameter.
*/
class ConstAlgorithm : public InterpolationAlgorithm {
public:
ConstAlgorithm(const Meteo2DInterpolator& _mi,
......@@ -87,6 +177,11 @@ class ConstAlgorithm : public InterpolationAlgorithm {
virtual void calculate(const MeteoData::Parameters& param, Grid2DObject& grid);
};
/**
* @class StandardPressureAlgorithm
* @brief Standard atmospheric pressure interpolation algorithm.
* Fill the grid with the standard atmosphere's pressure, depending on the local elevation.
*/
class StandardPressureAlgorithm : public InterpolationAlgorithm {
public:
StandardPressureAlgorithm(const Meteo2DInterpolator& _mi,
......@@ -100,6 +195,13 @@ class StandardPressureAlgorithm : public InterpolationAlgorithm {
virtual void calculate(const MeteoData::Parameters& param, Grid2DObject& grid);
};
/**
* @class ConstLapseRateAlgorithm
* @brief Constant filling with elevation lapse rate interpolation algorithm.
* The grid is filled with the average of the inputs for this parameter and each pixel is reprojected to its
* real elevation (assuming that the average value occured at the average of the elevations). The lapse rate has
* to be provided as an extra argument, otherwise the standard -0.0065 K/m is used (which only makes sense for temperatures)
*/
class ConstLapseRateAlgorithm : public InterpolationAlgorithm {
public:
ConstLapseRateAlgorithm(const Meteo2DInterpolator& _mi,
......@@ -113,6 +215,12 @@ class ConstLapseRateAlgorithm : public InterpolationAlgorithm {
virtual void calculate(const MeteoData::Parameters& param, Grid2DObject& grid);
};
/**
* @class IDWAlgorithm
* @brief Inverse Distance Weighting interpolation algorithm.
* Each cell receives the weighted average of the whole data set with weights being 1/r²
* (r being the distance of the current cell to the contributing station) and renormalized.
*/
class IDWAlgorithm : public InterpolationAlgorithm {
public:
IDWAlgorithm(const Meteo2DInterpolator& _mi,
......@@ -126,6 +234,12 @@ class IDWAlgorithm : public InterpolationAlgorithm {
virtual void calculate(const MeteoData::Parameters& param, Grid2DObject& grid);
};
/**
* @class IDWLapseAlgorithm
* @brief Inverse Distance Weighting interpolation algorithm with elevation detrending/reprojection.
* The input data is projected to a common elevation and spatially interpolated using an Inverse Distance
* Weighting interpolation algorithm (see IDWAlgorithm). Then, each grid cell is reprojected to its real elevation.
*/
class IDWLapseAlgorithm : public InterpolationAlgorithm {
public:
IDWLapseAlgorithm(const Meteo2DInterpolator& _mi,
......@@ -139,6 +253,16 @@ class IDWLapseAlgorithm : public InterpolationAlgorithm {
virtual void calculate(const MeteoData::Parameters& param, Grid2DObject& grid);
};
/**
* @class RHAlgorithm
* @brief Relative humidity interpolation algorithm.
* This is an implementation of the method described in (Liston & Elder, 2006): for each input point, the dew
* point temperature is calculated. Then, the dew point temperatures are spatially interpolated using IDWLapseAlgorithm.
* Finally, each local dew point temperature is converted to a local relative humidity.
*
* As a side effect, the user must have defined algorithms to be used for air temperature (since this is needed for dew
* point to RH conversion)
*/
class RHAlgorithm : public InterpolationAlgorithm {
public:
RHAlgorithm(const Meteo2DInterpolator& _mi,
......@@ -152,6 +276,14 @@ class RHAlgorithm : public InterpolationAlgorithm {
virtual void calculate(const MeteoData::Parameters& param, Grid2DObject& grid);
};
/**
* @class SimpleWindInterpolationAlgorithm
* @brief Curvature/slope influenced wind interpolation algorithm.
* This is an implementation of the method described in (Liston & Elder, 2006): the wind speed and direction are
* spatially interpolated using IDWLapseAlgorithm for the wind speed and using the user defined wind direction
* interpolation algorithm. Then, the wind speed and direction fields are altered by coefficients calculated
* from the local curvature and slope (as taken from the DEM, see DEMObject).
*/
class SimpleWindInterpolationAlgorithm : public InterpolationAlgorithm {
public:
SimpleWindInterpolationAlgorithm(const Meteo2DInterpolator& _mi,
......
......@@ -35,6 +35,7 @@
* -# \subpage quick_overview "Quick overview" of the functionnality provided by MeteoIO
* -# \subpage plugins "Available plugins" and usage
* -# \subpage filters "Available filters" and usage
* -# \subpage interpol2d "Available spatial interpolations" and usage
* -# \subpage dev_plugins How to write a "Plugin"
* -# \subpage dev_filters How to write a "Filter"
* -# \subpage examples "Examples"
......
......@@ -28,7 +28,7 @@
/**
* @class Meteo2DInterpolator
* @brief A class to spatially interpolate meteo parameters
* @brief A class to spatially interpolate meteo parameters. For more, see \ref interpol2d
*
* @author Mathias Bavay and Thomas Egger
* @date 2010-01-14
......
......@@ -35,7 +35,7 @@ bool MeteoData::initStaticData()
meteoparamname[VW] = "VW";
meteoparamname[DW] = "DW";
meteoparamname[RH] = "RH";
meteoparamname[LWR] = "LWR";
meteoparamname[ILWR] = "ILWR";
meteoparamname[HNW] = "HNW";
meteoparamname[TSG] = "TSG";
meteoparamname[TSS] = "TSS";
......@@ -66,7 +66,7 @@ void MeteoData::initParameterMap()
meteoparam[VW] = &vw;
meteoparam[DW] = &dw;
meteoparam[RH] = &rh;
meteoparam[LWR] = &lwr;
meteoparam[ILWR] = &ilwr;
meteoparam[HNW] = &hnw;
meteoparam[TSG] = &tsg;
meteoparam[TSS] = &tss;
......@@ -87,10 +87,10 @@ MeteoData::MeteoData() : resampled(false)
MeteoData::MeteoData(const Date_IO& date_in, const double& ta_in, const double& iswr_in,
const double& vw_in, const double& dw_in, const double& rh_in,
const double& lwr_in, const double& hnw_in, const double& tsg_in,
const double& ilwr_in, const double& hnw_in, const double& tsg_in,
const double& tss_in, const double& hs_in, const double& rswr_in, const double& _p) : resampled(false)
{
setMeteoData(date_in, ta_in, iswr_in, vw_in, dw_in, rh_in, lwr_in, hnw_in, tsg_in, tss_in, hs_in, rswr_in, _p);
setMeteoData(date_in, ta_in, iswr_in, vw_in, dw_in, rh_in, ilwr_in, hnw_in, tsg_in, tss_in, hs_in, rswr_in, _p);
initParameterMap();
}
......@@ -122,7 +122,7 @@ MeteoData& MeteoData::operator=(const MeteoData& rhs)
}
void MeteoData::setMeteoData(const Date_IO& date_in, const double& ta_in, const double& iswr_in, const double& vw_in,
const double& dw_in, const double& rh_in, const double& lwr_in, const double& hnw_in,
const double& dw_in, const double& rh_in, const double& ilwr_in, const double& hnw_in,
const double& tsg_in, const double& tss_in, const double& hs_in, const double& rswr_in,
const double& _p)
{
......@@ -132,7 +132,7 @@ void MeteoData::setMeteoData(const Date_IO& date_in, const double& ta_in, const
vw = vw_in;
dw = dw_in;
rh = rh_in;
lwr = lwr_in;
ilwr = ilwr_in;
hnw = hnw_in;
tsg = tsg_in;
tss = tss_in;
......@@ -227,7 +227,7 @@ void MeteoData::Serialize(POPBuffer &buf, bool pack)
buf.Pack(&vw,1);
buf.Pack(&dw,1);
buf.Pack(&rh,1);
buf.Pack(&lwr,1);
buf.Pack(&ilwr,1);
//buf.Pack(&ea,1);
buf.Pack(&hnw,1);
buf.Pack(&tsg,1);
......@@ -242,7 +242,7 @@ void MeteoData::Serialize(POPBuffer &buf, bool pack)
buf.UnPack(&vw,1);
buf.UnPack(&dw,1);
buf.UnPack(&rh,1);
buf.UnPack(&lwr,1);
buf.UnPack(&ilwr,1);
//buf.UnPack(&ea,1);
buf.UnPack(&hnw,1);
buf.UnPack(&tsg,1);
......
......@@ -39,10 +39,21 @@ class MeteoData : POPBase {
class MeteoData {
#endif
public:
///this enum provides indexed access to meteorological fields
/// \anchor meteoparam this enum provides indexed access to meteorological fields
enum Parameters {firstparam=0,
TA=firstparam, ISWR, VW, DW, RH, LWR, HNW, TSG, TSS, HS, RSWR, P,
lastparam=P};
TA=firstparam, ///< Air temperature
RH, ///< Relative humidity
VW, ///< Wind velocity
DW, ///< Wind direction
ISWR, ///< Incoming short wave radiation
RSWR, ///< Reflected short wave radiation
ILWR, ///< Incoming long wave radiation
HS, ///< Snow height
HNW, ///< New water equivalent height
TSG, ///< Temperature ground surface
TSS, ///< Temperature snow surface
P, ///< Air pressure
lastparam=P};
static const unsigned int nrOfParameters; ///<holds the number of meteo parameters stored in MeteoData
......@@ -66,7 +77,7 @@ class MeteoData {
* @param vw Wind velocity in m s-1 (default nodata)
* @param dw Wind direction in degrees (default nodata)
* @param rh Relative humidity between 0 and 1 (default nodata)
* @param lwr Long wave radiation in W m-2 (default nodata)
* @param ilwr Long wave radiation in W m-2 (default nodata)
* @param hnw Precipitations in mm h-1 (default nodata)
* @param tsg Soil or snow bottom temperature in Kelvin (default nodata)
* @param tss Soil or snow surface temperature in Kelvin (default nodata)
......@@ -80,7 +91,7 @@ class MeteoData {
const double& vw=IOUtils::nodata,
const double& dw=IOUtils::nodata,
const double& rh=IOUtils::nodata,
const double& lwr=IOUtils::nodata,
const double& ilwr=IOUtils::nodata,
const double& hnw=IOUtils::nodata,
const double& tsg=IOUtils::nodata,
const double& tss=IOUtils::nodata,
......@@ -96,7 +107,7 @@ class MeteoData {
* @param vw Wind velocity in m s-1 (default nodata)
* @param dw Wind direction in degrees (default nodata)
* @param rh Relative humidity between 0 and 1 (default nodata)
* @param lwr Long wave radiation in W m-2 (default nodata)
* @param ilwr Long wave radiation in W m-2 (default nodata)
* @param hnw Precipitations in mm h-1 (default nodata)
* @param tsg Soil or snow bottom temperature in Kelvin (default nodata)
* @param tss Soil or snow surface temperature in Kelvin (default nodata)
......@@ -110,7 +121,7 @@ class MeteoData {
const double& vw=IOUtils::nodata,
const double& dw=IOUtils::nodata,
const double& rh=IOUtils::nodata,
const double& lwr=IOUtils::nodata,
const double& ilwr=IOUtils::nodata,
const double& hnw=IOUtils::nodata,
const double& tsg=IOUtils::nodata,
const double& tss=IOUtils::nodata,
......@@ -142,7 +153,7 @@ class MeteoData {
double hnw; ///<Precipitations in mm h-1
double iswr; ///<Incoming shortwave radiation in W m-2
double rswr; ///<Reflected Short Wave Radiation in W m-2
double lwr; ///<Long wave radiation in W m-2
double ilwr; ///<Incoming Long wave radiation in W m-2
double tsg; ///<Soil or snow bottom temperature in Kelvin
double tss; ///<Soil or snow surface temperature in Kelvin
double hs; ///<Snow height in cm
......
......@@ -40,7 +40,7 @@ void loadMeteoAndStationData(double* cMetadata, double* cData,
//building MeteoData
double p=IOUtils::nodata, hnw=IOUtils::nodata, ta=IOUtils::nodata, rh=IOUtils::nodata;
double vw=IOUtils::nodata, dw=IOUtils::nodata, iswr=IOUtils::nodata, lwr=IOUtils::nodata;
double vw=IOUtils::nodata, dw=IOUtils::nodata, iswr=IOUtils::nodata, ilwr=IOUtils::nodata;
double tsg=IOUtils::nodata, tss=IOUtils::nodata, hs=IOUtils::nodata, rswr=IOUtils::nodata;
if(algorithm =="P"){
interpolation_type=MeteoData::P;
......@@ -65,13 +65,13 @@ void loadMeteoAndStationData(double* cMetadata, double* cData,
} else if(algorithm =="ISWR" ){
interpolation_type=MeteoData::ISWR;
iswr=cData[nbDataPerStation*i];
} else if(algorithm =="LWR"){
interpolation_type=MeteoData::LWR;
lwr=cData[nbDataPerStation*i];
} else if(algorithm =="ILWR"){
interpolation_type=MeteoData::ILWR;
ilwr=cData[nbDataPerStation*i];
} else {
throw InvalidArgumentException("Invalid interpolation algorithm selected!", AT);
}
const MeteoData meteo(date_in, ta, iswr,vw, dw, rh, lwr, hnw, tsg, tss, hs, rswr, p);
const MeteoData meteo(date_in, ta, iswr,vw, dw, rh, ilwr, hnw, tsg, tss, hs, rswr, p);
vecData.push_back(meteo);
}
}
......
......@@ -397,7 +397,7 @@ void Interpol2D::IDW(const std::vector<double>& vecData_in, const std::vector<St
/**
* @brief Grid filling function:
* This implementation fills a grid using a curvature and slope algorithm, as described in "A Meteorological
* Distribution System for High-Resolution Terrestrial Modeling (MicroMet)", Liston and Alder, 2006.
* Distribution System for High-Resolution Terrestrial Modeling (MicroMet)", Liston and Elder, 2006.
* @param dem array of elevations (dem). The slope must have been updated as it is required for the DEM analysis.
* @param VW 2D array of Wind Velocity to fill
* @param DW 2D array of Wind Direction to fill
......
......@@ -286,7 +286,7 @@ void BormaIO::checkForMeteoFiles(const std::string& xmlpath, const std::string&
void BormaIO::xmlExtractData(const std::string& filename, const Date_IO& date_in, MeteoData& md, StationData& sd)
{
double ta=IOUtils::nodata, iswr=IOUtils::nodata, vw=IOUtils::nodata, dw=IOUtils::nodata;
double rh=IOUtils::nodata, lwr=IOUtils::nodata, hnw=IOUtils::nodata, tsg=IOUtils::nodata;
double rh=IOUtils::nodata, ilwr=IOUtils::nodata, hnw=IOUtils::nodata, tsg=IOUtils::nodata;
double tss=IOUtils::nodata, hs=IOUtils::nodata, rswr=IOUtils::nodata;
double longitude=IOUtils::nodata, latitude=IOUtils::nodata, altitude=IOUtils::nodata;
......@@ -339,11 +339,11 @@ void BormaIO::xmlExtractData(const std::string& filename, const Date_IO& date_in
const std::string str_ns = xmlGetNodeContent(pNode, "ni");
xmlParseStringToDouble(str_ns, hnw, "ni");
//sb = lwr
//sb = ilwr
const std::string str_sb = xmlGetNodeContent(pNode, "sb");
xmlParseStringToDouble(str_sb, lwr, "sb");
xmlParseStringToDouble(str_sb, ilwr, "sb");
md.setMeteoData(date_in, ta, iswr, vw, dw, rh, lwr, hnw, tsg, tss, hs, rswr);
md.setMeteoData(date_in, ta, iswr, vw, dw, rh, ilwr, hnw, tsg, tss, hs, rswr);
convertUnits(md);
} else {
......@@ -503,7 +503,7 @@ void BormaIO::convertUnits(MeteoData& meteo)
{
meteo.standardizeNodata(plugin_nodata);
//converts C to Kelvin, converts lwr to ea, converts RH to [0,1]
//converts C to Kelvin, converts ilwr to ea, converts RH to [0,1]
if(meteo.ta!=IOUtils::nodata) {
meteo.ta=C_TO_K(meteo.ta);
}
......
......@@ -27,7 +27,7 @@
* - LIGHT mapped to iswr
* - TEMPERATURE or AIR_TEMP mapped to ta
* - WIND_SPEED mapped to wv
* - SOLAR_RAD mapped to iswr and lwr //HACK: THIS IS A BUG!!
* - SOLAR_RAD mapped to iswr and ilwr //HACK: THIS IS A BUG!!
* - AIR_HUMID mapped to rh
* - SOIL_TEMP_ECTM mapped to tss
* - GROUND_TEMP_TNX mapped to tsg
......@@ -266,7 +266,7 @@ void GSNIO::parseString(const std::string& _string, std::vector<std::string>& ve
else if (key == "WIND_DIRECTION") convertStringToDouble(md.dw, tmpstring, "Wind Velocity");
else if (key == "SOLAR_RAD") {
convertStringToDouble(md.iswr, tmpstring, "solar_rad");
//convertStringToDouble(md.lwr, tmpstring, "solar_rad");
//convertStringToDouble(md.ilwr, tmpstring, "solar_rad");
}
else if (key == "AIR_HUMID") convertStringToDouble(md.rh, tmpstring, "air_humid");
else if (key == "SOIL_TEMP_ECTM") convertStringToDouble(md.tss, tmpstring, "soil_temp_ectm");
......@@ -398,7 +398,7 @@ void GSNIO::convertUnits(MeteoData& meteo)
{
meteo.standardizeNodata(plugin_nodata);
//converts C to Kelvin, converts lwr to ea, converts RH to [0,1]
//converts C to Kelvin, converts ilwr to ea, converts RH to [0,1]
if(meteo.ta!=IOUtils::nodata) {
meteo.ta=C_TO_K(meteo.ta);
}
......
......@@ -298,7 +298,7 @@ void GeotopIO::readMeteoData(const Date_IO& dateStart, const Date_IO& dateEnd,
tmpdata[mapHeader["vw"]],
tmpdata[mapHeader["dw"]],
tmpdata[mapHeader["rh"]],
tmpdata[mapHeader["lwr"]],
tmpdata[mapHeader["ilwr"]],
tmpdata[mapHeader["hnw"]],
IOUtils::nodata,
IOUtils::nodata,
......@@ -392,7 +392,7 @@ void GeotopIO::makeColumnMap(const std::vector<std::string>& tmpvec,
case 8: mapHeader["diffswr"] = tmpvec.size(); current="diffswr"; break;
case 9: mapHeader["cloudt"] = tmpvec.size(); current="cloudt"; break;
case 10: mapHeader["cloudi"] = tmpvec.size(); current="cloudi"; break;
case 11: mapHeader["lwr"] = tmpvec.size(); current="lwr"; break;
case 11: mapHeader["ilwr"] = tmpvec.size(); current="ilwr"; break;
case 12: mapHeader["nswr"] = tmpvec.size(); current="nswr"; break;
case 13: mapHeader["tsup"] = tmpvec.size(); current="tsup"; break;
default: throw IOException("GEOtopIO can only deal with 14 meteo parameters", AT); break;
......@@ -526,7 +526,7 @@ void GeotopIO::convertUnits(MeteoData& meteo)
{
meteo.standardizeNodata(plugin_nodata);
//converts C to Kelvin, converts lwr to ea, converts RH to [0,1]
//converts C to Kelvin, converts ilwr to ea, converts RH to [0,1]
if(meteo.ta!=IOUtils::nodata) {
meteo.ta=C_TO_K(meteo.ta);
}
......
......@@ -282,7 +282,7 @@ void ImisIO::readData(const Date_IO& dateStart, const Date_IO& dateEnd, std::vec
void ImisIO::parseDataSet(const std::vector<std::string>& meteo_in, MeteoData& md)
{
Date_IO tmpDate;
double ta, iswr, vw, dw, rh, lwr, hnw, tsg, tss, hs, rswr;
double ta, iswr, vw, dw, rh, ilwr, hnw, tsg, tss, hs, rswr;
convertString(tmpDate, meteo_in.at(0), dec);
convertString(ta, meteo_in.at(1), dec);
......@@ -290,14 +290,14 @@ void ImisIO::parseDataSet(const std::vector<std::string>& meteo_in, MeteoData& m
convertString(vw, meteo_in.at(3), dec);
convertString(dw, meteo_in.at(4), dec);
convertString(rh, meteo_in.at(5), dec);
convertString(lwr, meteo_in.at(6), dec);
convertString(ilwr, meteo_in.at(6), dec);
convertString(hnw, meteo_in.at(7), dec);
convertString(tsg, meteo_in.at(8), dec);
convertString(tss, meteo_in.at(9), dec);
convertString(hs, meteo_in.at(10), dec);
convertString(rswr, meteo_in.at(11), dec);
md.setMeteoData(tmpDate, ta, iswr, vw, dw, rh, lwr, hnw, tsg, tss, hs, rswr);
md.setMeteoData(tmpDate, ta, iswr, vw, dw, rh, ilwr, hnw, tsg, tss, hs, rswr);
}
/**
......@@ -453,7 +453,7 @@ void ImisIO::convertUnits(MeteoData& meteo)
{
meteo.standardizeNodata(plugin_nodata);
//converts C to Kelvin, converts lwr to ea, converts RH to [0,1]
//converts C to Kelvin, converts ilwr to ea, converts RH to [0,1]
if(meteo.ta!=IOUtils::nodata) {
meteo.ta=C_TO_K(meteo.ta);
}
......
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