UFO
BgdDepartureAnomaly.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2021 Met Office UK
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_BGDDEPARTUREANOMALY_H_
9 #define UFO_FILTERS_OBSFUNCTIONS_BGDDEPARTUREANOMALY_H_
10 
11 #include <string>
12 #include <vector>
13 
14 #include "oops/util/parameters/NumericConstraints.h"
15 #include "oops/util/parameters/Parameter.h"
16 #include "oops/util/parameters/Parameters.h"
17 #include "oops/util/parameters/RequiredParameter.h"
18 
21 #include "ufo/filters/Variable.h"
22 #include "ufo/filters/Variables.h"
24 
25 namespace ufo {
26 
27 ///
28 /// \brief Options for calculating the background departure anomaly between two channels.
29 ///
30 class BgdDepartureAnomalyParameters : public oops::Parameters {
31  OOPS_CONCRETE_PARAMETERS(BgdDepartureAnomalyParameters, Parameters)
32 
33  public:
34  /// \brief Lower frequency channel number
35  ///
36  /// Example: AMSR2 channel 11 corresponding to 36.5 GHz H-pol
37  ///
38  /// channel_low_freq: 11
39  oops::RequiredParameter<int> obslow{"channel_low_freq", this, {oops::minConstraint(1)}};
40 
41  /// \brief Higher frequency channel number
42  ///
43  /// Example: AMSR2 channel 13 corresponding to 89 GHz H-pol
44  ///
45  /// channel_high_freq: 13
46  oops::RequiredParameter<int> obshigh{"channel_high_freq", this, {oops::minConstraint(1)}};
47 
48  /// \brief Name of the bias correction group used to apply correction to ObsValue.
49  ///
50  /// Default (missing optional parameter) applies no bias
51  ///
52  /// Example: use ObsBias correction values
53  ///
54  /// ObsBias: ObsBias
55  oops::Parameter<std::string> ObsBias{"ObsBias", "", this};
56 
57  /// Name of the HofX group used to replace the default group (default is HofX)
58  oops::Parameter<std::string> testHofX{"test_hofx", "HofX", this};
59 };
60 
61 ///
62 /// \brief
63 /// Hydrometeors scatter radiation more efficiently with increasing microwave frequency.
64 /// For example, at 89 GHz the scattering due to clouds is sufficient to decrease the top
65 /// of atmosphere brightness temperature relative to clear skies. At 36 GHz the scattering
66 /// is reduced, and clouds appear warm relative to surface emissions.
67 ///
68 /// The anomaly (O-B minus the mean O-B) difference between these two frequencies
69 /// is used to diagnose cloudy scenes.
70 ///
71 
72 class BgdDepartureAnomaly : public ObsFunctionBase<float> {
73  public:
74  explicit BgdDepartureAnomaly(const eckit::LocalConfiguration & = eckit::LocalConfiguration());
75  void compute(const ObsFilterData &, ioda::ObsDataVector<float> &) const;
76  const ufo::Variables & requiredVariables() const;
77  private:
80  std::vector<int> channels_ = {0, 0};
81 };
82 
83 // -----------------------------------------------------------------------------
84 
85 } // namespace ufo
86 
87 #endif // UFO_FILTERS_OBSFUNCTIONS_BGDDEPARTUREANOMALY_H_
Hydrometeors scatter radiation more efficiently with increasing microwave frequency....
BgdDepartureAnomalyParameters options_
std::vector< int > channels_
BgdDepartureAnomaly(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
const ufo::Variables & requiredVariables() const
geovals required to compute the function
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
Options for calculating the background departure anomaly between two channels.
oops::RequiredParameter< int > obslow
Lower frequency channel number.
oops::Parameter< std::string > testHofX
Name of the HofX group used to replace the default group (default is HofX)
oops::RequiredParameter< int > obshigh
Higher frequency channel number.
ObsFilterData provides access to all data related to an ObsFilter.
Definition: RunCRTM.h:27