UFO
SatelliteSelector.h
Go to the documentation of this file.
1 /*
2  * (C) Crown copyright 2021, MetOffice
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_PREDICTORS_SATELLITESELECTOR_H_
9 #define UFO_PREDICTORS_SATELLITESELECTOR_H_
10 
11 #include <memory>
12 #include <string>
13 #include <vector>
14 
15 #include "oops/util/parameters/Parameter.h"
16 #include "oops/util/parameters/RequiredParameter.h"
17 
19 
20 namespace eckit {
21  class LocalConfiguration;
22 }
23 
24 namespace oops {
25  class Variables;
26 }
27 
28 namespace ioda {
29  class ObsSpace;
30 }
31 
32 namespace ufo {
33 
34 /// Configuration parameters of the SatelliteSelector wrapper for a predictor.
37 
38  public:
39  /// A wrapper to allow for satellite selection when applying any of the
40  /// predictors. Where the satid is not in the list the predictor is set
41  /// to zero.
42  ///
43  /// The satellite id of the satellite which the predictor should apply to.
44  oops::RequiredParameter<int> satelliteId{"satellite id", this};
45 
46  /// The configuration for a specific predictor
47  oops::RequiredParameter<eckit::LocalConfiguration> predictor{"owned predictor", this};
48 
49  /// Name for the metadata item which will be compared to allow for:
50  /// satellite_id@MetaData - the default
51  /// satellite_identifier@MetaData
52  /// This will hopefully be removed in the future.
53  oops::Parameter<std::string> metadataName{"metadata name", "satellite_id", this};
54 };
55 
56 // -----------------------------------------------------------------------------
57 
59  public:
60  /// The type of parameters accepted by the constructor of this predictor.
61  /// This typedef is used by the PredictorFactory.
63 
64  SatelliteSelector(const Parameters_ &, const oops::Variables &);
65 
66  void compute(const ioda::ObsSpace &,
67  const GeoVaLs &,
68  const ObsDiagnostics &,
69  ioda::ObsVector &) const override;
70 
71  private:
72  /// The local predictor specified from yaml
73  std::unique_ptr<PredictorBase> predictor_;
74  const int satid_;
75  const std::string metadata_name_;
76 };
77 
78 // -----------------------------------------------------------------------------
79 
80 } // namespace ufo
81 
82 #endif // UFO_PREDICTORS_SATELLITESELECTOR_H_
GeoVaLs: geophysical values at locations.
Base class for predictor parameters.
Definition: PredictorBase.h:37
std::unique_ptr< PredictorBase > predictor_
The local predictor specified from yaml.
SatelliteSelectorParameters Parameters_
void compute(const ioda::ObsSpace &, const GeoVaLs &, const ObsDiagnostics &, ioda::ObsVector &) const override
compute the predictor
const std::string metadata_name_
SatelliteSelector(const Parameters_ &, const oops::Variables &)
Configuration parameters of the SatelliteSelector wrapper for a predictor.
oops::Parameter< std::string > metadataName
oops::RequiredParameter< int > satelliteId
OOPS_CONCRETE_PARAMETERS(SatelliteSelectorParameters, PredictorParametersBase)
oops::RequiredParameter< eckit::LocalConfiguration > predictor
The configuration for a specific predictor.
Forward declarations.
Definition: ObsAodExt.h:21
Forward declarations.
Definition: ObsAodExt.h:25
Definition: RunCRTM.h:27