UFO
ufo::ModelObThreshold Class Reference

A filter that interpolates a model profile (GeoVaL) and a height-dependent threshold to the observation location and flags observations which are outside the specified limit. More...

#include <ModelObThreshold.h>

Inheritance diagram for ufo::ModelObThreshold:
Collaboration diagram for ufo::ModelObThreshold:

Public Types

typedef ModelObThresholdParameters Parameters_
 

Public Member Functions

 ModelObThreshold (ioda::ObsSpace &, const Parameters_ &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
 
 ~ModelObThreshold ()
 
- Public Member Functions inherited from ufo::FilterBase
 FilterBase (ioda::ObsSpace &, const FilterParametersBaseWithAbstractAction &parameters, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
 
 FilterBase (ioda::ObsSpace &, const eckit::Configuration &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
 
 ~FilterBase ()
 
- Public Member Functions inherited from ufo::ObsProcessorBase
 ObsProcessorBase (ioda::ObsSpace &, bool deferToPost, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
 
 ~ObsProcessorBase ()
 
void preProcess () override
 
void priorFilter (const GeoVaLs &) override
 
void postFilter (const ioda::ObsVector &, const ioda::ObsVector &, const ObsDiagnostics &) override
 
oops::Variables requiredVars () const override
 
oops::Variables requiredHdiagnostics () const override
 

Static Public Member Functions

static const std::string classname ()
 

Private Member Functions

void print (std::ostream &) const override
 
void applyFilter (const std::vector< bool > &, const Variables &, std::vector< std::vector< bool >> &) const override
 Filter to apply a threshold to a model profile interpolated to the observation height. More...
 
int qcFlag () const override
 

Private Attributes

Parameters_ parameters_
 

Additional Inherited Members

- Protected Attributes inherited from ufo::FilterBase
const eckit::LocalConfiguration config_
 
ufo::Variables filtervars_
 
- Protected Attributes inherited from ufo::ObsProcessorBase
ioda::ObsSpace & obsdb_
 
std::shared_ptr< ioda::ObsDataVector< int > > flags_
 
std::shared_ptr< ioda::ObsDataVector< float > > obserr_
 
ufo::Variables allvars_
 
ObsFilterData data_
 

Detailed Description

A filter that interpolates a model profile (GeoVaL) and a height-dependent threshold to the observation location and flags observations which are outside the specified limit.

See ModelObThresholdParameters for the documentation of the parameters controlling this filter.

Definition at line 88 of file ModelObThreshold.h.

Member Typedef Documentation

◆ Parameters_

The type of parameters accepted by the constructor of this filter. This typedef is used by the FilterFactory.

Definition at line 93 of file ModelObThreshold.h.

Constructor & Destructor Documentation

◆ ModelObThreshold()

ufo::ModelObThreshold::ModelObThreshold ( ioda::ObsSpace &  obsdb,
const Parameters_ parameters,
std::shared_ptr< ioda::ObsDataVector< int > >  flags,
std::shared_ptr< ioda::ObsDataVector< float > >  obserr 
)

Definition at line 29 of file ModelObThreshold.cc.

◆ ~ModelObThreshold()

ufo::ModelObThreshold::~ModelObThreshold ( )

Definition at line 42 of file ModelObThreshold.cc.

Member Function Documentation

◆ applyFilter()

void ufo::ModelObThreshold::applyFilter ( const std::vector< bool > &  apply,
const Variables filtervars,
std::vector< std::vector< bool >> &  flagged 
) const
overrideprivatevirtual

Filter to apply a threshold to a model profile interpolated to the observation height.

The specified model profile variable is linearly (vertical) interpolated to the observation height using the specified model vertical coordinate variable. This is referred to as the "ModelOb". Note that the ModelOb is not necessarily one of the HofX variables.

The observation height must be in the same coordinate system as that specified for the model vertical coordinate, e.g. both pressure.

The thresholds to compare the ModelOb against is specified as height-dependent. We supply a vector of threshold values, and a vector of vertical coordinate values corresponding to those thresholds. The coordinate values must be in the same vertical coordinate as the observation, e.g. pressure. The threshold values are then linearly interpolated to the observation height.

The observation is flagged for rejection if the ModelOb lies outside the threshold value according to threshold type - min or max. E.g. if the threshold type is min, then the observation is flagged if ModelOb is less than the interpolated threshold value.

Example for relative humidity:

obs filters:
- filter: ModelOb Threshold
model profile:
name: relative_humidity@GeoVaLs
model vertical coordinate:
name: air_pressure@GeoVaLs
observation height:
name: air_pressure_levels@MetaData
thresholds: [50,50,40,30]
coordinate values: [100000,80000,50000,20000]
threshold type: min
Author
J.Cotton (Met Office)
Date
12/03/2021: Created

Implements ufo::FilterBase.

Definition at line 89 of file ModelObThreshold.cc.

Here is the call graph for this function:

◆ classname()

static const std::string ufo::ModelObThreshold::classname ( )
inlinestatic

Definition at line 95 of file ModelObThreshold.h.

◆ print()

void ufo::ModelObThreshold::print ( std::ostream &  os) const
overrideprivatevirtual

Implements ufo::FilterBase.

Definition at line 174 of file ModelObThreshold.cc.

Here is the caller graph for this function:

◆ qcFlag()

int ufo::ModelObThreshold::qcFlag ( ) const
inlineoverrideprivatevirtual

Implements ufo::FilterBase.

Definition at line 106 of file ModelObThreshold.h.

Member Data Documentation

◆ parameters_

Parameters_ ufo::ModelObThreshold::parameters_
private

Definition at line 108 of file ModelObThreshold.h.


The documentation for this class was generated from the following files: