UFO
LapseRate.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020 UCAR
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_LAPSERATE_H_
9 #define UFO_PREDICTORS_LAPSERATE_H_
10 
11 #include <map>
12 #include <string>
13 
14 #include "oops/util/parameters/Parameter.h"
15 #include "oops/util/parameters/Parameters.h"
16 #include "oops/util/parameters/RequiredParameter.h"
17 
19 
20 namespace oops {
21  class Variables;
22 }
23 
24 namespace ioda {
25  class ObsSpace;
26 }
27 
28 namespace ufo {
29 
30 // -----------------------------------------------------------------------------
31 
32 /// Configuration parameters of the LapseRate predictor.
35 
36  public:
37  /// Path to an input file.
38  oops::RequiredParameter<std::string> tlapse{"tlapse", this};
39 
40  /// Power to which to raise the lapse rate. By default, 1.
41  ///
42  /// \note If this option is set, a suffix containing its value (even if it's equal to 1) will be
43  /// appended to the predictor name.
44  oops::OptionalParameter<int> order{"order", this};
45 };
46 
47 // -----------------------------------------------------------------------------
48 
49 class LapseRate : public PredictorBase {
50  public:
51  /// The type of parameters accepted by the constructor of this predictor.
52  /// This typedef is used by the PredictorFactory.
54 
55  LapseRate(const Parameters_ &, const oops::Variables &);
56 
57  void compute(const ioda::ObsSpace &,
58  const GeoVaLs &,
59  const ObsDiagnostics &,
60  ioda::ObsVector &) const override;
61 
62  private:
63  std::map<int, float> tlapmean_; // <channel, tlaps>
64  int order_;
65 };
66 
67 // -----------------------------------------------------------------------------
68 
69 } // namespace ufo
70 
71 #endif // UFO_PREDICTORS_LAPSERATE_H_
GeoVaLs: geophysical values at locations.
std::map< int, float > tlapmean_
Definition: LapseRate.h:63
LapseRate(const Parameters_ &, const oops::Variables &)
Definition: LapseRate.cc:29
void compute(const ioda::ObsSpace &, const GeoVaLs &, const ObsDiagnostics &, ioda::ObsVector &) const override
compute the predictor
Definition: LapseRate.cc:74
LapseRateParameters Parameters_
Definition: LapseRate.h:53
Configuration parameters of the LapseRate predictor.
Definition: LapseRate.h:33
oops::OptionalParameter< int > order
Definition: LapseRate.h:44
oops::RequiredParameter< std::string > tlapse
Path to an input file.
Definition: LapseRate.h:38
OOPS_CONCRETE_PARAMETERS(LapseRateParameters, PredictorParametersBase)
Base class for predictor parameters.
Definition: PredictorBase.h:37
Forward declarations.
Definition: ObsAodExt.h:25
Definition: RunCRTM.h:27