mdarray 0.5.5.2-java → 0.5.6-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config.rb +29 -95
- data/doc/BinaryOperator.html +20 -21
- data/doc/BitwiseOperators.html +18 -8
- data/doc/BitwiseOperators/BinaryAnd.html +189 -0
- data/doc/BitwiseOperators/BinaryLeftShift.html +189 -0
- data/doc/BitwiseOperators/BinaryOnesComplement.html +189 -0
- data/doc/BitwiseOperators/BinaryOr.html +189 -0
- data/doc/BitwiseOperators/BinaryRightShift.html +189 -0
- data/doc/BitwiseOperators/BinaryXor.html +189 -0
- data/doc/BooleanFunctions.html +18 -8
- data/doc/BooleanFunctions/And.html +189 -0
- data/doc/BooleanFunctions/Not.html +189 -0
- data/doc/BooleanFunctions/Or.html +189 -0
- data/doc/BooleanMDArray.html +10 -10
- data/doc/ByteMDArray.html +73 -14
- data/doc/CernDoubleFunctions.html +208 -0
- data/doc/CernFloatFunctions.html +208 -0
- data/doc/CernFunctions.html +828 -0
- data/doc/CernIntFunctions.html +208 -0
- data/doc/CernLongFunctions.html +208 -0
- data/doc/CharMDArray.html +181 -0
- data/doc/Colt.html +18 -20
- data/doc/ComparisonOperators.html +18 -8
- data/doc/ComparisonOperators/Eq.html +189 -0
- data/doc/ComparisonOperators/Ge.html +189 -0
- data/doc/ComparisonOperators/Gt.html +189 -0
- data/doc/ComparisonOperators/Le.html +189 -0
- data/doc/ComparisonOperators/Lt.html +189 -0
- data/doc/Const.html +107 -47
- data/doc/Csv.html +325 -113
- data/doc/Csv/Dimension.html +771 -0
- data/doc/Csv/Dimensions.html +654 -0
- data/doc/DDescriptive.html +573 -625
- data/doc/DoubleMDArray.html +40 -172
- data/doc/DoubleStatList.html +19 -20
- data/doc/FastBinaryOperator.html +166 -148
- data/doc/FastUnaryOperator.html +104 -109
- data/doc/FloatMDArray.html +55 -16
- data/doc/FunctionCreation.html +53 -273
- data/doc/FunctionMap.html +381 -93
- data/doc/GenericFunctions.html +18 -8
- data/doc/GenericFunctions/Null.html +187 -0
- data/doc/IntMDArray.html +77 -16
- data/doc/Java/CernJetMathTdouble/DoubleFunctions.html +120 -0
- data/doc/Java/CernJetMathTfloat/FloatFunctions.html +120 -0
- data/doc/Java/CernJetMathTint/IntFunctions.html +120 -0
- data/doc/Java/CernJetMathTlong/LongFunctions.html +120 -0
- data/doc/LazyBinaryOperator.html +714 -0
- data/doc/LazyMDArray.html +990 -0
- data/doc/LazyMDArray/BinaryComp.html +282 -0
- data/doc/LazyMDArray/UnaryComp.html +280 -0
- data/doc/LazyUnaryOperator.html +537 -0
- data/doc/LongMDArray.html +59 -15
- data/doc/MDArray.html +3223 -2181
- data/doc/MDArray/Counter.html +321 -1233
- data/doc/MDArray/IteratorFast.html +177 -116
- data/doc/MDArray/IteratorFastBoolean.html +37 -41
- data/doc/MDArray/IteratorFastByte.html +46 -39
- data/doc/MDArray/IteratorFastChar.html +37 -41
- data/doc/MDArray/IteratorFastDouble.html +37 -41
- data/doc/MDArray/IteratorFastFloat.html +37 -41
- data/doc/MDArray/IteratorFastInt.html +37 -41
- data/doc/MDArray/IteratorFastLong.html +37 -41
- data/doc/MDArray/IteratorFastShort.html +37 -41
- data/doc/MDArray/Section.html +561 -0
- data/doc/Nashorn.html +1407 -0
- data/doc/NetCDF.html +749 -0
- data/doc/NetCDF/Attribute.html +875 -0
- data/doc/NetCDF/AttributeWriter.html +286 -0
- data/doc/NetCDF/CDMNode.html +460 -0
- data/doc/NetCDF/Dimension.html +559 -0
- data/doc/NetCDF/DimensionWriter.html +642 -0
- data/doc/NetCDF/File.html +1593 -0
- data/doc/NetCDF/FileParent.html +674 -0
- data/doc/NetCDF/FileWriter.html +2875 -0
- data/doc/NetCDF/Group.html +685 -0
- data/doc/NetCDF/GroupWriter.html +851 -0
- data/doc/NetCDF/TimeVariable.html +646 -0
- data/doc/NetCDF/Variable.html +2994 -0
- data/doc/NetCDF/VariableWriter.html +420 -0
- data/doc/NonNumericalMDArray.html +11 -11
- data/doc/NumericFunctions.html +38 -30
- data/doc/NumericFunctions/Abs.html +189 -0
- data/doc/NumericFunctions/Add.html +189 -0
- data/doc/NumericFunctions/Ceil.html +189 -0
- data/doc/NumericFunctions/Cube.html +189 -0
- data/doc/NumericFunctions/Div.html +189 -0
- data/doc/NumericFunctions/Floor.html +189 -0
- data/doc/NumericFunctions/Fourth.html +189 -0
- data/doc/NumericFunctions/IsZero.html +189 -0
- data/doc/NumericFunctions/Max.html +189 -0
- data/doc/NumericFunctions/Min.html +189 -0
- data/doc/NumericFunctions/Mul.html +189 -0
- data/doc/NumericFunctions/Power.html +189 -0
- data/doc/NumericFunctions/Square.html +189 -0
- data/doc/NumericFunctions/Sub.html +189 -0
- data/doc/NumericFunctions/Truncate.html +189 -0
- data/doc/NumericalMDArray.html +14 -15
- data/doc/Operator.html +318 -109
- data/doc/Proc.html +120 -129
- data/doc/RubyBinaryOperator.html +66 -70
- data/doc/RubyFunctions.html +572 -27
- data/doc/RubyMath.html +18 -8
- data/doc/RubyMath/Acos.html +189 -0
- data/doc/RubyMath/Acosh.html +189 -0
- data/doc/RubyMath/Asin.html +189 -0
- data/doc/RubyMath/Asinh.html +189 -0
- data/doc/RubyMath/Atan.html +189 -0
- data/doc/RubyMath/Atan2.html +189 -0
- data/doc/RubyMath/Atanh.html +189 -0
- data/doc/RubyMath/Cbrt.html +189 -0
- data/doc/RubyMath/Cos.html +189 -0
- data/doc/RubyMath/Cosh.html +189 -0
- data/doc/RubyMath/Erf.html +189 -0
- data/doc/RubyMath/Erfc.html +189 -0
- data/doc/RubyMath/Exp.html +189 -0
- data/doc/RubyMath/Gamma.html +189 -0
- data/doc/RubyMath/Hypot.html +189 -0
- data/doc/RubyMath/Ldexp.html +189 -0
- data/doc/RubyMath/Log.html +189 -0
- data/doc/RubyMath/Log10.html +189 -0
- data/doc/RubyMath/Log2.html +189 -0
- data/doc/RubyMath/Neg.html +189 -0
- data/doc/RubyMath/Sin.html +189 -0
- data/doc/RubyMath/Sinh.html +189 -0
- data/doc/RubyMath/Sqrt.html +189 -0
- data/doc/RubyMath/Tan.html +189 -0
- data/doc/RubyMath/Tanh.html +189 -0
- data/doc/RubyStats.html +8 -8
- data/doc/RubyUnaryOperator.html +61 -65
- data/doc/ShortMDArray.html +69 -14
- data/doc/Sol.html +700 -0
- data/doc/Sol/BarChart.html +181 -0
- data/doc/Sol/BaseChart.html +800 -0
- data/doc/Sol/Bootstrap.html +1137 -0
- data/doc/Sol/Bridge.html +586 -0
- data/doc/Sol/Chart.html +1162 -0
- data/doc/Sol/CoordinateChart.html +679 -0
- data/doc/Sol/Dashboard.html +2094 -0
- data/doc/Sol/Dashboard/DCFX.html +786 -0
- data/doc/Sol/Dashboard/MyHandle.html +338 -0
- data/doc/Sol/Dashboard/MyService.html +202 -0
- data/doc/Sol/Dashboard/MyTask.html +291 -0
- data/doc/Sol/Interval.html +1213 -0
- data/doc/Sol/LineChart.html +346 -0
- data/doc/Sol/LinearScale.html +334 -0
- data/doc/Sol/Margins.html +219 -0
- data/doc/Sol/OrdinalScale.html +263 -0
- data/doc/Sol/Scale.html +462 -0
- data/doc/Sol/Stack.html +199 -0
- data/doc/Sol/TimeScale.html +397 -0
- data/doc/StatList.html +110 -125
- data/doc/StringMDArray.html +10 -10
- data/doc/StructureMDArray.html +10 -10
- data/doc/UnaryOperator.html +20 -21
- data/doc/UserFunction.html +51 -49
- data/doc/_index.html +881 -106
- data/doc/class_list.html +8 -3
- data/doc/css/style.css +2 -1
- data/doc/file.README.html +455 -104
- data/doc/file_list.html +7 -2
- data/doc/frames.html +5 -7
- data/doc/index.html +455 -104
- data/doc/js/app.js +7 -2
- data/doc/js/full_list.js +11 -3
- data/doc/method_list.html +3170 -1233
- data/doc/top-level-namespace.html +31 -8
- data/lib/colt/matrix/algebra.rb +5 -5
- data/lib/mdarray.rb +6 -3
- data/lib/mdarray/csv.rb +25 -5
- data/lib/mdarray/fast_operators.rb +1 -1
- data/lib/mdarray/function_creation.rb +3 -1
- data/lib/mdarray/hierarchy.rb +2 -0
- data/lib/mdarray/operators.rb +1 -1
- data/lib/mdarray/ruby_functions.rb +8 -4
- data/lib/mdarray/ruby_math.rb +0 -28
- data/test/colt/matrix/test_matrix2d_floatingalgebra.rb +31 -7
- data/test/complete.rb +4 -4
- data/test/mdarray/PETR4_2014.csv +249 -0
- data/test/mdarray/VALE_2014.csv +253 -0
- data/test/mdarray/VALE_PETR4.csv +501 -0
- data/test/mdarray/arithmetic_casting.rb +1 -0
- data/test/mdarray/test_access.rb +1 -0
- data/test/mdarray/test_boolean.rb +1 -0
- data/test/mdarray/test_comparison.rb +1 -0
- data/test/mdarray/test_complete.rb +2 -5
- data/test/mdarray/test_counter.rb +1 -0
- data/test/mdarray/test_creation.rb +1 -0
- data/test/mdarray/test_csv.rb +51 -0
- data/test/mdarray/test_error.rb +1 -0
- data/test/mdarray/test_non_numeric.rb +1 -1
- data/test/mdarray/test_operator.rb +31 -14
- data/test/mdarray/test_performance.rb +2 -1
- data/test/mdarray/test_printing.rb +1 -0
- data/test/mdarray/test_sections.rb +1 -0
- data/test/mdarray/test_shape.rb +1 -0
- data/test/mdarray/test_trigonometry.rb +1 -0
- data/test/mdarray/test_views.rb +1 -0
- data/vendor/mdarray.jar +0 -0
- data/vendor/{netcdfAll-4.5_0.jar → netcdfAll-4.6.jar} +0 -0
- data/vendor/slf4j-jdk14-1.7.12.jar +0 -0
- data/version.rb +1 -1
- metadata +247 -139
- data/lib/env.rb +0 -12
- data/lib/mdarray/lazy_mdarray.rb +0 -315
- data/lib/mdarray/lazy_operators.rb +0 -174
- data/test/env.rb +0 -8
- data/test/mdarray/test_lazy.rb +0 -306
data/doc/NetCDF.html
ADDED
|
@@ -0,0 +1,749 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Class: NetCDF
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.8.7.6
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '';
|
|
20
|
+
framesUrl = "frames.html#!NetCDF.html";
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
25
|
+
|
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id="header">
|
|
32
|
+
<div id="menu">
|
|
33
|
+
|
|
34
|
+
<a href="_index.html">Index (N)</a> »
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<span class="title">NetCDF</span>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div id="search">
|
|
44
|
+
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<iframe id="search_frame"></iframe>
|
|
65
|
+
|
|
66
|
+
<div id="content"><h1>Class: NetCDF
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</h1>
|
|
71
|
+
|
|
72
|
+
<dl class="box">
|
|
73
|
+
|
|
74
|
+
<dt class="r1">Inherits:</dt>
|
|
75
|
+
<dd class="r1">
|
|
76
|
+
<span class="inheritName">Object</span>
|
|
77
|
+
|
|
78
|
+
<ul class="fullTree">
|
|
79
|
+
<li>Object</li>
|
|
80
|
+
|
|
81
|
+
<li class="next">NetCDF</li>
|
|
82
|
+
|
|
83
|
+
</ul>
|
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
85
|
+
|
|
86
|
+
</dd>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
|
97
|
+
<dd class="r2 last">lib/netcdf/attribute.rb<span class="defines">,<br />
|
|
98
|
+
lib/netcdf/cdm_node.rb,<br /> lib/netcdf/dimension.rb,<br /> lib/netcdf/file.rb,<br /> lib/netcdf/file_writer.rb,<br /> lib/netcdf/group.rb,<br /> lib/netcdf/netcdf.rb,<br /> lib/netcdf/variable.rb</span>
|
|
99
|
+
</dd>
|
|
100
|
+
|
|
101
|
+
</dl>
|
|
102
|
+
<div class="clear"></div>
|
|
103
|
+
|
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
|
105
|
+
<div class="discussion">
|
|
106
|
+
|
|
107
|
+
<p>Copyright © 2013 Rodrigo Botafogo. All Rights Reserved. Permission to use,
|
|
108
|
+
copy, modify, and distribute this software and its documentation, without
|
|
109
|
+
fee and without a signed licensing agreement, is hereby granted, provided
|
|
110
|
+
that the above copyright notice, this paragraph and the following two
|
|
111
|
+
paragraphs appear in all copies, modifications, and distributions.</p>
|
|
112
|
+
|
|
113
|
+
<p>IN NO EVENT SHALL RODRIGO BOTAFOGO BE LIABLE TO ANY PARTY FOR DIRECT,
|
|
114
|
+
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST
|
|
115
|
+
PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
|
|
116
|
+
EVEN IF RODRIGO BOTAFOGO HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
117
|
+
DAMAGE.</p>
|
|
118
|
+
|
|
119
|
+
<p>RODRIGO BOTAFOGO SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
|
|
120
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
121
|
+
PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY,
|
|
122
|
+
PROVIDED HEREUNDER IS PROVIDED “AS IS”. RODRIGO BOTAFOGO HAS NO OBLIGATION
|
|
123
|
+
TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.</p>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="tags">
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
</div><h2>Defined Under Namespace</h2>
|
|
132
|
+
<p class="children">
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="NetCDF/Attribute.html" title="NetCDF::Attribute (class)">Attribute</a></span>, <span class='object_link'><a href="NetCDF/AttributeWriter.html" title="NetCDF::AttributeWriter (class)">AttributeWriter</a></span>, <span class='object_link'><a href="NetCDF/CDMNode.html" title="NetCDF::CDMNode (class)">CDMNode</a></span>, <span class='object_link'><a href="NetCDF/Dimension.html" title="NetCDF::Dimension (class)">Dimension</a></span>, <span class='object_link'><a href="NetCDF/DimensionWriter.html" title="NetCDF::DimensionWriter (class)">DimensionWriter</a></span>, <span class='object_link'><a href="NetCDF/File.html" title="NetCDF::File (class)">File</a></span>, <span class='object_link'><a href="NetCDF/FileParent.html" title="NetCDF::FileParent (class)">FileParent</a></span>, <span class='object_link'><a href="NetCDF/FileWriter.html" title="NetCDF::FileWriter (class)">FileWriter</a></span>, <span class='object_link'><a href="NetCDF/Group.html" title="NetCDF::Group (class)">Group</a></span>, <span class='object_link'><a href="NetCDF/GroupWriter.html" title="NetCDF::GroupWriter (class)">GroupWriter</a></span>, <span class='object_link'><a href="NetCDF/TimeVariable.html" title="NetCDF::TimeVariable (class)">TimeVariable</a></span>, <span class='object_link'><a href="NetCDF/Variable.html" title="NetCDF::Variable (class)">Variable</a></span>, <span class='object_link'><a href="NetCDF/VariableWriter.html" title="NetCDF::VariableWriter (class)">VariableWriter</a></span>
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
</p>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<h2>
|
|
150
|
+
Class Method Summary
|
|
151
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
152
|
+
</h2>
|
|
153
|
+
|
|
154
|
+
<ul class="summary">
|
|
155
|
+
|
|
156
|
+
<li class="public ">
|
|
157
|
+
<span class="summary_signature">
|
|
158
|
+
|
|
159
|
+
<a href="#define-class_method" title="define (class method)">+ (Object) <strong>define</strong>(home_dir, file_name, version, outside_scope = nil, &block) </a>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
</span>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<span class="summary_desc"><div class='inline'>
|
|
174
|
+
<p>------------------------------------------------------------------------------------.</p>
|
|
175
|
+
</div></span>
|
|
176
|
+
|
|
177
|
+
</li>
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
<li class="public ">
|
|
181
|
+
<span class="summary_signature">
|
|
182
|
+
|
|
183
|
+
<a href="#get_dtype-class_method" title="get_dtype (class method)">+ (Object) <strong>get_dtype</strong>(type) </a>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
</span>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
<span class="summary_desc"><div class='inline'>
|
|
198
|
+
<p>------------------------------------------------------------------------------------.</p>
|
|
199
|
+
</div></span>
|
|
200
|
+
|
|
201
|
+
</li>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
<li class="public ">
|
|
205
|
+
<span class="summary_signature">
|
|
206
|
+
|
|
207
|
+
<a href="#output-class_method" title="output (class method)">+ (Object) <strong>output</strong>(file_name) </a>
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
</span>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<span class="summary_desc"><div class='inline'>
|
|
222
|
+
<p>------------------------------------------------------------------------------------
|
|
223
|
+
Outputs the data format
|
|
224
|
+
------------------------------------------------------------------------------------.</p>
|
|
225
|
+
</div></span>
|
|
226
|
+
|
|
227
|
+
</li>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
<li class="public ">
|
|
231
|
+
<span class="summary_signature">
|
|
232
|
+
|
|
233
|
+
<a href="#read-class_method" title="read (class method)">+ (Object) <strong>read</strong>(home_dir, file_name, outside_scope = nil, &block) </a>
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
</span>
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
<span class="summary_desc"><div class='inline'>
|
|
248
|
+
<p>------------------------------------------------------------------------------------.</p>
|
|
249
|
+
</div></span>
|
|
250
|
+
|
|
251
|
+
</li>
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
<li class="public ">
|
|
255
|
+
<span class="summary_signature">
|
|
256
|
+
|
|
257
|
+
<a href="#redefine-class_method" title="redefine (class method)">+ (Object) <strong>redefine</strong>(home_dir, file_name, outside_scope = nil, &block) </a>
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
</span>
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
<span class="summary_desc"><div class='inline'>
|
|
272
|
+
<p>------------------------------------------------------------------------------------.</p>
|
|
273
|
+
</div></span>
|
|
274
|
+
|
|
275
|
+
</li>
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
<li class="public ">
|
|
279
|
+
<span class="summary_signature">
|
|
280
|
+
|
|
281
|
+
<a href="#write-class_method" title="write (class method)">+ (Object) <strong>write</strong>(home_dir, file_name, outside_scope = nil, &block) </a>
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
</span>
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
<span class="summary_desc"><div class='inline'>
|
|
296
|
+
<p>------------------------------------------------------------------------------------.</p>
|
|
297
|
+
</div></span>
|
|
298
|
+
|
|
299
|
+
</li>
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
<li class="public ">
|
|
303
|
+
<span class="summary_signature">
|
|
304
|
+
|
|
305
|
+
<a href="#writer_version-class_method" title="writer_version (class method)">+ (Object) <strong>writer_version</strong>(name) </a>
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
</span>
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
<span class="summary_desc"><div class='inline'>
|
|
320
|
+
<p>------------------------------------------------------------------------------------.</p>
|
|
321
|
+
</div></span>
|
|
322
|
+
|
|
323
|
+
</li>
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
</ul>
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
<div id="class_method_details" class="method_details_list">
|
|
332
|
+
<h2>Class Method Details</h2>
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
<div class="method_details first">
|
|
336
|
+
<h3 class="signature first" id="define-class_method">
|
|
337
|
+
|
|
338
|
+
+ (<tt>Object</tt>) <strong>define</strong>(home_dir, file_name, version, outside_scope = nil, &block)
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
</h3><div class="docstring">
|
|
345
|
+
<div class="discussion">
|
|
346
|
+
<hr>
|
|
347
|
+
<hr>
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
<div class="tags">
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
</div><table class="source_code">
|
|
356
|
+
<tr>
|
|
357
|
+
<td>
|
|
358
|
+
<pre class="lines">
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
35
|
|
362
|
+
36
|
|
363
|
+
37
|
|
364
|
+
38
|
|
365
|
+
39
|
|
366
|
+
40
|
|
367
|
+
41
|
|
368
|
+
42
|
|
369
|
+
43
|
|
370
|
+
44
|
|
371
|
+
45
|
|
372
|
+
46
|
|
373
|
+
47
|
|
374
|
+
48
|
|
375
|
+
49</pre>
|
|
376
|
+
</td>
|
|
377
|
+
<td>
|
|
378
|
+
<pre class="code"><span class="info file"># File 'lib/netcdf/netcdf.rb', line 35</span>
|
|
379
|
+
|
|
380
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_define'>define</span><span class='lparen'>(</span><span class='id identifier rubyid_home_dir'>home_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_version'>version</span><span class='comma'>,</span> <span class='id identifier rubyid_outside_scope'>outside_scope</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
381
|
+
|
|
382
|
+
<span class='id identifier rubyid_writer'>writer</span> <span class='op'>=</span> <span class='const'>NetCDF</span><span class='op'>::</span><span class='const'>FileWriter</span><span class='period'>.</span><span class='id identifier rubyid_new_file'>new_file</span><span class='lparen'>(</span><span class='id identifier rubyid_home_dir'>home_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_version'>version</span><span class='comma'>,</span> <span class='id identifier rubyid_outside_scope'>outside_scope</span><span class='rparen'>)</span>
|
|
383
|
+
<span class='kw'>begin</span>
|
|
384
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span>
|
|
385
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_instance_eval'>instance_eval</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
386
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span>
|
|
387
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
|
388
|
+
<span class='id identifier rubyid_writer'>writer</span>
|
|
389
|
+
<span class='kw'>rescue</span>
|
|
390
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
|
391
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Illegal opperation occured on file: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
|
392
|
+
<span class='kw'>end</span>
|
|
393
|
+
|
|
394
|
+
<span class='kw'>end</span></pre>
|
|
395
|
+
</td>
|
|
396
|
+
</tr>
|
|
397
|
+
</table>
|
|
398
|
+
</div>
|
|
399
|
+
|
|
400
|
+
<div class="method_details ">
|
|
401
|
+
<h3 class="signature " id="get_dtype-class_method">
|
|
402
|
+
|
|
403
|
+
+ (<tt>Object</tt>) <strong>get_dtype</strong>(type)
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
</h3><div class="docstring">
|
|
410
|
+
<div class="discussion">
|
|
411
|
+
<hr>
|
|
412
|
+
<hr>
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
</div>
|
|
416
|
+
</div>
|
|
417
|
+
<div class="tags">
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
</div><table class="source_code">
|
|
421
|
+
<tr>
|
|
422
|
+
<td>
|
|
423
|
+
<pre class="lines">
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
132
|
|
427
|
+
133
|
|
428
|
+
134</pre>
|
|
429
|
+
</td>
|
|
430
|
+
<td>
|
|
431
|
+
<pre class="code"><span class="info file"># File 'lib/netcdf/netcdf.rb', line 132</span>
|
|
432
|
+
|
|
433
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_dtype'>get_dtype</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
|
434
|
+
<span class='const'>DataType</span><span class='period'>.</span><span class='id identifier rubyid_valueOf'>valueOf</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='rparen'>)</span>
|
|
435
|
+
<span class='kw'>end</span></pre>
|
|
436
|
+
</td>
|
|
437
|
+
</tr>
|
|
438
|
+
</table>
|
|
439
|
+
</div>
|
|
440
|
+
|
|
441
|
+
<div class="method_details ">
|
|
442
|
+
<h3 class="signature " id="output-class_method">
|
|
443
|
+
|
|
444
|
+
+ (<tt>Object</tt>) <strong>output</strong>(file_name)
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
</h3><div class="docstring">
|
|
451
|
+
<div class="discussion">
|
|
452
|
+
<hr>
|
|
453
|
+
|
|
454
|
+
<p>Outputs the data format</p>
|
|
455
|
+
<hr>
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
</div>
|
|
459
|
+
</div>
|
|
460
|
+
<div class="tags">
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
</div><table class="source_code">
|
|
464
|
+
<tr>
|
|
465
|
+
<td>
|
|
466
|
+
<pre class="lines">
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
124
|
|
470
|
+
125
|
|
471
|
+
126</pre>
|
|
472
|
+
</td>
|
|
473
|
+
<td>
|
|
474
|
+
<pre class="code"><span class="info file"># File 'lib/netcdf/netcdf.rb', line 124</span>
|
|
475
|
+
|
|
476
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_output'>output</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span>
|
|
477
|
+
<span class='id identifier rubyid_print'>print</span> <span class='backtick'>`</span><span class='tstring_content'>ncdump </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rbrace'>}</span><span class='tstring_end'>`</span></span>
|
|
478
|
+
<span class='kw'>end</span></pre>
|
|
479
|
+
</td>
|
|
480
|
+
</tr>
|
|
481
|
+
</table>
|
|
482
|
+
</div>
|
|
483
|
+
|
|
484
|
+
<div class="method_details ">
|
|
485
|
+
<h3 class="signature " id="read-class_method">
|
|
486
|
+
|
|
487
|
+
+ (<tt>Object</tt>) <strong>read</strong>(home_dir, file_name, outside_scope = nil, &block)
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
</h3><div class="docstring">
|
|
494
|
+
<div class="discussion">
|
|
495
|
+
<hr>
|
|
496
|
+
<hr>
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
<div class="tags">
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
</div><table class="source_code">
|
|
505
|
+
<tr>
|
|
506
|
+
<td>
|
|
507
|
+
<pre class="lines">
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
103
|
|
511
|
+
104
|
|
512
|
+
105
|
|
513
|
+
106
|
|
514
|
+
107
|
|
515
|
+
108
|
|
516
|
+
109
|
|
517
|
+
110
|
|
518
|
+
111
|
|
519
|
+
112
|
|
520
|
+
113
|
|
521
|
+
114
|
|
522
|
+
115
|
|
523
|
+
116
|
|
524
|
+
117
|
|
525
|
+
118</pre>
|
|
526
|
+
</td>
|
|
527
|
+
<td>
|
|
528
|
+
<pre class="code"><span class="info file"># File 'lib/netcdf/netcdf.rb', line 103</span>
|
|
529
|
+
|
|
530
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_home_dir'>home_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_outside_scope'>outside_scope</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
531
|
+
|
|
532
|
+
<span class='id identifier rubyid_reader'>reader</span> <span class='op'>=</span> <span class='const'>NetCDF</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_home_dir'>home_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_outside_scope'>outside_scope</span><span class='rparen'>)</span>
|
|
533
|
+
<span class='kw'>begin</span>
|
|
534
|
+
<span class='id identifier rubyid_reader'>reader</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span>
|
|
535
|
+
<span class='id identifier rubyid_reader'>reader</span><span class='period'>.</span><span class='id identifier rubyid_instance_eval'>instance_eval</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
536
|
+
<span class='id identifier rubyid_reader'>reader</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
|
537
|
+
<span class='id identifier rubyid_reader'>reader</span>
|
|
538
|
+
<span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
|
539
|
+
<span class='id identifier rubyid_reader'>reader</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
|
540
|
+
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span>
|
|
541
|
+
<span class='comment'># raise "Illegal opperation occured on file: #{file_name}"
|
|
542
|
+
</span> <span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
|
|
543
|
+
<span class='kw'>end</span>
|
|
544
|
+
|
|
545
|
+
<span class='kw'>end</span></pre>
|
|
546
|
+
</td>
|
|
547
|
+
</tr>
|
|
548
|
+
</table>
|
|
549
|
+
</div>
|
|
550
|
+
|
|
551
|
+
<div class="method_details ">
|
|
552
|
+
<h3 class="signature " id="redefine-class_method">
|
|
553
|
+
|
|
554
|
+
+ (<tt>Object</tt>) <strong>redefine</strong>(home_dir, file_name, outside_scope = nil, &block)
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
</h3><div class="docstring">
|
|
561
|
+
<div class="discussion">
|
|
562
|
+
<hr>
|
|
563
|
+
<hr>
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
</div>
|
|
567
|
+
</div>
|
|
568
|
+
<div class="tags">
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
</div><table class="source_code">
|
|
572
|
+
<tr>
|
|
573
|
+
<td>
|
|
574
|
+
<pre class="lines">
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
55
|
|
578
|
+
56
|
|
579
|
+
57
|
|
580
|
+
58
|
|
581
|
+
59
|
|
582
|
+
60
|
|
583
|
+
61
|
|
584
|
+
62
|
|
585
|
+
63
|
|
586
|
+
64
|
|
587
|
+
65
|
|
588
|
+
66
|
|
589
|
+
67
|
|
590
|
+
68
|
|
591
|
+
69
|
|
592
|
+
70
|
|
593
|
+
71
|
|
594
|
+
72
|
|
595
|
+
73
|
|
596
|
+
74
|
|
597
|
+
75
|
|
598
|
+
76</pre>
|
|
599
|
+
</td>
|
|
600
|
+
<td>
|
|
601
|
+
<pre class="code"><span class="info file"># File 'lib/netcdf/netcdf.rb', line 55</span>
|
|
602
|
+
|
|
603
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_redefine'>redefine</span><span class='lparen'>(</span><span class='id identifier rubyid_home_dir'>home_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_outside_scope'>outside_scope</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
604
|
+
|
|
605
|
+
<span class='id identifier rubyid_writer'>writer</span> <span class='op'>=</span> <span class='const'>NetCDF</span><span class='op'>::</span><span class='const'>FileWriter</span><span class='period'>.</span><span class='id identifier rubyid_existing_file'>existing_file</span><span class='lparen'>(</span><span class='id identifier rubyid_home_dir'>home_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_outside_scope'>outside_scope</span><span class='rparen'>)</span>
|
|
606
|
+
<span class='kw'>begin</span>
|
|
607
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span>
|
|
608
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_redefine'>redefine</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
609
|
+
<span class='comment'># we are not really adding a root group, but actually getting the root group
|
|
610
|
+
</span> <span class='comment'># can only be done in define mode
|
|
611
|
+
</span> <span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_add_root_group'>add_root_group</span>
|
|
612
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_instance_eval'>instance_eval</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
613
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_redefine'>redefine</span> <span class='op'>=</span> <span class='kw'>false</span>
|
|
614
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
|
615
|
+
<span class='id identifier rubyid_writer'>writer</span>
|
|
616
|
+
<span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span><span class='id identifier rubyid_e'>e</span>
|
|
617
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
|
618
|
+
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span>
|
|
619
|
+
<span class='comment'># p e.backtrace.inspect
|
|
620
|
+
</span> <span class='comment'># raise "Illegal opperation occured on file: #{writer.file_name}"
|
|
621
|
+
</span> <span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
|
|
622
|
+
<span class='kw'>end</span>
|
|
623
|
+
|
|
624
|
+
<span class='kw'>end</span></pre>
|
|
625
|
+
</td>
|
|
626
|
+
</tr>
|
|
627
|
+
</table>
|
|
628
|
+
</div>
|
|
629
|
+
|
|
630
|
+
<div class="method_details ">
|
|
631
|
+
<h3 class="signature " id="write-class_method">
|
|
632
|
+
|
|
633
|
+
+ (<tt>Object</tt>) <strong>write</strong>(home_dir, file_name, outside_scope = nil, &block)
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
</h3><div class="docstring">
|
|
640
|
+
<div class="discussion">
|
|
641
|
+
<hr>
|
|
642
|
+
<hr>
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
</div>
|
|
646
|
+
</div>
|
|
647
|
+
<div class="tags">
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
</div><table class="source_code">
|
|
651
|
+
<tr>
|
|
652
|
+
<td>
|
|
653
|
+
<pre class="lines">
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
82
|
|
657
|
+
83
|
|
658
|
+
84
|
|
659
|
+
85
|
|
660
|
+
86
|
|
661
|
+
87
|
|
662
|
+
88
|
|
663
|
+
89
|
|
664
|
+
90
|
|
665
|
+
91
|
|
666
|
+
92
|
|
667
|
+
93
|
|
668
|
+
94
|
|
669
|
+
95
|
|
670
|
+
96
|
|
671
|
+
97</pre>
|
|
672
|
+
</td>
|
|
673
|
+
<td>
|
|
674
|
+
<pre class="code"><span class="info file"># File 'lib/netcdf/netcdf.rb', line 82</span>
|
|
675
|
+
|
|
676
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_home_dir'>home_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_outside_scope'>outside_scope</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
677
|
+
|
|
678
|
+
<span class='id identifier rubyid_writer'>writer</span> <span class='op'>=</span> <span class='const'>NetCDF</span><span class='op'>::</span><span class='const'>FileWriter</span><span class='period'>.</span><span class='id identifier rubyid_existing_file'>existing_file</span><span class='lparen'>(</span><span class='id identifier rubyid_home_dir'>home_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_outside_scope'>outside_scope</span><span class='rparen'>)</span>
|
|
679
|
+
|
|
680
|
+
<span class='kw'>begin</span>
|
|
681
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span>
|
|
682
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_instance_eval'>instance_eval</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
683
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
|
684
|
+
<span class='id identifier rubyid_writer'>writer</span>
|
|
685
|
+
<span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
|
686
|
+
<span class='id identifier rubyid_writer'>writer</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
|
687
|
+
<span class='comment'># raise "Illegal opperation occured on file: #{file_name}"
|
|
688
|
+
</span> <span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
|
|
689
|
+
<span class='kw'>end</span>
|
|
690
|
+
|
|
691
|
+
<span class='kw'>end</span></pre>
|
|
692
|
+
</td>
|
|
693
|
+
</tr>
|
|
694
|
+
</table>
|
|
695
|
+
</div>
|
|
696
|
+
|
|
697
|
+
<div class="method_details ">
|
|
698
|
+
<h3 class="signature " id="writer_version-class_method">
|
|
699
|
+
|
|
700
|
+
+ (<tt>Object</tt>) <strong>writer_version</strong>(name)
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
</h3><div class="docstring">
|
|
707
|
+
<div class="discussion">
|
|
708
|
+
<hr>
|
|
709
|
+
<hr>
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
</div>
|
|
713
|
+
</div>
|
|
714
|
+
<div class="tags">
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
</div><table class="source_code">
|
|
718
|
+
<tr>
|
|
719
|
+
<td>
|
|
720
|
+
<pre class="lines">
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
140
|
|
724
|
+
141
|
|
725
|
+
142</pre>
|
|
726
|
+
</td>
|
|
727
|
+
<td>
|
|
728
|
+
<pre class="code"><span class="info file"># File 'lib/netcdf/netcdf.rb', line 140</span>
|
|
729
|
+
|
|
730
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_writer_version'>writer_version</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
731
|
+
<span class='const'>NetcdfFileWriter</span><span class='op'>::</span><span class='const'>Version</span><span class='period'>.</span><span class='id identifier rubyid_valueOf'>valueOf</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
732
|
+
<span class='kw'>end</span></pre>
|
|
733
|
+
</td>
|
|
734
|
+
</tr>
|
|
735
|
+
</table>
|
|
736
|
+
</div>
|
|
737
|
+
|
|
738
|
+
</div>
|
|
739
|
+
|
|
740
|
+
</div>
|
|
741
|
+
|
|
742
|
+
<div id="footer">
|
|
743
|
+
Generated on Tue Jul 14 18:09:12 2015 by
|
|
744
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
745
|
+
0.8.7.6 (ruby-1.9.3).
|
|
746
|
+
</div>
|
|
747
|
+
|
|
748
|
+
</body>
|
|
749
|
+
</html>
|