18 #include "ioda/ObsDataVector.h"
19 #include "oops/util/IntSetParser.h"
20 #include "oops/util/missingValues.h"
39 std::copy(channelset.begin(), channelset.end(), std::back_inserter(
channels_));
76 in.
get(obserrlat, errflat);
81 in.
get(obserrtaotop, errftaotop);
84 std::vector<float> obserr(
nlocs);
85 std::vector<float> obserrdata(
nlocs);
86 std::vector<int> qcflagdata(
nlocs);
91 for (
size_t ichan = 0; ichan < nchans; ++ichan) {
95 for (
size_t iloc = 0; iloc <
nlocs; ++iloc) {
96 if (flaggrp ==
"PreQC") obserrdata[iloc] ==
missing ? qcflagdata[iloc] = 100
97 : qcflagdata[iloc] = 0;
98 (qcflagdata[iloc] == 0) ? (varinv = 1.0 / pow(obserrdata[iloc], 2)) : (varinv = 0.0);
99 out[ichan][iloc] = obserr[iloc];
101 out[ichan][iloc] = std::fmin(3.0 * obserr[iloc]
102 * (1.0 / pow(errflat[0][iloc], 2))
103 * (1.0 / pow(errftaotop[ichan][iloc], 2)), obserr_bound_max[ichan]);
ObsErrorBoundIRParameters options_
const ufo::Variables & requiredVariables() const
geovals required to compute the function
ObsErrorBoundIR(const eckit::LocalConfiguration &)
std::vector< int > channels_
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
oops::RequiredParameter< Variable > obserrBoundLat
Function used to set the observation bound based on Latitude (ObsErrorFactorLatRad)
oops::RequiredParameter< std::string > channelList
List of channels available for assimilation.
oops::Parameter< std::string > testQCflag
Name of the data group to which the QC flag is applied (default is QCflagsData)
oops::RequiredParameter< Variable > obserrBoundTransmittop
oops::RequiredParameter< std::vector< float > > obserrBoundMax
Maximum value of the observation error bound for each channel in channelList.
oops::Parameter< std::string > testObserr
Name of the data group to which the observation error is applied (default: ObsErrorData)
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< ObsErrorBoundIR > makerObsErrorBoundIR_("ObsErrorBoundIR")