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

AnEnReadGribMPI provides the functionality to read the Grib2 format in parallel with MPI. More...

#include <AnEnReadGribMPI.h>

Inheritance diagram for AnEnReadGribMPI:
AnEnReadGrib

Public Member Functions

 AnEnReadGribMPI ()
 
 AnEnReadGribMPI (const AnEnReadGribMPI &orig)
 
 AnEnReadGribMPI (Verbose master_verbose)
 
 AnEnReadGribMPI (Verbose master_verbose, Verbose worker_verbose)
 
virtual ~AnEnReadGribMPI ()
 
void readForecasts (Forecasts &forecasts, const std::vector< ParameterGrib > &grib_parameters, const std::vector< std::string > &files, const std::string &regex_str, unsigned long unit_in_seconds=3600, bool delimited=false, std::vector< int > stations_index={}) const
 
- Public Member Functions inherited from AnEnReadGrib
 AnEnReadGrib ()
 
 AnEnReadGrib (const AnEnReadGrib &orig)
 
 AnEnReadGrib (Verbose verbose)
 
virtual ~AnEnReadGrib ()
 
void readForecasts (Forecasts &forecasts, const std::vector< ParameterGrib > &grib_parameters, const std::vector< std::string > &files, const std::string &regex_str, size_t unit_in_seconds=3600, bool delimited=false, std::vector< int > stations_index={}) const
 

Private Attributes

Verbose worker_verbose_
 

Additional Inherited Members

- Protected Member Functions inherited from AnEnReadGrib
void readForecastsMeta_ (Forecasts &forecasts, const std::vector< ParameterGrib > &grib_parameters, const std::vector< std::string > &files, const std::string &regex_str, size_t unit_in_seconds, bool delimited, std::vector< int > stations_index) const
 
void readStations_ (Stations &, const std::string &, const std::vector< int > &stations_index={}) const
 
- Protected Attributes inherited from AnEnReadGrib
Verbose verbose_
 

Detailed Description

AnEnReadGribMPI provides the functionality to read the Grib2 format in parallel with MPI.

Constructor & Destructor Documentation

◆ AnEnReadGribMPI() [1/4]

AnEnReadGribMPI::AnEnReadGribMPI ( )

◆ AnEnReadGribMPI() [2/4]

AnEnReadGribMPI::AnEnReadGribMPI ( const AnEnReadGribMPI orig)

◆ AnEnReadGribMPI() [3/4]

AnEnReadGribMPI::AnEnReadGribMPI ( Verbose  master_verbose)

◆ AnEnReadGribMPI() [4/4]

AnEnReadGribMPI::AnEnReadGribMPI ( Verbose  master_verbose,
Verbose  worker_verbose 
)

◆ ~AnEnReadGribMPI()

AnEnReadGribMPI::~AnEnReadGribMPI ( )
virtual

Member Function Documentation

◆ readForecasts()

void AnEnReadGribMPI::readForecasts ( Forecasts forecasts,
const std::vector< ParameterGrib > &  grib_parameters,
const std::vector< std::string > &  files,
const std::string &  regex_str,
unsigned long  unit_in_seconds = 3600,
bool  delimited = false,
std::vector< int >  stations_index = {} 
) const

Read grib files in parallel. This function has the same signature as AnEnReadGrib::readForecasts.

Please note that, it is assumed that the executable is launched with MPI launcher program, e.g. mpirun or mpiexec, with multiple processes. This function assign different tasks to different processes based on the process ID, but this function DOES NOT terminate any process. The developer is responsible to terminate any processes in the main function.

Parameters
forecastsForecasts
grib_parametersParameters to read
filesFiles to read
regex_strRegular expression to extract day, cycle, and flt information
unit_in_secondsThe number of seconds associated with the unit of flt and cycle
delimitedWhether the day string to be extracted are delimited
stations_indexStations index to read

Member Data Documentation

◆ worker_verbose_

Verbose AnEnReadGribMPI::worker_verbose_
private

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