UFO
ObsAvgKernel.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2020 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 ObsAvgKernel::ObsAvgKernel(const ioda::ObsSpace & odb,
26  const eckit::Configuration & config)
27  : ObsOperatorBase(odb, config), keyOper_(0), odb_(odb), varin_()
28 {
29  ufo_avgkernel_setup_f90(keyOper_, config, odb.obsvariables(), varin_);
30  oops::Log::trace() << "ObsAvgKernel created." << std::endl;
31 }
32 
33 // -----------------------------------------------------------------------------
34 
37  oops::Log::trace() << "ObsAvgKernel destructed" << std::endl;
38 }
39 
40 // -----------------------------------------------------------------------------
41 
42 void ObsAvgKernel::simulateObs(const GeoVaLs & gv, ioda::ObsVector & ovec,
43  ObsDiagnostics &) const {
44  ufo_avgkernel_simobs_f90(keyOper_, gv.toFortran(), odb_, ovec.nvars(), ovec.nlocs(),
45  ovec.toFortran());
46  oops::Log::trace() << "ObsAvgKernel: observation operator run" << std::endl;
47 }
48 
49 // -----------------------------------------------------------------------------
50 
51 void ObsAvgKernel::print(std::ostream & os) const {
52  os << "ObsAvgKernel::print not implemented";
53 }
54 
55 // -----------------------------------------------------------------------------
56 
57 } // namespace ufo
GeoVaLs: geophysical values at locations.
void print(std::ostream &) const override
Definition: ObsAvgKernel.cc:51
void simulateObs(const GeoVaLs &, ioda::ObsVector &, ObsDiagnostics &) const override
Obs Operator.
Definition: ObsAvgKernel.cc:42
virtual ~ObsAvgKernel()
Definition: ObsAvgKernel.cc:35
oops::Variables varin_
Definition: ObsAvgKernel.h:57
ObsAvgKernel(const ioda::ObsSpace &, const eckit::Configuration &)
Definition: ObsAvgKernel.cc:25
const ioda::ObsSpace & odb_
Definition: ObsAvgKernel.h:56
Definition: RunCRTM.h:27
void ufo_avgkernel_delete_f90(F90hop &)
static ObsOperatorMaker< ObsAvgKernel > makerAvgKernel_("AvgKernel")
void ufo_avgkernel_setup_f90(F90hop &, const eckit::Configuration &, const oops::Variables &, oops::Variables &)
Interface to Fortran UFO avgkernel routines.
void ufo_avgkernel_simobs_f90(const F90hop &, const F90goms &, const ioda::ObsSpace &, const int &, const int &, double &)