UFO
ProfileAveragePressure.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_PROFILEAVERAGEPRESSURE_H_
9 #define UFO_PROFILE_PROFILEAVERAGEPRESSURE_H_
10 
11 #include <algorithm>
12 #include <cmath>
13 #include <vector>
14 
16 
17 namespace ioda {
18  class ObsSpace;
19 }
20 
21 namespace ufo {
22  class ConventionalProfileProcessingParameters;
23  class ProfileDataHandler;
24  class ProfileDataHolder;
25 }
26 
27 namespace ufo {
28 
29  /// \brief Profile QC: apply various transformations to observed and model pressures.
30  /// The transformed pressures are used in subsequent profile averaging routines.
32  public:
34 
35  /// Run check on all profiles.
36  void runCheck(ProfileDataHandler &profileDataHandler) override;
37 
38  /// Fill variables in validator.
39  void fillValidationData(ProfileDataHolder &profileDataHolder);
40 
41  /// Run this check on the entire sample?
42  bool runOnEntireSample() override {return true;}
43 
44  /// List of names of required GeoVaLs.
45  oops::Variables getGeoVaLNames() override {
46  return oops::Variables({ufo::VariableNames::geovals_pressure,
48 
49  /// List of names of GeoVaLs used in check validation.
50  oops::Variables getValidationGeoVaLNames() override {
51  return oops::Variables({ufo::VariableNames::geovals_logP,
55 
56  private: // functions
57  /// Calculate log(pressure).
58  void logPressure(const std::vector <float> &pressures,
59  std::vector <float> &logP);
60 
61  /// Calculate Exner pressure.
62  void ExnerPressure(const std::vector <float> &pressures,
63  std::vector <float> &ExnerP);
64 
65  /// Calculate big gap for each pressure.
66  void bigPressureGaps(const std::vector <float> &pressures,
67  const int ObsType,
68  std::vector <float> &bigPgaps);
69 
70  /// Run check on a profile in the original ObsSpace and
71  /// put the averaged data into the corresponding profile in the extended ObsSpace.
72  void runCheckOnProfiles(ProfileDataHolder &profileOriginal,
73  ProfileDataHolder &profileExtended);
74  };
75 } // namespace ufo
76 
77 #endif // UFO_PROFILE_PROFILEAVERAGEPRESSURE_H_
Options controlling the operation of the ConventionalProfileProcessing filter.
Profile QC: apply various transformations to observed and model pressures. The transformed pressures ...
void ExnerPressure(const std::vector< float > &pressures, std::vector< float > &ExnerP)
Calculate Exner pressure.
void bigPressureGaps(const std::vector< float > &pressures, const int ObsType, std::vector< float > &bigPgaps)
Calculate big gap for each pressure.
void runCheckOnProfiles(ProfileDataHolder &profileOriginal, ProfileDataHolder &profileExtended)
bool runOnEntireSample() override
Run this check on the entire sample?
ProfileAveragePressure(const ConventionalProfileProcessingParameters &options)
oops::Variables getGeoVaLNames() override
List of names of required GeoVaLs.
void logPressure(const std::vector< float > &pressures, std::vector< float > &logP)
Calculate log(pressure).
void fillValidationData(ProfileDataHolder &profileDataHolder)
Fill variables in validator.
void runCheck(ProfileDataHandler &profileDataHandler) override
Run check on all profiles.
oops::Variables getValidationGeoVaLNames() override
List of names of GeoVaLs used in check validation.
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_ExnerP
static constexpr const char *const geovals_pressure
static constexpr const char *const geovals_logP
static constexpr const char *const geovals_pressure_rho
static constexpr const char *const geovals_ExnerP_rho
static constexpr const char *const geovals_logP_rho