UFO
ObsGnssroBndNBAM.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 #include "oops/util/Logger.h"
18 
19 #include "ufo/GeoVaLs.h"
20 #include "ufo/ObsDiagnostics.h"
21 
22 namespace ufo {
23 
24 // -----------------------------------------------------------------------------
26 // -----------------------------------------------------------------------------
27 
28 ObsGnssroBndNBAM::ObsGnssroBndNBAM(const ioda::ObsSpace & odb, const eckit::Configuration & config)
29  : ObsOperatorBase(odb, config), keyOperGnssroBndNBAM_(0), odb_(odb), varin_()
30 {
31  std::vector<std::string> vv{"air_temperature", "specific_humidity",
32  "surface_altitude"};
33 
34  const eckit::LocalConfiguration obsOptions(config, "obs options");
35 
36  std::string vertlayer;
37 
38  vertlayer = obsOptions.getString("vertlayer", "full");
39 
40  if ( vertlayer == "mass" ) {
41  vv.push_back("air_pressure");
42  vv.push_back("geopotential_height");
43  } else {
44  vv.push_back("air_pressure_levels");
45  vv.push_back("geopotential_height_levels");
46  }
47 
48  varin_.reset(new oops::Variables(vv));
49 
51  oops::Log::trace() << "ObsGnssroBndNBAM created." << std::endl;
52 }
53 
54 // -----------------------------------------------------------------------------
55 
58  oops::Log::trace() << "ObsGnssroBndNBAM destructed" << std::endl;
59 }
60 
61 // -----------------------------------------------------------------------------
62 
63 void ObsGnssroBndNBAM::simulateObs(const GeoVaLs & gom, ioda::ObsVector & ovec,
64  ObsDiagnostics &) const {
66  ovec.size(), ovec.toFortran());
67 }
68 
69 // -----------------------------------------------------------------------------
70 
71 void ObsGnssroBndNBAM::print(std::ostream & os) const {
72  os << "ObsGnssroBndNBAM::print not implemented";
73 }
74 
75 // -----------------------------------------------------------------------------
76 
77 } // namespace ufo
GeoVaLs: geophysical values at locations.
void print(std::ostream &) const override
std::unique_ptr< const oops::Variables > varin_
void simulateObs(const GeoVaLs &, ioda::ObsVector &, ObsDiagnostics &) const override
Obs Operator.
ObsGnssroBndNBAM(const ioda::ObsSpace &, const eckit::Configuration &)
const ioda::ObsSpace & odb_
Definition: RunCRTM.h:27
void ufo_gnssro_bndnbam_delete_f90(F90hop &)
void ufo_gnssro_bndnbam_simobs_f90(const F90hop &, const F90goms &, const ioda::ObsSpace &, const int &, double &)
void ufo_gnssro_bndnbam_setup_f90(F90hop &, const eckit::Configuration &)
Interface to Fortran UFO routines.
static ObsOperatorMaker< ObsGnssroBndNBAM > makerGnssroBndNBAM_("GnssroBndNBAM")