Skip to content

Commit

Permalink
separate model variables and obs variables types (#70)
Browse files Browse the repository at this point in the history
* Update RequiredHDiagnostics to use ObsVariables
* obsGeoVars as ObsVariables
  • Loading branch information
twsearle authored May 20, 2024
1 parent 97ed77c commit 002f15a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/nemo-feedback/NemoFeedback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -63,7 +64,6 @@ NemoFeedback::NemoFeedback(
{
oops::Log::trace() << "NemoFeedback constructor starting" << std::endl;

const std::vector<int> channels{};
std::vector<std::string> obsGeoNames;

// helper function to determine if a name is a new entry in the vector
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/nemo-feedback/NemoFeedback.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -48,7 +49,7 @@ class NemoFeedback : public oops::interface::ObsFilterBase<ufo::ObsTraits>,
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
Expand Down Expand Up @@ -78,7 +79,7 @@ class NemoFeedback : public oops::interface::ObsFilterBase<ufo::ObsTraits>,
ioda::ObsSpace & obsdb_;
ufo::ObsFilterData data_;
oops::Variables geovars_;
oops::Variables extradiagvars_;
oops::ObsVariables extradiagvars_;
std::shared_ptr<ioda::ObsDataVector<int>> flags_;
std::shared_ptr<ioda::ObsDataVector<float>> obsErrors_;
NemoFeedbackParameters parameters_;
Expand Down

0 comments on commit 002f15a

Please sign in to comment.