<div dir="ltr"><div dir="ltr">NCL Support,<div><br></div><div>Suggestion. Please update read<span style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt">AsciiTable and similar text input functions to automatically recognize and remove both DOS and Unix line endings. Thanks.</span></div><div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt"><br></span></div><div><span style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt">--Dave</span></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 8, 2018 at 2:07 PM, xiaoming Hu <span dir="ltr"><<a href="mailto:yuanfangcan@hotmail.com" target="_blank">yuanfangcan@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hello <span style="color:rgb(33,33,33);font-family:monospace;font-size:13.3333px;background-color:rgb(255,255,255);display:inline">Stavros</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(33,33,33);font-family:monospace;font-size:13.3333px;background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(33,33,33);font-family:monospace;font-size:13.3333px;background-color:rgb(255,255,255);display:inline">You are right, if I do dos2unix, I remove one ^M at each line, and do another dos2unix and remove the other
^M at each line. </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(33,33,33);font-family:monospace;font-size:13.3333px;background-color:rgb(255,255,255);display:inline">So to be safe, I probably need to do once or twice dos2unix before I readAsciiTable</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(33,33,33);font-family:monospace;font-size:13.3333px;background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(33,33,33);font-family:monospace;font-size:13.3333px;background-color:rgb(255,255,255);display:inline">Thanks a lot!</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(33,33,33);font-family:monospace;font-size:13.3333px;background-color:rgb(255,255,255);display:inline">Xiaoming </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8393165484557810320divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> sdafis <<a href="mailto:sdafis@noa.gr" target="_blank">sdafis@noa.gr</a>><br>
<b>Sent:</b> Thursday, November 8, 2018 2:58 PM<br></font><div><br></div>
</div>
<div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Hi Xiaoming, </p>
<p>It seems that you are trying to read a file DOS line endings. You must convert it to Unix type, so I suggest using a software like dos2unix:<br>
<a href="http://dos2unix.sourceforge.net/" target="_blank">http://dos2unix.sourceforge.<wbr>net/</a></p>
<p>There are plenty of other ways of converting the file. Then NCL will read the file without problems.</p>
<p>Good luck!</p>
<p></p><div class="gmail-m_8393165484557810320x_pre" style="margin:0px;padding:0px;font-family:monospace"><br></div>
<p><span style="font-size:10pt">Στις 2018-11-08 21:50, xiaoming Hu έγραψε:</span><br></p>
<blockquote type="cite" style="padding:0px 0.4em;border-left-width:2px;border-left-style:solid;border-left-color:rgb(16,16,255);margin:0px">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hello</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I have trouble to readAsciiTable the following data: </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span>VERSION 03.30^M^M<br>
</span>
<div>54342 0123.5167 041.7333 0052.5^M^M</div>
<div>GFE(L)-1 12.2 GTS1 -00262833792 028 0750 0400 2650 1500 352^M^M</div>
<div>026.0 026.0 00.0 1000.7 1001.2 -0.5 068 065 03 1^M^M</div>
<div>20130714111522 20130714192922 20130714123100 20130714123100 06 06 26985 25904 002.00 28.1 1000.7 069 000 000.0 010.0 00 // // 000 10- // // // 090.00 -01.00 070.00^M^M</div>
<div>ZCZC SECOND^M^M</div>
<div>TimeStep T Press RH angle direction distance delta_lon delta_lat xx xx xx</div>
<div> 0.000 28.100 1000.700 69.000 -1.000 90.000 0.070 0.000 0.000 0.000 0.000 52.000</div>
<div> 1.000 -999.000 -999.000 -999.000 3.370 67.810 0.108 0.000 0.000 0.000 0.000 64.000</div>
<div> 2.000 -999.000 -999.000 -999.000 3.970 67.620 0.108 0.000 0.000 0.000 0.000 69.000</div>
<span></span>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</div>
see:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span>ncl 8> data_second = readAsciiTable("Z_UPAR_I_<wbr>54342_20130712111513_O_TEMP-L.<wbr>txt.SECOND", 12, "float", 7) <br>
</span>
<div>warning:asciiread: End of file reached and only (76173) elements were read from the file, filling remaining elements with the default missing value for the requested type</div>
<div>ncl 9> print(data_second(:2,0)) </div>
<div> </div>
<div> </div>
<div>Variable: data_second (subsection)</div>
<div>Type: float</div>
<div>Total Size: 12 bytes</div>
<div> 3 values</div>
<div>Number of Dimensions: 1</div>
<div>Dimensions and sizes: [3]</div>
<div>Coordinates: </div>
<div>Number Of Attributes: 1</div>
<div> _FillValue : 9.96921e+36</div>
<div>(0) 2.013071e+13</div>
<div>(1) 315</div>
<div>(2) 70</div>
<span></span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
It appears NCL treated ^M^M as an additional line. </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
How can I tell NCL to treat ^M as characters? </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Xiaoming</div></blockquote></div></div></blockquote></div></div></div></div>