OOPS
InterpolatorAtlas.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020- 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 #pragma once
9 
10 #include <memory>
11 #include <ostream>
12 #include <string>
13 
14 #include "atlas/field.h"
15 #include "atlas/functionspace.h"
16 #include "atlas/interpolation.h"
17 #include "eckit/config/Configuration.h"
18 #include "eckit/exception/Exceptions.h"
19 
21 #include "oops/util/ObjectCounter.h"
22 
23 namespace oops {
24 
25 // -----------------------------------------------------------------------------
26 
27 /*! \brief Interface for Atlas interpolation
28  *
29  */
30 
32  private util::ObjectCounter<InterpolatorAtlas> {
33  public:
34  static const std::string classname() {return "oops::InterpolatorAtlas";}
35 
36  InterpolatorAtlas(const eckit::Configuration &, const atlas::FunctionSpace &,
37  const atlas::FunctionSpace &,
38  const atlas::field::FieldSetImpl * = nullptr);
39 
41  void apply(const atlas::Field &, atlas::Field &) override;
42  void apply(const atlas::FieldSet &, atlas::FieldSet &) override;
43 
44  void apply_ad(const atlas::FieldSet &, atlas::FieldSet &) override {
45  throw eckit::NotImplemented("Interpolator Adjoint not yet implemented for Atlas", Here());
46  }
47 
48  private:
49  void print(std::ostream &) const override;
50  std::unique_ptr<atlas::Interpolation> interpolator_;
51 };
52 
53 // -----------------------------------------------------------------------------
54 
55 } // namespace oops
oops::InterpolatorAtlas
Interface for Atlas interpolation.
Definition: InterpolatorAtlas.h:32
oops
The namespace for the main oops code.
Definition: ErrorCovarianceL95.cc:22
oops::InterpolatorAtlas::~InterpolatorAtlas
~InterpolatorAtlas()
Definition: InterpolatorAtlas.h:40
oops::InterpolatorAtlas::apply_ad
void apply_ad(const atlas::FieldSet &, atlas::FieldSet &) override
Definition: InterpolatorAtlas.h:44
oops::InterpolatorBase
Base class for Generic interpolation.
Definition: InterpolatorBase.h:37
oops::InterpolatorAtlas::apply
void apply(const atlas::Field &, atlas::Field &) override
Definition: InterpolatorAtlas.cc:45
oops::InterpolatorAtlas::print
void print(std::ostream &) const override
Definition: InterpolatorAtlas.cc:71
oops::InterpolatorAtlas::classname
static const std::string classname()
Definition: InterpolatorAtlas.h:34
oops::InterpolatorAtlas::interpolator_
std::unique_ptr< atlas::Interpolation > interpolator_
Definition: InterpolatorAtlas.h:50
InterpolatorBase.h
oops::InterpolatorAtlas::InterpolatorAtlas
InterpolatorAtlas(const eckit::Configuration &, const atlas::FunctionSpace &, const atlas::FunctionSpace &, const atlas::field::FieldSetImpl *=nullptr)
Definition: InterpolatorAtlas.cc:32