UFO
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 #include "ioda/ObsVector.h"
15 
16 #include "oops/base/Variables.h"
17 
18 #include "ufo/GeoVaLs.h"
19 #include "ufo/ObsDiagnostics.h"
20 
21 namespace ufo {
22 
23 // -----------------------------------------------------------------------------
25 // -----------------------------------------------------------------------------
26 
27 ObsADT::ObsADT(const ioda::ObsSpace & odb, const eckit::Configuration & config)
28  : ObsOperatorBase(odb, config), keyOper_(0), odb_(odb), varin_()
29 {
30  const std::vector<std::string> vvin{"sea_surface_height_above_geoid"};
31  varin_.reset(new oops::Variables(vvin));
32  ufo_adt_setup_f90(keyOper_, config);
33  oops::Log::trace() << "ObsADT created." << std::endl;
34 }
35 
36 // -----------------------------------------------------------------------------
37 
40  oops::Log::trace() << "ObsADT destructed" << std::endl;
41 }
42 
43 // -----------------------------------------------------------------------------
44 
45 void ObsADT::simulateObs(const GeoVaLs & gv, ioda::ObsVector & ovec,
46  ObsDiagnostics &) const {
47  ufo_adt_simobs_f90(keyOper_, gv.toFortran(), odb_, ovec.size(), ovec.toFortran());
48  oops::Log::trace() << "ObsADT: observation operator run" << std::endl;
49 }
50 
51 // -----------------------------------------------------------------------------
52 
53 void ObsADT::print(std::ostream & os) const {
54  os << "ObsADT::print not implemented";
55 }
56 
57 // -----------------------------------------------------------------------------
58 
59 } // namespace ufo
GeoVaLs: geophysical values at locations.
virtual ~ObsADT()
Definition: ObsADT.cc:38
F90hop keyOper_
Definition: ObsADT.h:56
const ioda::ObsSpace & odb_
Definition: ObsADT.h:57
void simulateObs(const GeoVaLs &, ioda::ObsVector &, ObsDiagnostics &) const override
Obs Operator.
Definition: ObsADT.cc:45
std::unique_ptr< const oops::Variables > varin_
Definition: ObsADT.h:58
ObsADT(const ioda::ObsSpace &, const eckit::Configuration &)
Definition: ObsADT.cc:27
void print(std::ostream &) const override
Definition: ObsADT.cc:53
Definition: RunCRTM.h:27
static ObsOperatorMaker< ObsADT > makerADT_("ADT")
void ufo_adt_setup_f90(F90hop &, const eckit::Configuration &)
Interface to Fortran UFO adt routines.
void ufo_adt_delete_f90(F90hop &)
void ufo_adt_simobs_f90(const F90hop &, const F90goms &, const ioda::ObsSpace &, const int &, double &)