UFO
SIRetMW.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_SIRETMW_H_
9 #define UFO_FILTERS_OBSFUNCTIONS_SIRETMW_H_
10 
11 #include <string>
12 #include <vector>
13 
14 #include "oops/util/parameters/Parameter.h"
15 #include "oops/util/parameters/Parameters.h"
16 #include "oops/util/parameters/RequiredParameter.h"
17 
20 #include "ufo/filters/Variables.h"
21 
22 namespace ufo {
23 
24 ///
25 /// \brief Options applying to the retrieval of scattering index from 90.0 GHz and
26 // 150.0 GHz channels.
27 ///
28 class SIRetMWParameters : public oops::Parameters {
29  OOPS_CONCRETE_PARAMETERS(SIRetMWParameters, Parameters)
30 
31  public:
32  /// channel number corresponding to 90.0 GHz to which the retrieval
33  /// of scattering index applies
34  /// Example: MHS channel numbers used in scattering index retrieval
35  /// siret_channels: 1
36  oops::RequiredParameter<int> ch90{"siret_ch90", this};
37 
38  /// channel number corresponding to 150.0 GHz to which the retrieval
39  /// of scattering index applies
40  /// Example: MHS channel numbers used in scattering index retrieval
41  /// siret_channels: 2
42  oops::RequiredParameter<int> ch150{"siret_ch150", this};
43 
44  /// Names of the data group used to retrieve the scattering index
45  /// Example: get retrieved SI from observation and simulated observation respectively
46  /// siret_types: [ObsValue, HofX]
47  /// Example: get retrieved SI from observation or simulated observation only
48  /// siret_types: [ObsValue]
49  /// siret_types: [HofX]
50  oops::RequiredParameter<std::vector<std::string>> varGroup{"siret_types", this};
51 
52  /// Name of the data group to which the bias correction is applied (default is HofX)
53  /// Example: add bias corretion to simulated observation
54  /// bias_application: HofX
55  /// Example: add bias corretion to observation
56  /// bias_application: ObsValue
57  oops::Parameter<std::string> addBias{"bias_application", "HofX", this};
58 
59  /// Name of the bias correction group used to replace the default group (default is ObsBiasData)
60  /// Example: use observation bias correction values from GSI
61  /// test_bias: GsiObsBias
62  oops::Parameter<std::string> testBias{"test_bias", "ObsBiasData", this};
63 };
64 
65 ///
66 /// \brief Retrieve scattering index from MHS 89.0 GHz and 157.0 GHz channels.
67 ///
68 /// Reference: Geer et al. (2014)
69 /// Geer, A. J., Fabrizio, B., Bormann, N., & English, S. (2014). All-sky assimilation of
70 /// microwave humidity sounders. European Centre for Medium-Range Weather Forecasts.
71 ///
72 class SIRetMW : public ObsFunctionBase<float> {
73  public:
74  explicit SIRetMW(const eckit::LocalConfiguration &
75  = eckit::LocalConfiguration());
76  ~SIRetMW();
77 
78  void compute(const ObsFilterData &,
80  const ufo::Variables & requiredVariables() const;
81  const std::vector<std::string> &siVariableGroups() const {
82  return options_.varGroup.value();
83  }
84  inline static float getBadValue() {return bad_siret_value_;}
85  private:
88  static constexpr float bad_siret_value_ = 1000.f;
89 };
90 
91 // -----------------------------------------------------------------------------
92 
93 } // namespace ufo
94 
95 #endif // UFO_FILTERS_OBSFUNCTIONS_SIRETMW_H_
ObsFilterData provides access to all data related to an ObsFilter.
Retrieve scattering index from MHS 89.0 GHz and 157.0 GHz channels.
Definition: SIRetMW.h:72
const ufo::Variables & requiredVariables() const
geovals required to compute the function
Definition: SIRetMW.cc:136
ufo::Variables invars_
Definition: SIRetMW.h:86
static float getBadValue()
Definition: SIRetMW.h:84
SIRetMW(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
Definition: SIRetMW.cc:27
static constexpr float bad_siret_value_
Definition: SIRetMW.h:88
SIRetMWParameters options_
Definition: SIRetMW.h:87
const std::vector< std::string > & siVariableGroups() const
Definition: SIRetMW.h:81
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
Definition: SIRetMW.cc:59
Options applying to the retrieval of scattering index from 90.0 GHz and.
Definition: SIRetMW.h:28
oops::Parameter< std::string > addBias
Definition: SIRetMW.h:57
oops::Parameter< std::string > testBias
Definition: SIRetMW.h:62
oops::RequiredParameter< std::vector< std::string > > varGroup
Definition: SIRetMW.h:50
oops::RequiredParameter< int > ch150
Definition: SIRetMW.h:42
oops::RequiredParameter< int > ch90
Definition: SIRetMW.h:36
Definition: RunCRTM.h:27