11 #include "oops/util/abor1_cpp.h"
12 #include "oops/util/Logger.h"
20 nchans_(0), wmoid_(0), rtype_(0), channels_(), errors_()
22 oops::Log::trace() <<
"MetOfficeRMatrixRadiance constructor starting" << std::endl;
31 ABORT(
"R-matrix type not currently in use - only diagonal");
35 std::vector<int> chans_data(
nchans_);
36 std::vector<float> elements_data(
nchans_);
38 chans_data.data(), elements_data.data());
45 oops::Log::trace() <<
"MetOfficeRMatrixRadiance constructor end" << std::endl;
50 const Eigen::MatrixXf & in,
51 Eigen::MatrixXf & out)
const {
52 int matrows = in.rows();
53 int matcols = in.cols();
54 oops::Log::debug() <<
"matrows, matcols = " << matrows <<
" " << matcols << std::endl;
55 assert(matrows == chans_used.size());
56 assert(matcols == chans_used.size());
59 for (
size_t ichan = 0; ichan < chans_used.size(); ++ichan) {
62 oops::Log::error() <<
"Channel not found in R-matrix: "
63 << chans_used[ichan] << std::endl;
64 ABORT(
"Invalid channel specified for R-matrix");
71 ABORT(
"R-matrix type not currently in use - only diagonal");
77 os <<
"MetOfficeRMatrixRadiance: print starting" << std::endl;
78 os <<
"nchans_ = " <<
nchans_ << std::endl;
79 os <<
"wmoid_ = " <<
wmoid_ << std::endl;
80 os <<
"rtype_ = " <<
rtype_ << std::endl;
83 for (std::vector<int>::const_iterator i =
channels_.begin(); i !=
channels_.end(); ++i)
86 os <<
"errors (stdevs) = ";
87 for (std::vector<float>::const_iterator i =
errors_.begin(); i !=
errors_.end(); ++i)
91 os <<
"channels[0] = " <<
channels_[0] << std::endl;
92 os <<
"errors[0] (stdev) = " <<
errors_[0] << std::endl;
94 os <<
"MetOfficeRMatrixRadiance: print end" << std::endl;
void add(const std::vector< int > &, const Eigen::MatrixXf &, Eigen::MatrixXf &) const
Add r matrix variance onto input array.
void print(std::ostream &) const override
Print.
F90obfilter keyMetOfficeRMatrixRadiance_
std::vector< float > errors_
MetOfficeRMatrixRadiance(const eckit::Configuration &)
Constructor.
std::vector< int > channels_
void ufo_metoffice_rmatrixradiance_delete_f90(const F90obfilter &)
void ufo_metoffice_rmatrixradiance_getelements_f90(const F90obfilter &, const size_t &, int *, float *)
void ufo_metoffice_rmatrixradiance_setup_f90(const F90obfilter &, const eckit::Configuration &, size_t &, size_t &, size_t &)