UFO
ModelHeightAdjustedRelativeHumidity.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 
9 #ifndef UFO_FILTERS_OBSFUNCTIONS_MODELHEIGHTADJUSTEDRELATIVEHUMIDITY_H_
10 #define UFO_FILTERS_OBSFUNCTIONS_MODELHEIGHTADJUSTEDRELATIVEHUMIDITY_H_
11 
12 #include <string>
13 
16 #include "ufo/filters/Variables.h"
17 
18 #include "oops/util/parameters/Parameters.h"
19 #include "oops/util/parameters/RequiredParameter.h"
21 
22 namespace ufo {
23 
24 /// \brief Options controlling ModelHeightAdjustedRelativeHumidity ObsFunction
25 class ModelHeightAdjustedRelativeHumidityParameters : public oops::Parameters {
26  OOPS_CONCRETE_PARAMETERS(ModelHeightAdjustedRelativeHumidityParameters, Parameters)
27 
28  public:
29  /// Input observation station height to be used
30  oops::RequiredParameter<Variable> elevation{"elevation", this};
31  /// Temperature to be used
32  oops::RequiredParameter<Variable> temperature{"temperature", this};
33 };
34 
35 /// \brief Function to calculate surface relative humidity observation value adjusted from
36 /// station height to model surface height. Outputs a derived 2m relative humidity adjusted
37 /// to the model surface height. Observed relative humidity is adjusted from station level
38 /// to model surface using an empirical vertical gradient LRH = -0.01 %/m. The adjusted
39 /// humidity value is then constrained to lie between zero and supersaturation with respect
40 /// to liquid water.
41 
43  public:
44  explicit ModelHeightAdjustedRelativeHumidity(const eckit::LocalConfiguration &
45  = eckit::LocalConfiguration());
46 
47  void compute(const ObsFilterData &,
49  const ufo::Variables & requiredVariables() const;
50 
51  private:
54 };
55 } // namespace ufo
56 
57 #endif // UFO_FILTERS_OBSFUNCTIONS_MODELHEIGHTADJUSTEDRELATIVEHUMIDITY_H_
Function to calculate surface relative humidity observation value adjusted from station height to mod...
ModelHeightAdjustedRelativeHumidityParameters parameters_
const ufo::Variables & requiredVariables() const
geovals required to compute the function
ModelHeightAdjustedRelativeHumidity(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
Options controlling ModelHeightAdjustedRelativeHumidity ObsFunction.
oops::RequiredParameter< Variable > temperature
Temperature to be used.
oops::RequiredParameter< Variable > elevation
Input observation station height to be used.
ObsFilterData provides access to all data related to an ObsFilter.
Definition: RunCRTM.h:27