FV3 Bundle
ObsADT.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 #include <string>
12 #include <vector>
13 
14 namespace ufo {
15 
16 // -----------------------------------------------------------------------------
17 static ObsOperatorMaker<ObsADT> makerADT_("ADT");
18 // -----------------------------------------------------------------------------
19 
20 ObsADT::ObsADT(const ioda::ObsSpace & odb, const eckit::Configuration & config)
21  : keyOperADT_(0), varin_(), odb_(odb)
22 {
23  const eckit::Configuration * configc = &config;
24  ufo_adt_setup_f90(keyOperADT_, &configc);
25  const std::vector<std::string> vv{"sea_surface_height_above_geoid"};
26  varin_.reset(new oops::Variables(vv));
27  oops::Log::trace() << "ObsADT created." << std::endl;
28 }
29 
30 // -----------------------------------------------------------------------------
31 
34  oops::Log::trace() << "ObsADT destructed" << std::endl;
35 }
36 
37 // -----------------------------------------------------------------------------
38 
39 void ObsADT::simulateObs(const GeoVaLs & gom, ioda::ObsVector & ovec, const ObsBias & bias) const {
41  ovec.size(), ovec.toFortran(),
42  bias.toFortran());
43 }
44 
45 // -----------------------------------------------------------------------------
46 
47 void ObsADT::print(std::ostream & os) const {
48  os << "ObsADT::print not implemented";
49 }
50 
51 // -----------------------------------------------------------------------------
52 
53 } // namespace ufo
void ufo_adt_delete_f90(F90hop &)
std::size_t size() const
ObsVector class to handle vectors in observation space for IODA.
void ufo_adt_simobs_f90(const F90hop &, const F90goms &, const ioda::ObsSpace &, const int &, const double &, const F90obias &)
virtual ~ObsADT()
Definition: ObsADT.cc:32
const double & toFortran() const
Wrapper around ObsHelpQG, mostly to hide the factory.
GeoVaLs: geophysical values at locations.
void print(std::ostream &) const
Definition: ObsADT.cc:47
boost::scoped_ptr< const oops::Variables > varin_
Definition: ObsADT.h:56
F90hop keyOperADT_
Definition: ObsADT.h:54
ObsADT(const ioda::ObsSpace &, const eckit::Configuration &)
Definition: ObsADT.cc:20
Class to handle observation bias parameters.
void ufo_adt_setup_f90(F90hop &, const eckit::Configuration *const *)
const ioda::ObsSpace & odb_
Definition: ObsADT.h:55
static ObsOperatorMaker< ObsADT > makerADT_("ADT")
void simulateObs(const GeoVaLs &, ioda::ObsVector &, const ObsBias &) const
Obs Operator.
Definition: ObsADT.cc:39