UFO
SCATRetMW.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2019 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_SCATRETMW_H_
9 #define UFO_FILTERS_OBSFUNCTIONS_SCATRETMW_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/Variable.h"
21 #include "ufo/filters/Variables.h"
23 
24 namespace ufo {
25 
26 ///
27 /// \brief Options applying to the retrieval of scattering index from 23.8 GHz, 31.4 GHz,
28 // and 89 GHz channels.
29 ///
30 class SCATRetMWParameters : public oops::Parameters {
31  OOPS_CONCRETE_PARAMETERS(SCATRetMWParameters, Parameters)
32 
33  public:
34  /// channel number corresponding to 23.8 GHz to which the retrieval
35  /// of scattering index applies
36  /// Example: AMSU-A channel numbers used in scattering index retrieval
37  /// scatret_channels: 1
38  oops::RequiredParameter<int> ch238{"scatret_ch238", this};
39 
40  /// channel number corresponding to 31.4 GHz to which the retrieval
41  /// of scattering index applies
42  /// Example: AMSU-A channel numbers used in scattering index retrieval
43  /// scatret_channels: 2
44  oops::RequiredParameter<int> ch314{"scatret_ch314", this};
45 
46  /// channel number corresponding to 89 GHz to which the retrieval
47  /// of scattering index applies
48  /// Example: AMSU-A channel numbers used in scattering index retrieval
49  /// scatret_channels: 15
50  oops::RequiredParameter<int> ch890{"scatret_ch890", this};
51 
52  /// Names of the data group used to retrieve the scattering index
53  /// Example: get retrieved scattering index from observation and simulated values respectively
54  /// scatret_types: [ObsValue, HofX]
55  /// Example: get retrieved scattering index from observation or simulated values only
56  /// scatret_types: [ObsValue]
57  /// scatret_types: [HofX]
58  oops::RequiredParameter<std::vector<std::string>> varGroup{"scatret_types", this};
59 
60  /// Name of the data group to which the bias correction is applied (default is HofX)
61  /// Example: add bias corretion to simulated observation
62  /// bias_application: HofX
63  /// Example: add bias corretion to observation
64  /// bias_application: ObsValue
65  oops::Parameter<std::string> addBias{"bias_application", "HofX", this};
66 
67  /// Name of the bias correction group used to replace the default group (default is ObsBiasData)
68  /// Example: use observation bias correction values from GSI
69  /// test_bias: GsiObsBias
70  oops::Parameter<std::string> testBias{"test_bias", "ObsBiasData", this};
71 };
72 
73 ///
74 /// \brief Retrieve scattering index from 23.8 GHz, 31.4 GHz and 89 GHz channels.
75 ///
76 /// Reference: Grody et al. (2000)
77 /// Application of AMSU for obtaining hydrological parameters
78 /// Microw. Radiomet. Remote Sens. Eatch's Surf. Atmosphere, pp. 339-351
79 ///
80 class SCATRetMW : public ObsFunctionBase<float> {
81  public:
82  explicit SCATRetMW(const eckit::LocalConfiguration &
83  = eckit::LocalConfiguration());
84  ~SCATRetMW();
85 
86  void compute(const ObsFilterData &,
88  const ufo::Variables & requiredVariables() const;
89  const std::vector<std::string> &scatVariableGroups() const {
90  return options_.varGroup.value();
91  }
92  inline static float getBadValue() {return bad_scatret_value_;}
93  private:
96  static constexpr float bad_scatret_value_ = 1000.f;
97 };
98 
99 // -----------------------------------------------------------------------------
100 
101 } // namespace ufo
102 
103 #endif // UFO_FILTERS_OBSFUNCTIONS_SCATRETMW_H_
ObsFilterData provides access to all data related to an ObsFilter.
Retrieve scattering index from 23.8 GHz, 31.4 GHz and 89 GHz channels.
Definition: SCATRetMW.h:80
static float getBadValue()
Definition: SCATRetMW.h:92
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
Definition: SCATRetMW.cc:59
ufo::Variables invars_
Definition: SCATRetMW.h:94
const std::vector< std::string > & scatVariableGroups() const
Definition: SCATRetMW.h:89
SCATRetMWParameters options_
Definition: SCATRetMW.h:95
const ufo::Variables & requiredVariables() const
geovals required to compute the function
Definition: SCATRetMW.cc:112
SCATRetMW(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
Definition: SCATRetMW.cc:28
static constexpr float bad_scatret_value_
Definition: SCATRetMW.h:96
Options applying to the retrieval of scattering index from 23.8 GHz, 31.4 GHz,.
Definition: SCATRetMW.h:30
oops::Parameter< std::string > addBias
Definition: SCATRetMW.h:65
oops::RequiredParameter< std::vector< std::string > > varGroup
Definition: SCATRetMW.h:58
oops::RequiredParameter< int > ch238
Definition: SCATRetMW.h:38
oops::RequiredParameter< int > ch890
Definition: SCATRetMW.h:50
oops::RequiredParameter< int > ch314
Definition: SCATRetMW.h:44
oops::Parameter< std::string > testBias
Definition: SCATRetMW.h:70
Definition: RunCRTM.h:27