<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1301761434;
        mso-list-type:hybrid;
        mso-list-template-ids:893552568 1822325784 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0E8;
        mso-level-tab-stop:21.0pt;
        mso-level-number-position:left;
        margin-left:21.0pt;
        text-indent:-18.0pt;
        font-family:Wingdings;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:Arial;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">Dear KST-Users & Developers,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">I’m a newbie to KST-plot and I’ve got a question concerning the interface for reading data in binary NetCDF format.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">I found KST when searching for a tool for plotting time series result data of
<a href="http://www.aero.polimi.it/mbdyn/">MBDyn</a>-multibody-simulations of our wind turbines.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">MBDyn can use either ascii text format or binary NetCDF format (i.e. float numbers) for its output files.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">I found that plotting of scalar (1D) time series of data type float (4 bytes) works well in KST, so I was wondering if also support for packed /
 compressed data could be added (if not already implemented) to the NetCDF interface as indicated by [Eq.1] below  ?<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">When simulating wind turbines we usually have to deal with a huge amount of data from a lot of simulations arising from parameter variations.
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">Fortunately there is a way to pack the data by using a simple transformation into 2-byte integer numbers of data type ‘signed short int’ which results
 in a small loss of information (i.e. precision) but 65.535 different niveaus of the signed short int type (ranging from -32.768 to 32.767) are usually sufficient for capturing the data range of a simulated float time series while the packed data only require
 half of the disk space than the (4 bytes) floating point values.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">I found that this sort of simple packing algorithm seems to be part of the “commonly used” NetCDF conventions and being integrated in some NetCDF
 tools: <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">If a (time dependent, scalar 1D-) variable owns the special attributes  ‘scale_factor’   and   ‘add_offset’  (refer to:
</span></font><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><a href="http://www.unidata.ucar.edu/software/netcdf/docs/netcdf/Attribute-Conventions.html"><span lang="EN-GB">http://www.unidata.ucar.edu/software/netcdf/docs/netcdf/Attribute-Conventions.html</span></a></span></font><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial">)
 these indicate that the variable has been packed to short int format. <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">The original float values  ‘X(ti)’  of a time series at time index ‘ti’ can be retrieved back by applying its  ‘scale_factor’   and   ‘add_offset’
  attributes (saved in the NetCDF file for each variable) to the short integers  ‘I_short(ti)’  :<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">[Eq.1]     X(ti)  =  I_short(ti)  *  scale_factor   +  add_offset<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">The values for  ‘scale_factor’   and   ‘add_offset’   (which are floating point numbers) were derived during the packing procedure by scanning the
 float time series  ‘X(ti)’  for its ultimate values  ‘Xmax’ and  ‘Xmin’  marking the data range of the time series   Xrange = Xmax – Xmin<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">  scale_factor  =  Xrange  /  DataTypeResolution_short<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"> <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">  add_offset  =  Xmin  +  0.5 * Xrange<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">with  ‘DataTypeResolution_short’  being the resolution of data type short int, e.g.
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">   DataTypeResolution_short  =  65.000<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">The integer numbers  I_short(ti)  were calculated by     
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">   I_short(ti)  =  round(  ( X(ti) – add_offset ) / scale_factor  )
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left:21.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><font size="2" face="Wingdings"><span lang="EN-GB" style="font-size:10.0pt;font-family:
Wingdings"><span style="mso-list:Ignore">è<font size="1" face="Times New Roman"><span style="font:7.0pt "Times New Roman"">    
</span></font></span></span></font><![endif]><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial">Does anybody know if something similar has been already implemented into KST-plot
<o:p></o:p></span></font></p>
<p class="MsoNormal" style="margin-left:3.0pt"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial">           orr<o:p></o:p></span></font></p>
<p class="MsoNormal" style="margin-left:21.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><font size="2" face="Wingdings"><span lang="EN-GB" style="font-size:10.0pt;font-family:
Wingdings"><span style="mso-list:Ignore">è<font size="1" face="Times New Roman"><span style="font:7.0pt "Times New Roman"">    
</span></font></span></span></font><![endif]><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial"> (if not) what would be the best and easiest way to implement the backtransformation according to [Eq.1]  ?<o:p></o:p></span></font></p>
<p class="MsoNormal" style="margin-left:3.0pt"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left:3.0pt"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial">Any help on that will be warmly appreciated.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;
font-family:Arial;color:navy">With kind regards<br>
<br>
Patrick Rix<br>
Loads & System Simulation<U1:P></U1:P></span></font><span lang="EN-US"><o:p></o:p></span></p>
<p><b><i><font size="3" face="Times New Roman"><span lang="EN-GB" style="font-size:
12.0pt;font-weight:bold;font-style:italic"><br>
</span></font></i></b><b><i><font color="navy" face="Arial"><span style="font-family:
Arial;color:navy;font-weight:bold;font-style:italic">REpower
</span></font></i></b><b><font color="navy" face="Arial"><span style="font-family:Arial;color:navy;font-weight:
bold">Systems SE</span></font></b><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">
<br>
TechCenter<br>
Albert-Betz-Str. 1<br>
D</span></font><font size="2" color="black" face="Arial"><span style="font-size:10.0pt;
font-family:Arial;color:black">-</span></font><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">24783 Osterrönfeld</span></font><font color="black" face="Arial"><span style="font-family:
Arial;color:black">
</span></font><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:navy"><br>
<U1:P></U1:P>Tel.: +49 - (0) - 4331 - 1313 - 9408<br>
Fax: +49 - (0) - 4331 - 1313 - 9954<U1:P></U1:P></span></font><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:navy"><br>
e-mail: <a href="mailto:p.rix@repower.de">p.rix@repower.de</a> <br>
Internet: <u><a href="http://www.repower.de">www.repower.de</a></u></span></font><o:p></o:p></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> </span><o:p></o:p></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p> </o:p></span></font></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="2">Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte umgehend den Absender und löschen
 Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe der in dieser E-Mail enthaltenen Daten ist nicht gestattet. Wie Sie wissen, kann die Sicherheit von Übermittlungen per E-Mail nicht gewährleistet werden, E-Mails können missbräuchlich
 unter fremdem Namen erstellt oder verändert werden. Aus diesem Grund bitten wir um Verständnis dafür, dass wir zu Ihrem und unserem Schutz die rechtliche Verbindlichkeit der vorstehenden Erklärungen ausschließen müssen. Diese Regelung gilt nur dann nicht,
 wenn wir mit Ihnen eine anderweitige schriftliche Vereinbarung über die Einhaltung von Sicherheits- und Verschlüsselungsstandards getroffen haben.<br>
<br>
This e-mail contains confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorised copying, disclosure or distribution
 of the material in this e-mail is strictly forbidden. As you know, the security of e-mail transmissions can not be guaranteed. E-mails can be misused to be written or modified under false names. For that reason, we ask you to understand the necessity for us
 to rule out the legal obligation of the above statement, for your protection and ours. This regulation is only invalid if we have concluded a special written agreement with you about the compliance with security and encryption standards.<br>
<br>
REpower Systems SE · Sitz: Hamburg · Vorstand: Andreas Nauen (Vorsitz), Matthias Schubert, Marcus A. Wassenberg, Vinod R. Tanti · Aufsichtsratsvorsitzender: Tulsi Tanti · Registergericht: AG Hamburg (Mitte) HRB Nr.: 118644<br>
</font>
</body>
</html>