UFO
SatwindInversionCorrection.h
Go to the documentation of this file.
1 /* -----------------------------------------------------------------------------
2  * (C) British Crown Copyright 2021 Met Office
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_SATWINDINVERSIONCORRECTION_H_
9 #define UFO_FILTERS_SATWINDINVERSIONCORRECTION_H_
10 
11 #include <memory>
12 #include <ostream>
13 #include <string>
14 #include <vector>
15 
16 #include "oops/util/ObjectCounter.h"
17 #include "oops/util/parameters/RequiredParameter.h"
18 
19 #include "ufo/filters/FilterBase.h"
20 #include "ufo/filters/QCflags.h"
21 #include "ufo/filters/Variable.h"
23 
24 namespace eckit {
25  class Configuration;
26 }
27 
28 namespace ioda {
29  template <typename DATATYPE> class ObsDataVector;
30  class ObsSpace;
31 }
32 
33 namespace ufo {
34 
35 // Define cloud motion methods
37  infrared = 1, /// Motion observed in the infrared channel
38  visible = 2, /// Motion observed in the visible channel
39  vapourcloud = 3, /// Motion observed in the water vapour channel in cloud
40  combination = 4, /// Motion observed in a combination of spectral channels
41  vapourclear = 5, /// Motion observed in the water vapour channel in clear air
42  ozone = 6, /// Motion observed in the ozone channel
43  vapour = 7 /// Motion observed in the water vapour channel (cloud or clear)
44 };
45 
46 /// \brief Parameters controlling the operation of the SatwindInversionCorrection filter.
49 
50  public:
51  /// Name of the observation pressure variable to correct
52  oops::RequiredParameter<Variable> obs_pressure{"observation pressure", this};
53  /// Relative humidity (%) threshold value
54  oops::RequiredParameter<float> rh_threshold{"RH threshold", this};
55  /// Minimum AMV pressure (Pa) to consider for correction - set default
56  oops::Parameter<float> min_pressure{"minimum pressure", 70000.0, this};
57  /// Maximum model pressure (Pa) to consider - set default
58  oops::Parameter<float> max_pressure{"maximum pressure", 105000.0, this};
59  /// Temperature difference (K) between inversion base and top - set default
60  oops::Parameter<float> inversion_temperature{"inversion temperature", 2.0, this};
61 };
62 
63 // -----------------------------------------------------------------------------
64 
65 /// \brief A filter that modifies the assigned pressure of AMV observations if a
66 /// temperature inversion is detected in the model profile and defined criteria are met.
67 ///
68 /// See SatwindInversionCorrectionParameters for the documentation of the parameters controlling
69 /// this filter.
71  private util::ObjectCounter<SatwindInversionCorrection> {
72  public:
73  /// The type of parameters accepted by the constructor of this filter.
74  /// This typedef is used by the FilterFactory.
76 
77  static const std::string classname() {return "ufo::SatwindInversionCorrection";}
78 
79  SatwindInversionCorrection(ioda::ObsSpace &, const Parameters_ &,
80  std::shared_ptr<ioda::ObsDataVector<int> >,
81  std::shared_ptr<ioda::ObsDataVector<float> >);
83 
84  private:
85  void print(std::ostream &) const override;
86  void applyFilter(const std::vector<bool> &, const Variables &,
87  std::vector<std::vector<bool>> &) const override;
88  int qcFlag() const override {return QCflags::pass;}
89 
91 };
92 
93 } // namespace ufo
94 
95 #endif // UFO_FILTERS_SATWINDINVERSIONCORRECTION_H_
Base class for UFO QC filters.
Definition: FilterBase.h:45
Parameters shared by all filters having a default action (typically "reject").
A filter that modifies the assigned pressure of AMV observations if a temperature inversion is detect...
void applyFilter(const std::vector< bool > &, const Variables &, std::vector< std::vector< bool >> &) const override
A filter that modifies the assigned pressure of AMV observations if a temperature inversion is detect...
SatwindInversionCorrection(ioda::ObsSpace &, const Parameters_ &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
void print(std::ostream &) const override
SatwindInversionCorrectionParameters Parameters_
Parameters controlling the operation of the SatwindInversionCorrection filter.
oops::Parameter< float > max_pressure
Maximum model pressure (Pa) to consider - set default.
oops::Parameter< float > min_pressure
Minimum AMV pressure (Pa) to consider for correction - set default.
oops::Parameter< float > inversion_temperature
Temperature difference (K) between inversion base and top - set default.
oops::RequiredParameter< Variable > obs_pressure
Name of the observation pressure variable to correct.
oops::RequiredParameter< float > rh_threshold
Relative humidity (%) threshold value.
Forward declarations.
Definition: ObsAodExt.h:21
Forward declarations.
Definition: ObsAodExt.h:25
constexpr int pass
Definition: QCflags.h:14
Definition: RunCRTM.h:27
@ combination
Motion observed in the water vapour channel in cloud.
@ ozone
Motion observed in the water vapour channel in clear air.
@ vapourclear
Motion observed in a combination of spectral channels.
@ vapourcloud
Motion observed in the visible channel.
@ vapour
Motion observed in the ozone channel.
@ visible
Motion observed in the infrared channel.