<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body 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/">http://dos2unix.sourceforge.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><br />-- </p>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Stavros NTAFIS (DAFIS)<br />-----------------------------------------------<br />Physicist - Meteorologist, M.Sc.<br />Ph.D. Candidate, Polytechnic School of Paris, France<br />Laboratory of Dynamic Meteorology (LMD)<br />Research Associate, National Observatory of Athens (NOA/IERSD)<br />Tel. : (+33)1 69 33 51 64<br />(+33)9 81 94 22 12<br />Mobile: (+33) 066 030 0147<br />(+30) 697 04 20 242<br />---------------<br />Weather charts:<br /> <a href="http://www.meteo.gr" target="_blank" rel="noopener noreferrer">http://www.meteo.gr</a><br /> <a href="http://www.meteo.gr/meteomaps/" target="_blank" rel="noopener noreferrer">http://www.meteo.gr/meteomaps/</a></div>
<p><br /></p>
<p><br /></p>
<p>Στις 2018-11-08 21:50, xiaoming Hu έγραψε:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --> <!-- head ignored --><!-- meta ignored -->
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: #000000;">Hello</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: #000000;">  I have trouble to readAsciiTable   the following data: </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: #000000;"><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: #000000;"> </div>
see:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: #000000;"><span>ncl 8> data_second = readAsciiTable("Z_UPAR_I_54342_20130712111513_O_TEMP-L.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: #000000;"> </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: #000000;">It appears NCL  treated   ^M^M   as an additional line. </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: #000000;">How can I tell NCL to treat ^M as characters? </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: #000000;">Thanks</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: #000000;">Xiaoming </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: #000000;"> </div>
<!-- html ignored --><br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> ncl-talk mailing list<br /> <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br /> List instructions, subscriber options, unsubscribe:<br /> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" rel="noopener noreferrer">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></div>
</blockquote>
<p><br /></p>

</body></html>