FV3 Bundle
ObsAod.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 #include "ioda/ObsVector.h"
15 
16 #include "oops/base/Variables.h"
17 
18 #include "ufo/GeoVaLs.h"
19 #include "ufo/ObsBias.h"
20 
21 namespace ufo {
22 
23 // -----------------------------------------------------------------------------
24 static ObsOperatorMaker<ObsAod> makerAOD_("Aod");
25 // -----------------------------------------------------------------------------
26 
27 ObsAod::ObsAod(const ioda::ObsSpace & odb, const eckit::Configuration & config)
28  : keyOperAod_(0), varin_(), odb_(odb)
29 {
30  const eckit::Configuration * configc = &config;
31  ufo_aod_setup_f90(keyOperAod_, &configc);
32  const std::vector<std::string> vv{"temperature", "humidity_mixing_ratio",
33  "air_pressure", "air_pressure_levels",
34  "sulf", "bc1", "bc2", "oc1", "oc2", "dust1", "dust2", "dust3", "dust4", "dust5",
35  "seas1", "seas2", "seas3", "seas4", "p25"};
36  varin_.reset(new oops::Variables(vv));
37  oops::Log::trace() << "ObsAod created." << std::endl;
38 }
39 
40 // -----------------------------------------------------------------------------
41 
44  oops::Log::trace() << "ObsAod destructed" << std::endl;
45 }
46 
47 // -----------------------------------------------------------------------------
48 
49 void ObsAod::simulateObs(const GeoVaLs & gom, ioda::ObsVector & ovec,
50  const ObsBias & bias) const {
52  ovec.size(), ovec.toFortran(), bias.toFortran());
53 }
54 
55 // -----------------------------------------------------------------------------
56 
57 void ObsAod::print(std::ostream & os) const {
58  os << "ObsAod::print not implemented";
59 }
60 
61 // -----------------------------------------------------------------------------
62 
63 } // namespace ufo
std::size_t size() const
ObsVector class to handle vectors in observation space for IODA.
void print(std::ostream &) const
Definition: ObsAod.cc:57
const double & toFortran() const
virtual ~ObsAod()
Definition: ObsAod.cc:42
static ObsOperatorMaker< ObsAod > makerAOD_("Aod")
void ufo_aod_simobs_f90(const F90hop &, const F90goms &, const ioda::ObsSpace &, const int &, double &, const F90obias &)
F90hop keyOperAod_
Definition: ObsAod.h:56
Wrapper around ObsHelpQG, mostly to hide the factory.
ObsAod(const ioda::ObsSpace &, const eckit::Configuration &)
Definition: ObsAod.cc:27
GeoVaLs: geophysical values at locations.
const ioda::ObsSpace & odb_
Definition: ObsAod.h:57
void ufo_aod_delete_f90(F90hop &)
Class to handle observation bias parameters.
void simulateObs(const GeoVaLs &, ioda::ObsVector &, const ObsBias &) const
Obs Operator.
Definition: ObsAod.cc:49
void ufo_aod_setup_f90(F90hop &, const eckit::Configuration *const *)
Interface to Fortran UFO routines.
boost::scoped_ptr< const oops::Variables > varin_
Definition: ObsAod.h:58