11 #include "atlas/array.h"
12 #include "atlas/field.h"
13 #include "atlas/functionspace.h"
14 #include "atlas/interpolation.h"
15 #include "atlas/option.h"
16 #include "eckit/config/Configuration.h"
19 #include "oops/util/abor1_cpp.h"
20 #include "oops/util/Logger.h"
22 using atlas::array::make_datatype;
23 using atlas::array::make_shape;
24 using atlas::option::name;
25 using atlas::option::levels;
33 const atlas::FunctionSpace & grid1,
34 const atlas::FunctionSpace & grid2,
35 const atlas::field::FieldSetImpl * masks) {
40 interpolator_.reset(
new atlas::Interpolation(atlas::option::type(
"finite-element" ),
46 atlas::Field & outfield) {
52 atlas::FieldSet & outfields) {
54 for (
size_t ifield = 0; ifield < static_cast<size_t>(infields.size()); ++ifield) {
55 std::string fname = infields.field(ifield).name();
56 if (!outfields.has_field(fname)) {
57 oops::Log::info() <<
"Allocating output fields for Atlas Interpolation" << std::endl;
59 atlas::Field outfield =
61 levels(infields.field(ifield).levels()));
62 outfields.add(outfield);
72 os <<
" InterpolatorAtlas: print not implemented yet.";
InterpolatorAtlas(const eckit::Configuration &, const atlas::FunctionSpace &, const atlas::FunctionSpace &, const atlas::field::FieldSetImpl *=nullptr)
void apply(const atlas::Field &, atlas::Field &) override
std::unique_ptr< atlas::Interpolation > interpolator_
void print(std::ostream &) const override
The namespace for the main oops code.
static InterpolatorMaker< InterpolatorAtlas > makerAtlas_("atlas")