UFO
CLWRetMW.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_CLWRETMW_H_
9 #define UFO_FILTERS_OBSFUNCTIONS_CLWRETMW_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 cloud liquid water from 23.8 GHz and
26 // 31.4 GHz channels.
27 ///
28 class CLWRetMWParameters : public oops::Parameters {
29  OOPS_CONCRETE_PARAMETERS(CLWRetMWParameters, Parameters)
30 
31  public:
32  /// channel number corresponding to 23.8 GHz to which the retrieval
33  /// of cloud liquid water applies
34  /// Example: AMSU-A channel numbers used in cloud liquid water retrieval
35  /// clwret_channels: 1
36  oops::RequiredParameter<int> ch238{"clwret_ch238", this};
37 
38  /// channel number corresponding to 31.4 GHz to which the retrieval
39  /// of cloud liquid water applies
40  /// Example: AMSU-A channel numbers used in cloud liquid water retrieval
41  /// clwret_channels: 2
42  oops::RequiredParameter<int> ch314{"clwret_ch314", this};
43 
44  /// Names of the data group used to retrieve the cloud liquid water
45  /// Example: get retrieved CLW from observation and simulated observation respectively
46  /// clwret_types: [ObsValue, HofX]
47  /// Example: get retrieved CLW from observation or simulated observation only
48  /// clwret_types: [ObsValue]
49  /// clwret_types: [HofX]
50  oops::RequiredParameter<std::vector<std::string>> varGroup{"clwret_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 ObsBias)
60  /// Example: use observation bias correction values from GSI
61  /// test_bias: GsiObsBias
62  oops::Parameter<std::string> testBias{"test_bias", "ObsBias", this};
63 };
64 
65 ///
66 /// \brief Retrieve cloud liquid water from 23.8 GHz and 31.4 GHz channels.
67 ///
68 /// Reference: Grody et al. (2001)
69 /// Determination of precipitable water and cloud liquid water over oceans from
70 /// the NOAA 15 advanced microwave sounding unit
71 /// Journal of Geophysical Research (Vol. 106, No. D3, Pages 2943-2953)
72 ///
73 class CLWRetMW : public ObsFunctionBase {
74  public:
75  explicit CLWRetMW(const eckit::LocalConfiguration &
76  = eckit::LocalConfiguration());
77  ~CLWRetMW();
78 
79  void compute(const ObsFilterData &,
81  const ufo::Variables & requiredVariables() const;
82  const std::vector<std::string> &clwVariableGroups() const {
83  return options_.varGroup.value();
84  }
85  static void cloudLiquidWater(const std::vector<float> &,
86  const std::vector<float> &,
87  const std::vector<float> &,
88  const std::vector<float> &,
89  const std::vector<float> &,
90  std::vector<float> &,
91  const std::size_t);
92  inline static float getBadValue() {return bad_clwret_value_;}
93  private:
96  static constexpr float bad_clwret_value_ = 1000.f;
97 };
98 
99 // -----------------------------------------------------------------------------
100 
101 } // namespace ufo
102 
103 #endif // UFO_FILTERS_OBSFUNCTIONS_CLWRETMW_H_
ObsFunctionBase.h
ufo::CLWRetMW::bad_clwret_value_
static constexpr float bad_clwret_value_
Definition: CLWRetMW.h:96
ufo::CLWRetMW::~CLWRetMW
~CLWRetMW()
Definition: CLWRetMW.cc:55
ufo::CLWRetMWParameters::ch238
oops::RequiredParameter< int > ch238
Definition: CLWRetMW.h:36
ufo::CLWRetMWParameters::addBias
oops::Parameter< std::string > addBias
Definition: CLWRetMW.h:57
ufo::CLWRetMW::cloudLiquidWater
static void cloudLiquidWater(const std::vector< float > &, const std::vector< float > &, const std::vector< float > &, const std::vector< float > &, const std::vector< float > &, std::vector< float > &, const std::size_t)
Definition: CLWRetMW.cc:122
ufo::Variables
Definition: src/ufo/filters/Variables.h:24
ufo::CLWRetMW::CLWRetMW
CLWRetMW(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
Definition: CLWRetMW.cc:27
ufo::CLWRetMW::compute
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
Definition: CLWRetMW.cc:59
ufo::CLWRetMW::invars_
ufo::Variables invars_
Definition: CLWRetMW.h:94
ufo::ObsFunctionBase
Base class for computing functions on observation data.
Definition: ObsFunctionBase.h:26
ufo::CLWRetMWParameters
Options applying to the retrieval of cloud liquid water from 23.8 GHz and.
Definition: CLWRetMW.h:28
ufo::CLWRetMWParameters::varGroup
oops::RequiredParameter< std::vector< std::string > > varGroup
Definition: CLWRetMW.h:50
ufo::CLWRetMW::options_
CLWRetMWParameters options_
Definition: CLWRetMW.h:95
ufo
Definition: RunCRTM.h:27
Variables.h
ufo::CLWRetMW
Retrieve cloud liquid water from 23.8 GHz and 31.4 GHz channels.
Definition: CLWRetMW.h:73
ufo::CLWRetMW::getBadValue
static float getBadValue()
Definition: CLWRetMW.h:92
ufo::CLWRetMW::clwVariableGroups
const std::vector< std::string > & clwVariableGroups() const
Definition: CLWRetMW.h:82
ioda::ObsDataVector
Definition: BackgroundCheck.h:26
ufo::CLWRetMWParameters::ch314
oops::RequiredParameter< int > ch314
Definition: CLWRetMW.h:42
ObsFilterData.h
ufo::CLWRetMWParameters::testBias
oops::Parameter< std::string > testBias
Definition: CLWRetMW.h:62
ufo::CLWRetMW::requiredVariables
const ufo::Variables & requiredVariables() const
geovals required to compute the function
Definition: CLWRetMW.cc:157
ufo::ObsFilterData
ObsFilterData provides access to all data related to an ObsFilter.
Definition: src/ufo/filters/ObsFilterData.h:40