UFO
ufo::Locations Class Reference

Locations class to handle simple lat-lon-time locations. More...

#include <Locations.h>

Inheritance diagram for ufo::Locations:
Collaboration diagram for ufo::Locations:

Public Member Functions

 Locations (const std::vector< float > &lons, const std::vector< float > &lats, const std::vector< util::DateTime > &times, std::shared_ptr< const ioda::Distribution >)
 constructor from passed lons, lats, times More...
 
 Locations (const eckit::Configuration &, const eckit::mpi::Comm &)
 constructor used in oops tests More...
 
Locationsoperator+= (const Locations &)
 append locations with more locations More...
 
std::vector< bool > isInTimeWindow (const util::DateTime &t1, const util::DateTime &t2) const
 find which observations are in the (t1, t2] time window More...
 
size_t size () const
 size of locations More...
 
const std::shared_ptr< const ioda::Distribution > & distribution () const
 accessor to the observations MPI distribution More...
 
const std::vector< float > & lons () const
 accessor to observation longitudes (on current MPI task) More...
 
const std::vector< float > & lats () const
 accessor to observation latitudes (on current MPI task) More...
 
const std::vector< util::DateTime > & times () const
 accessor to DateTimes (on current MPI task) More...
 

Static Public Member Functions

static const std::string classname ()
 

Private Member Functions

void print (std::ostream &os) const override
 

Private Attributes

std::shared_ptr< const ioda::Distribution > dist_
 
std::vector< float > lons_
 observations MPI distribution More...
 
std::vector< float > lats_
 longitudes on current MPI task More...
 
std::vector< util::DateTime > times_
 latitudes on current MPI task More...
 

Detailed Description

Locations class to handle simple lat-lon-time locations.

Definition at line 29 of file src/ufo/Locations.h.

Constructor & Destructor Documentation

◆ Locations() [1/2]

ufo::Locations::Locations ( const std::vector< float > &  lons,
const std::vector< float > &  lats,
const std::vector< util::DateTime > &  times,
std::shared_ptr< const ioda::Distribution >  dist 
)

constructor from passed lons, lats, times

Definition at line 26 of file Locations.cc.

◆ Locations() [2/2]

ufo::Locations::Locations ( const eckit::Configuration &  conf,
const eckit::mpi::Comm &  comm 
)

constructor used in oops tests

UFO Locations Constructor with Configuration.

This constructor can be used to generate user-specified and/or random locations for use with interpolation or other tests

To generate random locations, the relevant parameters specified in StateTest.Locations section of the config file are:

  • lats user-specified latitudes (degrees)
  • lons user-specified longitudes (degrees)
  • Nrandom number of random locations desired
  • random_seed (optional) random seed for reproducibility of results
Date
May, 2018 Created (M. Miesch, JCSDA)
See also
ufo::ufo_locs_create() ufo::ufo_loc_test() test::testStateInterpolation()

Definition at line 55 of file Locations.cc.

Here is the call graph for this function:

Member Function Documentation

◆ classname()

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

Definition at line 32 of file src/ufo/Locations.h.

◆ distribution()

const std::shared_ptr<const ioda::Distribution>& ufo::Locations::distribution ( ) const
inline

accessor to the observations MPI distribution

Definition at line 51 of file src/ufo/Locations.h.

◆ isInTimeWindow()

std::vector< bool > ufo::Locations::isInTimeWindow ( const util::DateTime &  t1,
const util::DateTime &  t2 
) const

find which observations are in the (t1, t2] time window

Definition at line 85 of file Locations.cc.

Here is the caller graph for this function:

◆ lats()

const std::vector<float>& ufo::Locations::lats ( ) const
inline

accessor to observation latitudes (on current MPI task)

Definition at line 55 of file src/ufo/Locations.h.

Here is the caller graph for this function:

◆ lons()

const std::vector<float>& ufo::Locations::lons ( ) const
inline

accessor to observation longitudes (on current MPI task)

Definition at line 53 of file src/ufo/Locations.h.

Here is the caller graph for this function:

◆ operator+=()

Locations & ufo::Locations::operator+= ( const Locations other)

append locations with more locations

Definition at line 77 of file Locations.cc.

◆ print()

void ufo::Locations::print ( std::ostream &  os) const
overrideprivate

Definition at line 102 of file Locations.cc.

Here is the call graph for this function:

◆ size()

size_t ufo::Locations::size ( ) const

size of locations

Definition at line 96 of file Locations.cc.

Here is the caller graph for this function:

◆ times()

const std::vector<util::DateTime>& ufo::Locations::times ( ) const
inline

accessor to DateTimes (on current MPI task)

Definition at line 57 of file src/ufo/Locations.h.

Member Data Documentation

◆ dist_

std::shared_ptr<const ioda::Distribution> ufo::Locations::dist_
private

Definition at line 63 of file src/ufo/Locations.h.

◆ lats_

std::vector<float> ufo::Locations::lats_
private

longitudes on current MPI task

Definition at line 65 of file src/ufo/Locations.h.

◆ lons_

std::vector<float> ufo::Locations::lons_
private

observations MPI distribution

Definition at line 64 of file src/ufo/Locations.h.

◆ times_

std::vector<util::DateTime> ufo::Locations::times_
private

latitudes on current MPI task

Definition at line 66 of file src/ufo/Locations.h.


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