UFO
DrawObsErrorFromFile.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2021 Met Office UK
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_OBSFUNCTIONS_DRAWOBSERRORFROMFILE_H_
9 #define UFO_FILTERS_OBSFUNCTIONS_DRAWOBSERRORFROMFILE_H_
10 
11 #include <string>
12 
15 
16 namespace ufo {
17 
18 /// \brief Derive observation error from a file representing the variance or the covariance
19 /// matrix.
20 /// \details See DataExtractor for details on the format of this file.
21 ///
22 /// ### example configurations: ###
23 ///
24 /// \code{.yaml}
25 /// - Filter: Perform Action
26 /// filter variables:
27 /// - name: air_temperature
28 /// channels: &all_channels 1-3
29 /// action:
30 /// name: assign error
31 /// error function:
32 /// name: DrawObsErrorFromFile@ObsFunction
33 /// channels: *all_channels
34 /// options:
35 /// file: <filepath>
36 /// channels: *all_channels
37 /// interpolation:
38 /// - name: satellite_id@MetaData
39 /// method: exact
40 /// - name: processing_center@MetaData
41 /// method: exact
42 /// - name: air_pressure@MetaData
43 /// method: linear
44 /// \endcode
45 ///
46 /// Note that channel number extraction is implicit, using the channels selected and performed as
47 /// an exact match before any user defined interpolation takes place.
48 class DrawObsErrorFromFile : public ObsFunctionBase<float> {
49  public:
50  explicit DrawObsErrorFromFile(const eckit::LocalConfiguration &);
51 
52  void compute(const ObsFilterData &, ioda::ObsDataVector<float> &) const;
53  const ufo::Variables & requiredVariables() const;
54 
55  private:
57 };
58 
59 } // namespace ufo
60 
61 #endif // UFO_FILTERS_OBSFUNCTIONS_DRAWOBSERRORFROMFILE_H_
Derive observation error from a file representing the variance or the covariance matrix.
DrawObsErrorFromFile(const eckit::LocalConfiguration &)
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
DrawValueFromFile< float > drawValueFromFile_
const ufo::Variables & requiredVariables() const
geovals required to compute the function
ObsFilterData provides access to all data related to an ObsFilter.
Definition: RunCRTM.h:27