UFO
ObsErrorBoundMW.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_OBSERRORBOUNDMW_H_
9 #define UFO_FILTERS_OBSFUNCTIONS_OBSERRORBOUNDMW_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"
22 
23 namespace ufo {
24 
25 ///
26 /// \brief Options applying to the determination of observation error bounds as a function
27 /// latitude, terrain height, and transmittance at the model top
28 ///
29 class ObsErrorBoundMWParameters : public oops::Parameters {
30  OOPS_CONCRETE_PARAMETERS(ObsErrorBoundMWParameters, Parameters)
31 
32  public:
33  /// List of channels available for assimilation
34  oops::RequiredParameter<std::string> channelList{"channels", this};
35 
36  /// Name of the sensor for which the observation error factor applies
37  oops::RequiredParameter<std::string> sensor{"sensor", this};
38 
39  /// The maximum value of the observation error bound for each channel in channelList
40  oops::RequiredParameter<std::vector<float>> obserrBoundMax{"obserr_bound_max", this};
41 
42  /// Function to set the observation bound based on latitude
43  oops::RequiredParameter<Variable> obserrBoundLat{"obserr_bound_latitude", this};
44 
45  /// Function to set the observation bound based on transmittance at model top
46  oops::RequiredParameter<Variable> obserrBoundTransmittop{"obserr_bound_transmittop", this};
47 
48  /// Function to set the observation bound based on terrain height
49  oops::RequiredParameter<Variable> obserrBoundTopo{"obserr_bound_topo", this};
50 
51  /// Function to estimate observation error based on symmetric cloud amount
52  oops::RequiredParameter<Variable> obserrFunction{"obserr_function", this};
53 
54  /// Name of the data group to which the observation error is applied (default: ObsErrorData)
55  oops::Parameter<std::string> testObserr{"test_obserr", "ObsErrorData", this};
56 
57  /// Name of the data group to which the QC flag is applied (default is QCflagsData)
58  oops::Parameter<std::string> testQCflag{"test_qcflag", "QCflagsData", this};
59 };
60 
61 ///
62 /// \brief Determine the observation error bound (Residual Threshold) for gross check
63 /// as a function of transmittance at model top and latutude.
64 /// Errobs0 = un-inflated observation error
65 /// ErrobsMax = maximum observation error bound
66 /// Errflat = error factor as a function of latitude
67 /// Errtaotop = error factor as a function of transmittance at model top
68 /// Residual Threshold = MIN( (3.0 * ( 1 / Errflat )^2 * (1 / Errftaotop )^2), ErrobsMax )
69 /// Filter out data if |obs-h(x)| > Residual Threshold
70 ///
71 class ObsErrorBoundMW : public ObsFunctionBase<float> {
72  public:
73  explicit ObsErrorBoundMW(const eckit::LocalConfiguration &);
75 
76  void compute(const ObsFilterData &,
78  const ufo::Variables & requiredVariables() const;
79  private:
82  std::vector<int> channels_;
83 };
84 
85 // -----------------------------------------------------------------------------
86 
87 } // namespace ufo
88 
89 #endif // UFO_FILTERS_OBSFUNCTIONS_OBSERRORBOUNDMW_H_
Determine the observation error bound (Residual Threshold) for gross check as a function of transmitt...
ObsErrorBoundMWParameters options_
std::vector< int > channels_
const ufo::Variables & requiredVariables() const
geovals required to compute the function
ufo::Variables invars_
ObsErrorBoundMW(const eckit::LocalConfiguration &)
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
Options applying to the determination of observation error bounds as a function latitude,...
oops::RequiredParameter< Variable > obserrBoundTopo
Function to set the observation bound based on terrain height.
oops::RequiredParameter< std::string > channelList
List of channels available for assimilation.
oops::RequiredParameter< Variable > obserrBoundLat
Function to set the observation bound based on latitude.
oops::RequiredParameter< Variable > obserrBoundTransmittop
Function to set the observation bound based on transmittance at model top.
oops::RequiredParameter< std::string > sensor
Name of the sensor for which the observation error factor applies.
oops::Parameter< std::string > testObserr
Name of the data group to which the observation error is applied (default: ObsErrorData)
oops::RequiredParameter< Variable > obserrFunction
Function to estimate observation error based on symmetric cloud amount.
oops::Parameter< std::string > testQCflag
Name of the data group to which the QC flag is applied (default is QCflagsData)
oops::RequiredParameter< std::vector< float > > obserrBoundMax
The maximum value of the observation error bound for each channel in channelList.
ObsFilterData provides access to all data related to an ObsFilter.
Definition: RunCRTM.h:27