-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from tsutterley/perth3
add GOT4.7 test program
- Loading branch information
Showing
36 changed files
with
941 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
compute_LPET_icebridge_data.py | ||
============================= | ||
|
||
- Calculates long-period equilibrium tides for correcting Operation IceBridge elevation data | ||
- Uses the summation of fifteen tidal spectral lines from [Cartwright and Edden, (1973)](https://doi.org/10.1111/j.1365-246X.1973.tb03420.x) | ||
|
||
#### Calling Sequence | ||
```bash | ||
python compute_LPET_icebridge_data.py --verbose input_file | ||
``` | ||
[Source code](https://github.com/tsutterley/pyTMD/blob/master/compute_LPET_icebridge_data.py) | ||
|
||
#### Inputs | ||
1. `input_file`: input ATM1B, ATM icessn or LVIS file from NSIDC | ||
|
||
#### Command Line Options | ||
- `-M X`, `--mode=X`: Permission mode of output file | ||
- `-V`, `--verbose`: Output information about each created file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
compute_equilibrium_tide.py | ||
=========================== | ||
|
||
- Calculates the long-period equilibrium ocean tides | ||
- Can be used to calculate tidal corrections for imagery | ||
|
||
#### Calling Sequence | ||
```python | ||
from pyTMD.compute_equilibrium_tide import compute_equilibrium_tide | ||
lpet = compute_equilibrium_tide(time,lat) | ||
``` | ||
[Source code](https://github.com/tsutterley/pyTMD/blob/master/pyTMD/compute_equilibrium_tide.py) | ||
|
||
#### Inputs | ||
1. `t`: days relative to Jan 1, 1992 (48622mjd) | ||
2. `lat`: latitudes in degrees | ||
|
||
#### Outputs | ||
- `lpet`: long-period equilibrium tide values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
""" | ||
compute_equilibrium_tide.py (08/2020) | ||
Calculates the long-period equilibrium ocean tides | ||
Fifteen tidal spectral lines from the Cartwright-Tayler-Edden | ||
tables are summed over to compute the long-period tides | ||
INPUTS: | ||
t: days relative to Jan 1, 1992 (48622 MJD) | ||
lat: latitudes in degrees | ||
OUTPUTS: | ||
lpet: long-period equilibrium tide in meters | ||
REFERENCES: | ||
Cartwright & Tayler, Geophys. J. R.A.S., 23, 45, 1971. | ||
Cartwright & Edden, Geophys. J. R.A.S., 33, 253, 1973. | ||
""" | ||
import numpy as np | ||
|
||
def compute_equilibrium_tide(t, lat): | ||
#-- longitude of moon | ||
#-- longitude of sun | ||
#-- longitude of lunar perigee | ||
#-- longitude of ascending lunar node | ||
PHC = np.array([290.21,280.12,274.35,343.51]) | ||
DPD = np.array([13.1763965,0.9856473,0.1114041,0.0529539]) | ||
|
||
#-- convert time from days relative to 1992-01-01 to 1987-01-01 | ||
#-- Compute 4 principal mean longitudes in radians at delta time | ||
npts = len(t) | ||
SHPN = np.zeros((4,npts)) | ||
for N in range(4): | ||
ANGLE = PHC[N] + (t + 1826.0)*DPD[N] | ||
SHPN[N,:] = np.pi*np.mod(ANGLE, 360.0)/180.0 | ||
|
||
#-- Assemble long-period tide potential from 15 CTE terms > 1 mm. | ||
#-- Nodal term is included but not the constant term. | ||
PH = np.zeros((npts)) | ||
Z = np.zeros((npts)) | ||
Z += 2.79*np.cos(SHPN[3,:]) - 0.49*np.cos(SHPN[1,:] - \ | ||
283.0*np.pi/180.0) - 3.10*np.cos(2.0*SHPN[1,:]) | ||
PH += SHPN[0,:] | ||
Z += -0.67*np.cos(PH - 2.0*SHPN[1,:] + SHPN[2,:]) - \ | ||
(3.52 - 0.46*np.cos(SHPN[3,:]))*np.cos(PH - SHPN[2,:]) | ||
PH += SHPN[0,:] | ||
Z += - 6.66*np.cos(PH) - 2.76*np.cos(PH + SHPN[3,:]) - \ | ||
0.26 * np.cos(PH + 2.*SHPN[3,:]) - 0.58 * np.cos(PH - 2.*SHPN[1,:]) - \ | ||
0.29 * np.cos(PH - 2.*SHPN[2,:]) | ||
PH += SHPN[0,:] | ||
Z += - 1.27*np.cos(PH - SHPN[2,:]) - \ | ||
0.53*np.cos(PH - SHPN[2,:] + SHPN[3,:]) - \ | ||
0.24*np.cos(PH - 2.0*SHPN[1,:] + SHPN[2,:]) | ||
|
||
#-- Multiply by gamma_2 * sqrt(5/4 pi) * P20(lat) | ||
lpet = 0.437*Z*(1.5*np.sin(lat*np.pi/180.0)**2 - 0.5)/100.0 | ||
return lpet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.