-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathverticalaxes.html
233 lines (212 loc) · 18.9 KB
/
verticalaxes.html
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
232
233
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vertical axes object reference — PyGeode 1.4.1-rc2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/pygtheme.css" />
<link rel="stylesheet" type="text/css" href="_static/plot_directive.css" />
<link rel="stylesheet" type="text/css" href="_static/sg_gallery.css" />
<link rel="stylesheet" type="text/css" href="_static/sg_gallery-binder.css" />
<link rel="stylesheet" type="text/css" href="_static/sg_gallery-dataframe.css" />
<link rel="stylesheet" type="text/css" href="_static/sg_gallery-rendered-html.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<link rel="shortcut icon" href="_static/pygeode_icon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Time axes objects reference" href="timeaxes.html" />
<link rel="prev" title="Horizonal axis objects reference" href="horizontalaxes.html" />
<link href="http://fonts.googleapis.com/css?family=Ubuntu:300,300italic,regular,italic,500,500italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700' rel='stylesheet' type='text/css'>
</head><body>
<div class="header" role="banner"><img class="logo" src="_static/pygeode_logo.png" width=79px alt="Logo"/>
<h1 class="heading"><a href="index.html">
<span>PyGeode 1.4.1-rc2 documentation</span></a></h1>
<h2 class="heading"><span>Vertical axes object reference</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«  <a href="horizontalaxes.html">Horizonal axis objects reference</a>
  ::  
<a class="uplink" href="reference.html">Reference</a>
  ::  
<a class="uplink" href="tutorial.html">Tutorial</a>
  ::  
<a class="uplink" href="gallery/index.html">Gallery</a>
  ::  
<a href="timeaxes.html">Time axes objects reference</a>  »
</p>
</div>
<div class="content">
<div class="section" id="vertical-axes-object-reference">
<h1>Vertical axes object reference<a class="headerlink" href="#vertical-axes-object-reference" title="Permalink to this headline">¶</a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="pygeode.ZAxis">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pygeode.</span></span><span class="sig-name descname"><span class="pre">ZAxis</span></span><a class="reference internal" href="_modules/pygeode/axis.html#ZAxis"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pygeode.ZAxis" title="Permalink to this definition">¶</a></dt>
<dd><p>Inherits from <a class="reference internal" href="axes.html#pygeode.Axis" title="pygeode.Axis"><code class="xref py py-class docutils literal notranslate"><span class="pre">Axis</span></code></a></p>
<p>Generic parent class for axes representing vertical coordinates, plotted by default on
the vertical axis in line plots and in contour plots. No new or overridden methods.</p>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="pygeode.Height">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pygeode.</span></span><span class="sig-name descname"><span class="pre">Height</span></span><a class="reference internal" href="_modules/pygeode/axis.html#Height"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pygeode.Height" title="Permalink to this definition">¶</a></dt>
<dd><p>Inherits from <a class="reference internal" href="#pygeode.ZAxis" title="pygeode.ZAxis"><code class="xref py py-class docutils literal notranslate"><span class="pre">ZAxis</span></code></a></p>
<p>Represents a geometric height. No new or overridden methods.</p>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="pygeode.Pres">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pygeode.</span></span><span class="sig-name descname"><span class="pre">Pres</span></span><a class="reference internal" href="_modules/pygeode/axis.html#Pres"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pygeode.Pres" title="Permalink to this definition">¶</a></dt>
<dd><p>Inherits from <a class="reference internal" href="#pygeode.ZAxis" title="pygeode.ZAxis"><code class="xref py py-class docutils literal notranslate"><span class="pre">ZAxis</span></code></a></p>
<p>Represents a pressure vertical coordinate.</p>
<p class="rubric">New and overridden methods</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pygeode.Pres.logPAxis" title="pygeode.Pres.logPAxis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Pres.logPAxis</span></code></a>([p0, H])</p></td>
<td><p>logPAxis(p0, H) - returns a pygeode axis with log pressure heights corresponding to this axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pygeode.Pres.locator" title="pygeode.Pres.locator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Pres.locator</span></code></a>()</p></td>
<td><p>Returns a matplotlib locator object for use in plotting.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pygeode.Pres.formatvalue" title="pygeode.Pres.formatvalue"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Pres.formatvalue</span></code></a>(value[, fmt, units, unitstr])</p></td>
<td><p>Returns formatted string representation of pressure <code class="docutils literal notranslate"><span class="pre">value</span></code>.</p></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="pygeode.Hybrid">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pygeode.</span></span><span class="sig-name descname"><span class="pre">Hybrid</span></span><a class="reference internal" href="_modules/pygeode/axis.html#Hybrid"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pygeode.Hybrid" title="Permalink to this definition">¶</a></dt>
<dd><p>Inherits from <a class="reference internal" href="#pygeode.ZAxis" title="pygeode.ZAxis"><code class="xref py py-class docutils literal notranslate"><span class="pre">ZAxis</span></code></a></p>
<p>Represents a hybridized pressure coordinate, of the form <span class="math notranslate nohighlight">\(p(\eta) = A(\eta) p_0 + B(\eta) p_s\)</span>.</p>
<p>Auxilliary arrays: <code class="docutils literal notranslate"><span class="pre">A</span></code> and <code class="docutils literal notranslate"><span class="pre">B</span></code></p>
<p class="rubric">New and overridden methods</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pygeode.Hybrid.__init__" title="pygeode.Hybrid.__init__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Hybrid.__init__</span></code></a>(values, A, B, **kwargs)</p></td>
<td><p>Create a new Axis object with the given values.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pygeode.Hybrid.locator" title="pygeode.Hybrid.locator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Hybrid.locator</span></code></a>()</p></td>
<td><p>Returns a matplotlib locator object for use in plotting.</p></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pygeode.Pres.logPAxis">
<span class="sig-prename descclassname"><span class="pre">Pres.</span></span><span class="sig-name descname"><span class="pre">logPAxis</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">p0</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1000.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">H</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">7.1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pygeode/axis.html#Pres.logPAxis"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pygeode.Pres.logPAxis" title="Permalink to this definition">¶</a></dt>
<dd><p>logPAxis(p0, H) - returns a pygeode axis with log pressure heights
corresponding to this axis. By default p0 = 1000 hPa and H = 7.1 (km).</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pygeode.Pres.formatvalue">
<span class="sig-prename descclassname"><span class="pre">Pres.</span></span><span class="sig-name descname"><span class="pre">formatvalue</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fmt</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">units</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">unitstr</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pygeode/axis.html#Pres.formatvalue"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pygeode.Pres.formatvalue" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns formatted string representation of pressure <code class="docutils literal notranslate"><span class="pre">value</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>value</strong><span class="classifier">float or int</span></dt><dd><p>Value to format.</p>
</dd>
<dt><strong>fmt</strong><span class="classifier">string (optional)</span></dt><dd><p>Format specification; see Notes. If the default <code class="docutils literal notranslate"><span class="pre">None</span></code> is specified,
<code class="docutils literal notranslate"><span class="pre">self.formatstr</span></code> is used.</p>
</dd>
<dt><strong>units</strong><span class="classifier">boolean (optional)</span></dt><dd><p>If <code class="docutils literal notranslate"><span class="pre">True</span></code>, will include the units in the string returned.
Default is <code class="docutils literal notranslate"><span class="pre">True</span></code>.</p>
</dd>
<dt><strong>unitstr</strong><span class="classifier">string (optional)</span></dt><dd><p>String to use for the units; default is <code class="docutils literal notranslate"><span class="pre">self.units</span></code>.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt>Formatted representation of the pressure. See notes.</dt><dd></dd>
</dl>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>If <code class="docutils literal notranslate"><span class="pre">fmt</span></code> includes the character ‘<’, it is interpreted as ‘fmt<break’,
such that values less than float(break) are formatted using the format
string fmt, while those greater than float(break) are formatted as integers.
Otherwise the behaviour is like <a class="reference internal" href="var.html#pygeode.Var.formatvalue" title="pygeode.Var.formatvalue"><code class="xref py py-func docutils literal notranslate"><span class="pre">Var.formatvalue()</span></code></a>.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pygeode.tutorial</span> <span class="kn">import</span> <span class="n">t2</span>
<span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">t2</span><span class="o">.</span><span class="n">pres</span><span class="o">.</span><span class="n">formatvalue</span><span class="p">(</span><span class="mi">1000</span><span class="p">))</span>
<span class="go">1000 hPa</span>
<span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">t2</span><span class="o">.</span><span class="n">pres</span><span class="o">.</span><span class="n">formatvalue</span><span class="p">(</span><span class="mf">1.52</span><span class="p">))</span>
<span class="go">1.5 hPa</span>
<span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">t2</span><span class="o">.</span><span class="n">pres</span><span class="o">.</span><span class="n">formatvalue</span><span class="p">(</span><span class="mi">20</span><span class="p">,</span> <span class="s1">'</span><span class="si">%.1g</span><span class="s1">'</span><span class="p">))</span>
<span class="go">2e+01 hPa</span>
<span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">t2</span><span class="o">.</span><span class="n">pres</span><span class="o">.</span><span class="n">formatvalue</span><span class="p">(</span><span class="mi">20</span><span class="p">,</span> <span class="s1">'</span><span class="si">%.1g</span><span class="s1"><10'</span><span class="p">))</span>
<span class="go">20 hPa</span>
</pre></div>
</div>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pygeode.Pres.locator">
<span class="sig-prename descclassname"><span class="pre">Pres.</span></span><span class="sig-name descname"><span class="pre">locator</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pygeode/axis.html#Pres.locator"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pygeode.Pres.locator" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a matplotlib locator object for use in plotting.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pygeode.Hybrid.__init__">
<span class="sig-prename descclassname"><span class="pre">Hybrid.</span></span><span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">A</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">B</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pygeode/axis.html#Hybrid.__init__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pygeode.Hybrid.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new Axis object with the given values.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>values</strong><span class="classifier">numpy.ndarray</span></dt><dd><p>A one-dimensional coordinate defining the axis grid.</p>
</dd>
<dt><strong>name</strong><span class="classifier">string (optional)</span></dt><dd><p>What to call the axis (i.e. for plot titles & when saving to file)</p>
</dd>
<dt><strong>atts</strong><span class="classifier">dict (optional)</span></dt><dd><p>Any additional metadata to associate with the axis. The dictionary
keys should be strings.</p>
</dd>
<dt><strong>plotatts</strong><span class="classifier">dict (optional)</span></dt><dd><p>Parameters that control plotting behaviour; default values are available.
The dictionary keys should be strings.</p>
</dd>
<dt><strong>rtol</strong><span class="classifier">float</span></dt><dd><p>A relative tolerance used for identifying an element of this axis.</p>
</dd>
</dl>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>All subclasses of <a class="reference internal" href="axes.html#pygeode.Axis" title="pygeode.Axis"><code class="xref py py-class docutils literal notranslate"><span class="pre">Axis</span></code></a> need to call this __init__ method within
their own __init__, to properly initialize all attributes.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pygeode.Hybrid.locator">
<span class="sig-prename descclassname"><span class="pre">Hybrid.</span></span><span class="sig-name descname"><span class="pre">locator</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pygeode/axis.html#Hybrid.locator"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pygeode.Hybrid.locator" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a matplotlib locator object for use in plotting.</p>
</dd></dl>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«  <a href="horizontalaxes.html">Horizonal axis objects reference</a>
  ::  
<a class="uplink" href="reference.html">Reference</a>
  ::  
<a class="uplink" href="tutorial.html">Tutorial</a>
  ::  
<a class="uplink" href="gallery/index.html">Gallery</a>
  ::  
<a href="timeaxes.html">Time axes objects reference</a>  »
</p>
</div>
<div class="footer" role="contentinfo">
© Copyright 2020, Mike Neish, Peter Hitchcock.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>