|
8 | 8 | GMTTempFile, |
9 | 9 | build_arg_string, |
10 | 10 | data_kind, |
11 | | - kwargs_to_strings, |
12 | 11 | fmt_docstring, |
| 12 | + kwargs_to_strings, |
13 | 13 | use_alias, |
14 | 14 | ) |
15 | 15 |
|
|
20 | 20 | C="crossprofile", |
21 | 21 | D="dfile", |
22 | 22 | E="profile", |
| 23 | + F="critical", |
23 | 24 | R="region", |
24 | 25 | N="no_skip", |
25 | 26 | V="verbose", |
@@ -144,6 +145,30 @@ def grdtrack(points, grid, newcolname=None, outfile=None, **kwargs): |
144 | 145 | is Great Circle]. **Note**: If ``crossprofile`` is set and *spacing* is |
145 | 146 | given then that sampling scheme overrules any modifier set in |
146 | 147 | ``profile``. |
| 148 | + critical : str |
| 149 | + [**+b**][**+n**][**+r**][**+z**\ *z0*]. |
| 150 | + Find critical points along each cross-profile as a function of |
| 151 | + along-track distance. Requires ``crossprofile`` and a single input grid |
| 152 | + (*z*). We examine each cross-profile generated and report (*dist*, |
| 153 | + *lonc*, *latc*, *distc*, *azimuthc*, *zc*) at the center peak of |
| 154 | + maximum *z* value, (*lonl*, *latl*, *distl*) and (*lonr*, *latr*, |
| 155 | + *distr*) at the first and last non-NaN point whose *z*-value exceeds |
| 156 | + *z0*, respectively, and the *width* based on the two extreme points |
| 157 | + found. Here, *dist* is the distance along the original input |
| 158 | + ``points`` and the other 12 output columns are a function of that |
| 159 | + distance. When searching for the center peak and the extreme first and |
| 160 | + last values that exceed the threshold we assume the profile is positive |
| 161 | + up. If we instead are looking for a trough then you must use **+n** to |
| 162 | + temporarily flip the profile to positive. The threshold *z0* value is |
| 163 | + always given as >= 0; use **+z** to change it [Default is 0]. |
| 164 | + Alternatively, use **+b** to determine the balance point and standard |
| 165 | + deviation of the profile; this is the weighted mean and weighted |
| 166 | + standard deviation of the distances, with *z* acting as the weight. |
| 167 | + Finally, use **+r** to obtain the weighted rms about the cross-track |
| 168 | + center (*distc* == 0). **Note**: We round the exact results to the |
| 169 | + nearest distance nodes along the cross-profiles. We write 13 output |
| 170 | + columns per track: *dist, lonc, latc, distc, azimuthc, zc, lonl, latl, |
| 171 | + distl, lonr, latr, distr, width*. |
147 | 172 | {R} |
148 | 173 | no_skip : bool |
149 | 174 | Do *not* skip points that fall outside the domain of the grid(s) |
|
0 commit comments