UFO
ObsErrorBoundIR.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_OBSERRORBOUNDIR_H_
9 #define UFO_FILTERS_OBSFUNCTIONS_OBSERRORBOUNDIR_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 /// transmittance at model top and latitude
28 ///
29 class ObsErrorBoundIRParameters : public oops::Parameters {
30  OOPS_CONCRETE_PARAMETERS(ObsErrorBoundIRParameters, Parameters)
31 
32  public:
33  /// List of channels available for assimilation
34  oops::RequiredParameter<std::string> channelList{"channels", this};
35 
36  /// Maximum value of the observation error bound for each channel in channelList
37  oops::RequiredParameter<std::vector<float>> obserrBoundMax{"obserr_bound_max", this};
38 
39  /// Function used to set the observation bound based on Latitude (ObsErrorFactorLatRad)
40  oops::RequiredParameter<Variable> obserrBoundLat{"obserr_bound_latitude", this};
41 
42  /// Function used to set the observation bound based on transmittance at model top
43  /// (ObsErrorFactorTransmitTopRad)
44  oops::RequiredParameter<Variable> obserrBoundTransmittop{"obserr_bound_transmittop", this};
45 
46  /// Name of the data group to which the observation error is applied (default: ObsErrorData)
47  oops::Parameter<std::string> testObserr{"test_obserr", "ObsErrorData", this};
48 
49  /// Name of the data group to which the QC flag is applied (default is QCflagsData)
50  oops::Parameter<std::string> testQCflag{"test_qcflag", "QCflagsData", this};
51 };
52 
53 ///
54 /// \brief Determine the observation error bound (Residual Threshold) for gross check
55 /// as a function of transmittance at model top and latutude.
56 /// Errobs0 = un-inflated observation error
57 /// ErrobsMax = maximum observation error bound
58 /// Errflat = error factor as a function of latitude
59 /// Errtaotop = error factor as a function of transmittance at model top
60 /// Residual Threshold = MIN( (3.0 * ( 1 / Errflat )^2 * (1 / Errftaotop )^2), ErrobsMax )
61 /// Filter out data if |obs-h(x)| > Residual Threshold
62 ///
63 class ObsErrorBoundIR : public ObsFunctionBase<float> {
64  public:
65  explicit ObsErrorBoundIR(const eckit::LocalConfiguration &);
67 
68  void compute(const ObsFilterData &,
70  const ufo::Variables & requiredVariables() const;
71  private:
74  std::vector<int> channels_;
75 };
76 
77 // -----------------------------------------------------------------------------
78 
79 } // namespace ufo
80 
81 #endif // UFO_FILTERS_OBSFUNCTIONS_OBSERRORBOUNDIR_H_
Determine the observation error bound (Residual Threshold) for gross check as a function of transmitt...
ObsErrorBoundIRParameters options_
const ufo::Variables & requiredVariables() const
geovals required to compute the function
ObsErrorBoundIR(const eckit::LocalConfiguration &)
std::vector< int > channels_
ufo::Variables invars_
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 transmittance at mode...
oops::RequiredParameter< Variable > obserrBoundLat
Function used to set the observation bound based on Latitude (ObsErrorFactorLatRad)
oops::RequiredParameter< std::string > channelList
List of channels available for assimilation.
oops::Parameter< std::string > testQCflag
Name of the data group to which the QC flag is applied (default is QCflagsData)
oops::RequiredParameter< Variable > obserrBoundTransmittop
oops::RequiredParameter< std::vector< float > > obserrBoundMax
Maximum value of the observation error bound for each channel in channelList.
oops::Parameter< std::string > testObserr
Name of the data group to which the observation error is applied (default: ObsErrorData)
ObsFilterData provides access to all data related to an ObsFilter.
Definition: RunCRTM.h:27