File: libharp_product.html

package info (click to toggle)
harp 1.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 58,728 kB
  • sloc: xml: 339,052; ansic: 151,016; javascript: 9,315; yacc: 2,092; python: 1,066; makefile: 628; lex: 582; sh: 69
file content (1144 lines) | stat: -rw-r--r-- 102,430 bytes parent folder | download
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
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144


<!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>Product &mdash; 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="Product Metadata" href="libharp_product_metadata.html" />
    <link rel="prev" title="Geometry" href="libharp_geometry.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 current"><a class="current reference internal" href="#">Product</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_product_metadata.html">Product Metadata</a></li>
<li class="toctree-l3"><a class="reference internal" href="libharp_variable.html">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> &raquo;</li>
        
          <li><a href="libharp.html">C library</a> &raquo;</li>
        
      <li>Product</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="product">
<h1>Product</h1>
<dl class="group">
<dt>
<span class="target" id="group__harp__product"></span><em>group</em> <code class="descname">harp_product</code></dt>
<dd><p>The HARP Products module contains everything related to HARP products.</p>
<p>The representation of a HARP product in C is a structure containing:<ul class="simple">
<li>an array of variables</li>
<li>an array of dimension lengths for each dimension type (unavailable dimensions have length -1)</li>
<li>the <code class="docutils literal notranslate"><span class="pre">source_product</span></code> global attribute (can be NULL)</li>
<li>the <code class="docutils literal notranslate"><span class="pre">history</span></code> global attribute (can be NULL)</li>
</ul>
</p>
<p>Note that the <code class="docutils literal notranslate"><span class="pre">Conventions</span></code> global attribute is not included as this is automatically handled by the import/export functions of HARP. Similar, the <code class="docutils literal notranslate"><span class="pre">datetime_start</span></code> and <code class="docutils literal notranslate"><span class="pre">datetime_stop</span></code> attributes are handled by the export function. They are set to the minimum and maximum values of the variables <code class="docutils literal notranslate"><span class="pre">datetime</span></code>, <code class="docutils literal notranslate"><span class="pre">datetime_start</span></code> and <code class="docutils literal notranslate"><span class="pre">datetime_stop</span></code> (if available).</p>
<p>For each variable in the HARP product the dimensions need to match the length of their type as defined in the dimension array of the HARP product (for all dimension types except ‘independent’). </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric">Typedefs</p>
<dl class="type">
<dt id="_CPPv312harp_product">
<span id="_CPPv212harp_product"></span><span id="harp_product"></span><span class="target" id="group__harp__product_1gab3fddebd8b746e0d76948d03ca073ddc"></span><em class="property">typedef </em><em class="property">struct</em> <a class="reference internal" href="#_CPPv319harp_product_struct" title="harp_product_struct">harp_product_struct</a> <code class="descname">harp_product</code><br /></dt>
<dd><p>HARP Product typedef </p>
</dd></dl>

</div>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt id="_CPPv316harp_product_binP12harp_productllPl">
<span id="_CPPv216harp_product_binP12harp_productllPl"></span><span id="harp_product_bin__harp_productP.l.l.lP"></span><span class="target" id="group__harp__product_1gac1a935b414c03ed0a9a414a53dbc311e"></span>int <code class="descname">harp_product_bin</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, long <em>num_bins</em>, long <em>num_elements</em>, long *<em>bin_index</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Bin the product’s variables. This will bin all variables in the time dimension. Each time sample will be put in the bin defined by bin_index. All variables with a time dimension will then be resampled using these bins. The resulting value for each variable will be the average of all values for the bin (using existing count or weight variables as weighting factors where available). Variables with multiple dimensions will have all elements in the sub dimensions averaged on an element by element basis.</p>
<p>Variables that have a time dimension but no unit (or using a string data type) will be removed. The exception are count and weight variables, which will be summed.</p>
<p>All variables that are binned (except existing count/weight variables) are converted to a double data type. Bins that have no samples will end up with a NaN value.</p>
<p>If the product did not already have a ‘count’ variable then a ‘count’ variable will be added to the product that will contain the number of samples per bin.</p>
<p>Only non-NaN values will contribute to a bin. If there are NaN values and there is not already a variable-specific count or weight variable for that variable, then a separate variable-specific count variable will be created that will contain the number of non-NaN values that contributed to each bin. This count variable will have the same dimensions as the variable it provides the count for.</p>
<p>For angle variables a variable-specific weight variable will be created (if it did not yet exist) that contains the magnitude of the sum of the unit vectors that was used to calculate the angle average.</p>
<p>For uncertainty variables the first order propagation rules are used (assuming full correlation for systematic uncertainty variables and using the <a class="reference internal" href="libharp_general.html#group__harp__general_1ga9fea5f821a70646daeb1915bf2ae3ddb"><span class="std std-ref">harp_get_option_propagate_uncertainty()</span></a> setting for total and random uncertainty variables).</p>
<p><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">product</span></code>: Product to regrid. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_bins</span></code>: Number of target bins. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_elements</span></code>: Length of bin_index array (should equal the length of the time dimension) </li>
<li><code class="docutils literal notranslate"><span class="pre">bin_index</span></code>: Array of target bin index numbers (0 .. num_bins-1) for each sample in the time dimension.</li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv324harp_product_bin_spatialP12harp_productllPllPdlPd">
<span id="_CPPv224harp_product_bin_spatialP12harp_productllPllPdlPd"></span><span id="harp_product_bin_spatial__harp_productP.l.l.lP.l.doubleP.l.doubleP"></span><span class="target" id="group__harp__product_1ga10e515f7b5a798c0b952db718bafeaa3"></span>int <code class="descname">harp_product_bin_spatial</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, long <em>num_time_bins</em>, long <em>num_time_elements</em>, long *<em>time_bin_index</em>, long <em>num_latitude_edges</em>, double *<em>latitude_edges</em>, long <em>num_longitude_edges</em>, double *<em>longitude_edges</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Bin the product’s variables into a spatial grid. This will bin all variables with a time dimension into a three dimensional time x latitude x longitude grid. Each time sample will first be allocated to a time bin defined by time_bin_index (similar to <em>harp_product_bin</em>). Then within that time bin the sample will be allocated to the appropriate cell(s) in the latitude/longitude grid as defined by the latitude_edges and longitude_edges variables.</p>
<p>The lat/lon grid will be a fixed time-independent grid and will have ‘num_latitude_edges-1’ latitudes and ‘num_longitude_edges-1’ longitudes. The latitude_edges and longitude_edges arrays provide the boundaries of the grid cells in degrees and need to be provided in a strict ascending order. The latitude edge values need to be between -90 and 90 and for the longitude edge values the constraint is that the difference between the last and first edge should be &lt;= 360.</p>
<p>If the product has latitude_bounds {time,independent} and longitude_bounds {time,independent} variables then an area binning is performed. This means that each sample will be allocated to each lat/lon grid cell based on the amount of overlap. This overlap calculation will treat lines between points as straight lines within the carthesian plane (i.e. using a Plate Carree projection, and not using great circle arcs between points on a sphere).</p>
<p>If the product doesn’t have lat/lon bounds per sample, it should have latitude {time} and longitude {time} variables. The binning onto the lat/lon grid will then be a point binning. This means that each sample is allocated to only one grid cell based on its lat/lon coordinate. To achieve a unique assignment, for each cell the lower edge will be considered inclusive and the upper edge exclusive (except for the last cell (when there is no wrap-around)).</p>
<p>The resulting value for each time/lat/lon cell will be the average of all values for that cell. This will be a weighted average in case an area binning is performed and a straight average for point binning. Variables with multiple dimensions will have all elements in its sub dimensions averaged on an element by element basis (i.e. sub dimensions will be retained).</p>
<p>Variables that have a time dimension but no unit (or using a string data type) will be removed. Any existing count or weight variables will also be removed.</p>
<p>For uncertainty variables the first order propagation rules are used (assuming full correlation).</p>
<p>All variables that are binned are converted to a double data type. Cells that have no samples will end up with a NaN value.</p>
<p>A ‘count’ variable will be added to the product that will contain the number of samples per time bin. In addition, a ‘weight’ variable will be added that will contain the sum of weights for the contribution to each cell. If a variable contained NaN values then a variable specific weight variable will be created with only the sum of weights for the non-NaN entries.</p>
<p>Axis variables for the time dimension such as datetime, datetime_length, datetime_start, and datetime_stop will only be binned in the time dimension (and will not gain a latitude or longitude dimension).</p>
<p><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">product</span></code>: Product to regrid. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_time_bins</span></code>: Number of target bins in the time dimension. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_time_elements</span></code>: Length of bin_index array (should equal the length of the time dimension) </li>
<li><code class="docutils literal notranslate"><span class="pre">time_bin_index</span></code>: Array of target time bin index numbers (0 .. num_bins-1) for each sample in the time dimension. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_latitude_edges</span></code>: Number of edges for the latitude grid (number of latitude rows = num_latitude_edges - 1) </li>
<li><code class="docutils literal notranslate"><span class="pre">latitude_edges</span></code>: latitude grid edge vales </li>
<li><code class="docutils literal notranslate"><span class="pre">num_longitude_edges</span></code>: Number of edges for the longitude grid (number of longitude columns = num_longitude_edges - 1) </li>
<li><code class="docutils literal notranslate"><span class="pre">longitude_edges</span></code>: longitude grid edge vales</li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv333harp_product_get_derived_variablePK12harp_productPKcPK14harp_data_typePKciPK19harp_dimension_typePP13harp_variable">
<span id="_CPPv233harp_product_get_derived_variablePK12harp_productPKcPK14harp_data_typePKciPK19harp_dimension_typePP13harp_variable"></span><span id="harp_product_get_derived_variable__harp_productCP.cCP.harp_data_typeCP.cCP.i.harp_dimension_typeCP.harp_variablePP"></span><span class="target" id="group__harp__product_1gaa5bdb44215a418514463022ca2672c66"></span>int <code class="descname">harp_product_get_derived_variable</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>name</em>, <em class="property">const</em> <a class="reference internal" href="libharp_general.html#_CPPv314harp_data_type" title="harp_data_type">harp_data_type</a> *<em>data_type</em>, <em class="property">const</em> char *<em>unit</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>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> **<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Retrieve a new variable based on the set of automatic conversions that are supported by HARP.</p>
<p>If the product already contained a variable with the given name, you will get a copy of that variable (and converted to the specified data type and unit). Otherwise the function will try to create a new variable based on the data found in the product or on available auxiliary data (e.g. built-in climatology). The caller of this function will be responsible for the memory management of the returned variable. <dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>setting unit to NULL returns a variable in the original unit </dd>
<dt><strong>Note</strong></dt>
<dd>pointers to axis variables are passed through unmodified. </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">product</span></code>: Product from which to derive the new variable. </li>
<li><code class="docutils literal notranslate"><span class="pre">name</span></code>: Name of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">data_type</span></code>: Data type (optional) of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">unit</span></code>: Unit (optional) of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_dimensions</span></code>: Number of dimensions of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension_type</span></code>: Type of dimension for each of the dimensions of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Pointer to the C variable where the derived HARP variable will be stored. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv333harp_product_add_derived_variableP12harp_productPKcPK14harp_data_typePKciPK19harp_dimension_type">
<span id="_CPPv233harp_product_add_derived_variableP12harp_productPKcPK14harp_data_typePKciPK19harp_dimension_type"></span><span id="harp_product_add_derived_variable__harp_productP.cCP.harp_data_typeCP.cCP.i.harp_dimension_typeCP"></span><span class="target" id="group__harp__product_1gaa5caaf1e0e7f08afafbf91bc06428f96"></span>int <code class="descname">harp_product_add_derived_variable</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>name</em>, <em class="property">const</em> <a class="reference internal" href="libharp_general.html#_CPPv314harp_data_type" title="harp_data_type">harp_data_type</a> *<em>data_type</em>, <em class="property">const</em> char *<em>unit</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>Create a derived variable and add it to the product.</p>
<p>If a similar named variable with the right dimensions was already in the product then that variable will be modified to match the given unit (and in case <em>unit</em> is NULL, then the function will just leave the product unmodified). Otherwise the function will call <a class="reference internal" href="#group__harp__product_1gaa5bdb44215a418514463022ca2672c66"><span class="std std-ref">harp_product_get_derived_variable()</span></a> and add the new variable using <a class="reference internal" href="#group__harp__product_1ga84a2e8737ef00ab3ec8cecb54bd53d51"><span class="std std-ref">harp_product_add_variable()</span></a> (removing any existing variable with the same name, but different dimensions) <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">product</span></code>: Product from which to derive the new variable and into which the derived variable should be placed. </li>
<li><code class="docutils literal notranslate"><span class="pre">name</span></code>: Name of the variable that should be added. </li>
<li><code class="docutils literal notranslate"><span class="pre">data_type</span></code>: Data type (optional) of the variable that should be added. </li>
<li><code class="docutils literal notranslate"><span class="pre">unit</span></code>: Unit (optional) of the variable that should be added. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_dimensions</span></code>: Number of dimensions of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension_type</span></code>: Type of dimension for each of the dimensions of the variable that should be created. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv316harp_product_newPP12harp_product">
<span id="_CPPv216harp_product_newPP12harp_product"></span><span id="harp_product_new__harp_productPP"></span><span class="target" id="group__harp__product_1ga0d4b0729140d78db3441be1b66451e91"></span>int <code class="descname">harp_product_new</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> **<em>new_product</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Create new product. The product will be initialized with 0 variables and 0 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">new_product</span></code>: Pointer to the C variable where the new HARP product will be stored. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv319harp_product_deleteP12harp_product">
<span id="_CPPv219harp_product_deleteP12harp_product"></span><span id="harp_product_delete__harp_productP"></span><span class="target" id="group__harp__product_1ga733c9e35d18dd76b7f9d7bf36c1c53a8"></span>void <code class="descname">harp_product_delete</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Delete product. Remove product and all attached variables and 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">product</span></code>: HARP product. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv317harp_product_copyPK12harp_productPP12harp_product">
<span id="_CPPv217harp_product_copyPK12harp_productPP12harp_product"></span><span id="harp_product_copy__harp_productCP.harp_productPP"></span><span class="target" id="group__harp__product_1gaeb2e6f3916f21319e8c8576efaa1e351"></span>int <code class="descname">harp_product_copy</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>other_product</em>, <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> **<em>new_product</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Create a copy of a product. The function will create a deep-copy of the given product, also creating copyies of all attributes and 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">other_product</span></code>: Product that should be copied. </li>
<li><code class="docutils literal notranslate"><span class="pre">new_product</span></code>: Pointer to the variable where the new HARP product will be stored. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv319harp_product_appendP12harp_productP12harp_product">
<span id="_CPPv219harp_product_appendP12harp_productP12harp_product"></span><span id="harp_product_append__harp_productP.harp_productP"></span><span class="target" id="group__harp__product_1gac38975a39f20971cac1cefb8416b2347"></span>int <code class="descname">harp_product_append</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>other_product</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Append one product to another. The ‘index’ variable, if present, will be removed. All variables in both products will have a ‘time’ dimension introduced as first dimension. Both products will have all non-time dimensions extended to the maximum of either product. Any ‘source_product’ attribute for the first product will be removed.</p>
<p>If you pass NULL for ‘other_product’, then ‘product’ will be updated as if it was the result of a merge (i.e. remove ‘index’, add ‘time’ dimension, and remove ‘source_product’ attribute). <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">product</span></code>: Product to which data should be appended. </li>
<li><code class="docutils literal notranslate"><span class="pre">other_product</span></code>: (optional) Product that should be appended. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv331harp_product_set_source_productP12harp_productPKc">
<span id="_CPPv231harp_product_set_source_productP12harp_productPKc"></span><span id="harp_product_set_source_product__harp_productP.cCP"></span><span class="target" id="group__harp__product_1ga2788cc7c42cf9fe9b2f60ed3231e3589"></span>int <code class="descname">harp_product_set_source_product</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>product_path</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Set the source product attribute of the specified product. Stores the base name of <em>product_path</em> as the value of the source product attribute of the specified product. The previous value (if any) will be freed. The base name of the product path is the filename of the product without any directory name components. <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">product</span></code>: Product for which to set the source product attribute. </li>
<li><code class="docutils literal notranslate"><span class="pre">product_path</span></code>: Relative or absolute path to the product or just the product filename (can be NULL). </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv324harp_product_set_historyP12harp_productPKc">
<span id="_CPPv224harp_product_set_historyP12harp_productPKc"></span><span id="harp_product_set_history__harp_productP.cCP"></span><span class="target" id="group__harp__product_1ga7693ca9ca73d407973f93f4a3d27d3bf"></span>int <code class="descname">harp_product_set_history</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>history</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Set the history attribute of the specified product. Store a copy of <em>history</em> as the value of the history attribute of the specified product. 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">product</span></code>: Product for which to set the history attribute. </li>
<li><code class="docutils literal notranslate"><span class="pre">history</span></code>: New value for the history attribute (can be NULL). </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv325harp_product_add_variableP12harp_productP13harp_variable">
<span id="_CPPv225harp_product_add_variableP12harp_productP13harp_variable"></span><span id="harp_product_add_variable__harp_productP.harp_variableP"></span><span class="target" id="group__harp__product_1ga84a2e8737ef00ab3ec8cecb54bd53d51"></span>int <code class="descname">harp_product_add_variable</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Add a variable to a product. <dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>The memory management of the variable will be handled via the product after you have added the variable. </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">product</span></code>: Product to which the variable should be added. </li>
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable that should be added to the product. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv328harp_product_detach_variableP12harp_productPK13harp_variable">
<span id="_CPPv228harp_product_detach_variableP12harp_productPK13harp_variable"></span><span id="harp_product_detach_variable__harp_productP.harp_variableCP"></span><span class="target" id="group__harp__product_1ga99d5d7f3a1e70ee69ee7519aaf9e3be4"></span>int <code class="descname">harp_product_detach_variable</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Detach a variable from a product. Removes a variable from a product without deleting the variable itself. After detaching, the caller of the function will be responsible for the further memory management of 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">product</span></code>: Product from which the variable should be detached. </li>
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable that should be detached. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv328harp_product_remove_variableP12harp_productP13harp_variable">
<span id="_CPPv228harp_product_remove_variableP12harp_productP13harp_variable"></span><span id="harp_product_remove_variable__harp_productP.harp_variableP"></span><span class="target" id="group__harp__product_1ga88c38cc628718f06065e9160bf735057"></span>int <code class="descname">harp_product_remove_variable</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Remove a variable from a product. This function removes the specified variable from the product and then deletes the variable itself. <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">product</span></code>: Product from which the variable should be removed. </li>
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable that should be removed. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv336harp_product_remove_variable_by_nameP12harp_productPKc">
<span id="_CPPv236harp_product_remove_variable_by_nameP12harp_productPKc"></span><span id="harp_product_remove_variable_by_name__harp_productP.cCP"></span><span class="target" id="group__harp__product_1ga592399cec1ab4a611a620fc788a9c84d"></span>int <code class="descname">harp_product_remove_variable_by_name</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>name</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Remove a variable from a product using the name of the variable. This function removes the variable with the specified name from the product and then deletes the variable itself. <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">product</span></code>: Product from which the variable should be removed. </li>
<li><code class="docutils literal notranslate"><span class="pre">name</span></code>: Name of the variable that should be removed. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv329harp_product_replace_variableP12harp_productP13harp_variable">
<span id="_CPPv229harp_product_replace_variableP12harp_productP13harp_variable"></span><span id="harp_product_replace_variable__harp_productP.harp_variableP"></span><span class="target" id="group__harp__product_1ga29283b1d2a2042fb164ade0b8b5be9e7"></span>int <code class="descname">harp_product_replace_variable</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Replaces an existing variable with the one provided. The product should already contain a variable with the same name as <em>variable</em>. This function searches in the list of variables in the product for one with the same name, removes this variable and then adds the given <em>variable</em> in its place. Note that if you try to replace a variable with itself the function does nothing (and returns success). <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">product</span></code>: Product in which the variable should be replaced. </li>
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Variable that should be used to replace an existing variable. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv325harp_product_has_variablePK12harp_productPKc">
<span id="_CPPv225harp_product_has_variablePK12harp_productPKc"></span><span id="harp_product_has_variable__harp_productCP.cCP"></span><span class="target" id="group__harp__product_1ga38ab016c406bcb69f3286b1285bf9f82"></span>int <code class="descname">harp_product_has_variable</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>name</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Test if product contains a variable with the specified name. <dl class="docutils">
<dt><strong>Return</strong></dt>
<dd><ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">0</span></code>, Product does not contain a variable of the specified name. </li>
<li><code class="docutils literal notranslate"><span class="pre">1</span></code>, Product contains a variable of the specified name. </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">product</span></code>: Product to search. </li>
<li><code class="docutils literal notranslate"><span class="pre">name</span></code>: Name of the variable to search for. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv333harp_product_get_variable_by_namePK12harp_productPKcPP13harp_variable">
<span id="_CPPv233harp_product_get_variable_by_namePK12harp_productPKcPP13harp_variable"></span><span id="harp_product_get_variable_by_name__harp_productCP.cCP.harp_variablePP"></span><span class="target" id="group__harp__product_1gab79f5cc57e53ecc01e2b83debd423446"></span>int <code class="descname">harp_product_get_variable_by_name</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>name</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> **<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Find variable with a given name for a product. If no variable with the given name can be found an error is returned. <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">product</span></code>: Product in which to find the variable. </li>
<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">variable</span></code>: Pointer to the C variable where the found HARP variable will be stored. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv339harp_product_get_variable_index_by_namePK12harp_productPKcPi">
<span id="_CPPv239harp_product_get_variable_index_by_namePK12harp_productPKcPi"></span><span id="harp_product_get_variable_index_by_name__harp_productCP.cCP.iP"></span><span class="target" id="group__harp__product_1ga954f21b21958d1f316b83d60a8816d4e"></span>int <code class="descname">harp_product_get_variable_index_by_name</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>name</em>, int *<em>index</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Find index of variable with a given name for a product. If no variable with the given name can be found an error is returned. <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">product</span></code>: Product in which the find the variable. </li>
<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">index</span></code>: Pointer to the C variable where the index in the HARP variables list for the product is returned. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv321harp_product_is_emptyPK12harp_product">
<span id="_CPPv221harp_product_is_emptyPK12harp_product"></span><span id="harp_product_is_empty__harp_productCP"></span><span class="target" id="group__harp__product_1ga49f593a4807148aebdea48acc9b8e6af"></span>int <code class="descname">harp_product_is_empty</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Determine whether all variables in a product have at least one element. If at least one variable has 0 elements or if the product has 0 variables the function returns 1, and 0 otherwise. <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 product does not contain empty data. </li>
<li><code class="docutils literal notranslate"><span class="pre">1</span></code>, The product contains 0 variables or at least one variable has 0 elements. </li>
</ul>
</dd>
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal notranslate"><span class="pre">product</span></code>: Product to check for empty data. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv327harp_product_update_historyP12harp_productPKciA_Pc">
<span id="_CPPv227harp_product_update_historyP12harp_productPKciA_Pc"></span><span id="harp_product_update_history__harp_productP.cCP.i.cPA"></span><span class="target" id="group__harp__product_1ga6e574e19c463cf244b60cc4d25710195"></span>int <code class="descname">harp_product_update_history</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>executable</em>, int <em>argc</em>, char *<em>argv</em>[]<span class="sig-paren">)</span><br /></dt>
<dd><p>Update the history attribute in the product based on the command line parameters. This function will extend the existing product history metadata element with a line containing the current UTC time, the HARP version, and the call that was used to run this program. The command line execution call is constructed based on the <em>argc</em> and <em>argv</em> arguments. The format of the added line is: YYYY-MM-DDThh:mm:ssZ [harp-x.y] args …. <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">product</span></code>: Product for which the history metada should be extended. </li>
<li><code class="docutils literal notranslate"><span class="pre">executable</span></code>: Name of the command line executable (this value is used instead of argv[0]). </li>
<li><code class="docutils literal notranslate"><span class="pre">argc</span></code>: Variable as passed by main(). </li>
<li><code class="docutils literal notranslate"><span class="pre">argv</span></code>: Variable as passed by main(). </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv319harp_product_verifyPK12harp_product">
<span id="_CPPv219harp_product_verifyPK12harp_product"></span><span id="harp_product_verify__harp_productCP"></span><span class="target" id="group__harp__product_1ga84b6effef3e96d88fa623d14015112df"></span>int <code class="descname">harp_product_verify</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Verify that a product 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>, Product 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">product</span></code>: Product to verify. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv318harp_product_printPK12harp_productiiPFiPKczE">
<span id="_CPPv218harp_product_printPK12harp_productiiPFiPKczE"></span><span class="target" id="group__harp__product_1gaa19c7763369e3ab99129c7beb6bbedad"></span>void <code class="descname">harp_product_print</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, int <em>show_attributes</em>, int <em>show_data</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_product 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">product</span></code>: Product to print. </li>
<li><code class="docutils literal notranslate"><span class="pre">show_attributes</span></code>: Whether or not to print the attributes of variables. </li>
<li><code class="docutils literal notranslate"><span class="pre">show_data</span></code>: Whether or not to print the data arrays of the variables </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="_CPPv330harp_product_flatten_dimensionP12harp_product19harp_dimension_type">
<span id="_CPPv230harp_product_flatten_dimensionP12harp_product19harp_dimension_type"></span><span id="harp_product_flatten_dimension__harp_productP.harp_dimension_type"></span><span class="target" id="group__harp__product_1gaf70331b5522250534866484c23b78500"></span>int <code class="descname">harp_product_flatten_dimension</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</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>Collapse a given dimension into the time dimension</p>
<p>Flattening a product for a certain dimension collapses the dimension into the time dimension (i.e. the time dimension and the provided dimension are flattened together). For instance, if a product contains a variable with [num_time,num_longitude,num_latitudes,num_vertical] as dimensions, then flattening for the vertical dimension will result in a variable with [num_time*num_vertical,num_longitudes,num_latitudes] as dimensions.</p>
<p>The end result of this function is that the time dimension will have grown by a factor equal to the length of the given dimension type and that none of the variables in the product will depend on the given dimension type anymore.</p>
<p>Independent dimensions and the time dimension cannot be flattened. In the special case that the length of the flattened dimension equals 1, the dimension is just removed for all variables.</p>
<p>If the dimension length does not equal 1 then the following applies:<ul class="simple">
<li>any variables that depend more than once on the given dimension type will be removed from the product,</li>
<li>the index and collocation_index variables will be removed if present, and</li>
<li>variables that had the given dimension type but were time independent are first made time dependent</li>
</ul>
</p>
<p><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">product</span></code>: HARP product. </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension_type</span></code>: Dimension to use for the flattening. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv317harp_product_sortP12harp_productiPPKc">
<span id="_CPPv217harp_product_sortP12harp_productiPPKc"></span><span id="harp_product_sort__harp_productP.i.cCPP"></span><span class="target" id="group__harp__product_1gaa8c8de3f047d36f74579b9d8e5decb50"></span>int <code class="descname">harp_product_sort</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, int <em>num_variables</em>, <em class="property">const</em> char **<em>variable_name</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Reorder a dimension for all variables in a product such that the variables with the given names ends up sorted.</p>
<p>Variables for the provided variable_name list should exist in the product and the variables should be one dimensional variables, all using the same dimension. The dimension that will be reordered is this single dimension of the referenced variables.</p>
<p>Only up to eight variables can be used for sorting.</p>
<p><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">product</span></code>: HARP product </li>
<li><code class="docutils literal notranslate"><span class="pre">num_variables</span></code>: Number of variables to use for sorting (1 &lt;= num_variables &lt;= 8) </li>
<li><code class="docutils literal notranslate"><span class="pre">variable_name</span></code>: Names of the variables to use for sorting </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv331harp_product_execute_operationsP12harp_productPKc">
<span id="_CPPv231harp_product_execute_operationsP12harp_productPKc"></span><span id="harp_product_execute_operations__harp_productP.cCP"></span><span class="target" id="group__harp__product_1gaac9e4b48ca9a060f53c1e2bb4f44d840"></span>int <code class="descname">harp_product_execute_operations</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>operations</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Execute one or more operations on a product.</p>
<p>if one of the operations results in an empty product then the function will immediately return with the empty product (and return code 0) and will not execute any of the remaining actions anymore. <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">product</span></code>: Product that the operations should be executed on. </li>
<li><code class="docutils literal notranslate"><span class="pre">operations</span></code>: Operations to execute; should be specified as a semi-colon separated string of operations. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv338harp_product_regrid_with_axis_variableP12harp_productP13harp_variableP13harp_variable">
<span id="_CPPv238harp_product_regrid_with_axis_variableP12harp_productP13harp_variableP13harp_variable"></span><span id="harp_product_regrid_with_axis_variable__harp_productP.harp_variableP.harp_variableP"></span><span class="target" id="group__harp__product_1ga07a808c69fa7972af739aad407860ee1"></span>int <code class="descname">harp_product_regrid_with_axis_variable</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>target_grid</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>target_bounds</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Resample all variables in product against a specified grid. The target grid variable should be an axis variable containing the target grid (as ‘double’ values). It should be a one-dimensional variable (for a time independent grid or when regridding in the time dimension) or a two-dimensional variable (for a time dependent grid when not regridding in the time dimension). The dimension to use for regridding is based on the type of the last dimenion of the target grid variable. This function cannot be used to regrid an independent dimension.</p>
<p>If the target grid variable is two dimensional then its time dimension should match that of the product.</p>
<p>For each variable in the product a dimension-specific rule based on the variable name will determine how to regrid the variable (point/interval interpolation). If interval interpolation is needed for one of the variables then target boundaries are needed. These can be provided using the optional target_bounds parameter. If this parameter is not provided, the boundaries will be calculated automatically from the target grid (by inter/extrapolating intervals from mid-points).</p>
<p>The source grid (and bounds) are determined by performing a variable derivation on the product (using the variable name of the target_grid variable).</p>
<p><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">product</span></code>: Product to resample. </li>
<li><code class="docutils literal notranslate"><span class="pre">target_grid</span></code>: Target grid variable. </li>
<li><code class="docutils literal notranslate"><span class="pre">target_bounds</span></code>: Target grid boundaries variable (optional).</li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv343harp_product_regrid_with_collocated_productP12harp_product19harp_dimension_typePKcPKcPK12harp_product">
<span id="_CPPv243harp_product_regrid_with_collocated_productP12harp_product19harp_dimension_typePKcPKcPK12harp_product"></span><span id="harp_product_regrid_with_collocated_product__harp_productP.harp_dimension_type.cCP.cCP.harp_productCP"></span><span class="target" id="group__harp__product_1ga57f043de9059d94f7a4060789f780364"></span>int <code class="descname">harp_product_regrid_with_collocated_product</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</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> char *<em>axis_name</em>, <em class="property">const</em> char *<em>axis_unit</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>collocated_product</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Regrid the product’s variables to the target grid of the collocated product.</p>
<p>This function cannot be used to regrid the time dimension (or an independent dimension).</p>
<p>Both the product and the collocated product need to have <code class="docutils literal notranslate"><span class="pre">collocation_index</span></code> variables. These collocation indices will be used to determine the matching pairs. For each <code class="docutils literal notranslate"><span class="pre">collocation_index</span></code> value in <em>product</em> there needs to be a matching value in the <code class="docutils literal notranslate"><span class="pre">collocation_index</span></code> variable of <em>collocated_product</em> (but the reverse does not have to be true).</p>
<p><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">product</span></code>: Product to regrid. </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension_type</span></code>: Type of dimension that should be regridded. </li>
<li><code class="docutils literal notranslate"><span class="pre">axis_name</span></code>: The name of the variable to use as target grid. </li>
<li><code class="docutils literal notranslate"><span class="pre">axis_unit</span></code>: The unit in which the vertical_axis will be brought for the regridding. </li>
<li><code class="docutils literal notranslate"><span class="pre">collocated_product</span></code>: The product containing the collocated measurements and the target grid for the regridding.</li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv343harp_product_regrid_with_collocated_datasetP12harp_product19harp_dimension_typePKcPKcP23harp_collocation_result">
<span id="_CPPv243harp_product_regrid_with_collocated_datasetP12harp_product19harp_dimension_typePKcPKcP23harp_collocation_result"></span><span id="harp_product_regrid_with_collocated_dataset__harp_productP.harp_dimension_type.cCP.cCP.harp_collocation_resultP"></span><span class="target" id="group__harp__product_1ga47c35b04d92f993a62d9911619fe0ea9"></span>int <code class="descname">harp_product_regrid_with_collocated_dataset</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</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> char *<em>axis_name</em>, <em class="property">const</em> char *<em>axis_unit</em>, <a class="reference internal" href="libharp_collocation.html#_CPPv323harp_collocation_result" title="harp_collocation_result">harp_collocation_result</a> *<em>collocation_result</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Regrid the product’s variables (from dataset a in the collocation result) to the target grid of collocated products in dataset b.</p>
<p>This function cannot be used to regrid the time dimension (or an independent dimension).</p>
<p><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">product</span></code>: Product to regrid. </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension_type</span></code>: Type of dimension that should be regridded. </li>
<li><code class="docutils literal notranslate"><span class="pre">axis_name</span></code>: The name of the variable to use as target grid. </li>
<li><code class="docutils literal notranslate"><span class="pre">axis_unit</span></code>: The unit in which the vertical_axis will be brought for the regridding. </li>
<li><code class="docutils literal notranslate"><span class="pre">collocation_result</span></code>: The collocation result used to find matching variables. The collocation result is assumed to have the appropriate metadata available for all matches (dataset b).</li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv352harp_product_smooth_vertical_with_collocated_productP12harp_productiPPKcPKcPKcPK12harp_product">
<span id="_CPPv252harp_product_smooth_vertical_with_collocated_productP12harp_productiPPKcPKcPKcPK12harp_product"></span><span id="harp_product_smooth_vertical_with_collocated_product__harp_productP.i.cCPP.cCP.cCP.harp_productCP"></span><span class="target" id="group__harp__product_1ga2783850e720160c503036b6f66fbdf3d"></span>int <code class="descname">harp_product_smooth_vertical_with_collocated_product</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, int <em>num_smooth_variables</em>, <em class="property">const</em> char **<em>smooth_variables</em>, <em class="property">const</em> char *<em>vertical_axis</em>, <em class="property">const</em> char *<em>vertical_unit</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>collocated_product</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Smooth the product’s variables using the vertical grids, avks and a apriori of the collocated product.</p>
<p>The product is first fully regridded (using the vertical dimension) to the vertical grid of the averaging kernel (and apriori). Then, the given list of variables is smoothed using the list of AVKs and apriori variables.</p>
<p><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">product</span></code>: Product to smooth. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_smooth_variables</span></code>: length of smooth_variables. </li>
<li><code class="docutils literal notranslate"><span class="pre">smooth_variables</span></code>: The names of the variables to smooth. </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_axis</span></code>: The name of the variable to use as a vertical axis (pressure/altitude/etc). </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_unit</span></code>: The unit in which the vertical_axis will be brought for the regridding. </li>
<li><code class="docutils literal notranslate"><span class="pre">collocated_product</span></code>: The product containing the collocated measurements and the averaging kernel and a-priori.</li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv352harp_product_smooth_vertical_with_collocated_datasetP12harp_productiPPKcPKcPKcPK23harp_collocation_result">
<span id="_CPPv252harp_product_smooth_vertical_with_collocated_datasetP12harp_productiPPKcPKcPKcPK23harp_collocation_result"></span><span id="harp_product_smooth_vertical_with_collocated_dataset__harp_productP.i.cCPP.cCP.cCP.harp_collocation_resultCP"></span><span class="target" id="group__harp__product_1ga615f50993415eea52aea0ef0f1743374"></span>int <code class="descname">harp_product_smooth_vertical_with_collocated_dataset</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, int <em>num_smooth_variables</em>, <em class="property">const</em> char **<em>smooth_variables</em>, <em class="property">const</em> char *<em>vertical_axis</em>, <em class="property">const</em> char *<em>vertical_unit</em>, <em class="property">const</em> <a class="reference internal" href="libharp_collocation.html#_CPPv323harp_collocation_result" title="harp_collocation_result">harp_collocation_result</a> *<em>collocation_result</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Smooth the product’s variables (from dataset a in the collocation result) using the vertical grids, avks and a apriori of collocated products in dataset b.</p>
<p>The product is first fully regridded (using the vertical dimension) to the vertical grid of the averaging kernel (and apriori). Then, the given list of variables is smoothed using the list of AVKs and apriori variables.</p>
<p><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">product</span></code>: Product to smooth. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_smooth_variables</span></code>: length of smooth_variables. </li>
<li><code class="docutils literal notranslate"><span class="pre">smooth_variables</span></code>: The names of the variables to smooth. </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_axis</span></code>: The name of the variable to use as a vertical axis (pressure/altitude/etc). </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_unit</span></code>: The unit in which the vertical_axis will be brought for the regridding. </li>
<li><code class="docutils literal notranslate"><span class="pre">collocation_result</span></code>: The collocation result used to locate the matching vertical grids/avks/apriori. The collocation result is assumed to have the appropriate metadata available for all matches (dataset b).</li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv332harp_product_get_smoothed_columnP12harp_productPKcPKcP13harp_variableP13harp_variableP13harp_variableP13harp_variablePP13harp_variable">
<span id="_CPPv232harp_product_get_smoothed_columnP12harp_productPKcPKcP13harp_variableP13harp_variableP13harp_variableP13harp_variablePP13harp_variable"></span><span id="harp_product_get_smoothed_column__harp_productP.cCP.cCP.harp_variableP.harp_variableP.harp_variableP.harp_variableP.harp_variablePP"></span><span class="target" id="group__harp__product_1ga63186eb4d5508d85d8f2d332245871f1"></span>int <code class="descname">harp_product_get_smoothed_column</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>name</em>, <em class="property">const</em> char *<em>unit</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>vertical_grid</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>vertical_bounds</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>column_avk</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> *<em>apriori</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> **<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Derive vertical column smoothed with column averaging kernel and optional a-priori First a partial column profile will be derived from the product. This partial column profile will be regridded to the column averaging kernel grid. The regridded column profile will then be combined with the column averaging kernel and optional apriori profile to create an integrated smoothed vertical column. 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">product</span></code>: Product from which to derive a smoothed integrated vertical column. </li>
<li><code class="docutils literal notranslate"><span class="pre">name</span></code>: Name of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">unit</span></code>: Unit (optional) of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_grid</span></code>: Variable containing the vertical grid of the column avk. </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_bounds</span></code>: Variable containing the grid boundaries of the column avk (optional). </li>
<li><code class="docutils literal notranslate"><span class="pre">column_avk</span></code>: Column averaging kernel variable. </li>
<li><code class="docutils literal notranslate"><span class="pre">apriori</span></code>: Apriori profile (optional). </li>
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Pointer to the C variable where the derived HARP variable will be stored.</li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv357harp_product_get_smoothed_column_using_collocated_productP12harp_productPKcPKciPK19harp_dimension_typePKcPKcPK12harp_productPP13harp_variable">
<span id="_CPPv257harp_product_get_smoothed_column_using_collocated_productP12harp_productPKcPKciPK19harp_dimension_typePKcPKcPK12harp_productPP13harp_variable"></span><span id="harp_product_get_smoothed_column_using_collocated_product__harp_productP.cCP.cCP.i.harp_dimension_typeCP.cCP.cCP.harp_productCP.harp_variablePP"></span><span class="target" id="group__harp__product_1gac2af6aea04439393cfdea79dcb5b528b"></span>int <code class="descname">harp_product_get_smoothed_column_using_collocated_product</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>name</em>, <em class="property">const</em> char *<em>unit</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> char *<em>vertical_axis</em>, <em class="property">const</em> char *<em>vertical_unit</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>collocated_product</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> **<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Derive a vertical column smoothed with column averaging kernel and a-priori from the collocated product</p>
<p><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">product</span></code>: Product to regrid. </li>
<li><code class="docutils literal notranslate"><span class="pre">name</span></code>: Name of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">unit</span></code>: Unit (optional) of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_dimensions</span></code>: Number of dimensions of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension_type</span></code>: Type of dimension for each of the dimensions of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_axis</span></code>: The name of the variable to use as a vertical axis (pressure/altitude/etc). </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_unit</span></code>: The unit in which the vertical_axis will be brought for the regridding. </li>
<li><code class="docutils literal notranslate"><span class="pre">collocated_product</span></code>: The product containing the collocated measurements and the averaging kernel and a-priori. </li>
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Pointer to the C variable where the derived HARP variable will be stored.</li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv357harp_product_get_smoothed_column_using_collocated_datasetP12harp_productPKcPKciPK19harp_dimension_typePKcPKcPK23harp_collocation_resultPP13harp_variable">
<span id="_CPPv257harp_product_get_smoothed_column_using_collocated_datasetP12harp_productPKcPKciPK19harp_dimension_typePKcPKcPK23harp_collocation_resultPP13harp_variable"></span><span id="harp_product_get_smoothed_column_using_collocated_dataset__harp_productP.cCP.cCP.i.harp_dimension_typeCP.cCP.cCP.harp_collocation_resultCP.harp_variablePP"></span><span class="target" id="group__harp__product_1gaa1910631a41729975dffe7a2dda8aa33"></span>int <code class="descname">harp_product_get_smoothed_column_using_collocated_dataset</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em>, <em class="property">const</em> char *<em>name</em>, <em class="property">const</em> char *<em>unit</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> char *<em>vertical_axis</em>, <em class="property">const</em> char *<em>vertical_unit</em>, <em class="property">const</em> <a class="reference internal" href="libharp_collocation.html#_CPPv323harp_collocation_result" title="harp_collocation_result">harp_collocation_result</a> *<em>collocation_result</em>, <a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> **<em>variable</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Derive a vertical column smoothed with column averaging kernel and a-priori from collocated products in dataset b</p>
<p><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">product</span></code>: Product to regrid. </li>
<li><code class="docutils literal notranslate"><span class="pre">name</span></code>: Name of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">unit</span></code>: Unit (optional) of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">num_dimensions</span></code>: Number of dimensions of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">dimension_type</span></code>: Type of dimension for each of the dimensions of the variable that should be created. </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_axis</span></code>: The name of the variable to use as a vertical axis (pressure/altitude/etc). </li>
<li><code class="docutils literal notranslate"><span class="pre">vertical_unit</span></code>: The unit in which the vertical_axis will be brought for the regridding. </li>
<li><code class="docutils literal notranslate"><span class="pre">collocation_result</span></code>: The collocation result used to find matching variables. The collocation result is assumed to have the appropriate metadata available for all matches (dataset b). </li>
<li><code class="docutils literal notranslate"><span class="pre">variable</span></code>: Pointer to the C variable where the derived HARP variable will be stored.</li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv311harp_importPKcPKcPKcPP12harp_product">
<span id="_CPPv211harp_importPKcPKcPKcPP12harp_product"></span><span id="harp_import__cCP.cCP.cCP.harp_productPP"></span><span class="target" id="group__harp__product_1gad34fd0e7ec4e7f9e7f796aa7344f4b24"></span>int <code class="descname">harp_import</code><span class="sig-paren">(</span><em class="property">const</em> char *<em>filename</em>, <em class="property">const</em> char *<em>operations</em>, <em class="property">const</em> char *<em>options</em>, <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> **<em>product</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Import a product from a file.</p>
<p>This will first try to import the file as an HDF4, HDF5, or netCDF file that complies to the HARP Data Format. If the file is not stored using the HARP format then it will try to import it using one of the available ingestion modules. The <em>options</em> parameter is optional (can be NULL) and describes the ingestion options. The parameter is only applicable if the file is not already using the HARP format and needs to be converted using one of the ingestion modules. The <em>operations</em> parameter is optional (can be NULL) and provides the list of operations that will be performed as part of the import. Some operations, such as filters, can already be performed as part of an import and this may thus be faster than using a <a class="reference internal" href="#group__harp__product_1gaac9e4b48ca9a060f53c1e2bb4f44d840"><span class="std std-ref">harp_product_execute_operations()</span></a> after a full import of the product. <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">filename</span></code>: Path to the file that is to be imported. </li>
<li><code class="docutils literal notranslate"><span class="pre">operations</span></code>: string (optional) containing actions to apply as part of the import; should be specified as a semi-colon separated string of operations. </li>
<li><code class="docutils literal notranslate"><span class="pre">options</span></code>: Ingestion module specific options (optional); should be specified as a semi-colon separated string of key=value pair; only used if the file is not in HARP format. </li>
<li><code class="docutils literal notranslate"><span class="pre">product</span></code>: Pointer to a location where a pointer to the ingested product will be stored. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv316harp_import_testPKcPFiPKczE">
<span id="_CPPv216harp_import_testPKcPFiPKczE"></span><span class="target" id="group__harp__product_1ga0b4ebfc36043501d174e6c5176698274"></span>int <code class="descname">harp_import_test</code><span class="sig-paren">(</span><em class="property">const</em> char *<em>filename</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>Test import of a product.</p>
<p>If the product is a HARP product then verify that the product is a HARP compliant netCDF/HDF4/HDF5 product. Otherwise, try to import the product using an applicable ingestion module and test the ingestion for all possible ingestion options. Results are printed using the provided <em>print</em> function. The <em>print</em> function parameter should be a function that resembles printf(). <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>, Import failed (error is already printed, <a class="reference internal" href="libharp_error.html#group__harp__error_1gab2eeb46528306c6799632d1e800c4c36"><span class="std std-ref">harp_errno</span></a> should be ignored). </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">filename</span></code>: Filename of the product to import. </li>
<li><code class="docutils literal notranslate"><span class="pre">print</span></code>: Reference to a printf compatible function. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv328harp_import_product_metadataPKcPKcPP21harp_product_metadata">
<span id="_CPPv228harp_import_product_metadataPKcPKcPP21harp_product_metadata"></span><span id="harp_import_product_metadata__cCP.cCP.harp_product_metadataPP"></span><span class="target" id="group__harp__product_1ga596533e3a82733332a90f6b1850f21f3"></span>int <code class="descname">harp_import_product_metadata</code><span class="sig-paren">(</span><em class="property">const</em> char *<em>filename</em>, <em class="property">const</em> char *<em>options</em>, <a class="reference internal" href="libharp_product_metadata.html#_CPPv321harp_product_metadata" title="harp_product_metadata">harp_product_metadata</a> **<em>new_metadata</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Retrieve global attributes from a product file.</p>
<p>This function retrieves the product metadata without performing a full import. <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">filename</span></code>: Path to the file for which to retrieve global attributes. </li>
<li><code class="docutils literal notranslate"><span class="pre">options</span></code>: Ingestion module specific options (optional); should be specified as a semi-colon separated string of key=value pair; only used if the file is not in HARP format. </li>
<li><code class="docutils literal notranslate"><span class="pre">new_metadata</span></code>: Pointer to the variable where the metadata should be stored. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv311harp_exportPKcPKcPK12harp_product">
<span id="_CPPv211harp_exportPKcPKcPK12harp_product"></span><span id="harp_export__cCP.cCP.harp_productCP"></span><span class="target" id="group__harp__product_1ga4baa27278b9ed26482b7dde2d0b390b4"></span>int <code class="descname">harp_export</code><span class="sig-paren">(</span><em class="property">const</em> char *<em>filename</em>, <em class="property">const</em> char *<em>export_format</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv312harp_product" title="harp_product">harp_product</a> *<em>product</em><span class="sig-paren">)</span><br /></dt>
<dd><p>Export HARP product to a file.</p>
<p>Export product to an HDF4, HDF5, or netCDF file that complies to the HARP Data Format. <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">filename</span></code>: Path to the file to which the product is to be exported. </li>
<li><code class="docutils literal notranslate"><span class="pre">export_format</span></code>: Either “hdf4”, “hdf5”, or “netcdf”. </li>
<li><code class="docutils literal notranslate"><span class="pre">product</span></code>: Product that should be exported to file. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

</div>
<dl class="class">
<dt id="_CPPv319harp_product_struct">
<span id="_CPPv219harp_product_struct"></span><span id="harp_product_struct"></span><span class="target" id="structharp__product__struct"></span><em class="property">struct </em><code class="descname">harp_product_struct</code><br /></dt>
<dd><em>#include &lt;harp.h&gt;</em><p>HARP Product struct </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric">Public Members</p>
<dl class="member">
<dt id="_CPPv39dimension">
<span id="_CPPv29dimension"></span><span id="dimension__lA"></span><span class="target" id="structharp__product__struct_1a2b479dd242dcc077c95ebb3736cf594a"></span>long <code class="descname">dimension</code>[<code class="descname">HARP_NUM_DIM_TYPES</code>]<br /></dt>
<dd><p>length of each dimension (0 for unused dimensions) </p>
</dd></dl>

<dl class="member">
<dt id="_CPPv313num_variables">
<span id="_CPPv213num_variables"></span><span id="num_variables__i"></span><span class="target" id="structharp__product__struct_1a2ba7d62da65ff95eae9aa4c64e05fe5d"></span>int <code class="descname">num_variables</code><br /></dt>
<dd><p>number of variables in this product </p>
</dd></dl>

<dl class="member">
<dt id="_CPPv38variable">
<span id="_CPPv28variable"></span><span id="variable__harp_variablePP"></span><span class="target" id="structharp__product__struct_1a1f5ae397c76bc98f5b3d0a8f83df2bef"></span><a class="reference internal" href="libharp_variable.html#_CPPv313harp_variable" title="harp_variable">harp_variable</a> **<code class="descname">variable</code><br /></dt>
<dd><p>pointers to the variables </p>
</dd></dl>

<dl class="member">
<dt id="_CPPv314source_product">
<span id="_CPPv214source_product"></span><span id="source_product__cP"></span><span class="target" id="structharp__product__struct_1ac4188bb9f4fc3b0a70418ba4f67ff8dd"></span>char *<code class="descname">source_product</code><br /></dt>
<dd><p>identifier of the product the HARP product originates from </p>
</dd></dl>

<dl class="member">
<dt id="_CPPv37history">
<span id="_CPPv27history"></span><span id="history__cP"></span><span class="target" id="structharp__product__struct_1a20a905e5529c6aa145a1eadfb556903b"></span>char *<code class="descname">history</code><br /></dt>
<dd><p>value for the ‘history’ global attribute </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="libharp_product_metadata.html" class="btn btn-neutral float-right" title="Product Metadata" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="libharp_geometry.html" class="btn btn-neutral" title="Geometry" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2015-2020 S[&amp;]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>