earth-tides 1.0.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 (65) hide show
  1. earth_tides-1.0.0/LICENSE +78 -0
  2. earth_tides-1.0.0/PKG-INFO +211 -0
  3. earth_tides-1.0.0/README.md +122 -0
  4. earth_tides-1.0.0/README_PyPI.md +115 -0
  5. earth_tides-1.0.0/pyproject.toml +36 -0
  6. earth_tides-1.0.0/setup.cfg +4 -0
  7. earth_tides-1.0.0/src/earth_tides.egg-info/PKG-INFO +211 -0
  8. earth_tides-1.0.0/src/earth_tides.egg-info/SOURCES.txt +63 -0
  9. earth_tides-1.0.0/src/earth_tides.egg-info/dependency_links.txt +1 -0
  10. earth_tides-1.0.0/src/earth_tides.egg-info/entry_points.txt +4 -0
  11. earth_tides-1.0.0/src/earth_tides.egg-info/requires.txt +8 -0
  12. earth_tides-1.0.0/src/earth_tides.egg-info/top_level.txt +1 -0
  13. earth_tides-1.0.0/src/earthtides/__init__.py +17 -0
  14. earth_tides-1.0.0/src/earthtides/basis.py +71 -0
  15. earth_tides-1.0.0/src/earthtides/data/HOMOG.dat +30 -0
  16. earth_tides-1.0.0/src/earthtides/data/PREM.dat +107 -0
  17. earth_tides-1.0.0/src/earthtides/data/PREMs.dat +107 -0
  18. earth_tides-1.0.0/src/earthtides/data/Tamura.dat +1200 -0
  19. earth_tides-1.0.0/src/earthtides/data/groups_default.txt +26 -0
  20. earth_tides-1.0.0/src/earthtides/data/hardisp_catalog.txt +344 -0
  21. earth_tides-1.0.0/src/earthtides/data/love_PREM.json +47710 -0
  22. earth_tides-1.0.0/src/earthtides/data/love_PREM_allwaves.json +46740 -0
  23. earth_tides-1.0.0/src/earthtides/docs/earthtides_manual_v1.0.pdf +0 -0
  24. earth_tides-1.0.0/src/earthtides/earthtides_examples.py +57 -0
  25. earth_tides-1.0.0/src/earthtides/etide.py +364 -0
  26. earth_tides-1.0.0/src/earthtides/exact_spheroid.py +103 -0
  27. earth_tides-1.0.0/src/earthtides/examples/README.md +19 -0
  28. earth_tides-1.0.0/src/earthtides/examples/ex1/README.md +78 -0
  29. earth_tides-1.0.0/src/earthtides/examples/ex1/swing.out +17 -0
  30. earth_tides-1.0.0/src/earthtides/examples/ex1/swing.py +115 -0
  31. earth_tides-1.0.0/src/earthtides/examples/ex2/README.md +56 -0
  32. earth_tides-1.0.0/src/earthtides/examples/ex2/drum.out +17 -0
  33. earth_tides-1.0.0/src/earthtides/examples/ex2/drum.py +153 -0
  34. earth_tides-1.0.0/src/earthtides/examples/ex3/README.md +21 -0
  35. earth_tides-1.0.0/src/earthtides/examples/ex3/analytic.py +93 -0
  36. earth_tides-1.0.0/src/earthtides/examples/ex3/homogeneous.out +23 -0
  37. earth_tides-1.0.0/src/earthtides/examples/ex3/homogeneous.py +113 -0
  38. earth_tides-1.0.0/src/earthtides/examples/ex3/modela.dat +37 -0
  39. earth_tides-1.0.0/src/earthtides/examples/ex3/modelb.dat +30 -0
  40. earth_tides-1.0.0/src/earthtides/examples/ex4/HOMOGI.dat +30 -0
  41. earth_tides-1.0.0/src/earthtides/examples/ex4/README.md +59 -0
  42. earth_tides-1.0.0/src/earthtides/examples/ex4/greff2005.out +12 -0
  43. earth_tides-1.0.0/src/earthtides/examples/ex4/greff2005.py +111 -0
  44. earth_tides-1.0.0/src/earthtides/examples/ex5/HOUGH.dat +37 -0
  45. earth_tides-1.0.0/src/earthtides/examples/ex5/README.md +96 -0
  46. earth_tides-1.0.0/src/earthtides/examples/ex5/hough1895.out +11 -0
  47. earth_tides-1.0.0/src/earthtides/examples/ex5/hough1895.py +125 -0
  48. earth_tides-1.0.0/src/earthtides/geometry.py +177 -0
  49. earth_tides-1.0.0/src/earthtides/gravimetry.py +108 -0
  50. earth_tides-1.0.0/src/earthtides/iers.py +87 -0
  51. earth_tides-1.0.0/src/earthtides/jets.py +71 -0
  52. earth_tides-1.0.0/src/earthtides/loadgreen.py +160 -0
  53. earth_tides-1.0.0/src/earthtides/love.py +479 -0
  54. earth_tides-1.0.0/src/earthtides/model.py +147 -0
  55. earth_tides-1.0.0/src/earthtides/refpot.py +166 -0
  56. earth_tides-1.0.0/src/earthtides/solver.py +875 -0
  57. earth_tides-1.0.0/src/earthtides/synthesis.py +151 -0
  58. earth_tides-1.0.0/tests/test_degree1.py +143 -0
  59. earth_tides-1.0.0/tests/test_etide.py +27 -0
  60. earth_tides-1.0.0/tests/test_golden.py +65 -0
  61. earth_tides-1.0.0/tests/test_gravimetry.py +49 -0
  62. earth_tides-1.0.0/tests/test_love.py +134 -0
  63. earth_tides-1.0.0/tests/test_manual.py +36 -0
  64. earth_tides-1.0.0/tests/test_mapping.py +78 -0
  65. earth_tides-1.0.0/tests/test_solver.py +397 -0
@@ -0,0 +1,78 @@
1
+ EARTH-TIDES SOFTWARE LICENSE AGREEMENT
2
+ -------------------------------------
3
+
4
+ Version 1.0
5
+
6
+ Copyright (c) 2026
7
+ TeroMovigo – Earth Innovation Lda ("Licensor")
8
+
9
+ 1. DEFINITIONS
10
+
11
+ "Software" means the earth-tides software package, including source code,
12
+ documentation, and any associated materials provided by the Licensor.
13
+
14
+ "Non-Commercial Use" means use solely for research, academic, educational,
15
+ or other purposes that are not primarily intended for or directed toward
16
+ commercial advantage or monetary compensation.
17
+
18
+ "Commercial Use" means any use that does not qualify as Non-Commercial Use,
19
+ including use by for-profit entities, use in connection with revenue-generating
20
+ activities, or use in proprietary products or services.
21
+
22
+ 2. GRANT OF LICENSE
23
+
24
+ Subject to the terms of this Agreement, the Licensor hereby grants a
25
+ non-exclusive, non-transferable, royalty-free license to use, reproduce,
26
+ modify, and distribute the Software for Non-Commercial Use.
27
+
28
+ 3. COMMERCIAL USE
29
+
30
+ Commercial Use of the Software is not permitted under this license.
31
+ Any Commercial Use requires a separate written agreement with the Licensor.
32
+
33
+ Commercial entities or individuals intending to use the Software for
34
+ Commercial Use must contact:
35
+
36
+ TeroMovigo – Earth Innovation Lda
37
+ info@teromovigo.com / https://teromovigo.com
38
+
39
+ 4. RESTRICTIONS
40
+
41
+ Except as expressly permitted under this Agreement, you may not:
42
+
43
+ (a) use the Software for Commercial Use;
44
+ (b) sublicense, sell, lease, or otherwise distribute the Software
45
+ for Commercial Use;
46
+ (c) remove or alter any copyright or attribution notices.
47
+
48
+ 5. ATTRIBUTION
49
+
50
+ Any redistribution of the Software, in whole or in part, must retain
51
+ this license text and provide appropriate attribution to the Licensor.
52
+
53
+ 6. OWNERSHIP
54
+
55
+ The Software is licensed, not sold. All intellectual property rights,
56
+ including copyright, remain with the Licensor.
57
+
58
+ 7. NO WARRANTY
59
+
60
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
61
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62
+ FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
63
+
64
+ 8. LIMITATION OF LIABILITY
65
+
66
+ IN NO EVENT SHALL THE LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR
67
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE,
68
+ ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR ITS USE.
69
+
70
+ 9. TERMINATION
71
+
72
+ This license terminates automatically if you breach any of its terms.
73
+ Upon termination, you must cease all use of the Software.
74
+
75
+ 10. GOVERNING LAW
76
+
77
+ This Agreement shall be governed by and construed in accordance with
78
+ the laws of Portugal, without regard to conflict-of-law principles.
@@ -0,0 +1,211 @@
1
+ Metadata-Version: 2.4
2
+ Name: earth-tides
3
+ Version: 1.0.0
4
+ Summary: Solid Earth tides: Love numbers of a rotating, flattened, anelastic Earth by spectral Galerkin-collocation, and station displacements
5
+ Author-email: "Machiel S. Bos" <machiel.bos@teromovigo.com>
6
+ License: EARTH-TIDES SOFTWARE LICENSE AGREEMENT
7
+ -------------------------------------
8
+
9
+ Version 1.0
10
+
11
+ Copyright (c) 2026
12
+ TeroMovigo – Earth Innovation Lda ("Licensor")
13
+
14
+ 1. DEFINITIONS
15
+
16
+ "Software" means the earth-tides software package, including source code,
17
+ documentation, and any associated materials provided by the Licensor.
18
+
19
+ "Non-Commercial Use" means use solely for research, academic, educational,
20
+ or other purposes that are not primarily intended for or directed toward
21
+ commercial advantage or monetary compensation.
22
+
23
+ "Commercial Use" means any use that does not qualify as Non-Commercial Use,
24
+ including use by for-profit entities, use in connection with revenue-generating
25
+ activities, or use in proprietary products or services.
26
+
27
+ 2. GRANT OF LICENSE
28
+
29
+ Subject to the terms of this Agreement, the Licensor hereby grants a
30
+ non-exclusive, non-transferable, royalty-free license to use, reproduce,
31
+ modify, and distribute the Software for Non-Commercial Use.
32
+
33
+ 3. COMMERCIAL USE
34
+
35
+ Commercial Use of the Software is not permitted under this license.
36
+ Any Commercial Use requires a separate written agreement with the Licensor.
37
+
38
+ Commercial entities or individuals intending to use the Software for
39
+ Commercial Use must contact:
40
+
41
+ TeroMovigo – Earth Innovation Lda
42
+ info@teromovigo.com / https://teromovigo.com
43
+
44
+ 4. RESTRICTIONS
45
+
46
+ Except as expressly permitted under this Agreement, you may not:
47
+
48
+ (a) use the Software for Commercial Use;
49
+ (b) sublicense, sell, lease, or otherwise distribute the Software
50
+ for Commercial Use;
51
+ (c) remove or alter any copyright or attribution notices.
52
+
53
+ 5. ATTRIBUTION
54
+
55
+ Any redistribution of the Software, in whole or in part, must retain
56
+ this license text and provide appropriate attribution to the Licensor.
57
+
58
+ 6. OWNERSHIP
59
+
60
+ The Software is licensed, not sold. All intellectual property rights,
61
+ including copyright, remain with the Licensor.
62
+
63
+ 7. NO WARRANTY
64
+
65
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
66
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
67
+ FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
68
+
69
+ 8. LIMITATION OF LIABILITY
70
+
71
+ IN NO EVENT SHALL THE LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR
72
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE,
73
+ ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR ITS USE.
74
+
75
+ 9. TERMINATION
76
+
77
+ This license terminates automatically if you breach any of its terms.
78
+ Upon termination, you must cease all use of the Software.
79
+
80
+ 10. GOVERNING LAW
81
+
82
+ This Agreement shall be governed by and construed in accordance with
83
+ the laws of Portugal, without regard to conflict-of-law principles.
84
+
85
+ Project-URL: Homepage, https://teromovigo.com
86
+ Requires-Python: >=3.10
87
+ Description-Content-Type: text/markdown
88
+ License-File: LICENSE
89
+ Requires-Dist: numpy
90
+ Requires-Dist: scipy
91
+ Provides-Extra: test
92
+ Requires-Dist: pytest; extra == "test"
93
+ Provides-Extra: figures
94
+ Requires-Dist: matplotlib; extra == "figures"
95
+ Dynamic: license-file
96
+
97
+ # earth-tides
98
+
99
+ earth-tides computes solid Earth tides: the Love numbers of a rotating, flattened, layered,
100
+ anelastic and self-gravitating Earth, and the tidal displacement of a station that follows from
101
+ them. The Love numbers are computed directly on the flattened Earth by a spectral method
102
+ (Chebyshev collocation in radius, Galerkin projection along the level surfaces), without
103
+ generalized spherical harmonics or hand-derived perturbation theory. The package is pure Python
104
+ (NumPy and SciPy).
105
+
106
+ ## Quick start
107
+
108
+ earth-tides has no graphical interface and no icon to click: everything happens in a terminal.
109
+ Open one (Windows: *Command Prompt* or *PowerShell*; macOS: *Terminal*; Linux: any shell), then
110
+ **type each command below and press Enter**, waiting for one to finish before starting the next.
111
+
112
+ **Step 1: install earth-tides** (requires Python 3.10 or newer with `pip`):
113
+
114
+ ```bash
115
+ pip install earth-tides
116
+ ```
117
+
118
+ Nothing works until this step has completed successfully.
119
+
120
+ **Step 2: get the examples and the manual:**
121
+
122
+ ```bash
123
+ earthtides-examples
124
+ ```
125
+
126
+ This copies five worked examples and the PDF user manual into a new directory
127
+ `earthtides-examples` in your current location (give a different name as argument if you prefer,
128
+ e.g. `earthtides-examples my_dir`). If the command is not found, step 1 did not finish
129
+ successfully: read its error messages.
130
+
131
+ Open `earthtides_manual_v1.0.pdf` first. It explains the conventions of tidal Love numbers, how
132
+ the solver works, the two programs and every example.
133
+
134
+ **Step 3: compute something.** The body tide at Onsala for one day, hourly, with the Love numbers
135
+ of the IERS Conventions (columns: MJD, up, north, east in metres):
136
+
137
+ ```bash
138
+ etide 57.395 11.926 --start 2026-01-01 --days 1
139
+ ```
140
+
141
+ The Love numbers of PREM for every wave group of the tidal catalogue (about 12 seconds), and the
142
+ same body tide computed with them:
143
+
144
+ ```bash
145
+ earthtides-love -o love.json
146
+ etide 57.395 11.926 --start 2026-01-01 --days 1 --love love.json
147
+ ```
148
+
149
+ **Step 4: run an example.** Each example runs from its own directory and prints the numbers of
150
+ its `.out` file:
151
+
152
+ ```bash
153
+ cd earthtides-examples/ex1
154
+ python swing.py
155
+ ```
156
+
157
+ | example | topic | runtime |
158
+ |:---|:---|---:|
159
+ | ex1 | The pumped swing: trial function, residual and projection in one variable | 1 s |
160
+ | ex2 | The loaded elliptical drum: collocation and projection on level curves | 2 s |
161
+ | ex3 | Homogeneous spheres: exact Bessel solution (Bos & Scherneck 2013) | 2 s |
162
+ | ex4 | Love numbers of a flattened homogeneous Earth (Greff-Lefftz et al. 2005) | 6 min |
163
+ | ex5 | Free core nutation of a rigid shell with a fluid core (Hough 1895) | 20 s |
164
+
165
+ ## Programs
166
+
167
+ | Name | Description |
168
+ |:--- |:--- |
169
+ | `etide` | Body-tide displacement of a station (up, north, east) from the Tamura (1987) tidal potential, with the IERS Love numbers or a table of `earthtides-love` |
170
+ | `earthtides-love` | Love numbers per wave group (default) or per wave, every convention as an option, written to a JSON table |
171
+ | `earthtides-examples` | Copy the examples and the manual to a new directory |
172
+
173
+ All print their options with `--help`.
174
+
175
+ ## From Python
176
+
177
+ ```python
178
+ from earthtides.model import EarthModel
179
+ from earthtides.love import model_path
180
+ from earthtides.geometry import ClairautGeometry, OMEGA_EARTH
181
+ from earthtides.solver import TidalSolver
182
+ from earthtides.iers import iers_fit
183
+
184
+ md = EarthModel(str(model_path('PREM'))) # PREM with a fluid outer core
185
+ g = ClairautGeometry(md) # hydrostatic flattening (Clairaut)
186
+ S = TidalSolver(md, g, m=2, K=5, N=30, omega_f=0.0, coriolis=OMEGA_EARTH,
187
+ omega_t=1.4053e-4, omega_rot=OMEGA_EARTH,
188
+ dyn_fluid=True, consistent_reference=True) # M2
189
+ S.solve()
190
+ print(iers_fit(S, g)) # h0 = 0.60243, h2 = -0.00049, l0 = 0.08361, l1 = 0.00099, ...
191
+ ```
192
+
193
+ ## Verification
194
+
195
+ Every part of the method is checked against a known answer: homogeneous spheres (exact Bessel
196
+ solution), a spherical Earth on a distorted mesh (round-off), an exact homogeneous spheroid
197
+ (round-off), the analytical flattened Earth of Greff-Lefftz et al. (2005) (5e-6), Hough's free
198
+ core nutation (2e-4), and elastic hydrostatic PREM against Dehant, Defraigne & Wahr (1999)
199
+ (1e-5 at M2). `etide` reproduces the IERS routine DEHANTTIDEINEL to 0.1 mm rms.
200
+
201
+ ## Reference
202
+
203
+ If you use earth-tides in your research, please cite:
204
+
205
+ > Bos, M.S. (2026). What the IERS body-tide model assumes: Love numbers of a flattened, rotating,
206
+ > anelastic Earth. *Journal of Geodesy* (submitted).
207
+
208
+ ## License
209
+
210
+ Free for academic, research, and educational use. Commercial use requires a separate license from
211
+ [TeroMovigo – Earth Innovation Lda](https://teromovigo.com). See LICENSE for the full terms.
@@ -0,0 +1,122 @@
1
+ # earth-tides
2
+
3
+ earth-tides computes solid Earth tides: the Love numbers of a rotating, flattened, layered,
4
+ anelastic and self-gravitating Earth, and the tidal displacement of a station that follows from
5
+ them. The Love numbers are computed directly on the flattened Earth by a spectral method
6
+ (Chebyshev collocation in radius, Galerkin projection along the level surfaces), without
7
+ generalized spherical harmonics or hand-derived perturbation theory. The package is pure Python
8
+ (NumPy and SciPy).
9
+
10
+ ## Quick start
11
+
12
+ earth-tides has no graphical interface and no icon to click: everything happens in a terminal.
13
+ Open one (Windows: *Command Prompt* or *PowerShell*; macOS: *Terminal*; Linux: any shell), then
14
+ **type each command below and press Enter**, waiting for one to finish before starting the next.
15
+
16
+ **Step 1: install earth-tides** (requires Python 3.10 or newer with `pip`):
17
+
18
+ ```bash
19
+ pip install earth-tides
20
+ ```
21
+
22
+ Nothing works until this step has completed successfully.
23
+
24
+ **Step 2: get the examples and the manual:**
25
+
26
+ ```bash
27
+ earthtides-examples
28
+ ```
29
+
30
+ This copies five worked examples and the PDF user manual into a new directory
31
+ `earthtides-examples` in your current location (give a different name as argument if you prefer,
32
+ e.g. `earthtides-examples my_dir`). If the command is not found, step 1 did not finish
33
+ successfully: read its error messages.
34
+
35
+ Open `earthtides_manual_v1.0.pdf` first. It explains the conventions of tidal Love numbers, how
36
+ the solver works, the two programs and every example.
37
+
38
+ **Step 3: compute something.** The body tide at Onsala for one day, hourly, with the Love numbers
39
+ of the IERS Conventions (columns: MJD, up, north, east in metres):
40
+
41
+ ```bash
42
+ etide 57.395 11.926 --start 2026-01-01 --days 1
43
+ ```
44
+
45
+ The Love numbers of PREM for every wave group of the tidal catalogue (about 12 seconds), and the
46
+ same body tide computed with them:
47
+
48
+ ```bash
49
+ earthtides-love -o love.json
50
+ etide 57.395 11.926 --start 2026-01-01 --days 1 --love love.json
51
+ ```
52
+
53
+ **Step 4: run an example.** Each example runs from its own directory and prints the numbers of
54
+ its `.out` file:
55
+
56
+ ```bash
57
+ cd earthtides-examples/ex1
58
+ python swing.py
59
+ ```
60
+
61
+ | example | topic | runtime |
62
+ |:---|:---|---:|
63
+ | ex1 | The pumped swing: trial function, residual and projection in one variable | 1 s |
64
+ | ex2 | The loaded elliptical drum: collocation and projection on level curves | 2 s |
65
+ | ex3 | Homogeneous spheres: exact Bessel solution (Bos & Scherneck 2013) | 2 s |
66
+ | ex4 | Love numbers of a flattened homogeneous Earth (Greff-Lefftz et al. 2005) | 6 min |
67
+ | ex5 | Free core nutation of a rigid shell with a fluid core (Hough 1895) | 20 s |
68
+
69
+ ## Programs
70
+
71
+ | Name | Description |
72
+ |:--- |:--- |
73
+ | `etide` | Body-tide displacement of a station (up, north, east) from the Tamura (1987) tidal potential, with the IERS Love numbers or a table of `earthtides-love` |
74
+ | `earthtides-love` | Love numbers per wave group (default) or per wave, every convention as an option, written to a JSON table |
75
+ | `earthtides-examples` | Copy the examples and the manual to a new directory |
76
+
77
+ All print their options with `--help`.
78
+
79
+ ## From Python
80
+
81
+ ```python
82
+ from earthtides.model import EarthModel
83
+ from earthtides.love import model_path
84
+ from earthtides.geometry import ClairautGeometry, OMEGA_EARTH
85
+ from earthtides.solver import TidalSolver
86
+ from earthtides.iers import iers_fit
87
+
88
+ md = EarthModel(str(model_path('PREM'))) # PREM with a fluid outer core
89
+ g = ClairautGeometry(md) # hydrostatic flattening (Clairaut)
90
+ S = TidalSolver(md, g, m=2, K=5, N=30, omega_f=0.0, coriolis=OMEGA_EARTH,
91
+ omega_t=1.4053e-4, omega_rot=OMEGA_EARTH,
92
+ dyn_fluid=True, consistent_reference=True) # M2
93
+ S.solve()
94
+ print(iers_fit(S, g)) # h0 = 0.60243, h2 = -0.00049, l0 = 0.08361, l1 = 0.00099, ...
95
+ ```
96
+
97
+ ## Verification
98
+
99
+ Every part of the method is checked against a known answer: homogeneous spheres (exact Bessel
100
+ solution), a spherical Earth on a distorted mesh (round-off), an exact homogeneous spheroid
101
+ (round-off), the analytical flattened Earth of Greff-Lefftz et al. (2005) (5e-6), Hough's free
102
+ core nutation (2e-4), and elastic hydrostatic PREM against Dehant, Defraigne & Wahr (1999)
103
+ (1e-5 at M2). `etide` reproduces the IERS routine DEHANTTIDEINEL to 0.1 mm rms.
104
+
105
+ ## Reference
106
+
107
+ If you use earth-tides in your research, please cite:
108
+
109
+ > Bos, M.S. (2026). What the IERS body-tide model assumes: Love numbers of a flattened, rotating,
110
+ > anelastic Earth. *Journal of Geodesy* (submitted).
111
+
112
+ ## License
113
+
114
+ Free for academic, research, and educational use. Commercial use requires a separate license from
115
+ [TeroMovigo – Earth Innovation Lda](https://teromovigo.com). See LICENSE for the full terms.
116
+
117
+ ## Reproducing the paper
118
+
119
+ `paper_scripts/run_all.py` reruns the scripts in `scripts/` that produce every table, figure and
120
+ number of the paper and compares their output with the stored results in `results/`;
121
+ `paper_scripts/README.md` lists which script produces which result. With the package installed
122
+ from PyPI: `python paper_scripts/run_all.py --installed`.
@@ -0,0 +1,115 @@
1
+ # earth-tides
2
+
3
+ earth-tides computes solid Earth tides: the Love numbers of a rotating, flattened, layered,
4
+ anelastic and self-gravitating Earth, and the tidal displacement of a station that follows from
5
+ them. The Love numbers are computed directly on the flattened Earth by a spectral method
6
+ (Chebyshev collocation in radius, Galerkin projection along the level surfaces), without
7
+ generalized spherical harmonics or hand-derived perturbation theory. The package is pure Python
8
+ (NumPy and SciPy).
9
+
10
+ ## Quick start
11
+
12
+ earth-tides has no graphical interface and no icon to click: everything happens in a terminal.
13
+ Open one (Windows: *Command Prompt* or *PowerShell*; macOS: *Terminal*; Linux: any shell), then
14
+ **type each command below and press Enter**, waiting for one to finish before starting the next.
15
+
16
+ **Step 1: install earth-tides** (requires Python 3.10 or newer with `pip`):
17
+
18
+ ```bash
19
+ pip install earth-tides
20
+ ```
21
+
22
+ Nothing works until this step has completed successfully.
23
+
24
+ **Step 2: get the examples and the manual:**
25
+
26
+ ```bash
27
+ earthtides-examples
28
+ ```
29
+
30
+ This copies five worked examples and the PDF user manual into a new directory
31
+ `earthtides-examples` in your current location (give a different name as argument if you prefer,
32
+ e.g. `earthtides-examples my_dir`). If the command is not found, step 1 did not finish
33
+ successfully: read its error messages.
34
+
35
+ Open `earthtides_manual_v1.0.pdf` first. It explains the conventions of tidal Love numbers, how
36
+ the solver works, the two programs and every example.
37
+
38
+ **Step 3: compute something.** The body tide at Onsala for one day, hourly, with the Love numbers
39
+ of the IERS Conventions (columns: MJD, up, north, east in metres):
40
+
41
+ ```bash
42
+ etide 57.395 11.926 --start 2026-01-01 --days 1
43
+ ```
44
+
45
+ The Love numbers of PREM for every wave group of the tidal catalogue (about 12 seconds), and the
46
+ same body tide computed with them:
47
+
48
+ ```bash
49
+ earthtides-love -o love.json
50
+ etide 57.395 11.926 --start 2026-01-01 --days 1 --love love.json
51
+ ```
52
+
53
+ **Step 4: run an example.** Each example runs from its own directory and prints the numbers of
54
+ its `.out` file:
55
+
56
+ ```bash
57
+ cd earthtides-examples/ex1
58
+ python swing.py
59
+ ```
60
+
61
+ | example | topic | runtime |
62
+ |:---|:---|---:|
63
+ | ex1 | The pumped swing: trial function, residual and projection in one variable | 1 s |
64
+ | ex2 | The loaded elliptical drum: collocation and projection on level curves | 2 s |
65
+ | ex3 | Homogeneous spheres: exact Bessel solution (Bos & Scherneck 2013) | 2 s |
66
+ | ex4 | Love numbers of a flattened homogeneous Earth (Greff-Lefftz et al. 2005) | 6 min |
67
+ | ex5 | Free core nutation of a rigid shell with a fluid core (Hough 1895) | 20 s |
68
+
69
+ ## Programs
70
+
71
+ | Name | Description |
72
+ |:--- |:--- |
73
+ | `etide` | Body-tide displacement of a station (up, north, east) from the Tamura (1987) tidal potential, with the IERS Love numbers or a table of `earthtides-love` |
74
+ | `earthtides-love` | Love numbers per wave group (default) or per wave, every convention as an option, written to a JSON table |
75
+ | `earthtides-examples` | Copy the examples and the manual to a new directory |
76
+
77
+ All print their options with `--help`.
78
+
79
+ ## From Python
80
+
81
+ ```python
82
+ from earthtides.model import EarthModel
83
+ from earthtides.love import model_path
84
+ from earthtides.geometry import ClairautGeometry, OMEGA_EARTH
85
+ from earthtides.solver import TidalSolver
86
+ from earthtides.iers import iers_fit
87
+
88
+ md = EarthModel(str(model_path('PREM'))) # PREM with a fluid outer core
89
+ g = ClairautGeometry(md) # hydrostatic flattening (Clairaut)
90
+ S = TidalSolver(md, g, m=2, K=5, N=30, omega_f=0.0, coriolis=OMEGA_EARTH,
91
+ omega_t=1.4053e-4, omega_rot=OMEGA_EARTH,
92
+ dyn_fluid=True, consistent_reference=True) # M2
93
+ S.solve()
94
+ print(iers_fit(S, g)) # h0 = 0.60243, h2 = -0.00049, l0 = 0.08361, l1 = 0.00099, ...
95
+ ```
96
+
97
+ ## Verification
98
+
99
+ Every part of the method is checked against a known answer: homogeneous spheres (exact Bessel
100
+ solution), a spherical Earth on a distorted mesh (round-off), an exact homogeneous spheroid
101
+ (round-off), the analytical flattened Earth of Greff-Lefftz et al. (2005) (5e-6), Hough's free
102
+ core nutation (2e-4), and elastic hydrostatic PREM against Dehant, Defraigne & Wahr (1999)
103
+ (1e-5 at M2). `etide` reproduces the IERS routine DEHANTTIDEINEL to 0.1 mm rms.
104
+
105
+ ## Reference
106
+
107
+ If you use earth-tides in your research, please cite:
108
+
109
+ > Bos, M.S. (2026). What the IERS body-tide model assumes: Love numbers of a flattened, rotating,
110
+ > anelastic Earth. *Journal of Geodesy* (submitted).
111
+
112
+ ## License
113
+
114
+ Free for academic, research, and educational use. Commercial use requires a separate license from
115
+ [TeroMovigo – Earth Innovation Lda](https://teromovigo.com). See LICENSE for the full terms.
@@ -0,0 +1,36 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "earth-tides"
7
+ version = "1.0.0"
8
+ description = "Solid Earth tides: Love numbers of a rotating, flattened, anelastic Earth by spectral Galerkin-collocation, and station displacements"
9
+ readme = "README_PyPI.md"
10
+ requires-python = ">=3.10"
11
+ authors = [{ name = "Machiel S. Bos", email = "machiel.bos@teromovigo.com" }]
12
+ license = { file = "LICENSE" }
13
+ dependencies = ["numpy", "scipy"]
14
+
15
+ [project.optional-dependencies]
16
+ test = ["pytest"]
17
+ figures = ["matplotlib"]
18
+
19
+ [project.urls]
20
+ Homepage = "https://teromovigo.com"
21
+
22
+ [project.scripts]
23
+ etide = "earthtides.etide:main"
24
+ earthtides-love = "earthtides.love:main"
25
+ earthtides-examples = "earthtides.earthtides_examples:main"
26
+
27
+ [tool.setuptools.package-data]
28
+ earthtides = ["data/*.dat", "data/*.json", "data/*.txt", "docs/*.pdf", "examples/README.md",
29
+ "examples/*/*.py", "examples/*/*.md", "examples/*/*.dat", "examples/*/*.out"]
30
+
31
+ [tool.setuptools.packages.find]
32
+ where = ["src"]
33
+
34
+ [tool.pytest.ini_options]
35
+ pythonpath = ["src"]
36
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+