|
World Ocean Simulation System (WOSS) library
|
WossDb for the custom made NetCDF WOA2005 SSP database. More...
#include <ssp-woa2005-db.h>


Public Member Functions | |
| SspWoa2005Db (const std::string &name) | |
| SspWoa2005Db (const std::string &name, WOADbType db_type) | |
| virtual | ~SspWoa2005Db () override=default |
| virtual bool | finalizeConnection () override |
| virtual bool | insertValue (const Coord &coordinates, const Time &time_value, const SSP &ssp_value) override |
| virtual std::unique_ptr< SSP > | getValue (const Coord &coordinates, const Time &time, long double ssp_depth_precision) const override |
| WOADbType | getWoaDbType () 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 |
| virtual bool | isValid () const |
| Public Member Functions inherited from woss::WossSSPDb | |
| WossSSPDb ()=default | |
| virtual | ~WossSSPDb ()=default |
Protected Member Functions | |
| SSPIndexes | getSSPIndexes (const Coord &coordinates) const |
| void | getSSPValue (const Coord &coordinates, const SSPIndexes &indexes, double ssp_values[]) const |
| void | getSSPValue (const SSPIndexes &indexes, double ssp_values[]) const |
| Protected Member Functions inherited from woss::WossDb | |
| PathName | getPathName (const std::string &complete_path) const |
Protected Attributes | |
| WOADbType | woa_db_type |
| netCDF::NcVar | ssp_var |
| NcVar * | ssp_var |
| netCDF::NcVar | lat_var |
| netCDF::NcVar | lon_var |
| 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 |
| SspWoa2005Db::SspWoa2005Db | ( | const std::string & | name | ) |
SspWoa2005Db constructor
| name | pathname of database |
References lat_var, lon_var, ssp_var, woa_db_type, and woss::WossNetcdfDb::WossNetcdfDb().

| SspWoa2005Db::SspWoa2005Db | ( | const std::string & | name, |
| WOADbType | db_type ) |
SspWoa2005Db constructor
| name | pathname of database |
| db_type | WOADbType of the database |
References lat_var, lon_var, ssp_var, woa_db_type, and woss::WossNetcdfDb::WossNetcdfDb().

|
overridevirtualdefault |
|
overridevirtual |
Post openConnection() actions, used to create and initialize NetCDF variables
Implements woss::WossDb.
References lat_var, lon_var, woss::WossNetcdfDb::netcdf_db, ssp_var, woa_db_type, woss::WOA_DB_TYPE_2005, and woss::WOA_DB_TYPE_2013.
|
protected |
Returns the indexes used by the NetCDF variable to get the SSP values
| coordinates | const reference to a valid Coord object |
References woss::WossDb::debug, woss::Coord::getLatitude(), woss::Coord::getLongitude(), woa_db_type, woss::WOA_DB_TYPE_2005, and woss::WOA_DB_TYPE_2013.
Referenced by getValue().

|
protected |
Insert the SSP values taken from the given indexes into the given array
| coordinates | const reference to a valid Coord object |
| indexes | const reference to a valid SSPIndexes object |
| ssp_values[] | array that will hold SSP values |
References woss::WossDb::debug, lat_var, lon_var, ssp_var, woa_db_type, woss::WOA_DB_TYPE_2005, and woss::WOA_DB_TYPE_2013.
Referenced by getValue().
|
protected |
Insert the SSP values taken from the given indexes into the given array
| indexes | const reference to a valid SSPIndexes object |
| ssp_values[] | array that will hold SSP values |
|
overridevirtual |
Returns a std::unique_ptr to a heap-based SSP for given coordinates and date time if both present in the database. User is responsible of pointer's ownership
| coords | const reference to a valid Coord object |
| time | const reference to a valid Time object |
| ssp_depth_precision | ssp depth precision [m] |
Implements woss::WossSSPDb.
References woss::DefHandler::createSSP(), woss::WossDb::debug, getSSPIndexes(), getSSPValue(), and woss::Singleton< DefHandler >::instance().

|
inline |
|
overridevirtual |
Inserts the given woss::SSP value in the database for given coordinates
| coordinates | const reference to a valid Coord object |
| time_value | const reference to a valid Time object |
| ssp_value | const Reference to SSP value to be inserted |
Implements woss::WossSSPDb.
|
protected |
NetCDF variable representing latitude
Referenced by finalizeConnection(), getSSPValue(), SspWoa2005Db(), and SspWoa2005Db().
|
protected |
NetCDF variable representing longitude
Referenced by finalizeConnection(), getSSPValue(), SspWoa2005Db(), and SspWoa2005Db().
|
protected |
|
protected |
NetCDF variable representing SSP
Referenced by finalizeConnection(), getSSPValue(), SspWoa2005Db(), and SspWoa2005Db().
|
protected |
WOA Db type
Referenced by finalizeConnection(), getSSPIndexes(), getSSPValue(), getWoaDbType(), SspWoa2005Db(), and SspWoa2005Db().