Skip to content

Commit e407113

Browse files
committed
Add pastplates & maregrams docs
1 parent 4a7b670 commit e407113

File tree

3 files changed

+106
-4
lines changed

3 files changed

+106
-4
lines changed

documentation/all_docs_ref/all_refs.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@
3030
|:-----|:----|:----|:----|:----|:----|:----|:----|:----|:----|
3131
| \myreflink{arrows} | \myreflink{band} | \myreflink{bar} | \myreflink{bar3} | \myreflink{boxplot} | \myreflink{bubblechart} | \myreflink{contourf} | \myreflink{cornerplot} | \myreflink{decorated} | \myreflink{earthregions} |
3232
| \myreflink{ecdfplot} | \myreflink{feather} | \myreflink{fill_between} | \myreflink{hband} | \myreflink{hlines} | \myreflink{logo} | \myreflink{lines} | \myreflink{marginalhist} | \myreflink{parallelplot} | \myreflink{pcolor} |
33-
| \myreflink{plotlinefit} | \myreflink{qqplot} | \myreflink{quiver} | \myreflink{radar} | \myreflink{sealand} | \myreflink{scatter} | \myreflink{scatter3} | \myreflink{seismicity} | \myreflink{stairs} | \myreflink{stem} |
34-
| \myreflink{streamlines} | \myreflink{triplot} | \myreflink{trisurf} | \myreflink{vband} | \myreflink{violin} | \myreflink{vlines} | | | | |
33+
| \myreflink{plotlinefit} | \myreflink{qqplot} | \myreflink{quiver} | \myreflink{radar} | \myreflink{sealand} | \myreflink{scatter} | \myreflink{scatter3} | \myreflink{stairs} | \myreflink{stem} | \myreflink{streamlines} |
34+
| \myreflink{triplot} | \myreflink{trisurf} | \myreflink{vband} | \myreflink{violin} | \myreflink{vlines} | | | | | |
35+
36+
## Web download modules
37+
38+
| | | | | | | | |
39+
|:-----|:----|:----|:----|:----|:----|:----|:----|
40+
| \myreflink{maregrams} | \myreflink{pastplates} | \myreflink{seismicity} | \myreflink{weather} | \myreflink{wmsinfo} | \myreflink{wmsread} | \myreflink{wmstest} | |
3541

3642

3743
## Supplemental Modules (Potential methods)
@@ -57,8 +63,7 @@ its use requires resorting to the \myreflink{Monolithic} mode.
5763
| \myreflink{lelandshade} | \myreflink{linearfitxy} | \myreflink{magic} | \myreflink{mat2ds} | \myreflink{mat2grid} | \myreflink{mat2img} | \myreflink{mosaic} | \myreflink{ODE2ds} |
5864
| \myreflink{orbits} | \myreflink{pca} | \myreflink{plotgrid!} | \myreflink{plotyy} \myreflink{pol2cart} | \myreflink{polygonlevels} | \myreflink{rasterzones!} | \myreflink{regiongeog} | \myreflink{remotegrid} |
5965
| \myreflink{rescale} | \myreflink{slicecube} | \myreflink{sph2cart} | \myreflink{stackgrids} | \myreflink{ter2cart} | \myreflink{theme} | \myreflink{uniqueind} | \myreflink{vecangles} |
60-
| \myreflink{weather} | \myreflink{whereami} | \myreflink{wmsinfo} | \myreflink{wmsread} | \myreflink{wmstest} | \myreflink{worldrectgrid} | \myreflink{worldrectcoast} | \myreflink{worldrectangular} |
61-
| \myreflink{xyzw2cube} | \myreflink{yeardecimal} | \myreflink{zonal_stats} | | | | | |
66+
| \myreflink{weather} | \myreflink{whereami} | \myreflink{worldrectgrid} | \myreflink{worldrectcoast} | \myreflink{worldrectangular} | \myreflink{xyzw2cube} | \myreflink{yeardecimal} | \myreflink{zonal_stats} |
6267

6368
## Solids functions
6469

documentation/utilities/maregrams.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# maregrams
2+
3+
```
4+
D = maregrams(list::Bool=false, code="", name="", days::Real=2, starttime::String="", printurl=false)
5+
or
6+
7+
D = maregrams(lon::Real, lat::Real; days=2, starttime::String="")
8+
```
9+
10+
*keywords: GMT, Julia, Plate Kinematics*
11+
12+
Download maregrams data from [www.ioc-sealevelmonitoring.org](http://www.ioc-sealevelmonitoring.org).
13+
14+
The default is to download the last 2 days, but length and duration is configurable by input options.
15+
Since the use of this function requires knowing the station code or name, we provide also the possibility
16+
to use coordinates to find the nearest station. The file with stations data locations and names is stored in
17+
the `TESTSDIR/assets/maregs_online.csv` file, which can be accessed using `d = GMT.read_maregrams()` and its
18+
contents are returned in the `d` dictionary. Note that not all stations sites are always on and running, so
19+
errors when requesting data from some stations are, unfortunately, not so uncommon.
20+
21+
Our reference stations data is a bit old (needs update) and we can find more stations online listed at the
22+
[www.ioc-sealevelmonitoring.org](http://www.ioc-sealevelmonitoring.org) site. If user provides a station code
23+
that we don't know about, but is a valid one, we still return the data for that station. Example:
24+
`D = maregrams(code="tdoj")`
25+
26+
### Args
27+
- `lon, lat`: (Second form) Coordinates of a point that is used to find the closest station to that point.
28+
This is an alternative way of selecting a station instead of using `code` or `name` that require knowing them.
29+
30+
### Kwargs
31+
- `list::Bool`: If true, returns a GMTdataset with the list all available stations and their codes and coords.
32+
33+
- `code`: Station code (See the output of `list`)
34+
35+
- `name`: In alternative to `code` give the station name (See the output of `list`)
36+
37+
- `days`: Number of days to be downloaded. It can be a decimal number.
38+
39+
- `starttime`: Start time in ISO8601 format (_e.g._ `"2019-01-01T00:00:00"`, or just the date `"2019-01-01"`).
40+
41+
- `printurl`: If true, prints the station's URL. Useful for getting more info about the sation and its data.
42+
43+
### Returns
44+
- `D`: \myreflink{GMTdataset} with the maregrams data.
45+
46+
### Example
47+
48+
Get the time series for 4 days starting at February 1 2025 for the station with code "lgos" (Lagos, Portugal)
49+
50+
\begin{examplefig}{}
51+
```julia
52+
using GMT
53+
54+
D = maregrams(code="lgos", days=4, starttime="2025-02-01");
55+
viz(D, title="Tide Gauge at Lagos (Portugal)")
56+
```
57+
\end{examplefig}

documentation/utilities/pastplates.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# pastplates
2+
3+
```
4+
pastplates(; time=100, proj="", title="time", coastlines=true, fmt="png", name="", data=false, show=true)
5+
```
6+
7+
*keywords: GMT, Julia, Plate Kinematics*
8+
9+
Plots the reconstruction of the past plates at a given time. Data is extracted from the GPLATES
10+
https://gws.gplates.org website.
11+
12+
# Kwargs
13+
- `time`: Time in Ma. Default is 100 Ma.
14+
15+
- `proj`: A projection string like that used, or example, in `coast()`.
16+
17+
- `title`: Title of the plot
18+
19+
- `coastlines`: A boolean indicating if want to plot the coastlines.
20+
21+
- `fmt`: Format of the plot (Default is `png`)
22+
23+
- `name`: Name of the plot. Instead of using a default name, provide one and figure will be saved with that name.
24+
25+
- `data`: If true `pastplates` return the data in a form of a vector of `GMTdataset` instead of plotting it.
26+
The default is produce a minimally nice plot but for further enhancements, download the data and make a plot yourself.
27+
28+
- `show`: If true (the default), automatically show the plot (ignored if `data=true`).
29+
30+
# Examples
31+
32+
Make a figure representing plates positions at 100 Ma ago.
33+
34+
\begin{examplefig}{}
35+
```julia
36+
using GMT
37+
38+
pastplates()
39+
```
40+
\end{examplefig}

0 commit comments

Comments
 (0)