UFO
TemporalThinningParameters.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2019 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 
8 #ifndef UFO_FILTERS_TEMPORALTHINNINGPARAMETERS_H_
9 #define UFO_FILTERS_TEMPORALTHINNINGPARAMETERS_H_
10 
11 #include <string>
12 
13 #include "eckit/exception/Exceptions.h"
14 #include "oops/util/parameters/OptionalParameter.h"
15 #include "oops/util/parameters/Parameter.h"
16 #include "oops/util/parameters/Parameters.h"
17 #include "ufo/utils/Constants.h"
19 
20 namespace eckit {
21  class Configuration;
22 }
23 
24 namespace ufo {
25 
26 /// \brief Options controlling the operation of the TemporalThinning filter.
27 class TemporalThinningParameters : public oops::Parameters {
28  OOPS_CONCRETE_PARAMETERS(TemporalThinningParameters, Parameters)
29 
30  public:
31  /// Minimum spacing between two successive retained observations.
32  oops::Parameter<util::Duration> minSpacing{"min_spacing", util::Duration("PT1H"), this};
33 
34  /// Only relevant if \c priority_variable is set.
35  ///
36  /// If \c tolerance is nonzero, then whenever an observation O lying at least \c min_spacing
37  /// from the previous retained observation O' is found, the filter will inspect all observations
38  /// lying no more than \c tolerance further from O' and retain the one with the highest priority.
39  oops::Parameter<util::Duration> tolerance{"tolerance", util::Duration("PT0H"), this};
40 
41  /// If not set, the thinning filter will consider observations as candidates for retaining
42  /// in chronological order.
43  ///
44  /// If set, the filter will start from the observation taken as close as possible to \c seed_time,
45  /// then consider all successive observations in chronological order, and finally all preceding
46  /// observations in reverse chronological order.
47  oops::OptionalParameter<util::DateTime> seedTime{"seed_time", this};
48 
49  /// Variable storing integer-valued IDs associated with observations. Observations belonging
50  /// to different categories are thinned separately.
51  oops::OptionalParameter<Variable> categoryVariable{"category_variable", this};
52 
53  /// Variable storing observation priorities. Used together with \c tolerance; see the
54  /// documentation of that parameter for more information.
55  oops::OptionalParameter<Variable> priorityVariable{"priority_variable", this};
56 };
57 
58 } // namespace ufo
59 
60 #endif // UFO_FILTERS_TEMPORALTHINNINGPARAMETERS_H_
ufo::TemporalThinningParameters::categoryVariable
oops::OptionalParameter< Variable > categoryVariable
Definition: TemporalThinningParameters.h:51
ufo
Definition: RunCRTM.h:27
eckit
Forward declarations.
Definition: ObsAtmSfcInterp.h:20
ufo::TemporalThinningParameters
Options controlling the operation of the TemporalThinning filter.
Definition: TemporalThinningParameters.h:27
Constants.h
ufo::TemporalThinningParameters::tolerance
oops::Parameter< util::Duration > tolerance
Definition: TemporalThinningParameters.h:39
ufo::TemporalThinningParameters::priorityVariable
oops::OptionalParameter< Variable > priorityVariable
Definition: TemporalThinningParameters.h:55
ufo::TemporalThinningParameters::minSpacing
oops::Parameter< util::Duration > minSpacing
Minimum spacing between two successive retained observations.
Definition: TemporalThinningParameters.h:32
ufo::TemporalThinningParameters::seedTime
oops::OptionalParameter< util::DateTime > seedTime
Definition: TemporalThinningParameters.h:47
ParameterTraitsVariable.h