19 #include "ioda/ObsDataVector.h"
20 #include "oops/util/IntSetParser.h"
38 std::copy(channelset.begin(), channelset.end(), std::back_inserter(
channels_));
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;
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
const ufo::Variables & requiredVariables() const
geovals required to compute the function
std::vector< int > channels_
CLWMatchIndexMWParameters options_
CLWMatchIndexMW(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
oops::RequiredParameter< Variable > clwobsFunction
Function to retrieve the cloud liquid water from observation.
oops::RequiredParameter< std::vector< float > > clwretClearSky
oops::RequiredParameter< Variable > clwbkgFunction
Function to retrieve the cloud liquid water from the simulated observation.
oops::RequiredParameter< std::string > channelList
List of channels available for assimilation.
ObsFilterData provides access to all data related to an ObsFilter.
size_t nlocs() const
Returns the number of locations in the associated ObsSpace.
ioda::ObsSpace & obsspace() const
Returns reference to ObsSpace associated with ObsFilterData.
void get(const Variable &varname, std::vector< float > &values) const
Fills a std::vector with values of the specified variable.
oops::Variables toOopsVariables() const
integer function nlocs(this)
Return the number of observational locations in this Locations object.
static ObsFunctionMaker< CLWMatchIndexMW > makerCLWMatchIndexMW_("CLWMatchIndexMW")
util::Duration abs(const util::Duration &duration)