8 #ifndef UFO_OBSLOCALIZATION_OBSLOCPARAMETERS_H_
9 #define UFO_OBSLOCALIZATION_OBSLOCPARAMETERS_H_
14 #include "eckit/exception/Exceptions.h"
15 #include "eckit/geometry/KPoint.h"
16 #include "eckit/geometry/Point2.h"
17 #include "eckit/geometry/UnitSphere.h"
19 #include "oops/util/parameters/OptionalParameter.h"
20 #include "oops/util/parameters/Parameter.h"
21 #include "oops/util/parameters/Parameters.h"
22 #include "oops/util/parameters/RequiredParameter.h"
41 static constexpr util::NamedEnumerator<DistanceType>
namedValues[] = {
50 static constexpr util::NamedEnumerator<SearchMethod>
namedValues[] = {
63 public EnumParameterTraits<ufo::DistanceTypeParameterTraitsHelper>
70 public EnumParameterTraits<ufo::SearchMethodParameterTraitsHelper>
83 oops::RequiredParameter<double>
lengthscale{
"lengthscale",
this};
89 oops::OptionalParameter<int>
maxnobs{
"max nobs",
this};
97 double distance(
const eckit::geometry::Point2 & p1,
const eckit::geometry::Point2 & p2)
const {
102 return p1.distance(p2);
Options controlling local observations subsetting.
static constexpr double radius_earth
oops::OptionalParameter< int > maxnobs
Maximum number of obs.
oops::RequiredParameter< double > lengthscale
Localization lengthscale (find all obs within the distance from reference point)
oops::Parameter< DistanceType > distanceType
double distance(const eckit::geometry::Point2 &p1, const eckit::geometry::Point2 &p2) const
oops::Parameter< SearchMethod > searchMethod
Method for searching for nearest points: brute force or KD-tree.
float distance(const Point &a, const Point &b)
Returns the distance between the two cartesian-mapped Point arguments
static constexpr util::NamedEnumerator< DistanceType > namedValues[]
static constexpr char enumTypeName[]
static constexpr util::NamedEnumerator< SearchMethod > namedValues[]
static constexpr char enumTypeName[]