gphys 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ChangeLog +7414 -0
- data/LICENSE.txt +1 -1
- data/Rakefile +0 -2
- data/doc/derivative/math-doc/document/images.log +385 -0
- data/doc/ep_flux/math-doc/document/images.log +1375 -0
- data/doc/ganalysis/doc/NumRu.html +203 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis.html +931 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/BetaPlane.html +574 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/Fitting.html +576 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/LogP.html +425 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/Met.html +2021 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/MetZ.html +524 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/Planet.html +1047 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/QG.html +794 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/QG/Uninitialized.html +215 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/QG_common.html +603 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/QG_sphere.html +760 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/QG_sphere_common.html +251 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/QG_sphere_div.html +424 -0
- data/doc/ganalysis/doc/NumRu/GAnalysis/SigmaCoord.html +321 -0
- data/doc/ganalysis/doc/NumRu/GGraph.html +334 -0
- data/doc/ganalysis/doc/NumRu/GPhys.html +579 -0
- data/doc/ganalysis/doc/Object.html +210 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/beta_plane_rb.html +60 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/covariance_rb.html +56 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/eof_rb.html +64 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/fitting_rb.html +54 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/histogram_rb.html +58 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/log_p_rb.html +60 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/met_rb.html +60 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/met_z_rb.html +58 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/planet_rb.html +58 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/qg_rb.html +64 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis/sigma_coord_rb.html +56 -0
- data/doc/ganalysis/doc/__/__/lib/numru/ganalysis_rb.html +98 -0
- data/doc/ganalysis/doc/created.rid +13 -0
- data/doc/ganalysis/doc/images/brick.png +0 -0
- data/doc/ganalysis/doc/images/brick_link.png +0 -0
- data/doc/ganalysis/doc/images/bug.png +0 -0
- data/doc/ganalysis/doc/images/bullet_black.png +0 -0
- data/doc/ganalysis/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/ganalysis/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/ganalysis/doc/images/date.png +0 -0
- data/doc/ganalysis/doc/images/find.png +0 -0
- data/doc/ganalysis/doc/images/loadingAnimation.gif +0 -0
- data/doc/ganalysis/doc/images/macFFBgHack.png +0 -0
- data/doc/ganalysis/doc/images/package.png +0 -0
- data/doc/ganalysis/doc/images/page_green.png +0 -0
- data/doc/ganalysis/doc/images/page_white_text.png +0 -0
- data/doc/ganalysis/doc/images/page_white_width.png +0 -0
- data/doc/ganalysis/doc/images/plugin.png +0 -0
- data/doc/ganalysis/doc/images/ruby.png +0 -0
- data/doc/ganalysis/doc/images/tag_green.png +0 -0
- data/doc/ganalysis/doc/images/wrench.png +0 -0
- data/doc/ganalysis/doc/images/wrench_orange.png +0 -0
- data/doc/ganalysis/doc/images/zoom.png +0 -0
- data/doc/ganalysis/doc/index.html +383 -0
- data/doc/ganalysis/doc/js/darkfish.js +118 -0
- data/doc/ganalysis/doc/js/jquery.js +32 -0
- data/doc/ganalysis/doc/js/quicksearch.js +114 -0
- data/doc/ganalysis/doc/js/thickbox-compressed.js +10 -0
- data/doc/ganalysis/doc/rdoc.css +763 -0
- data/ext/numru/gphys/ext_init.c +1 -0
- data/ext/numru/gphys/quad_mesh_sample.c +478 -0
- data/gphys.gemspec +2 -2
- data/lib/numru/dclext.rb +394 -14
- data/lib/numru/derivative.rb +6 -0
- data/lib/numru/ganalysis/qg.rb +6 -4
- data/lib/numru/ggraph.rb +41 -8
- data/lib/numru/gphys/gphys.rb +62 -14
- data/lib/numru/gphys/gphys_io.rb +4 -4
- data/lib/numru/gphys/version.rb +2 -2
- metadata +84 -79
- data/.gitignore +0 -14
- data/TODO_ep_flux +0 -6
- data/gphys-bigmem.gemspec +0 -44
- data/install.rb +0 -130
- data/sample/cira86_to_nc.rb +0 -122
- data/sample/druby_cli1.rb +0 -23
- data/sample/druby_cli2.rb +0 -28
- data/sample/druby_serv1.rb +0 -30
- data/sample/druby_serv2.rb +0 -51
- data/sample/ep_flux/demo_NCEP_1.rb +0 -48
- data/sample/ep_flux/demo_NCEP_2.rb +0 -57
- data/sample/ep_flux/demo_NCEP_3.rb +0 -81
- data/sample/ggraph_latlon_labelling_dr002690.rb +0 -159
- data/sample/ggraph_mapfit-axes_dr002687.rb +0 -131
- data/sample/map_projection.rb +0 -121
- data/sample/ncep_theta_coord.rb +0 -79
- data/test_old/eof_slp.rb +0 -28
- data/test_old/mltbit.dat +0 -0
- data/test_old/test_ep_flux.rb +0 -533
- data/test_old/test_multibitIO.rb +0 -19
@@ -0,0 +1,760 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Module: NumRu::GAnalysis::QG_sphere</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../../js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
<script src="../../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
14
|
+
<script src="../../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
15
|
+
<script src="../../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body id="top" class="module">
|
19
|
+
|
20
|
+
<div id="metadata">
|
21
|
+
<div id="home-metadata">
|
22
|
+
<div id="home-section" class="section">
|
23
|
+
<h3 class="section-header">
|
24
|
+
<a href="../../index.html">Home</a>
|
25
|
+
<a href="../../index.html#classes">Classes</a>
|
26
|
+
<a href="../../index.html#methods">Methods</a>
|
27
|
+
</h3>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div id="file-metadata">
|
32
|
+
<div id="file-list-section" class="section">
|
33
|
+
<h3 class="section-header">In Files</h3>
|
34
|
+
<div class="section-body">
|
35
|
+
<ul>
|
36
|
+
|
37
|
+
<li><a href="../../__/__/lib/numru/ganalysis/qg_rb.html?TB_iframe=true&height=550&width=785"
|
38
|
+
class="thickbox" title="../../lib/numru/ganalysis/qg.rb">../../lib/numru/ganalysis/qg.rb</a></li>
|
39
|
+
|
40
|
+
</ul>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="class-metadata">
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
<!-- Method Quickref -->
|
56
|
+
<div id="method-list-section" class="section">
|
57
|
+
<h3 class="section-header">Methods</h3>
|
58
|
+
<ul class="link-list">
|
59
|
+
|
60
|
+
<li><a href="#method-c-div_waf">::div_waf</a></li>
|
61
|
+
|
62
|
+
<li><a href="#method-i-cos_phi">#cos_phi</a></li>
|
63
|
+
|
64
|
+
<li><a href="#method-i-div_h">#div_h</a></li>
|
65
|
+
|
66
|
+
<li><a href="#method-i-gph2psi">#gph2psi</a></li>
|
67
|
+
|
68
|
+
<li><a href="#method-i-gph2psi_gpref">#gph2psi_gpref</a></li>
|
69
|
+
|
70
|
+
<li><a href="#method-i-gph2q">#gph2q</a></li>
|
71
|
+
|
72
|
+
<li><a href="#method-i-gph2qb">#gph2qb</a></li>
|
73
|
+
|
74
|
+
<li><a href="#method-i-gph2ug_vg">#gph2ug_vg</a></li>
|
75
|
+
|
76
|
+
<li><a href="#method-i-grad_h">#grad_h</a></li>
|
77
|
+
|
78
|
+
<li><a href="#method-i-psi2q">#psi2q</a></li>
|
79
|
+
|
80
|
+
<li><a href="#method-i-psi2qb">#psi2qb</a></li>
|
81
|
+
|
82
|
+
<li><a href="#method-i-psi2ug_vg">#psi2ug_vg</a></li>
|
83
|
+
|
84
|
+
<li><a href="#method-i-waf_plumb1986_B1">#waf_plumb1986_B1</a></li>
|
85
|
+
|
86
|
+
<li><a href="#method-i-waf_plumb1986_B2">#waf_plumb1986_B2</a></li>
|
87
|
+
|
88
|
+
</ul>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
<div id="project-metadata">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<div id="classindex-section" class="section project-section">
|
100
|
+
<h3 class="section-header">Class/Module Index
|
101
|
+
<span class="search-toggle"><img src="../../images/find.png"
|
102
|
+
height="16" width="16" alt="[+]"
|
103
|
+
title="show/hide quicksearch" /></span></h3>
|
104
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
105
|
+
<fieldset>
|
106
|
+
<legend>Quicksearch</legend>
|
107
|
+
<input type="text" name="quicksearch" value=""
|
108
|
+
class="quicksearch-field" />
|
109
|
+
</fieldset>
|
110
|
+
</form>
|
111
|
+
|
112
|
+
<ul class="link-list">
|
113
|
+
|
114
|
+
<li><a href="../../NumRu.html">NumRu</a></li>
|
115
|
+
|
116
|
+
<li><a href="../../NumRu/GAnalysis.html">NumRu::GAnalysis</a></li>
|
117
|
+
|
118
|
+
<li><a href="../../NumRu/GAnalysis/BetaPlane.html">NumRu::GAnalysis::BetaPlane</a></li>
|
119
|
+
|
120
|
+
<li><a href="../../NumRu/GAnalysis/Fitting.html">NumRu::GAnalysis::Fitting</a></li>
|
121
|
+
|
122
|
+
<li><a href="../../NumRu/GAnalysis/LogP.html">NumRu::GAnalysis::LogP</a></li>
|
123
|
+
|
124
|
+
<li><a href="../../NumRu/GAnalysis/Met.html">NumRu::GAnalysis::Met</a></li>
|
125
|
+
|
126
|
+
<li><a href="../../NumRu/GAnalysis/MetZ.html">NumRu::GAnalysis::MetZ</a></li>
|
127
|
+
|
128
|
+
<li><a href="../../NumRu/GAnalysis/Planet.html">NumRu::GAnalysis::Planet</a></li>
|
129
|
+
|
130
|
+
<li><a href="../../NumRu/GAnalysis/QG.html">NumRu::GAnalysis::QG</a></li>
|
131
|
+
|
132
|
+
<li><a href="../../NumRu/GAnalysis/QG/Uninitialized.html">NumRu::GAnalysis::QG::Uninitialized</a></li>
|
133
|
+
|
134
|
+
<li><a href="../../NumRu/GAnalysis/QG_common.html">NumRu::GAnalysis::QG_common</a></li>
|
135
|
+
|
136
|
+
<li><a href="../../NumRu/GAnalysis/QG_sphere.html">NumRu::GAnalysis::QG_sphere</a></li>
|
137
|
+
|
138
|
+
<li><a href="../../NumRu/GAnalysis/QG_sphere_common.html">NumRu::GAnalysis::QG_sphere_common</a></li>
|
139
|
+
|
140
|
+
<li><a href="../../NumRu/GAnalysis/QG_sphere_div.html">NumRu::GAnalysis::QG_sphere_div</a></li>
|
141
|
+
|
142
|
+
<li><a href="../../NumRu/GAnalysis/SigmaCoord.html">NumRu::GAnalysis::SigmaCoord</a></li>
|
143
|
+
|
144
|
+
<li><a href="../../NumRu/GGraph.html">NumRu::GGraph</a></li>
|
145
|
+
|
146
|
+
<li><a href="../../NumRu/GPhys.html">NumRu::GPhys</a></li>
|
147
|
+
|
148
|
+
<li><a href="../../Object.html">Object</a></li>
|
149
|
+
|
150
|
+
</ul>
|
151
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div id="documentation">
|
159
|
+
<h1 class="module">NumRu::GAnalysis::QG_sphere</h1>
|
160
|
+
|
161
|
+
<div id="description" class="description">
|
162
|
+
|
163
|
+
<p><a href="QG.html">QG</a> on sphere with non-divergent but inaccurate
|
164
|
+
geostrophic wind</p>
|
165
|
+
|
166
|
+
</div><!-- description -->
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<div id="5Buntitled-5D" class="documentation-section">
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<!-- Methods -->
|
181
|
+
|
182
|
+
<div id="public-class-method-details" class="method-section section">
|
183
|
+
<h3 class="section-header">Public Class Methods</h3>
|
184
|
+
|
185
|
+
|
186
|
+
<div id="div_waf-method" class="method-detail ">
|
187
|
+
<a name="method-c-div_waf"></a>
|
188
|
+
|
189
|
+
|
190
|
+
<div class="method-heading">
|
191
|
+
<span class="method-name">div_waf</span><span
|
192
|
+
class="method-args">(*args)</span>
|
193
|
+
<span class="method-click-advice">click to toggle source</span>
|
194
|
+
</div>
|
195
|
+
|
196
|
+
|
197
|
+
<div class="method-description">
|
198
|
+
|
199
|
+
<p>divergence of wave activity flux (redirected to ((<<a
|
200
|
+
href="QG_sphere.html#method-c-div_waf">div_waf</a>>)))</p>
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
<div class="method-source-code" id="div_waf-source">
|
205
|
+
<pre>
|
206
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 537</span>
|
207
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">div_waf</span>(*<span class="ruby-identifier">args</span>)
|
208
|
+
<span class="ruby-keyword">super</span>(*<span class="ruby-identifier">args</span>) <span class="ruby-comment"># defined in QG_common</span>
|
209
|
+
<span class="ruby-keyword">end</span></pre>
|
210
|
+
</div><!-- div_waf-source -->
|
211
|
+
|
212
|
+
</div>
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
</div><!-- div_waf-method -->
|
218
|
+
|
219
|
+
|
220
|
+
</div><!-- public-class-method-details -->
|
221
|
+
|
222
|
+
<div id="public-instance-method-details" class="method-section section">
|
223
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
224
|
+
|
225
|
+
|
226
|
+
<div id="cos_phi-method" class="method-detail ">
|
227
|
+
<a name="method-i-cos_phi"></a>
|
228
|
+
|
229
|
+
|
230
|
+
<div class="method-heading">
|
231
|
+
<span class="method-name">cos_phi</span><span
|
232
|
+
class="method-args">(gphys)</span>
|
233
|
+
<span class="method-click-advice">click to toggle source</span>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
|
237
|
+
<div class="method-description">
|
238
|
+
|
239
|
+
<p>cosine of latitude</p>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<div class="method-source-code" id="cos_phi-source">
|
244
|
+
<pre>
|
245
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 495</span>
|
246
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">cos_phi</span>(<span class="ruby-identifier">gphys</span>)
|
247
|
+
<span class="ruby-identifier">lam</span>, <span class="ruby-identifier">phi</span>, = <span class="ruby-constant">Planet</span><span class="ruby-operator">::</span><span class="ruby-identifier">get_lambda_phi</span>(<span class="ruby-identifier">gphys</span>)
|
248
|
+
<span class="ruby-identifier">phi</span>.<span class="ruby-identifier">cos</span>
|
249
|
+
<span class="ruby-keyword">end</span></pre>
|
250
|
+
</div><!-- cos_phi-source -->
|
251
|
+
|
252
|
+
</div>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</div><!-- cos_phi-method -->
|
258
|
+
|
259
|
+
|
260
|
+
<div id="div_h-method" class="method-detail ">
|
261
|
+
<a name="method-i-div_h"></a>
|
262
|
+
|
263
|
+
|
264
|
+
<div class="method-heading">
|
265
|
+
<span class="method-name">div_h</span><span
|
266
|
+
class="method-args">(fx, fy)</span>
|
267
|
+
<span class="method-click-advice">click to toggle source</span>
|
268
|
+
</div>
|
269
|
+
|
270
|
+
|
271
|
+
<div class="method-description">
|
272
|
+
|
273
|
+
<p>horizontal divergence (spherical)</p>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<div class="method-source-code" id="div_h-source">
|
278
|
+
<pre>
|
279
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 528</span>
|
280
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">div_h</span>(<span class="ruby-identifier">fx</span>, <span class="ruby-identifier">fy</span>)
|
281
|
+
<span class="ruby-constant">Planet</span><span class="ruby-operator">::</span><span class="ruby-identifier">div_s</span>(<span class="ruby-identifier">fx</span>, <span class="ruby-identifier">fy</span>)
|
282
|
+
<span class="ruby-keyword">end</span></pre>
|
283
|
+
</div><!-- div_h-source -->
|
284
|
+
|
285
|
+
</div>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
</div><!-- div_h-method -->
|
291
|
+
|
292
|
+
|
293
|
+
<div id="gph2psi-method" class="method-detail ">
|
294
|
+
<a name="method-i-gph2psi"></a>
|
295
|
+
|
296
|
+
|
297
|
+
<div class="method-heading">
|
298
|
+
<span class="method-name">gph2psi</span><span
|
299
|
+
class="method-args">(gph, gpref)</span>
|
300
|
+
<span class="method-click-advice">click to toggle source</span>
|
301
|
+
</div>
|
302
|
+
|
303
|
+
|
304
|
+
<div class="method-description">
|
305
|
+
|
306
|
+
<p>geopotential height -> <a href="QG.html">QG</a> stream function</p>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
<div class="method-source-code" id="gph2psi-source">
|
311
|
+
<pre>
|
312
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 460</span>
|
313
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">gph2psi</span>(<span class="ruby-identifier">gph</span>, <span class="ruby-identifier">gpref</span>)
|
314
|
+
<span class="ruby-identifier">gpd</span> = <span class="ruby-identifier">gph</span> * <span class="ruby-constant">Met</span><span class="ruby-operator">::</span><span class="ruby-identifier">g</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">gpref</span>
|
315
|
+
<span class="ruby-identifier">f</span> = <span class="ruby-identifier">f_mask0</span>(<span class="ruby-identifier">gph</span>)
|
316
|
+
<span class="ruby-identifier">psi</span> = <span class="ruby-identifier">gpd</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">f</span>
|
317
|
+
<span class="ruby-identifier">psi</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"psi"</span>
|
318
|
+
<span class="ruby-identifier">psi</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"QG stream function"</span>
|
319
|
+
<span class="ruby-identifier">psi</span>
|
320
|
+
<span class="ruby-keyword">end</span></pre>
|
321
|
+
</div><!-- gph2psi-source -->
|
322
|
+
|
323
|
+
</div>
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
</div><!-- gph2psi-method -->
|
329
|
+
|
330
|
+
|
331
|
+
<div id="gph2psi_gpref-method" class="method-detail ">
|
332
|
+
<a name="method-i-gph2psi_gpref"></a>
|
333
|
+
|
334
|
+
|
335
|
+
<div class="method-heading">
|
336
|
+
<span class="method-name">gph2psi_gpref</span><span
|
337
|
+
class="method-args">(gph)</span>
|
338
|
+
<span class="method-click-advice">click to toggle source</span>
|
339
|
+
</div>
|
340
|
+
|
341
|
+
|
342
|
+
<div class="method-description">
|
343
|
+
|
344
|
+
<p>geopotential height -> <a href="QG.html">QG</a> stream function and the
|
345
|
+
reference geopotential</p>
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
<div class="method-source-code" id="gph2psi_gpref-source">
|
350
|
+
<pre>
|
351
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 450</span>
|
352
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">gph2psi_gpref</span>(<span class="ruby-identifier">gph</span>)
|
353
|
+
<span class="ruby-identifier">gpd</span>, <span class="ruby-identifier">gpref</span> = <span class="ruby-identifier">gph2gpd_gpref</span>(<span class="ruby-identifier">gph</span>)
|
354
|
+
<span class="ruby-identifier">f</span> = <span class="ruby-identifier">f_mask0</span>(<span class="ruby-identifier">gph</span>)
|
355
|
+
<span class="ruby-identifier">psi</span> = <span class="ruby-identifier">gpd</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">f</span>
|
356
|
+
<span class="ruby-identifier">psi</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"psi"</span>
|
357
|
+
<span class="ruby-identifier">psi</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"QG stream function"</span>
|
358
|
+
[<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">gpref</span>]
|
359
|
+
<span class="ruby-keyword">end</span></pre>
|
360
|
+
</div><!-- gph2psi_gpref-source -->
|
361
|
+
|
362
|
+
</div>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
</div><!-- gph2psi_gpref-method -->
|
368
|
+
|
369
|
+
|
370
|
+
<div id="gph2q-method" class="method-detail ">
|
371
|
+
<a name="method-i-gph2q"></a>
|
372
|
+
|
373
|
+
|
374
|
+
<div class="method-heading">
|
375
|
+
<span class="method-name">gph2q</span><span
|
376
|
+
class="method-args">(gph)</span>
|
377
|
+
<span class="method-click-advice">click to toggle source</span>
|
378
|
+
</div>
|
379
|
+
|
380
|
+
|
381
|
+
<div class="method-description">
|
382
|
+
|
383
|
+
<p>geopotential height to quasi-geostrophic potential vorticity (QGPV)</p>
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
<div class="method-source-code" id="gph2q-source">
|
388
|
+
<pre>
|
389
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 430</span>
|
390
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">gph2q</span>(<span class="ruby-identifier">gph</span>)
|
391
|
+
<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">gpref</span> = <span class="ruby-identifier">gph2psi_gpref</span>(<span class="ruby-identifier">gph</span>)
|
392
|
+
<span class="ruby-identifier">n2</span> = <span class="ruby-identifier">gpref2n2</span>(<span class="ruby-identifier">gpref</span>)
|
393
|
+
<span class="ruby-identifier">psi2q</span>(<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">n2</span>)
|
394
|
+
<span class="ruby-keyword">end</span></pre>
|
395
|
+
</div><!-- gph2q-source -->
|
396
|
+
|
397
|
+
</div>
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
</div><!-- gph2q-method -->
|
403
|
+
|
404
|
+
|
405
|
+
<div id="gph2qb-method" class="method-detail ">
|
406
|
+
<a name="method-i-gph2qb"></a>
|
407
|
+
|
408
|
+
|
409
|
+
<div class="method-heading">
|
410
|
+
<span class="method-name">gph2qb</span><span
|
411
|
+
class="method-args">(gph)</span>
|
412
|
+
<span class="method-click-advice">click to toggle source</span>
|
413
|
+
</div>
|
414
|
+
|
415
|
+
|
416
|
+
<div class="method-description">
|
417
|
+
|
418
|
+
<p>same as gph2q, but the QGPV is extended to reflect the lowest-level
|
419
|
+
temperature anomalies</p>
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
<div class="method-source-code" id="gph2qb-source">
|
424
|
+
<pre>
|
425
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 437</span>
|
426
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">gph2qb</span>(<span class="ruby-identifier">gph</span>)
|
427
|
+
<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">gpref</span> = <span class="ruby-identifier">gph2psi_gpref</span>(<span class="ruby-identifier">gph</span>)
|
428
|
+
<span class="ruby-identifier">n2</span> = <span class="ruby-identifier">gpref2n2</span>(<span class="ruby-identifier">gpref</span>)
|
429
|
+
<span class="ruby-identifier">psi2qb</span>(<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">n2</span>)
|
430
|
+
<span class="ruby-keyword">end</span></pre>
|
431
|
+
</div><!-- gph2qb-source -->
|
432
|
+
|
433
|
+
</div>
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
</div><!-- gph2qb-method -->
|
439
|
+
|
440
|
+
|
441
|
+
<div id="gph2ug_vg-method" class="method-detail ">
|
442
|
+
<a name="method-i-gph2ug_vg"></a>
|
443
|
+
|
444
|
+
|
445
|
+
<div class="method-heading">
|
446
|
+
<span class="method-name">gph2ug_vg</span><span
|
447
|
+
class="method-args">(gph)</span>
|
448
|
+
<span class="method-click-advice">click to toggle source</span>
|
449
|
+
</div>
|
450
|
+
|
451
|
+
|
452
|
+
<div class="method-description">
|
453
|
+
|
454
|
+
<p>geopotential height -> geostrophic winds</p>
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
<div class="method-source-code" id="gph2ug_vg-source">
|
459
|
+
<pre>
|
460
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 444</span>
|
461
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">gph2ug_vg</span>(<span class="ruby-identifier">gph</span>)
|
462
|
+
<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">gpref</span> = <span class="ruby-identifier">gph2psi_gpref</span>(<span class="ruby-identifier">gph</span>)
|
463
|
+
<span class="ruby-identifier">psi2ug_vg</span>(<span class="ruby-identifier">psi</span>)
|
464
|
+
<span class="ruby-keyword">end</span></pre>
|
465
|
+
</div><!-- gph2ug_vg-source -->
|
466
|
+
|
467
|
+
</div>
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
</div><!-- gph2ug_vg-method -->
|
473
|
+
|
474
|
+
|
475
|
+
<div id="grad_h-method" class="method-detail ">
|
476
|
+
<a name="method-i-grad_h"></a>
|
477
|
+
|
478
|
+
|
479
|
+
<div class="method-heading">
|
480
|
+
<span class="method-name">grad_h</span><span
|
481
|
+
class="method-args">(gphys)</span>
|
482
|
+
<span class="method-click-advice">click to toggle source</span>
|
483
|
+
</div>
|
484
|
+
|
485
|
+
|
486
|
+
<div class="method-description">
|
487
|
+
|
488
|
+
<p>horizontal gradient (spherical)</p>
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
<div class="method-source-code" id="grad_h-source">
|
493
|
+
<pre>
|
494
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 523</span>
|
495
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">grad_h</span>(<span class="ruby-identifier">gphys</span>)
|
496
|
+
<span class="ruby-constant">Planet</span><span class="ruby-operator">::</span><span class="ruby-identifier">grad_s</span>(<span class="ruby-identifier">gphys</span>)
|
497
|
+
<span class="ruby-keyword">end</span></pre>
|
498
|
+
</div><!-- grad_h-source -->
|
499
|
+
|
500
|
+
</div>
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
</div><!-- grad_h-method -->
|
506
|
+
|
507
|
+
|
508
|
+
<div id="psi2q-method" class="method-detail ">
|
509
|
+
<a name="method-i-psi2q"></a>
|
510
|
+
|
511
|
+
|
512
|
+
<div class="method-heading">
|
513
|
+
<span class="method-name">psi2q</span><span
|
514
|
+
class="method-args">(psi, n2, perturbation=false)</span>
|
515
|
+
<span class="method-click-advice">click to toggle source</span>
|
516
|
+
</div>
|
517
|
+
|
518
|
+
|
519
|
+
<div class="method-description">
|
520
|
+
|
521
|
+
<p><a href="QG.html">QG</a> stream function -> QGPV</p>
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
<div class="method-source-code" id="psi2q-source">
|
526
|
+
<pre>
|
527
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 470</span>
|
528
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">psi2q</span>(<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">n2</span>, <span class="ruby-identifier">perturbation</span>=<span class="ruby-keyword">false</span>)
|
529
|
+
<span class="ruby-identifier">ug</span>, <span class="ruby-identifier">vg</span> = <span class="ruby-identifier">psi2ug_vg</span>(<span class="ruby-identifier">psi</span>)
|
530
|
+
|
531
|
+
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">perturbation</span>
|
532
|
+
<span class="ruby-identifier">avor</span> = <span class="ruby-constant">Planet</span><span class="ruby-operator">::</span><span class="ruby-identifier">absvor_s</span>(<span class="ruby-identifier">ug</span>,<span class="ruby-identifier">vg</span>)
|
533
|
+
<span class="ruby-identifier">avor</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"qgavor"</span>
|
534
|
+
<span class="ruby-identifier">avor</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"QG abs vor"</span>
|
535
|
+
<span class="ruby-keyword">else</span>
|
536
|
+
<span class="ruby-identifier">vor</span> = <span class="ruby-constant">Planet</span><span class="ruby-operator">::</span><span class="ruby-identifier">vor_s</span>(<span class="ruby-identifier">ug</span>,<span class="ruby-identifier">vg</span>)
|
537
|
+
<span class="ruby-identifier">vor</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"qgvor"</span>
|
538
|
+
<span class="ruby-identifier">vor</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"QG vorticity"</span>
|
539
|
+
<span class="ruby-identifier">avor</span> = <span class="ruby-identifier">vor</span>
|
540
|
+
<span class="ruby-keyword">end</span>
|
541
|
+
|
542
|
+
<span class="ruby-identifier">f</span> = <span class="ruby-identifier">f_mask0</span>(<span class="ruby-identifier">psi</span>)
|
543
|
+
<span class="ruby-identifier">qzz</span> = <span class="ruby-identifier">gpd2qzz</span>(<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">n2</span>) * (<span class="ruby-identifier">f</span>*<span class="ruby-identifier">f</span>)
|
544
|
+
|
545
|
+
<span class="ruby-identifier">q</span> = <span class="ruby-identifier">avor</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">qzz</span>
|
546
|
+
<span class="ruby-identifier">q</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"q"</span>
|
547
|
+
<span class="ruby-identifier">q</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"QG PV"</span>
|
548
|
+
|
549
|
+
[<span class="ruby-identifier">q</span>, <span class="ruby-identifier">avor</span>, <span class="ruby-identifier">qzz</span>, <span class="ruby-identifier">ug</span>, <span class="ruby-identifier">vg</span>]
|
550
|
+
<span class="ruby-keyword">end</span></pre>
|
551
|
+
</div><!-- psi2q-source -->
|
552
|
+
|
553
|
+
</div>
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
</div><!-- psi2q-method -->
|
559
|
+
|
560
|
+
|
561
|
+
<div id="psi2qb-method" class="method-detail ">
|
562
|
+
<a name="method-i-psi2qb"></a>
|
563
|
+
|
564
|
+
|
565
|
+
<div class="method-heading">
|
566
|
+
<span class="method-name">psi2qb</span><span
|
567
|
+
class="method-args">(psi, n2, perturbation=false)</span>
|
568
|
+
<span class="method-click-advice">click to toggle source</span>
|
569
|
+
</div>
|
570
|
+
|
571
|
+
|
572
|
+
<div class="method-description">
|
573
|
+
|
574
|
+
<p>same as psi2q, but the QGPV is extended to reflect the lowest-level
|
575
|
+
temperature anomalies</p>
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
<div class="method-source-code" id="psi2qb-source">
|
580
|
+
<pre>
|
581
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 502</span>
|
582
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">psi2qb</span>(<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">n2</span>, <span class="ruby-identifier">perturbation</span>=<span class="ruby-keyword">false</span>)
|
583
|
+
<span class="ruby-identifier">psie</span> = <span class="ruby-identifier">extend_bottom</span>(<span class="ruby-identifier">psi</span>, <span class="ruby-keyword">nil</span>)
|
584
|
+
<span class="ruby-identifier">n2e</span> = <span class="ruby-identifier">extend_bottom</span>(<span class="ruby-identifier">n2</span>, <span class="ruby-keyword">nil</span>)
|
585
|
+
<span class="ruby-identifier">results</span> = <span class="ruby-identifier">psi2q</span>(<span class="ruby-identifier">psie</span>, <span class="ruby-identifier">n2e</span>, <span class="ruby-identifier">perturbation</span>)
|
586
|
+
<span class="ruby-identifier">results</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">z</span><span class="ruby-operator">|</span> <span class="ruby-identifier">cut_bottom</span>(<span class="ruby-identifier">z</span>)}
|
587
|
+
<span class="ruby-keyword">end</span></pre>
|
588
|
+
</div><!-- psi2qb-source -->
|
589
|
+
|
590
|
+
</div>
|
591
|
+
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
</div><!-- psi2qb-method -->
|
596
|
+
|
597
|
+
|
598
|
+
<div id="psi2ug_vg-method" class="method-detail ">
|
599
|
+
<a name="method-i-psi2ug_vg"></a>
|
600
|
+
|
601
|
+
|
602
|
+
<div class="method-heading">
|
603
|
+
<span class="method-name">psi2ug_vg</span><span
|
604
|
+
class="method-args">(psi)</span>
|
605
|
+
<span class="method-click-advice">click to toggle source</span>
|
606
|
+
</div>
|
607
|
+
|
608
|
+
|
609
|
+
<div class="method-description">
|
610
|
+
|
611
|
+
<p><a href="QG.html">QG</a> stream function -> geostrophic winds</p>
|
612
|
+
|
613
|
+
|
614
|
+
|
615
|
+
<div class="method-source-code" id="psi2ug_vg-source">
|
616
|
+
<pre>
|
617
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 510</span>
|
618
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">psi2ug_vg</span>(<span class="ruby-identifier">psi</span>)
|
619
|
+
<span class="ruby-identifier">f</span> = <span class="ruby-identifier">f_mask0</span>(<span class="ruby-identifier">psi</span>)
|
620
|
+
<span class="ruby-identifier">gpx</span>, <span class="ruby-identifier">gpy</span> = <span class="ruby-constant">Planet</span><span class="ruby-operator">::</span><span class="ruby-identifier">grad_s</span>(<span class="ruby-identifier">psi</span>)
|
621
|
+
<span class="ruby-identifier">vg</span> = <span class="ruby-identifier">gpx</span>
|
622
|
+
<span class="ruby-identifier">ug</span> = <span class="ruby-operator">-</span><span class="ruby-identifier">gpy</span>
|
623
|
+
<span class="ruby-identifier">ug</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"ug"</span>
|
624
|
+
<span class="ruby-identifier">vg</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"vg"</span>
|
625
|
+
<span class="ruby-identifier">ug</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"ug"</span>
|
626
|
+
<span class="ruby-identifier">vg</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"vg"</span>
|
627
|
+
[<span class="ruby-identifier">ug</span>, <span class="ruby-identifier">vg</span>]
|
628
|
+
<span class="ruby-keyword">end</span></pre>
|
629
|
+
</div><!-- psi2ug_vg-source -->
|
630
|
+
|
631
|
+
</div>
|
632
|
+
|
633
|
+
|
634
|
+
|
635
|
+
|
636
|
+
</div><!-- psi2ug_vg-method -->
|
637
|
+
|
638
|
+
|
639
|
+
<div id="waf_plumb1986_B1-method" class="method-detail ">
|
640
|
+
<a name="method-i-waf_plumb1986_B1"></a>
|
641
|
+
|
642
|
+
|
643
|
+
<div class="method-heading">
|
644
|
+
<span class="method-name">waf_plumb1986_B1</span><span
|
645
|
+
class="method-args">(psi, n2)</span>
|
646
|
+
<span class="method-click-advice">click to toggle source</span>
|
647
|
+
</div>
|
648
|
+
|
649
|
+
|
650
|
+
<div class="method-description">
|
651
|
+
|
652
|
+
<p>Flux of the pseudo-momentum in y direction by Plumb (1986). Specifically,
|
653
|
+
B_1j in Eq.(2.9), but without the factor p. This flux is relative to the
|
654
|
+
mean flow. Averaged over time (if the data is 4D).</p>
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
<div class="method-source-code" id="waf_plumb1986_B1-source">
|
659
|
+
<pre>
|
660
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 573</span>
|
661
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">waf_plumb1986_B1</span>(<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">n2</span>)
|
662
|
+
<span class="ruby-identifier">psi_x</span>, <span class="ruby-identifier">psi_y</span> = <span class="ruby-constant">Planet</span><span class="ruby-operator">::</span><span class="ruby-identifier">grad_s</span>(<span class="ruby-identifier">psi</span>)
|
663
|
+
<span class="ruby-identifier">psi_z</span> = <span class="ruby-constant">LogP</span>.<span class="ruby-identifier">pcdata_dz</span>( <span class="ruby-identifier">psi</span> )
|
664
|
+
<span class="ruby-identifier">f2</span> = <span class="ruby-identifier">f_mask0</span>(<span class="ruby-identifier">psi</span>) <span class="ruby-operator">**</span> <span class="ruby-value">2</span>
|
665
|
+
<span class="ruby-identifier">cosphi</span> = <span class="ruby-identifier">cos_phi</span>(<span class="ruby-identifier">psi</span>)
|
666
|
+
<span class="ruby-identifier">fx</span> = <span class="ruby-operator">-</span><span class="ruby-identifier">psi_x</span> * <span class="ruby-identifier">psi_y</span> * <span class="ruby-identifier">cosphi</span>
|
667
|
+
<span class="ruby-identifier">fy</span> = (<span class="ruby-identifier">psi_x</span><span class="ruby-operator">**</span><span class="ruby-value">2</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">psi_y</span><span class="ruby-operator">**</span><span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">psi_z</span><span class="ruby-operator">**</span><span class="ruby-value">2</span> * <span class="ruby-identifier">f2</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">n2</span>) * <span class="ruby-identifier">cosphi</span> <span class="ruby-operator">/</span> <span class="ruby-value">2.0</span>
|
668
|
+
<span class="ruby-identifier">fz</span> = <span class="ruby-operator">-</span><span class="ruby-identifier">psi_y</span> * <span class="ruby-identifier">psi_z</span> * (<span class="ruby-identifier">cosphi</span> * <span class="ruby-identifier">f2</span>) <span class="ruby-operator">/</span> <span class="ruby-identifier">n2</span>
|
669
|
+
<span class="ruby-identifier">fx</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"B_11"</span>
|
670
|
+
<span class="ruby-identifier">fy</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"B_12"</span>
|
671
|
+
<span class="ruby-identifier">fz</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"B_13"</span>
|
672
|
+
<span class="ruby-identifier">fx</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"x-comp of Px flux Plumb86"</span>
|
673
|
+
<span class="ruby-identifier">fy</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"y-comp of Px flux Plumb86"</span>
|
674
|
+
<span class="ruby-identifier">fz</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"z-comp of Px flux Plumb86"</span>
|
675
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">psi</span>.<span class="ruby-identifier">rank</span> <span class="ruby-operator">>=</span> <span class="ruby-value">4</span>
|
676
|
+
<span class="ruby-identifier">fx</span> = <span class="ruby-identifier">fx</span>.<span class="ruby-identifier">mean</span>(<span class="ruby-value">-1</span>)
|
677
|
+
<span class="ruby-identifier">fy</span> = <span class="ruby-identifier">fy</span>.<span class="ruby-identifier">mean</span>(<span class="ruby-value">-1</span>)
|
678
|
+
<span class="ruby-identifier">fz</span> = <span class="ruby-identifier">fz</span>.<span class="ruby-identifier">mean</span>(<span class="ruby-value">-1</span>)
|
679
|
+
<span class="ruby-keyword">end</span>
|
680
|
+
[<span class="ruby-identifier">fx</span>, <span class="ruby-identifier">fy</span>, <span class="ruby-identifier">fz</span>]
|
681
|
+
<span class="ruby-keyword">end</span></pre>
|
682
|
+
</div><!-- waf_plumb1986_B1-source -->
|
683
|
+
|
684
|
+
</div>
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
</div><!-- waf_plumb1986_B1-method -->
|
690
|
+
|
691
|
+
|
692
|
+
<div id="waf_plumb1986_B2-method" class="method-detail ">
|
693
|
+
<a name="method-i-waf_plumb1986_B2"></a>
|
694
|
+
|
695
|
+
|
696
|
+
<div class="method-heading">
|
697
|
+
<span class="method-name">waf_plumb1986_B2</span><span
|
698
|
+
class="method-args">(psi, n2)</span>
|
699
|
+
<span class="method-click-advice">click to toggle source</span>
|
700
|
+
</div>
|
701
|
+
|
702
|
+
|
703
|
+
<div class="method-description">
|
704
|
+
|
705
|
+
<p>Flux of the pseudo-momentum in x direction by Plumb (1986). Specifically,
|
706
|
+
B_2j in Eq.(2.9), but without the factor p. This flux is relative to the
|
707
|
+
mean flow. Averaged over time (if the data is 4D).</p>
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
<div class="method-source-code" id="waf_plumb1986_B2-source">
|
712
|
+
<pre>
|
713
|
+
<span class="ruby-comment"># File ../../lib/numru/ganalysis/qg.rb, line 546</span>
|
714
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">waf_plumb1986_B2</span>(<span class="ruby-identifier">psi</span>, <span class="ruby-identifier">n2</span>)
|
715
|
+
<span class="ruby-identifier">psi_x</span>, <span class="ruby-identifier">psi_y</span> = <span class="ruby-constant">Planet</span><span class="ruby-operator">::</span><span class="ruby-identifier">grad_s</span>(<span class="ruby-identifier">psi</span>)
|
716
|
+
<span class="ruby-identifier">psi_z</span> = <span class="ruby-constant">LogP</span>.<span class="ruby-identifier">pcdata_dz</span>( <span class="ruby-identifier">psi</span> )
|
717
|
+
<span class="ruby-identifier">f2</span> = <span class="ruby-identifier">f_mask0</span>(<span class="ruby-identifier">psi</span>) <span class="ruby-operator">**</span> <span class="ruby-value">2</span>
|
718
|
+
<span class="ruby-identifier">cosphi</span> = <span class="ruby-identifier">cos_phi</span>(<span class="ruby-identifier">psi</span>)
|
719
|
+
<span class="ruby-identifier">fx</span> = (<span class="ruby-identifier">psi_x</span><span class="ruby-operator">**</span><span class="ruby-value">2</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">psi_y</span><span class="ruby-operator">**</span><span class="ruby-value">2</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">psi_z</span><span class="ruby-operator">**</span><span class="ruby-value">2</span> * <span class="ruby-identifier">f2</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">n2</span>) * <span class="ruby-identifier">cosphi</span> <span class="ruby-operator">/</span> <span class="ruby-value">2.0</span>
|
720
|
+
<span class="ruby-identifier">fy</span> = <span class="ruby-identifier">psi_x</span> * <span class="ruby-identifier">psi_y</span> * <span class="ruby-identifier">cosphi</span>
|
721
|
+
<span class="ruby-identifier">fz</span> = <span class="ruby-identifier">psi_x</span> * <span class="ruby-identifier">psi_z</span> * (<span class="ruby-identifier">cosphi</span> * <span class="ruby-identifier">f2</span>) <span class="ruby-operator">/</span> <span class="ruby-identifier">n2</span>
|
722
|
+
<span class="ruby-identifier">fx</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"B21"</span>
|
723
|
+
<span class="ruby-identifier">fy</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"B22"</span>
|
724
|
+
<span class="ruby-identifier">fz</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"B23"</span>
|
725
|
+
<span class="ruby-identifier">fx</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"WAF B2x"</span>
|
726
|
+
<span class="ruby-identifier">fy</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"WAF B2y"</span>
|
727
|
+
<span class="ruby-identifier">fz</span>.<span class="ruby-identifier">long_name</span> = <span class="ruby-string">"WAF B2z"</span>
|
728
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">psi</span>.<span class="ruby-identifier">rank</span> <span class="ruby-operator">>=</span> <span class="ruby-value">4</span>
|
729
|
+
<span class="ruby-identifier">fx</span> = <span class="ruby-identifier">fx</span>.<span class="ruby-identifier">mean</span>(<span class="ruby-value">-1</span>)
|
730
|
+
<span class="ruby-identifier">fy</span> = <span class="ruby-identifier">fy</span>.<span class="ruby-identifier">mean</span>(<span class="ruby-value">-1</span>)
|
731
|
+
<span class="ruby-identifier">fz</span> = <span class="ruby-identifier">fz</span>.<span class="ruby-identifier">mean</span>(<span class="ruby-value">-1</span>)
|
732
|
+
<span class="ruby-keyword">end</span>
|
733
|
+
[<span class="ruby-identifier">fx</span>, <span class="ruby-identifier">fy</span>, <span class="ruby-identifier">fz</span>]
|
734
|
+
<span class="ruby-keyword">end</span></pre>
|
735
|
+
</div><!-- waf_plumb1986_B2-source -->
|
736
|
+
|
737
|
+
</div>
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
</div><!-- waf_plumb1986_B2-method -->
|
743
|
+
|
744
|
+
|
745
|
+
</div><!-- public-instance-method-details -->
|
746
|
+
|
747
|
+
</div><!-- 5Buntitled-5D -->
|
748
|
+
|
749
|
+
|
750
|
+
</div><!-- documentation -->
|
751
|
+
|
752
|
+
<div id="validator-badges">
|
753
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
754
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
755
|
+
Rdoc Generator</a> 2</small>.</p>
|
756
|
+
</div>
|
757
|
+
|
758
|
+
</body>
|
759
|
+
</html>
|
760
|
+
|