From 002f15af372ad01e412456704888a5974dc4e75a Mon Sep 17 00:00:00 2001 From: Toby Searle <14909402+twsearle@users.noreply.github.com> Date: Mon, 20 May 2024 14:15:52 +0100 Subject: [PATCH] separate model variables and obs variables types (#70) * Update RequiredHDiagnostics to use ObsVariables * obsGeoVars as ObsVariables --- src/nemo-feedback/NemoFeedback.cc | 4 ++-- src/nemo-feedback/NemoFeedback.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/nemo-feedback/NemoFeedback.cc b/src/nemo-feedback/NemoFeedback.cc index 2fa10f1..56f8b0f 100644 --- a/src/nemo-feedback/NemoFeedback.cc +++ b/src/nemo-feedback/NemoFeedback.cc @@ -21,6 +21,7 @@ #include "ioda/ObsSpace.h" #include "ioda/ObsVector.h" #include "oops/base/Variables.h" +#include "oops/base/ObsVariables.h" #include "oops/mpi/mpi.h" #include "oops/util/Logger.h" #include "oops/util/DateTime.h" @@ -63,7 +64,6 @@ NemoFeedback::NemoFeedback( { oops::Log::trace() << "NemoFeedback constructor starting" << std::endl; - const std::vector channels{}; std::vector obsGeoNames; // helper function to determine if a name is a new entry in the vector @@ -90,7 +90,7 @@ NemoFeedback::NemoFeedback( } } - const oops::Variables obsGeoVars(obsGeoNames, channels); + const oops::ObsVariables obsGeoVars(obsGeoNames); geovars_ = nameMap_.convertName(obsGeoVars); // Generate lists of the variable name meta data to setup the file diff --git a/src/nemo-feedback/NemoFeedback.h b/src/nemo-feedback/NemoFeedback.h index 4ece848..c337087 100644 --- a/src/nemo-feedback/NemoFeedback.h +++ b/src/nemo-feedback/NemoFeedback.h @@ -12,6 +12,7 @@ #include "eckit/mpi/Comm.h" #include "ioda/ObsDataVector.h" #include "oops/base/Variables.h" +#include "oops/base/ObsVariables.h" #include "oops/interface/ObsFilterBase.h" #include "oops/util/ObjectCounter.h" #include "oops/util/Printable.h" @@ -48,7 +49,7 @@ class NemoFeedback : public oops::interface::ObsFilterBase, void checkFilterData(const oops::FilterStage filterStage) override {} oops::Variables requiredVars() const override {return geovars_;} - oops::Variables requiredHdiagnostics() const override {return extradiagvars_;} + oops::ObsVariables requiredHdiagnostics() const override {return extradiagvars_;} private: /// \brief write the data to the feedback file depending on chosen type @@ -78,7 +79,7 @@ class NemoFeedback : public oops::interface::ObsFilterBase, ioda::ObsSpace & obsdb_; ufo::ObsFilterData data_; oops::Variables geovars_; - oops::Variables extradiagvars_; + oops::ObsVariables extradiagvars_; std::shared_ptr> flags_; std::shared_ptr> obsErrors_; NemoFeedbackParameters parameters_;