UFO
ProfileAverageWindSpeed.h
Go to the documentation of this file.
1 /*
2  * (C) 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_PROFILE_PROFILEAVERAGEWINDSPEED_H_
9 #define UFO_PROFILE_PROFILEAVERAGEWINDSPEED_H_
10 
11 #include <algorithm>
12 #include <cmath>
13 #include <vector>
14 
18 
19 namespace ioda {
20  class ObsSpace;
21 }
22 
23 namespace ufo {
24  class ConventionalProfileProcessingParameters;
25 }
26 
27 namespace ufo {
28 
29  /// \brief Profile QC: average wind speed observations onto model levels.
30  ///
31  /// Vectors produced by the AveragePressure routine must be present
32  /// otherwise the exception eckit::BadValue will be thrown.
33  ///
34  /// The eastward and northward wind components are averaged separately
35  /// over model layers defined by adjacent pressure levels, including the surface pressure.
37  public:
39 
40  /// Average wind speed observations onto model levels and store the results.
41  /// \throws eckit::BadValue if vectors produced by the AveragePressure routine
42  /// are not present.
43  void runCheck(ProfileDataHandler &profileDataHandler) override;
44 
45  /// Fill variables in validator (for comparison with OPS output).
46  void fillValidationData(ProfileDataHolder &profileDataHolder);
47 
48  /// Run this check on the entire sample?
49  bool runOnEntireSample() override {return true;}
50 
51  /// List of names of required GeoVaLs.
52  oops::Variables getGeoVaLNames() override {
53  return oops::Variables({ufo::VariableNames::geovals_surface_pressure});}
54 
55  /// List of names of GeoVaLs used in check validation.
56  oops::Variables getValidationGeoVaLNames() override {
61  });}
62 
63  private:
64  /// Run check on a profile in the original ObsSpace and
65  /// put the averaged data into the corresponding profile in the extended ObsSpace.
66  void runCheckOnProfiles(ProfileDataHolder &profileOriginal,
67  ProfileDataHolder &profileExtended);
68  };
69 } // namespace ufo
70 
71 #endif // UFO_PROFILE_PROFILEAVERAGEWINDSPEED_H_
Options controlling the operation of the ConventionalProfileProcessing filter.
Profile QC: average wind speed observations onto model levels.
bool runOnEntireSample() override
Run this check on the entire sample?
void runCheckOnProfiles(ProfileDataHolder &profileOriginal, ProfileDataHolder &profileExtended)
ProfileAverageWindSpeed(const ConventionalProfileProcessingParameters &options)
oops::Variables getValidationGeoVaLNames() override
List of names of GeoVaLs used in check validation.
void runCheck(ProfileDataHandler &profileDataHandler) override
oops::Variables getGeoVaLNames() override
List of names of required GeoVaLs.
void fillValidationData(ProfileDataHolder &profileDataHolder)
Fill variables in validator (for comparison with OPS output).
Profile QC checker base class.
Retrieve and store data for individual profiles. To do this, first the vector of values in the entire...
Profile data holder class.
Forward declarations.
Definition: ObsAodExt.h:25
Definition: RunCRTM.h:27
static constexpr const char *const geovals_surface_pressure
static constexpr const char *const geovals_average_eastward_wind
static constexpr const char *const geovals_average_northward_wind
static constexpr const char *const geovals_average_northward_wind_qcflags
static constexpr const char *const geovals_average_eastward_wind_qcflags