Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: made the inferrence of minor constituents an option #272

Merged
merged 7 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/source/api_reference/arguments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Calling Sequence

.. autofunction:: pyTMD.arguments._minor_table

.. autofunction:: pyTMD.arguments._constituent_parameters

.. autofunction:: pyTMD.arguments._to_doodson_number

.. autofunction:: pyTMD.arguments._from_doodson_number
4 changes: 4 additions & 0 deletions doc/source/api_reference/astro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ Calling Sequence

.. autofunction:: pyTMD.astro.solar_ecef

.. autofunction:: pyTMD.astro.solar_approximate

.. autofunction:: pyTMD.astro.solar_ephemerides

.. autofunction:: pyTMD.astro.lunar_ecef

.. autofunction:: pyTMD.astro.lunar_approximate

.. autofunction:: pyTMD.astro.lunar_ephemerides

.. autofunction:: pyTMD.astro.gast
Expand Down
56 changes: 56 additions & 0 deletions doc/source/api_reference/compute.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
=======
compute
=======

- Calculates tidal elevations at points and times

* Can use OTIS format tidal solutions provided by Ohio State University and ESR
* Can use Global Tide Model (GOT) solutions provided by Richard Ray at GSFC
* Can use Finite Element Solution (FES) models provided by AVISO
- Calculates tidal currents at points and times

* Can use OTIS format tidal solutions provided by Ohio State University and ESR
* Can use Finite Element Solution (FES) models provided by AVISO
- Calculates long-period equilibrium tides (LPET) at points and times

* Uses the summation of fifteen tidal spectral lines from `Cartwright and Edden, (1973) <https://doi.org/10.1111/j.1365-246X.1973.tb03420.x>`_
- Calculates radial pole load tides (LPT) at points and times

* Following `IERS Convention (2010) guidelines <https://iers-conventions.obspm.fr/chapter7.php>`_
- Calculates radial ocean pole load tides (OPT) at points and times

* Following `IERS Convention (2010) guidelines <https://iers-conventions.obspm.fr/chapter7.php>`_
- Calculates radial solid earth tides (SET) at points and times

* Following `IERS Convention (2010) guidelines <https://iers-conventions.obspm.fr/chapter7.php>`_

Calling Sequence
----------------

.. code-block:: python

import pyTMD
tide_h = pyTMD.compute.tide_elevations(x, y, delta_time,
DIRECTORY=DIRECTORY, MODEL=MODEL, EPOCH=(2000,1,1,0,0,0),
EPSG=3031, TYPE='drift')
tide_uv = pyTMD.compute.tide_currents(x, y, delta_time,
DIRECTORY=DIRECTORY, MODEL=MODEL, EPOCH=(2000,1,1,0,0,0),
EPSG=3031, TYPE='drift')

`Source code`__

.. __: https://github.com/tsutterley/pyTMD/blob/main/pyTMD/compute.py

.. autofunction:: pyTMD.compute.corrections

.. autofunction:: pyTMD.compute.tide_elevations

.. autofunction:: pyTMD.compute.tide_currents

.. autofunction:: pyTMD.compute.LPET_elevations

.. autofunction:: pyTMD.compute.LPT_displacements

.. autofunction:: pyTMD.compute.OPT_displacements

.. autofunction:: pyTMD.compute.SET_displacements
41 changes: 0 additions & 41 deletions doc/source/api_reference/compute_tide_corrections.rst

This file was deleted.

9 changes: 5 additions & 4 deletions doc/source/api_reference/io/ATLAS.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
========
io.ATLAS
========
=====
ATLAS
=====

- Reads netCDF format tidal solutions provided by Ohio State University and ESR
- Spatially interpolates tidal constituents to input coordinates
Expand All @@ -12,7 +12,8 @@ Calling Sequence

import pyTMD.io
amp,ph,D,c = pyTMD.io.ATLAS.extract_constants(ilon, ilat, grid_file, model_files,
type='z', method='spline')
type='z',
method='spline')

`Source code`__

Expand Down
6 changes: 3 additions & 3 deletions doc/source/api_reference/io/FES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
======
io.FES
======
===
FES
===

- Reads files for Finite Element Solution (FES), Empirical Ocean Tide (EOT), and Hamburg direct data Assimilation Methods for Tides (HAMTIDE) models

Expand Down
8 changes: 4 additions & 4 deletions doc/source/api_reference/io/GOT.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
======
io.GOT
======
===
GOT
===

- Reads files for Richard Ray's Global Ocean Tide (GOT) models
- Spatially interpolates tidal constituents to input coordinates
Expand All @@ -11,7 +11,7 @@ Calling Sequence
.. code-block:: python

import pyTMD.io
amp,ph,c = pyTMD.io.GOT.extract_constants(ilon,i lat, model_files,
amp,ph,c = pyTMD.io.GOT.extract_constants(ilon, ilat, model_files,
method='spline')

`Source code`__
Expand Down
12 changes: 7 additions & 5 deletions doc/source/api_reference/io/OTIS.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=======
io.OTIS
=======
====
OTIS
====

- Reads OTIS format tidal solutions provided by Ohio State University and ESR

Expand All @@ -16,8 +16,10 @@ Calling Sequence
.. code-block:: python

import pyTMD.io
amp,ph,D,c = pyTMD.io.OTIS.extract_constants(ilon, ilat, grid_file, model_file,
EPSG, type='z', method='spline', grid='OTIS')
amp,ph,D,c = pyTMD.io.OTIS.extract_constants(ilon, ilat, grid_file, model_file, EPSG,
type='z',
method='spline',
grid='OTIS')

`Source code`__

Expand Down
6 changes: 3 additions & 3 deletions doc/source/api_reference/io/constituents.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===============
io.constituents
===============
============
constituents
============

Basic tide model constituent class

Expand Down
14 changes: 14 additions & 0 deletions doc/source/api_reference/io/io.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
==
io
==

.. toctree::
:maxdepth: 1

ATLAS.rst
FES.rst
GOT.rst
OTIS.rst
constituents.rst
model.rst
ocean_pole_tide.rst
6 changes: 3 additions & 3 deletions doc/source/api_reference/io/model.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
========
io.model
========
=====
model
=====

Retrieves tide model parameters for named tide models and from model definition files

Expand Down
6 changes: 3 additions & 3 deletions doc/source/api_reference/io/ocean_pole_tide.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
==================
io.ocean_pole_tide
==================
===============
ocean_pole_tide
===============

- Reads ocean pole load tide coefficients provided by IERS as computed by `Desai et al. (2002) <https://doi.org/10.1029/2001JC001224>`_ and `Desai et al. (2015) <https://doi.org/10.1007/s00190-015-0848-7>`_
- See `materials from Chapter 7 of the IERS Conventions <https://webtai.bipm.org/iers/convupdt/convupdt_c7.html>`_
Expand Down
2 changes: 0 additions & 2 deletions doc/source/api_reference/predict.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ Calling Sequence

.. autofunction:: pyTMD.predict.solid_earth_tide

.. autofunction:: pyTMD.predict._constituent_parameters

.. autofunction:: pyTMD.predict._out_of_phase_diurnal

.. autofunction:: pyTMD.predict._out_of_phase_semidiurnal
Expand Down
19 changes: 14 additions & 5 deletions doc/source/getting_started/Getting-Started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,23 @@ Programs
########

For users wanting to compute tide corrections for use with numpy arrays or pandas dataframes
`compute_tide_corrections() <https://github.com/tsutterley/pyTMD/blob/main/pyTMD/compute_tide_corrections.py>`_
is the place to start. It is a function that takes ``x``, ``y``, and ``time`` coordinates and
computes the corresponding tidal elevation.
`pyTMD.compute <https://github.com/tsutterley/pyTMD/blob/main/pyTMD/compute.py>`_
is the place to start.
These are a series of functions that take ``x``, ``y``, and ``time`` coordinates and
compute the corresponding tidal elevation or currents.

.. code-block:: python

tide = compute_tide_corrections(x, y, delta_time, DIRECTORY=path_to_tide_models,
MODEL='CATS2008', EPSG=3031, EPOCH=(2000,1,1,0,0,0), TYPE='drift', TIME='GPS',
import pyTMD
tide_h = pyTMD.compute.tide_elevations(x, y, delta_time,
DIRECTORY=path_to_tide_models,
MODEL='CATS2008', EPSG=3031, EPOCH=(2000,1,1,0,0,0),
TYPE='drift', TIME='GPS',
METHOD='spline', FILL_VALUE=np.nan)
tide_uv = pyTMD.compute.tide_currents(x, y, delta_time,
DIRECTORY=path_to_tide_models,
MODEL='CATS2008', EPSG=3031, EPOCH=(2000,1,1,0,0,0),
TYPE='drift', TIME='GPS',
METHOD='spline', FILL_VALUE=np.nan)


Expand Down
48 changes: 46 additions & 2 deletions doc/source/getting_started/Glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,25 @@ Glossary

.. glossary::

Aliasing
spurious tidal frequency appearing in an analysis due to inadequate temporal sampling

Amplitude
one half of the range of a tidal constituent

Anomaly
angular distance between the perihelion and the position of a celestial body

Apogee
point of an orbit where a celestial body is furthest to Earth

see :term:`Perigee`

Aphelion
point of an orbit where a celestial body is furthest from the sun

see :term:`Perihelion`

Ascending Node
point of an orbit where a celestial body intersects the ecliptic, and the latitude coordinate is increasing

Expand All @@ -23,7 +36,10 @@ Glossary
small, semi-periodic deviations in the motion of the pole of rotation

Constituent
tidal oscillation corresponding with a specific periodic motion of the Earth, Sun and Moon
see :term:`Harmonic Constituents`

Declination
angular distance of an astronomical body north or south of the celestial equator

Descending Node
point of an orbit where a celestial body intersects the ecliptic, and the latitude coordinate is decreasing
Expand All @@ -43,6 +59,27 @@ Glossary
Epoch
fixed point in time used as a reference value

Equilibrium Tide
hypothetical tide produced solely by lunisolar gravitational forces under equilibrium theory

Frequency
number of cycles in a unit time

Geoid
equipotential surface coinciding with the ocean surface in the absence of astronomical or dynamical effects

Harmonic Analysis
mathematical process by which the tides are separated into :term:`Harmonic Constituents`

Harmonic Constants
amplitude and phase of the :term:`Harmonic Constituents`

Harmonic Constituents
harmonic elements of the tide-producing force corresponding with a periodic change of relative position of the Earth, Sun and Moon

Harmonic Prediction
Method of estimating tidal elevations and currents through a combination of the :term:`Harmonic Constituents`

Load Tide
elastic deformation of the solid Earth due to ocean and atmospheric tides

Expand All @@ -55,6 +92,9 @@ Glossary
Mean Tide
model with both direct and indirect permanent tidal effects retained

Nodal Corrections
adjustments to the amplitudes and phases of harmonic constituents to allow for periodic modulations

Nutation
short-period oscillations in the motion of the pole of rotation

Expand All @@ -67,9 +107,13 @@ Glossary
Perigee
point of an orbit where a celestial body is closest to Earth

see :term:`Apogee`

Perihelion
point of an orbit where a celestial body is closest to the sun

see :term:`Aphelion`

Period
time it takes to make one complete revolution

Expand All @@ -92,7 +136,7 @@ Glossary

Tidal Species
classification of tidal constituents based on period

see :term:`Semi-diurnal Tide`, :term:`Diurnal Tide`, and :term:`Long Period Tide`

Tidal Stream
Expand Down
10 changes: 2 additions & 8 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,13 @@ ocean, load, solid Earth and pole tides
api_reference/arguments.rst
api_reference/astro.rst
api_reference/check_points.rst
api_reference/compute_tide_corrections.rst
api_reference/compute.rst
api_reference/constants.rst
api_reference/crs.rst
api_reference/ellipse.rst
api_reference/eop.rst
api_reference/interpolate.rst
api_reference/io/ATLAS.rst
api_reference/io/FES.rst
api_reference/io/GOT.rst
api_reference/io/OTIS.rst
api_reference/io/constituents.rst
api_reference/io/model.rst
api_reference/io/ocean_pole_tide.rst
api_reference/io/io.rst
api_reference/predict.rst
api_reference/solve.rst
api_reference/spatial.rst
Expand Down
Loading
Loading