-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strengthen -Elines documentation for grdtrack and grdinterpolate (#8108)
* Strengthen -Elines documentation for grdtrack and grdinterpolate These two functions both use the very rich -E option for creating profiles on the fly. The repetitive documentation for the two ahd some issues and missing modifiers, so this PR addes an explain_interpolant.rst_ file they can share. Also, the parsing of -F for the interpolant different between the two modules so I have introduced some function that both can call to avoid duplicate and errors in the code. Likewise, for teh documentation I added explain_interpolant.rst * polish * Update grdtrack.rst * Add common usage explanation for -E in grdtrack and grdinterpolate * Update grdtrack.c
- Loading branch information
1 parent
454aa69
commit 1200849
Showing
11 changed files
with
164 additions
and
178 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
**-Fl**\|\ **a**\|\ **c**\|\ **e**\|\ **l**\|\ **n**\|\ **s**\ *p*\ [**+d1**\|\ **2**] | ||
Choose the desired 1-D spline interpolant from one of these directives: | ||
|
||
- **a**: Akima spline [Default]. | ||
- **e**: Step curve. | ||
- **c**: Natural cubic spline. | ||
- **l**: Linear interpolant. | ||
- **n**: No interpolation, just select nearest point. | ||
- **s**: Smoothing cubic spline; append fit parameter *p* for an approximate fit. | ||
|
||
You may change the GMT default interpolant; see :term:`GMT_INTERPOLANT` in your :doc:`gmt.conf` file. | ||
You may optionally evaluate the first or second derivative of the spline | ||
by appending **+d1** or **+d2**, respectively. **Note**: If you use derivatives | ||
with directives **e** or **n** then the result is always zero. |
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,33 @@ | ||
**-E**\ *table*\|\ *origin*\ |\ *line*\ [,\ *line*,...][**+a**\ *az*][**+c**][**+d**][**+g**][**+i**\ *inc*][**+l**\ *length*][**+n**\ *np*][**+o**\ *az*][**+p**][**+r**\ *radius*][**+x**] | ||
Specify one or more profiles along which we will sample the grid (or cube). | ||
There are several way to supply or create the profiles: | ||
|
||
- Give your custom profiles via a *table* containing *lon lat* points. | ||
- Given an *origin* (and *azimuth* and *length* and relevant modifiers below). | ||
- Give one or more lines. The format of each *line* is *start*/*stop*, where | ||
*start* or *stop* are either *lon*/*lat* (*x*/*y* for Cartesian data) or a | ||
2-character key that uses the :doc:`text`-style justification format to | ||
specify a point on the map as [LCR][BMT]. In addition to line coordinates, | ||
you can use Z-, Z+ to mean the global minimum and maximum locations in the | ||
grid (only available if a single input grid is given) or top layer in a cube | ||
(only for doc:`grdinterpolate`). | ||
|
||
Choose among several modifiers to create profiles: | ||
|
||
- **+a**: Set the *azimuth* of a profile of given *length* (see **+l**) starting at the given *origin*. | ||
- **+c**: Connect multiple profile segments with shared joints into a single segment. | ||
- **+d**: Compute the along-track distances of the profiles. | ||
- **+g**: Report degrees of longitude or latitude instead of great circle distances starting at zero [Default]. | ||
- **+i**: Append *inc* to set the sampling interval; if not given then we default to half the minimum grid interval. | ||
- **+l**: Append the total *length* of the profile if **+a** or **+o** are used with an *origin*. | ||
- **+n**: Append the desired number of points along profile (which determines the sampling interval). | ||
- **+o**: Like **+a**, but centers the profile on the given *origin* in the *azimuth* direction. | ||
- **+p**: Force sampling along the parallel if your *line* starts and ends at the same latitude [Great circle]. | ||
- **+r**: Append *radius* for circular sampling along small circle of given radius centered on the *origin*. | ||
Requires either **+n** or **+i**. | ||
- **+x**: Compute distances along a loxodrome (i.e., rhumbline) instead of along the great circle. | ||
|
||
**Notes**: (1) Only one distance unit can be chosen. Giving different units | ||
will result in an error. If no units are specified we default to | ||
great circle distances in km (if geographic). (2) If working with geographic | ||
data you can use **-j** to control the distance calculation mode [Great Circle]. |
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
Oops, something went wrong.