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 Types

typedef TrackCheckParameters Parameters_
 

Public Member Functions

 TrackCheck (ioda::ObsSpace &obsdb, const Parameters_ &parameters, 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 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 Types

enum  Direction { FORWARD , BACKWARD , NUM_DIRECTIONS }
 

Private Member Functions

ObsGroupPressureLocationTime collectObsPressuresLocationsTimes (const ObsAccessor &obsAccessor) 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
 
ObsAccessor createObsAccessor () const
 
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

Parameters_ options_
 

Static Private Attributes

static const int NO_PREVIOUS_SWEEP = -1
 

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

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 54 of file src/ufo/filters/TrackCheck.h.

Member Typedef Documentation

◆ Parameters_

Member Enumeration Documentation

◆ Direction

Enumerator
FORWARD 
BACKWARD 
NUM_DIRECTIONS 

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

Constructor & Destructor Documentation

◆ TrackCheck()

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

Definition at line 97 of file TrackCheck.cc.

◆ ~TrackCheck()

ufo::TrackCheck::~TrackCheck ( )
override

Definition at line 106 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 109 of file TrackCheck.cc.

Here is the call graph for this function:

◆ classname()

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

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

◆ collectObsPressuresLocationsTimes()

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

Definition at line 131 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 179 of file TrackCheck.cc.

Here is the caller graph for this function:

◆ createObsAccessor()

ObsAccessor ufo::TrackCheck::createObsAccessor ( ) const
private

◆ 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 279 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 158 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 139 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 292 of file TrackCheck.cc.

◆ qcFlag()

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

Implements ufo::FilterBase.

Definition at line 150 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 197 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 70 of file src/ufo/filters/TrackCheck.h.

◆ options_

Parameters_ ufo::TrackCheck::options_
private

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


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