UFO
ufo::TrackCheck Class Reference

Checks tracks of mobile weather stations, rejecting observations inconsistent with the rest of the track. More...

#include <TrackCheck.h>

Inheritance diagram for ufo::TrackCheck:
Collaboration diagram for ufo::TrackCheck:

Classes

struct  CheckResults
 Results of cross-checking an observation with another (a "buddy"). More...
 
struct  ObsGroupPressureLocationTime
 
class  TrackObservation
 Attributes of an observation belonging to a track. More...
 

Public Member Functions

 TrackCheck (ioda::ObsSpace &obsdb, const eckit::Configuration &config, std::shared_ptr< ioda::ObsDataVector< int > > flags, std::shared_ptr< ioda::ObsDataVector< float > > obserr)
 
 ~TrackCheck () override
 
- Public Member Functions inherited from ufo::FilterBase
 FilterBase (ioda::ObsSpace &, const eckit::Configuration &, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >)
 
 ~FilterBase ()
 
void preProcess ()
 
void priorFilter (const GeoVaLs &)
 
void postFilter (const ioda::ObsVector &, const ObsDiagnostics &)
 
oops::Variables requiredVars () const
 
oops::Variables requiredHdiagnostics () const
 

Static Public Member Functions

static const std::string classname ()
 

Private Types

enum  Direction { FORWARD, BACKWARD, NUM_DIRECTIONS }
 

Private Member Functions

ObsGroupPressureLocationTime collectObsPressuresLocationsTimes () const
 
void flagRejectedTrackObservations (std::vector< size_t >::const_iterator trackObsIndicesBegin, std::vector< size_t >::const_iterator trackObsIndicesEnd, const std::vector< size_t > &validObsIds, const std::vector< TrackObservation > &trackObservations, std::vector< bool > &isRejected) const
 
void print (std::ostream &) const override
 
void applyFilter (const std::vector< bool > &, const Variables &, std::vector< std::vector< bool >> &) const override
 
int qcFlag () const override
 
PiecewiseLinearInterpolation makeMaxSpeedByPressureInterpolation () const
 Returns an interpolator mapping pressures (in Pa) to maximum accepted speeds (in km/s). More...
 
void identifyRejectedObservationsInTrack (std::vector< size_t >::const_iterator trackObsIndicesBegin, std::vector< size_t >::const_iterator trackObsIndicesEnd, const std::vector< size_t > &validObsIds, const ObsGroupPressureLocationTime &obsPressureLoc, const PiecewiseLinearInterpolation &maxSpeedByPressure, std::vector< bool > &isRejected) const
 
std::vector< TrackObservationcollectTrackObservations (std::vector< size_t >::const_iterator trackObsIndicesBegin, std::vector< size_t >::const_iterator trackObsIndicesEnd, const std::vector< size_t > &validObsIds, const ObsGroupPressureLocationTime &obsPressureLoc) const
 
TrackCheckUtils::SweepResult sweepOverObservations (std::vector< TrackObservation > &trackObservations, const PiecewiseLinearInterpolation &maxValidSpeedAtPressure, std::vector< float > &workspace) const
 

Private Attributes

std::unique_ptr< TrackCheckParametersoptions_
 

Static Private Attributes

static const int NO_PREVIOUS_SWEEP = -1
 

Additional Inherited Members

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

Detailed Description

Checks tracks of mobile weather stations, rejecting observations inconsistent with the rest of the track.

Each track is checked separately. The algorithm performs a series of sweeps over the observations from each track. For each observation, multiple estimates of the instantaneous speed and ascent/descent rate are obtained by comparing the reported position with the positions reported during a number a nearby (earlier and later) observations that haven't been rejected in previous sweeps. An observation is rejected if a certain fraction of these estimates lie outside the valid range. Sweeps continue until one of them fails to reject any observations, i.e. the set of retained observations is self-consistent.

See TrackCheckParameters for the documentation of this filter's parameters.

Note: this filter was originally written with aircraft observations in mind. However, it can potentially be useful also for other observation types.

Definition at line 53 of file src/ufo/filters/TrackCheck.h.

Member Enumeration Documentation

◆ Direction

Enumerator
FORWARD 
BACKWARD 
NUM_DIRECTIONS 

Definition at line 55 of file src/ufo/filters/TrackCheck.h.

Constructor & Destructor Documentation

◆ TrackCheck()

ufo::TrackCheck::TrackCheck ( ioda::ObsSpace &  obsdb,
const eckit::Configuration &  config,
std::shared_ptr< ioda::ObsDataVector< int > >  flags,
std::shared_ptr< ioda::ObsDataVector< float > >  obserr 
)

Definition at line 96 of file TrackCheck.cc.

◆ ~TrackCheck()

ufo::TrackCheck::~TrackCheck ( )
override

Definition at line 108 of file TrackCheck.cc.

Member Function Documentation

◆ applyFilter()

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

Implements ufo::FilterBase.

Definition at line 111 of file TrackCheck.cc.

Here is the call graph for this function:

◆ classname()

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

Definition at line 78 of file src/ufo/filters/TrackCheck.h.

◆ collectObsPressuresLocationsTimes()

TrackCheck::ObsGroupPressureLocationTime ufo::TrackCheck::collectObsPressuresLocationsTimes ( ) const
private

Definition at line 135 of file TrackCheck.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ collectTrackObservations()

std::vector< TrackCheck::TrackObservation > ufo::TrackCheck::collectTrackObservations ( std::vector< size_t >::const_iterator  trackObsIndicesBegin,
std::vector< size_t >::const_iterator  trackObsIndicesEnd,
const std::vector< size_t > &  validObsIds,
const ObsGroupPressureLocationTime obsPressureLoc 
) const
private

Definition at line 183 of file TrackCheck.cc.

Here is the caller graph for this function:

◆ flagRejectedTrackObservations()

void ufo::TrackCheck::flagRejectedTrackObservations ( std::vector< size_t >::const_iterator  trackObsIndicesBegin,
std::vector< size_t >::const_iterator  trackObsIndicesEnd,
const std::vector< size_t > &  validObsIds,
const std::vector< TrackObservation > &  trackObservations,
std::vector< bool > &  isRejected 
) const
private

Definition at line 283 of file TrackCheck.cc.

Here is the caller graph for this function:

◆ identifyRejectedObservationsInTrack()

void ufo::TrackCheck::identifyRejectedObservationsInTrack ( std::vector< size_t >::const_iterator  trackObsIndicesBegin,
std::vector< size_t >::const_iterator  trackObsIndicesEnd,
const std::vector< size_t > &  validObsIds,
const ObsGroupPressureLocationTime obsPressureLoc,
const PiecewiseLinearInterpolation maxSpeedByPressure,
std::vector< bool > &  isRejected 
) const
private

Definition at line 162 of file TrackCheck.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeMaxSpeedByPressureInterpolation()

PiecewiseLinearInterpolation ufo::TrackCheck::makeMaxSpeedByPressureInterpolation ( ) const
private

Returns an interpolator mapping pressures (in Pa) to maximum accepted speeds (in km/s).

Definition at line 143 of file TrackCheck.cc.

Here is the caller graph for this function:

◆ print()

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

Implements ufo::FilterBase.

Definition at line 296 of file TrackCheck.cc.

◆ qcFlag()

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

Implements ufo::FilterBase.

Definition at line 144 of file src/ufo/filters/TrackCheck.h.

◆ sweepOverObservations()

TrackCheckUtils::SweepResult ufo::TrackCheck::sweepOverObservations ( std::vector< TrackObservation > &  trackObservations,
const PiecewiseLinearInterpolation maxValidSpeedAtPressure,
std::vector< float > &  workspace 
) const
private

Iterate once over all observations in trackObservations, rejecting those inconsistent with nearby observations.

Parameters
[in,out]trackObservationsAttributes of all observations in a track. Modified in place.
[in]Dependenceof the expected maximum speed on air pressure (and thus height).
[in,out]workspaceA vector used internally by the function, passed by parameter to avoid repeated memory allocations and deallocations.

Definition at line 201 of file TrackCheck.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ NO_PREVIOUS_SWEEP

const int ufo::TrackCheck::NO_PREVIOUS_SWEEP = -1
staticprivate

Definition at line 69 of file src/ufo/filters/TrackCheck.h.

◆ options_

std::unique_ptr<TrackCheckParameters> ufo::TrackCheck::options_
private

Definition at line 180 of file src/ufo/filters/TrackCheck.h.


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