File: udunits2.html

package info (click to toggle)
udunits 2.2.28-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,748 kB
  • sloc: sh: 11,655; ansic: 11,164; xml: 2,619; yacc: 492; lex: 337; makefile: 221
file content (537 lines) | stat: -rw-r--r-- 29,510 bytes parent folder | download | duplicates (4)
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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright 2014 University Corporation for Atmospheric Research and contributors.
All rights reserved.

This software was developed by the Unidata Program Center of the
University Corporation for Atmospheric Research (UCAR)
<http://www.unidata.ucar.edu>.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1) Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
   2) Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
   3) Neither the names of the development group, the copyright holders, nor the
      names of contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.
   4) This license shall terminate automatically and you may no longer exercise
      any of the rights granted to you by this license as of the date you
      commence an action, including a cross-claim or counterclaim, against
      the copyright holders or any contributor alleging that this software
      infringes a patent. This termination provision shall not apply for an
      action alleging patent infringement by combinations of this software with
      other software or hardware.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. -->
<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>UDUNITS 2.2.28 Manual</title>

<meta name="description" content="UDUNITS 2.2.28 Manual">
<meta name="keywords" content="UDUNITS 2.2.28 Manual">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="#Top" rel="start" title="Top">
<link href="#Complete-Index" rel="index" title="Complete Index">
<link href="#SEC_Contents" rel="contents" title="Table of Contents">
<link href="dir.html#Top" rel="up" title="(dir)">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<h1 class="settitle" align="center">UDUNITS 2.2.28 Manual</h1>




<a name="SEC_Contents"></a>
<h2 class="contents-heading">Table of Contents</h2>

<div class="contents">

<ul class="no-bullet">
  <li><a name="toc-Introduction-1" href="#Introduction">1 Introduction</a></li>
  <li><a name="toc-How-This-Package-Differs-from-the-Original-UDUNITS-Package" href="#Differences">2 How This Package Differs from the Original <code>UDUNITS</code> Package</a></li>
  <li><a name="toc-Installing-this-Package" href="#Installation">3 Installing this Package</a>
  <ul class="no-bullet">
    <li><a name="toc-Prerequisites-for-This-Package" href="#Prerequisites">3.1 Prerequisites for This Package</a></li>
    <li><a name="toc-Installing-from-a-Binary-Distribution" href="#Binary">3.2 Installing from a Binary Distribution</a></li>
    <li><a name="toc-Installing-from-a-Source-Distribution" href="#Source">3.3 Installing from a Source Distribution</a>
    <ul class="no-bullet">
      <li><a name="toc-Installing-from-source-on-Unix" href="#Unix">3.3.1 Installing from source on Unix</a></li>
      <li><a name="toc-Installing-from-source-on-Windows" href="#Windows">3.3.2 Installing from source on Windows</a></li>
    </ul></li>
  </ul></li>
  <li><a name="toc-Unit-Library" href="#Library">4 Unit Library</a></li>
  <li><a name="toc-Unit-Utility" href="#Utility">5 Unit Utility</a></li>
  <li><a name="toc-The-Units-Database" href="#Database">6 The Units Database</a></li>
  <li><a name="toc-Support-for-this-Package" href="#Support">7 Support for this Package</a></li>
  <li><a name="toc-Index" href="#Complete-Index">Index</a></li>
</ul>
</div>


<a name="Top"></a>
<div class="header">
<p>
Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="previous">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="UDUNITS_002d2"></a>
<h1 class="top">UDUNITS-2</h1>
<p>This manual describes the UDUNITS-2 package, which contains
a C library for units of physical quantities and a unit-definition
and value-conversion utility.
</p>
<p>Copyright 2014 University Corporation for Atmospheric Research and contributors.
All rights reserved.
</p>
<p>This software was developed by the Unidata Program Center of the
University Corporation for Atmospheric Research (UCAR)
&lt;http://www.unidata.ucar.edu&gt;.
</p>
<p>Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
</p>
<p>1) Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
   2) Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
   3) Neither the names of the development group, the copyright holders, nor the
      names of contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.
   4) This license shall terminate automatically and you may no longer exercise
      any of the rights granted to you by this license as of the date you
      commence an action, including a cross-claim or counterclaim, against
      the copyright holders or any contributor alleging that this software
      infringes a patent. This termination provision shall not apply for an
      action alleging patent infringement by combinations of this software with
      other software or hardware.
</p>
<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
</p>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Introduction" accesskey="1">Introduction</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Introduction
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Differences" accesskey="2">Differences</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How this package differs from the UDUNITS-1 package
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Installation" accesskey="3">Installation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Installing this package
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Library" accesskey="4">Library</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The unit library
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Utility" accesskey="5">Utility</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The unit utility
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Database" accesskey="6">Database</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The unit database
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Support" accesskey="7">Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Support for this package
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Complete-Index" accesskey="8">Complete Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Complete index
</td></tr>
</table>

<hr>
<a name="Introduction"></a>
<div class="header">
<p>
Next: <a href="#Differences" accesskey="n" rel="next">Differences</a>, Previous: <a href="#Top" accesskey="p" rel="previous">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Introduction-1"></a>
<h2 class="chapter">1 Introduction</h2>
<a name="index-Introduction"></a>

<p>The UDUNITS-2 package provides support for units of physical quantities.
Its three main components are: 1) <a href="udunits2lib.html#Top">(udunits2lib)a C library</a>
for units of physical quantities;
2) <a href="udunits2prog.html#Top">(udunits2prog)a utility</a>;
for obtaining the definition of a unit and for
converting numeric values between compatible units;
and 3) an <a href="#Database">extensive database of units</a>.
</p>
<hr>
<a name="Differences"></a>
<div class="header">
<p>
Next: <a href="#Installation" accesskey="n" rel="next">Installation</a>, Previous: <a href="#Introduction" accesskey="p" rel="previous">Introduction</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="How-This-Package-Differs-from-the-Original-UDUNITS-Package"></a>
<h2 class="chapter">2 How This Package Differs from the Original <code>UDUNITS</code> Package</h2>

<p>The <code>UDUNIT-2</code> package differs from the <code>UDUNITS-1</code>
package in the following ways:
</p><ul>
<li> <strong>Support for non-ASCII characters:</strong>  
The <code>UDUNITS-1</code>
package only supports the ASCII character set.  The <code>UDUNITS-2</code>
package supports the following character sets: ASCII, ISO 8859-1 (Latin-1),
and the UTF-8 encoding of ISO 10646 (Unicode).  This means that unit
string specifications like &quot;<code>µ°F·Ω⁻¹</code>&quot; are now supported (your
viewer must support UTF-8 to display this string correctly).

</li><li> <strong>Support for logarithmic units:</strong>  The unit string
specification &quot;<code>0.1 lg(re 1 mW)</code>&quot; specifies a deciBel unit with a
one milliwatt reference level.
Such units are fully integrated into the package and all meaningful
operations and conversions are supported.

</li><li> <strong>Persistent value converters:</strong>
It is now possible to obtain a <em>converter</em> data-object, which can
be used to convert numeric values in one unit to numeric values in another,
compatible unit.  The values can be <code>float</code>, <code>double</code>, or
one-dimensional arrays of <code>float</code>s or <code>double</code>s.

</li><li> <strong>Improved API:</strong>  Due to the above changes, it was not
possible to keep the application programming interface (API) of the
<code>UDUNITS-1</code> package.  The new interface, however, is easily
understood and easy to use.  To support backward comptibility,
the package does contain a version 1 C API, which uses the version 2
library.

</li><li> <strong>XML unit database:</strong>  The unit database is encoded using
human-readable XML rather than a custom format.  The XML
parser included in the package supports an <em>&lt;import&gt;</em> element to
allow easy and convenient customization.

</li><li> <strong>No Fortran or Perl API:</strong>  Interfaces for these languages
have not yet been created.  Contact
<a href="mailto:support-udunits@unidata.ucar.edu">support-udunits@unidata.ucar.edu</a> if you are interested in
helping to create these interfaces.

</li></ul>

<p>One thing that has not changed is that almost all unit string specifications
understood by the <code>UDUNITS-1</code> package are also
understood by the <code>UDUNITS-2</code> package.  One exception is
the symbol <code>g</code>, which in version 1 of the package was associated with
standard free fall (a unit of acceleration) but which is associated
with the unit gram in version 2 of the package.
</p>
<hr>
<a name="Installation"></a>
<div class="header">
<p>
Next: <a href="#Library" accesskey="n" rel="next">Library</a>, Previous: <a href="#Differences" accesskey="p" rel="previous">Differences</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Installing-this-Package"></a>
<h2 class="chapter">3 Installing this Package</h2>
<a name="index-installation"></a>


<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Prerequisites" accesskey="1">Prerequisites</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Prerequisites for this package
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Binary" accesskey="2">Binary</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Installing from a binary distribution
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Source" accesskey="3">Source</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Installing from a source distribution
</td></tr>
</table>

<hr>
<a name="Prerequisites"></a>
<div class="header">
<p>
Next: <a href="#Binary" accesskey="n" rel="next">Binary</a>, Up: <a href="#Installation" accesskey="u" rel="up">Installation</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Prerequisites-for-This-Package"></a>
<h3 class="section">3.1 Prerequisites for This Package</h3>
<a name="index-prerequisites-for-this-package"></a>

<p>The Expat library and header-files must be installed. Look for the library 
&quot;libexpat&quot; and the header-file &quot;expat.h&quot;.
</p>
<p>If this package is to be tested (which is optional), then the CUnit library
and header-files must be installed. Look for the library &quot;libcunit&quot; and the
header-files &quot;CUnit/CUnit.h&quot; and &quot;CUnit/Basic.h&quot;.
</p>
<p>If this package is to be built on a Windows system, then the CMake and MinGW
packages must be installed. Look for the utility &quot;cmake&quot; and the
directory/folder &quot;MinGW&quot;.
</p>
<hr>
<a name="Binary"></a>
<div class="header">
<p>
Next: <a href="#Source" accesskey="n" rel="next">Source</a>, Previous: <a href="#Prerequisites" accesskey="p" rel="previous">Prerequisites</a>, Up: <a href="#Installation" accesskey="u" rel="up">Installation</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Installing-from-a-Binary-Distribution"></a>
<h3 class="section">3.2 Installing from a Binary Distribution</h3>
<a name="index-installation_002c-binary"></a>

<p>Currently, only an RPM binary distribution is supported.
</p>
<p>Download the distribution by browsing to the Unidata UDUNITS RPM repository at
<a href="https://artifacts.unidata.ucar.edu/service/rest/repository/browse/rpm-udunits/udunits/">https://artifacts.unidata.ucar.edu/service/rest/repository/browse/rpm-udunits/udunits/</a>
or by executing, for example, the following commands:
</p><div class="example">
<pre class="example">cd ~/Downloads
wget https://artifacts.unidata.ucar.edu/repository/rpm-udunits/udunits/udunits-2.2.28-x86_64.rpm
</pre></div>

<p>Install the distribution. For example,
</p><div class="example">
<pre class="example">sudo rpm --install [--prefix=/opt/udunits] ~/Downloads/udunits-2.2.28-x86_64.rpm
</pre></div>
<p>where the argument in square brackets is optional. The default installation
directory is <code>/usr/local</code>.
</p>
<hr>
<a name="Source"></a>
<div class="header">
<p>
Previous: <a href="#Binary" accesskey="p" rel="previous">Binary</a>, Up: <a href="#Installation" accesskey="u" rel="up">Installation</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Installing-from-a-Source-Distribution"></a>
<h3 class="section">3.3 Installing from a Source Distribution</h3>
<a name="index-installation_002c-source"></a>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Unix" accesskey="1">Unix</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Building and installing in Unix-like environments
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Windows" accesskey="2">Windows</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Building and installing in Windows environments
</td></tr>
</table>

<hr>
<a name="Unix"></a>
<div class="header">
<p>
Next: <a href="#Windows" accesskey="n" rel="next">Windows</a>, Up: <a href="#Source" accesskey="u" rel="up">Source</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Installing-from-source-on-Unix"></a>
<h4 class="subsection">3.3.1 Installing from source on Unix</h4>
<a name="index-installing-from-source-on-Unix"></a>

<p>Download the source by browsing to the Unidata UDUNITS source repository at
<a href="https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-udunits/">https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-udunits/</a>
or by executing, for example, the following commands:
</p><div class="example">
<pre class="example">cd ~/Downloads
curl -O https://artifacts.unidata.ucar.edu/repository/downloads-udunits/udunits-2.2.28.tar.gz
</pre></div>

<p>Unpack the distribution in an appropriate place. For example,
</p><div class="example">
<pre class="example">cd /opt
sudo pax -rz &lt; ~/Downloads/udunits-2.2.28.tar.gz
</pre></div>

<p>Build and install the package. For example
</p><div class="example">
<pre class="example">cd udunits2-2.2.28
./configure [--prefix=<var>install_prefix</var>] &gt;&amp;configure.log
make all [check] install [install-html] [install-pdf]
</pre></div>
<p>where the arguments in square brackets are optional. The default installation 
prefix is the parent directory of the source directory.
</p>
<hr>
<a name="Windows"></a>
<div class="header">
<p>
Previous: <a href="#Unix" accesskey="p" rel="previous">Unix</a>, Up: <a href="#Source" accesskey="u" rel="up">Source</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Installing-from-source-on-Windows"></a>
<h4 class="subsection">3.3.2 Installing from source on Windows</h4>
<a name="index-installing-from-source-on-Windows"></a>

<p>Download the source by browsing to the Unidata UDUNITS source repository at
<a href="https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-udunits/">https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-udunits/</a>
or by executing, for example, the following commands:
</p><div class="example">
<pre class="example">cd C:\Users\<var>current_user</var>\Downloads
curl -O https://artifacts.unidata.ucar.edu/repository/downloads-udunits/udunits-2.2.28-Source.zip
</pre></div>

<p>Unpack the distribution by opening the downloaded file and extracting the
contents to, for example, the user&rsquo;s &quot;Downloads&quot; folder. Note that, by default,
the extractor might create an extra top-level folder with a duplicate name.
Remove the extra folder from the destination path if this is the case &ndash; either
before or after extraction.
</p>
<p>Build and install the package using cmake(1). For example
</p><div class="example">
<pre class="example">cd C:\Users\<var>current_user</var>\Downloads\udunits2-2.2.28-Source
mkdir build
cd build
cmake [-D CMAKE_INSTALL_PREFIX=<var>install_prefix</var>] ..
make all install
</pre></div>
<p>where the argument in square brackets is optional. The default installation 
folder is the parent folder of the source folder.
</p>
<hr>
<a name="Library"></a>
<div class="header">
<p>
Next: <a href="#Utility" accesskey="n" rel="next">Utility</a>, Previous: <a href="#Installation" accesskey="p" rel="previous">Installation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Unit-Library"></a>
<h2 class="chapter">4 Unit Library</h2>
<a name="index-Library_002c-unit"></a>
<p>See <a href="udunits2lib.html#UDUNITS-Library">(udunits2lib)UDUNITS Library</a>, for details on this package&rsquo;s unit library.
</p>
<hr>
<a name="Utility"></a>
<div class="header">
<p>
Next: <a href="#Database" accesskey="n" rel="next">Database</a>, Previous: <a href="#Library" accesskey="p" rel="previous">Library</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Unit-Utility"></a>
<h2 class="chapter">5 Unit Utility</h2>
<a name="index-Utility_002c-unit"></a>
<p>See <a href="udunits2prog.html#UDUNITS-Utility">(udunits2prog)UDUNITS Utility</a>, for details on this package&rsquo;s unit
utility.
</p>
<hr>
<a name="Database"></a>
<div class="header">
<p>
Next: <a href="#Support" accesskey="n" rel="next">Support</a>, Previous: <a href="#Utility" accesskey="p" rel="previous">Utility</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="The-Units-Database"></a>
<h2 class="chapter">6 The Units Database</h2>
<a name="index-database"></a>

<p>The database for the UDUNITS-2 package comprises one XML file containing
unit prefixes and four XML files containing unit definitions:
</p>
<ul>
<li> <a href="../../udunits/udunits2-prefixes.xml">SI unit prefixes</a>
</li><li> <a href="../../udunits/udunits2-base.xml">SI base units</a>
</li><li> <a href="../../udunits/udunits2-derived.xml">SI derived units</a>
</li><li> <a href="../../udunits/udunits2-accepted.xml">Units accepted for use with the SI</a>
</li><li> <a href="../../udunits/udunits2-common.xml">Non-SI units</a>
</li></ul>

<hr>
<a name="Support"></a>
<div class="header">
<p>
Next: <a href="#Complete-Index" accesskey="n" rel="next">Complete Index</a>, Previous: <a href="#Database" accesskey="p" rel="previous">Database</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Support-for-this-Package"></a>
<h2 class="chapter">7 Support for this Package</h2>
<a name="index-support"></a>
<a name="index-package_002c-support"></a>

<p>The home-page for this package can be found at
<a href="http://www.unidata.ucar.edu/software/udunits/">http://www.unidata.ucar.edu/software/udunits/</a>.
</p>
<p>Bug reports should be sent to
<a href="mailto:support-udunits@unidata.ucar.edu">support-udunits@unidata.ucar.edu</a>.
</p>
<hr>
<a name="Complete-Index"></a>
<div class="header">
<p>
Previous: <a href="#Support" accesskey="p" rel="previous">Support</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Complete-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Index"></a>
<h2 class="unnumbered">Index</h2>

<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Complete-Index_cp_letter-D"><b>D</b></a>
 &nbsp; 
<a class="summary-letter" href="#Complete-Index_cp_letter-I"><b>I</b></a>
 &nbsp; 
<a class="summary-letter" href="#Complete-Index_cp_letter-L"><b>L</b></a>
 &nbsp; 
<a class="summary-letter" href="#Complete-Index_cp_letter-P"><b>P</b></a>
 &nbsp; 
<a class="summary-letter" href="#Complete-Index_cp_letter-S"><b>S</b></a>
 &nbsp; 
<a class="summary-letter" href="#Complete-Index_cp_letter-U"><b>U</b></a>
 &nbsp; 
</td></tr></table>
<table class="index-cp" border="0">
<tr><td></td><th align="left">Index Entry</th><td>&nbsp;</td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Complete-Index_cp_letter-D">D</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-database">database</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Database">Database</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Complete-Index_cp_letter-I">I</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-installation">installation</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Installation">Installation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-installation_002c-binary">installation, binary</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Binary">Binary</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-installation_002c-source">installation, source</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Source">Source</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-installing-from-source-on-Unix">installing from source on Unix</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Unix">Unix</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-installing-from-source-on-Windows">installing from source on Windows</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Windows">Windows</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Introduction">Introduction</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Introduction">Introduction</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Complete-Index_cp_letter-L">L</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-Library_002c-unit">Library,  unit</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Library">Library</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Complete-Index_cp_letter-P">P</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-package_002c-support">package, support</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Support">Support</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-prerequisites-for-this-package">prerequisites for this package</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Prerequisites">Prerequisites</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Complete-Index_cp_letter-S">S</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-support">support</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Support">Support</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Complete-Index_cp_letter-U">U</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-Utility_002c-unit">Utility,  unit</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Utility">Utility</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Complete-Index_cp_letter-D"><b>D</b></a>
 &nbsp; 
<a class="summary-letter" href="#Complete-Index_cp_letter-I"><b>I</b></a>
 &nbsp; 
<a class="summary-letter" href="#Complete-Index_cp_letter-L"><b>L</b></a>
 &nbsp; 
<a class="summary-letter" href="#Complete-Index_cp_letter-P"><b>P</b></a>
 &nbsp; 
<a class="summary-letter" href="#Complete-Index_cp_letter-S"><b>S</b></a>
 &nbsp; 
<a class="summary-letter" href="#Complete-Index_cp_letter-U"><b>U</b></a>
 &nbsp; 
</td></tr></table>

<hr>



</body>
</html>