Go to the documentation of this file.
19 #include "ioda/ObsDataVector.h"
20 #include "oops/util/IntSetParser.h"
38 std::copy(channelset.begin(), channelset.end(), std::back_inserter(
channels_));
60 const size_t nlocs = in.
nlocs();
64 std::vector<float> water_frac(nlocs);
65 in.
get(
Variable(
"water_area_fraction@GeoVaLs"), water_frac);
70 in.
get(clwobsvar, clwobs);
75 in.
get(clwbkgvar, clwbkg);
79 for (
size_t ichan = 0; ichan < nchans; ++ichan) {
80 for (
size_t iloc = 0; iloc < nlocs; ++iloc) {
81 out[ichan][iloc] = 1.0;
82 if (water_frac[iloc] > 0.99) {
83 float condition1 = (clwobs[0][iloc] - clw_clr[ichan]) * (clwbkg[0][iloc] - clw_clr[ichan]);
84 float condition2 =
std::abs(clwobs[0][iloc] - clwbkg[0][iloc]);
85 if ( condition1 < 0 && condition2 >= 0.005) out[ichan][iloc] = 0.0;
oops::RequiredParameter< std::string > channelList
List of channels available for assimilation.
CLWMatchIndexMWParameters options_
const ufo::Variables & requiredVariables() const
geovals required to compute the function
oops::RequiredParameter< Variable > clwobsFunction
Function to retrieve the cloud liquid water from observation.
size_t nlocs() const
Returns number of locations.
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
oops::RequiredParameter< Variable > clwbkgFunction
Function to retrieve the cloud liquid water from the simulated observation.
ioda::ObsSpace & obsspace() const
Returns reference to ObsSpace associated with ObsFilterData.
oops::Variables toOopsVariables() const
util::Duration abs(const util::Duration &duration)
CLWMatchIndexMW(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
static ObsFunctionMaker< CLWMatchIndexMW > makerCLWMatchIndexMW_("CLWMatchIndexMW")
std::vector< int > channels_
oops::RequiredParameter< std::vector< float > > clwretClearSky
void get(const Variable &, std::vector< float > &) const
Gets requested data from ObsFilterData.
ObsFilterData provides access to all data related to an ObsFilter.