<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" 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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        mso-fareast-language:EN-US;}
h1
        {mso-style-priority:9;
        mso-style-link:"Rubrik 1 Char";
        margin-top:18.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Arial","sans-serif";
        mso-fareast-language:EN-US;}
h2
        {mso-style-priority:9;
        mso-style-link:"Rubrik 2 Char";
        margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Arial","sans-serif";
        mso-fareast-language:EN-US;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
        {mso-style-priority:10;
        mso-style-link:"Rubrik Char";
        margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:15.0pt;
        margin-left:0cm;
        mso-add-space:auto;
        font-size:16.0pt;
        font-family:"Arial","sans-serif";
        mso-fareast-language:EN-US;
        font-weight:bold;}
p.MsoTitleCxSpFirst, li.MsoTitleCxSpFirst, div.MsoTitleCxSpFirst
        {mso-style-priority:10;
        mso-style-link:"Rubrik Char";
        mso-style-type:export-only;
        margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        font-size:16.0pt;
        font-family:"Arial","sans-serif";
        mso-fareast-language:EN-US;
        font-weight:bold;}
p.MsoTitleCxSpMiddle, li.MsoTitleCxSpMiddle, div.MsoTitleCxSpMiddle
        {mso-style-priority:10;
        mso-style-link:"Rubrik Char";
        mso-style-type:export-only;
        margin:0cm;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        font-size:16.0pt;
        font-family:"Arial","sans-serif";
        mso-fareast-language:EN-US;
        font-weight:bold;}
p.MsoTitleCxSpLast, li.MsoTitleCxSpLast, div.MsoTitleCxSpLast
        {mso-style-priority:10;
        mso-style-link:"Rubrik Char";
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:15.0pt;
        margin-left:0cm;
        mso-add-space:auto;
        font-size:16.0pt;
        font-family:"Arial","sans-serif";
        mso-fareast-language:EN-US;
        font-weight:bold;}
p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
        {mso-style-priority:11;
        mso-style-link:"Underrubrik Char";
        margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Arial","sans-serif";
        letter-spacing:.75pt;
        mso-fareast-language:EN-US;
        font-weight:bold;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
        {mso-style-priority:1;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";
        mso-fareast-language:EN-US;}
span.Rubrik1Char
        {mso-style-name:"Rubrik 1 Char";
        mso-style-priority:9;
        mso-style-link:"Rubrik 1";
        font-family:"Arial","sans-serif";
        font-weight:bold;}
span.Rubrik2Char
        {mso-style-name:"Rubrik 2 Char";
        mso-style-priority:9;
        mso-style-link:"Rubrik 2";
        font-family:"Arial","sans-serif";
        font-weight:bold;}
span.RubrikChar
        {mso-style-name:"Rubrik Char";
        mso-style-priority:10;
        mso-style-link:Rubrik;
        font-family:"Arial","sans-serif";
        font-weight:bold;}
span.UnderrubrikChar
        {mso-style-name:"Underrubrik Char";
        mso-style-priority:11;
        mso-style-link:Underrubrik;
        font-family:"Arial","sans-serif";
        letter-spacing:.75pt;
        font-weight:bold;}
span.E-postmall24
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.E-postmall25
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:black;}
span.E-postmall26
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="SV" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">I&#8217;m trying to print data to an ascii file using the write_table function.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">My data is a 19x12 matrix (tslice45) that I use to create a list, then trying to write:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">dlist45 = NewList(&quot;lifo&quot;)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">do j=0,nr_columns-1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ListPush(dlist45,(/tslice45(:,j)/))<o:p></o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">end do<o:p></o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">format_string=&quot;%4.2f%4.2f%4.2f%4.2f%4.2f%4.2f%4.2f%4.2f%4.2f%4.2f%4.2f%4.2f&quot;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">write_table(filename,&quot;w&quot;,dlist45,format_string)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">I get a file with what seems to be correct output data, but when looking closer some values are wrong and some values are completely missing! This I found out
 by printing the tslice45 matrix just before creating the list and comparing with the output. The errors seem to occur randomly.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">I have tried changing the format of the data, my script uses double precision as standard so I &nbsp;added the function doubletofloat for tslice45 just before creating
 the list, but it makes no difference.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">What is going on?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">I&#8217;m using NCL v6.1.0.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">Thankful for all help,<br>
Elin<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
</body>
</html>