pyTMD 2.1.8__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. {pytmd-2.1.8 → pytmd-2.2.0}/CITATION.cff +2 -2
  2. {pytmd-2.1.8 → pytmd-2.2.0}/PKG-INFO +2 -1
  3. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/__init__.py +2 -1
  4. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/arguments.py +145 -130
  5. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/astro.py +36 -255
  6. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/check_points.py +8 -113
  7. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/compute.py +142 -3
  8. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/ellipse.py +2 -16
  9. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/eop.py +3 -22
  10. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/io/ATLAS.py +14 -3
  11. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/io/FES.py +12 -2
  12. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/io/GOT.py +12 -2
  13. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/io/IERS.py +4 -21
  14. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/io/OTIS.py +21 -10
  15. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/io/model.py +1 -14
  16. pytmd-2.2.0/pyTMD/math.py +234 -0
  17. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/predict.py +24 -261
  18. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/solve/constants.py +2 -10
  19. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/spatial.py +139 -91
  20. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/time.py +2 -16
  21. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD.egg-info/PKG-INFO +2 -1
  22. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD.egg-info/SOURCES.txt +1 -0
  23. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD.egg-info/requires.txt +1 -0
  24. {pytmd-2.1.8 → pytmd-2.2.0}/pyproject.toml +2 -1
  25. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/compute_tidal_currents.py +10 -3
  26. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/compute_tidal_elevations.py +12 -3
  27. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/reduce_OTIS_files.py +6 -5
  28. pytmd-2.2.0/version.txt +1 -0
  29. pytmd-2.1.8/version.txt +0 -1
  30. {pytmd-2.1.8 → pytmd-2.2.0}/.gitignore +0 -0
  31. {pytmd-2.1.8 → pytmd-2.2.0}/CODE_OF_CONDUCT.rst +0 -0
  32. {pytmd-2.1.8 → pytmd-2.2.0}/CONTRIBUTORS.rst +0 -0
  33. {pytmd-2.1.8 → pytmd-2.2.0}/LICENSE +0 -0
  34. {pytmd-2.1.8 → pytmd-2.2.0}/MANIFEST.in +0 -0
  35. {pytmd-2.1.8 → pytmd-2.2.0}/README.rst +0 -0
  36. {pytmd-2.1.8 → pytmd-2.2.0}/providers/AVISO.json +0 -0
  37. {pytmd-2.1.8 → pytmd-2.2.0}/providers/ESR.json +0 -0
  38. {pytmd-2.1.8 → pytmd-2.2.0}/providers/GSFC.json +0 -0
  39. {pytmd-2.1.8 → pytmd-2.2.0}/providers/README.rst +0 -0
  40. {pytmd-2.1.8 → pytmd-2.2.0}/providers/TPXO.json +0 -0
  41. {pytmd-2.1.8 → pytmd-2.2.0}/providers/_model_to_database.py +0 -0
  42. {pytmd-2.1.8 → pytmd-2.2.0}/providers/_providers_to_database.py +0 -0
  43. {pytmd-2.1.8 → pytmd-2.2.0}/providers/_update_providers.py +0 -0
  44. {pytmd-2.1.8 → pytmd-2.2.0}/providers/providers.json +0 -0
  45. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/compute_tide_corrections.py +0 -0
  46. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/crs.py +0 -0
  47. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/data/ce1973_tab1.txt +0 -0
  48. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/data/ct1971_tab5.txt +0 -0
  49. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/data/database.json +0 -0
  50. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/data/doodson.json +0 -0
  51. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/data/opoleloadcoefcmcor.txt.gz +0 -0
  52. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/data/tab5.2e.txt +0 -0
  53. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/data/tab5.3a.txt +0 -0
  54. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/data/tab5.3b.txt +0 -0
  55. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/interpolate.py +0 -0
  56. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/io/__init__.py +0 -0
  57. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/io/constituents.py +0 -0
  58. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/solve/__init__.py +0 -0
  59. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/tools.py +0 -0
  60. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/utilities.py +0 -0
  61. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD/version.py +0 -0
  62. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD.egg-info/dependency_links.txt +0 -0
  63. {pytmd-2.1.8 → pytmd-2.2.0}/pyTMD.egg-info/top_level.txt +0 -0
  64. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/arcticdata_tides.py +0 -0
  65. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/aviso_fes_tides.py +0 -0
  66. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/compute_LPET_elevations.py +0 -0
  67. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/compute_LPT_displacements.py +0 -0
  68. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/compute_OPT_displacements.py +0 -0
  69. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/compute_SET_displacements.py +0 -0
  70. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/gsfc_got_tides.py +0 -0
  71. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/usap_cats_tides.py +0 -0
  72. {pytmd-2.1.8 → pytmd-2.2.0}/scripts/verify_box_tpxo.py +0 -0
  73. {pytmd-2.1.8 → pytmd-2.2.0}/setup.cfg +0 -0
  74. {pytmd-2.1.8 → pytmd-2.2.0}/setup.py +0 -0
@@ -36,8 +36,8 @@ url: 'https://pytmd.readthedocs.io'
36
36
  repository: 'https://pypi.org/project/pyTMD'
37
37
  repository-artifact: 'https://anaconda.org/conda-forge/pytmd'
38
38
  doi: "10.5281/zenodo.5555395"
39
- version: "2.1.8"
40
- date-released: "2024-11-07"
39
+ version: "2.2.0"
40
+ date-released: "2024-12-20"
41
41
  keywords:
42
42
  - Ocean Tides
43
43
  - Load Tides
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyTMD
3
- Version: 2.1.8
3
+ Version: 2.2.0
4
4
  Summary: Python-based tidal prediction software for estimating ocean, load, solid Earth and pole tides
5
5
  Author: Tyler Sutterley
6
6
  Author-email: tsutterl@uw.edu
@@ -65,6 +65,7 @@ Requires-Dist: myst-nb; extra == "doc"
65
65
  Requires-Dist: numpydoc; extra == "doc"
66
66
  Requires-Dist: sphinx; extra == "doc"
67
67
  Requires-Dist: sphinx-argparse>=0.4; extra == "doc"
68
+ Requires-Dist: sphinxcontrib-bibtex; extra == "doc"
68
69
  Requires-Dist: sphinx-design; extra == "doc"
69
70
  Requires-Dist: sphinx_rtd_theme; extra == "doc"
70
71
  Provides-Extra: all
@@ -16,6 +16,7 @@ import pyTMD.astro
16
16
  import pyTMD.compute
17
17
  import pyTMD.ellipse
18
18
  import pyTMD.interpolate
19
+ import pyTMD.math
19
20
  import pyTMD.predict
20
21
  import pyTMD.spatial
21
22
  import pyTMD.tools
@@ -23,7 +24,6 @@ import pyTMD.utilities
23
24
  import pyTMD.version
24
25
  from pyTMD import io
25
26
  from pyTMD import solve
26
- from pyTMD.check_points import check_points
27
27
  from pyTMD.crs import (
28
28
  crs,
29
29
  datum,
@@ -31,6 +31,7 @@ from pyTMD.crs import (
31
31
  )
32
32
 
33
33
  # Deprecated functions
34
+ from pyTMD.check_points import check_points
34
35
  from pyTMD.compute_tide_corrections import (
35
36
  compute_corrections,
36
37
  compute_tide_corrections,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  u"""
3
3
  arguments.py
4
- Written by Tyler Sutterley (11/2024)
4
+ Written by Tyler Sutterley (12/2024)
5
5
  Calculates the nodal corrections for tidal constituents
6
6
  Modification of ARGUMENTS fortran subroutine by Richard Ray 03/1999
7
7
 
@@ -27,6 +27,7 @@ PYTHON DEPENDENCIES:
27
27
 
28
28
  PROGRAM DEPENDENCIES:
29
29
  astro.py: computes the basic astronomical mean longitudes
30
+ math.py: Special functions of mathematical physics
30
31
 
31
32
  REFERENCES:
32
33
  A. T. Doodson and H. Warburg, "Admiralty Manual of Tides", HMSO, (1941).
@@ -38,7 +39,10 @@ REFERENCES:
38
39
  Ocean Tides", Journal of Atmospheric and Oceanic Technology, (2002).
39
40
 
40
41
  UPDATE HISTORY:
42
+ Updated 12/2024: added function to calculate tidal aliasing periods
41
43
  Updated 11/2024: allow variable case for Doodson number formalisms
44
+ fix species in constituent parameters for complex tides
45
+ move body tide Love/Shida numbers from predict module
42
46
  Updated 10/2024: can convert Doodson numbers formatted as strings
43
47
  update Doodson number conversions to follow Cartwright X=10 convention
44
48
  add function to parse Cartwright/Tayler/Edden tables
@@ -89,9 +93,11 @@ __all__ = [
89
93
  "doodson_number",
90
94
  "nodal",
91
95
  "frequency",
96
+ "aliasing_period",
92
97
  "_arguments_table",
93
98
  "_minor_table",
94
99
  "_constituent_parameters",
100
+ "_love_numbers",
95
101
  "_parse_tide_potential_table",
96
102
  "_to_doodson_number",
97
103
  "_to_extended_doodson",
@@ -106,7 +112,7 @@ def arguments(
106
112
  ):
107
113
  """
108
114
  Calculates the nodal corrections for tidal constituents
109
- [1]_ [2]_ [3]_ [4]_
115
+ :cite:p:`Doodson:1941td` :cite:p:`Schureman:1958ty` :cite:p:`Foreman:1989dt` :cite:p:`Egbert:2002ge`
110
116
 
111
117
  Parameters
112
118
  ----------
@@ -133,23 +139,6 @@ def arguments(
133
139
  nodal factor correction
134
140
  G: np.ndarray
135
141
  phase correction in degrees
136
-
137
- References
138
- ----------
139
- .. [1] A. T. Doodson and H. D. Warburg, "Admiralty Manual of Tides",
140
- HMSO, London, (1941).
141
- .. [2] P. Schureman, "Manual of Harmonic Analysis and Prediction of Tides,"
142
- *US Coast and Geodetic Survey*, Special Publication, 98, (1958).
143
- .. [3] M. G. G. Foreman and R. F. Henry, "The harmonic analysis of tidal
144
- model time series," *Advances in Water Resources*, 12(3), 109--120,
145
- (1989). `doi: 10.1016/0309-1708(89)90017-1
146
- <https://doi.org/10.1016/0309-1708(89)90017-1>`_
147
- .. [4] G. D. Egbert and S. Y. Erofeeva, "Efficient Inverse Modeling of
148
- Barotropic Ocean Tides," *Journal of Atmospheric and Oceanic
149
- Technology*, 19(2), 183--204, (2002).
150
- `doi: 10.1175/1520-0426(2002)019<0183:EIMOBO>2.0.CO;2`__
151
-
152
- .. __: https://doi.org/10.1175/1520-0426(2002)019<0183:EIMOBO>2.0.CO;2
153
142
  """
154
143
  # set default keyword arguments
155
144
  kwargs.setdefault('deltat', 0.0)
@@ -189,7 +178,9 @@ def minor_arguments(
189
178
  ):
190
179
  """
191
180
  Calculates the nodal corrections for minor tidal constituents
192
- in order to infer their values [1]_ [2]_ [3]_ [4]_
181
+ in order to infer their values :cite:p:`Doodson:1941td` :cite:p:`Schureman:1958ty`
182
+ :cite:p:`Foreman:1989dt` :cite:p:`Egbert:2002ge`
183
+
193
184
 
194
185
  Parameters
195
186
  ----------
@@ -208,23 +199,6 @@ def minor_arguments(
208
199
  nodal factor correction
209
200
  G: np.ndarray
210
201
  phase correction in degrees
211
-
212
- References
213
- ----------
214
- .. [1] A. T. Doodson and H. D. Warburg, "Admiralty Manual of Tides",
215
- HMSO, London, (1941).
216
- .. [2] P. Schureman, "Manual of Harmonic Analysis and Prediction of Tides,"
217
- *US Coast and Geodetic Survey*, Special Publication, 98, (1958).
218
- .. [3] M. G. G. Foreman and R. F. Henry, "The harmonic analysis of tidal
219
- model time series," *Advances in Water Resources*, 12(3), 109--120,
220
- (1989). `doi: 10.1016/0309-1708(89)90017-1
221
- <https://doi.org/10.1016/0309-1708(89)90017-1>`_
222
- .. [4] G. D. Egbert and S. Y. Erofeeva, "Efficient Inverse Modeling of
223
- Barotropic Ocean Tides," *Journal of Atmospheric and Oceanic
224
- Technology*, 19(2), 183--204, (2002).
225
- `doi: 10.1175/1520-0426(2002)019<0183:EIMOBO>2.0.CO;2`__
226
-
227
- .. __: https://doi.org/10.1175/1520-0426(2002)019<0183:EIMOBO>2.0.CO;2
228
202
  """
229
203
  # set default keyword arguments
230
204
  kwargs.setdefault('deltat', 0.0)
@@ -358,7 +332,8 @@ def coefficients_table(
358
332
  **kwargs
359
333
  ):
360
334
  """
361
- Doodson table coefficients for tidal constituents [1]_ [2]_
335
+ Doodson table coefficients for tidal constituents
336
+ :cite:p:`Doodson:1921kt` :cite:p:`Doodson:1941td`
362
337
 
363
338
  Parameters
364
339
  ----------
@@ -373,16 +348,6 @@ def coefficients_table(
373
348
  -------
374
349
  coef: np.ndarray
375
350
  Doodson coefficients (Cartwright numbers) for each constituent
376
-
377
- References
378
- ----------
379
- .. [1] A. T. Doodson and H. Lamb, "The harmonic development of
380
- the tide-generating potential", *Proceedings of the Royal Society
381
- of London. Series A, Containing Papers of a Mathematical and
382
- Physical Character*, 100(704), 305--329, (1921).
383
- `doi: 10.1098/rspa.1921.0088 <https://doi.org/10.1098/rspa.1921.0088>`_
384
- .. [2] A. T. Doodson and H. D. Warburg, "Admiralty Manual of Tides",
385
- HMSO, London, (1941).
386
351
  """
387
352
  # set default keyword arguments
388
353
  kwargs.setdefault('corrections', 'OTIS')
@@ -431,7 +396,7 @@ def doodson_number(
431
396
  ):
432
397
  """
433
398
  Calculates the Doodson or Cartwright number for
434
- tidal constituents [1]_
399
+ tidal constituents :cite:p:`Doodson:1921kt`
435
400
 
436
401
  Parameters
437
402
  ----------
@@ -452,14 +417,6 @@ def doodson_number(
452
417
  -------
453
418
  numbers: float, np.ndarray or dict
454
419
  Doodson or Cartwright number for each constituent
455
-
456
- References
457
- ----------
458
- .. [1] A. T. Doodson and H. Lamb, "The harmonic development of
459
- the tide-generating potential", *Proceedings of the Royal Society
460
- of London. Series A, Containing Papers of a Mathematical and
461
- Physical Character*, 100(704), 305--329, (1921).
462
- `doi: 10.1098/rspa.1921.0088 <https://doi.org/10.1098/rspa.1921.0088>`_
463
420
  """
464
421
  # set default keyword arguments
465
422
  kwargs.setdefault('corrections', 'OTIS')
@@ -524,7 +481,7 @@ def nodal(
524
481
  ):
525
482
  """
526
483
  Calculates the nodal corrections for tidal constituents
527
- [1]_ [2]_ [3]_ [4]_
484
+ :cite:p:`Doodson:1941td` :cite:p:`Schureman:1958ty` :cite:p:`Foreman:1989dt` :cite:p:`Ray:1999vm`
528
485
 
529
486
  Calculates factors for compound tides using recursion
530
487
 
@@ -551,20 +508,6 @@ def nodal(
551
508
  nodal factor correction
552
509
  u: np.ndarray
553
510
  nodal angle correction
554
-
555
- References
556
- ----------
557
- .. [1] A. T. Doodson and H. D. Warburg, "Admiralty Manual of Tides",
558
- HMSO, London, (1941).
559
- .. [2] P. Schureman, "Manual of Harmonic Analysis and Prediction of Tides,"
560
- *US Coast and Geodetic Survey*, Special Publication, 98, (1958).
561
- .. [3] M. G. G. Foreman and R. F. Henry, "The harmonic analysis of tidal
562
- model time series," *Advances in Water Resources*, 12(3), 109--120,
563
- (1989). `doi: 10.1016/0309-1708(89)90017-1
564
- <https://doi.org/10.1016/0309-1708(89)90017-1>`_
565
- .. [4] R. D. Ray, "A global ocean tide model from
566
- Topex/Poseidon altimetry: GOT99.2",
567
- NASA Goddard Space Flight Center, TM-1999-209478, (1999).
568
511
  """
569
512
  # set default keyword arguments
570
513
  kwargs.setdefault('corrections', 'OTIS')
@@ -1228,7 +1171,7 @@ def frequency(
1228
1171
  **kwargs
1229
1172
  ):
1230
1173
  """
1231
- Calculates the angular frequency for tidal constituents [1]_
1174
+ Calculates the angular frequency for tidal constituents :cite:p:`Ray:1999vm`
1232
1175
 
1233
1176
  Parameters
1234
1177
  ----------
@@ -1247,12 +1190,6 @@ def frequency(
1247
1190
  -------
1248
1191
  omega: np.ndarray
1249
1192
  angular frequency in radians per second
1250
-
1251
- References
1252
- ----------
1253
- .. [1] R. D. Ray, "A global ocean tide model from
1254
- Topex/Poseidon altimetry: GOT99.2",
1255
- NASA Goddard Space Flight Center, TM-1999-209478, (1999).
1256
1193
  """
1257
1194
  # set default keyword arguments
1258
1195
  kwargs.setdefault('corrections', 'OTIS')
@@ -1284,9 +1221,48 @@ def frequency(
1284
1221
  omega = 2.0*np.pi*fd/360.0
1285
1222
  return omega
1286
1223
 
1224
+ def aliasing_period(
1225
+ constituents: list | np.ndarray,
1226
+ sampling: float | np.ndarray,
1227
+ **kwargs
1228
+ ):
1229
+ """
1230
+ Calculates the tidal aliasing for a repeat period
1231
+
1232
+ Parameters
1233
+ ----------
1234
+ constituents: list
1235
+ tidal constituent IDs
1236
+ sampling: float
1237
+ sampling repeat period in seconds
1238
+ corrections: str, default 'OTIS'
1239
+ use nodal corrections from OTIS, FES or GOT models
1240
+ M1: str, default 'perth5'
1241
+ coefficients to use for M1 tides
1242
+
1243
+ - ``'Doodson'``
1244
+ - ``'Ray'``
1245
+ - ``'perth5'``
1246
+
1247
+ Returns
1248
+ -------
1249
+ period: np.ndarray
1250
+ tidal aliasing period in seconds
1251
+ """
1252
+ # get the angular frequency for tidal constituents
1253
+ omega = frequency(constituents, **kwargs)
1254
+ # convert to cycles per second
1255
+ f = omega/(2.0*np.pi)
1256
+ # calculate the sampling frequency
1257
+ fs = 1.0/sampling
1258
+ # calculate the aliasing period
1259
+ period = 1.0/pyTMD.math.aliasing(f, fs)
1260
+ # reutrn the aliasing period
1261
+ return period
1262
+
1287
1263
  def _arguments_table(**kwargs):
1288
1264
  """
1289
- Arguments table for tidal constituents [1]_ [2]_
1265
+ Arguments table for tidal constituents :cite:p:`Doodson:1921kt` :cite:p:`Doodson:1941td`
1290
1266
 
1291
1267
  Parameters
1292
1268
  ----------
@@ -1297,16 +1273,6 @@ def _arguments_table(**kwargs):
1297
1273
  -------
1298
1274
  coef: np.ndarray
1299
1275
  Doodson coefficients (Cartwright numbers) for each constituent
1300
-
1301
- References
1302
- ----------
1303
- .. [1] A. T. Doodson and H. Lamb, "The harmonic development of
1304
- the tide-generating potential", *Proceedings of the Royal Society
1305
- of London. Series A, Containing Papers of a Mathematical and
1306
- Physical Character*, 100(704), 305--329, (1921).
1307
- `doi: 10.1098/rspa.1921.0088 <https://doi.org/10.1098/rspa.1921.0088>`_
1308
- .. [2] A. T. Doodson and H. D. Warburg, "Admiralty Manual of Tides",
1309
- HMSO, London, (1941).
1310
1276
  """
1311
1277
  # set default keyword arguments
1312
1278
  kwargs.setdefault('corrections', 'OTIS')
@@ -1333,22 +1299,12 @@ def _arguments_table(**kwargs):
1333
1299
 
1334
1300
  def _minor_table(**kwargs):
1335
1301
  """
1336
- Arguments table for minor tidal constituents [1]_ [2]_
1302
+ Arguments table for minor tidal constituents :cite:p:`Doodson:1921kt` :cite:p:`Doodson:1941td`
1337
1303
 
1338
1304
  Returns
1339
1305
  -------
1340
1306
  coef: np.ndarray
1341
1307
  Doodson coefficients (Cartwright numbers) for each constituent
1342
-
1343
- References
1344
- ----------
1345
- .. [1] A. T. Doodson and H. Lamb, "The harmonic development of
1346
- the tide-generating potential", *Proceedings of the Royal Society
1347
- of London. Series A, Containing Papers of a Mathematical and
1348
- Physical Character*, 100(704), 305--329, (1921).
1349
- `doi: 10.1098/rspa.1921.0088 <https://doi.org/10.1098/rspa.1921.0088>`_
1350
- .. [2] A. T. Doodson and H. D. Warburg, "Admiralty Manual of Tides",
1351
- HMSO, London, (1941).
1352
1308
  """
1353
1309
  # modified Doodson coefficients for constituents
1354
1310
  # using 7 index variables: tau, s, h, p, n, pp, k
@@ -1368,7 +1324,7 @@ def _minor_table(**kwargs):
1368
1324
 
1369
1325
  def _constituent_parameters(c: str, **kwargs):
1370
1326
  """
1371
- Loads parameters for a given tidal constituent
1327
+ Loads parameters for a given tidal constituent :cite:p:`Egbert:2002ge`
1372
1328
 
1373
1329
  Parameters
1374
1330
  ----------
@@ -1389,15 +1345,6 @@ def _constituent_parameters(c: str, **kwargs):
1389
1345
  load love number of tidal constituent
1390
1346
  species: float
1391
1347
  spherical harmonic dependence of quadrupole potential
1392
-
1393
- References
1394
- ----------
1395
- .. [1] G. D. Egbert and S. Y. Erofeeva, "Efficient Inverse Modeling of
1396
- Barotropic Ocean Tides," *Journal of Atmospheric and Oceanic
1397
- Technology*, 19(2), 183--204, (2002).
1398
- `doi: 10.1175/1520-0426(2002)019<0183:EIMOBO>2.0.CO;2`__
1399
-
1400
- .. __: https://doi.org/10.1175/1520-0426(2002)019<0183:EIMOBO>2.0.CO;2
1401
1348
  """
1402
1349
  # default keyword arguments
1403
1350
  kwargs.setdefault('raise_error', False)
@@ -1408,7 +1355,7 @@ def _constituent_parameters(c: str, **kwargs):
1408
1355
  'msf', 'sa', 'mt', '2q1']
1409
1356
  # species type (spherical harmonic dependence of quadrupole potential)
1410
1357
  _species = np.array([2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1,
1411
- 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
1358
+ 1, 1, 0, 0, 0, 4, 4, 4, 6, 8, 3, 6, 2, 3, 0, 0, 0, 1])
1412
1359
  # Load Love numbers
1413
1360
  # alpha = correction factor for first order load tides
1414
1361
  _alpha = np.array([0.693, 0.693, 0.736, 0.695, 0.693, 0.706, 0.693,
@@ -1419,7 +1366,7 @@ def _constituent_parameters(c: str, **kwargs):
1419
1366
  _omega = np.array([1.405189e-04, 1.454441e-04, 7.292117e-05, 6.759774e-05,
1420
1367
  1.378797e-04, 7.252295e-05, 1.458423e-04, 6.495854e-05, 1.352405e-04,
1421
1368
  1.355937e-04, 1.382329e-04, 1.431581e-04, 1.452450e-04, 7.556036e-05,
1422
- 7.028195e-05, 7.824458e-05, 6.531174e-05, 0.053234e-04, 0.026392e-04,
1369
+ 7.025945e-05, 7.824458e-05, 6.531174e-05, 0.053234e-04, 0.026392e-04,
1423
1370
  0.003982e-04, 2.810377e-04, 2.859630e-04, 2.783984e-04, 4.215566e-04,
1424
1371
  5.620755e-04, 2.134402e-04, 4.363323e-04, 1.503693e-04, 2.081166e-04,
1425
1372
  4.925200e-06, 1.990970e-07, 7.962619e-06, 6.231934e-05])
@@ -1428,10 +1375,10 @@ def _constituent_parameters(c: str, **kwargs):
1428
1375
  # the forcing for that constituent is zero on the Greenwich meridian
1429
1376
  _phase = np.array([1.731557546, 0.000000000, 0.173003674, 1.558553872,
1430
1377
  6.050721243, 6.110181633, 3.487600001, 5.877717569, 4.086699633,
1431
- 3.463115091, 5.427136701, 0.553986502, 0.052841931, 2.137025284,
1432
- 2.436575100, 1.929046130, 5.254133027, 1.756042456, 1.964021610,
1378
+ 3.463115091, 5.427136701, 0.553986502, 0.050398470, 2.137025284,
1379
+ 2.436575000, 1.929046130, 5.254133027, 1.756042456, 1.964021610,
1433
1380
  3.487600001, 3.463115091, 1.731557546, 1.499093481, 5.194672637,
1434
- 6.926230184, 1.904561220, 0.000000000, 4.551627762, 3.809122439,
1381
+ 6.926230184, 1.904561220, 0.000000000, 4.551627762, 3.290111417,
1435
1382
  4.551627762, 6.232786837, 3.720064066, 3.91369596])
1436
1383
  # amplitudes of equilibrium tide in meters
1437
1384
  # _amplitude = np.array([0.242334,0.112743,0.141565,0.100661,0.046397,
@@ -1461,13 +1408,94 @@ def _constituent_parameters(c: str, **kwargs):
1461
1408
  # return the values for the constituent
1462
1409
  return (amplitude, phase, omega, alpha, species)
1463
1410
 
1411
+ def _love_numbers(
1412
+ omega: np.ndarray,
1413
+ model: str = 'PREM'
1414
+ ):
1415
+ """
1416
+ Compute the body tide Love/Shida numbers for a given
1417
+ frequency :cite:p:`Wahr:1981ea` :cite:p:`Wahr:1981if` :cite:p:`Mathews:1995go`
1418
+
1419
+ Parameters
1420
+ ----------
1421
+ omega: np.ndarray
1422
+ angular frequency (radians per second)
1423
+ model: str, default 'PREM'
1424
+ Earth model to use for Love numbers
1425
+
1426
+ - '1066A'
1427
+ - 'PEM-C'
1428
+ - 'C2'
1429
+ - 'PREM'
1430
+
1431
+ Returns
1432
+ -------
1433
+ h2: float
1434
+ Degree-2 Love number of vertical displacement
1435
+ k2: float
1436
+ Degree-2 Love number of gravitational potential
1437
+ l2: float
1438
+ Degree-2 Love (Shida) number of horizontal displacement
1439
+ """
1440
+ # free core nutation frequencies (cycles per sidereal day) and
1441
+ # Love number parameters from Wahr (1981) table 6
1442
+ # and Mathews et al. (1995) table 3
1443
+ if (model == '1066A'):
1444
+ fcn = 1.0021714
1445
+ h0, h1 = np.array([6.03e-1, -2.46e-3])
1446
+ k0, k1 = np.array([2.98e-1, -1.23e-3])
1447
+ l0, l1 = np.array([8.42e-2, 7.81e-5])
1448
+ elif (model == 'PEM-C'):
1449
+ fcn = 1.0021771
1450
+ h0, h1 = np.array([6.02e-1, -2.46e-3])
1451
+ k0, k1 = np.array([2.98e-1, -1.24e-3])
1452
+ l0, l1 = np.array([8.39e-2, 7.69e-5])
1453
+ elif (model == 'C2'):
1454
+ fcn = 1.0021844
1455
+ h0, h1 = np.array([6.02e-1, -2.45e-3])
1456
+ k0, k1 = np.array([2.98e-1, -1.23e-3])
1457
+ l0, l1 = np.array([8.46e-2, 7.58e-5])
1458
+ elif (model == 'PREM'):
1459
+ fcn = 1.0023214
1460
+ h0, h1 = np.array([5.994e-1, -2.532e-3])
1461
+ k0, k1 = np.array([2.962e-1, -1.271e-3])
1462
+ l0, l1 = np.array([8.378e-2, 7.932e-5])
1463
+ else:
1464
+ raise ValueError(f'Unknown Earth model: {model}')
1465
+ # Love numbers for different frequency bands
1466
+ if (omega > 1e-4):
1467
+ # tides in the semi-diurnal band
1468
+ h2 = 0.609
1469
+ k2 = 0.302
1470
+ l2 = 0.0852
1471
+ elif (omega < 2e-5):
1472
+ # tides in the long period band
1473
+ h2 = 0.606
1474
+ k2 = 0.299
1475
+ l2 = 0.0840
1476
+ else:
1477
+ # use resonance formula for tides in the diurnal band
1478
+ # frequency of the o1 tides (radians/second)
1479
+ omega_o1, = frequency('o1')
1480
+ # frequency of free core nutation (radians/second)
1481
+ omega_fcn = fcn*7292115e-11
1482
+ # Love numbers for frequency using equation 4.18 of Wahr (1981)
1483
+ # (simplification to use only the free core nutation term)
1484
+ ratio = (omega - omega_o1)/(omega_fcn - omega)
1485
+ h2 = h0 + h1*ratio
1486
+ k2 = k0 + k1*ratio
1487
+ l2 = l0 + l1*ratio
1488
+ # return the Love numbers for frequency
1489
+ return (h2, k2, l2)
1490
+
1464
1491
  # Cartwright and Tayler (1971) table with 3rd-degree values
1465
1492
  _ct1971_table_5 = get_data_path(['data','ct1971_tab5.txt'])
1466
1493
  # Cartwright and Edden (1973) table with updated values
1467
1494
  _ce1973_table_1 = get_data_path(['data','ce1973_tab1.txt'])
1468
1495
 
1469
1496
  def _parse_tide_potential_table(table: str | pathlib.Path):
1470
- """Parse tables of tide-generating potential from [1]_ and [2]_
1497
+ """Parse tables of tide-generating potential from
1498
+ :cite:p:`Cartwright:1971iz` and :cite:p:`Cartwright:1973em`
1471
1499
 
1472
1500
  Parameters
1473
1501
  ----------
@@ -1478,19 +1506,6 @@ def _parse_tide_potential_table(table: str | pathlib.Path):
1478
1506
  -------
1479
1507
  CTE: float
1480
1508
  Cartwright-Tayler-Edden table values
1481
-
1482
- References
1483
- ----------
1484
- .. [1] D. E. Cartwright and R. J. Tayler,
1485
- "New Computations of the Tide-generating Potential,"
1486
- *Geophysical Journal of the Royal Astronomical Society*,
1487
- 23(1), 45--73. (1971). `doi: 10.1111/j.1365-246X.1971.tb01803.x
1488
- <https://doi.org/10.1111/j.1365-246X.1971.tb01803.x>`_
1489
- .. [2] D. E. Cartwright and A. C. Edden,
1490
- "Corrected Tables of Tidal Harmonics,"
1491
- *Geophysical Journal of the Royal Astronomical Society*,
1492
- 33(3), 253--264, (1973). `doi: 10.1111/j.1365-246X.1973.tb03420.x
1493
- <https://doi.org/10.1111/j.1365-246X.1973.tb03420.x>`_
1494
1509
  """
1495
1510
  # verify table path
1496
1511
  table = pathlib.Path(table).expanduser().absolute()