forked from NCAS-CMS/cf-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
285 lines (248 loc) · 15.6 KB
/
index.html
File metadata and controls
285 lines (248 loc) · 15.6 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
<!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>cf python package — 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="Introduction" href="introduction.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="#">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>
<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"><a class="reference internal" href="aggregation_rules.html"><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="#">Documentation overview</a><ul>
<li>Next: <a href="introduction.html" title="next chapter"><strong>Introduction</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="cf-python-package">
<span id="cf-python-home"></span><h1><strong>cf python package</strong><a class="headerlink" href="#cf-python-package" title="Permalink to this headline">¶</a></h1>
<hr class="docutils" />
<style> .red {color:red} </style><style> .blue {color:blue} </style><section id="introduction">
<h2><strong>Introduction</strong><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
<hr class="docutils" />
<p>Version 3.13.0 for version 1.9 of the CF conventions.</p>
<p>The Python cf package is an Earth Science data analysis library that
is built on a complete implementation of the <a class="reference internal" href="cf_data_model.html#cf-data-model"><span class="std std-ref">CF data model</span></a>.</p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#functionality" id="id5"><strong>Functionality</strong></a></p></li>
<li><p><a class="reference internal" href="#visualization" id="id6"><strong>Visualization</strong></a></p></li>
<li><p><a class="reference internal" href="#old-versions" id="id7"><strong>Old versions</strong></a></p></li>
</ul>
</div>
<hr class="docutils" />
<section id="functionality">
<h3><a class="toc-backref" href="#id5"><strong>Functionality</strong></a><a class="headerlink" href="#functionality" title="Permalink to this headline">¶</a></h3>
<p>The cf package implements 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="id1">1</a> for its
internal data structures and so is able to process any CF-compliant
dataset. It is not strict about CF-compliance, however, so that
partially conformant datasets may be ingested from existing datasets
and written to new datasets.This is so that datasets that are
partially conformant may nonetheless be modified in memory.</p>
<div class="literal-block-wrapper docutils container" id="id3">
<div class="code-block-caption"><span class="caption-text"><em>A simple example of reading a field construct from a
file and inspecting it.</em></span><a class="headerlink" href="#id3" title="Permalink to this code">¶</a></div>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">cf</span>
<span class="gp">>>> </span><span class="n">f</span> <span class="o">=</span> <span class="n">cf</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="s1">'file.nc'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">f</span>
<span class="go">[<CF Field: air_temperature(time(12), latitude(64), longitude(128)) K>]</span>
<span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">f</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="go">Field: air_temperature (ncvar%tas)</span>
<span class="go">----------------------------------</span>
<span class="go">Data : air_temperature(time(12), latitude(64), longitude(128)) K</span>
<span class="go">Cell methods : time(12): mean (interval: 1.0 month)</span>
<span class="go">Dimension coords: time(12) = [0450-11-16 00:00:00, ..., 0451-10-16 12:00:00] noleap</span>
<span class="go"> : latitude(64) = [-87.8638, ..., 87.8638] degrees_north</span>
<span class="go"> : longitude(128) = [0.0, ..., 357.1875] degrees_east</span>
<span class="go"> : height(1) = [2.0] m</span>
</pre></div>
</div>
</div>
<p>The cf package can:</p>
<ul class="simple">
<li><p>read <a class="reference internal" href="cf_data_model.html#term-field-construct"><span class="xref std std-term">field constructs</span></a> and <a class="reference internal" href="cf_data_model.html#term-domain-construct"><span class="xref std std-term">domain
constructs</span></a> from netCDF, CDL, PP and UM datasets,</p></li>
<li><p>create new field and domain constructs in memory,</p></li>
<li><p>write field and domain constructs to netCDF datasets on disk,</p></li>
<li><p>read, write, and create coordinates defined by geometry cells,</p></li>
<li><p>read and write netCDF4 string data-type variables,</p></li>
<li><p>read, write, and create netCDF and CDL datasets containing
hierarchical groups,</p></li>
<li><p>inspect field and domain constructs,</p></li>
<li><p>test whether two constructs are the same,</p></li>
<li><p>modify field and domain construct metadata and data,</p></li>
<li><p>create subspaces of field and domain constructs,</p></li>
<li><p>incorporate, and create, metadata stored in external files,</p></li>
<li><p>read, write, and create data that have been compressed by convention
(i.e. ragged or gathered arrays), whilst presenting a view of the
data in its uncompressed form,</p></li>
<li><p>combine field constructs arithmetically,</p></li>
<li><p>manipulate field construct data by arithmetical and trigonometrical
operations,</p></li>
<li><p>perform statistical collapses on field constructs,</p></li>
<li><p>perform histogram, percentile and binning operations on field
constructs,</p></li>
<li><p>regrid field constructs with (multi-)linear, nearest neighbour,
first- and second-order conservative and higher order patch recovery
methods,</p></li>
<li><p>apply convolution filters to field constructs,</p></li>
<li><p>create moving means from field constructs,</p></li>
<li><p>apply differential operators to field constructs,</p></li>
<li><p>create derived quantities (such as relative vorticity).</p></li>
</ul>
<p>All of the above use LAMA functionality, which allows multiple
fields larger than the available memory to exist and be manipulated.</p>
</section>
<hr class="docutils" />
<section id="visualization">
<h3><a class="toc-backref" href="#id6"><strong>Visualization</strong></a><a class="headerlink" href="#visualization" title="Permalink to this headline">¶</a></h3>
<p>Powerful, flexible, and very simple to produce visualizations of field
constructs are available with the <code class="xref py py-obj docutils literal notranslate"><span class="pre">cfplot</span></code> package, that is installed
separately to cf (see <a class="reference external" href="http://ajheaps.github.io/cf-plot">http://ajheaps.github.io/cf-plot</a> for details).</p>
<p>See the <a class="reference external" href="http://ajheaps.github.io/cf-plot/gallery.html">cfplot gallery</a> for the wide range
range plotting possibilities with example code.</p>
<figure class="align-default" id="id4">
<img alt="_images/cfplot_example.png" src="_images/cfplot_example.png" />
<figcaption>
<p><span class="caption-text"><em>Example output of cfplot displaying a cf field construct.</em></span><a class="headerlink" href="#id4" title="Permalink to this image">¶</a></p>
</figcaption>
</figure>
</section>
<hr class="docutils" />
<section id="old-versions">
<h3><a class="toc-backref" href="#id7"><strong>Old versions</strong></a><a class="headerlink" href="#old-versions" title="Permalink to this headline">¶</a></h3>
<p>Since version 3.0.0 (released 2019-10-01), cf is for Python 3 only and
there are <a class="reference internal" href="2_to_3_changes.html#two-to-three-changes"><span class="std std-ref">incompatible differences between versions 2.x and 3.x</span></a> of cf.</p>
<p>Scripts written for version 2.x but running under version 3.x should
either work as expected, or provide informative error messages on the
new API usage. However, it is advised that the outputs of older
scripts are checked when running with Python 3 versions of the cf
library.</p>
<p>For version 2.x documentation, see the <a class="reference internal" href="releases.html#releases"><span class="std std-ref">releases</span></a>
page.</p>
<hr class="docutils" />
<dl class="footnote brackets">
<dt class="label" id="cfdm"><span class="brackets"><a class="fn-backref" href="#id1">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>
</section>
<section id="id2">
<h2><strong>Contents</strong><a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
<hr class="docutils" />
<div class="toctree-wrapper compound">
<ul>
<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"><a class="reference internal" href="aggregation_rules.html"><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>
</section>
<section id="index-and-search">
<h2><strong>Index and search</strong><a class="headerlink" href="#index-and-search" title="Permalink to this headline">¶</a></h2>
<hr class="docutils" />
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search</span></a></p></li>
</ul>
</section>
</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>