Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
gnsstk::OceanLoadTides Class Reference

Detailed Description

Ocean loading. Computation of displacements of sites on the solid earth surface due to ocean loading.

The computation requires a site(Lat,Lon)-specific set of coefficients, in a flat file with a specific format, and obtainable by a variety of methods. Coefficients for all the ITRF sites are found at ftp://maia.usno.navy.mil/conventions/chapter7/olls25.blq Also, at http://www.oso.chalmers.se/~loading one may submit site label and position for one or more sites, and the resulting ocean loading file will be computed and emailed. Finally, open source software package SPOTL (Some Programs for Ocean Load Tides) is available from http://igppweb.ucsd.edu/~agnew/Spotl/spotlmain.html. This software will compute the coefficients and output the file, with a variety of options.

Once a file is obtained for the site of choice, this object is initialized by calling initializeSites(), passing it the file name an a list of the sites for which computations will later be desired. The function isValid() returns true when a given site has been initialized. The function computeDisplacement() will compute the site displacement vector at any time for any initialized site.

Definition at line 82 of file OceanLoadTides.hpp.

#include <OceanLoadTides.hpp>

Classes

struct  NVector
 Used for convenience by computeDisplacements. More...
 

Public Member Functions

Triple computeDisplacement (std::string site, EphTime t)
 
Triple computeDisplacement11 (std::string site, EphTime t)
 
Triple getPosition (std::string site)
 
int initializeSites (std::vector< std::string > &sites, std::string filename)
 
bool isValid (std::string site)
 
 OceanLoadTides ()
 Constructor. More...
 

Private Member Functions

int deriveTides (const NVector SchTides[], const double amp[], const double phs[], const double Dood[], const double freqDood[], double ampDer[], double phsDer[], double freq[], const int Nin)
 

Private Attributes

std::map< std::string, std::vector< double > > coefficientMap
 
std::map< std::string, std::vector< double > > positionMap
 

Static Private Attributes

static const int NDER = 342
 Number of derived tides computed by deriveTides() More...
 
static const int NSTD = 11
 Number of standard (Schwiderski) tides read from BLQ file. More...
 

Constructor & Destructor Documentation

◆ OceanLoadTides()

gnsstk::OceanLoadTides::OceanLoadTides ( )
inline

Constructor.

Definition at line 86 of file OceanLoadTides.hpp.

Member Function Documentation

◆ computeDisplacement()

Triple gnsstk::OceanLoadTides::computeDisplacement ( std::string  site,
EphTime  t 
)

Compute the site displacement vector at the given time for the given site. The site must have been successfully initialized; if not an exception is thrown. Based on IERS routine HARDISP.F

Parameters
sitestring Input name of the site; must be the same as previously successfully passed to initializeSites().
tEphTime Input time of interest.
Returns
Triple containing the North, East and Up components of the site displacement in meters.
Exceptions
Exceptionif the site has not been initialized, if the time system is unknown, if there is corruption in the static arrays, or .

Definition at line 416 of file OceanLoadTides.cpp.

◆ computeDisplacement11()

Triple gnsstk::OceanLoadTides::computeDisplacement11 ( std::string  site,
EphTime  t 
)

Compute the site displacement vector at the given time for the given site. Use the 11-tide (simple) model. The site must have been successfully initialized; if not an exception is thrown.

Parameters
sitestring Input name of the site; must be the same as previously successfully passed to initializeSites().
tEphTime Input time of interest.
Returns
Triple containing the North, East and Up components of the site displacement in meters.
Exceptions
Exceptionif the site has not been initialized.

Definition at line 273 of file OceanLoadTides.cpp.

◆ deriveTides()

int gnsstk::OceanLoadTides::deriveTides ( const NVector  SchTides[],
const double  amp[],
const double  phs[],
const double  Dood[],
const double  freqDood[],
double  ampDer[],
double  phsDer[],
double  freq[],
const int  Nin 
)
private

Derive the 342 tides from the standard 11 tides using cubic spline interpolation. Called by computeDisplacements()

Parameters
SchTidesarray of 11 NVectors (int[6]) with for standard tides
amparray of 11 amplitudes from BLQ file
phsarray of 11 phases from BLQ file
Doodarray of 6 Doodson arguments at time t in degrees
freqDoodarray of 6 Doodson frequencies at time in cycles/day
ampDerarray of nout (up to 342) amplitudes of the derived tides
phsDerarray of nout (up to 342) phases of the derived tides
freqarray of nout (up to 342) frequencies of the derived tides
Ninnumber of std tides (11)
Returns
nout number of derived tides actually computed, may be < 342
Exceptions
Exceptionif static arrays are corrupted.

Definition at line 658 of file OceanLoadTides.cpp.

◆ getPosition()

Triple gnsstk::OceanLoadTides::getPosition ( std::string  site)
inline

Return the recorded latitude, longitude and ht(=0) for the given site. Return value of (0.0,0.0,0.0) probably means the position was not found.

Definition at line 153 of file OceanLoadTides.hpp.

◆ initializeSites()

int gnsstk::OceanLoadTides::initializeSites ( std::vector< std::string > &  sites,
std::string  filename 
)

Open and read the given file, containing ocean loading coefficients, and initialize this object for the sites names in the input list that match a name in the file (case sensitive, may contain embedded whitespace). Return the number of successfully initialized site names, and remove those sites from the input list. Convert coefficients from degrees to radians. Ocean loading files can be obtained from the web. For example all the ITRF sites are found at ftp://maia.usno.navy.mil/conventions/chapter7/olls25.blq Also, at http://www.oso.chalmers.se/~loading one may submit site label and position for one or more sites, and the resulting ocean loading file will be emailed.

Parameters
sitesvector<string> On input contains site labels found in the file, on output contains only sites that were NOT found. If empty, all sites are read.
filenamestring Input ocean loading file name.
Returns
the number of sites successfully initialized.
Exceptions
Exceptionif the file could not be opened.

Definition at line 86 of file OceanLoadTides.cpp.

◆ isValid()

bool gnsstk::OceanLoadTides::isValid ( std::string  site)
inline

Return true if the given site name has been initialized, otherwise false.

Definition at line 114 of file OceanLoadTides.hpp.

Member Data Documentation

◆ coefficientMap

std::map<std::string, std::vector<double> > gnsstk::OceanLoadTides::coefficientMap
private

map of (site name, coefficient array), created by call to initializeSites()

Definition at line 176 of file OceanLoadTides.hpp.

◆ NDER

const int gnsstk::OceanLoadTides::NDER = 342
staticprivate

Number of derived tides computed by deriveTides()

Definition at line 194 of file OceanLoadTides.hpp.

◆ NSTD

const int gnsstk::OceanLoadTides::NSTD = 11
staticprivate

Number of standard (Schwiderski) tides read from BLQ file.

Definition at line 191 of file OceanLoadTides.hpp.

◆ positionMap

std::map<std::string, std::vector<double> > gnsstk::OceanLoadTides::positionMap
private

map of (site name,2-element array lat,lon), created by initializeSites()

Definition at line 182 of file OceanLoadTides.hpp.


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


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