13 #include "ioda/ObsSpace.h"
15 #include "ufo/GeoVaLs.h"
16 #include "ufo/ObsDiagnostics.h"
18 #include "oops/base/Variables.h"
19 #include "oops/util/abor1_cpp.h"
20 #include "oops/util/Logger.h"
31 geovars_ += oops::Variables({
"water_area_fraction"});
32 if (vars.size() > 0) {
33 hdiags_ += oops::Variables({
"brightness_temperature_jacobian_surface_emissivity"},
36 oops::Log::error() <<
"Channels size is ZERO !" << std::endl;
37 ABORT(
"Channels size is ZERO !");
46 ioda::ObsVector & out)
const {
47 const std::size_t nvars = out.nvars();
48 const std::size_t
nlocs = out.nlocs();
50 std::vector<float> pred(
nlocs, 0.0);
51 std::vector<float> h2o_frac(
nlocs, 0.0);
52 geovals.
get(h2o_frac,
"water_area_fraction");
55 for (std::size_t jvar = 0; jvar < nvars; ++jvar) {
56 hdiags =
"brightness_temperature_jacobian_surface_emissivity_" +
57 std::to_string(
vars_.channels()[jvar]);
58 ydiags.
get(pred, hdiags);
59 for (std::size_t jloc = 0; jloc <
nlocs; ++jloc) {
60 if (h2o_frac[jloc] < 0.99 && std::fabs(pred[jloc]) > 0.001) {
61 out[jloc*nvars+jvar] = pred[jloc];
Emissivity(const Parameters_ &, const oops::Variables &)
void compute(const ioda::ObsSpace &, const GeoVaLs &, const ObsDiagnostics &, ioda::ObsVector &) const override
compute the predictor
GeoVaLs: geophysical values at locations.
void get(std::vector< double > &, const std::string &var) const
Get 2D GeoVaLs for variable var (fails for 3D GeoVaLs)
void get(std::vector< float > &, const std::string &) const
oops::Variables vars_
variables that will be bias-corrected using this predictor
oops::Variables geovars_
required GeoVaLs
oops::Variables hdiags_
required ObsDiagnostics
integer function nlocs(this)
Return the number of observational locations in this Locations object.
static PredictorMaker< Emissivity > makerFuncEmissivity_("emissivity")