code::GRIBDataHandler Class Reference

Inheritance diagram for code::GRIBDataHandler:

code::DataHandler code::GRIBLDMDataHandler code::GRIBMultiDirDataHandler code::GRIBNetcdfDataHandler List of all members.

Public Member Functions

 GRIBDataHandler (const std::string &inputDirectory, const std::string &outputDirectory, const std::string &lbname, const std::string &nameP, bool compressedFlag=false, bool insameDir=false, bool keepFile=false, bool readAll=false)
virtual void createW2NetcdfFiles ()
void setDesiredProducts (const std::vector< std::string > &desired)
 Restrict the variables handled.
bool isDesired (const std::string &productName)
 Pass in the WDSS-II type name.
virtual ~GRIBDataHandler ()
virtual bool isNewFile (const std::string &file_name)
void addModifier (SmartPtr< DataModifier > m)
 By default, a DataHandler does not do anything to the LatLonGrid.
virtual bool modifyBeforeWrite (code::LatLonGrid &llgrid)

Static Public Member Functions

static void getSubDirs (const std::string &inputDir, std::vector< std::string > &subdirs)

Protected Member Functions

virtual void gribToNetcdf ()
void readLatLonLookupFile (const struct product_data *data)
void readLatLonLookupFile (size_t numRows, size_t numColumns)
void convertToNetcdf (const struct product_data *)
Location getNorthWestCorner (const struct product_data *)
Location getNorthWestCorner (size_t numRows, size_t numColumns)
Time getTime (const struct product_data *)
void getLatLonSpacing (const struct product_data *)
void getLatLonSpacing (size_t numRows, size_t numColumns)
std::string getDataType (const struct product_data *)
std::string getDataType (int, int)
std::string getUnit (const struct product_data *)
std::string getColorMapName (const struct product_data *)
std::string getColorMapName (int prodId, int levelId)
double getPrecisionPrefered (const struct product_data *)
double getPrecisionPrefered (int prodId, int levelId)
std::string getSubTypeForSelection (const struct product_data *, std::string &resolution, std::string &productInfo, std::string &fcstType)
std::string getLevelInfo (const struct product_data *)
std::string getMinorType (const struct product_data *)
 For Geometric product, it can be either cloud top height or cloud base height, so we give them a minor type such as CTL or CBL.
std::string getMinorType (int)
std::string getDesiredUnit (const struct product_data *)
std::string getDesiredUnit (int prodId, int levelId)
void getIndex (size_t, size_t, int &, int &)
void createIndexLookUp (const struct product_data *)
void createIndexLookUp (size_t numRows, size_t numColumns)
bool getClosestIndex (int, int, const struct product_data *)
bool getClosestIndex (int, int, size_t numRows, size_t numColumns)
void fillGribProdInfo ()
void writeNetcdfFilesAndRecords (code::LatLonGrid &llg, const std::string &)
virtual void findFilesToRead ()

Protected Attributes

std::vector< SmartPtr< std::vector<
float > > > 
latArray
std::vector< SmartPtr< std::vector<
float > > > 
lonArray
IndexPair indexs [337][451]
LatLonGrid::DimType grid_spacing
std::multimap< int, GribProdInfogribProdInfoMap
std::map< int, LevelLayergribLLMap
bool alreadyRead
int lastTimeNumRows
bool noSpacing
bool lookUp
std::map< std::string, code::WindFieldStruct<
code::LatLonGrid > > 
WFHolder
std::set< std::string > desired_products
std::string inputDir
std::string outputDir
bool compressedFlag
bool subDirFlag
std::set< std::string > fileNames
std::string readFile_
code::SmartPtr< code::IndexRecordNotifier > lb
std::string fileNamePattern
bool keepFile_
bool readAll_
std::string lastFileRead_
std::vector< SmartPtr< DataModifier > > modifiers

Classes

struct  GribProdInfo
struct  IndexPair
struct  LevelLayer

Constructor & Destructor Documentation

code::GRIBDataHandler::GRIBDataHandler ( const std::string &  inputDirectory,
const std::string &  outputDirectory,
const std::string &  lbname,
const std::string &  nameP,
bool  compressedFlag = false,
bool  insameDir = false,
bool  keepFile = false,
bool  readAll = false 
)

virtual code::GRIBDataHandler::~GRIBDataHandler (  )  [virtual]


Member Function Documentation

void code::DataHandler::addModifier ( SmartPtr< DataModifier m  )  [inline, inherited]

By default, a DataHandler does not do anything to the LatLonGrid.

Subclasses can modify the data, by changing the data values or cropping the grid. This is done by attaching a DataModifier.

Modifications are done in the order in which they are attached.

void code::GRIBDataHandler::convertToNetcdf ( const struct product_data  )  [protected]

void code::GRIBDataHandler::createIndexLookUp ( size_t  numRows,
size_t  numColumns 
) [protected]

void code::GRIBDataHandler::createIndexLookUp ( const struct product_data  )  [protected]

virtual void code::GRIBDataHandler::createW2NetcdfFiles (  )  [virtual]

Reimplemented from code::DataHandler.

Reimplemented in code::GRIBLDMDataHandler, and code::GRIBMultiDirDataHandler.

void code::GRIBDataHandler::fillGribProdInfo (  )  [protected]

virtual void code::DataHandler::findFilesToRead (  )  [protected, virtual, inherited]

Reimplemented in code::GRIBMultiDirDataHandler.

bool code::GRIBDataHandler::getClosestIndex ( int  ,
int  ,
size_t  numRows,
size_t  numColumns 
) [protected]

bool code::GRIBDataHandler::getClosestIndex ( int  ,
int  ,
const struct product_data  
) [protected]

std::string code::GRIBDataHandler::getColorMapName ( int  prodId,
int  levelId 
) [protected]

std::string code::GRIBDataHandler::getColorMapName ( const struct product_data  )  [protected]

std::string code::GRIBDataHandler::getDataType ( int  ,
int   
) [protected]

std::string code::GRIBDataHandler::getDataType ( const struct product_data  )  [protected]

std::string code::GRIBDataHandler::getDesiredUnit ( int  prodId,
int  levelId 
) [protected]

std::string code::GRIBDataHandler::getDesiredUnit ( const struct product_data  )  [protected]

void code::GRIBDataHandler::getIndex ( size_t  ,
size_t  ,
int &  ,
int &   
) [protected]

void code::GRIBDataHandler::getLatLonSpacing ( size_t  numRows,
size_t  numColumns 
) [protected]

void code::GRIBDataHandler::getLatLonSpacing ( const struct product_data  )  [protected]

std::string code::GRIBDataHandler::getLevelInfo ( const struct product_data  )  [protected]

std::string code::GRIBDataHandler::getMinorType ( int   )  [protected]

std::string code::GRIBDataHandler::getMinorType ( const struct product_data  )  [protected]

For Geometric product, it can be either cloud top height or cloud base height, so we give them a minor type such as CTL or CBL.

Location code::GRIBDataHandler::getNorthWestCorner ( size_t  numRows,
size_t  numColumns 
) [protected]

Location code::GRIBDataHandler::getNorthWestCorner ( const struct product_data  )  [protected]

double code::GRIBDataHandler::getPrecisionPrefered ( int  prodId,
int  levelId 
) [protected]

double code::GRIBDataHandler::getPrecisionPrefered ( const struct product_data  )  [protected]

static void code::DataHandler::getSubDirs ( const std::string &  inputDir,
std::vector< std::string > &  subdirs 
) [static, inherited]

std::string code::GRIBDataHandler::getSubTypeForSelection ( const struct product_data ,
std::string &  resolution,
std::string &  productInfo,
std::string &  fcstType 
) [protected]

Time code::GRIBDataHandler::getTime ( const struct product_data  )  [protected]

std::string code::GRIBDataHandler::getUnit ( const struct product_data  )  [protected]

virtual void code::GRIBDataHandler::gribToNetcdf (  )  [protected, virtual]

Reimplemented in code::GRIBLDMDataHandler, and code::GRIBNetcdfDataHandler.

bool code::GRIBDataHandler::isDesired ( const std::string &  productName  ) 

Pass in the WDSS-II type name.

virtual bool code::DataHandler::isNewFile ( const std::string &  file_name  )  [virtual, inherited]

Reimplemented in code::MesonetDataHandler, code::SigmetDataHandler, and code::UFDataHandler.

virtual bool code::DataHandler::modifyBeforeWrite ( code::LatLonGrid &  llgrid  )  [virtual, inherited]

void code::GRIBDataHandler::readLatLonLookupFile ( size_t  numRows,
size_t  numColumns 
) [protected]

void code::GRIBDataHandler::readLatLonLookupFile ( const struct product_data data  )  [protected]

void code::GRIBDataHandler::setDesiredProducts ( const std::vector< std::string > &  desired  ) 

Restrict the variables handled.

These are the WDSS-II product names (in the output files). If this method is not called, all variables are processed.

void code::GRIBDataHandler::writeNetcdfFilesAndRecords ( code::LatLonGrid &  llg,
const std::string &   
) [protected]


Member Data Documentation

bool code::GRIBDataHandler::alreadyRead [protected]

bool code::DataHandler::compressedFlag [protected, inherited]

std::set<std::string> code::GRIBDataHandler::desired_products [protected]

std::string code::DataHandler::fileNamePattern [protected, inherited]

std::set<std::string > code::DataHandler::fileNames [protected, inherited]

std::map<int, LevelLayer > code::GRIBDataHandler::gribLLMap [protected]

std::multimap<int, GribProdInfo > code::GRIBDataHandler::gribProdInfoMap [protected]

LatLonGrid::DimType code::GRIBDataHandler::grid_spacing [protected]

IndexPair code::GRIBDataHandler::indexs[337][451] [protected]

std::string code::DataHandler::inputDir [protected, inherited]

bool code::DataHandler::keepFile_ [protected, inherited]

std::string code::DataHandler::lastFileRead_ [protected, inherited]

int code::GRIBDataHandler::lastTimeNumRows [protected]

std::vector<SmartPtr< std::vector<float> > > code::GRIBDataHandler::latArray [protected]

code::SmartPtr<code::IndexRecordNotifier> code::DataHandler::lb [protected, inherited]

std::vector<SmartPtr< std::vector<float> > > code::GRIBDataHandler::lonArray [protected]

bool code::GRIBDataHandler::lookUp [protected]

std::vector< SmartPtr<DataModifier> > code::DataHandler::modifiers [protected, inherited]

bool code::GRIBDataHandler::noSpacing [protected]

std::string code::DataHandler::outputDir [protected, inherited]

bool code::DataHandler::readAll_ [protected, inherited]

std::string code::DataHandler::readFile_ [protected, inherited]

bool code::DataHandler::subDirFlag [protected, inherited]

std::map<std::string, code::WindFieldStruct<code::LatLonGrid> > code::GRIBDataHandler::WFHolder [protected]


Generated on Fri May 4 13:40:21 2012 for WDSS-IIw2algs by  doxygen 1.4.7