UFO
SatWindsLNVDCheck.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_FILTERS_OBSFUNCTIONS_SATWINDSLNVDCHECK_H_
9 #define UFO_FILTERS_OBSFUNCTIONS_SATWINDSLNVDCHECK_H_
10 
11 #include <string>
12 
13 #include "oops/util/parameters/Parameter.h"
14 
17 #include "ufo/filters/Variables.h"
18 
19 namespace ufo {
20 
21 ///
22 /// \brief Only one option to override the source of HofX wind components.
23 ///
24 class SatWindsLNVDCheckParameters : public oops::Parameters {
25  OOPS_CONCRETE_PARAMETERS(SatWindsLNVDCheckParameters, Parameters)
26 
27  public:
28  /// Name of the HofX group used to replace the default group (default is HofX)
29  oops::Parameter<std::string> test_hofx{"test_hofx", "HofX", this};
30 };
31 
32 // -----------------------------------------------------------------------------
33 
34 /// \brief Compute the log-normal vector difference (LNVD) of observation-model
35 /// SatWinds. If the LNVD is greater than a threshold (usually 3.0), then
36 /// flag the location as bad. In regular usage, the test_hofx option would
37 /// be omitted in order that HofX is used for the model wind components.
38 ///
39 /// ~~~
40 ///
41 /// ### Sample YAML configuration
42 /// - filter: Bounds Check
43 /// filter variables:
44 /// - name: eastward_wind
45 /// - name: northward_wind
46 /// test variables:
47 /// - name: SatWindsLNVDCheck@ObsFunction
48 /// options:
49 /// test_hofx: GsiHofX
50 /// maxvalue: 3
51 ///
52 class SatWindsLNVDCheck : public ObsFunctionBase<float> {
53  public:
54  static const std::string classname() {return "SatWindsLNVDCheck";}
55 
56  explicit SatWindsLNVDCheck(const eckit::LocalConfiguration &
57  = eckit::LocalConfiguration());
58  ~SatWindsLNVDCheck();
59 
60  void compute(const ObsFilterData &, ioda::ObsDataVector<float> &) const;
61  const ufo::Variables & requiredVariables() const;
62  private:
63  ufo::Variables invars_;
64  SatWindsLNVDCheckParameters options_;
65 };
66 
67 // -----------------------------------------------------------------------------
68 
69 } // namespace ufo
70 
71 #endif // UFO_FILTERS_OBSFUNCTIONS_SATWINDSLNVDCHECK_H_
Only one option to override the source of HofX wind components.
oops::Parameter< std::string > test_hofx
Name of the HofX group used to replace the default group (default is HofX)
Definition: RunCRTM.h:27