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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>HDF5: Use Case: Examining a JPSS NPP File With HDF5 Tools</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="hdf5doxy.css" rel="stylesheet" type="text/css">
<!-- <link href="hdf5doxy.css" rel="stylesheet" type="text/css"/>
-->
<script type="text/javascript" src="hdf5_navtree_hacks.js"></script>
</head>
<body>
<div style="background:#FFDDDD;font-size:120%;text-align:center;margin:0;padding:5px">Please, help us to better serve our user community by answering the following short survey: <a href="https://www.hdfgroup.org/website-survey/">https://www.hdfgroup.org/website-survey/</a></div>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="HDFG-logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname"><a href="https://www.hdfgroup.org">HDF5</a>
 <span id="projectnumber">1.15.0.c4a146e</span>
</div>
<div id="projectbrief">API Reference</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.svg"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_view_tools_j_p_s_s.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="PageDoc"><div class="header">
<div class="headertitle">
<div class="title">Use Case: Examining a JPSS NPP File With HDF5 Tools </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Navigate back: <a class="el" href="index.html">Main</a> / <a class="el" href="_getting_started.html">Getting Started with HDF5</a> / <a class="el" href="_view_tools_command.html">Command-line Tools</a> </p><hr />
<h1><a class="anchor" id="secViewToolsJPSSTOC"></a>
Contents</h1>
<ul>
<li>
<a class="el" href="_view_tools_j_p_s_s.html#secViewToolsJPSSDeter">Determining File Contents</a> </li>
<li>
<a class="el" href="_view_tools_j_p_s_s.html#secViewToolsJPSSView">Viewing the User Block</a> </li>
<li>
<a class="el" href="_view_tools_j_p_s_s.html#secViewToolsJPSSExam">Examining a Granule</a> </li>
</ul>
<p>This tutorial illustrates how to use the HDF5 tools to examine NPP files from the JPSS project. The following files are discussed: </p><div class="fragment"><div class="line">SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5 (<a href=<span class="stringliteral">"https://support.hdfgroup.org/ftp/HDF5/examples/files/tutorial/SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5.gz"</span>>gzipped file</a>)</div>
<div class="line">SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5 (<a href=<span class="stringliteral">"https://support.hdfgroup.org/ftp/HDF5/examples/files/tutorial/SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5.gz"</span>>gzipped file</a>)</div>
</div><!-- fragment --><h1><a class="anchor" id="secViewToolsJPSSDeter"></a>
Determining File Contents</h1>
<p>The first thing you may want to do is determine what is in your file. You can use the command-line tools or HDFView to do this: </p><ul>
<li><a class="el" href="_view_tools_j_p_s_s.html#subsecViewToolsJPSSDeter_h5dump">h5dump</a> </li>
<li><a class="el" href="_view_tools_j_p_s_s.html#subsecViewToolsJPSSDeter_h5ls">h5ls</a> </li>
<li><a class="el" href="_view_tools_j_p_s_s.html#subsecViewToolsJPSSDeter_HDFView">HDFView</a></li>
</ul>
<p>JPSS NPP files all contain two root level groups: </p><table class="doxtable">
<tr>
<th>Group</th><th>Description </th></tr>
<tr>
<td>/All_Data </td><td>Contains the raw data and optional geo-location information. </td></tr>
<tr>
<td>/Data_Products </td><td>Contains a dataset ending in <code style="background-color:whitesmoke;">Aggr</code> with references to objects in the <code style="background-color:whitesmoke;">/All_Data</code> group. Contains granules (datasets with a name ending in <code style="background-color:whitesmoke;">Gran_#</code>) with references to selected regions in datasets under <code style="background-color:whitesmoke;">/All_Data</code>. </td></tr>
</table>
<h2><a class="anchor" id="subsecViewToolsJPSSDeter_h5dump"></a>
h5dump</h2>
<p>With <code style="background-color:whitesmoke;">h5dump</code> you can see a list of the objects in the file using the <code style="background-color:whitesmoke;">-n</code> option: </p><div class="fragment"><div class="line">h5dump -n <file></div>
</div><!-- fragment --><p>For example: </p><div class="fragment"><div class="line">$ h5dump -n SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5</div>
<div class="line">HDF5 <span class="stringliteral">"SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5"</span> {</div>
<div class="line">FILE_CONTENTS {</div>
<div class="line"> group /</div>
<div class="line"> group /All_Data</div>
<div class="line"> group /All_Data/VIIRS-M9-SDR_All</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/ModeGran</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/ModeScan</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/NumberOfBadChecksums</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/NumberOfDiscardedPkts</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/NumberOfMissingPkts</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/NumberOfScans</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/PadByte1</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/QF1_VIIRSMBANDSDR</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/QF2_SCAN_SDR</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/QF3_SCAN_RDR</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/QF4_SCAN_SDR</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/QF5_GRAN_BADDETECTOR</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/Radiance</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/RadianceFactors</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/Reflectance</div>
<div class="line"> dataset /All_Data/VIIRS-M9-SDR_All/ReflectanceFactors</div>
<div class="line"> group /Data_Products</div>
<div class="line"> group /Data_Products/VIIRS-M9-SDR</div>
<div class="line"> dataset /Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Aggr</div>
<div class="line"> dataset /Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_0</div>
<div class="line"> dataset /Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_1</div>
<div class="line"> dataset /Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_2</div>
<div class="line"> dataset /Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_3</div>
<div class="line"> }</div>
<div class="line">}</div>
</div><!-- fragment --><p>In the output above you can see that there are four granules (ending in <code style="background-color:whitesmoke;">Gran_#</code>) in the <code style="background-color:whitesmoke;">/Data_Products/VIIRS-M9-SDR/</code> group.</p>
<h2><a class="anchor" id="subsecViewToolsJPSSDeter_h5ls"></a>
h5ls</h2>
<p>With <code style="background-color:whitesmoke;">h5ls</code> you can see a list of the objects in the file using the <code style="background-color:whitesmoke;">-lr</code> options. The <code style="background-color:whitesmoke;">h5ls</code> utility also shows shape and size (dataspace) information about datasets. </p><div class="fragment"><div class="line">h5ls -lr <file></div>
</div><!-- fragment --><p>For example: </p><div class="fragment"><div class="line">$ h5ls -lr SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5</div>
<div class="line">/ Group</div>
<div class="line">/All_Data Group</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All Group</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/ModeGran Dataset {4/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/ModeScan Dataset {192/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/NumberOfBadChecksums Dataset {192/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/NumberOfDiscardedPkts Dataset {192/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/NumberOfMissingPkts Dataset {192/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/NumberOfScans Dataset {4/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/PadByte1 Dataset {12/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/QF1_VIIRSMBANDSDR Dataset {3072/Inf, 3200/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/QF2_SCAN_SDR Dataset {192/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/QF3_SCAN_RDR Dataset {192/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/QF4_SCAN_SDR Dataset {3072/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/QF5_GRAN_BADDETECTOR Dataset {64/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/Radiance Dataset {3072/Inf, 3200/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/RadianceFactors Dataset {8/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/Reflectance Dataset {3072/Inf, 3200/Inf}</div>
<div class="line">/All_Data/VIIRS-M9-SDR_All/ReflectanceFactors Dataset {8/Inf}</div>
<div class="line">/Data_Products Group</div>
<div class="line">/Data_Products/VIIRS-M9-SDR Group</div>
<div class="line">/Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Aggr Dataset {16/Inf}</div>
<div class="line">/Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_0 Dataset {16/Inf}</div>
<div class="line">/Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_1 Dataset {16/Inf}</div>
<div class="line">/Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_2 Dataset {16/Inf}</div>
<div class="line">/Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_3 Dataset {16/Inf}</div>
</div><!-- fragment --><p> Note that the <code style="background-color:whitesmoke;">Inf</code> indicates that those datasets are appendable or unlimited in size.</p>
<h2><a class="anchor" id="subsecViewToolsJPSSDeter_HDFView"></a>
HDFView</h2>
<p>If you open the file in HDFView, it will display the file and the root level groups within it in the TreeView on the left. An HDF5 file is a folder with a "5" in the middle, followed by the file name. There are two folders (groups) within the JPSS file (<code style="background-color:whitesmoke;">All_Data/</code> and <code style="background-color:whitesmoke;">Data Products/</code>), which you can select to see their contents: </p><table class="doxtable">
<tr>
<td><div class="image">
<img src="hdfview-tree.png" alt=""/>
</div>
</td></tr>
</table>
<p>If you click twice with the left-mouse button on a folder or group in the TreeView, the contents of the folder will be listed. If you click twice on an object such as a dataset, a window with the object's values will be displayed.</p>
<p>Underneath the <code style="background-color:whitesmoke;">VIIRS-M1-SDR</code> folder are what HDF5 calls datasets. The scarlet letter <code style="background-color:whitesmoke;">"A"</code> attached to the group and datasets under <code style="background-color:whitesmoke;">Data_Products/</code> indicates that there are attributes associated with them.</p>
<h1><a class="anchor" id="secViewToolsJPSSView"></a>
Viewing the User Block</h1>
<p>All JPSS files contain a user block in XML with information about the file. The user block is an optional space allocated at the beginning of an HDF5 file that is not interpreted by the HDF5 library. Its size is a multiple of 512.</p>
<p>Since the user block in JPSS files is stored in ASCII and it is stored at the beginning of an HDF5 file, you could use a text editor or viewer to examine it. However, there are HDF5 utilities that can help with this: </p><table class="doxtable">
<tr>
<th>Utility</th><th>Description </th></tr>
<tr>
<td>h5unjam </td><td>Extracts a user block from an HDF5 file </td></tr>
<tr>
<td>h5dump </td><td>The -B (–superblock) option displays the size of the user block in an HDF5 file </td></tr>
</table>
<h2><a class="anchor" id="subsecViewToolsJPSSView_h5unjam"></a>
h5unjam</h2>
<p>The <a class="el" href="_view_tools_edit.html#secViewToolsEditAdd">Add or Remove User Block from File</a> tutorial topic discusses the use of the <code style="background-color:whitesmoke;">h5jam</code> and <code style="background-color:whitesmoke;">h5unjam</code> utilities for adding or removing a user block from a file. An input HDF5 file (<code style="background-color:whitesmoke;">-i</code>), output HDF5 file (<code style="background-color:whitesmoke;">-o</code>), and user block text file (<code style="background-color:whitesmoke;">-u</code>) can be specified with these tools. You can use the <code style="background-color:whitesmoke;">h5unjam</code> tool to extract and view the user block in a JPSS file: </p><div class="fragment"><div class="line">h5unjam -i <Input HDF5 File> -o <Output HDF5 File> -u <User Block File></div>
</div><!-- fragment --><p>For example this command will extract the user block into the file UB.xml: </p><div class="fragment"><div class="line">$ h5unjam -i SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5 </div>
<div class="line"> -o svm09-noUB.h5 -u UB.xml</div>
</div><!-- fragment --><p>The input HDF5 file remains unchanged. The output HDF5 file will not contain the user block. The <code style="background-color:whitesmoke;">UB.xml</code> file contains the user block which can be viewed with a browser.</p>
<h2><a class="anchor" id="subsecViewToolsJPSSView_h5dump"></a>
h5dump</h2>
<p>The h5dump utility has the <code style="background-color:whitesmoke;">-B (–superblock)</code> option for displaying the superblock in an HDF5 file. The superblock contains information about the file such as the file signature, file consistency flags, the number of bytes to store addresses and size of an object, as well as the size of the user block: </p><div class="fragment"><div class="line">h5dump -B (--superblock)</div>
</div><!-- fragment --><p>Below is an example (Unix): </p><div class="fragment"><div class="line">$ h5dump -B -H SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5 | more</div>
<div class="line">HDF5 <span class="stringliteral">"SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5"</span> {</div>
<div class="line">SUPER_BLOCK {</div>
<div class="line"> SUPERBLOCK_VERSION 0</div>
<div class="line"> FREELIST_VERSION 0</div>
<div class="line"> SYMBOLTABLE_VERSION 0</div>
<div class="line"> OBJECTHEADER_VERSION 0</div>
<div class="line"> OFFSET_SIZE 8</div>
<div class="line"> LENGTH_SIZE 8</div>
<div class="line"> BTREE_RANK 16</div>
<div class="line"> BTREE_LEAF 4</div>
<div class="line"> ISTORE_K 32</div>
<div class="line"> USER_BLOCK {</div>
<div class="line"> USERBLOCK_SIZE 1024</div>
<div class="line"> }</div>
<div class="line">}</div>
</div><!-- fragment --><p>Once you have the size of the user block, you can extract it from the file using system commands. For example, on Unix platforms you can use the head command-line tool: </p><div class="fragment"><div class="line">head -c <USERBLOCK_SIZE> <JPSS File> >& USERBLOCK.xml</div>
</div><!-- fragment --><p>There are Unix tools for Windows that may work, such as <a href="http://gnuwin32.sourceforge.net/packages/coreutils.htm">CoreUtils for Windows</a>.</p>
<h1><a class="anchor" id="secViewToolsJPSSExam"></a>
Examining a Granule</h1>
<ul>
<li>
<a class="el" href="_view_tools_j_p_s_s.html#subsecViewToolsJPSSExam_h5dump">h5dump</a><br />
<ul>
<li>
<a class="el" href="_view_tools_j_p_s_s.html#subsubsecViewToolsJPSSExam_h5dumpRegRef">Viewing a Region Reference</a> </li>
<li>
<a class="el" href="_view_tools_j_p_s_s.html#subsubsecViewToolsJPSSExam_h5dumpQuality">Viewing a Quality Flag</a> </li>
<li>
<a class="el" href="_view_tools_j_p_s_s.html#subsubsecViewToolsJPSSExam_h5dumpProps">Properties</a> </li>
</ul>
</li>
<li>
<a class="el" href="_view_tools_j_p_s_s.html#subsecViewToolsJPSSExamr_HDFView">HDFView</a> </li>
</ul>
<h2><a class="anchor" id="subsecViewToolsJPSSExam_h5dump"></a>
h5dump</h2>
<p>There are several options that you may first want to use when examining a granule with h5dump: </p><table class="doxtable">
<tr>
<th>Option</th><th>Description </th></tr>
<tr>
<td>-H, –header </td><td>Prints header (metadata) information only </td></tr>
<tr>
<td>-d D, –dataset=D </td><td>Specifies the granule dataset </td></tr>
<tr>
<td>-A 0, –onlyattr=0 </td><td>Suppresses attributes </td></tr>
<tr>
<td>-p, –properties </td><td>Show properties of datasets (See Properties) </td></tr>
</table>
<p>You would specify the dataset (<code style="background-color:whitesmoke;">-d D</code>) and the <code style="background-color:whitesmoke;">-H</code> options to view the metadata associated with a specific granule. There are many attributes associated with a granule and <code style="background-color:whitesmoke;">-A 0</code> can be used to suppress those.</p>
<p>For example: </p><div class="fragment"><div class="line">h5dump -H -A 0 -d <span class="stringliteral">"/Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_0"</span> </div>
<div class="line"> SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5</div>
</div><!-- fragment --><p>This command displays: </p><div class="fragment"><div class="line">HDF5 <span class="stringliteral">"SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5"</span> {</div>
<div class="line">DATASET <span class="stringliteral">"/Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_0"</span> {</div>
<div class="line"> DATATYPE <a class="code" href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a5850e0b9353a5e7aeb615fb943d4e9cd">H5T_REFERENCE</a> { <a class="code" href="group___p_d_t_s_t_d.html#gaf5cb0d5cec3d40d8b3ac27512f86895e">H5T_STD_REF_DSETREG</a> }</div>
<div class="line"> DATASPACE SIMPLE { ( 16 ) / ( <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a> ) }</div>
<div class="line">}</div>
<div class="line">}</div>
<div class="ttc" id="a_h5_spublic_8h_html_a5af9ab788797b2ea9a4843857674ac18"><div class="ttname"><a href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a></div><div class="ttdeci">#define H5S_UNLIMITED</div><div class="ttdef"><b>Definition:</b> H5Spublic.h:48</div></div>
<div class="ttc" id="a_h5_tpublic_8h_html_a071841985f647f69516dbe77d93167f2a5850e0b9353a5e7aeb615fb943d4e9cd"><div class="ttname"><a href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a5850e0b9353a5e7aeb615fb943d4e9cd">H5T_REFERENCE</a></div><div class="ttdeci">@ H5T_REFERENCE</div><div class="ttdef"><b>Definition:</b> H5Tpublic.h:39</div></div>
<div class="ttc" id="agroup___p_d_t_s_t_d_html_gaf5cb0d5cec3d40d8b3ac27512f86895e"><div class="ttname"><a href="group___p_d_t_s_t_d.html#gaf5cb0d5cec3d40d8b3ac27512f86895e">H5T_STD_REF_DSETREG</a></div><div class="ttdeci">#define H5T_STD_REF_DSETREG</div><div class="ttdef"><b>Definition:</b> H5Tpublic.h:410</div></div>
</div><!-- fragment --><p>To see the actual contents of the granule remove the <code style="background-color:whitesmoke;">-H</code> option: </p><div class="fragment"><div class="line">h5dump -A 0 -d <span class="stringliteral">"/Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_0"</span> </div>
<div class="line"> SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5</div>
</div><!-- fragment --><p>The above command displays: </p><div class="fragment"><div class="line">HDF5 <span class="stringliteral">"SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5"</span> {</div>
<div class="line">DATASET <span class="stringliteral">"/Data_Products/VIIRS-M9-SDR/VIIRS-M9-SDR_Gran_0"</span> {</div>
<div class="line"> DATATYPE <a class="code" href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a5850e0b9353a5e7aeb615fb943d4e9cd">H5T_REFERENCE</a> { <a class="code" href="group___p_d_t_s_t_d.html#gaf5cb0d5cec3d40d8b3ac27512f86895e">H5T_STD_REF_DSETREG</a> }</div>
<div class="line"> DATASPACE SIMPLE { ( 16 ) / ( <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a> ) }</div>
<div class="line"> DATA {</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/Radiance {(0,0)-(767,3199)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/Reflectance {(0,0)-(767,3199)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/ModeScan {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/ModeGran {(0)-(0)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/PadByte1 {(0)-(2)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/NumberOfScans {(0)-(0)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/NumberOfMissingPkts {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/NumberOfBadChecksums {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/NumberOfDiscardedPkts {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/QF1_VIIRSMBANDSDR {(0,0)-(767,3199)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/QF2_SCAN_SDR {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/QF3_SCAN_RDR {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/QF4_SCAN_SDR {(0)-(767)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/QF5_GRAN_BADDETECTOR {(0)-(15)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/RadianceFactors {(0)-(1)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M9-SDR_All/ReflectanceFactors {(0)-(1)}</div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="line">}</div>
</div><!-- fragment --><p>As you can see in the output above, the datatype for this dataset is: </p><div class="fragment"><div class="line">DATATYPE <a class="code" href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a5850e0b9353a5e7aeb615fb943d4e9cd">H5T_REFERENCE</a> { <a class="code" href="group___p_d_t_s_t_d.html#gaf5cb0d5cec3d40d8b3ac27512f86895e">H5T_STD_REF_DSETREG</a> }</div>
</div><!-- fragment --><p>This indicates that it is a dataset specifically for storing references to regions (or subsets) in other datasets. The dataset contains 16 such references, and more can be added to it, as indicated by the dataspace (in other words it is unlimited): </p><div class="fragment"><div class="line">DATASPACE SIMPLE { ( 16 ) / ( <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a> ) }</div>
</div><!-- fragment --><h3><a class="anchor" id="subsubsecViewToolsJPSSExam_h5dumpRegRef"></a>
Viewing a Region Reference</h3>
<p>What if we wanted to look at the <code style="background-color:whitesmoke;">NumberOfScans</code> data for a specific granule in a file?</p>
<p>First, we may be interested in determining whether the scans were done at night or in the day. If a scan was at night, there will be no data.</p>
<p>The attribute <code style="background-color:whitesmoke;">N_Day_Night_Flag</code> is used to determine when the scan was done. If you don't know where this attribute is located, you can use the <code style="background-color:whitesmoke;">-N</code> option to search for it in the file. If you were to run this command on the <code style="background-color:whitesmoke;">SVM09</code> file used above, you would see that the <code style="background-color:whitesmoke;">N_Day_Night_Flag</code> attribute has a value of <code style="background-color:whitesmoke;">Night</code> for the four granules in the file. Indeed, if you actually examine the <code style="background-color:whitesmoke;">NumberOfScans</code> data, you will see that only fill values are written.</p>
<p>For that reason we will examine the <code style="background-color:whitesmoke;">NumberOfScans</code> data for the <code style="background-color:whitesmoke;">SVMO1</code> file below, as it was obtained during the day: </p><div class="fragment"><div class="line">h5dump -N N_Day_Night_Flag SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5</div>
</div><!-- fragment --><p>It displays: </p><div class="fragment"><div class="line">HDF5 <span class="stringliteral">"SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5"</span> {</div>
<div class="line">ATTRIBUTE <span class="stringliteral">"N_Day_Night_Flag"</span> {</div>
<div class="line"> DATATYPE <a class="code" href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a2de5d7919fe54466b7cf6a6c0b4265fa">H5T_STRING</a> {</div>
<div class="line"> STRSIZE 4;</div>
<div class="line"> STRPAD <a class="code" href="_h5_tpublic_8h.html#ad2ab726f3bd28222a2ffb91c6bbc3514a23c685afc240bbac4da23b36d8fd7e13">H5T_STR_NULLTERM</a>;</div>
<div class="line"> CSET <a class="code" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71aa27383e03d1cad9b4c32d8611a145d663">H5T_CSET_ASCII</a>;</div>
<div class="line"> CTYPE <a class="code" href="group___p_d_t_s.html#ga7f6b6959fefe56d2e871659110936d2d">H5T_C_S1</a>;</div>
<div class="line"> }</div>
<div class="line"> DATASPACE SIMPLE { ( 1, 1 ) / ( 1, 1 ) }</div>
<div class="line"> DATA {</div>
<div class="line"> (0,0): <span class="stringliteral">"Day"</span></div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="line">}</div>
<div class="ttc" id="a_h5_tpublic_8h_html_a03755b8370672668ddc7063add28e71aa27383e03d1cad9b4c32d8611a145d663"><div class="ttname"><a href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71aa27383e03d1cad9b4c32d8611a145d663">H5T_CSET_ASCII</a></div><div class="ttdeci">@ H5T_CSET_ASCII</div><div class="ttdef"><b>Definition:</b> H5Tpublic.h:95</div></div>
<div class="ttc" id="a_h5_tpublic_8h_html_a071841985f647f69516dbe77d93167f2a2de5d7919fe54466b7cf6a6c0b4265fa"><div class="ttname"><a href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a2de5d7919fe54466b7cf6a6c0b4265fa">H5T_STRING</a></div><div class="ttdeci">@ H5T_STRING</div><div class="ttdef"><b>Definition:</b> H5Tpublic.h:35</div></div>
<div class="ttc" id="a_h5_tpublic_8h_html_ad2ab726f3bd28222a2ffb91c6bbc3514a23c685afc240bbac4da23b36d8fd7e13"><div class="ttname"><a href="_h5_tpublic_8h.html#ad2ab726f3bd28222a2ffb91c6bbc3514a23c685afc240bbac4da23b36d8fd7e13">H5T_STR_NULLTERM</a></div><div class="ttdeci">@ H5T_STR_NULLTERM</div><div class="ttdef"><b>Definition:</b> H5Tpublic.h:120</div></div>
<div class="ttc" id="agroup___p_d_t_s_html_ga7f6b6959fefe56d2e871659110936d2d"><div class="ttname"><a href="group___p_d_t_s.html#ga7f6b6959fefe56d2e871659110936d2d">H5T_C_S1</a></div><div class="ttdeci">#define H5T_C_S1</div><div class="ttdef"><b>Definition:</b> H5Tpublic.h:476</div></div>
</div><!-- fragment --><p>There is just one granule in this <code style="background-color:whitesmoke;">SVM01</code> file, as shown below: </p><div class="fragment"><div class="line">$ h5dump -n SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5</div>
<div class="line">HDF5 <span class="stringliteral">"SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5"</span> {</div>
<div class="line">FILE_CONTENTS {</div>
<div class="line"> group /</div>
<div class="line"> group /All_Data</div>
<div class="line"> group /All_Data/VIIRS-M1-SDR_All</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/ModeGran</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/ModeScan</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/NumberOfBadChecksums</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/NumberOfDiscardedPkts</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/NumberOfMissingPkts</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/NumberOfScans</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/PadByte1</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/QF1_VIIRSMBANDSDR</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/QF2_SCAN_SDR</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/QF3_SCAN_RDR</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/QF4_SCAN_SDR</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/QF5_GRAN_BADDETECTOR</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/Radiance</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/RadianceFactors</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/Reflectance</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/ReflectanceFactors</div>
<div class="line"> group /Data_Products</div>
<div class="line"> group /Data_Products/VIIRS-M1-SDR</div>
<div class="line"> dataset /Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Aggr</div>
<div class="line"> dataset /Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Gran_0</div>
<div class="line"> }</div>
<div class="line">}</div>
</div><!-- fragment --><p>Now examine the references in the <code style="background-color:whitesmoke;">VIIRS-M1-SDR_Gran_0</code> granule </p><div class="fragment"><div class="line">$ h5dump -A 0 -d <span class="stringliteral">"/Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Gran_0"</span> </div>
<div class="line"> SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5</div>
<div class="line">HDF5 <span class="stringliteral">"SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5"</span> {</div>
<div class="line">DATASET <span class="stringliteral">"/Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Gran_0"</span> {</div>
<div class="line"> DATATYPE <a class="code" href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a5850e0b9353a5e7aeb615fb943d4e9cd">H5T_REFERENCE</a> { <a class="code" href="group___p_d_t_s_t_d.html#gaf5cb0d5cec3d40d8b3ac27512f86895e">H5T_STD_REF_DSETREG</a> }</div>
<div class="line"> DATASPACE SIMPLE { ( 16 ) / ( <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a> ) }</div>
<div class="line"> DATA {</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/Radiance {(0,0)-(767,3199)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/Reflectance {(0,0)-(767,3199)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/ModeScan {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/ModeGran {(0)-(0)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/PadByte1 {(0)-(2)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/NumberOfScans {(0)-(0)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/NumberOfMissingPkts {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/NumberOfBadChecksums {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/NumberOfDiscardedPkts {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/QF1_VIIRSMBANDSDR {(0,0)-(767,3199)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/QF2_SCAN_SDR {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/QF3_SCAN_RDR {(0)-(47)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/QF4_SCAN_SDR {(0)-(767)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/QF5_GRAN_BADDETECTOR {(0)-(15)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/RadianceFactors {(0)-(1)},</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/ReflectanceFactors {(0)-(1)}</div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="line">}</div>
</div><!-- fragment --><p>In the output above, you can see that the <code style="background-color:whitesmoke;">NumberOfScans</code> reference is the sixth reference in the granule counting from the top.</p>
<p>The list of references shown above is a 0-based index to the dataset. Therefore, to specify <code style="background-color:whitesmoke;">NumberOfScans</code>, enter a start offset of <code style="background-color:whitesmoke;">5</code> for the <code style="background-color:whitesmoke;">-s</code> option (the sixth reference minus 1). To see the region reference data, use the <code style="background-color:whitesmoke;">-R</code> option.</p>
<p>This command will display the data in the <code style="background-color:whitesmoke;">NumberOfScans</code> region reference: </p><div class="fragment"><div class="line">h5dump -A 0 -d <span class="stringliteral">"/Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Gran_0"</span> -s 5 -R</div>
<div class="line"> SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5</div>
</div><!-- fragment --><p>It displays the number of scans (48): </p><div class="fragment"><div class="line">HDF5 <span class="stringliteral">"SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5"</span> {</div>
<div class="line">DATASET <span class="stringliteral">"/Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Gran_0"</span> {</div>
<div class="line"> DATATYPE <a class="code" href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a5850e0b9353a5e7aeb615fb943d4e9cd">H5T_REFERENCE</a> { <a class="code" href="group___p_d_t_s_t_d.html#gaf5cb0d5cec3d40d8b3ac27512f86895e">H5T_STD_REF_DSETREG</a> }</div>
<div class="line"> DATASPACE SIMPLE { ( 16 ) / ( <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a> ) }</div>
<div class="line"> SUBSET {</div>
<div class="line"> START ( 5 );</div>
<div class="line"> STRIDE ( 1 );</div>
<div class="line"> COUNT ( 1 );</div>
<div class="line"> BLOCK ( 1 );</div>
<div class="line"> DATA {</div>
<div class="line"> (5): DATASET /All_Data/VIIRS-M1-SDR_All/NumberOfScans {</div>
<div class="line"> (5): REGION_TYPE BLOCK (0)-(0)</div>
<div class="line"> (5): DATATYPE <a class="code" href="group___p_d_t_s_t_d.html#ga37e8a6be7ee64587c2a282b965019bb8">H5T_STD_I32BE</a></div>
<div class="line"> (5): DATASPACE SIMPLE { ( 1 ) / ( <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a> ) }</div>
<div class="line"> (5): DATA {</div>
<div class="line"> (0): 48</div>
<div class="line"> (5): }</div>
<div class="line"> (5): }</div>
<div class="line"> }</div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="line">}</div>
<div class="ttc" id="agroup___p_d_t_s_t_d_html_ga37e8a6be7ee64587c2a282b965019bb8"><div class="ttname"><a href="group___p_d_t_s_t_d.html#ga37e8a6be7ee64587c2a282b965019bb8">H5T_STD_I32BE</a></div><div class="ttdeci">#define H5T_STD_I32BE</div><div class="ttdef"><b>Definition:</b> H5Tpublic.h:305</div></div>
</div><!-- fragment --><p>The <code style="background-color:whitesmoke;">-s</code> option may be familiar as one of the options that was described in the <a class="el" href="_view_tools_view.html#secViewToolsViewSub">Dataset Subset</a> tutorial topic. The other subsetting options are not included, indicating that the default values are used.</p>
<p>If you leave off the <code style="background-color:whitesmoke;">-R</code> option, you will see the subset selection, but not the data: </p><div class="fragment"><div class="line">$ h5dump -A 0 -d <span class="stringliteral">"/Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Gran_0"</span> -s 5 </div>
<div class="line"> SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5</div>
<div class="line">HDF5 <span class="stringliteral">"SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5"</span> {</div>
<div class="line">DATASET <span class="stringliteral">"/Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Gran_0"</span> {</div>
<div class="line"> DATATYPE <a class="code" href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a5850e0b9353a5e7aeb615fb943d4e9cd">H5T_REFERENCE</a> { <a class="code" href="group___p_d_t_s_t_d.html#gaf5cb0d5cec3d40d8b3ac27512f86895e">H5T_STD_REF_DSETREG</a> }</div>
<div class="line"> DATASPACE SIMPLE { ( 16 ) / ( <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a> ) }</div>
<div class="line"> SUBSET {</div>
<div class="line"> START ( 5 );</div>
<div class="line"> STRIDE ( 1 );</div>
<div class="line"> COUNT ( 1 );</div>
<div class="line"> BLOCK ( 1 );</div>
<div class="line"> DATA {</div>
<div class="line"> DATASET /All_Data/VIIRS-M1-SDR_All/NumberOfScans {(0)-(0)}</div>
<div class="line"> }</div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="line">}</div>
</div><!-- fragment --><h3><a class="anchor" id="subsubsecViewToolsJPSSExam_h5dumpQuality"></a>
Viewing a Quality Flag</h3>
<p>The quality flags in an NPP file can be viewed with h5dump using the <code style="background-color:whitesmoke;">-M</code> option. Quality flags are packed into each integer value in a quality flag dataset. Quality flag datasets in NPP files begin with the letters <code style="background-color:whitesmoke;">QF</code>.</p>
<p>In the following NPP file, there are five Quality Flag datasets (<code style="background-color:whitesmoke;">/All_Data/VIIRS-M1-SDR_All/QF*</code>): </p><div class="fragment"><div class="line">$ h5dump -n SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5</div>
<div class="line">HDF5 <span class="stringliteral">"SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5"</span> {</div>
<div class="line">FILE_CONTENTS {</div>
<div class="line"> group /</div>
<div class="line"> group /All_Data</div>
<div class="line"> group /All_Data/VIIRS-M1-SDR_All</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/ModeGran</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/ModeScan</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/NumberOfBadChecksums</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/NumberOfDiscardedPkts</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/NumberOfMissingPkts</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/NumberOfScans</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/PadByte1</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/QF1_VIIRSMBANDSDR</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/QF2_SCAN_SDR</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/QF3_SCAN_RDR</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/QF4_SCAN_SDR</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/QF5_GRAN_BADDETECTOR</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/Radiance</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/RadianceFactors</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/Reflectance</div>
<div class="line"> dataset /All_Data/VIIRS-M1-SDR_All/ReflectanceFactors</div>
<div class="line"> group /Data_Products</div>
<div class="line"> group /Data_Products/VIIRS-M1-SDR</div>
<div class="line"> dataset /Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Aggr</div>
<div class="line"> dataset /Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Gran_0</div>
<div class="line"> }</div>
<div class="line">}</div>
</div><!-- fragment --><p>The flags in this particular dataset happen to be stored in every two bits of each quality flag dataset element, and the values range from 0 to 2. In other words, to see the quality flag values for this dataset, these bits would be examined: 0 and 1, 2 and 3, 4 and 5, or 6 and 7 (This information was obtained from the Product Profile XML File.)</p>
<p>For example, bits 0 and 1 in the <code style="background-color:whitesmoke;">VQF1_VIIRSMBANDSDR</code> dataset specify the flag that "Indicates calibration quality due to bad space view offsets, OBC view offsets, etc or use of a
previous calibration view". It has 3 values: Good (0), Poor (1), or No Calibration (2).</p>
<p>The <code style="background-color:whitesmoke;">-M</code> option is used to specify the quality flag bit offset (<code style="background-color:whitesmoke;">O</code>) and length (<code style="background-color:whitesmoke;">L</code>): </p><div class="fragment"><div class="line">h5dump -d DATASET -M O,L FILE</div>
</div><!-- fragment --><p>To view the first quality flag (0-1) in a 5 x 6 subset of the <code style="background-color:whitesmoke;">QF1_VIIRSMBANDSDR</code> dataset, specify: </p><div class="fragment"><div class="line">h5dump -d <span class="stringliteral">"/All_Data/VIIRS-M1-SDR_All/QF1_VIIRSMBANDSDR[0,0;;5,6;]"</span> </div>
<div class="line"> -M 0,2 SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5</div>
</div><!-- fragment --><p>This outputs: </p><div class="fragment"><div class="line">HDF5 <span class="stringliteral">"SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5"</span> {</div>
<div class="line">DATASET <span class="stringliteral">"/All_Data/VIIRS-M1-SDR_All/QF1_VIIRSMBANDSDR"</span> {</div>
<div class="line"> DATATYPE <a class="code" href="group___p_d_t_s_t_d.html#ga10b5774adca6e8432615dac892e13ed9">H5T_STD_U8BE</a></div>
<div class="line"> DATASPACE SIMPLE { ( 768, 3200 ) / ( <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a>, <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a> ) }</div>
<div class="line"> PACKED_BITS OFFSET=0 LENGTH=2</div>
<div class="line"> SUBSET {</div>
<div class="line"> START ( 0, 0 );</div>
<div class="line"> STRIDE ( 1, 1 );</div>
<div class="line"> COUNT ( 5, 6 );</div>
<div class="line"> BLOCK ( 1, 1 );</div>
<div class="line"> DATA {</div>
<div class="line"> (0,0): 2, 2, 2, 2, 2, 2,</div>
<div class="line"> (1,0): 2, 2, 2, 2, 2, 2,</div>
<div class="line"> (2,0): 0, 0, 0, 0, 0, 0,</div>
<div class="line"> (3,0): 0, 0, 0, 0, 0, 0,</div>
<div class="line"> (4,0): 0, 0, 0, 0, 0, 0</div>
<div class="line"> }</div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="line">}</div>
<div class="ttc" id="agroup___p_d_t_s_t_d_html_ga10b5774adca6e8432615dac892e13ed9"><div class="ttname"><a href="group___p_d_t_s_t_d.html#ga10b5774adca6e8432615dac892e13ed9">H5T_STD_U8BE</a></div><div class="ttdeci">#define H5T_STD_U8BE</div><div class="ttdef"><b>Definition:</b> H5Tpublic.h:325</div></div>
</div><!-- fragment --><p>To view more than one quality flag at a time simply add the bit offset and length values to <code style="background-color:whitesmoke;">-M</code>, separated by commas. For example, this <code style="background-color:whitesmoke;">-M</code> option specifies bits 0-1 and 2-3: </p><div class="fragment"><div class="line">h5dump -d DATASET -M 0,2,2,2 FILE</div>
</div><!-- fragment --><h3><a class="anchor" id="subsubsecViewToolsJPSSExam_h5dumpProps"></a>
Properties</h3>
<p>To view properties of a specific dataset with <code style="background-color:whitesmoke;">h5dump</code> use the <code style="background-color:whitesmoke;">-p</code> option along with the <code style="background-color:whitesmoke;">-d</code> option. Depending on the number of attributes and the amount of data, the <code style="background-color:whitesmoke;">-A 0</code> and <code style="background-color:whitesmoke;">-H</code> options can also be specified to suppress printing of attributes and data values: </p><div class="fragment"><div class="line">h5dump -p -H -A 0 -d DATASET</div>
</div><!-- fragment --><p>The <code style="background-color:whitesmoke;">-p</code> option shows any compression filters associated with a dataset, as well as layout and fill value information. This option can be helpful in diagnosing performance and other issues.</p>
<p>As an example, examine the <code style="background-color:whitesmoke;">/All_Data/VIIRS-M1-SDR_All/Radiance</code> dataset in the <code style="background-color:whitesmoke;">SVM01</code> file: </p><div class="fragment"><div class="line">$ h5dump -p -H -A 0 -d <span class="stringliteral">"/All_Data/VIIRS-M1-SDR_All/Radiance"</span> </div>
<div class="line"> SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5</div>
<div class="line">HDF5 <span class="stringliteral">"SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5"</span> {</div>
<div class="line">DATASET <span class="stringliteral">"/All_Data/VIIRS-M1-SDR_All/Radiance"</span> {</div>
<div class="line"> DATATYPE <a class="code" href="group___p_d_t_s_t_d.html#ga10e46ab72ac0330c51ed6cf709db4697">H5T_STD_U16BE</a></div>
<div class="line"> DATASPACE SIMPLE { ( 768, 3200 ) / ( <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a>, <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a> ) }</div>
<div class="line"> STORAGE_LAYOUT {</div>
<div class="line"> CHUNKED ( 768, 3200 )</div>
<div class="line"> SIZE 4915200</div>
<div class="line"> }</div>
<div class="line"> FILTERS {</div>
<div class="line"> NONE</div>
<div class="line"> }</div>
<div class="line"> FILLVALUE {</div>
<div class="line"> FILL_TIME <a class="code" href="_h5_dpublic_8h.html#aa39293626c4e68dd28b06c0dc84bde4aa85b225308b0a277c4dd6fed7ee465a72">H5D_FILL_TIME_IFSET</a></div>
<div class="line"> VALUE 65529</div>
<div class="line"> }</div>
<div class="line"> ALLOCATION_TIME {</div>
<div class="line"> <a class="code" href="_h5_dpublic_8h.html#aab70b464cf3c5fc931dce0c4fe98b3d2ac898a96931fd3402d9e5646690c77636">H5D_ALLOC_TIME_INCR</a></div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="line">}</div>
<div class="ttc" id="a_h5_dpublic_8h_html_aa39293626c4e68dd28b06c0dc84bde4aa85b225308b0a277c4dd6fed7ee465a72"><div class="ttname"><a href="_h5_dpublic_8h.html#aa39293626c4e68dd28b06c0dc84bde4aa85b225308b0a277c4dd6fed7ee465a72">H5D_FILL_TIME_IFSET</a></div><div class="ttdeci">@ H5D_FILL_TIME_IFSET</div><div class="ttdef"><b>Definition:</b> H5Dpublic.h:104</div></div>
<div class="ttc" id="a_h5_dpublic_8h_html_aab70b464cf3c5fc931dce0c4fe98b3d2ac898a96931fd3402d9e5646690c77636"><div class="ttname"><a href="_h5_dpublic_8h.html#aab70b464cf3c5fc931dce0c4fe98b3d2ac898a96931fd3402d9e5646690c77636">H5D_ALLOC_TIME_INCR</a></div><div class="ttdeci">@ H5D_ALLOC_TIME_INCR</div><div class="ttdef"><b>Definition:</b> H5Dpublic.h:79</div></div>
<div class="ttc" id="agroup___p_d_t_s_t_d_html_ga10e46ab72ac0330c51ed6cf709db4697"><div class="ttname"><a href="group___p_d_t_s_t_d.html#ga10e46ab72ac0330c51ed6cf709db4697">H5T_STD_U16BE</a></div><div class="ttdeci">#define H5T_STD_U16BE</div><div class="ttdef"><b>Definition:</b> H5Tpublic.h:335</div></div>
</div><!-- fragment --><p>We can see that the chunk size for this dataset is 768 x 3200, and the storage size is 4915200.</p>
<p>What if the chunk size were smaller?</p>
<p>The dataset was modified to have a chunk size of 1 x 10, using the <code style="background-color:whitesmoke;">h5repack</code> utility, as shown below. </p><div class="fragment"><div class="line">$ h5repack -l /All_Data/VIIRS-M1-SDR_All/Radiance:CHUNK=1x10 </div>
<div class="line"> SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5 SVM01repack.h5</div>
<div class="line"> </div>
<div class="line">$ h5dump -p -H -A 0 -d <span class="stringliteral">"/All_Data/VIIRS-M1-SDR_All/Radiance"</span> SVM01repack.h5</div>
<div class="line">HDF5 <span class="stringliteral">"SVM01repack.h5"</span> {</div>
<div class="line">DATASET <span class="stringliteral">"/All_Data/VIIRS-M1-SDR_All/Radiance"</span> {</div>
<div class="line"> DATATYPE <a class="code" href="group___p_d_t_s_t_d.html#ga10e46ab72ac0330c51ed6cf709db4697">H5T_STD_U16BE</a></div>
<div class="line"> DATASPACE SIMPLE { ( 768, 3200 ) / ( <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a>, <a class="code" href="_h5_spublic_8h.html#a5af9ab788797b2ea9a4843857674ac18">H5S_UNLIMITED</a> ) }</div>
<div class="line"> STORAGE_LAYOUT {</div>
<div class="line"> CHUNKED ( 1, 10 )</div>
<div class="line"> SIZE 4915200</div>
<div class="line"> }</div>
<div class="line"> FILTERS {</div>
<div class="line"> NONE</div>
<div class="line"> }</div>
<div class="line"> FILLVALUE {</div>
<div class="line"> FILL_TIME <a class="code" href="_h5_dpublic_8h.html#aa39293626c4e68dd28b06c0dc84bde4aa85b225308b0a277c4dd6fed7ee465a72">H5D_FILL_TIME_IFSET</a></div>
<div class="line"> VALUE 65529</div>
<div class="line"> }</div>
<div class="line"> ALLOCATION_TIME {</div>
<div class="line"> <a class="code" href="_h5_dpublic_8h.html#aab70b464cf3c5fc931dce0c4fe98b3d2ac898a96931fd3402d9e5646690c77636">H5D_ALLOC_TIME_INCR</a></div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="line">}</div>
</div><!-- fragment --><p>In this case, the storage size of the dataset is the same, but the size of the file almost doubled!: </p><div class="fragment"><div class="line">$ ls -1sh</div>
<div class="line">total 35M</div>
<div class="line">12M SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5</div>
<div class="line">23M SVM01repack.h5</div>
</div><!-- fragment --><p>In general, the smaller the chunk size, the more chunks that HDF5 has to keep track of, which increases the size of the file and can affect performance.</p>
<h2><a class="anchor" id="subsecViewToolsJPSSExamr_HDFView"></a>
HDFView</h2>
<p>As mentioned previously, the structure of an HDF5 file is displayed in the TreeView on the left side of the HDFView screen, and you can click on objects and have metadata information displayed on the right side.</p>
<p>To discover more about the granule <code style="background-color:whitesmoke;">/Data_Products/VIIRS-M1-SDR/VIIRS-M1-SDR_Gran_0</code> in the <code style="background-color:whitesmoke;">SVM01</code> file shown below in the TreeView, position the mouse over the granule and click to select. Properties for the object is displayed on the right side of the HDFView screen. You can see Datatype and Dataspace information on the <code style="background-color:whitesmoke;">General Object Info</code> tab, any Attributes associated with the granulewill be on the <code style="background-color:whitesmoke;">Object Attribute Info</code> tab. In the <code style="background-color:whitesmoke;">General Object Info</code>, you can see that the dataset is a Region Reference dataset, and that there are sixteen Region References in this dataset: </p><table class="doxtable">
<tr>
<td><div class="image">
<img src="hdfview-prop.png" alt=""/>
</div>
</td></tr>
</table>
<p>To examine the data in the granule, click twice on it with the left mouse button in the TreeView, and it will open in a new window.: </p><table class="doxtable">
<tr>
<td><div class="image">
<img src="hdfview-regref.png" alt=""/>
</div>
</td></tr>
</table>
<p>If you click twice with the left mouse button on the fifth Region Reference <code style="background-color:whitesmoke;">/All_Data/VIIRS-M1-SDR_All/NumberOfScans</code> a window will pop up with the value(s) of the reference: </p><table class="doxtable">
<tr>
<td><div class="image">
<img src="hdfview-regref2.png" alt=""/>
</div>
</td></tr>
</table>
<p>You can also set a user option to automatically show the value(s) in a Region Reference. Under the <code style="background-color:whitesmoke;">Tools</code> pull-down menu, select <code style="background-color:whitesmoke;">User Options</code> and then select <code style="background-color:whitesmoke;">HDF Settings</code> and then select <code style="background-color:whitesmoke;">Show RegRef Values</code> in the <code style="background-color:whitesmoke;">Data</code> section (see the middle of the image below): </p><table class="doxtable">
<tr>
<td><div class="image">
<img src="hdfview-regrefval.png" alt=""/>
</div>
</td></tr>
</table>
<p>Then you will automatically see the values of the Region Reference when you open it and select an entry: </p><table class="doxtable">
<tr>
<td><div class="image">
<img src="hdfview-regref1.png" alt=""/>
</div>
</td></tr>
</table>
<p>You can view and set quality flags by clicking the right mouse button over a quality flags dataset under <code style="background-color:whitesmoke;">All_Data</code> and selecting <code style="background-color:whitesmoke;">Open As</code> from the pop-up menu. In the middle of the window that pops up, you will see where you can specify <code style="background-color:whitesmoke;">Bitmask</code> options. </p><table class="doxtable">
<tr>
<td><div class="image">
<img src="hdfview-qf.png" alt=""/>
</div>
</td></tr>
</table>
<hr />
<p> Navigate back: <a class="el" href="index.html">Main</a> / <a class="el" href="_getting_started.html">Getting Started with HDF5</a> / <a class="el" href="_view_tools_command.html">Command-line Tools</a> </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>
|