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 ObsBias)
68  /// Example: use observation bias correction values from GSI
69  /// test_bias: GsiObsBias
70  oops::Parameter<std::string> testBias{"test_bias", "ObsBias", 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 {
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_
ObsFunctionBase.h
ufo::Variables
Definition: src/ufo/filters/Variables.h:24
ufo::SCATRetMW::bad_scatret_value_
static constexpr float bad_scatret_value_
Definition: SCATRetMW.h:96
ufo::SCATRetMWParameters::ch238
oops::RequiredParameter< int > ch238
Definition: SCATRetMW.h:38
ufo::ObsFunctionBase
Base class for computing functions on observation data.
Definition: ObsFunctionBase.h:26
ufo::SCATRetMW::getBadValue
static float getBadValue()
Definition: SCATRetMW.h:92
ufo
Definition: RunCRTM.h:27
Variables.h
ufo::SCATRetMWParameters::ch890
oops::RequiredParameter< int > ch890
Definition: SCATRetMW.h:50
ufo::SCATRetMW::requiredVariables
const ufo::Variables & requiredVariables() const
geovals required to compute the function
Definition: SCATRetMW.cc:114
ufo::SCATRetMW::SCATRetMW
SCATRetMW(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
Definition: SCATRetMW.cc:27
ioda::ObsDataVector
Definition: BackgroundCheck.h:26
ufo::SCATRetMWParameters::testBias
oops::Parameter< std::string > testBias
Definition: SCATRetMW.h:70
ufo::SCATRetMW
Retrieve scattering index from 23.8 GHz, 31.4 GHz and 89 GHz channels.
Definition: SCATRetMW.h:80
ufo::SCATRetMWParameters::ch314
oops::RequiredParameter< int > ch314
Definition: SCATRetMW.h:44
ObsFilterData.h
ufo::SCATRetMW::scatVariableGroups
const std::vector< std::string > & scatVariableGroups() const
Definition: SCATRetMW.h:89
ufo::SCATRetMW::~SCATRetMW
~SCATRetMW()
Definition: SCATRetMW.cc:54
ufo::SCATRetMW::invars_
ufo::Variables invars_
Definition: SCATRetMW.h:94
ufo::SCATRetMWParameters::varGroup
oops::RequiredParameter< std::vector< std::string > > varGroup
Definition: SCATRetMW.h:58
ufo::SCATRetMWParameters::addBias
oops::Parameter< std::string > addBias
Definition: SCATRetMW.h:65
ufo::SCATRetMW::options_
SCATRetMWParameters options_
Definition: SCATRetMW.h:95
ufo::SCATRetMWParameters
Options applying to the retrieval of scattering index from 23.8 GHz, 31.4 GHz,.
Definition: SCATRetMW.h:30
ufo::ObsFilterData
ObsFilterData provides access to all data related to an ObsFilter.
Definition: src/ufo/filters/ObsFilterData.h:40
Variable.h
ufo::SCATRetMW::compute
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
Definition: SCATRetMW.cc:58
ParameterTraitsVariable.h