10 #include "eckit/config/Configuration.h"
12 #include "ioda/ObsDataVector.h"
13 #include "ioda/ObsSpace.h"
14 #include "ioda/ObsVector.h"
15 #include "oops/util/Logger.h"
16 #include "ufo/GeoVaLs.h"
23 const eckit::Configuration & config,
28 oops::Log::trace() <<
"ROobserror contructor starting" << std::endl;
30 oops::Log::trace() <<
"ROobserror contructor = "<< filvar << std::endl;
32 oops::Log::trace() <<
"ROobserror contructor key = " <<
key_ << std::endl;
47 oops::Log::trace() <<
"ROobserror destructor key = " <<
key_ << std::endl;
55 std::vector<std::vector<bool>> & flagged)
const {
56 oops::Log::trace() <<
"ROobserror using priorFilter" << std::endl;
60 Eigen::ArrayXXf air_temperature =
get_geovals(
"air_temperature@GeoVaLs");
61 Eigen::ArrayXXf geopot_height =
get_geovals(
"geopotential_height@GeoVaLs");
62 oops::Log::debug() <<
"Shape geopotential height " << geopot_height.rows() <<
63 " " << geopot_height.cols() << std::endl;
69 air_temperature.rows(), air_temperature.cols(), air_temperature.data(),
70 geopot_height.rows(), geopot_height.cols(), geopot_height.data());
86 Eigen::ArrayXXf all_geovals(
nlocs, nlevs);
87 std::vector<float> single_geoval(
nlocs);
88 for (
int ilev=0; ilev < static_cast<int>(nlevs); ilev++) {
91 all_geovals.col(ilev) = Eigen::VectorXf::Map(single_geoval.data(), single_geoval.size());
100 os <<
"ROobserror::print not yet implemented " <<
key_;
Base class for UFO QC filters.
const eckit::LocalConfiguration config_
ufo::Variables filtervars_
void getAtLevel(std::vector< double > &, const std::string &, const int) const
Get GeoVaLs at a specified level.
size_t nlocs() const
Return the number of geovals.
const GeoVaLs * getGeoVaLs() const
Returns reference to GeoVaLs required by 1DVar.
size_t nlevs(const Variable &) const
Returns the number of levels in the specified variable.
std::shared_ptr< ioda::ObsDataVector< float > > obserr_
std::shared_ptr< ioda::ObsDataVector< int > > flags_
void print(std::ostream &) const override
ROobserror(ioda::ObsSpace &, const eckit::Configuration &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
Eigen::ArrayXXf get_geovals(const std::string &) const
void applyFilter(const std::vector< bool > &, const Variables &, std::vector< std::vector< bool >> &) const override
oops::Variables toOopsVariables() const
integer function nlocs(this)
Return the number of observational locations in this Locations object.
void ufo_roobserror_delete_f90(F90roerr &)
void ufo_roobserror_create_f90(F90roerr &, const ioda::ObsSpace &, const eckit::Configuration &, const oops::Variables &)
Interface to Fortran RO observation error routines.
void ufo_roobserror_prior_f90(const F90roerr &, const int &, const int &, const float *, const int &, const int &, const float *)