Skip to content

Commit

Permalink
Remove CalibratorAccumulate
Browse files Browse the repository at this point in the history
  • Loading branch information
tnipen committed Feb 6, 2015
1 parent de38ad3 commit 3248ee5
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/Calibrator/Calibrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Calibrator* Calibrator::getScheme(std::string iName, const Options& iOptions) {
CalibratorCloud* c = new CalibratorCloud(Variable::Precip, Variable::getType(variable));
return c;
}
/*
else if(iName == "accumulate") {
std::string variable;
if(!iOptions.getValue("variable", variable)) {
Expand All @@ -47,6 +48,7 @@ Calibrator* Calibrator::getScheme(std::string iName, const Options& iOptions) {
CalibratorAccumulate* c = new CalibratorAccumulate(Variable::getType(variable));
return c;
}
*/
else if(iName == "smooth") {
std::string variable;
if(!iOptions.getValue("variable", variable)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Calibrator/Calibrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Calibrator {
#include "Cloud.h"
// #include "Wind.h"
#include "Temperature.h"
#include "Accumulate.h"
// #include "Accumulate.h"
#include "Smooth.h"
#include "Phase.h"
#include "WindDirection.h"
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/Driver/Gpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ int main(int argc, const char *argv[]) {
std::cout << "Calibrators with options (and default values):" << std::endl;
std::cout << CalibratorZaga::description();
std::cout << CalibratorCloud::description();
std::cout << CalibratorAccumulate::description();
std::cout << CalibratorWindDirection::description();
std::cout << CalibratorSmooth::description();
std::cout << CalibratorPhase::description();
Expand Down
8 changes: 4 additions & 4 deletions src/Testing/Setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ typedef Setup MetSetup;
namespace {

TEST(SetupTest, test1) {
MetSetup setup(Util::split("input output -v T -c zaga parameters=testing/files/parameters.txt -c accumulate -d smart searchRadius=11"));
MetSetup setup(Util::split("input output -v T -c zaga parameters=testing/files/parameters.txt -c smooth -d smart searchRadius=11"));
EXPECT_EQ(1, setup.variableConfigurations.size());
EXPECT_EQ(2, setup.variableConfigurations[0].calibrators.size());
EXPECT_EQ(Variable::T, setup.variableConfigurations[0].variable);
Expand Down Expand Up @@ -40,14 +40,14 @@ namespace {
EXPECT_EQ("nearestNeighbour", setup.variableConfigurations[0].downscaler->name());
}
TEST(SetupTest, complicated) {
MetSetup setup(Util::split("input output -v T -d nearestNeighbour -d smart -c smooth -c accumulate -c smooth -v Precip -c zaga parameters=testing/files/parameters.txt -d gradient"));
MetSetup setup(Util::split("input output -v T -d nearestNeighbour -d smart -c smooth -c cloud -c smooth -v Precip -c zaga parameters=testing/files/parameters.txt -d gradient"));
ASSERT_EQ(2, setup.variableConfigurations.size());
VariableConfiguration varconf = setup.variableConfigurations[0];
EXPECT_EQ(Variable::T, varconf.variable);
EXPECT_EQ("smart", varconf.downscaler->name());
ASSERT_EQ(3, varconf.calibrators.size());
EXPECT_EQ("smooth", varconf.calibrators[0]->name());
EXPECT_EQ("accumulate", varconf.calibrators[1]->name());
EXPECT_EQ("cloud", varconf.calibrators[1]->name());
EXPECT_EQ("smooth", varconf.calibrators[2]->name());

EXPECT_EQ(Variable::Precip, setup.variableConfigurations[1].variable);
Expand Down Expand Up @@ -120,7 +120,7 @@ namespace {
MetSetup setup3(Util::split("input output -v T -d smart -c smooth"));
MetSetup setup4(Util::split("input output -v T -d smart -c smooth smooth"));
MetSetup setup5(Util::split("input output -v T -d smart -c smooth smooth -v Precip -d smart"));
MetSetup setup6(Util::split("input output -v T -d nearestNeighbour -d smart -c smooth accumulate smooth -v Precip -d smart"));
MetSetup setup6(Util::split("input output -v T -d nearestNeighbour -d smart -c smooth cloud smooth -v Precip -d smart"));
MetSetup setup7(Util::split("input output -v T -d nearestNeighbour -v Precip -d smart"));
MetSetup setup8(Util::split("input output -v T -d smart numSmart=2 -c smooth -v Precip -d smart"));
MetSetup setup9(Util::split("input output -v T -d smart numSmart=2 -v Precip -d smart"));
Expand Down

0 comments on commit 3248ee5

Please sign in to comment.