UFO
ufo::PoissonDiskThinningParameters Class Reference

Options controlling the operation of the PoissonDiskThinning filter. More...

#include <PoissonDiskThinningParameters.h>

Inheritance diagram for ufo::PoissonDiskThinningParameters:
Collaboration diagram for ufo::PoissonDiskThinningParameters:

Public Types

typedef int Priority
 

Public Attributes

oops::OptionalParameter< util::ScalarOrMap< Priority, float > > minHorizontalSpacing
 
oops::OptionalParameter< util::ScalarOrMap< Priority, float > > minVerticalSpacing
 
oops::OptionalParameter< util::ScalarOrMap< Priority, util::Duration > > minTimeSpacing
 
oops::Parameter< ExclusionVolumeShapeexclusionVolumeShape
 
oops::OptionalParameter< VariablecategoryVariable {"category_variable", this}
 
oops::OptionalParameter< VariablepriorityVariable {"priority_variable", this}
 
oops::Parameter< bool > shuffle {"shuffle", true, this}
 
oops::OptionalParameter< int > randomSeed {"random_seed", this}
 
- Public Attributes inherited from ufo::FilterParametersBaseWithAbstractAction
oops::OptionalParameter< std::vector< Variable > > filterVariables
 
oops::Parameter< std::vector< WhereParameters > > where {"where", {}, this}
 
oops::Parameter< bool > deferToPost {"defer to post", false, this}
 

Additional Inherited Members

- Public Member Functions inherited from ufo::FilterParametersBase
const FilterActionParametersBaseaction () const override
 Return parameters defining the action performed on observations flagged by the filter. More...
 

Detailed Description

Options controlling the operation of the PoissonDiskThinning filter.

Note
The descriptions of several options refer to the exclusion volume, which is a domain surrounding the location of each observation. If an observation is retained, then no other observations lying in the interior of its exclusion volume may be retained at the same time.

Definition at line 60 of file PoissonDiskThinningParameters.h.

Member Typedef Documentation

◆ Priority

Member Data Documentation

◆ categoryVariable

oops::OptionalParameter<Variable> ufo::PoissonDiskThinningParameters::categoryVariable {"category_variable", this}

A string-valued or integer-valued variable. Observations with different values of that variable will be thinned separately.

If not set and observations were grouped into records when the observation space was constructed, observations from each record will be thinned separately. If not set and observations were not grouped into records, all observations will be thinned together.

Note: the variable used to group observations into records can be set with the obs space.obsdatain.obsgrouping.group variable YAML option.

Definition at line 140 of file PoissonDiskThinningParameters.h.

◆ exclusionVolumeShape

oops::Parameter<ExclusionVolumeShape> ufo::PoissonDiskThinningParameters::exclusionVolumeShape
Initial value:
{"exclusion_volume_shape",

Shape of the exclusion volume surrounding each observation.

Allowed values:

  • cylinder: the exclusion volume of an observation taken at latitude lat, longitude lon, pressure p and time t is the set of all locations (lat', lon', p', t') for which all of the following conditions are met:
    • the geodesic distance between (lat, lon) and (lat', lon') is smaller than min_horizontal_spacing
    • |p - p'| < min_vertical_spacing
    • |t - t'| < min_time_spacing.
  • ellipsoid: the exclusion volume of an observation taken at latitude lat, longitude lon, pressure p and time t is the set of all locations (lat', lon', p', t') for which the following condition is met:
    • geodesic_distance((lat, lon), (lat', lon'))^2 / min_horizontal_spacing^2 + (p - p')^2 / min_vertical_spacing^2 + (t - t')^2 / min_time_spacing^2 < 1.

Definition at line 126 of file PoissonDiskThinningParameters.h.

◆ minHorizontalSpacing

oops::OptionalParameter<util::ScalarOrMap<Priority, float> > ufo::PoissonDiskThinningParameters::minHorizontalSpacing
Initial value:
{
"min_horizontal_spacing", this}

Size of the exclusion volume in the horizontal direction (in km).

If the priority_variable parameter is not set and hence all observations have the same priority, this parameter must be a floating-point constant. Otherwise it may also be a map assigning an exclusion volume size to each observation priority. Exclusion volumes of lower-priority observations must be at least as large as those of higher-priority ones. If this parameter is not set, horizontal position is ignored during thinning.

Note
Owing to a bug in the eckit YAML parser, maps need to be written in the JSON style, with keys quoted. Example:

min_horizontal_spacing: {"1": 123, "2": 321}

This will not work:

min_horizontal_spacing: {1: 123, 2: 321}

and neither will this:

min_horizontal_spacing: 1: 123 2: 321

or this:

min_horizontal_spacing: "1": 123 "2": 321

Definition at line 96 of file PoissonDiskThinningParameters.h.

◆ minTimeSpacing

oops::OptionalParameter<util::ScalarOrMap<Priority, util::Duration> > ufo::PoissonDiskThinningParameters::minTimeSpacing
Initial value:
{
"min_time_spacing", this}

Size of the exclusion volume in the temporal direction.

Like min_horizontal_spacing, this can be either a constant or a map.

Definition at line 108 of file PoissonDiskThinningParameters.h.

◆ minVerticalSpacing

oops::OptionalParameter<util::ScalarOrMap<Priority, float> > ufo::PoissonDiskThinningParameters::minVerticalSpacing
Initial value:
{
"min_vertical_spacing", this}

Size of the exclusion volume in the vertical direction (in Pa).

Like min_horizontal_spacing, this can be either a constant or a map.

Definition at line 102 of file PoissonDiskThinningParameters.h.

◆ priorityVariable

oops::OptionalParameter<Variable> ufo::PoissonDiskThinningParameters::priorityVariable {"priority_variable", this}

Variable storing observation priorities. An observation will not be retained if it lies within the exclusion volume of an observation with a higher priority.

As noted in the documentation of min_horizontal_spacing, the exclusion volume size must be a (weakly) monotonically decreasing function of observation priority, i.e. the exclusion volumes of all observations with the same priority must have the same size, and the exclusion volumes of lower-priority observations must be at least as large as those of higher-priority ones.

If this parameter is not set, all observations are assumed to have equal priority.

Definition at line 153 of file PoissonDiskThinningParameters.h.

◆ randomSeed

oops::OptionalParameter<int> ufo::PoissonDiskThinningParameters::randomSeed {"random_seed", this}

Seed with which to initialize the random number generator used to shuffle the observations if shuffle is set to true.

If omitted, a seed will be generated based on the current (calendar) time.

Definition at line 168 of file PoissonDiskThinningParameters.h.

◆ shuffle

oops::Parameter<bool> ufo::PoissonDiskThinningParameters::shuffle {"shuffle", true, this}

If true, observations will be randomly shuffled before being inspected as candidates for retaining.

Note
It is recommended to leave shuffling enabled in production code, since the performance of the spatial point index (kd-tree) used in the filter's implementation may be degraded if observation locations are ordered largely monotonically (and random shuffling essentially prevents that from happening).

Definition at line 162 of file PoissonDiskThinningParameters.h.


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