UFO
ObsAodCRTM.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 
8 #include "ufo/crtm/ObsAodCRTM.h"
9 
10 #include <ostream>
11 #include <set>
12 #include <string>
13 #include <vector>
14 
15 #include "ioda/ObsVector.h"
16 
17 #include "oops/base/Variables.h"
18 #include "oops/util/IntSetParser.h"
19 
20 #include "ufo/GeoVaLs.h"
21 #include "ufo/ObsBias.h"
22 #include "ufo/ObsDiagnostics.h"
23 
24 namespace ufo {
25 
26 // -----------------------------------------------------------------------------
28 
29 // -----------------------------------------------------------------------------
30 
31 ObsAodCRTM::ObsAodCRTM(const ioda::ObsSpace & odb,
32  const eckit::Configuration & config)
33  : ObsOperatorBase(odb, config), keyOperAodCRTM_(0), odb_(odb), varin_()
34 {
35  // parse channels from the config and create variable names
36  const oops::Variables & observed = odb.obsvariables();
37  std::vector<int> channels_list = observed.channels();
38 
39  // call Fortran setup routine
40  ufo_aodcrtm_setup_f90(keyOperAodCRTM_, config, channels_list.size(), channels_list[0], varin_);
41  oops::Log::info() << "ObsAodCRTM variables: " << varin_ << std::endl;
42  oops::Log::info() << "ObsAodCRTM channels: " << channels_list << std::endl;
43  oops::Log::trace() << "ObsAodCRTM created." << std::endl;
44 }
45 
46 // -----------------------------------------------------------------------------
47 
50  oops::Log::trace() << "ObsAodCRTM destructed" << std::endl;
51 }
52 
53 // -----------------------------------------------------------------------------
54 
55 void ObsAodCRTM::simulateObs(const GeoVaLs & gom, ioda::ObsVector & ovec,
56  ObsDiagnostics &) const {
58  ovec.nvars(), ovec.nlocs(), ovec.toFortran());
59 }
60 
61 // -----------------------------------------------------------------------------
62 
63 void ObsAodCRTM::print(std::ostream & os) const {
64  os << "ObsAodCRTM::print not implemented";
65 }
66 
67 // -----------------------------------------------------------------------------
68 
69 } // namespace ufo
GeoVaLs: geophysical values at locations.
void print(std::ostream &) const override
Definition: ObsAodCRTM.cc:63
ObsAodCRTM(const ioda::ObsSpace &, const eckit::Configuration &)
Definition: ObsAodCRTM.cc:31
virtual ~ObsAodCRTM()
Definition: ObsAodCRTM.cc:48
void simulateObs(const GeoVaLs &, ioda::ObsVector &, ObsDiagnostics &) const override
Obs Operator.
Definition: ObsAodCRTM.cc:55
const ioda::ObsSpace & odb_
Definition: ObsAodCRTM.h:58
F90hop keyOperAodCRTM_
Definition: ObsAodCRTM.h:57
oops::Variables varin_
Definition: ObsAodCRTM.h:59
Definition: RunCRTM.h:27
void ufo_aodcrtm_simobs_f90(const F90hop &, const F90goms &, const ioda::ObsSpace &, const int &, const int &, double &)
static ObsOperatorMaker< ObsAodCRTM > makerAOD_("AodCRTM")
void ufo_aodcrtm_setup_f90(F90hop &, const eckit::Configuration &, const int &, const int &, oops::Variables &)
Interface to Fortran UFO routines.
void ufo_aodcrtm_delete_f90(F90hop &)