14 #include "ioda/ObsVector.h"
16 #include "oops/base/Variables.h"
18 #include "ufo/GeoVaLs.h"
19 #include "ufo/ObsDiagnostics.h"
29 const eckit::Configuration & config)
32 const std::vector<std::string> vvin{
"mass_concentration_of_chlorophyll_in_sea_water",
33 "sea_water_cell_thickness"};
34 varin_.reset(
new oops::Variables(vvin));
35 oops::Log::trace() <<
"ObsChlEuzIntegr created." << std::endl;
41 oops::Log::trace() <<
"ObsChlEuzIntegr destructed" << std::endl;
47 int nlocs = ovec.size();
48 int nlevs = gv.
nlevs(
"mass_concentration_of_chlorophyll_in_sea_water");
51 std::vector <double> tmp(
nlocs, 0.0);
54 std::vector<std::vector<double>> chl;
55 std::vector<std::vector<double>> h;
56 for ( std::size_t k = 0; k < nlevs; ++k ) {
57 gv.
getAtLevel(tmp,
"sea_water_cell_thickness", k);
59 gv.
getAtLevel(tmp,
"mass_concentration_of_chlorophyll_in_sea_water", k);
64 for ( std::size_t i = 0; i <
nlocs; ++i ) {
68 for ( std::size_t k = 0; k < nlevs; ++k ) {
75 for ( std::size_t k = 0; k < elev; ++k ) {
76 ovec[i] += chl[k][i] * h[k][i] / euz_mod;
79 oops::Log::trace() <<
"ObsChlEuzIntegr: observation operator run" << std::endl;
85 os <<
"Chlorophyll Ocean Color obs operator";
GeoVaLs: geophysical values at locations.
size_t nlevs(const std::string &var) const
Return number of levels for a specified variable.
void getAtLevel(std::vector< double > &, const std::string &, const int) const
Get GeoVaLs at a specified level.
std::unique_ptr< const oops::Variables > varin_
virtual ~ObsChlEuzIntegr()
void simulateObs(const GeoVaLs &, ioda::ObsVector &, ObsDiagnostics &) const override
Obs Operator.
void print(std::ostream &) const override
ObsChlEuzIntegr(const ioda::ObsSpace &, const eckit::Configuration &)
integer function nlocs(this)
Return the number of observational locations in this Locations object.
static ObsOperatorMaker< ObsChlEuzIntegr > makerChlEuzIntegr_("Chlorophyll Ocean Color")
static constexpr double euzc_1
static constexpr double euzc_0