Checks tracks of ships and buoys, rejecting observations whose locations and timestamps make them inconsistent with the rest of the track. The full track is rejected if there are too many inconsistent observations.
More...
|
| TrackCheckShip (ioda::ObsSpace &obsdb, const Parameters_ ¶meters, std::shared_ptr< ioda::ObsDataVector< int > > flags, std::shared_ptr< ioda::ObsDataVector< float > > obserr) |
|
| ~TrackCheckShip () override |
|
const TrackCheckShipDiagnostics * | diagnostics () const |
|
| FilterBase (ioda::ObsSpace &, const FilterParametersBaseWithAbstractAction ¶meters, 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 () |
|
| 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 |
|
|
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 |
|
void | calculateTrackSegmentProperties (const std::vector< std::reference_wrapper< TrackObservation >> &trackObservations, CalculationMethod calculationMethod=MAINLOOP) const |
|
std::vector< TrackObservation > | collectTrackObservations (std::vector< size_t >::const_iterator trackObsIndicesBegin, std::vector< size_t >::const_iterator trackObsIndicesEnd, const std::vector< size_t > &validObsIds, const TrackCheckUtils::ObsGroupLocationTimes &obsLoc) const |
|
bool | earlyBreak (const std::vector< std::reference_wrapper< TrackObservation >> &trackObs, const std::string trackId) const |
|
void | removeFaultyObservation (std::vector< std::reference_wrapper< TrackObservation > > &track, const std::vector< std::reference_wrapper< TrackObservation > >::iterator &it, bool firstIterativeRemoval, const std::string trackId) const |
| Chooses which of the observations surrounding the speediest segment to remove, flagging it accordingly. More...
|
|
Checks tracks of ships and buoys, rejecting observations whose locations and timestamps make them inconsistent with the rest of the track. The full track is rejected if there are too many inconsistent observations.
Each track is checked separately. The algorithm will first calculate speeds and distances between every two adjacent and alternating observations, and angles between any three adjacent observations. Based on these values, it will increment a set of "error counters" that reflect how many errors exist within the track. If the "early break check" parameter is set to true and the "error counters" sum up to a value greater than or equal to half of the segments, the filter will ignore the current track and move on to the next one. Otherwise, observations will be iteratively removed based on the location of the fastest segment until all segments between observations are slower than the speed set by the "max speed" parameter (or 80% of it if angles between segments are large).
See TrackCheckShipsParameters for the documentation of this filter's parameters.
Definition at line 62 of file src/ufo/filters/TrackCheckShip.h.
void ufo::TrackCheckShip::applyFilter |
( |
const std::vector< bool > & |
apply, |
|
|
const Variables & |
filtervars, |
|
|
std::vector< std::vector< bool >> & |
flagged |
|
) |
| const |
|
overrideprivatevirtual |
The filter begins with separating observations into tracks based on Station_Id
. Various calculations are then performed between consecutive observations: distances/speeds between observation pairs, and angles between the displacement vectors formed by triplets of consecutive observations. Track-specific counters are incremented for various metrics that indicate an unexpected track path.
Based on these counter values, the filter may ignore the current track and move on to the next one. Using the described calculations and additional ones if necessary, the observation directly before and/or after the fastest segment is chosen for rejection. This will continue until all remaining segments that link accepted observations are either:
- slower than a user-defined "max speed (m/s)" where the angles between the fastest accepted segment's displacement vector and its two neighbouring segments' displacement vectors are both less than 90 degrees.
- slower than 80 percent of this user-defined speed.
The full track will be rejected if the number of observations removed is more than the user-defined "rejection threshold".
Implements ufo::FilterBase.
Definition at line 155 of file TrackCheckShip.cc.
bool ufo::TrackCheckShip::earlyBreak |
( |
const std::vector< std::reference_wrapper< TrackObservation >> & |
trackObs, |
|
|
const std::string |
trackId |
|
) |
| const |
|
private |
- Returns
- true if at least half of the track segments have incremented the relevant rejection counters
This filter is best for mostly-accurate observation tracks. If the track has many "errors" (as indicated by the counters that are incremented before any observations are removed), it will stop early by default.
Sometimes caused by two ships with same callsign or various reports with wrong time, the check gives up. This is particularly a problem with WOD01 data - case studies suggest that most suspect data is reasonable.
Definition at line 265 of file TrackCheckShip.cc.