forked from NCAS-CMS/cf-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaggregation_rules.html
More file actions
349 lines (312 loc) · 18 KB
/
aggregation_rules.html
File metadata and controls
349 lines (312 loc) · 18 KB
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Aggregation rules — Documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="_static/customise-alabaster.css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/clipboard.min.js"></script>
<script type="text/javascript" src="_static/copybutton.js"></script>
<script type="text/javascript" src="_static/toggleprompt.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Performance" href="performance.html" />
<link rel="prev" title="cf constants" href="constant.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">cf 3.13.0</a></h1>
<p class="blurb">A CF-compliant earth science data analysis library</p>
<p>
<iframe src="https://ghbtns.com/github-btn.html?user=NCAS-CMS&repo=cf-python&type=star&count=true&size=large&v=2"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="introduction.html"><strong>Introduction</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="cf_data_model.html"><strong>CF data model</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html"><strong>Installation</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="contributing.html"><strong>Contributing</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html"><strong>Tutorial</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="analysis.html"><strong>Analysis</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="api_reference.html"><strong>API reference</strong></a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#"><strong>Aggregation rules</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="performance.html"><strong>Performance</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="releases.html"><strong>Releases</strong></a></li>
<li class="toctree-l1"><a class="reference internal" href="Changelog.html"><strong>Change log</strong></a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="constant.html" title="previous chapter"><strong>cf constants</strong></a></li>
<li>Next: <a href="performance.html" title="next chapter"><strong>Performance</strong></a></li>
</ul></li>
</ul>
</div>
<br>
cf development has been supported by
the <a href="https://erc.europa.eu/">ERC</a>
through <a href="https://cordis.europa.eu/project/id/247220">Seachange</a>
and
<a href="https://cordis.europa.eu/project/id/786427">Couplet</a>; by
the <a href="https://ec.europa.eu/programmes/horizon2020/">EC Horizon
2020 programme</a> through
<a href="https://cordis.europa.eu/project/id/824084">IS-ENES3</a>;
by <a href="https://nerc.ukri.org/">NERC</a> through
<a href="https://gtr.ukri.org/project/0D95A6DB-0B95-48F7-8A8B-7B9A47DEA117">UKFAFMIP</a>;
and by <a href="https://ncas.ac.uk/">NCAS</a>.
<br>
<br>
<img src="_templates/logo_EC.png" height="40">
<img src="_templates/logo_ERC.png" height="40">
<img src="_templates/logo_NERC.png" height="40">
<br>
<img src="_templates/logo_NCAS.png" height="40">
</div>
</div>
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="aggregation-rules">
<span id="id1"></span><h1><strong>Aggregation rules</strong><a class="headerlink" href="#aggregation-rules" title="Permalink to this headline">¶</a></h1>
<hr class="docutils" />
<p>Version 3.13.0 for version 1.9 of the CF conventions.</p>
<p><em>David Hassell and Jonathan Gregory (2012)</em></p>
<p><a class="reference external" href="https://cf-trac.llnl.gov/trac/ticket/78">https://cf-trac.llnl.gov/trac/ticket/78</a></p>
<p>Aggregation is the combination of two field constructs <a class="reference internal" href="cf_data_model.html#term-field-construct"><span class="xref std std-term">field
constructs</span></a> to create a new field construct that
occupies a “larger” domain. In practice, this means combining the two
field constructs so that their data are concatenated along one or more
domain axis constructs, as are the data of their metadata constructs
which span those domain axis constructs.</p>
<p>These rules are to be used for deciding whether or not two arbitrary
field constructs may be aggregated into one, larger field construct.
The rules are based solely on the field constructs’ metadata as
recognised by the <a class="reference internal" href="cf_data_model.html#cf-data-model"><span class="std std-ref">CF data model</span></a> <a class="footnote-reference brackets" href="#cfdm" id="id2">1</a>. For example, netCDF
variable names are ignored during the aggregation process, meaning
that having different netCDF variable names does not preclude the
aggregation of two field constructs.</p>
<p>More than two field constructs are aggregated by repeated applications
of the aggregation algorithm, and aggregations over multiple domain
axis constructs are similarly possible.</p>
<p>As of CF-1.9, <a class="reference internal" href="cf_data_model.html#term-domain-construct"><span class="xref std std-term">Domain constructs</span></a> may also be
aggregated. The rules for <a class="reference internal" href="cf_data_model.html#term-cell-method-constructs"><span class="xref std std-term">cell method constructs</span></a> and <a class="reference internal" href="cf_data_model.html#term-field-ancillary-constructs"><span class="xref std std-term">field ancillary constructs</span></a> are ignored for domain construct aggregation.</p>
<p>Aggregation is implemented in the <a class="reference internal" href="function/cf.aggregate.html#cf.aggregate" title="cf.aggregate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cf.aggregate</span></code></a> function, and is
applied by default by the <a class="reference internal" href="function/cf.read.html#cf.read" title="cf.read"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cf.read</span></code></a> function.</p>
<hr class="docutils" />
<p>If all of the following statements are true for two arbitrary field or
domain constructs then the two constructs may be aggregated to a new
field or domain construct.</p>
<ul class="simple">
<li><p>Both field constructs have identical standard name properties. <em>This
rule is ignored for domain construct aggregation.</em></p></li>
<li><p>The treatment of other properties, in terms of how they should match
between the field or domain constructs and whether or not they
should be included in the aggregated field, is beyond the scope of
these rules and is at the user’s discretion. This is also the case
for all other construct properties unnamed by these rules.</p></li>
</ul>
<div class="admonition-coordinate-construct admonition">
<p class="admonition-title">Coordinate construct</p>
<p>A coordinate construct is either a <a class="reference internal" href="cf_data_model.html#term-dimension-coordinate-constructs"><span class="xref std std-term">dimension coordinate
construct</span></a> or an <a class="reference internal" href="cf_data_model.html#term-auxiliary-coordinate-constructs"><span class="xref std std-term">auxiliary
coordinate construct</span></a>.</p>
</div>
<div class="admonition-pair-of-matching-coordinate-constructs admonition">
<p class="admonition-title">Pair of matching coordinate constructs</p>
<p>A pair of matching coordinate constructs is a coordinate construct
from each field or domain construct of the same type (dimension or
auxiliary), with equivalent calendar properties (if present) and
identical standard names.</p>
</div>
<ul class="simple">
<li><p>Both field or domain constructs have the same number of coordinate
constructs, all of which have a standard name property, and each
coordinate construct’s standard name is unique within its field or
domain construct. Each coordinate construct in one field or domain
construct forms a pair of matching coordinate constructs with a
unique coordinate construct in the other field or domain construct.</p></li>
</ul>
<div class="admonition-domain-axis-s-associated-coordinate-constructs admonition">
<p class="admonition-title">Domain axis’s associated coordinate constructs</p>
<p>A domain axis’s associated coordinate constructs are those
coordinate constructs which span the domain axis.</p>
</div>
<ul class="simple">
<li><p>Each domain axis in both field or domain constructs has at least one
associated 1-d coordinate construct.</p></li>
</ul>
<div class="admonition-pair-of-matching-axes admonition">
<p class="admonition-title">Pair of matching axes</p>
<p>A pair of matching axes is a domain axis from each field or domain
construct chosen such that the two domain axes have associated
coordinate constructs that are all matching pairs.</p>
</div>
<ul class="simple">
<li><p>Each domain axis in one field or domain construct forms a pair of
matching axes with a unique domain axis in the other field or domain
construct.</p>
<ul>
<li><p>A consequence of this rule is that within each pair of matching
coordinate constructs, the corresponding domain axes are matching
pairs.</p></li>
</ul>
</li>
</ul>
<div class="admonition-pair-of-aggregating-axes admonition">
<p class="admonition-title">Pair of aggregating axes</p>
<p>The pair of matching axes for which one or more of the 1D matching
coordinate constructs have different values for their coordinate
arrays and, if present, their boundary coordinate arrays is called
the pair of aggregating axes.</p>
</div>
<ul class="simple">
<li><p>There is exactly one pair of matching axes for which one or more of
the 1D matching coordinate constructs have different values for
their coordinate arrays and, if present, their boundary coordinate
arrays.</p>
<ul>
<li><p>A pair of matching non-aggregating axes must have identical sizes.</p></li>
<li><p>The aggregating axis may have either the same size or a different
size in the two field or domain constructs.</p></li>
<li><p>If the domain axes of the arrays of matching associated constructs
are ordered differently or run in different senses then one of the
arrays must be rearranged prior to comparison. This is true for
all array comparisons in these rules.</p></li>
<li><p>If neither field or domain construct has an aggregating axis then
the field or domain constructs are not aggregatable because their
domains are identical.</p></li>
<li><p>If either field or domain construct has two or more domain axes
which could qualify as an aggregating axis then the field or
domain constructs are not aggregatable because it is not possible
to choose the single domain axis for array concatenation.</p></li>
</ul>
</li>
</ul>
<div class="admonition-pair-of-matching-term-cell-measure-constructs-cell-measure-constructs admonition">
<p class="admonition-title">Pair of matching <a class="reference internal" href="cf_data_model.html#term-cell-measure-constructs"><span class="xref std std-term">cell measure constructs</span></a></p>
<p>A pair of matching cell measure constructs is a cell measure
construct from each field or domain construct with equivalent units
and corresponding domain axes that are matching pairs.</p>
</div>
<ul class="simple">
<li><p>Both field or domain constructs have the same number of cell measure
constructs, all of which have a units property. Each cell measure
construct in either field or domain construct forms a pair of
matching cell measure constructs with a unique cell measure
construct in the other field or domain construct.</p></li>
</ul>
<ul class="simple">
<li><p>Each pair of matching coordinate constructs and matching cell
measure constructs that do not span their aggregating axes have
identical values for their coordinate arrays and, if present, their
boundary coordinate arrays.</p></li>
</ul>
<ul class="simple">
<li><p>If the pair of matching aggregating axes has a pair of associated
dimension coordinate constructs, then there are no common values in
their coordinate arrays. If the matching dimension coordinate
constructs have boundary coordinate arrays then no cells from one
dimension coordinate construct lie entirely within any cell of the
other dimension coordinate construct.</p>
<ul>
<li><p>This does not preclude the coordinate arrays’ ranges from
overlapping.</p></li>
<li><p>The condition on the boundary coordinate arrays prevents, for
example, a monthly mean being aggregated with a daily mean from
the same month.</p></li>
<li><p>The condition on the boundary coordinate arrays allows, for
example, the aggregation of overlapping running means; or the
aggregation of a monthly mean and a daily mean from a different
month.</p></li>
</ul>
</li>
<li><p>If one field construct has a cell methods construct then so does the
other field, with the equivalent methods in the same
order. Corresponding domain axes in each cell methods are matching
pairs. <em>This rule is ignored for domain construct aggregation.</em></p></li>
</ul>
<div class="admonition-pair-of-matching-term-domain-ancillary-constructs-domain-ancillary-constructs admonition">
<p class="admonition-title">Pair of matching <a class="reference internal" href="cf_data_model.html#term-domain-ancillary-constructs"><span class="xref std std-term">domain ancillary constructs</span></a></p>
<p>A pair of matching domain ancillary constructs is a domain
ancillary construct from each field or domain construct for
identical standard coordinate conversion terms and corresponding
domain axes that are matching pairs.</p>
</div>
<ul class="simple">
<li><p>Both field or domain constructs have the same number of domain
ancillary constructs. Each domain ancillary construct in either
field or domain construct forms a pair of matching domain ancillary
constructs with a unique domain ancillary construct in the other
field or domain construct.</p></li>
</ul>
<div class="admonition-pair-of-matching-term-field-ancillary-constructs-field-ancillary-constructs admonition">
<p class="admonition-title">Pair of matching <a class="reference internal" href="cf_data_model.html#term-field-ancillary-constructs"><span class="xref std std-term">field ancillary constructs</span></a></p>
<p>A pair of matching field ancillary constructs is a field ancillary
construct from each field construct with identical standard names
and corresponding domain axes that are matching pairs.</p>
</div>
<ul class="simple">
<li><p>Both field constructs have the same number of field ancillary
constructs. Each field ancillary construct in either field construct
forms a pair of matching field ancillary constructs with a unique
field ancillary construct in the other field construct. <em>This rule
is ignored for domain construct aggregation.</em></p></li>
</ul>
<ul class="simple">
<li><p>Both field or domain constructs have the same number of coordinate
reference constructs. For each coordinate reference construct in one
field or domain construct there is a coordinate reference construct
in the other field or domain construct with identical name and the
same set of terms, taking optional terms into account. Corresponding
terms which are scalar or vector parameters are identical, taking
into account equivalent units. Corresponding terms which are domain
ancillary constructs form a pair of matching domain ancillary
constructs.</p></li>
</ul>
<hr class="docutils" />
<dl class="footnote brackets">
<dt class="label" id="cfdm"><span class="brackets"><a class="fn-backref" href="#id2">1</a></span></dt>
<dd><p>Hassell, D., Gregory, J., Blower, J., Lawrence, B. N., and
Taylor, K. E.: A data model of the Climate and Forecast
metadata conventions (CF-1.6) with a software
implementation (cf-python v2.1), Geosci. Model Dev., 10,
4619-4646, <a class="reference external" href="https://doi.org/10.5194/gmd-10-4619-2017">https://doi.org/10.5194/gmd-10-4619-2017</a>, 2017.</p>
</dd>
</dl>
</section>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2022, NCAS | Page built on 2022-06-23.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.3.1</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
</div>
</body>
</html>