|
| 1 | +# earthtide |
| 2 | + |
| 3 | +```julia |
| 4 | + earthtide(; kwargs...) |
| 5 | +``` |
| 6 | + |
| 7 | +Compute grids or time-series of solid Earth tides. |
| 8 | + |
| 9 | +Description |
| 10 | +----------- |
| 11 | + |
| 12 | +Compute the three components of solid Earth tides as time-series or grids. Optionally compute also |
| 13 | +Sun and Moon position in (*lon, lat*). The output can be either in the form of a grid or as a table |
| 14 | +printed to standard output. The format of the table data is: *time north east vertical* in units of meters. |
| 15 | + |
| 16 | +Arguments |
| 17 | +--------- |
| 18 | + |
| 19 | +- **G** or **grid** or **outgrid** : -- *outgrid="name"*\ |
| 20 | + Write one or more tide component directly to grid files. If more |
| 21 | + than one component are specified via **components** then *outgrid* must contain the format flag %s so that |
| 22 | + we can embed the component code in the file names (*n* for north; *e* for east and *v* for vertical). |
| 23 | + If only one component is selected with **components** than no code is appended to grid name (and no need to |
| 24 | + set the format flag %s). The grid(s) are computed at the time set by **range**, if that option is used, or |
| 25 | + at the *now* time calculated in UTC from the computer clock. NOTE that when returning the grid(s) to the |
| 26 | + Julia workspace this option should not be used. It is enough to set variable names as left-hand-side |
| 27 | + arguments. The grid(s) will be returned as a GMTgrid object(s). |
| 28 | + |
| 29 | +- **S** or **sun_moon** : -- *sun_moon=true*\ |
| 30 | + Output position of Sun and Moon in geographical coordinates plus distance |
| 31 | + in meters. Output is a Mx7 matrix where M is the number of times (set by **range**) |
| 32 | + and columns are time, sun_lon, sun_lat, sun_dist moon_lon, moon_lat, moon_dist |
| 33 | + |
| 34 | +- **L** or **location** : -- *location=(lon,lat)*\ |
| 35 | + Geographical coordinate of the location where to compute a time-series. Coordinates are geodetic |
| 36 | + (ellipsoidal) latitude and longitude. GRS80 ellipsoid is used. (Which can be considered equivalent |
| 37 | + to the WGS84 ellipsoid at the sub-millimeter level.) |
| 38 | + |
| 39 | +- **C** or **components** : -- *components="x|e,y|n,z|v"*\ |
| 40 | + Select which component(s) to compute in individual grid(s). When returning the grid to Julia workspace, |
| 41 | + only one component can be selected (_e.g._ **component="e"** to compute the East component). |
| 42 | + To save grids on files **outgrid** must be set. |
| 43 | + Append comma-separated codes for available components: **x** or **e** for the east component; |
| 44 | + **y** or **n** for the north component; and **z** or **v** for the vertical component. |
| 45 | + For example, **-Ce**,**v**, will write 2 grids. One with east and other with the vertical components. |
| 46 | + If **outgrid** is set but not **components** then the default is to compute the vertical component. |
| 47 | + |
| 48 | +\textinput{common_opts/opt_I} |
| 49 | + |
| 50 | +\textinput{common_opts/opt_R} |
| 51 | + |
| 52 | +- **T** or **range** : -- *range=(min,max,inc[,"+n"])* **|** *range=[list]* **|** *range=file*\ |
| 53 | + Make evenly spaced time-steps from *min* to *max* by *inc*. Append **+n** to indicate *inc* is the number |
| 54 | + of *t*-values to produce over the range instead. Append a valid time unit (**d** | **h** | **m** | **s**) |
| 55 | + to the increment. If only *min* is given then we use that date and time for the calculations. |
| 56 | + If no **range** is provided get current time in UTC from the computer clock. If no `grid(s)` or **sun_moon** are |
| 57 | + provided then **range** is interpreted to mean compute a time-series at the location specified by **location**, |
| 58 | + thus then **location** becomes mandatory. When `grid(s)` and **range**, only first time T series is considered. |
| 59 | + Finally, dates may range from 1901 through 2099. |
| 60 | + |
| 61 | +\textinput{common_opts/opt_bo} |
| 62 | + |
| 63 | +\textinput{common_opts/opt_o} |
| 64 | + |
| 65 | +\textinput{common_opts/opt_r} |
| 66 | + |
| 67 | +\textinput{common_opts/opt_U} |
| 68 | + |
| 69 | +\textinput{common_opts/opt_V} |
| 70 | + |
| 71 | + |
| 72 | +Examples |
| 73 | +-------- |
| 74 | + |
| 75 | +To compute a global grid of the vertical component with a grid step of 30m at noon of 18 Jun 2018, |
| 76 | +(note: we are using the defaults for **region** and **inc**) try |
| 77 | + |
| 78 | +\begin{examplefig}{} |
| 79 | +```julia |
| 80 | +using GMT |
| 81 | + |
| 82 | +G = earthtide(range="2018-06-18T12:00:00"); |
| 83 | +viz(G, coast=true, colorbar=true, title="Earth tide at noon 7-July-2022") |
| 84 | +``` |
| 85 | +\end{examplefig} |
| 86 | + |
| 87 | +To obtain a one day long time-series, starting at same date, at the -7 *W*, 37 *N* and 1 minute interval, try |
| 88 | + |
| 89 | +```julia |
| 90 | +D_st = earthtide(range="2018-06-18T/2018-06-19T/1m", location=(-7,37)); |
| 91 | + |
| 92 | +Attribute table |
| 93 | +┌─────────┐ |
| 94 | +│ Timecol │ |
| 95 | +├─────────┤ |
| 96 | +│ 1 │ |
| 97 | +└─────────┘ |
| 98 | +BoundingBox: [1.52928e9, 1.5293664e9, -0.055276516851621674, -0.0036339665716482207, -0.045788605358317365, 0.04073662523448053, -0.12387708915816655, 0.17011740397714592] |
| 99 | + |
| 100 | +1441×4 GMTdataset{Float64, 2} |
| 101 | + Row │ Time East North Vertical |
| 102 | +─────┼────────────────────────────────────────────────────────── |
| 103 | + 1 │ 2018-06-18T00:00:00 -0.0220331 0.014779 -0.120817 |
| 104 | + 2 │ 2018-06-18T00:01:00 -0.0222226 0.0149741 -0.120428 |
| 105 | + 3 │ 2018-06-18T00:02:00 -0.0224126 0.0151673 -0.120035 |
| 106 | +... |
| 107 | +``` |
| 108 | + |
| 109 | +The get the Sun and Moon position in geographical coordinates at the *now* time |
| 110 | + |
| 111 | +```julia |
| 112 | +D = earthtide(sun_moon=true); |
| 113 | +``` |
| 114 | + |
| 115 | +Notes |
| 116 | +----- |
| 117 | + |
| 118 | +#. All times, both input and output, are in UTC. |
| 119 | + |
| 120 | +References |
| 121 | +---------- |
| 122 | + |
| 123 | +http://geodesyworld.github.io/SOFTS/solid.htm |
0 commit comments