UFO
ObsExample.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 <ostream>
11 
12 #include "ioda/ObsVector.h"
13 
14 #include "oops/base/Variables.h"
15 
16 #include "ufo/GeoVaLs.h"
17 #include "ufo/ObsDiagnostics.h"
18 
19 namespace ufo {
20 
21 // -----------------------------------------------------------------------------
23 // -----------------------------------------------------------------------------
24 
25 ObsExample::ObsExample(const ioda::ObsSpace & odb,
26  const eckit::Configuration & config)
27  : ObsOperatorBase(odb, config), keyOper_(0), odb_(odb), varin_()
28 {
29  ufo_example_setup_f90(keyOper_, config, odb.obsvariables(), varin_);
30  oops::Log::trace() << "ObsExample created." << std::endl;
31 }
32 
33 // -----------------------------------------------------------------------------
34 
37  oops::Log::trace() << "ObsExample destructed" << std::endl;
38 }
39 
40 // -----------------------------------------------------------------------------
41 
42 void ObsExample::simulateObs(const GeoVaLs & gv, ioda::ObsVector & ovec,
43  ObsDiagnostics &) const {
44  ufo_example_simobs_f90(keyOper_, gv.toFortran(), odb_, ovec.nvars(), ovec.nlocs(),
45  ovec.toFortran());
46  oops::Log::trace() << "ObsExample: observation operator run" << std::endl;
47 }
48 
49 // -----------------------------------------------------------------------------
50 
51 void ObsExample::print(std::ostream & os) const {
52  os << "ObsExample::print not implemented";
53 }
54 
55 // -----------------------------------------------------------------------------
56 
57 } // namespace ufo
GeoVaLs: geophysical values at locations.
ObsExample(const ioda::ObsSpace &, const eckit::Configuration &)
Definition: ObsExample.cc:25
oops::Variables varin_
Definition: ObsExample.h:57
const ioda::ObsSpace & odb_
Definition: ObsExample.h:56
void print(std::ostream &) const override
Definition: ObsExample.cc:51
F90hop keyOper_
Definition: ObsExample.h:55
virtual ~ObsExample()
Definition: ObsExample.cc:35
void simulateObs(const GeoVaLs &, ioda::ObsVector &, ObsDiagnostics &) const override
Obs Operator.
Definition: ObsExample.cc:42
Definition: RunCRTM.h:27
void ufo_example_simobs_f90(const F90hop &, const F90goms &, const ioda::ObsSpace &, const int &, const int &, double &)
void ufo_example_delete_f90(F90hop &)
void ufo_example_setup_f90(F90hop &, const eckit::Configuration &, const oops::Variables &, oops::Variables &)
Interface to Fortran UFO example routines.
static ObsOperatorMaker< ObsExample > makerExample_("Example")