Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
gnsstk::BLQDataReader Class Reference

Detailed Description

This is a class to read and parse ocean tides harmonics data in BLQ file format.

Ocean loading displacement models usually use the ocean tide harmonics in order to compute station biases due to this effect.

A common format to encode such information is the so-called BLQ format, where each station name is associated to a matrix with 11 columns (corresponding to the most important harmonics) and six rows: Three for amplitudes (radial, west, south), and three for phases (radial, west, south).

You may find this data using the "Ocean tide loading provider" at:

http://www.oso.chalmers.se/~loading/

A typical way to use this class follows:

BLQDataReader blqread;
blqread.open("EBRE.GOT00.2");
Matrix<double> tides(6,11,0.0);
tides = blqread.getTideHarmonics("EBRE");

The eleven tide harmonics used are:

Warning
Be aware that you may select several different tide models to generate tide harmonics. It is advised to use the latest models such as GOT00.2, FES99, TPXO.6.2, etc.

Definition at line 106 of file BLQDataReader.hpp.

#include <BLQDataReader.hpp>

Inheritance diagram for gnsstk::BLQDataReader:
Inheritance graph
[legend]

Classes

struct  tideData
 A structure used to store ocean tide harmonics data. More...
 

Public Member Functions

 BLQDataReader ()
 Default constructor. More...
 
 BLQDataReader (const char *fn)
 
 BLQDataReader (const std::string &fn)
 
virtual BLQDataReaderclearData ()
 Method to clear all previously loaded ocean tide harmonics data. More...
 
virtual Matrix< double > getTideHarmonics (const std::string &station)
 
virtual void open (const char *fn)
 
virtual void open (const std::string &fn)
 
virtual ~BLQDataReader ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::FFTextStream
 FFTextStream ()
 Default constructor. More...
 
 FFTextStream (const char *fn, std::ios::openmode mode=std::ios::in)
 
 FFTextStream (const std::string &fn, std::ios::openmode mode=std::ios::in)
 
void formattedGetLine (std::string &line, const bool expectEOF=false)
 
virtual void open (const char *fn, std::ios::openmode mode)
 Overrides open to reset the line number. More...
 
virtual void open (const std::string &fn, std::ios::openmode mode)
 Overrides open to reset the line number. More...
 
virtual ~FFTextStream ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::FFStream
void conditionalThrow (void)
 
void dumpState (std::ostream &s=std::cout) const
 A function to help debug FFStreams. More...
 
 FFStream ()
 Default constructor, initialize internal data. More...
 
 FFStream (const char *fn, std::ios::openmode mode=std::ios::in)
 
 FFStream (const std::string &fn, std::ios::openmode mode=std::ios::in)
 
virtual ~FFStream ()
 Virtual destructor, close the stream etc. More...
 

Private Types

typedef std::map< std::string, tideData >::const_iterator tideDataIt
 Handy iterator type. More...
 

Private Member Functions

virtual void loadData (void)
 
void setData (const std::string &stationName, const tideData &data)
 

Private Attributes

std::map< std::string, tideDataOceanTidesData
 Map holding the information regarding ocean tide harmonics. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from gnsstk::FFStream
static bool isFFStream (std::istream &i)
 Check if the input stream is the kind of RinexObsStream. More...
 
- Public Attributes inherited from gnsstk::FFTextStream
unsigned int lineNumber
 
- Public Attributes inherited from gnsstk::FFStream
std::string filename
 file name More...
 
FFStreamError mostRecentException
 This stores the most recently thrown exception. More...
 
unsigned int recordNumber
 keeps track of the number of records read More...
 
- Protected Member Functions inherited from gnsstk::FFTextStream
virtual void tryFFStreamGet (FFData &rec)
 
virtual void tryFFStreamPut (const FFData &rec)
 

Member Typedef Documentation

◆ tideDataIt

typedef std::map<std::string, tideData>::const_iterator gnsstk::BLQDataReader::tideDataIt
private

Handy iterator type.

Definition at line 184 of file BLQDataReader.hpp.

Constructor & Destructor Documentation

◆ BLQDataReader() [1/3]

gnsstk::BLQDataReader::BLQDataReader ( )
inline

Default constructor.

Definition at line 111 of file BLQDataReader.hpp.

◆ BLQDataReader() [2/3]

gnsstk::BLQDataReader::BLQDataReader ( const char *  fn)
inline

Common constructor. It will always open file a for read and will load ocean tide harmonics data in one pass.

Parameters
fnBLQ data file to read

Definition at line 120 of file BLQDataReader.hpp.

◆ BLQDataReader() [3/3]

gnsstk::BLQDataReader::BLQDataReader ( const std::string &  fn)
inline

Common constructor. It will always open file for read and will load ocean tide harmonics data in one pass.

Parameters
fnBLQ data file to read

Definition at line 131 of file BLQDataReader.hpp.

◆ ~BLQDataReader()

virtual gnsstk::BLQDataReader::~BLQDataReader ( )
inlinevirtual

Destructor.

Definition at line 167 of file BLQDataReader.hpp.

Member Function Documentation

◆ clearData()

virtual BLQDataReader& gnsstk::BLQDataReader::clearData ( )
inlinevirtual

Method to clear all previously loaded ocean tide harmonics data.

Definition at line 148 of file BLQDataReader.hpp.

◆ getTideHarmonics()

Matrix< double > gnsstk::BLQDataReader::getTideHarmonics ( const std::string &  station)
virtual

Method to get the ocean tide harmonics corresponding to a given station.

Parameters
stationStation name (case is NOT relevant).
Returns
A Matrix<double> of siw rows and eleven columns containing tide harmonics M2, S2, N2, K2, K1, O1, P1, Q1, MF, MM and SSA for amplitudes (radial, west, south, in meters) and phases (radial, west, south, in degrees). If station is not found, this method will return a matrix full of zeros.

Definition at line 216 of file BLQDataReader.cpp.

◆ loadData()

void gnsstk::BLQDataReader::loadData ( void  )
privatevirtual

Method to store ocean tide harmonics data in this class' data map

Exceptions
FFStreamError
StringUtils::StringException

Definition at line 53 of file BLQDataReader.cpp.

◆ open() [1/2]

void gnsstk::BLQDataReader::open ( const char *  fn)
virtual

Method to open AND load ocean tide harmonics data file. It doesn't clear data previously loaded.

Definition at line 173 of file BLQDataReader.cpp.

◆ open() [2/2]

void gnsstk::BLQDataReader::open ( const std::string &  fn)
virtual

Method to open AND load ocean tide harmonics data file. It doesn't clear data previously loaded.

Definition at line 190 of file BLQDataReader.cpp.

◆ setData()

void gnsstk::BLQDataReader::setData ( const std::string &  stationName,
const tideData data 
)
inlineprivate

Method to store ocean tide harmonics data in this class' data map

Parameters
stationNameString holding station name.
datatideData structure holding the harmonics data

Definition at line 197 of file BLQDataReader.hpp.

Member Data Documentation

◆ OceanTidesData

std::map<std::string, tideData> gnsstk::BLQDataReader::OceanTidesData
private

Map holding the information regarding ocean tide harmonics.

Definition at line 188 of file BLQDataReader.hpp.


The documentation for this class was generated from the following files:
gnsstk::BLQDataReader::BLQDataReader
BLQDataReader()
Default constructor.
Definition: BLQDataReader.hpp:111


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:44