World Ocean Simulation System (WOSS) library
woss::SedimDeck41MarsdenDb Class Reference

WossDb for custom made NetCDF marsden square DECK41 Sediment database. More...

#include <sediment-deck41-marsden-db.h>

Inheritance diagram for woss::SedimDeck41MarsdenDb:
Inheritance graph
Collaboration diagram for woss::SedimDeck41MarsdenDb:
Collaboration graph

Public Member Functions

 SedimDeck41MarsdenDb (const std::string &name=DB_NAME_NOT_SET)
 SedimDeck41MarsdenDb (const std::string &name, DECK41DbType db_type)
virtual ~SedimDeck41MarsdenDb () override=default
Deck41Types getSeaFloorType (const Marsden &marsden_square) const
virtual bool isValid () const override
virtual bool finalizeConnection () override
void setDeck41DbType (DECK41DbType db_type)
DECK41DbType getDeck41DbType () const
Public Member Functions inherited from woss::WossNetcdfDb
 WossNetcdfDb (const std::string &name)
virtual ~WossNetcdfDb () override
virtual bool openConnection () override
virtual bool closeConnection () override
Public Member Functions inherited from woss::WossDb
 WossDb (const std::string &name)
virtual ~WossDb ()=default
void setDbName (const std::string &pathname)
std::string getDbName () const
void setDebug (double flag=true)
bool isUsingDebug () const

Protected Attributes

netCDF::NcVar main_sedim_var_marsden
NcVar * main_sedim_var_marsden
netCDF::NcVar sec_sedim_var_marsden
NcVar * sec_sedim_var_marsden
netCDF::NcVar marsden_square_var
NcVar * marsden_square_var
DECK41DbType deck41_db_type
Protected Attributes inherited from woss::WossNetcdfDb
std::unique_ptr< netCDF::NcFile > netcdf_db = nullptr
std::unique_ptr< NcFile > netcdf_db = nullptr
Protected Attributes inherited from woss::WossDb
std::string db_name
bool debug

Additional Inherited Members

Protected Member Functions inherited from woss::WossDb
PathName getPathName (const std::string &complete_path) const

Detailed Description

WossDb for custom made NetCDF marsden square DECK41 Sediment database.

SedimDeck41MarsdenDb implements WossNetcdfDb for the custom made NetCDF marsden square DECK41 Sediment database

Constructor & Destructor Documentation

◆ SedimDeck41MarsdenDb() [1/2]

SedimDeck41MarsdenDb::SedimDeck41MarsdenDb ( const std::string & name = DB_NAME_NOT_SET)

SedimDeck41MarsdenDb constructor.

Parameters
namepathname of database

References deck41_db_type, main_sedim_var_marsden, marsden_square_var, sec_sedim_var_marsden, and woss::WossNetcdfDb::WossNetcdfDb().

Here is the call graph for this function:

◆ SedimDeck41MarsdenDb() [2/2]

SedimDeck41MarsdenDb::SedimDeck41MarsdenDb ( const std::string & name,
DECK41DbType db_type )

SedimDeck41MarsdenDb constructor.

Parameters
namepathname of database
db_typeDECK41 db type

References deck41_db_type, main_sedim_var_marsden, marsden_square_var, sec_sedim_var_marsden, and woss::WossNetcdfDb::WossNetcdfDb().

Here is the call graph for this function:

◆ ~SedimDeck41MarsdenDb()

virtual woss::SedimDeck41MarsdenDb::~SedimDeck41MarsdenDb ( )
overridevirtualdefault

Member Function Documentation

◆ finalizeConnection()

bool SedimDeck41MarsdenDb::finalizeConnection ( )
overridevirtual

Post openConnection() actions, used to create and initialize NetCDF variables

Returns
true if method was successful, false otherwise

Implements woss::WossDb.

References deck41_db_type, woss::DECK41_DB_V2_TYPE, main_sedim_var_marsden, marsden_square_var, woss::WossNetcdfDb::netcdf_db, and sec_sedim_var_marsden.

◆ getDeck41DbType()

DECK41DbType woss::SedimDeck41MarsdenDb::getDeck41DbType ( ) const
inline

Returns the current DECK41 DB type

Returns
current deck41 db type

References deck41_db_type.

◆ getSeaFloorType()

Deck41Types SedimDeck41MarsdenDb::getSeaFloorType ( const Marsden & marsden_square) const

Returns a Deck41Types for the given coordinates

Parameters
coordinatesconst reference to a valid Marsden object
Returns
a Deck41Types value ( main type value, secondary type value )

References woss::WossDb::debug, deck41_db_type, woss::DECK41_DB_V1_TYPE, woss::DECK41_DB_V2_TYPE, main_sedim_var_marsden, marsden_square_var, and sec_sedim_var_marsden.

◆ isValid()

virtual bool woss::SedimDeck41MarsdenDb::isValid ( ) const
inlineoverridevirtual

Checks the validity of SedimDeck41MarsdenDb

Returns
true if pathname is valid, false otherwise

Reimplemented from woss::WossDb.

References woss::WossDb::db_name, woss::DECK41_DB_INVALID_TYPE, deck41_db_type, and woss::WossDb::isValid().

Here is the call graph for this function:

◆ setDeck41DbType()

void woss::SedimDeck41MarsdenDb::setDeck41DbType ( DECK41DbType db_type)
inline

Sets the current DECK41 Db type

Parameters
db_typeDECK41DbType

References deck41_db_type.

Referenced by woss::SedimDeck41DbCreator::initializeSedimDb().

Member Data Documentation

◆ deck41_db_type

DECK41DbType woss::SedimDeck41MarsdenDb::deck41_db_type
protected

◆ main_sedim_var_marsden [1/2]

NcVar* woss::SedimDeck41MarsdenDb::main_sedim_var_marsden
protected

◆ main_sedim_var_marsden [2/2]

netCDF::NcVar woss::SedimDeck41MarsdenDb::main_sedim_var_marsden
protected

NetCDF variable representing main DECK41 floortype

Referenced by finalizeConnection(), getSeaFloorType(), SedimDeck41MarsdenDb(), and SedimDeck41MarsdenDb().

◆ marsden_square_var [1/2]

NcVar* woss::SedimDeck41MarsdenDb::marsden_square_var
protected

◆ marsden_square_var [2/2]

netCDF::NcVar woss::SedimDeck41MarsdenDb::marsden_square_var
protected

NetCDF marsden square variable

Referenced by finalizeConnection(), getSeaFloorType(), SedimDeck41MarsdenDb(), and SedimDeck41MarsdenDb().

◆ sec_sedim_var_marsden [1/2]

NcVar* woss::SedimDeck41MarsdenDb::sec_sedim_var_marsden
protected

◆ sec_sedim_var_marsden [2/2]

netCDF::NcVar woss::SedimDeck41MarsdenDb::sec_sedim_var_marsden
protected

NetCDF variable representing secondary DECK41 floortype

Referenced by finalizeConnection(), getSeaFloorType(), SedimDeck41MarsdenDb(), and SedimDeck41MarsdenDb().


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