Parallel Analog Ensemble
Public Member Functions | Private Member Functions | List of all members
AnEnISMPI Class Reference

AnEnISMPI provides the functionality to perform AnEnIS with MPI. More...

#include <AnEnISMPI.h>

Inheritance diagram for AnEnISMPI:
AnEnIS AnEn

Public Member Functions

 AnEnISMPI ()
 
 AnEnISMPI (const AnEnISMPI &orig)
 
 AnEnISMPI (const Config &)
 
virtual ~AnEnISMPI ()
 
virtual void compute (const Forecasts &forecasts, const Observations &observations, std::vector< std::size_t > &fcsts_test_index, std::vector< std::size_t > &fcsts_search_index) override
 
virtual void compute (const Forecasts &forecasts, const Observations &observations, const Times &test_times, const Times &search_times) override
 
virtual void compute (const Forecasts &forecasts, const Observations &observations, std::vector< std::size_t > &fcsts_test_index, std::vector< std::size_t > &fcsts_search_index) override
 
- Public Member Functions inherited from AnEnIS
 AnEnIS ()
 
 AnEnIS (const AnEnIS &orig)
 
 AnEnIS (const Config &)
 
virtual ~AnEnIS ()
 
virtual void print (std::ostream &) const override
 
AnEnISoperator= (const AnEnIS &rhs)
 
std::size_t num_analogs () const
 
std::size_t num_sims () const
 
std::size_t obs_var_index () const
 
std::size_t max_par_nan () const
 
std::size_t max_flt_nan () const
 
std::size_t flt_radius () const
 
bool save_analogs () const
 
bool save_analogs_time_index () const
 
bool save_sims () const
 
bool save_sims_time_index () const
 
bool operation () const
 
bool quick_sort () const
 
bool prevent_search_future () const
 
bool no_norm () const
 
const std::vector< double > & weights () const
 
const Array4DPointersds () const
 
const Array4DPointersims_metric () const
 
const Array4DPointersims_time_index () const
 
const Array4DPointeranalogs_value () const
 
const Array4DPointeranalogs_time_index () const
 
const Functions::Matrixobs_time_index_table () const
 
- Public Member Functions inherited from AnEn
 AnEn ()
 
 AnEn (const AnEn &orig)
 
 AnEn (const Config &)
 
virtual ~AnEn ()
 
virtual const ProfilergetProfile () const
 
AnEnoperator= (const AnEn &rhs)
 

Private Member Functions

void gather_ (int num_procs, int rank)
 
virtual void computeSds_ (const Forecasts &forecasts, const std::vector< std::size_t > &times_fixed_index, const std::vector< std::size_t > &times_accum_index={}) override
 

Additional Inherited Members

- Static Public Attributes inherited from AnEnIS
static const std::size_t _SIM_VALUE_INDEX = 0
 
static const std::size_t _SIM_FCST_TIME_INDEX = 1
 
static const std::size_t _SIM_OBS_TIME_INDEX = 2
 
static const std::array< double, 3 > _INIT_ARR_VALUE = {NAN, NAN, NAN}
 
- Protected Member Functions inherited from AnEnIS
virtual void preprocess_ (const Forecasts &forecasts, const Observations &observations, std::vector< std::size_t > &fcsts_test_index, std::vector< std::size_t > &fcsts_search_index)
 
virtual void allocateMemory_ (const Forecasts &forecasts, const std::vector< std::size_t > &fcsts_test_index, const std::vector< std::size_t > &fcsts_search_index)
 
virtual void setMembers_ (const Config &) override
 
virtual void setSdsTimeMap_ (const std::vector< std::size_t > &times_accum_index)
 
virtual double computeSimMetric_ (const Forecasts &forecasts, std::size_t sta_test_i, std::size_t sta_search_i, std::size_t flt_i, std::size_t time_test_i, std::size_t time_search_i, const std::vector< bool > &circulars)
 
virtual void allocateSds_ (const Forecasts &forecasts, const std::vector< std::size_t > &times_fixed_index, const std::vector< std::size_t > &times_accum_index={})
 
virtual void checkIndexRange_ (const Forecasts &forecasts, const std::vector< std::size_t > &fcsts_test_index, const std::vector< std::size_t > &fcsts_search_index) const
 
virtual void checkConsistency_ (const Forecasts &forecasts, const Observations &observations) const
 
virtual void checkSave_ () const
 
virtual void checkNumberOfMembers_ (std::size_t num_search_times_index)
 
template<std::size_t len>
void saveAnalogs_ (const SimsVec< len > &sims_arr, const Observations &observations, std::size_t station_i, std::size_t test_time_i, std::size_t flt_i)
 
template<std::size_t len>
void saveAnalogsTimeIndex_ (const SimsVec< len > &sims_arr, std::size_t station_i, std::size_t test_time_i, std::size_t flt_i)
 
template<std::size_t len>
void saveSims_ (const SimsVec< len > &sims_arr, std::size_t station_i, std::size_t test_time_i, std::size_t flt_i)
 
template<std::size_t len>
void saveSimsTimeIndex_ (const SimsVec< len > &sims_arr, std::size_t station_i, std::size_t test_time_i, std::size_t flt_i)
 
- Static Protected Member Functions inherited from AnEnIS
static bool _simsSort_ (const std::array< double, 3 > &, const std::array< double, 3 > &)
 
- Protected Attributes inherited from AnEnIS
std::size_t num_analogs_
 
std::size_t num_sims_
 
std::size_t obs_var_index_
 
std::size_t max_par_nan_
 
std::size_t max_flt_nan_
 
std::size_t flt_radius_
 
bool save_analogs_
 
bool save_analogs_time_index_
 
bool save_sims_
 
bool save_sims_time_index_
 
bool operation_
 
bool quick_sort_
 
bool prevent_search_future_
 
bool no_norm_
 
std::vector< double > weights_
 
Array4DPointer sds_
 
std::unordered_map< std::size_t, std::size_t > sds_time_index_map_
 
Array4DPointer sims_metric_
 
Array4DPointer sims_time_index_
 
Array4DPointer analogs_value_
 
Array4DPointer analogs_time_index_
 
Functions::Matrix obs_time_index_table_
 
bool use_AI_
 
- Protected Attributes inherited from AnEn
Verbose verbose_
 
Profiler profiler_
 

Detailed Description

AnEnISMPI provides the functionality to perform AnEnIS with MPI.

Constructor & Destructor Documentation

◆ AnEnISMPI() [1/3]

AnEnISMPI::AnEnISMPI ( )

◆ AnEnISMPI() [2/3]

AnEnISMPI::AnEnISMPI ( const AnEnISMPI orig)

◆ AnEnISMPI() [3/3]

AnEnISMPI::AnEnISMPI ( const Config config)

◆ ~AnEnISMPI()

AnEnISMPI::~AnEnISMPI ( )
virtual

Member Function Documentation

◆ compute() [1/3]

void AnEnIS::compute ( const Forecasts forecasts,
const Observations observations,
const Times test_times,
const Times search_times 
)
overridevirtual

Computes the analog ensembles.

Parameters
forecastsForecasts
observationsObservations
test_timesTimes for test
search_timesTimes for search

Reimplemented from AnEnIS.

◆ compute() [2/3]

virtual void AnEnIS::compute ( const Forecasts forecasts,
const Observations observations,
std::vector< std::size_t > &  fcsts_test_index,
std::vector< std::size_t > &  fcsts_search_index 
)
overridevirtual

Computes the analog ensembles.

Parameters
fcsts_test_indexA vector of forecast test indices
fcsts_search_indexA vector of forecast search indices

Reimplemented from AnEnIS.

◆ compute() [3/3]

void AnEnISMPI::compute ( const Forecasts forecasts,
const Observations observations,
std::vector< std::size_t > &  fcsts_test_index,
std::vector< std::size_t > &  fcsts_search_index 
)
overridevirtual

Overloads AnEnIS::compute with test and search indices

Reimplemented from AnEnIS.

◆ computeSds_()

void AnEnISMPI::computeSds_ ( const Forecasts forecasts,
const std::vector< std::size_t > &  times_fixed_index,
const std::vector< std::size_t > &  times_accum_index = {} 
)
overrideprivatevirtual

Overloads AnEnIS::computeSds_ so that master process does not compute any standard deviation. Only worker processes compute standard deviation.

Reimplemented from AnEnIS.

◆ gather_()

void AnEnISMPI::gather_ ( int  num_procs,
int  rank 
)
private

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