code::GRIBNetcdfDataHandler Class Reference

Inheritance diagram for code::GRIBNetcdfDataHandler:

code::GRIBMultiDirDataHandler code::GRIBDataHandler code::DataHandler List of all members.

Public Member Functions

 GRIBNetcdfDataHandler (const std::string &inputDir, int dirLevel, const std::string &outputDir, const std::string &lbname, const std::string &nameP, bool compressedFlag, bool insameDir, bool keepFile, bool readAll)
virtual ~GRIBNetcdfDataHandler ()
void getTimeRef (const NetcdfFile &, SpaceTimeRef &, int numRows, int numColumns)
void readLatLonLookupData (const NetcdfFile &, size_t numRows, size_t numColumns)
void fillArray2D (std::vector< code::SmartPtr< std::vector< float > > > &array, NcVar &var, int dim1, int dim2)
void fillArray2DSpecial (std::vector< code::SmartPtr< std::vector< float > > > &array, NcVar &var)
void fillArray3D (std::vector< std::vector< std::vector< float > > > &array, NcVar &var)
std::string getUnit (const std::string &inU)
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 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 ()
NcVar * getNcVar (const code::NetcdfFile &, const std::string &)
void fillLatLonGridVec (std::vector< LatLonGrid > &, NcVar &var, const code::SpaceTimeRef &)
void fillLatLonGrid (LatLonGrid &, NcVar &var, int numRows, int numColumns)
void setLatLonGridAttrs (LatLonGrid &, const std::string &whatData, int level, int pmDim)
virtual void findFilesToRead ()
virtual void createW2NetcdfFiles ()
void searchSubDirFileNames (const std::string &subDir)
bool shouldReadThisFile (const std::string &fileName, const std::string &subDir)
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 &)

Protected Attributes

std::vector< SmartPtr< std::vector<
float > > > 
std::vector< SmartPtr< std::vector<
float > > > 
IndexPair indexs [337][451]
LatLonGrid::DimType grid_spacing
std::multimap< int, GribProdInfo > gribProdInfoMap
std::map< int, LevelLayer > gribLLMap
bool alreadyRead
int lastTimeNumRows
bool noSpacing
bool lookUp
std::map< std::string, code::WindFieldStruct<
code::LatLonGrid > > 
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


struct  GRIBDataAttrs

Constructor & Destructor Documentation

code::GRIBNetcdfDataHandler::GRIBNetcdfDataHandler ( const std::string &  inputDir,
int  dirLevel,
const std::string &  outputDir,
const std::string &  lbname,
const std::string &  nameP,
bool  compressedFlag,
bool  insameDir,
bool  keepFile,
bool  readAll 

virtual code::GRIBNetcdfDataHandler::~GRIBNetcdfDataHandler (  )  [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, inherited]

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

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

virtual void code::GRIBMultiDirDataHandler::createW2NetcdfFiles (  )  [protected, virtual, inherited]

Reimplemented from code::GRIBDataHandler.

void code::GRIBNetcdfDataHandler::fillArray2D ( std::vector< code::SmartPtr< std::vector< float > > > &  array,
NcVar &  var,
int  dim1,
int  dim2 

void code::GRIBNetcdfDataHandler::fillArray2DSpecial ( std::vector< code::SmartPtr< std::vector< float > > > &  array,
NcVar &  var 

void code::GRIBNetcdfDataHandler::fillArray3D ( std::vector< std::vector< std::vector< float > > > &  array,
NcVar &  var 

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

void code::GRIBNetcdfDataHandler::fillLatLonGrid ( LatLonGrid &  ,
NcVar &  var,
int  numRows,
int  numColumns 
) [protected]

void code::GRIBNetcdfDataHandler::fillLatLonGridVec ( std::vector< LatLonGrid > &  ,
NcVar &  var,
const code::SpaceTimeRef &   
) [protected]

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

Reimplemented from code::DataHandler.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

NcVar* code::GRIBNetcdfDataHandler::getNcVar ( const code::NetcdfFile &  ,
const std::string &   
) [protected]

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

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

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

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

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, inherited]

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

void code::GRIBNetcdfDataHandler::getTimeRef ( const NetcdfFile &  ,
SpaceTimeRef &  ,
int  numRows,
int  numColumns 

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

std::string code::GRIBNetcdfDataHandler::getUnit ( const std::string &  inU  ) 

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

Reimplemented from code::GRIBDataHandler.

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

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::GRIBNetcdfDataHandler::readLatLonLookupData ( const NetcdfFile &  ,
size_t  numRows,
size_t  numColumns 

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

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

void code::GRIBMultiDirDataHandler::searchSubDirFileNames ( const std::string &  subDir  )  [protected, inherited]

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

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::GRIBNetcdfDataHandler::setLatLonGridAttrs ( LatLonGrid &  ,
const std::string &  whatData,
int  level,
int  pmDim 
) [protected]

bool code::GRIBMultiDirDataHandler::shouldReadThisFile ( const std::string &  fileName,
const std::string &  subDir 
) [protected, inherited]

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

Member Data Documentation

bool code::GRIBDataHandler::alreadyRead [protected, inherited]

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

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

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

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

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

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

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

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

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, inherited]

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

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

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

bool code::GRIBDataHandler::lookUp [protected, inherited]

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

bool code::GRIBDataHandler::noSpacing [protected, inherited]

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, inherited]

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