Parallel Analog Ensemble
Public Member Functions | Protected Attributes | Friends | List of all members
Forecasts Class Referenceabstract

Forecasts is an abstract class that extends BasicData and the abstract class Array4D. It defines the interface of how to interact with the underlying data storage through the abstract class Array4D. This interface is accepted by the Analog Ensemble algorithm. More...

#include <Forecasts.h>

Inheritance diagram for Forecasts:
Array4D BasicData ForecastsPointer

Public Member Functions

 Forecasts ()
 
 Forecasts (Forecasts const &orig)
 
 Forecasts (const Parameters &, const Stations &, const Times &, const Times &)
 
virtual ~Forecasts ()
 
virtual void setDimensions (const Parameters &parameters, const Stations &stations, const Times &times, const Times &flts)=0
 
virtual void windTransform (const std::string &name_u, const std::string &name_v, const std::string &name_spd, const std::string &name_dir)=0
 
virtual void subset (Forecasts &forecasts_subset) const =0
 
virtual void subset (const Parameters &, const Stations &, const Times &, const Times &, Forecasts &) const =0
 
Times const & getFLTs () const
 
TimesgetFLTs ()
 
std::size_t getFltTimeStamp (std::size_t index) const
 
std::size_t getFltTimeIndex (std::size_t timestamp) const
 
std::size_t getFltTimeIndex (const Time &) const
 
const GridgetGrid () const
 
void setGrid (const std::string &grid_file, Verbose verbose=Verbose::Warning)
 
Forecastsoperator= (const Forecasts &)
 
virtual void print (std::ostream &) const
 
- Public Member Functions inherited from Array4D
 Array4D ()=default
 
 Array4D (const Array4D &orig)=default
 
virtual ~Array4D ()=default
 
virtual const std::size_t * shape () const =0
 
virtual std::size_t num_elements () const =0
 
virtual const double * getValuesPtr () const =0
 
virtual double * getValuesPtr ()=0
 
virtual void resize (std::size_t, std::size_t, std::size_t, std::size_t)=0
 
virtual void resize (const Array4D &)=0
 
virtual void initialize (double)=0
 
virtual double getValue (std::size_t, std::size_t, std::size_t, std::size_t) const =0
 
virtual void setValue (double val, std::size_t, std::size_t, std::size_t, std::size_t)=0
 
virtual void subset (const std::vector< std::size_t > &, const std::vector< std::size_t > &, const std::vector< std::size_t > &, const std::vector< std::size_t > &, Array4D &) const =0
 
- Public Member Functions inherited from BasicData
 BasicData ()
 
 BasicData (const Parameters &, const Stations &, const Times &)
 
 BasicData (const BasicData &orig)
 
virtual ~BasicData ()
 
void setMembers (const Parameters &, const Stations &, const Times &)
 
const ParametersgetParameters () const
 
const StationsgetStations () const
 
const TimesgetTimes () const
 
ParametersgetParameters ()
 
StationsgetStations ()
 
TimesgetTimes ()
 
std::size_t getTimeStamp (std::size_t index) const
 
std::size_t getTimeIndex (std::size_t timestamp) const
 
std::size_t getTimeIndex (const Time &) const
 
BasicDataoperator= (const BasicData &)
 

Protected Attributes

Times flts_
 
Grid grid_
 
- Protected Attributes inherited from BasicData
Parameters parameters_
 
Stations stations_
 
Times times_
 

Friends

std::ostream & operator<< (std::ostream &, Forecasts const &)
 

Detailed Description

Forecasts is an abstract class that extends BasicData and the abstract class Array4D. It defines the interface of how to interact with the underlying data storage through the abstract class Array4D. This interface is accepted by the Analog Ensemble algorithm.

Constructor & Destructor Documentation

◆ Forecasts() [1/3]

Forecasts::Forecasts ( )

◆ Forecasts() [2/3]

Forecasts::Forecasts ( Forecasts const &  orig)

◆ Forecasts() [3/3]

Forecasts::Forecasts ( const Parameters parameters,
const Stations stations,
const Times times,
const Times flts 
)

◆ ~Forecasts()

Forecasts::~Forecasts ( )
virtual

Member Function Documentation

◆ getFLTs() [1/2]

Times & Forecasts::getFLTs ( )

◆ getFLTs() [2/2]

Times const & Forecasts::getFLTs ( ) const

◆ getFltTimeIndex() [1/2]

size_t Forecasts::getFltTimeIndex ( const Time time) const

◆ getFltTimeIndex() [2/2]

std::size_t Forecasts::getFltTimeIndex ( std::size_t  timestamp) const

◆ getFltTimeStamp()

size_t Forecasts::getFltTimeStamp ( std::size_t  index) const

◆ getGrid()

const Grid & Forecasts::getGrid ( ) const

◆ operator=()

Forecasts & Forecasts::operator= ( const Forecasts rhs)

◆ print()

void Forecasts::print ( std::ostream &  ) const
virtual

Implements Array4D.

Reimplemented in ForecastsPointer.

◆ setDimensions()

virtual void Forecasts::setDimensions ( const Parameters parameters,
const Stations stations,
const Times times,
const Times flts 
)
pure virtual

Sets the dimensions of forecasts and allocates memory for data values.

Parameters
parametersThe Parameters container.
stationsThe Stations container.
timesThe Times container.
fltsThe FLTs container.

Implemented in ForecastsPointer.

◆ setGrid()

void Forecasts::setGrid ( const std::string &  grid_file,
Verbose  verbose = Verbose::Warning 
)

◆ subset() [1/2]

virtual void Forecasts::subset ( const Parameters ,
const Stations ,
const Times ,
const Times ,
Forecasts  
) const
pure virtual

Implemented in ForecastsPointer.

◆ subset() [2/2]

virtual void Forecasts::subset ( Forecasts forecasts_subset) const
pure virtual

Implemented in ForecastsPointer.

◆ windTransform()

virtual void Forecasts::windTransform ( const std::string &  name_u,
const std::string &  name_v,
const std::string &  name_spd,
const std::string &  name_dir 
)
pure virtual

In some forecast model output, wind components U and V are available, but not wind speed and direction. This function is used to calculate wind speed and direction from U and V components.

Note that U will be replaced by wind speed and V will be replaced by wind direction.

Parameters
name_uParameter name for U component of wind
name_vParameter name for V component of wind
name_spdParameter name for wind speed
name_dirParameter name for wind direction

Implemented in ForecastsPointer.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  ,
Forecasts const &   
)
friend

Member Data Documentation

◆ flts_

Times Forecasts::flts_
protected

◆ grid_

Grid Forecasts::grid_
protected

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