<div dir="ltr"><div class="gmail_default" style="font-size:small">If I understand what you&#39;re asking, then &quot;write_table&quot; is probably what you need:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/write_table.shtml">http://www.ncl.ucar.edu/Document/Functions/Built-in/write_table.shtml</a><br></div><div class="gmail_default" style><br></div><div class="gmail_default" style>See the &quot;examples&quot; section.</div><div class="gmail_default" style><br></div><div class="gmail_default" style>Or, a very simple script:</div><div class="gmail_default" style><br></div><div class="gmail_default" style>







<p class=""><font face="courier new, monospace">years  = (/2006,2006,2006/)<br>months = (/   1,    1,   1/)<br>days   = (/   1,    2,   3/)<br>ntime  = dimsizes(years)</font></p><p class=""><font face="courier new, monospace">lines = new(ntime+1,string)</font></p><p class=""><font face="courier new, monospace">;---header<br>lines(0) = &quot;year,month,day&quot;</font></p><p class=""><font face="courier new, monospace">;--rest of values<br>do i=0,ntime-1<br>  lines(i+1) = str_join((/years(i),months(i),days(i)/),&quot;,&quot;)<br>end do</font></p><p class=""><font face="courier new, monospace">asciiwrite(&quot;test.csv&quot;,lines)<br></font></p><div>Or, see other ASCII writing examples at:</div><div><br></div><div><a href="http://www.ncl.ucar.edu/Applications/o-ascii.shtml">http://www.ncl.ucar.edu/Applications/o-ascii.shtml</a><br></div></div><div class="gmail_default" style><br></div><div class="gmail_default" style>--Mary</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 24, 2014 at 1:51 AM, azizul haque <span dir="ltr">&lt;<a href="mailto:haque.azizul320@yahoo.com" target="_blank">haque.azizul320@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:times new roman,new york,times,serif;font-size:10px"><div>Hi NCL User,</div><div>I need to convert a netcdf time dimension to csv in the following excel format. Your suggestion are highly appreciated.</div><div><br></div><div style="color:rgb(0,0,0);font-size:10px;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;background-color:transparent;font-style:normal">Regards</div><div style="color:rgb(0,0,0);font-size:10px;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;background-color:transparent;font-style:normal">Azizul</div><div>year                                                 month              
              day                 precipitation</div><div style="color:rgb(0,0,0);font-size:10px;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;background-color:transparent;font-style:normal"><br>









</div><table border="0" cellpadding="0" cellspacing="0" width="260" style="border-collapse:collapse;width:260pt">

 <colgroup><col width="65" span="4" style="width:65pt">
 </colgroup><tbody><tr height="15" style="height:15.0pt">
  <td height="15" width="65" style="height:15.0pt;width:65pt">        2006</td>
  <td align="right" width="65" style="width:65pt">1</td>
  <td align="right" width="65" style="width:65pt">1</td>
  <td align="right" width="65" style="width:65pt">1.84E-02</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">2</td>
  <td align="right">1.64E-01</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">3</td>
  <td align="right">7.19E-04</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">4</td>
  <td align="right">1.10E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">5</td>
  <td align="right">1.64E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">6</td>
  <td align="right">1.04E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">7</td>
  <td align="right">1.50E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">8</td>
  <td align="right">1.90E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">9</td>
  <td align="right">2.03E-01</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">10</td>
  <td align="right">5.19E-01</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">11</td>
  <td align="right">1.30E-01</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">12</td>
  <td align="right">1.34E-02</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">13</td>
  <td align="right">2.46E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">14</td>
  <td align="right">2.12E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">15</td>
  <td align="right">2.27E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">16</td>
  <td align="right">2.50E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">17</td>
  <td align="right">1.62E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">18</td>
  <td align="right">1.10E-03</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" style="height:15.0pt">        2006</td>
  <td align="right">1</td>
  <td align="right">19</td>
  <td align="right">1.11E-03</td>
 </tr>

</tbody></table></div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>