UFO
ufo::ProfileIndices Class Reference

Determine indices of observations making up individual profiles. The indices are computed with respect to the entire sample of observations. Used to extract relevant data and flags from the entire sample. More...

#include <ProfileIndices.h>

Collaboration diagram for ufo::ProfileIndices:

Public Member Functions

 ProfileIndices (ioda::ObsSpace &obsdb, const DataHandlerParameters &options, const std::vector< bool > &apply)
 
void updateNextProfileIndices ()
 Determine indices in entire sample for the next profile. More...
 
const std::vector< size_t > & getProfileIndices () const
 Return indices for the current profile. More...
 
int getNumProfileLevels () const
 Return number of levels to which QC checks should be applied. More...
 
size_t getProfileNumCurrent () const
 Get number of current profile, accounting for distribution across processors. More...
 
void reset ()
 Reset profile indices to point to the beginning of the sample. More...
 

Private Types

typedef std::map< std::size_t, std::vector< std::size_t > > ProfIdxMap
 Profile index map. More...
 
typedef ProfIdxMap::const_iterator ProfIdxIter
 Profile index map iterator. More...
 

Private Member Functions

void validateTotalNumProf ()
 Ensure number of profiles is consistent with quantity reported by obsdb. More...
 

Private Attributes

ioda::ObsSpace & obsdb_
 Observation database. More...
 
const DataHandlerParametersoptions_
 Configurable parameters. More...
 
const std::vector< bool > & apply_
 Observations to apply the filter to. More...
 
const std::vector< size_t > profileNums_
 Profile numbers for the entire sample. More...
 
std::set< size_t > uniqueProfileNums_
 Unique profile numbers for the entire sample. More...
 
ProfIdxMap profidx_
 Iterator over profile indices (used for sorting). More...
 
ProfIdxIter profidx_current_
 Iterator pointing to current profile index (initially points to beginning). More...
 
std::vector< size_t > profileIndices_
 Indices for this profile. More...
 
int numProfileLevels_
 Number of profile levels to which QC checks should be applied. More...
 
size_t profileNumCurrent_
 Current profile number in the sample. More...
 
size_t profileNumToFind_
 Next profile number to find in the sample. More...
 
size_t profIndex_
 

Detailed Description

Determine indices of observations making up individual profiles. The indices are computed with respect to the entire sample of observations. Used to extract relevant data and flags from the entire sample.

It is important to distinguish between:

  1. profile indices, which indicate the position of the profile's observations in the entire sample of observations,
  2. profile numbers, which are assigned to entire profiles and only change when a new profile is reached.

Definition at line 40 of file ProfileIndices.h.

Member Typedef Documentation

◆ ProfIdxIter

typedef ProfIdxMap::const_iterator ufo::ProfileIndices::ProfIdxIter
private

Profile index map iterator.

Definition at line 85 of file ProfileIndices.h.

◆ ProfIdxMap

typedef std::map<std::size_t, std::vector<std::size_t> > ufo::ProfileIndices::ProfIdxMap
private

Profile index map.

Definition at line 82 of file ProfileIndices.h.

Constructor & Destructor Documentation

◆ ProfileIndices()

ufo::ProfileIndices::ProfileIndices ( ioda::ObsSpace &  obsdb,
const DataHandlerParameters options,
const std::vector< bool > &  apply 
)

Definition at line 14 of file ProfileIndices.cc.

Here is the call graph for this function:

Member Function Documentation

◆ getNumProfileLevels()

int ufo::ProfileIndices::getNumProfileLevels ( ) const
inline

Return number of levels to which QC checks should be applied.

Definition at line 53 of file ProfileIndices.h.

◆ getProfileIndices()

const std::vector<size_t>& ufo::ProfileIndices::getProfileIndices ( ) const
inline

Return indices for the current profile.

Definition at line 50 of file ProfileIndices.h.

◆ getProfileNumCurrent()

size_t ufo::ProfileIndices::getProfileNumCurrent ( ) const

Get number of current profile, accounting for distribution across processors.

Definition at line 125 of file ProfileIndices.cc.

Here is the call graph for this function:

◆ reset()

void ufo::ProfileIndices::reset ( )

Reset profile indices to point to the beginning of the sample.

Definition at line 38 of file ProfileIndices.cc.

Here is the caller graph for this function:

◆ updateNextProfileIndices()

void ufo::ProfileIndices::updateNextProfileIndices ( )

Determine indices in entire sample for the next profile.

Definition at line 55 of file ProfileIndices.cc.

◆ validateTotalNumProf()

void ufo::ProfileIndices::validateTotalNumProf ( )
private

Ensure number of profiles is consistent with quantity reported by obsdb.

Definition at line 131 of file ProfileIndices.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ apply_

const std::vector<bool>& ufo::ProfileIndices::apply_
private

Observations to apply the filter to.

Definition at line 73 of file ProfileIndices.h.

◆ numProfileLevels_

int ufo::ProfileIndices::numProfileLevels_
private

Number of profile levels to which QC checks should be applied.

Definition at line 97 of file ProfileIndices.h.

◆ obsdb_

ioda::ObsSpace& ufo::ProfileIndices::obsdb_
private

Observation database.

Definition at line 67 of file ProfileIndices.h.

◆ options_

const DataHandlerParameters& ufo::ProfileIndices::options_
private

Configurable parameters.

Definition at line 70 of file ProfileIndices.h.

◆ profidx_

ProfIdxMap ufo::ProfileIndices::profidx_
private

Iterator over profile indices (used for sorting).

Definition at line 88 of file ProfileIndices.h.

◆ profidx_current_

ProfIdxIter ufo::ProfileIndices::profidx_current_
private

Iterator pointing to current profile index (initially points to beginning).

Definition at line 91 of file ProfileIndices.h.

◆ profileIndices_

std::vector<size_t> ufo::ProfileIndices::profileIndices_
private

Indices for this profile.

Definition at line 94 of file ProfileIndices.h.

◆ profileNumCurrent_

size_t ufo::ProfileIndices::profileNumCurrent_
private

Current profile number in the sample.

Definition at line 100 of file ProfileIndices.h.

◆ profileNums_

const std::vector<size_t> ufo::ProfileIndices::profileNums_
private

Profile numbers for the entire sample.

Definition at line 76 of file ProfileIndices.h.

◆ profileNumToFind_

size_t ufo::ProfileIndices::profileNumToFind_
private

Next profile number to find in the sample.

Definition at line 103 of file ProfileIndices.h.

◆ profIndex_

size_t ufo::ProfileIndices::profIndex_
private

Definition at line 106 of file ProfileIndices.h.

◆ uniqueProfileNums_

std::set<size_t> ufo::ProfileIndices::uniqueProfileNums_
private

Unique profile numbers for the entire sample.

Definition at line 79 of file ProfileIndices.h.


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