UFO
|
Checks tracks of ships and buoys, rejecting observations whose locations and timestamps make them inconsistent with the rest of the track. More...
#include <TrackCheckShip.h>
Classes | |
struct | ObservationStatistics |
Relevant calculated values that are specific to each pair or triplet of adjacent/alternating observations. More... | |
class | TrackObservation |
struct | TrackStatistics |
A container for all track-wise counters and calculations that indicate the overall quality of the tracks' data. More... | |
Public Member Functions | |
TrackCheckShip (ioda::ObsSpace &obsdb, const eckit::Configuration &config, std::shared_ptr< ioda::ObsDataVector< int > > flags, std::shared_ptr< ioda::ObsDataVector< float > > obserr) | |
~TrackCheckShip () override | |
const TrackCheckShipDiagnostics * | diagnostics () const |
![]() | |
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 () |
static double | distance (const TrackObservation &a, const TrackObservation &b) |
Extends distance for TrackObservation inputs a and b . More... | |
static double | speedEstimate (const TrackCheckShip::TrackObservation &obs1, const TrackCheckShip::TrackObservation &obs2, const TrackCheckShipParameters &options) |
Estimate of speed as calculated in Ops_CheckShipTrack. More... | |
static float | angle (const TrackCheckShip::TrackObservation &a, const TrackCheckShip::TrackObservation &b, const TrackCheckShip::TrackObservation &c) |
Returns the angle in degrees (rounded to the nearest .1 degree) formed by the track segment going from observation a to b to c . More... | |
Private Types | |
enum | CalculationMethod { FIRSTITERATION, SIMULTANEOUSDEFERRAL, MAINLOOP } |
Private Member Functions | |
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 |
std::vector< std::reference_wrapper< TrackObservation > > | removeSimultaneousObservations (const std::vector< std::reference_wrapper< TrackObservation >> &trackObs) const |
Filters out all observations that have been marked simultaneous for rechecking at the end. More... | |
bool | earlyBreak (const std::vector< std::reference_wrapper< TrackObservation >> &trackObs) const |
void | removeFaultyObservation (std::vector< std::reference_wrapper< TrackObservation > > &track, const std::vector< std::reference_wrapper< TrackObservation > >::iterator &it, bool firstIterativeRemoval=false) const |
Chooses which of the observations surrounding the speediest segment to remove, flagging it accordingly. More... | |
Private Attributes | |
std::unique_ptr< TrackCheckShipParameters > | options_ |
std::unique_ptr< TrackCheckShipDiagnostics > | diagnostics_ |
Additional Inherited Members | |
![]() | |
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_ |
Checks tracks of ships and buoys, rejecting observations whose locations and timestamps make them inconsistent with the rest of the track.
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. By default, if the "error counters" sum up to a value greater than or equal to half of the segments, the filter will be stopped.
See TrackCheckShipsParameters for the documentation of this filter's parameters.
Definition at line 58 of file src/ufo/filters/TrackCheckShip.h.
|
private |
Enumerator | |
---|---|
FIRSTITERATION | |
SIMULTANEOUSDEFERRAL | |
MAINLOOP |
Definition at line 214 of file src/ufo/filters/TrackCheckShip.h.
ufo::TrackCheckShip::TrackCheckShip | ( | ioda::ObsSpace & | obsdb, |
const eckit::Configuration & | config, | ||
std::shared_ptr< ioda::ObsDataVector< int > > | flags, | ||
std::shared_ptr< ioda::ObsDataVector< float > > | obserr | ||
) |
Definition at line 36 of file TrackCheckShip.cc.
|
override |
Definition at line 111 of file TrackCheckShip.cc.
|
static |
Returns the angle in degrees (rounded to the nearest .1 degree) formed by the track segment going from observation a
to b
to c
.
Definition at line 73 of file TrackCheckShip.cc.
|
overrideprivatevirtual |
Station_Id
, calculating distances, speeds, and angles between observations, and incrementing track-specific counters should the calculations produce unexpected values. Based on the counter values, the filter may be stopped early. Simultaneous observations are then optionally ignored for later re-inclusion or rejection. Using the above calculations and additional ones if necessary, the observation directly before and/or after the fastest segment is chosen for rejection. Re-checking of simultaneous observations is not yet implemented. Implements ufo::FilterBase.
Definition at line 151 of file TrackCheckShip.cc.
|
private |
This performs all of the necessary calculations based on the observations' locations and timestamps by calling calculateTwoObservationValues
and calculateThreeObservationValues
for the non-edge-case observations.
Definition at line 567 of file TrackCheckShip.cc.
|
inlinestatic |
Definition at line 61 of file src/ufo/filters/TrackCheckShip.h.
|
private |
vector
of TrackObservations
that all hold a shared_ptr
to an instance of TrackStatistics
, which holds all of the track-specific counters. Definition at line 217 of file TrackCheckShip.cc.
const TrackCheckShipDiagnostics * ufo::TrackCheckShip::diagnostics | ( | ) | const |
|
inlinestatic |
Extends distance
for TrackObservation
inputs a
and b
.
Definition at line 184 of file src/ufo/filters/TrackCheckShip.h.
|
private |
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.
Definition at line 246 of file TrackCheckShip.cc.
|
private |
Detects whether each observation in a track has been rejected, and marks the corresponding space in isRejected
as true if so.
trackObsIndicesBegin | the begin iterator of the track |
trackObsIndicesEnd | the end iterator |
validObsIds | the vector marking all of the observations' global positions |
trackObservations | the full vector of observations within the single track |
isRejected | the boolean vector whose indices correspond to all of the rejected observations in the full input dataset |
Definition at line 124 of file TrackCheckShip.cc.
|
overrideprivatevirtual |
Implements ufo::FilterBase.
Definition at line 137 of file TrackCheckShip.cc.
|
inlineoverrideprivatevirtual |
Implements ufo::FilterBase.
Definition at line 212 of file src/ufo/filters/TrackCheckShip.h.
|
private |
Chooses which of the observations surrounding the speediest segment to remove, flagging it accordingly.
Definition at line 288 of file TrackCheckShip.cc.
|
private |
Filters out all observations that have been marked simultaneous for rechecking at the end.
Definition at line 276 of file TrackCheckShip.cc.
|
static |
Estimate of speed as calculated in Ops_CheckShipTrack.
Speed is calculated between obs1
and obs2
, accounting for spatial/temporal uncertainty using the resolution values stored in options
.
Definition at line 53 of file TrackCheckShip.cc.
|
private |
Definition at line 200 of file src/ufo/filters/TrackCheckShip.h.
|
private |
Definition at line 199 of file src/ufo/filters/TrackCheckShip.h.