Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

grdcontour_common.rst_ 9.5 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
  1. |No-spaces|
  2. Description
  3. -----------
  4. **grdcontour** reads a 2-D grid file and produces a contour map by
  5. tracing each contour through the grid. Various options that affect the plotting
  6. are available. Alternatively, the *x, y, z* positions of the contour lines
  7. may be saved to one or more output files (or stdout) and no plot is produced.
  8. Required Arguments
  9. ------------------
  10. *grid*
  11. 2-D gridded data set to be contoured. (See GRID FILE FORMATS below).
  12. .. _-J:
  13. .. |Add_-J| unicode:: 0x20 .. just an invisible code
  14. .. include:: explain_-J.rst_
  15. Optional Arguments
  16. ------------------
  17. .. _-A:
  18. **-A**\ [**n**]\|\ [*contours*][*labelinfo*]
  19. *contours* is annotation interval in data units; it is ignored if
  20. contour levels are given in a file via **-C**. [Default is no annotations]. Prepend
  21. **n** to disable all annotations implied by **-C**. To just select a few specific
  22. contours give them as a comma-separated string; if only a single contour please add
  23. a trailing comma so it is seen as a list and not a contour interval. The optional
  24. *labelinfo* controls the specifics of the label formatting and consists
  25. of a concatenated string made up of any of the following control arguments:
  26. .. include:: explain_clabelinfo.rst_
  27. .. _-B:
  28. .. include:: explain_-B.rst_
  29. .. _-C:
  30. **-C**\ *contours*
  31. The contours to be drawn may be specified in one of four possible ways:
  32. (1) If *contours* is a string with suffix ".cpt" and can be opened as a
  33. file, it is assumed to be a CPT. The color
  34. boundaries are then used as contour levels. If the CPT has
  35. annotation flags in the last column then those contours will be
  36. annotated. By default all contours are labeled; use **-An** to
  37. disable all annotations.
  38. (2) If *contours* is a file but not a CPT, it is expected to contain
  39. one record per contour, with information given in the order
  40. *contour-level* [*angle*] **C**\|\ **c**\|\ **A**\|\ **a** [*pen*],
  41. where items in brackets are optional. The levels marked **C** (or **c**)
  42. are contoured, while the levels marked **A** (or **a**) are both contoured
  43. and annotated. If the annotation *angle* is present we will plot the label
  44. at that fixed angle [aligned with the contour]. Finally, a contour-
  45. specific *pen* may be present and will override the pen set by **-W**
  46. for this contour level only. **Note**: Please specify *pen* in proper
  47. format so it can be distinguished from a plain number like *angle*.
  48. (3) If *contours* is a string with comma-separated values it is interpreted
  49. as those specific contours only. To indicate a single specific contour
  50. you must append a trailing comma to separate it from a contour interval.
  51. The **-A** option offers the same list choice so they may be used together
  52. to plot only specific annotated and non-annotated contours.
  53. (4) If no argument is given in modern mode then we select the current CPT.
  54. (5) Otherwise, *contours* is interpreted as a constant contour interval.
  55. If a file is given and **-T** is set, then only inner-most contours marked with
  56. upper case **C** or **A** will have tick-marks. In all cases the contour
  57. values have the same units as the grid. Finally, if neither **-C**
  58. nor **-A** are set then we auto-compute suitable contour and annotation
  59. intervals from the data range, yielding approximately 10-20 contours.
  60. .. _-D:
  61. **-D**\ *template*
  62. Dump contours as data line segments; no plotting takes place.
  63. Append filename template which may contain C-format specifiers.
  64. If no filename template is given we write all lines to stdout.
  65. If filename has no specifiers then we write all lines to a single file.
  66. If a float format (e.g., %6.2f) is found we substitute the contour z-value.
  67. If an integer format (e.g., %06d) is found we substitute a running segment count.
  68. If an char format (%c) is found we substitute C or O for closed and open contours.
  69. The 1-3 specifiers may be combined and appear in any order to produce the
  70. the desired number of output files (e.g., just %c gives two files, just %f would.
  71. separate segments into one file per contour level, and %d would write all segments.
  72. to individual files; see manual page for more examples.
  73. .. _-F:
  74. **-F**\ [**l**\|\ **r**]
  75. Force dumped contours to be oriented so that higher z-values are to the
  76. left (**-Fl** [Default]) or right (**-Fr**) as we move along the contour
  77. [Default is arbitrary orientation]. Requires **-D**.
  78. .. _-G:
  79. **-G**\ [**d**\|\ **f**\|\ **n**\|\ **l**\|\ **L**\|\ **x**\|\ **X**]\ *params*
  80. .. include:: explain_contlabel.rst_
  81. .. _-L:
  82. **-L**\ *low/high*\|\ **n**\|\ **N**\|\ **P**\|\ **p**
  83. Limit range: Do not draw contours for data values below *low* or
  84. above *high*. Alternatively, limit contours to negative (**n**)
  85. or positive (**p**) contours. Use upper case **N** or **P** to
  86. include the zero contour.
  87. .. _-N:
  88. **-N**\ [*cpt*]
  89. Fill the area between contours using the discrete color table given by *cpt*.
  90. Then, **-C** and **-A** can be used as well to control the contour lines and
  91. annotations. If no *cpt* is appended then a discrete color table must be given
  92. via **-C** instead.
  93. .. _-Q:
  94. **-Q**\ [*cut*][**+z**]
  95. Do not draw contours with less than *cut* number of points [Draw all contours].
  96. Alternatively, give instead a minimum contour length in distance units
  97. (see `Units`_ for available units and how distances are computed),
  98. including **c** (Cartesian distances using user coordinates) or **C** for plot
  99. length units in current plot units after projecting the coordinates.
  100. Optionally, append **+z** to exclude the zero contour.
  101. .. _-R:
  102. .. |Add_-R| unicode:: 0x20 .. just an invisible code
  103. .. include:: explain_-R.rst_
  104. .. |Add_-Rz| replace:: [Default is region defined in the grid file].
  105. .. include:: explain_-Rz.rst_
  106. .. _-S:
  107. **-S**\ *smoothfactor*
  108. Used to resample the contour lines at roughly every
  109. (gridbox_size/*smoothfactor*) interval.
  110. .. _-T:
  111. **-T**\ [**h**\|\ **l**][**+a**][**+d**\ *gap*\ [/*length*]][**+l**\ [*labels*]]
  112. Will draw tick marks pointing in the downward direction every *gap*
  113. along the innermost closed contours only; append **+a** to tick all closed
  114. contours. Append **+d**\ *gap* and optionally tick
  115. mark *length* (append units as **c**, **i**, or **p**) or use defaults
  116. [15\ **p**/3\ **p**]. User may choose to tick only local highs or local
  117. lows by specifying **-Th** or **-Tl**, respectively. Append
  118. **+l**\ *labels* to annotate the centers of closed innermost contours
  119. (i.e., the local lows and highs). If no *labels* is appended we use -
  120. and + as the labels. Appending exactly two characters, e.g., **+l**\ *LH*,
  121. will plot the two characters (here, L and H) as labels. For more elaborate
  122. labels, separate the low and high label strings with a comma (e.g.,
  123. **+l**\ *lo*,\ *hi*). If a file is given by **-C** and **-T** is set,
  124. then only contours marked with upper case C or A will have tick marks
  125. [and annotations]. **Note**: The labeling of local highs and lows may plot sometimes
  126. outside the innermost contour since only the mean value of the contour coordinates
  127. is used to position the label.
  128. .. _-U:
  129. .. include:: explain_-U.rst_
  130. .. _-V:
  131. .. |Add_-V| unicode:: 0x20 .. just an invisible code
  132. .. include:: explain_-V.rst_
  133. .. _-W:
  134. **-W**\ [*type*]\ *pen*\ [**+c**\ [**l**\|\ **f**]] :ref:`(more ...) <set-pens>`
  135. *type*, if present, can be **a** for annotated contours or **c** for
  136. regular contours [Default]. The *pen* sets the attributes for the
  137. particular line. Default pen for annotated contours: 0.75p,black.
  138. Regular contours use pen 0.25p,black. Normally, all contours are drawn
  139. with a fixed color determined by the pen setting. If the modifier **+cl** is appended
  140. then the color of the contour lines are taken from the CPT (see
  141. **-C**). If instead modifier **+cf** is appended then the color from the cpt
  142. file is applied to the contour annotations. Select **+c** for both effects.
  143. .. _-X:
  144. .. include:: explain_-XY.rst_
  145. .. _-Z:
  146. **-Z**\ [**+s**\ *factor*][**+o**\ *shift*][**+p**]
  147. Use to subtract *shift* from the data and multiply the results by
  148. *factor* before contouring starts [1/0]. (Numbers in **-A**, **-C**,
  149. **-L** refer to values after this scaling has occurred.) Append
  150. **+p** to indicate that this grid file contains z-values that are
  151. periodic in 360 degrees (e.g., phase data, angular distributions)
  152. and that special precautions must be taken when determining
  153. 0-contours.
  154. .. |Add_-bo| unicode:: 0x20 .. just an invisible code
  155. .. include:: explain_-bo.rst_
  156. .. |Add_-do| unicode:: 0x20 .. just an invisible code
  157. .. include:: explain_-do.rst_
  158. .. |Add_-f| unicode:: 0x20 .. just an invisible code
  159. .. include:: explain_-f.rst_
  160. .. |Add_-h| unicode:: 0x20 .. just an invisible code
  161. .. include:: explain_-h.rst_
  162. .. |Add_-l| replace:: Normally, the annotated contour is selected for the legend. You can select the regular contour instead, or both of them, by considering the *label* to be of the format [*annotcontlabel*][/*contlabel*]. If either label contains a slash (/) character then use | as the separator for the two labels instead.
  163. .. include:: explain_-l.rst_
  164. .. |Add_perspective| unicode:: 0x20 .. just an invisible code
  165. .. include:: explain_perspective.rst_
  166. .. include:: explain_-t.rst_
  167. .. include:: explain_help.rst_
  168. .. include:: explain_distunits.rst_
  169. .. include:: explain_precision.rst_
  170. .. include:: explain_grd_inout_short.rst_
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...