UFO
Example.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2018 UCAR
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 
9 
10 #include "eckit/config/Configuration.h"
11 
12 #include "ioda/ObsDataVector.h"
13 #include "ioda/ObsSpace.h"
14 #include "ioda/ObsVector.h"
15 #include "oops/base/Variables.h"
16 #include "oops/util/Logger.h"
17 #include "ufo/GeoVaLs.h"
18 #include "ufo/ObsDiagnostics.h"
19 
20 namespace ufo {
21 
22 // -----------------------------------------------------------------------------
23 
24 Example::Example(ioda::ObsSpace & obsdb, const eckit::Configuration & config,
25  std::shared_ptr<ioda::ObsDataVector<int> > flags,
26  std::shared_ptr<ioda::ObsDataVector<float> >)
27  : obsdb_(obsdb), geovars_(), flags_(*flags) {
28  oops::Log::trace() << "Example contructor starting" << std::endl;
29  const eckit::Configuration * conf = &config;
31  oops::Log::debug() << "Example contructor key = " << key_ << std::endl;
32 }
33 
34 // -----------------------------------------------------------------------------
35 
37  oops::Log::trace() << "Example destructor key = " << key_ << std::endl;
39 }
40 
41 // -----------------------------------------------------------------------------
42 
43 void Example::priorFilter(const GeoVaLs & gv) {
44  oops::Log::trace() << "Example priorFilter" << std::endl;
46 }
47 
48 // -----------------------------------------------------------------------------
49 
50 void Example::postFilter(const ioda::ObsVector & hofxb, const ioda::ObsVector & bias,
51  const ObsDiagnostics & diags) {
52  oops::Log::trace() << "Example postFilter" << std::endl;
53  ufo_example_post_f90(key_, obsdb_, hofxb.nvars(), hofxb.nlocs(), hofxb.toFortran(),
54  bias.toFortran(), diags.toFortran());
55 }
56 
57 // -----------------------------------------------------------------------------
58 
59 void Example::print(std::ostream & os) const {
60  os << "Example::print not yet implemented " << key_;
61 }
62 } // namespace ufo
oops::Variables geovars_
Definition: Example.h:60
void print(std::ostream &) const override
Definition: Example.cc:59
void postFilter(const ioda::ObsVector &, const ioda::ObsVector &, const ObsDiagnostics &) override
Definition: Example.cc:50
F90check key_
Definition: Example.h:57
Example(ioda::ObsSpace &, const eckit::Configuration &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
Definition: Example.cc:24
void priorFilter(const GeoVaLs &) override
Definition: Example.cc:43
ioda::ObsSpace & obsdb_
Definition: Example.h:59
GeoVaLs: geophysical values at locations.
Definition: RunCRTM.h:27
void ufo_example_prior_f90(const F90check &, const ioda::ObsSpace &, const F90goms &)
void ufo_example_post_f90(const F90check &, const ioda::ObsSpace &, const int &, const int &, const double &, const double &, const F90goms &)
void ufo_example_delete_f90(F90hop &)
void ufo_example_create_f90(F90check &, const eckit::Configuration *, oops::Variables &)
Interface to Fortran routines.