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 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709
|
<!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>Variable — 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="IDL interface" href="idl.html" />
<link rel="prev" title="Product Metadata" href="libharp_product_metadata.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"><a class="reference internal" href="install.html">Installation</a></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 current"><a class="reference internal" href="libharp.html">C library</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="libharp.html#introduction">Introduction</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="libharp.html#modules">Modules</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="libharp_collocation.html">Collocation</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_dataset.html">Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_documentation.html">Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_error.html">Error</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_general.html">General</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_geometry.html">Geometry</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_product.html">Product</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_product_metadata.html">Product Metadata</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">Variable</a></li>
</ul>
</li>
</ul>
</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><a href="libharp.html">C library</a> »</li>
<li>Variable</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="variable">
<h1>Variable</h1>
<dl class="group">
<dt>
<span class="target" id="group__harp__variable"></span><em>group</em> <code class="descname">harp_variable</code></dt>
<dd><p>The HARP Variables module contains everything related to HARP variables. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric">Typedefs</p>
<dl class="type">
<dt id="_CPPv313harp_variable">
<span id="_CPPv213harp_variable"></span><span id="harp_variable"></span><span class="target" id="group__harp__variable_1gaa1ef463380898f695f0be26959475b0b"></span><em class="property">typedef </em><em class="property">struct</em> <a class="reference internal" href="#_CPPv320harp_variable_struct" title="harp_variable_struct">harp_variable_struct</a> <code class="descname">harp_variable</code><br /></dt>
<dd><p>HARP Variable typedef </p>
</dd></dl>
</div>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt id="_CPPv326harp_variable_convert_unitP13harp_variablePKc">
<span id="_CPPv226harp_variable_convert_unitP13harp_variablePKc"></span><span id="harp_variable_convert_unit__harp_variableP.cCP"></span><span class="target" id="group__harp__variable_1ga5b07b7cbc799e1181f49a1b58c725345"></span>int <code class="descname">harp_variable_convert_unit</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, <em class="property">const</em> char *<em>target_unit</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Perform unit conversion on a variable</p>
<p>Apply an automatic conversion on the variable to arrive at the new given unit. If there is no conversion available from the current unit to the new unit then an error will be raised. The data type of the variable will be changed to ‘double’ as part of the conversion. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable on which the apply unit conversion. </li>
<li><code class="docutils literal notranslate"><span class="pre">target_unit</span></code>: Unit to which the variable should be converted (use udunits2 compliant units). </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv317harp_variable_newPKc14harp_data_typeiPK19harp_dimension_typePKlPP13harp_variable">
<span id="_CPPv217harp_variable_newPKc14harp_data_typeiPK19harp_dimension_typePKlPP13harp_variable"></span><span id="harp_variable_new__cCP.harp_data_type.i.harp_dimension_typeCP.lCP.harp_variablePP"></span><span class="target" id="group__harp__variable_1ga924d80d19cc952ad713a7a187d9296fa"></span>int <code class="descname">harp_variable_new</code><span class="sig-paren">(</span><em class="property">const</em> char *<em>name</em>, <a class="reference internal" href="libharp_general.html#_CPPv314harp_data_type" title="harp_data_type">harp_data_type</a> <em>data_type</em>, int <em>num_dimensions</em>, <em class="property">const</em> <a class="reference internal" href="libharp_general.html#_CPPv319harp_dimension_type" title="harp_dimension_type">harp_dimension_type</a> *<em>dimension_type</em>, <em class="property">const</em> long *<em>dimension</em>, <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> **<em>new_variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Create new variable. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">name</span></code>: Name of the variable. </li>
<li><code class="docutils literal notranslate"><span class="pre">data_type</span></code>: Storage type of the variable data. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_dimensions</span></code>: Number of array dimensions (use ‘0’ for scalar data). </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension_type</span></code>: Array with the dimension type for each of the dimensions. </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension</span></code>: Array with length for each of the dimensions. </li>
<li><code class="docutils literal notranslate"><span class="pre">new_variable</span></code>: Pointer to the C variable where the new HARP variable will be stored. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv320harp_variable_deleteP13harp_variable">
<span id="_CPPv220harp_variable_deleteP13harp_variable"></span><span id="harp_variable_delete__harp_variableP"></span><span class="target" id="group__harp__variable_1ga835b6de52fb02a28773ae01d8014fcb0"></span>void <code class="descname">harp_variable_delete</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Delete variable. Remove variable and all attached attributes. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: HARP variable </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv318harp_variable_copyPK13harp_variablePP13harp_variable">
<span id="_CPPv218harp_variable_copyPK13harp_variablePP13harp_variable"></span><span id="harp_variable_copy__harp_variableCP.harp_variablePP"></span><span class="target" id="group__harp__variable_1ga746112ee46c5f00aca3bb3a2bec0782f"></span>int <code class="descname">harp_variable_copy</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>other_variable</em>, <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> **<em>new_variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Create a copy of a variable. The function will create a deep-copy of the given HARP variable, also creating copyies of all attributes. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">other_variable</span></code>: Variable that should be copied. </li>
<li><code class="docutils literal notranslate"><span class="pre">new_variable</span></code>: Pointer to the C variable where the new HARP variable will be stored. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv329harp_variable_copy_attributesPK13harp_variableP13harp_variable">
<span id="_CPPv229harp_variable_copy_attributesPK13harp_variableP13harp_variable"></span><span id="harp_variable_copy_attributes__harp_variableCP.harp_variableP"></span><span class="target" id="group__harp__variable_1ga7c2ef8399a4df61045d7caaf59ef8b66"></span>int <code class="descname">harp_variable_copy_attributes</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>target_variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Copy all attributes of a variable to a target variable. This will copy all attribute information of a variable that is not available as a parameter of <em>harp_variable_new</em>. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable from which the attributes should be copied. </li>
<li><code class="docutils literal notranslate"><span class="pre">target_variable</span></code>: Variable into which the attributes will be stored. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv320harp_variable_appendP13harp_variablePK13harp_variable">
<span id="_CPPv220harp_variable_appendP13harp_variablePK13harp_variable"></span><span id="harp_variable_append__harp_variableP.harp_variableCP"></span><span class="target" id="group__harp__variable_1gae2f3e63db847f4bcddd25f1a06c2267a"></span>int <code class="descname">harp_variable_append</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>other_variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Append one variable to another. Both variables need to have the ‘time’ dimension as first dimension. And all non-time dimensions need to be the same for both variables. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable to which data should be appended. </li>
<li><code class="docutils literal notranslate"><span class="pre">other_variable</span></code>: Variable that should be appended. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv320harp_variable_renameP13harp_variablePKc">
<span id="_CPPv220harp_variable_renameP13harp_variablePKc"></span><span id="harp_variable_rename__harp_variableP.cCP"></span><span class="target" id="group__harp__variable_1ga392b44a53ce8ec7bee03ba5d826ee77e"></span>int <code class="descname">harp_variable_rename</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, <em class="property">const</em> char *<em>name</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Change the name of a variable. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: The variable for which the name should be changed. </li>
<li><code class="docutils literal notranslate"><span class="pre">name</span></code>: The new name of the variable. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv322harp_variable_set_unitP13harp_variablePKc">
<span id="_CPPv222harp_variable_set_unitP13harp_variablePKc"></span><span id="harp_variable_set_unit__harp_variableP.cCP"></span><span class="target" id="group__harp__variable_1ga71f52dea2713943cc29cee353afe457e"></span>int <code class="descname">harp_variable_set_unit</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, <em class="property">const</em> char *<em>unit</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Set the unit attribute of the specified variable. Store a copy of <em>unit</em> as the value of the unit attribute of the specified variable. The previous value (if any) will be freed. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable for which to set the unit attribute. </li>
<li><code class="docutils literal notranslate"><span class="pre">unit</span></code>: New value for the unit attribute. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv329harp_variable_set_descriptionP13harp_variablePKc">
<span id="_CPPv229harp_variable_set_descriptionP13harp_variablePKc"></span><span id="harp_variable_set_description__harp_variableP.cCP"></span><span class="target" id="group__harp__variable_1ga16ffb681cdd99a9bc96a03b11b404afe"></span>int <code class="descname">harp_variable_set_description</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, <em class="property">const</em> char *<em>description</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Set the description attribute of the specified variable. Store a copy of <em>description</em> as the value of the description attribute of the specified variable. The previous value (if any) will be freed. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable for which to set the description attribute. </li>
<li><code class="docutils literal notranslate"><span class="pre">description</span></code>: New value for the description attribute. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv336harp_variable_set_enumeration_valuesP13harp_variableiPPKc">
<span id="_CPPv236harp_variable_set_enumeration_valuesP13harp_variableiPPKc"></span><span id="harp_variable_set_enumeration_values__harp_variableP.i.cCPP"></span><span class="target" id="group__harp__variable_1ga9ce68c378f834c4178f8d0e95bb3c5d0"></span>int <code class="descname">harp_variable_set_enumeration_values</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, int <em>num_enum_values</em>, <em class="property">const</em> char **<em>enum_name</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Set the enumeration values for a variable with integer values. This will assign enumeration labels to each integer value from 0 to num_enum_values-1. The enumeration label for a value is found by using the value as index in the enum_name array. This function will also set valid_min to 0 and valid_max to num_enum_values - 1 (i.e. any variable value that lies outside the index range is considered invalid). You can pass num_enum_values = 0 to clear any previous enumeration values that were set for the variable. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable for which to set the enumeration values. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_enum_values</span></code>: Number of enumeration values </li>
<li><code class="docutils literal notranslate"><span class="pre">enum_name</span></code>: Array with the names for each of the enumeration values </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv337harp_variable_set_string_data_elementP13harp_variablelPKc">
<span id="_CPPv237harp_variable_set_string_data_elementP13harp_variablelPKc"></span><span id="harp_variable_set_string_data_element__harp_variableP.l.cCP"></span><span class="target" id="group__harp__variable_1ga87634436bf81efb1cc15e7641dcece20"></span>int <code class="descname">harp_variable_set_string_data_element</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, long <em>index</em>, <em class="property">const</em> char *<em>str</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Store a copy of <em>str</em> at <em>index</em> into the flattened array of strings associated with <em>variable</em>. <dl class="docutils">
<dt><strong>Warning</strong></dt>
<dd>No boundary checks are performed on <em>index</em>. </dd>
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable of type string. </li>
<li><code class="docutils literal notranslate"><span class="pre">index</span></code>: Index into the flattened array of strings associated with the variable. </li>
<li><code class="docutils literal notranslate"><span class="pre">str</span></code>: The string of which a copy should be stored. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv331harp_variable_convert_data_typeP13harp_variable14harp_data_type">
<span id="_CPPv231harp_variable_convert_data_typeP13harp_variable14harp_data_type"></span><span id="harp_variable_convert_data_type__harp_variableP.harp_data_type"></span><span class="target" id="group__harp__variable_1ga36ccb73140dc74215a886b49a8949363"></span>int <code class="descname">harp_variable_convert_data_type</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, <a class="reference internal" href="libharp_general.html#_CPPv314harp_data_type" title="harp_data_type">harp_data_type</a> <em>target_data_type</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Convert the data for the variable such that it matches the given data type. The memory for the block holding the data for the attribute will be resized to match the new data type if needed. You cannot convert string data to numeric data or vice-versa. Conversion from floating point to integer data (or vice versa) is allowed though. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable whose data should be aligned with the given data type. </li>
<li><code class="docutils literal notranslate"><span class="pre">target_data_type</span></code>: Data type to which the data for the variable should be converted. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv332harp_variable_has_dimension_typePK13harp_variable19harp_dimension_type">
<span id="_CPPv232harp_variable_has_dimension_typePK13harp_variable19harp_dimension_type"></span><span id="harp_variable_has_dimension_type__harp_variableCP.harp_dimension_type"></span><span class="target" id="group__harp__variable_1ga4dea9367f9781a38269c286d3173b77b"></span>int <code class="descname">harp_variable_has_dimension_type</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, <a class="reference internal" href="libharp_general.html#_CPPv319harp_dimension_type" title="harp_dimension_type">harp_dimension_type</a> <em>dimension_type</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Test if variable contains at least one dimension equal to the specified dimension type. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Variable does not contain a dimension of the given dimension type </li>
<li><code class="docutils literal notranslate"><span class="pre">1</span></code>, Variable contains at least one dimension of the given dimension type </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable to check. </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension_type</span></code>: Requested dimension type </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv333harp_variable_has_dimension_typesPK13harp_variableiPK19harp_dimension_type">
<span id="_CPPv233harp_variable_has_dimension_typesPK13harp_variableiPK19harp_dimension_type"></span><span id="harp_variable_has_dimension_types__harp_variableCP.i.harp_dimension_typeCP"></span><span class="target" id="group__harp__variable_1ga53a34b30f7afc8d9bcbb546c21884488"></span>int <code class="descname">harp_variable_has_dimension_types</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, int <em>num_dimensions</em>, <em class="property">const</em> <a class="reference internal" href="libharp_general.html#_CPPv319harp_dimension_type" title="harp_dimension_type">harp_dimension_type</a> *<em>dimension_type</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Test if variable has dimensions equal to the specified list of dimension types. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Variable does not match the dimension types </li>
<li><code class="docutils literal notranslate"><span class="pre">1</span></code>, Variable matches number of dimensions and specified type for each dimension. </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable to check. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_dimensions</span></code>: Number of dimensions the variable should have. </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension_type</span></code>: Requested dimension type for each of the dimensions of the variable </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv322harp_variable_has_unitPK13harp_variablePKc">
<span id="_CPPv222harp_variable_has_unitPK13harp_variablePKc"></span><span id="harp_variable_has_unit__harp_variableCP.cCP"></span><span class="target" id="group__harp__variable_1ga568017c653f870b2dadbc8eee84da6d8"></span>int <code class="descname">harp_variable_has_unit</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, <em class="property">const</em> char *<em>unit</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Test if variable has a unit equal to the specified unit. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, The unit of the variable does not equal the given unit </li>
<li><code class="docutils literal notranslate"><span class="pre">1</span></code>, The unit of the variable equals the given unit </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable to check. </li>
<li><code class="docutils literal notranslate"><span class="pre">unit</span></code>: Number of dimensions the variable should have. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv320harp_variable_verifyPK13harp_variable">
<span id="_CPPv220harp_variable_verifyPK13harp_variable"></span><span id="harp_variable_verify__harp_variableCP"></span><span class="target" id="group__harp__variable_1gafb42d5c88f062c40b4739f75a360c080"></span>int <code class="descname">harp_variable_verify</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Verify that a variable is internally consistent and complies with conventions. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Variable verified successfully. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable to verify. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv319harp_variable_printP13harp_variableiPFiPKczE">
<span id="_CPPv219harp_variable_printP13harp_variableiPFiPKczE"></span><span class="target" id="group__harp__variable_1gae4abc939c7c57e2c8b9a5f381520ae9f"></span>void <code class="descname">harp_variable_print</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, int <em>show_attributes</em>, int (*<em>print</em>)<span class="sig-paren">(</span><em class="property">const</em> char *, ...<span class="sig-paren">)</span><span class="sig-paren">)</span><br /></dt>
<dd><p>Print a harp_variable struct using the specified print function. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable to print. </li>
<li><code class="docutils literal notranslate"><span class="pre">show_attributes</span></code>: Whether or not to print the attributes. </li>
<li><code class="docutils literal notranslate"><span class="pre">print</span></code>: Print function to use </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv324harp_variable_print_dataP13harp_variablePFiPKczE">
<span id="_CPPv224harp_variable_print_dataP13harp_variablePFiPKczE"></span><span class="target" id="group__harp__variable_1gacd1233a90389ac7bd85e9f80b2cb6d48"></span>void <code class="descname">harp_variable_print_data</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, int (*<em>print</em>)<span class="sig-paren">(</span><em class="property">const</em> char *, ...<span class="sig-paren">)</span><span class="sig-paren">)</span><br /></dt>
<dd><p>Print the data of a harp_variable using the specified print function. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable whose data to print. </li>
<li><code class="docutils literal notranslate"><span class="pre">print</span></code>: Print function to use </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="function">
<dt id="_CPPv329harp_variable_smooth_verticalP13harp_variableP13harp_variableP13harp_variableP13harp_variable">
<span id="_CPPv229harp_variable_smooth_verticalP13harp_variableP13harp_variableP13harp_variableP13harp_variable"></span><span id="harp_variable_smooth_vertical__harp_variableP.harp_variableP.harp_variableP.harp_variableP"></span><span class="target" id="group__harp__variable_1ga2a8bc0e62c08f776dca1b4b74cdec637"></span>int <code class="descname">harp_variable_smooth_vertical</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em>, <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>vertical_axis</em>, <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>averaging_kernel</em>, <a class="reference internal" href="#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>apriori</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Vertically smooth the variable using the given averaging kernel and a apriori. The variable already needs to be on the same vertical grid as that of the averaging kernel (and a priori). The apriori is optional. If provided, the apriori is first subtracted from the variable, then the smoothing is performed, and finally the apriori is added again. The averaging kernel needs to have dimensions {time,vertical,vertical} and the apriori {time,vertical}. The variable to be smoothed needs to have dimensions {time, …, vertical} (i.e. first dimension must be time and the last the vertical dimension; number of dimensions needs to be 2 or higher). The vertical axis variable is optional and, if provided, needs to have dimensions {time,vertical}. The vertical axis variable will be used to determine the valid number of vertical elements per profile. All inputs need to be provided as ‘double’ data. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Success. </li>
<li><code class="docutils literal notranslate"><span class="pre">-1</span></code>, Error occurred (check <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a>). </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable to which the averaging kernel (and apriori) should be applied. </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_axis</span></code>: The variable containing the time dependent vertical grid (optional). </li>
<li><code class="docutils literal notranslate"><span class="pre">averaging_kernel</span></code>: The variable containing the averaging kernel. </li>
<li><code class="docutils literal notranslate"><span class="pre">apriori</span></code>: The variable containing the apriori (optional). </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
</div>
<dl class="class">
<dt id="_CPPv320harp_variable_struct">
<span id="_CPPv220harp_variable_struct"></span><span id="harp_variable_struct"></span><span class="target" id="structharp__variable__struct"></span><em class="property">struct </em><code class="descname">harp_variable_struct</code><br /></dt>
<dd><em>#include <harp.h></em><p>HARP Variable struct </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric">Public Members</p>
<dl class="member">
<dt id="_CPPv34name">
<span id="_CPPv24name"></span><span id="name__cP"></span><span class="target" id="structharp__variable__struct_1a5ac083a645d964373f022d03df4849c8"></span>char *<code class="descname">name</code><br /></dt>
<dd><p>name of variable </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv39data_type">
<span id="_CPPv29data_type"></span><span id="data_type__harp_data_type"></span><span class="target" id="structharp__variable__struct_1ae23ad96b8e86b2dd28071bb83d20d65a"></span><a class="reference internal" href="libharp_general.html#_CPPv314harp_data_type" title="harp_data_type">harp_data_type</a> <code class="descname">data_type</code><br /></dt>
<dd><p>storage type of the data </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv314num_dimensions">
<span id="_CPPv214num_dimensions"></span><span id="num_dimensions__i"></span><span class="target" id="structharp__variable__struct_1a2e06601fd5ce25d007b482f73b72b927"></span>int <code class="descname">num_dimensions</code><br /></dt>
<dd><p>number of array dimensions </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv314dimension_type">
<span id="_CPPv214dimension_type"></span><span id="dimension_type__harp_dimension_typeA"></span><span class="target" id="structharp__variable__struct_1a1a7f4720ee5338bc757c90e190a46986"></span><a class="reference internal" href="libharp_general.html#_CPPv319harp_dimension_type" title="harp_dimension_type">harp_dimension_type</a> <code class="descname">dimension_type</code>[<code class="descname">HARP_MAX_NUM_DIMS</code>]<br /></dt>
<dd><p>type of each of the array dimensions </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv39dimension">
<span id="_CPPv29dimension"></span><span id="dimension__lA"></span><span class="target" id="structharp__variable__struct_1a96de81d17651a1ad4f4bd5c70f63943c"></span>long <code class="descname">dimension</code>[<code class="descname">HARP_MAX_NUM_DIMS</code>]<br /></dt>
<dd><p>length of each of the array dimensions </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv312num_elements">
<span id="_CPPv212num_elements"></span><span id="num_elements__l"></span><span class="target" id="structharp__variable__struct_1a5c03a9158f85d90543e517a189195c81"></span>long <code class="descname">num_elements</code><br /></dt>
<dd><p>total number of elements (equals product of array dimensions) </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv34data">
<span id="_CPPv24data"></span><span id="data__harp_array"></span><span class="target" id="structharp__variable__struct_1a5052decdedc45078e8a548381c27e9fd"></span><a class="reference internal" href="libharp_general.html#_CPPv310harp_array" title="harp_array">harp_array</a> <code class="descname">data</code><br /></dt>
<dd><p>array data of the variable </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv311description">
<span id="_CPPv211description"></span><span id="description__cP"></span><span class="target" id="structharp__variable__struct_1a8444d6e0dfe2bbab0b5e7b24308f1559"></span>char *<code class="descname">description</code><br /></dt>
<dd><p>corresponds to netCDF long_name </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv34unit">
<span id="_CPPv24unit"></span><span id="unit__cP"></span><span class="target" id="structharp__variable__struct_1a5a80171400807274a7fa9c95a104dc78"></span>char *<code class="descname">unit</code><br /></dt>
<dd><p>corresponds to netCDF units </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv39valid_min">
<span id="_CPPv29valid_min"></span><span id="valid_min__harp_scalar"></span><span class="target" id="structharp__variable__struct_1ab3a591ca80d228b55b5073296d7f3047"></span><a class="reference internal" href="libharp_general.html#_CPPv311harp_scalar" title="harp_scalar">harp_scalar</a> <code class="descname">valid_min</code><br /></dt>
<dd><p>corresponds to netCDF valid_min or valid_range[0] </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv39valid_max">
<span id="_CPPv29valid_max"></span><span id="valid_max__harp_scalar"></span><span class="target" id="structharp__variable__struct_1ab3b40d874754e5e166eb0238b36d74b6"></span><a class="reference internal" href="libharp_general.html#_CPPv311harp_scalar" title="harp_scalar">harp_scalar</a> <code class="descname">valid_max</code><br /></dt>
<dd><p>corresponds to netCDF valid_max or valid_range[1] </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv315num_enum_values">
<span id="_CPPv215num_enum_values"></span><span id="num_enum_values__i"></span><span class="target" id="structharp__variable__struct_1a65bfbb5ec39a6452d0a8b06c246ca978"></span>int <code class="descname">num_enum_values</code><br /></dt>
<dd><p>number of enumeration values (which map to values 0..N-1 in ‘data’) </p>
</dd></dl>
<dl class="member">
<dt id="_CPPv39enum_name">
<span id="_CPPv29enum_name"></span><span id="enum_name__cPP"></span><span class="target" id="structharp__variable__struct_1af08c4d0477b71a04af40fc8a644d2219"></span>char **<code class="descname">enum_name</code><br /></dt>
<dd><p>name of each enumeration value </p>
</dd></dl>
</div>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="idl.html" class="btn btn-neutral float-right" title="IDL interface" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="libharp_product_metadata.html" class="btn btn-neutral" title="Product Metadata" 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>
|