WSL/SLF GitLab Repository

Commit 29f9b1dc authored by Mathias Bavay's avatar Mathias Bavay
Browse files

A small bug has been fixed in the SMET specs. The experimental "UnShade"...

A small bug has been fixed in the SMET specs. The experimental "UnShade" filter has been removed while the SNOS filter has been renamed as "DETECT_GRASS" and MAX_CHANGE as "Time_Consistency" in order to better reflect the cited paper. The NOISE processing is now documented. Otherwise, some documentation typos have been fixed.
parent c8eb90e4
......@@ -117,7 +117,7 @@ The field tyes are measurement parameter identifier chosen from the following li
\item[ILWR] Incoming Long Wave Radiation, in W/m$^2$
\item[OLWR] Outgoing Long Wave Radiation, in W/m$^2$
\item[PINT] Precipitation Intensity, in mm/h, as an average over the timestep
\item[PSUM] Precipitation accumulation, in mm/h, calculated over the last hour
\item[PSUM] Precipitation accumulation, in mm, summed over the last timestep
\item[HS] Height Snow, in m
\item[timestamp] ISO 8601 Combined date and time formatted
\item[julian] as the decimal number of days and fractions of a day since January 1, 4713 BC Greenwich noon, Julian proleptic calendar\footnote{Please keep in mind that year zero does not exist and that by starting at noon, it makes a half-day shift compared to usual meteorological time bases}. If both timestamps and julian are present, they must be within less than 1 second of each other.
......
......@@ -410,7 +410,7 @@ class AllSkySWGenerator : public GeneratorAlgorithm {
* @class ESOLIPGenerator
* @brief Generate precipitation from changes in snow height.
* This implements the approach laid out in
* Mair et al., <i>" ESOLIP–estimate of solid and liquid precipitation at sub-daily time resolution by combining snow height
* Mair et al., <i>"ESOLIP–estimate of solid and liquid precipitation at sub-daily time resolution by combining snow height
* and rain gauge measurements"</i>, Hydrology and Earth System Sciences Discussions, <b>10(7)</b>, 8683-8714, 2013. or
* Mair E., Leitinger G., Della Chiesa S., Niedrist G., Tappeiner U., Bertoldi G., <i>"A simple method to combine snow height and
* meteorological observations to estimate winter precipitation at sub-daily resolution"</i>, Journal of Hydrological Sciences,
......
......@@ -14,13 +14,13 @@ SET(meteoFilters_sources
meteoFilters/ProcButterworth.cc
meteoFilters/ProcUnventilatedT.cc
meteoFilters/ProcShade.cc
meteoFilters/ProcUnshade.cc
meteoFilters/ProcPSUMDistribute.cc
meteoFilters/ProcUndercatch_WMO.cc
meteoFilters/ProcUndercatch_Hamon.cc
meteoFilters/ProcUndercatch_Forland.cc
meteoFilters/ProcAdd.cc
meteoFilters/ProcMult.cc
meteoFilters/ProcNoise.cc
meteoFilters/ProcExpSmoothing.cc
meteoFilters/ProcWMASmoothing.cc
meteoFilters/FilterBlock.cc
......@@ -30,5 +30,5 @@ SET(meteoFilters_sources
meteoFilters/FilterNoChange.cc
meteoFilters/FilterTimeconsistency.cc
meteoFilters/FilterOffsetsnowdepth.cc
meteoFilters/FilterSnowNosnow.cc
meteoFilters/FilterDeGrass.cc
)
......@@ -15,14 +15,14 @@
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/FilterSnowNosnow.h>
#include <meteoio/meteoFilters/FilterDeGrass.h>
#include <meteoio/meteoStats/libinterpol1D.h>
using namespace std;
namespace mio {
FilterSnowNosnow::FilterSnowNosnow(const std::vector<std::string>& vec_args, const std::string& name)
FilterDeGrass::FilterDeGrass(const std::vector<std::string>& vec_args, const std::string& name)
: FilterBlock(name), prev_day(), TSS_daily_max(IOUtils::nodata), TSS_daily_min(IOUtils::nodata),
TSS_daily_mean(IOUtils::nodata), TSG_daily_var(IOUtils::nodata), month(7)
{
......@@ -30,7 +30,7 @@ FilterSnowNosnow::FilterSnowNosnow(const std::vector<std::string>& vec_args, con
properties.stage = ProcessingProperties::first;
}
void FilterSnowNosnow::process(const unsigned int& param, const std::vector<MeteoData>& ivec,
void FilterDeGrass::process(const unsigned int& param, const std::vector<MeteoData>& ivec,
std::vector<MeteoData>& ovec)
{
ovec = ivec;
......@@ -84,7 +84,7 @@ void FilterSnowNosnow::process(const unsigned int& param, const std::vector<Mete
}
}
void FilterSnowNosnow::filterOnTsg(const unsigned int& param, const size_t& ii, std::vector<MeteoData>& ovec)
void FilterDeGrass::filterOnTsg(const unsigned int& param, const size_t& ii, std::vector<MeteoData>& ovec)
{
double& value = ovec[ii](param);
if (value==IOUtils::nodata) return;
......@@ -102,7 +102,7 @@ void FilterSnowNosnow::filterOnTsg(const unsigned int& param, const size_t& ii,
if (TSG>IOUtils::C_TO_K(7.) || TSG_daily_var>1.) value = 0.;
}
void FilterSnowNosnow::filterOnTss(const unsigned int& param, const size_t& ii, const double& tss_offset, std::vector<MeteoData>& ovec)
void FilterDeGrass::filterOnTss(const unsigned int& param, const size_t& ii, const double& tss_offset, std::vector<MeteoData>& ovec)
{
double& value = ovec[ii](param);
if (value==IOUtils::nodata) return;
......@@ -127,7 +127,7 @@ void FilterSnowNosnow::filterOnTss(const unsigned int& param, const size_t& ii,
}
}
double FilterSnowNosnow::getTssTsgCorrelation(const std::vector<MeteoData>& ovec, const size_t& firstWarmDay_idx)
double FilterDeGrass::getTssTsgCorrelation(const std::vector<MeteoData>& ovec, const size_t& firstWarmDay_idx)
{
std::vector<double> vecTSS, vecTSG;
if (firstWarmDay_idx!=IOUtils::npos) {
......@@ -146,7 +146,7 @@ double FilterSnowNosnow::getTssTsgCorrelation(const std::vector<MeteoData>& ovec
return Interpol1D::corr(vecTSS, vecTSG);
}
void FilterSnowNosnow::findFirstWarmDay(const std::vector<MeteoData>& ovec, size_t &tssWarmDay_idx, size_t &tsgWarmDay_idx)
void FilterDeGrass::findFirstWarmDay(const std::vector<MeteoData>& ovec, size_t &tssWarmDay_idx, size_t &tsgWarmDay_idx)
{
tssWarmDay_idx = IOUtils::npos;
tsgWarmDay_idx = IOUtils::npos;
......@@ -176,7 +176,7 @@ void FilterSnowNosnow::findFirstWarmDay(const std::vector<MeteoData>& ovec, size
}
//compute the TSS offset/correction
double FilterSnowNosnow::getTSSOffset(const unsigned int& param, const std::vector<MeteoData>& ivec)
double FilterDeGrass::getTSSOffset(const unsigned int& param, const std::vector<MeteoData>& ivec)
{
Date prev_day;
double HS_daily_median, TSS_daily_median, RSWR_daily_10pc;
......@@ -202,7 +202,7 @@ double FilterSnowNosnow::getTSSOffset(const unsigned int& param, const std::vect
}
//daily values for TSS offset calc
bool FilterSnowNosnow::getDailyParameters(const std::vector<MeteoData>& ivec, const Date day_start, double &HS_daily_median, double &TSS_daily_median, double &RSWR_daily_10pc)
bool FilterDeGrass::getDailyParameters(const std::vector<MeteoData>& ivec, const Date day_start, double &HS_daily_median, double &TSS_daily_median, double &RSWR_daily_10pc)
{
const Date day_end = day_start + 1;
......@@ -229,7 +229,7 @@ bool FilterSnowNosnow::getDailyParameters(const std::vector<MeteoData>& ivec, co
}
//daily values for TSS-based correction
void FilterSnowNosnow::getTSSDailyPpt(const std::vector<MeteoData>& ivec, const Date day_start, double &TSS_daily_min, double &TSS_daily_max, double &TSS_daily_mean)
void FilterDeGrass::getTSSDailyPpt(const std::vector<MeteoData>& ivec, const Date day_start, double &TSS_daily_min, double &TSS_daily_max, double &TSS_daily_mean)
{
const Date day_end = day_start + 1;
......@@ -248,7 +248,7 @@ void FilterSnowNosnow::getTSSDailyPpt(const std::vector<MeteoData>& ivec, const
}
//daily values for TSG-based correction
double FilterSnowNosnow::getDailyTSGVariance(const std::vector<MeteoData>& ivec, const Date day_start)
double FilterDeGrass::getDailyTSGVariance(const std::vector<MeteoData>& ivec, const Date day_start)
{
const Date day_end = day_start + 1;
......@@ -270,7 +270,7 @@ double FilterSnowNosnow::getDailyTSGVariance(const std::vector<MeteoData>& ivec,
* @param resampling_date current date
* @return start of the day or start of the day before in case of midnight
*/
Date FilterSnowNosnow::getDailyStart(const Date& resampling_date)
Date FilterDeGrass::getDailyStart(const Date& resampling_date)
{
Date Start( resampling_date );
Start.rnd(24*3600, Date::DOWN);
......@@ -281,7 +281,7 @@ Date FilterSnowNosnow::getDailyStart(const Date& resampling_date)
}
void FilterSnowNosnow::parse_args(std::vector<std::string> vec_args)
void FilterDeGrass::parse_args(std::vector<std::string> vec_args)
{
if ( !vec_args.empty() ) //ie if there are arguments, throw an exception
throw InvalidArgumentException("Wrong number of arguments for filter " + getName(), AT);
......
......@@ -15,19 +15,17 @@
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 FilterSnowNosnow_H
#define FilterSnowNosnow_H
#ifndef FilterDeGrass_H
#define FilterDeGrass_H
//#include <meteoio/meteoFilters/WindowedFilter.h> //use this one for filters relying on a data window, for example std_dev
#include <meteoio/meteoFilters/FilterBlock.h> //use this one for all others
#include <vector>
#include <string>
namespace mio {
/**
* @class FilterSnowNosnow
* @class FilterDeGrass
* @ingroup processing
* @brief This filter is used to distinguish if snow (HS) is on the ground or not, because the
* ultrasonic sensor cannot distinguish between snow or vegetation/grass on the ground.
......@@ -48,21 +46,22 @@ namespace mio {
* References/Literature: Tilg, A.-M., Marty C. and G. Klein, <i>"An automatic algorithm for validating snow
* depth measurements of IMIS stations"</i>, 2015. Swiss Geoscience Meeting 2015
*
* \note
* - two of the used criterias are currently only valid for mid-northern latitudes (months when the season might start);
* - it is probably a good idea to use a FilterRate filter after this one in order to remove some potential left-over peaks.
*
* Example of use:
* @code
* HS::filter1 = SNOS
* HS::filter1 = DETECT_GRASS
* @endcode
*
*\note
* - two of the used criterias are currently only valid for mid-northern latitudes (months when the season might start);
* - it is probably a good idea to use a FilterRate filter after this one in order to remove some potential left-over peaks.
*
* @author Anna-Maria Tilg and Mathias Bavay
* @date 2015-12-16
*/
class FilterSnowNosnow : public FilterBlock {
class FilterDeGrass : public FilterBlock {
public:
FilterSnowNosnow(const std::vector<std::string>& vec_args, const std::string& name);
FilterDeGrass(const std::vector<std::string>& vec_args, const std::string& name);
virtual void process(const unsigned int& param, const std::vector<MeteoData>& ivec,
std::vector<MeteoData>& ovec);
......
/***********************************************************************************/
/* Copyright 2011 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/ProcUnshade.h>
#include <cmath>
using namespace std;
namespace mio {
ProcUnshade::ProcUnshade(const std::vector<std::string>& vec_args, const std::string& name) : WindowedFilter(name), max_gap(2)
{
parse_args(vec_args);
//This is safe, but maybe too imprecise:
properties.time_before = Duration(.5, 0.);
properties.time_after = Duration(.5, 0.);
properties.points_before = 1;
properties.points_after = 1;
}
void ProcUnshade::process(const unsigned int& param, const std::vector<MeteoData>& ivec,
std::vector<MeteoData>& ovec)
{
if (param!=MeteoData::ISWR && param!=MeteoData::RSWR)
throw InvalidArgumentException("Trying to use "+getName()+" filter on " + MeteoData::getParameterName(param) + " but it can only be applied to iswr/rswr!!" + getName(), AT);
if ( ivec.empty() ) return;
ovec = ivec;
const size_t nr_data = ovec.size();
vector<double> vecAlbedo, vecJulian;
//build the vector of albedos
for (size_t ii=0; ii<nr_data; ii++) {
const double iswr = ovec[ii](MeteoData::ISWR);
const double rswr = ovec[ii](MeteoData::RSWR);
if (iswr<=0. && rswr<=0.) continue;
const double curr_julian = ovec[ii].date.getJulian(true);
const double albedo = (iswr!=IOUtils::nodata && rswr!=IOUtils::nodata)? rswr / (iswr+1e-6) : IOUtils::nodata;
vecJulian.push_back( curr_julian );
if (albedo>0. && albedo<1.)
vecAlbedo.push_back( albedo );
else
vecAlbedo.push_back( IOUtils::nodata );
}
//filter and reinterpolate the albedo
if ( !filterAlbedo(vecJulian, vecAlbedo) ) return;
if ( !linInterpolate(vecJulian, vecAlbedo) ) return;
//apply the albedo correction
size_t alb_idx = 0;
for (size_t ii=0; ii<nr_data; ii++) {
double& iswr = ovec[ii](MeteoData::ISWR);
double& rswr = ovec[ii](MeteoData::RSWR);
if (iswr<=0. && rswr<=0.) continue; //skip nights
const double albedo = vecAlbedo[alb_idx];
if (param==MeteoData::ISWR) {
if (rswr!=IOUtils::nodata && albedo!=IOUtils::nodata) {
if (rswr>0. && albedo>0.)
iswr = rswr / albedo;
else
iswr = 0.;
}
} else { //on RSWR
if (iswr!=IOUtils::nodata && albedo!=IOUtils::nodata) {
if (iswr>0. && albedo>0.)
rswr = iswr * albedo;
else
rswr = 0.;
}
}
alb_idx++;
}
}
bool ProcUnshade::filterAlbedo(const std::vector<double>& julian, std::vector<double> &data) const
{
if (julian.empty()) return false;
vector<double> vecWindow;
double start_julian = julian[0];
size_t start_idx = 0;
for (size_t ii=0; ii<data.size(); ii++) { //piecewise MAD filter on a data window
if (data[ii]!=IOUtils::nodata) vecWindow.push_back( data[ii] );
const double curr_julian = julian[ii];
if ( (curr_julian-start_julian) >= max_gap) {
if ( !MADFilter(start_idx, vecWindow, data) ) return false;
vecWindow.resize(0);
start_julian = curr_julian;
start_idx = ii;
}
}
if (!vecWindow.empty())
if ( !MADFilter(start_idx, vecWindow, data) ) return false;
return true;
}
bool ProcUnshade::MADFilter(const size_t& start_idx, std::vector<double> &vecWindow, std::vector<double> &data)
{
const double K = 1. / 0.6745;
const double median = Interpol1D::getMedian(vecWindow, false); //we aleady handled nodata
const double mad = Interpol1D::getMedianAverageDeviation(vecWindow, false);
if ( median==IOUtils::nodata || mad==IOUtils::nodata ) return false;
const double sigma = mad * K;
const double lower_lim = median - 3.*sigma;
const double upper_lim = median + 3.*sigma;
for (size_t ii=0; ii<vecWindow.size(); ii++) {
double& value = data[start_idx+ii];
if ( value!=IOUtils::nodata && ((value>upper_lim) || (value<lower_lim)) ) {
value = IOUtils::nodata;
}
}
return true;
}
void ProcUnshade::interpolFill(const size_t& start_idx, const size_t& end_idx, const std::vector<double>& julian, std::vector<double> &data)
{
const double x1 = julian[start_idx];
const double x2 = julian[end_idx];
const double y1 = data[start_idx];
const double y2 = data[end_idx];
if (x1 == x2)
throw IOException("Attempted division by zero", AT);
//Solving y = ax + b
const double a = (y2 - y1) / (x2 - x1);
const double b = y2 - a*x2;
for (size_t ii = start_idx+1; ii<end_idx; ii++)
data[ii] = a * julian[ii] + b;
}
bool ProcUnshade::linInterpolate(const std::vector<double>& julian, std::vector<double> &data) const
{
const size_t nr_data = data.size();
//get starting point
size_t start_idx = IOUtils::npos;
for (size_t ii=0; ii<nr_data; ii++) {
if (data[ii]!=IOUtils::nodata) {
start_idx = ii;
break;
}
}
if (start_idx==IOUtils::npos) return false;
for (size_t ii=start_idx+1; ii<nr_data; ii++) {
if (data[ii]!=IOUtils::nodata) {
if ( ii!=start_idx+1 && (julian[ii]-julian[start_idx])<=max_gap )
interpolFill(start_idx, ii, julian, data);
start_idx = ii;
}
}
return true;
}
void ProcUnshade::parse_args(std::vector<std::string> vec_args)
{
if (vec_args.size() > 1){
throw InvalidArgumentException("Invalid arguments for filter " + getName(), AT);
}
vector<double> filter_args;
if (vec_args.size()==1) {
IOUtils::convertString( max_gap, vec_args[0]);
max_gap /= 86400.; //convert back to days
}
}
}
/***********************************************************************************/
/* Copyright 2011 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 PROCUNSHADE_H
#define PROCUNSHADE_H
#include <meteoio/meteoFilters/WindowedFilter.h>
#include <meteoio/meteoStats/libinterpol1D.h>
#include <vector>
#include <string>
#include <algorithm>
namespace mio {
/**
* @class ProcUnshade
* @ingroup processing
* @author Mathias Bavay
* @date 2011-02-07
* @brief Correct short wave measurements for shading of the sensor.
*
* @code
*
* @endcode
*/
class ProcUnshade : public WindowedFilter {
public:
ProcUnshade(const std::vector<std::string>& vec_args, const std::string& name);
virtual void process(const unsigned int& param, const std::vector<MeteoData>& ivec,
std::vector<MeteoData>& ovec);
private:
bool filterAlbedo(const std::vector<double>& julian, std::vector<double> &data) const;
bool linInterpolate(const std::vector<double>& julian, std::vector<double> &data) const;
void parse_args(std::vector<std::string> vec_args);
static bool MADFilter(const size_t& start_idx, std::vector<double> &vecWindow, std::vector<double> &data);
static void interpolFill(const size_t& start_idx, const size_t& end_idx, const std::vector<double>& julian, std::vector<double> &data);
double max_gap; ///<largest albedo gap that will still be interpolated, in days
};
} //end namespace
#endif
......@@ -39,15 +39,15 @@
#include <meteoio/meteoFilters/ProcPSUMDistribute.h>
#include <meteoio/meteoFilters/ProcUnventilatedT.h>
#include <meteoio/meteoFilters/ProcShade.h>
#include <meteoio/meteoFilters/ProcUnshade.h>
#include <meteoio/meteoFilters/ProcAdd.h>
#include <meteoio/meteoFilters/ProcMult.h>
#include <meteoio/meteoFilters/ProcNoise.h>
#include <meteoio/meteoFilters/ProcExpSmoothing.h>
#include <meteoio/meteoFilters/ProcWMASmoothing.h>
#include <meteoio/meteoFilters/FilterNoChange.h>
#include <meteoio/meteoFilters/FilterTimeconsistency.h>
#include <meteoio/meteoFilters/FilterOffsetsnowdepth.h>
#include <meteoio/meteoFilters/FilterSnowNosnow.h>
#include <meteoio/meteoFilters/FilterDeGrass.h>
namespace mio {
/**
......@@ -95,13 +95,14 @@ namespace mio {
* - TUKEY: Tukey53H spike detection, based on median, see FilterTukey
* - UNHEATED_RAINGAUGE: detection of snow melting in a rain gauge, see FilterUnheatedPSUM
* - NO_CHANGE: reject data that changes too little (low variance), see FilterNoChange
* - MAXCHANGE: reject data that changes too much , see FilterTimeconsistency
* - SNOS: detection of grass growing under the snow height sensor, see FilterSnowNosnow
* - TIME_CONSISTENCY: reject data that changes too much , see FilterTimeconsistency
* - DETECT_GRASS: detection of grass growing under the snow height sensor, see FilterDeGrass
*
* Some data transformations are also supported besides filtering, both very basic and generic data transformations:
* - SUPPR: delete all or some data, see FilterSuppr
* - ADD: adds a given offset to the data, see ProcAdd
* - MULT: multiply the data by a given factor, see ProcMult
* - NOISE: add to (or multiply by) randomly distributed noise, see ProcNoise
*
* As well as more specific data transformations:
* - EXP_SMOOTHING: exponential smoothing of data, see ProcExpSmoothing
......@@ -119,58 +120,67 @@ namespace mio {
ProcessingBlock* BlockFactory::getBlock(const std::string& blockname, const std::vector<std::string>& vec_args, const Config& cfg)
{
if (blockname == "SUPPR"){
return new FilterSuppr(vec_args, blockname, cfg.getConfigRootDir(), cfg.get("TIME_ZONE", "Input"));
} else if (blockname == "MIN"){
//the indenting is a little weird, this is in order to show the same groups as in the documentation above
//normal filters
if (blockname == "MIN"){
return new FilterMin(vec_args, blockname);
} else if (blockname == "MAX"){
return new FilterMax(vec_args, blockname);
} else if (blockname == "MIN_MAX"){
return new FilterMinMax(vec_args, blockname);
} else if (blockname == "AGGREGATE"){
return new ProcAggregate(vec_args, blockname);
} else if (blockname == "STD_DEV"){
return new FilterStdDev(vec_args, blockname);
} else if (blockname == "RATE"){
return new FilterRate(vec_args, blockname);
} else if (blockname == "TUKEY"){
return new FilterTukey(vec_args, blockname);
} else if (blockname == "STD_DEV"){
return new FilterStdDev(vec_args, blockname);
} else if (blockname == "MAD"){
return new FilterMAD(vec_args, blockname);
} else if (blockname == "BUTTERWORTH"){
return new ProcButterworth(vec_args, blockname);
} else if (blockname == "TUKEY"){
return new FilterTukey(vec_args, blockname);
} else if (blockname == "UNHEATED_RAINGAUGE"){
return new FilterUnheatedPSUM(vec_args, blockname);
} else if (blockname == "NO_CHANGE"){
return new FilterNoChange(vec_args, blockname);
} else if (blockname == "TIME_CONSISTENCY"){
return new FilterTimeconsistency(vec_args, blockname);
} else if (blockname == "OFFSNOW"){
return new FilterOffsetsnowdepth(vec_args, blockname);
} else if (blockname == "DETECT_GRASS"){
return new FilterDeGrass(vec_args, blockname);
}
//general data transformations
else if (blockname == "SUPPR"){
return new FilterSuppr(vec_args, blockname, cfg.getConfigRootDir(), cfg.get("TIME_ZONE", "Input"));
} else if (blockname == "ADD"){
return new ProcAdd(vec_args, blockname, cfg.getConfigRootDir());
} else if (blockname == "MULT"){
return new ProcMult(vec_args, blockname, cfg.getConfigRootDir());
} else if (blockname == "NOISE"){
return new ProcNoise(vec_args, blockname);
}
//more specific data transformations
else if (blockname == "EXP_SMOOTHING"){
return new ProcExpSmoothing(vec_args, blockname);
} else if (blockname == "WMA_SMOOTHING"){
return new ProcWMASmoothing(vec_args, blockname);
} else if (blockname == "BUTTERWORTH"){
return new ProcButterworth(vec_args, blockname);
} else if (blockname == "AGGREGATE"){
return new ProcAggregate(vec_args, blockname);
} else if (blockname == "UNDERCATCH_WMO"){
return new ProcUndercatch_WMO(vec_args, blockname);
} else if (blockname == "UNDERCATCH_FORLAND"){
return new ProcUndercatch_Forland(vec_args, blockname);
} else if (blockname == "UNDERCATCH_HAMON"){
return new ProcUndercatch_Hamon(vec_args, blockname);
} else if (blockname == "PSUM_DISTRIBUTE"){
return new ProcPSUMDistribute(vec_args, blockname);
} else if (blockname == "UNVENTILATED_T"){
return new ProcUnventilatedT(vec_args, blockname);
} else if (blockname == "PSUM_DISTRIBUTE"){
return new ProcPSUMDistribute(vec_args, blockname);
} else if (blockname == "SHADE"){
return new ProcShade(vec_args, blockname, cfg);
} else if (blockname == "UNSHADE"){
return new ProcUnshade(vec_args, blockname);
} else if (blockname == "MULT"){
return new ProcMult(vec_args, blockname, cfg.getConfigRootDir());
} else if (blockname == "ADD"){
return new ProcAdd(vec_args, blockname, cfg.getConfigRootDir());
} else if (blockname == "EXP_SMOOTHING"){
return new ProcExpSmoothing(vec_args, blockname);
} else if (blockname == "WMA_SMOOTHING"){
return new ProcWMASmoothing(vec_args, blockname);