Package 'TideTables'

Title: Tide Analysis and Prediction of Predominantly Semi-Diurnal Tides
Description: Tide analysis and prediction of predominantly semi-diurnal tides with two high waters and two low waters during one lunar day (~24.842 hours, ~1.035 days). The analysis should preferably cover an observation period of at least 19 years. For shorter periods, for example, the nodal cycle can not be taken into account, which particularly affects the height calculation. The main objective of this package is to produce tide tables.
Authors: Moritz Mueller-Navarra [aut, cre], Sylvin Mueller-Navarra [aut] ((2019) <https://doi.org/10.5194/os-15-1363-2019>), Andreas Boesch [ctb] ((2019) <https://doi.org/10.5194/os-15-1363-2019>)
Maintainer: Moritz Mueller-Navarra <[email protected]>
License: GPL-3
Version: 0.0.3
Built: 2025-02-03 03:08:15 UTC
Source: https://github.com/moritzmn/tidetables

Help Index


Builds a TideTable model

Description

Builds a TideTable model of class "tidetable".

Usage

BuildTT(
  dataInput,
  otz = 1,
  asdate,
  astime,
  aedate,
  aetime,
  hwi = "99:99",
  sharp_hwi = TRUE
)

Arguments

dataInput

the data frame with observation date, observation time and height.

otz

time zone of the observations. Default is 1 (UTC + 1)

asdate

The start date.Format: "yyyy/mm/dd"

astime

The start time. Format: "hh:mm:ss"

aedate

The end date. Format: "yyyy/mm/dd"

aetime

The end time. Format: "hh:mm:ss"

hwi

The high water interval. Format: "hh::mm"

sharp_hwi

should the hwi computation be sharp? Default is TRUE

Value

Returns a object of class "tidetable" which contains following elements:

fitting.coeff

Coefficients for the eight fitted linear models used in the synthesis

diff.analyse

Time in days spanning the analysis

omega_t

Return value of FindOmega()

tm24

Internal constant

tplus

Internal constant

tmhwi

Mean high water interval

References

https://www.bsh.de/DE/PUBLIKATIONEN/_Anlagen/Downloads/Meer_und_Umwelt/Berichte-des-BSH/Berichte-des-BSH_50_de.pdf?__blob=publicationFile&v=13/

https://doi.org/10.5194/os-15-1363-2019

Examples

BuildTT(dataInput = observation, asdate = "1991/01/01", 
astime ="12:00:00", aedate = "1992/01/01", aetime = "12:00:00")

Returns predictor vector for design matrix

Description

Returns predictor vector for design matrix from 39 astronomical angular velocities.

Usage

ComputeAfunc(omega = NULL, xi = NULL)

Arguments

omega

The return value of FindOmega().

xi

Transit index

Value

A list with the selected angular velocities, their ranks and the predictor vector (values between -1, 1).


Calculates tmhwi

Description

This functions computes an estimate for the mean high water interval (tmhwi) in UTC

Usage

EstimateTmhwi(input, strict = TRUE)

Arguments

input

Should be a data.table object with three columns d_days, high_low and height, where d_days is a vector of fraction of days since 1900/01/01 00:00:00, high_low indicating a high water(1) or a low water(0), height is the corresponding height

strict

If strict is true (default), the computations are more sharp.

Value

Returns the mean high water interval in UTC


Returns omegas and their ranks.

Description

Returns omegas and their ranks from 39 astronomical angular velocities.

Usage

FindOmega(tdiff)

Arguments

tdiff

Length of input time series.

Value

A list with the selected angular velocities and their ranks.


Returns predictor vector for design matrix

Description

Returns predictor vector for design matrix from 39 astronomical angular velocities.

Usage

Funcs(tdiff, xi)

Arguments

tdiff

Length of input time series.

xi

Transit index

Value

A list with the selected angular velocities, their ranks and the predictor vector (Values between -1, 1).


Calculates numm and k4

Description

Calculates transit number (numm) and high (1, 3) or low (2, 4) water number (k4).

Usage

NumCulm(t, tmhwi)

Arguments

t

Time in days after 1900/01/01 00:00:00 UTC.

tmhwi

Mean high water interval (Greenwich meridian).

Value

Returns a list containing numm and k4.


Sample file of high and low water times and heights

Description

A sample dataset containing observation date, time and height of high and low water

Usage

observation

Format

A data frame with 26819 rows and 4 variables

observation_date

date of tide, "yyyy/mm/dd" format, character

observation_time

time of tide, "hh:mm:ss" format, character

high_or_low_water

indication whether high (1) or low water (0) was present given date and time, integer

height

height of the tide, numeric


Synthesizes a tide table

Description

Synthesizes a tide table, built with BuildTT().

Usage

SynTT(tmodel = NULL, ssdate, sstime, sedate, setime)

Arguments

tmodel

The model you built with BuildTT()

ssdate

Start date of the synthesis. Format: "yyyy/mm/dd"

sstime

Start time of the synthesis Format: "hh:mm:ss".

sedate

End date of the synthesis. Format: "yyyy/mm/dd"

setime

End time of the synthesis. Format: "hh:mm:ss"

Value

Returns a tide table as a data.table, which is identical to c.table computed with TideTable().

References

https://www.bsh.de/DE/PUBLIKATIONEN/_Anlagen/Downloads/Meer_und_Umwelt/Berichte-des-BSH/Berichte-des-BSH_50_de.pdf?__blob=publicationFile&v=13/

https://doi.org/10.5194/os-15-1363-2019

Examples

## Not run: SynTT(tmodel = tt_model, ssdate = "1991/01/01", 
sstime = "12:00:00", sedate = "1992/01/01", setime = "12:00:00")
## End(Not run)

Computes a tide table

Description

Takes a data frame as input with date time, high water and height information and returns a tide table

Usage

TideTable(
  dataInput,
  otz = 1,
  hwi = "99:99",
  sharp_hwi = TRUE,
  asdate,
  astime,
  aedate,
  aetime,
  ssdate,
  sstime,
  sedate,
  setime,
  stz = 1
)

Arguments

dataInput

A data frame with the columns observation_date, observation_time, high_or_low_water and height. See attached data for correct formats.

otz

The time zone of the observations

hwi

The average of all intervals between the Moon's transit (upper or lower) over the Greenwich meridian and the following high or low waters for all phases of the Moon is known as mean high water lunitidal interval and is abbreviated to high water interval (hwi). Please only supply a value, when you are sure. Otherwise leave the default value "99:99" untouched. hwi is then computed for you.

sharp_hwi

Default is TRUE, which results in a sharp hwi computation. Set on FALSE if you analyze shorter time intervals and EstimateTmhwi function returns NA.

asdate

A string indication the date you want the analysis to start with. Format: "yyyy/mm/dd".

astime

A string indicating the time you want the analysis to start with. Format: "hh:mm:ss"

aedate

A string indication the date you want the analysis to end with. Format: "yyyy/mm/dd".

aetime

A string indicating the time you want the analysis to end with. Format: "hh:mm:ss"

ssdate

Synthesis start date. This indicates the date you want your tide table to start with. Format: See above

sstime

Synthesis start time. The starting time for your tide table. Format: See above

sedate

Synthesis end date. Format: See above

setime

Synthesis end time. Format: See above

stz

Dummy for later extension to modify target time zone.

Value

Returns a list with elements of the analysis, fitting and the tide table for given data

c.table

The complete synthesis data as a data.table object

tide.table

The tide table as a data.table object

lm.coeff

Coefficients for the eight fitted linear models used in the synthesis

diff.analyse

Time in days spanning the analysis

i.analyse

How many different cases where used in the analysis

References

Horn, W. (1960) Some Recent Approaches to Tidal Problems. Int. Hydrogr. Rev. 37(2), 65-84

Godin, Gabriel (1972) The Analysis of Tides. Toronto, 264pp

https://www.bsh.de/DE/PUBLIKATIONEN/_Anlagen/Downloads/Meer_und_Umwelt/Berichte-des-BSH/Berichte-des-BSH_50_de.pdf?__blob=publicationFile&v=13/

https://doi.org/10.5194/os-15-1363-2019

Examples

TideTable(dataInput = observation, asdate = "1991/01/01", 
astime = "12:00:00", 
aedate = "1992/01/01", aetime = "12:00:00", ssdate = "1991/01/01", 
sstime = "00:00:00", sedate = "1991/01/31", setime = "21:00:00")