UFO
ObsSeaIceThickness.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 ObsSeaIceThickness::ObsSeaIceThickness(const ioda::ObsSpace & odb,
28  const eckit::Configuration & config)
29  : ObsOperatorBase(odb, config), keyOper_(0), odb_(odb), varin_()
30 {
31  std::vector<std::string> vvin{"sea_ice_category_area_fraction",
32  "sea_ice_category_thickness"};
33  if (odb.obsvariables().has("sea_ice_freeboard")) {
34  vvin.push_back("sea_ice_category_snow_thickness");
35  }
36  varin_.reset(new oops::Variables(vvin));
37  ufo_seaicethickness_setup_f90(keyOper_, config, odb.obsvariables());
38  oops::Log::trace() << "ObsSeaIceThickness created." << std::endl;
39 }
40 
41 // -----------------------------------------------------------------------------
42 
45  oops::Log::trace() << "ObsSeaIceThickness destructed" << std::endl;
46 }
47 
48 // -----------------------------------------------------------------------------
49 
50 void ObsSeaIceThickness::simulateObs(const GeoVaLs & gv, ioda::ObsVector & ovec,
51  ObsDiagnostics &) const {
52  ufo_seaicethickness_simobs_f90(keyOper_, gv.toFortran(), odb_, ovec.size(), ovec.toFortran());
53  oops::Log::trace() << "ObsSeaIceThickness: observation operator run" << std::endl;
54 }
55 
56 // -----------------------------------------------------------------------------
57 
58 void ObsSeaIceThickness::print(std::ostream & os) const {
59  os << "ObsSeaIceThickness::print not implemented";
60 }
61 
62 // -----------------------------------------------------------------------------
63 
64 } // namespace ufo
GeoVaLs: geophysical values at locations.
const ioda::ObsSpace & odb_
ObsSeaIceThickness(const ioda::ObsSpace &, const eckit::Configuration &)
void print(std::ostream &) const override
void simulateObs(const GeoVaLs &, ioda::ObsVector &, ObsDiagnostics &) const override
Obs Operator.
std::unique_ptr< const oops::Variables > varin_
Definition: RunCRTM.h:27
void ufo_seaicethickness_setup_f90(F90hop &, const eckit::Configuration &, const oops::Variables &)
Interface to Fortran UFO marine/seaicethickness routines.
static ObsOperatorMaker< ObsSeaIceThickness > makerSeaIceThickness_("SeaIceThickness")
void ufo_seaicethickness_delete_f90(F90hop &)
void ufo_seaicethickness_simobs_f90(const F90hop &, const F90goms &, const ioda::ObsSpace &, const int &, double &)