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 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666
|
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Installation — HARP 1.12 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="next" title="Conventions" href="conventions/index.html" />
<link rel="prev" title="HARP manual" href="index.html" />
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> HARP
</a>
<div class="version">
1.12
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#supported-platforms">Supported platforms</a></li>
<li class="toctree-l2"><a class="reference internal" href="#what-you-will-need">What you will need</a></li>
<li class="toctree-l2"><a class="reference internal" href="#using-github">Using GitHub</a></li>
<li class="toctree-l2"><a class="reference internal" href="#using-anaconda">Using Anaconda</a></li>
<li class="toctree-l2"><a class="reference internal" href="#building-the-source-package-unix">Building the source package (Unix)</a></li>
<li class="toctree-l2"><a class="reference internal" href="#installing-the-binary-package-windows">Installing the binary package (Windows)</a></li>
<li class="toctree-l2"><a class="reference internal" href="#building-the-source-package-windows">Building the source package (Windows)</a></li>
<li class="toctree-l2"><a class="reference internal" href="#documentation-location">Documentation location</a></li>
<li class="toctree-l2"><a class="reference internal" href="#feedback">Feedback</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="conventions/index.html">Conventions</a></li>
<li class="toctree-l1"><a class="reference internal" href="algorithms/index.html">Algorithms</a></li>
<li class="toctree-l1"><a class="reference internal" href="operations.html">Operations</a></li>
<li class="toctree-l1"><a class="reference internal" href="ingestions/index.html">Ingestion definitions</a></li>
<li class="toctree-l1"><a class="reference internal" href="libharp.html">C library</a></li>
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="matlab.html">MATLAB interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="python.html">Python interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="R.html">R interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="tools.html">Command line tools</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">HARP</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Installation</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="installation">
<h1>Installation</h1>
<p>This documentation provides installation instructions for HARP.</p>
<p>HARP is a toolset for ingesting, processing and inter-comparing satellite data
against correlative data. The toolset is composed of a set of command line
tools and a library of analysis functions.</p>
<div class="section" id="supported-platforms">
<h2>Supported platforms</h2>
<p>HARP is designed to run on most Unix-based operating systems (including Linux
and macOS) and Windows. The platforms that are supported include at least
Linux, Windows, and macOS.</p>
</div>
<div class="section" id="what-you-will-need">
<h2>What you will need</h2>
<blockquote>
<div><ul>
<li><p class="first">The HARP package : You can choose between a source installation
(<code class="docutils literal notranslate"><span class="pre">harp-x.y.z.tar.gz</span></code>) or a binary installation (<code class="docutils literal notranslate"><span class="pre">harp-x.y.z-win64.msi</span></code>
(Windows only)).
Note that x.y.z stands for the version number of the package.
The source package contains the source code for the HARP components (C
Library and command line tools) together with all documentation.
You will need this package if you want to use HARP on a Unix-based system.
For Windows you will only need this package if you want to have access to
the HARP source (if, for instance, you want to extend/improve HARP).
The binary package, which is only available for Windows, contains pre-built
versions of everything from the source distribution (without the sources)
and all documentation.
If you do not have the HARP package, you can download it from GitHub:</p>
<blockquote>
<div><p><a class="reference external" href="https://github.com/stcorp/harp/releases/latest">https://github.com/stcorp/harp/releases/latest</a></p>
</div></blockquote>
</li>
</ul>
<p>The following items are needed if you use the HARP source distribution:</p>
<ul>
<li><p class="first">A C compiler : Most Unix platforms come with their own C compiler so this
should not be a problem. For macOS you should make sure you have installed
the Developer Tools.</p>
</li>
<li><p class="first">A recent version of CODA. You will need a version of CODA that is compiled
using the same HDF4 and HDF5 libraries as you will use for building HARP.
CODA can be downloaded from <a class="reference external" href="https://github.com/stcorp/coda/releases/latest">https://github.com/stcorp/coda/releases/latest</a></p>
</li>
<li><p class="first">A recent version of HDF4. You will also need the additional libraries
libjpeg, zlib, and szlib depending on whether HDF4 was build against them.
In order to prevent conflicts of the HDF4 library with the netCDF interface
that HARP uses, make sure you build the HDF4 software from source and use
the following options when configuring the package:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">configure</span> <span class="o">--</span><span class="n">enable</span><span class="o">-</span><span class="n">shared</span> <span class="o">--</span><span class="n">disable</span><span class="o">-</span><span class="n">fortran</span> <span class="o">--</span><span class="n">disable</span><span class="o">-</span><span class="n">netcdf</span>
</pre></div>
</div>
<p>Make sure that after installation the location of the libraries is in your
shared library path (e.g. update your <code class="docutils literal notranslate"><span class="pre">LD_LIBRARY_PATH</span></code> environment
variable).</p>
</li>
<li><p class="first">A recent version of HDF5 (version 1.8.0 or higher). You will also need the
additional libraries zlib, and szlib depending on whether HDF5 was build
against them.</p>
</li>
<li><p class="first">If you plan on using the Python interface you need either Python 2
(version 2.7 or higher) or Python 3 (version 3.4 or higher).
You will also need the Python packages <code class="docutils literal notranslate"><span class="pre">numpy</span></code> (version 1.4 or higher)
and <code class="docutils literal notranslate"><span class="pre">cffi</span></code> (version 1.5.2 or higher).</p>
</li>
<li><p class="first">If you plan on using the R interface you need R version 3 or higher.</p>
</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="using-github">
<h2>Using GitHub</h2>
<p>HARP is also available as source code directly from GitHub, but this is only
recommended to be used by users who want to co-develop HARP and it will only
work on Unix-based systems.
You will need to have additional software installed and need to perform
additional steps if you want to build HARP from the GitHub git repository.</p>
<dl class="docutils">
<dt>Additional software that you will need:</dt>
<dd><ul class="first last simple">
<li>autoconf + automake + libtool</li>
<li>flex + bison</li>
</ul>
</dd>
</dl>
<p>When you clone and checkout the HARP git repository make sure to also
initialize the git submodules:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ git clone https://github.com/stcorp/harp.git
$ cd harp
$ git submodule init
$ git submodule update
</pre></div>
</div>
<p>This will pull in several entries in the definitions subdirectory.</p>
<p>Then, run the bootstrap script in the root of the source directory:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ./bootstrap
</pre></div>
</div>
<p>After that you can follow the steps as usual for building the source package.</p>
<p>Note that the CMake build scripts that come with HARP can also be used to
build HARP, but they do not allow regeneration of automatically generated
files (such as the documentation), so they are not recommended for performing
co-development of HARP.</p>
</div>
<div class="section" id="using-anaconda">
<h2>Using Anaconda</h2>
<p>HARP is also available as a conda package for Windows, Linux, and macOS
(only 64bit and Python3). You can install HARP using conda with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ conda install -c stcorp harp
</pre></div>
</div>
</div>
<div class="section" id="building-the-source-package-unix">
<h2>Building the source package (Unix)</h2>
<p>To build the source package, make sure to download the official HARP source
package, which is named harp-x.y.z.tar.gz. Don’t use the packages called
‘Source code’ from GitHub as these are contents of the git repository (see
‘Using GitHub’ above).</p>
<p>The HARP source package comes with both an autotools and a CMake build system.
For Unix-based systems the recommended approach is to use the autotools based
system (using the configure script), which is what is described below.
Building with CMake is also supported, but not documented here.</p>
<p>The following steps will guide you through the process of building the HARP
library and executables:</p>
<blockquote>
<div><ol class="arabic">
<li><p class="first">Go to the directory that contains the downloaded harp-x.y.z.tar.gz
file and unpack this package:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ gzip -d harp-x.y.z.tar.gz
$ tar xf harp-x.y.z.tar
</pre></div>
</div>
<p>Make sure you replace <code class="docutils literal notranslate"><span class="pre">x.y.z</span></code> with the appropriate version number.</p>
</li>
<li><p class="first">You should now have a <code class="docutils literal notranslate"><span class="pre">harp-x.y.z</span></code> directory. Go to this directory:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cd harp-x.y.z
</pre></div>
</div>
</li>
<li><p class="first">Next you will have to execute the <code class="docutils literal notranslate"><span class="pre">configure</span></code> script that checks what
system you are on and sets up the build environment. There are several
options you can pass to this script. The most important ones are:</p>
<dl class="docutils">
<dt><code class="docutils literal notranslate"><span class="pre">--prefix</span> <span class="pre"><HARP</span> <span class="pre">installation</span> <span class="pre">directory></span></code> :</dt>
<dd><p class="first last">By default, if you perform an installation of the HARP package
(see further below on how to do this) all
files are installed in subdirectories under <code class="docutils literal notranslate"><span class="pre">/usr/local</span></code>.
Executables will appear under <code class="docutils literal notranslate"><span class="pre">/usr/local/bin</span></code>, libraries under
<code class="docutils literal notranslate"><span class="pre">/usr/local/lib</span></code> and all data files (e.g. documentation) under
<code class="docutils literal notranslate"><span class="pre">/usr/local/share/harp</span></code>.
However, installing the files into the default places requires you to
have administrator privileges, which you may not have. In order to
install HARP in a different location where you do have permission to
copy files to, you can use this option to provide a different
installation directory. For instance, you can use
<code class="docutils literal notranslate"><span class="pre">--prefix=$HOME/harp</span></code> to install the software in the subdirectory
<code class="docutils literal notranslate"><span class="pre">harp</span></code> of your home directory.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CODA_LIB=<CODA</span> <span class="pre">library</span> <span class="pre">directory></span></code> :</dt>
<dd><p class="first last">The configure script will automatically try to locate the CODA library
in the default locations for libraries (<code class="docutils literal notranslate"><span class="pre">/usr/local/lib</span></code> is usually
not considered a default location!).
If <code class="docutils literal notranslate"><span class="pre">./configure</span></code> complains that it can’t find the <code class="docutils literal notranslate"><span class="pre">coda</span></code> library
files, pass this option to <code class="docutils literal notranslate"><span class="pre">./configure</span></code> with the location of this
library file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">CODA_INCLUDE=<CODA</span> <span class="pre">include</span> <span class="pre">file</span> <span class="pre">directory></span></code> :</dt>
<dd><p class="first last">The configure script will automatically try to locate the CODA include
files in the default locations for include files
(<code class="docutils literal notranslate"><span class="pre">/usr/local/include</span></code> is usually not considered a default location!).
If <code class="docutils literal notranslate"><span class="pre">./configure</span></code> complains that it can’t find the <code class="docutils literal notranslate"><span class="pre">coda.h</span></code> include
file, pass this option to <code class="docutils literal notranslate"><span class="pre">./configure</span></code> with the location of this
include file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">HDF4_LIB=<HDF4</span> <span class="pre">library</span> <span class="pre">directory></span></code> :</dt>
<dd><p class="first last">The configure script will automatically try to locate the HDF4
libraries in the default locations for libraries (<code class="docutils literal notranslate"><span class="pre">/usr/local/lib</span></code>
is usually not considered a default location!).
If <code class="docutils literal notranslate"><span class="pre">./configure</span></code> complains that it can’t find the <code class="docutils literal notranslate"><span class="pre">df</span></code>, <code class="docutils literal notranslate"><span class="pre">hdf</span></code>,
or <code class="docutils literal notranslate"><span class="pre">mfhdf</span></code> library files, pass this option to <code class="docutils literal notranslate"><span class="pre">./configure</span></code> with
the location of these library files.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">HDF4_INCLUDE=<HDF4</span> <span class="pre">include</span> <span class="pre">file</span> <span class="pre">directory></span></code> :</dt>
<dd><p class="first last">The configure script will automatically try to locate the HDF4 include
files in the default locations for include files
(<code class="docutils literal notranslate"><span class="pre">/usr/local/include</span></code> is usually not considered a default
location!).
If <code class="docutils literal notranslate"><span class="pre">./configure</span></code> complains that it can’t find the <code class="docutils literal notranslate"><span class="pre">hdf.h</span></code> or
<code class="docutils literal notranslate"><span class="pre">mfhdf.h</span></code> include files, pass this option to <code class="docutils literal notranslate"><span class="pre">./configure</span></code> with
the location of these include files.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">HDF5_LIB=<HDF5</span> <span class="pre">library</span> <span class="pre">directory></span></code> :</dt>
<dd><p class="first last">The configure script will automatically try to locate the HDF5 library
in the default locations for libraries (<code class="docutils literal notranslate"><span class="pre">/usr/local/lib</span></code> is usually
not considered a default location!).
If <code class="docutils literal notranslate"><span class="pre">./configure</span></code> complains that it can’t find the <code class="docutils literal notranslate"><span class="pre">hdf5</span></code> library
files, pass this option to <code class="docutils literal notranslate"><span class="pre">./configure</span></code> with the location of this
library file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">HDF5_INCLUDE=<HDF5</span> <span class="pre">include</span> <span class="pre">file</span> <span class="pre">directory></span></code> :</dt>
<dd><p class="first last">The configure script will automatically try to locate the HDF5 include
files in the default locations for include files
(<code class="docutils literal notranslate"><span class="pre">/usr/local/include</span></code> is usually not considered a default location!).
If <code class="docutils literal notranslate"><span class="pre">./configure</span></code> complains that it can’t find the <code class="docutils literal notranslate"><span class="pre">hdf5.h</span></code> include
file, pass this option to <code class="docutils literal notranslate"><span class="pre">./configure</span></code> with the location of this
include file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">--enable-python</span></code> :</dt>
<dd><p class="first last">By default HARP is built without the Python interface. Use this option
to enable building of the interface to Python. Make sure that you choose
the install prefix option (<code class="docutils literal notranslate"><span class="pre">--prefix</span></code>) such that the target location
of the python package (e.g. <code class="docutils literal notranslate"><span class="pre"><prefix>/lib/python3.7/site-packages</span></code>)
ends up in your python path. Also, if you enable the Python interface
then make sure you have installed the numpy and cffi packages for Python.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">PYTHON=<Python</span> <span class="pre">executable></span></code> :</dt>
<dd><p class="first last">If you want to build the Python interface you should also use this option
to tell the configuration script where your Python executable is located
(e.g. <code class="docutils literal notranslate"><span class="pre">PYTHON=/usr/bin/python</span></code>). Make sure that you provide an absolute
path for the Python executable (i.e. the path should start with a <code class="docutils literal notranslate"><span class="pre">/</span></code>).</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">--enable-R</span></code> :</dt>
<dd><p class="first last">By default HARP is built without the R interface. Use this option to
enable building of the interface to R. Make sure that you choose the
install prefix option (<code class="docutils literal notranslate"><span class="pre">--prefix</span></code>) such that the target location
of the R package (e.g. <code class="docutils literal notranslate"><span class="pre"><prefix>/lib/R/site-library</span></code>) ends up in your R
path.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">R=<R</span> <span class="pre">executable></span></code> :</dt>
<dd><p class="first last">If you want to build the R interface you might have to use this option to
tell the configuration script where your R executable is located
(e.g. <code class="docutils literal notranslate"><span class="pre">R=/usr/bin/R</span></code>). Make sure that you provide an absolute path for
the R executable (i.e. the path should start with a <code class="docutils literal notranslate"><span class="pre">/</span></code>).</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">--enable-idl</span></code> :</dt>
<dd><p class="first last">By default HARP is built without the IDL interface.
Use this option to enable building of the interface to IDL.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">IDL=<IDL</span> <span class="pre">root</span> <span class="pre">directory></span></code> :</dt>
<dd><p class="first last">If you want to build the IDL interface you should also use this
option to tell the configuration script where you have installed IDL.
The <IDL root directory> is the root directory of your IDL
installation. It should contain for instance the <code class="docutils literal notranslate"><span class="pre">bin</span></code> directory with
the idl executable and an <code class="docutils literal notranslate"><span class="pre">external</span></code> directory containing the file
<code class="docutils literal notranslate"><span class="pre">export.h</span></code>. Also make sure that you provide an absolute path for the
IDL root directory (i.e. starting with a <code class="docutils literal notranslate"><span class="pre">/</span></code>).</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">--enable-matlab</span></code> :</dt>
<dd><p class="first last">By default HARP is built without the MATLAB interface.
Use this option to enable building of the interface to MATLAB.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">MATLAB=<MATLAB</span> <span class="pre">root</span> <span class="pre">directory></span></code> :</dt>
<dd><p class="first last">If you want to build the MATLAB interface you should also use this
option to tell the configuration script where you have installed
MATLAB. The <MATLAB root directory> is the root directory of your
MATLAB installation. It should contain for instance the <code class="docutils literal notranslate"><span class="pre">bin</span></code>
directory with the matlab and mex executables (or symbolic links to
them) and an <code class="docutils literal notranslate"><span class="pre">extern/include</span></code> subdirectory containing the file
<code class="docutils literal notranslate"><span class="pre">mex.h</span></code>. Also make sure that you provide an absolute path for the
MATLAB root directory (i.e. starting with a <code class="docutils literal notranslate"><span class="pre">/</span></code>).</p>
</dd>
</dl>
<p>You should now call the configure script with the options that are
appropriate for you. For instance, if you want to install HARP in the
<code class="docutils literal notranslate"><span class="pre">harp</span></code> subdirectory of your home directory then your invocation of
configure would be:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ./configure --prefix=$HOME/harp
</pre></div>
</div>
</li>
<li><p class="first">If this completes successfully, you are now able to build the library by
executing the <code class="docutils literal notranslate"><span class="pre">make</span></code> command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make
</pre></div>
</div>
<p>If everything was successful, you are now ready to install the package
(this installation step is not optional! You will have to install HARP
before you can use it). If you encountered any problems while building
HARP and if you need help contact us (see the Feedback section at the
bottom for contact information).</p>
</li>
<li><p class="first">In order to make use of the HARP library and tools, you should install
HARP as build in the previous step. Please make sure you have provided
the appropriate installation directory option (<code class="docutils literal notranslate"><span class="pre">--prefix=<installdir></span></code>)
to the configure script, as explained in the previous section, if you do
not want to install HARP in its default location <code class="docutils literal notranslate"><span class="pre">/usr/local</span></code>. After
running the configure script, issue the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make install
</pre></div>
</div>
</li>
<li><p class="first">If you enabled the IDL interface then you will have to add
<code class="docutils literal notranslate"><span class="pre"><HARP</span> <span class="pre">installdir>/lib/harp/idl</span></code> to your <code class="docutils literal notranslate"><span class="pre">DLM_PATH</span></code>. You do this by
setting an <code class="docutils literal notranslate"><span class="pre">IDL_DLM_PATH</span></code> environment variable and add this setting to
your system shell startup script (if you don’t now how to set environment
variables or add these to your shell startup script, please ask your
system administrator).
The variable should be set to <code class="docutils literal notranslate"><span class="pre"><IDL_DEFAULT></span></code> appended with the HARP DLM
directory. If, for instance, you have installed HARP in <code class="docutils literal notranslate"><span class="pre">/usr/local</span></code>
then you should set the <code class="docutils literal notranslate"><span class="pre">IDL_DLM_PATH</span></code> environment variable to
<code class="docutils literal notranslate"><span class="pre"><IDL_DEFAULT>:/usr/local/lib/harp/idl</span></code>.</p>
<p>Note that you should ideally not use the IDL <code class="docutils literal notranslate"><span class="pre">pref_set</span></code> function to set
the <code class="docutils literal notranslate"><span class="pre">IDL_DLM_PATH</span></code>. The HARP DLM file will still load, but HARP will not
be able to find the coda format definition files or udunits2 xml files
this way. You can work around this by setting the coda definition path and
udunits2 xml path explicitly instead of having HARP/CODA automatically
determine this location based on the <code class="docutils literal notranslate"><span class="pre">IDL_DLM_PATH</span></code>.
See points 8 and 9 below for how to set the environment variables globally.
You can also set the environment variables inside IDL before you call any
HARP or CODA functions using e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">IDL</span><span class="o">></span> <span class="n">SETENV</span><span class="p">,</span> <span class="s1">'CODA_DEFINITION=/path/to/codadefs/'</span>
<span class="n">IDL</span><span class="o">></span> <span class="n">SETENV</span><span class="p">,</span> <span class="s1">'UDUNITS2_XML_PATH=/path/to/udunits2.xml'</span>
</pre></div>
</div>
</li>
<li><p class="first">If you enabled the MATLAB interface then you should create a <code class="docutils literal notranslate"><span class="pre">startup.m</span></code>
file in a <code class="docutils literal notranslate"><span class="pre">matlab</span></code> directory in your home directory
(<code class="docutils literal notranslate"><span class="pre">~/matlab/startup.m</span></code>) that contains the line:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">addpath</span> <span class="o"><</span><span class="n">HARP</span> <span class="n">installdir</span><span class="o">>/</span><span class="n">lib</span><span class="o">/</span><span class="n">harp</span><span class="o">/</span><span class="n">matlab</span>
</pre></div>
</div>
</li>
<li><p class="first">Make sure that the CODA definition path is correctly set.
If you followed the instructions normally, then HARP and CODA should be
able to find the coda definition files (.codadef files) inside the
installation path automatically.
If you are getting ‘unsupported product’ errors then you may have to set
the coda definition path explicitly. You can do this by setting the
<code class="docutils literal notranslate"><span class="pre">CODA_DEFINITION</span></code> environment variable and have it point to the
directory that contains the .codadef files. On Linux this would be e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">CODA_DEFINITION</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">share</span><span class="o">/</span><span class="n">coda</span><span class="o">/</span><span class="n">definitions</span>
</pre></div>
</div>
<p>On macOS you can set environment variables via a <a class="reference external" href="https://apple.stackexchange.com/questions/106355/setting-the-system-wide-path-environment-variable-in-mavericks">~/Library/LaunchAgents/my.startup.plist</a>
file.</p>
<p>Also make sure that you do not already have a CODA_DEFINITION
environment variable set that points to a different location than where
the .codadef files that come with HARP are located.</p>
</li>
<li><p class="first">Make sure that the udunits2 xml path is correctly set.
If you followed the instructions normally, then HARP should be able to
find the udunits2 xml files inside the installation path automatically.
If you are getting ‘invalid unit’ errors then you may have to set the
udunits2 xml path explicitly. You can do this by setting the
<code class="docutils literal notranslate"><span class="pre">UDUNITS2_XML_PATH</span></code> environment variable and have it point to the
<code class="docutils literal notranslate"><span class="pre">udunits2.xml</span></code> file inside the installation path.
On Linux this would be e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">UDUNITS2_XML_PATH</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">share</span><span class="o">/</span><span class="n">harp</span><span class="o">/</span><span class="n">udunits2</span><span class="o">.</span><span class="n">xml</span>
</pre></div>
</div>
<p>On macOS you can set environment variables via a <a class="reference external" href="https://apple.stackexchange.com/questions/106355/setting-the-system-wide-path-environment-variable-in-mavericks">~/Library/LaunchAgents/my.startup.plist</a>
file.</p>
</li>
</ol>
</div></blockquote>
</div>
<div class="section" id="installing-the-binary-package-windows">
<h2>Installing the binary package (Windows)</h2>
<p>First make sure that you have the <a class="reference external" href="https://www.microsoft.com/en-us/download/details.aspx?id=48145">Microsoft Visual C++ Redistributable
Packages for Visual Studio 2015</a> installed.</p>
<p>To install the binary package of HARP for Windows just run the msi executable
which will guide you through the installation process. Make sure to install
HARP in a directory that does not have any spaces in its path. Otherwise
you might encounter problems with e.g. the Python interface.</p>
<p>For Python you will have to copy the <code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files\HARP\python\harp</span></code>
directory to the site-packages folder of your Python installation.
However, if you want to use the Python interfaces on Windows, it is recommended
to just install the Anaconda package of HARP.</p>
<p>For R you will either have to copy the <code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files\HARP\R\harp</span></code>
directory to the site-library folder of your R installation or you will have to
add the <code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files\HARP\R</span></code> directory to your R library path.
However, if you want to use the R interfaces on Windows, it is recommended
to install the Anaconda package of HARP.</p>
<p>For IDL you will have to add <code class="docutils literal notranslate"><span class="pre"><HARP</span> <span class="pre">installdir>\lib\harp\idl</span></code> to your
<code class="docutils literal notranslate"><span class="pre">DLM_PATH</span></code>. You do this by setting an <code class="docutils literal notranslate"><span class="pre">IDL_DLM_PATH</span></code> environment variable.
On Windows open the ‘System’ control panel of your Windows operating system
and go to the ‘Advanced’ tab. Then click on ‘Environment Variables’ and create a
new system variable with the name <code class="docutils literal notranslate"><span class="pre">IDL_DLM_PATH</span></code> and value
<code class="docutils literal notranslate"><span class="pre"><IDL_DEFAULT>;C:\Program</span> <span class="pre">Files\HARP\lib\harp\idl</span></code>.
If you have installed HARP in a location different from
<code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files\HARP</span></code> then replace this part in the value by the
installation directory you chose when installing HARP.
Note that you should ideally not use the IDL <code class="docutils literal notranslate"><span class="pre">pref_set</span></code> function to set the
<code class="docutils literal notranslate"><span class="pre">IDL_DLM_PATH</span></code>. The HARP DLM file will still load, but HARP will not be able
to find the coda format definition files or udunits2 xml files this way.
You can work around this by setting the coda definition path and udunits2
xml path explicitly instead of having HARP/CODA automatically determine this
location based on the <code class="docutils literal notranslate"><span class="pre">IDL_DLM_PATH</span></code>.
This is done by setting the <code class="docutils literal notranslate"><span class="pre">CODA_DEFINITION</span></code> and <code class="docutils literal notranslate"><span class="pre">UDUNITS2_XML_PATH</span></code>
environment variables. This can be done outside IDL by setting the environment
variable globally, but you can also do this inside IDL before you call any HARP
or CODA functions using:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">IDL</span><span class="o">></span> <span class="n">SETENV</span><span class="p">,</span> <span class="s1">'CODA_DEFINITION=/path/to/codadefs/'</span>
<span class="n">IDL</span><span class="o">></span> <span class="n">SETENV</span><span class="p">,</span> <span class="s1">'UDUNITS2_XML_PATH=/path/to/udunits2.xml'</span>
</pre></div>
</div>
<p>For MATLAB you will have to start MATLAB and go to the ‘Set Path…’ menu item
in the ‘File’ menu. Here you should add the directory
<code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files\HARP\lib\harp\matlab</span></code>. If you have installed HARP in a
location different from <code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files\HARP</span></code> then replace this part of the
directory by the installation directory you had chosen when you installed HARP.</p>
<p>Note: The binary installer for Windows comes with DLLs for all dependencies,
which are CODA, HDF4, HDF5, and their dependencies.</p>
</div>
<div class="section" id="building-the-source-package-windows">
<h2>Building the source package (Windows)</h2>
<p>To build the source package, make sure to download the official HARP source
package, which is named <code class="docutils literal notranslate"><span class="pre">harp-x.y.z.tar.gz</span></code>. Don’t use the packages called
‘Source code’ from GitHub as these are contents of the git repository (see
‘Using GitHub’ above).</p>
<p>The official and only supported build system on Windows is CMake.
You will need to have builds of CODA, HDF4, HDF5 (and their dependencies)
available as well in order to build HARP. The locations of include files
and libraries for the third-party dependencies can be set using
<code class="docutils literal notranslate"><span class="pre"><package>_INCLUDE_DIR</span></code> and <code class="docutils literal notranslate"><span class="pre"><package>_LIBRARY_DIR</span></code> CMake options.</p>
<p>The generation of the Windows binary installer is done using CPack and WIX.
So, in order to recreate the Windows binary installer, you will also have to
make sure that you have CMake (3.0 or later) and WIX installed.</p>
</div>
<div class="section" id="documentation-location">
<h2>Documentation location</h2>
<p>Both the source and binary HARP packages come with documentation in HTML.
For the source package you can access the documentation from within the
unpacked HARP source package directory by going to the <code class="docutils literal notranslate"><span class="pre">doc/html</span></code>
subdirectory and opening the file index.html in your browser. If you perform
an install of the source package all documentation will also be installed. You
can find the documentation under the subdirectory <code class="docutils literal notranslate"><span class="pre">share/harp/doc/html</span></code> of
your installation directory (<code class="docutils literal notranslate"><span class="pre">/usr/local</span></code> by default).</p>
</div>
<div class="section" id="feedback">
<h2>Feedback</h2>
<p>If you encounter any problems while trying to build, install or run one or more
components of the HARP package then create a topic on the Atmospheric Toolbox
Forum:</p>
<blockquote>
<div><a class="reference external" href="https://forum.atmospherictoolbox.org/">https://forum.atmospherictoolbox.org/</a></div></blockquote>
<p>If you are using the source package on a Unix based system, please provide a
copy of the config.log file that is created when you run <code class="docutils literal notranslate"><span class="pre">./configure</span></code> and a
copy of the output of <code class="docutils literal notranslate"><span class="pre">make</span></code> with your e-mail.</p>
<p>Apart from problems, we would also appreciate to hear from you if you have any
ideas, suggestions, or comments that may help us to improve the quality or
functionality of HARP.</p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="conventions/index.html" class="btn btn-neutral float-right" title="Conventions" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="index.html" class="btn btn-neutral" title="HARP manual" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2015-2020 S[&]T, The Netherlands
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<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 async="async" type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
|