UFO
ModelHeightAdjustedWindVectorComponent.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 
10 #ifndef UFO_FILTERS_OBSFUNCTIONS_MODELHEIGHTADJUSTEDWINDVECTORCOMPONENT_H_
11 #define UFO_FILTERS_OBSFUNCTIONS_MODELHEIGHTADJUSTEDWINDVECTORCOMPONENT_H_
12 
13 #include <string>
14 
17 #include "ufo/filters/Variables.h"
18 
19 #include "oops/util/parameters/Parameters.h"
20 #include "oops/util/parameters/RequiredParameter.h"
22 
23 namespace ufo {
24 
25 /// \brief Options controlling ModelHeightAdjustedWindVector ObsFunction
26 class ModelHeightAdjustedWindVectorParameters : public oops::Parameters {
27  OOPS_CONCRETE_PARAMETERS(ModelHeightAdjustedWindVectorParameters, Parameters)
28 
29  public:
30  /// Input observation station height to be used
31  oops::RequiredParameter<Variable> elevation{"elevation", this};
32 };
33 
34 /// \brief Function to calculate surface wind observation values adjusted from
35 /// station height to model surface height. Outputs a derived eastward and northward wind adjusted
36 /// to the model surface height. Observed winds from stations above the model
37 /// surface are divided by a scaling factor (S) based only on height difference (dh).
38 /// Scaling factors are:
39 /// - S = 1.0 for dh < 100m
40 /// - S = 1 + 0.002*(dh - 100) for 100 < dh < 1100
41 /// - S = 3 for dh > 1100
42 
43 template <bool northwardWind> // true for the northward wind, false for the eastward wind
45  public:
46  explicit ModelHeightAdjustedWindVectorComponent(const eckit::LocalConfiguration &
47  = eckit::LocalConfiguration());
48 
49  void compute(const ObsFilterData &,
51  const ufo::Variables & requiredVariables() const;
52 
53  private:
56 };
57 } // namespace ufo
58 
59 #endif // UFO_FILTERS_OBSFUNCTIONS_MODELHEIGHTADJUSTEDWINDVECTORCOMPONENT_H_
Function to calculate surface wind observation values adjusted from station height to model surface h...
ModelHeightAdjustedWindVectorComponent(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
const ufo::Variables & requiredVariables() const
geovals required to compute the function
Options controlling ModelHeightAdjustedWindVector ObsFunction.
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