Files
src_old/doc/H5tools/H5tools.htm
T
2006-09-11 20:19:10 +00:00

417 lines
24 KiB
HTML

<html><head><title>H5Part Tools How-to</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr"></head>
<body bgcolor="#ffffff" text="#000000">
<table border="0" cellpadding="0" cellspacing="0" width="987">
<tbody><tr>
<td height="6050" width="27"></td>
<td colspan="3" valign="top">
<div id="body">
<div id="mainleft"><font face="Arial, Helvetica, sans-serif"><a name="TOP"></a>
</font></div>
<div id="maincenter"> <font face="arial,helvetica">
<h1 align="center"><font face="Arial, Helvetica, sans-serif"><b><font color="#666699">H5Part
Tools How-to</font></b></font></h1>
</font><font color="#555588" face="arial,helvetica">
<h2><font color="#666699" face="Arial, Helvetica, sans-serif">Table
of Contents</font></h2>
</font>
<p><font face="Arial, Helvetica, sans-serif"><b><a href="#Quick%20Guide">
[1] Quick Guide</a></b> </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font color="#999999">---
For h5pAttrib</font></b></font><font face="Arial, Helvetica, sans-serif"><br>
<b><br>
<a href="#timesteps">[2] To see number of timesteps in a h5part file</a><br>
<br>
<a href="#file%20attributes">[3] To see file attributes in a h5part
file</a><br>
<br>
<a href="#step%20attributes"> [4] To see step attributes in a h5part
file</a><br>
<br>
<a href="#dataset">[5] To see dataset in a h5part file</a><br>
<br>
<a href="#flags">[6] Providing more than one flag at once for h5pAttrib</a></b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font color="#999999">---
For h5pToGNUplot</font></b></font><font face="Arial, Helvetica, sans-serif"><br>
<br>
<b><a href="#parameters">[7] What parameters to provide</a><br>
<br>
<a href="#input%20file">[8] How to create an input file to GNUplot</a></b></font></p>
<p>&nbsp;</p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<p>&nbsp;</p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><a name="Quick Guide">[1]
Quick Guide</a></font></h2>
<p><font face="Arial, Helvetica, sans-serif">Executing the program with
-h option will display a concise help page.</font></p>
<p><font face="Arial, Helvetica, sans-serif"><b><font face="Courier New, Courier, mono" size="+1">$&gt;</font></b><font face="Courier New, Courier, mono">./h5pAttrib
-h</font></font></p>
<p><font face="Courier New, Courier, mono">usage: h5pAttrib [OPTIONS]
file</font></p>
<p><font face="Courier New, Courier, mono"> OPTIONS<br>
-h, --help Print help page<br>
-n, --nstep Print number of steps<br>
-A, --fileA Print file attributes<br>
-a n, --stepA n Print step attributes &amp; values for time step n<br>
-d n, --dataset n Print data sets names &amp; values for time step
n<br>
-H, --header Print shorter version without the values</font></p>
<p><font face="Courier New, Courier, mono"> Examples:</font></p>
<p><font face="Courier New, Courier, mono"> 1) Show file attribute names
&amp; values of sample.h5part</font></p>
<p><font face="Courier New, Courier, mono"> h5pAttrib -A sample.h5part<br>
OR<br>
h5pAttrib --fileA sample.h5part</font></p>
<p><font face="Courier New, Courier, mono"> 2) Show step attribute names
for time step 5 of sample.h5part</font></p>
<p><font face="Courier New, Courier, mono"> h5pAttrib -a 5 -H sample.h5part<br>
OR<br>
h5pAttrib --stepA 5 -H sample.h5part</font></p>
<p><font face="Courier New, Courier, mono"><br>
<b><font size="+1">$&gt;</font></b> ./h5pToGNUplot -h</font></p>
<p><font face="Courier New, Courier, mono">usage: h5pToGNUplot -t TIMESTEP
-1 VARIABLE#1 -2 VARIABLE#2 -i INPUTFILE [OPTIONAL_FLAGS]</font></p>
<p><font face="Courier New, Courier, mono"> FLAGS<br>
-h, --help Print help page</font><br>
<font face="Courier New, Courier, mono">-1 par, --1var par (REQUIRED)
Takes first variable parameter to "par"<br>
-2 par, --2var par (REQUIRED) Takes second variable parameter to "par"<br>
-i file, --input file (REQUIRED) Takes input file name to "file"<br>
</font><font face="Courier New, Courier, mono">-t step, --timestep
step (REQUIRED) Sets the timestep to "step" (Value -1 will
result in dumping values of all timesteps.)<br>
-o file, --output file (OPTIONAL) Takes output file name to "file"
(without this flag, the program will print to stdout)<br>
-n num, --number num (OPTIONAL) Sets number of output points to "num"<br>
-s idx, --start idx (OPTIONAL) Sets the starting particle index to
"idx"</font></p>
<p><font face="Courier New, Courier, mono"><br>
Examples:</font></p>
<p><font face="Courier New, Courier, mono"> 1) Create GNU plot file
output.txt from sample.h5part by ploting x vs px for timestep 54</font></p>
<p><font face="Courier New, Courier, mono"> h5pToGNUplot -t 54 -1 x
-2 px -i sample.h5part -o output.txt</font></p>
<p><font face="Courier New, Courier, mono"> 2) Create GNU plot file
output.txt from sample.h5part by ploting x vs px for timestep 54<br>
using 1200 points from particle index 76</font></p>
<p><font face="Courier New, Courier, mono"> h5pToGNUplot -t 54 -1 x
-2 px -i sample.h5part -o output.txt -s 76 -n 1200</font></p>
<p>&nbsp;</p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font color="#999999">---
For h5pAttrib</font></b></font></p>
<p>&nbsp;</p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><a name="timesteps">[2]
To see number of timesteps in a h5part file</a></font></h2>
<p>Executing the program h5pAttrib with -n flag will display the number
of timesteps in the file.</p>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font face="Courier New, Courier, mono">$&gt;</font></b></font><font face="Courier New, Courier, mono">
./h5pAttrib -n sample.h5part</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing number of timesteps
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">There are total 252 number
of timesteps.<br>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">done</font><font face="Arial, Helvetica, sans-serif"><br>
</font></p>
<p>&nbsp; </p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<h2><font color="#666699" face="Arial, Helvetica, sans-serif"><br>
<font color="#555588"><a name="file attributes">[3] To see file attributes
in a h5part file</a></font></font></h2>
<p>File attribute contains information about the file. (file description
etc...) Executing the program h5pAttrib with -A flag will display
the file attributes in the file.</p>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font face="Courier New, Courier, mono">$&gt;</font></b></font><font face="Courier New, Courier, mono">
./h5pAttrib -A sample.h5part</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing file attributes
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">The number of file attributes
for file sample.h5part is 0 ...<br>
There are no file attributes.<br>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">done</font></p>
<p><font face="Arial, Helvetica, sans-serif"><br>
<i>NOTE: -H option will omit the list of values of file attributes.</i></font></p>
<p>&nbsp; </p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<p align="center">&nbsp;</p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><a name="step attributes">[4]
To see step attributes in a h5part file</a></font></h2>
<p>Step attribute contains information that belongs to a specific step.
(step name, timestep number, etc...) Executing the program h5pAttrib
with -a flag will display the step attributes in the file.<br>
Note that the timestep index should follow -a flag.</p>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b></font></p>
<p><font face="Arial, Helvetica, sans-serif"><b><font face="Courier New, Courier, mono" size="+1">$&gt;</font></b><font face="Courier New, Courier, mono">
./h5pAttrib -a 2 sample.h5part</font></font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing step attributes
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">The number of step attributes
for timestep #2 is 10 ...</font></p>
<p><font face="Courier New, Courier, mono">Attribute #0 = Step<br>
There are 1 elements in the attribute<br>
Attribute Type is H5T_NATIVE_INT64<br>
Printing 1 element value(s):<br>
COUNT[0]: 2</font></p>
<p><font face="Courier New, Courier, mono">Attribute #1 = Spos<br>
There are 1 elements in the attribute<br>
Attribute Type is H5T_NATIVE_DOUBLE<br>
Printing 1 element value(s):<br>
COUNT[0]: 0.143580</font></p>
<p><font face="Courier New, Courier, mono">Attribute #2 = structLen<br>
There are 1 elements in the attribute<br>
Attribute Type is H5T_NATIVE_DOUBLE<br>
Printing 1 element value(s):<br>
COUNT[0]: 2.393000</font></p>
<p><font face="Courier New, Courier, mono">.<br>
.<br>
.</font></p>
<p><font face="Courier New, Courier, mono"><br>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">done</font></p>
<p><font face="Arial, Helvetica, sans-serif"><br>
<i>NOTE: -H option will omit the list of values of step attributes.</i></font></p>
<p>&nbsp; </p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><br>
<a name="dataset">[5] To see dataset in a h5part file</a></font></h2>
<p>Executing the program h5pAttrib with -d flag will display the datasets
information in the file. (dataset name, type, number of elements,
etc...) Executing the program h5pAttrib with -d flag will display
the datasets information in the file.<br>
Note that the timestep index should follow -d flag.</p>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font face="Courier New, Courier, mono">$&gt;</font></b></font><font face="Courier New, Courier, mono">
./h5pAttrib -d 2 -H sample.h5part</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing names of datasets
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">The number of datasets for
timestep #2 is 7 ...</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #0 = id<br>
Dataset Type is H5T_NATIVE_INT64<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #1 = px<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #2 = py<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #3 = pz<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #4 = x<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #5 = y<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #6 = z<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">done</font></p>
<p><font face="Arial, Helvetica, sans-serif"><br>
<i>NOTE: -H option will omit the list of values of datasets.</i></font></p>
<p>&nbsp; </p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<p>&nbsp;</p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><a name="flags">[6]
Providing more than one flag at once</a></font></h2>
<p><font face="Arial, Helvetica, sans-serif">When more than one flags
are provided, one result after another will be displayed.</font></p>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font face="Courier New, Courier, mono">$&gt;</font></b></font><font face="Courier New, Courier, mono">
./h5pAttrib -H -a 1 -d 1 sample.h5part</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing step attributes
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">The number of step attributes
for timestep #1 is 10 ...</font></p>
<p><font face="Courier New, Courier, mono">Attribute #0 = Step<br>
Attribute #1 = Spos<br>
Attribute #2 = structLen<br>
Attribute #3 = org<br>
Attribute #4 = maxX<br>
Attribute #5 = minX<br>
Attribute #6 = maxP<br>
Attribute #7 = minP<br>
Attribute #8 = centroid<br>
Attribute #9 = nloc<br>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono"><br>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing names of datasets
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">The number of datasets for
timestep #1 is 7 ...</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #0 = id<br>
Dataset Type is H5T_NATIVE_INT64<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #1 = px<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #2 = py<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #3 = pz<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #4 = x<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #5 = y<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #6 = z<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">done</font></p>
<p>&nbsp;</p>
<div align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></div>
</div>
</div>
</td>
</tr>
<tr>
<td height="80"></td>
<td colspan="3" valign="top">
<h2><font face="Arial, Helvetica, sans-serif" size="+1"><b><font color="#999999">---
For h5pToGNUplot</font></b></font></h2>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><a name="parameters">[7]
What parameters to provide</a></font></h2>
<p><font face="Arial, Helvetica, sans-serif">When you execute the program
with -h option, it displays what flags are necessary and what flags are
optional.</font></p>
</td>
</tr>
<tr>
<td height="200"></td>
<td valign="top" width="137">
<p align="left"><b><font face="Arial, Helvetica, sans-serif">Short Version</font></b></p>
<p><font face="Arial, Helvetica, sans-serif">-h<br>
-1<br>
-2<br>
-i<br>
-t<br>
-o<br>
-n<br>
-s </font></p>
</td>
<td valign="top" width="144">
<p align="left"><b><font face="Arial, Helvetica, sans-serif">Long Version</font></b></p>
<p><font face="Arial, Helvetica, sans-serif">--help<br>
--1var<br>
--2var<br>
--input<br>
--timestep<br>
--output<br>
--number<br>
--start </font></p>
</td>
<td valign="top" width="679">
<p align="left"><b><font face="Arial, Helvetica, sans-serif">Meanings</font></b></p>
<p><font face="Arial, Helvetica, sans-serif">Print help page<br>
(REQUIRED) Takes first variable parameter<br>
(REQUIRED) Takes second variable parameter<br>
(REQUIRED) Takes input file name<br>
(REQUIRED) Sets the timestep (Value -1 will result in dumping values of
all timesteps.)<br>
(OPTIONAL) Takes output file name (without this flag, the program will
print to stdout)<br>
(OPTIONAL) Sets number of output points<br>
(OPTIONAL) Sets the starting particle index</font> </p>
</td>
</tr>
<tr>
<td height="1786"></td>
<td colspan="3" valign="top">
<p>&nbsp;</p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><br>
<a name="input file">[8] How to create an input file to GNUplot</a></font></h2>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b><br>
<i>Create input file to GNUplot that plots x vs. y.</i></font></p>
<p><font face="Arial, Helvetica, sans-serif"><b><font face="Courier New, Courier, mono" size="+1">$&gt;</font></b><font face="Courier New, Courier, mono">
./h5pToGNUplot -1 x -2 y -t 1 -i sample.h5part -o output.txt<br>
<b><font size="+1">$&gt;</font></b> cat output.txt<br>
-0.390779 -0.254793<br>
-0.396527 -0.252781<br>
-0.375362 -0.285137<br>
-0.396527 -0.252781<br>
-0.379917 -0.283147<br>
-0.390779 -0.254793<br>
-0.387536 -0.287346<br>
-0.371787 -0.319797<br>
-0.379917 -0.283147<br>
-0.378967 -0.326058<br>
-0.378976 -0.326078<br>
-0.387536 -0.287346<br>
-0.378957 -0.326069<br>
-0.379917 -0.283147<br>
-0.388762 -0.265390<br>
-0.371787 -0.319797<br>
-0.390779 -0.254793<br>
-0.376825 -0.266804<br>
-0.379917 -0.283147<br>
-0.375362 -0.285137<br>
...</font></font></p>
<p><font face="Courier New, Courier, mono"><i>Then run GNUplot...</i></font></p>
<p><font face="Courier New, Courier, mono"><b><font size="+1">$&gt;</font></b>
gnuplot</font></p>
<p><font face="Courier New, Courier, mono"> G N U P L O T<br>
Version 4.0 patchlevel 0<br>
last modified Thu Apr 15 14:44:22 CEST 2004<br>
System: Linux 2.6.11.4-21.11-smp</font></p>
<p><font face="Courier New, Courier, mono"> Copyright (C) 1986 - 1993, 1998,
2004<br>
Thomas Williams, Colin Kelley and many others</font></p>
<p><font face="Courier New, Courier, mono"> This is gnuplot version 4.0.
Please refer to the documentation<br>
for command syntax changes. The old syntax will be accepted<br>
throughout the 4.0 series, but all save files use the new syntax.</font></p>
<p><font face="Courier New, Courier, mono"> Type `help` to access the on-line
reference manual.<br>
The gnuplot FAQ is available from<br>
http://www.gnuplot.info/faq/</font></p>
<p><font face="Courier New, Courier, mono"> Send comments and requests for
help to<br>
&lt;gnuplot-info@lists.sourceforge.net&gt;<br>
Send bugs, suggestions and mods to<br>
&lt;gnuplot-bugs@lists.sourceforge.net&gt;</font></p>
<p><font face="Courier New, Courier, mono"><br>
Terminal type set to 'x11'<br>
<font size="+1"><b>gnuplot&gt;</b></font> plot "output.txt"</font></p>
<p><font face="Arial, Helvetica, sans-serif"><i>This will open a GNUplot
window that plots output.txt.</i></font></p>
<p align="center"><img src="H5tools_files/snapshot1.jpg" height="541" width="672"><br>
<font face="Arial, Helvetica, sans-serif">&lt;Sample screen shot of GNUplot
with input datafile generated by h5pToGNUplot&gt;</font></p>
</td>
</tr>
<tr>
<td height="44"></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody></table>
</body></html>