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"
18 #include "ufo/utils/Constants.h"
20 
21 namespace eckit {
22  class Configuration;
23 }
24 
25 namespace ufo {
26 
27 /// \brief Options controlling the operation of the TemporalThinning filter.
29  OOPS_CONCRETE_PARAMETERS(TemporalThinningParameters, FilterParametersBase)
30 
31  public:
32  /// Minimum spacing between two successive retained observations.
33  oops::Parameter<util::Duration> minSpacing{"min_spacing", util::Duration("PT1H"), this};
34 
35  /// Only relevant if \c priority_variable is set.
36  ///
37  /// If \c tolerance is nonzero, then whenever an observation O lying at least \c min_spacing
38  /// from the previous retained observation O' is found, the filter will inspect all observations
39  /// lying no more than \c tolerance further from O' and retain the one with the highest priority.
40  oops::Parameter<util::Duration> tolerance{"tolerance", util::Duration("PT0H"), this};
41 
42  /// If not set, the thinning filter will consider observations as candidates for retaining
43  /// in chronological order.
44  ///
45  /// If set, the filter will start from the observation taken as close as possible to \c seed_time,
46  /// then consider all successive observations in chronological order, and finally all preceding
47  /// observations in reverse chronological order.
48  oops::OptionalParameter<util::DateTime> seedTime{"seed_time", this};
49 
50  /// A string- or integer-valued variable. Observations with different values of that variable will
51  /// be thinned separately.
52  ///
53  /// If not set and observations were grouped into records when the observation space was
54  /// constructed, observations from each record will be thinned separately. If not set and
55  /// observations were not grouped into records, all observations will be thinned together.
56  ///
57  /// Note: the variable used to group observations into records can be set with the
58  /// \c obs space.obsdatain.obsgrouping.group variable YAML option.
59  oops::OptionalParameter<Variable> categoryVariable{"category_variable", this};
60 
61  /// Variable storing observation priorities. Used together with \c tolerance; see the
62  /// documentation of that parameter for more information.
63  oops::OptionalParameter<Variable> priorityVariable{"priority_variable", this};
64 };
65 
66 } // namespace ufo
67 
68 #endif // UFO_FILTERS_TEMPORALTHINNINGPARAMETERS_H_
Parameters shared by all filters having a default action (typically "reject").
Options controlling the operation of the TemporalThinning filter.
oops::Parameter< util::Duration > minSpacing
Minimum spacing between two successive retained observations.
oops::OptionalParameter< Variable > categoryVariable
oops::OptionalParameter< Variable > priorityVariable
oops::OptionalParameter< util::DateTime > seedTime
oops::Parameter< util::Duration > tolerance
Forward declarations.
Definition: ObsAodExt.h:21
Definition: RunCRTM.h:27