UFO
GaussianThinningParameters.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020 Met Office UK
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
9 
10 #include <utility>
11 
12 namespace ufo {
14 constexpr util::NamedEnumerator<DistanceNorm> DistanceNormParameterTraitsHelper::namedValues[];
15 
16 void GaussianThinningParameters::deserialize(util::CompositePath &path,
17  const eckit::Configuration &config) {
18  oops::Parameters::deserialize(path, config);
19 
21  if (roundHorizontalBinCountToNearest.value() != boost::none &&
22  *roundHorizontalBinCountToNearest.value() == false)
23  throw eckit::UserError(
24  path.path() + ": round_horizontal_bin_count_to_nearest must not be set to false when "
25  "ops_compatibility_mode is set to true", Here());
26  if (distanceNorm.value() != boost::none &&
28  throw eckit::UserError(
29  path.path() + ": distance_norm must not be set to 'geodesic' when "
30  "ops_compatibility_mode is set to true", Here());
31  }
32 }
33 
34 } // namespace ufo
oops::OptionalParameter< DistanceNorm > distanceNorm
void deserialize(util::CompositePath &path, const eckit::Configuration &config) override
Reimplemented to detect incompatible options.
oops::OptionalParameter< bool > roundHorizontalBinCountToNearest
Definition: RunCRTM.h:27
static constexpr util::NamedEnumerator< DistanceNorm > namedValues[]