<div dir="ltr">Here i attached scripts which i am trying to get the  ascii to netcdf conversion. <br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio &amp; Atmospheric Science Division <br></div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br><br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div>
<br><div class="gmail_quote">On Tue, Sep 23, 2014 at 11:03 PM, Karin Meier-Fleischer <span dir="ltr">&lt;<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Kunal,<div><br></div><div>could you provide the data file and your script. </div><div><br></div><div>Bye,</div><div>Karin</div><div><br></div><div><br><div><div>Am 23.09.2014 um 19:05 schrieb Kunal Bali &lt;<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>&gt;:</div><div><div class="h5"><br><blockquote type="cite"><div dir="ltr"><div>Dear NCL users<br><br></div>I tried previous mail scripts for converting ASCII to netcdf format , the file is generating but its without data points.Only variable names generating. <br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio &amp; Atmospheric Science Division <br></div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br><br></div><div><br></div><div><br></div><div><br></div><div><div style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></div></div></div></div>
<br><div class="gmail_quote">On Tue, Sep 23, 2014 at 1:28 PM, Karin Meier-Fleischer <span dir="ltr">&lt;<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Kunal,<br>
    <br>
    the answer was given in an earlier mail:<br>
    <br>
    <tt>1. read the ASCII data variable, lat and lon<br>
      2. create a output file:                         netcdf =
      addfile(&quot;<a href="http://simple.nc/" target="_blank">simple.nc</a>&quot;,&quot;c&quot;)</tt><tt><br>
    </tt><tt>3. write your data variable to the output file:  </tt><tt>ncdf-&gt;values
      = values</tt><br>
    <br>
    <br>
    Please read the &#39;output to netcdf&#39; examples for more details:<br>
    <a href="http://ncl.ucar.edu/Applications/o-netcdf.shtml" target="_blank">http://ncl.ucar.edu/Applications/o-netcdf.shtml</a><br>
    <br>
    Bye,<br>
    Karin<br>
    <br>
    <div>Am 23.09.14 07:04, schrieb Kunal Bali:<br>
    </div><div><div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Dear NCL users<br>
          <br>
        </div>
        I am still not getting how to do the conversion from ASCII to
        netcdf ??<br>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div dir="ltr">
            <div>Kunal Bali<br>
            </div>
            <div>Research Scholar <br>
            </div>
            <div>Radio &amp; Atmospheric Science Division <br>
            </div>
            <div>CSIR - National Physical Laboratory<br>
            </div>
            <div>New Delhi - 110012<br>
              <br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div><div style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br>
                </font></div>
            </div>
          </div>
        </div>
        <br>
        <div class="gmail_quote">On Mon, Sep 22, 2014 at 7:35 PM,
          Yuqiang Zhang <span dir="ltr">&lt;<a href="mailto:yuqiangzhang.thu@gmail.com" target="_blank">yuqiangzhang.thu@gmail.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 link="blue" vlink="purple" lang="EN-US">
              <div><p class="MsoNormal"><span style="color:#1f497d">Hi
                    Kunal,</span></p><div><span style="color:#1f497d"> </span><br></div><p class="MsoNormal"><span style="color:#1f497d">In line
                    30, “</span><b>ncl 30&gt; TotCH4_A = data(:,2)</b> “.
                  You variable “TotCH4_A” is only assigned one
                  dimension’s value, so you can’t assign two dimension
                  through line 33 &amp; 34. <span style="color:#1f497d"></span></p>
                <span><div><span style="color:#1f497d"> </span><br></div><p class="MsoNormal"><span style="color:#1f497d">Regards,</span></p><p class="MsoNormal"><span style="color:#1f497d">Yuqiang</span></p><div><span style="color:#1f497d"> </span><br></div><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
                      <a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>
                      [mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>] <b>On
                        Behalf Of </b>Kunal Bali<br>
                      <b>Sent:</b> Monday, September 22, 2014 8:53 AM<br>
                      <b>To:</b> Karin Meier-Fleischer<br>
                      <b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
                      <b>Subject:</b> Re: [ncl-talk] query ( CONVERSION
                      ASCII TO NetCDF)</span></p><div> <br></div>
                </span>
                <div>
                  <div><p class="MsoNormal">Dear NCL user </p>
                  </div>
                  <div>
                    <div><p class="MsoNormal">I tried this script from NCL
                        but still getting error </p>
                      <div>
                        <div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>
                            ncl 28&gt; Longitude = data(:,1)<br>
                            ncl 29&gt; Latitude = data(:,0)  <br>
                            ncl 30&gt; TotCH4_A = data(:,2)  <br>
                            ncl 31&gt; ncdf = addfile(&quot;/home/kunal/<a href="http://simple1.nc/" target="_blank">simple1.nc</a>&quot;,&quot;c&quot;)<br>
                            ncl 32&gt;
                            filedimdef(ncdf,&quot;time&quot;,-1,True)             
                            <br>
                            ncl 33&gt; TotCH4_A!0 = &quot;Latitude&quot;<br>
                            ncl 34&gt; TotCH4_A!1 = &quot;Longitude&quot;<br>
                            <b>fatal:Variable (TotCH4_A) has (1)
                              dimensions can not write to dimension (1)<br>
                              fatal:[&quot;Execute.c&quot;:8565]:Execute: Error
                              occurred at or near line 34<br>
                            </b><br>
                            <br>
                          </p>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <div>
                  <div>
                    <div><p class="MsoNormal"><br clear="all">
                      </p>
                      <div>
                        <div>
                          <div><p class="MsoNormal">Kunal Bali</p>
                          </div>
                          <div><p class="MsoNormal">Research Scholar </p>
                          </div>
                          <div><p class="MsoNormal">Radio &amp; Atmospheric
                              Science Division </p>
                          </div>
                          <div><p class="MsoNormal">CSIR - National
                              Physical Laboratory</p>
                          </div>
                          <div><p class="MsoNormal" style="margin-bottom:12.0pt">New Delhi -
                              110012</p>
                          </div>
                          <div><div> <br></div>
                          </div>
                          <div><div> <br></div>
                          </div>
                          <div><div> <br></div>
                          </div>
                          <div><p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> </span></p>
                          </div>
                        </div>
                      </div><div> <br></div>
                      <div><p class="MsoNormal">On Mon, Sep 22, 2014 at
                          5:32 PM, Karin Meier-Fleischer &lt;<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>&gt;
                          wrote:</p>
                        <div>
                          <div><p class="MsoNormal">Hi Kunal,</p>
                          </div>
                          <div><div> <br></div>
                          </div>
                          <div><p class="MsoNormal">Please, take a look at
                              the &#39;output netcdf&#39; examples page,
                              method_1</p>
                          </div>
                          <div><div> <br></div>
                          </div>
                          <div><p class="MsoNormal"><a href="http://ncl.ucar.edu/Applications/method_1.shtml" target="_blank">http://ncl.ucar.edu/Applications/method_1.shtml</a><br>
                              <br>
                              Try this:</p>
                          </div>
                          <div><div> <br></div>
                          </div>
                          <div><div> <br></div>
                          </div>
                          <div><p class="MsoNormal">lat = data(:,0)</p>
                          </div>
                          <div><p class="MsoNormal">lat = data(:,1)</p>
                          </div>
                          <div><p class="MsoNormal">values= data(:,2)</p>
                          </div>
                          <div><p class="MsoNormal"><a href="http://ncl.ucar.edu/Document/Functions/Built-in/system.shtml" target="_blank"><span style="text-decoration:none">system</span></a>(&quot;/bin/rm
                              -f <a href="http://simple.nc/" target="_blank">simple.nc</a>&quot;)
                              ; remove any pre-existing file </p>
                          </div>
                          <div>
                            <div style="border:solid windowtext 1.0pt;border-bottom:solid windowtext 6.0pt;padding:0in 0in 0in 0in">
                              <pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:&quot;UICTFontTextStyleBody&quot;,&quot;serif&quot;">ncdf = addfile(&quot;<a href="http://simple.nc/" target="_blank">simple.nc</a>&quot; ,&quot;c&quot;) ; output netCDF file</span></pre>
                              <pre style="border:none;padding:0in;border-color:transparent"><a href="http://ncl.ucar.edu/Document/Functions/Built-in/filedimdef.shtml" target="_blank"><span style="font-family:&quot;UICTFontTextStyleBody&quot;,&quot;serif&quot;;text-decoration:none">filedimdef</span></a><span style="font-family:&quot;UICTFontTextStyleBody&quot;,&quot;serif&quot;">(ncdf,&quot;time&quot;,-1,True) ; recommended</span></pre>
                              <pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:&quot;UICTFontTextStyleBody&quot;,&quot;serif&quot;">values!0 = &quot;lat&quot;</span></pre>
                              <pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:&quot;UICTFontTextStyleBody&quot;,&quot;serif&quot;">values!1 = &quot;lon&quot;</span></pre>
                              <pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:&quot;UICTFontTextStyleBody&quot;,&quot;serif&quot;">values&amp;lat = lat</span></pre>
                              <pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:&quot;UICTFontTextStyleBody&quot;,&quot;serif&quot;">values&amp;lon = lon </span></pre>
                              <pre style="border:none;padding:0in;border-color:transparent"><span style="font-family:&quot;UICTFontTextStyleBody&quot;,&quot;serif&quot;">ncdf-&gt;values = values</span></pre>
                            </div>
                          </div>
                          <div><div> <br></div>
                          </div>
                          <div><p class="MsoNormal">Bye, Karin</p>
                          </div>
                          <div>
                            <div><div> <br></div>
                            </div>
                          </div>
                          <div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>
                              Am 22.09.2014 um 11:40 schrieb Kunal Bali
                              &lt;<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>&gt;:</p>
                          </div>
                          <div>
                            <div>
                              <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                                <div>
                                  <div>
                                    <div>
                                      <div>
                                        <div>
                                          <div>
                                            <div><p class="MsoNormal" style="margin-bottom:12.0pt">Dear
                                                NCL users</p>
                                            </div><p class="MsoNormal" style="margin-bottom:12.0pt">I
                                              want to convert ASCII to
                                              .nc file format. Could any
                                              one please provides me the
                                              link for this query or
                                              give any detail about this
                                              ??</p>
                                          </div><p class="MsoNormal">I have
                                            data in 3 column ( Latitude
                                            Longitude Values)</p>
                                        </div><p class="MsoNormal" style="margin-bottom:12.0pt">More
                                          Detail<br>
                                          <br>
                                          <b>Variable: data<br>
                                            Type: float<br>
                                            Total Size: 777600 bytes<br>
                                                        194400 values<br>
                                            Number of Dimensions: 2<br>
                                            Dimensions and sizes:   
                                            [64800] x [3]<br>
                                            Coordinates: <br>
                                            Number Of Attributes: 1<br>
                                              _FillValue :   
                                            9.96921e+36<br>
                                            <br>
                                          </b></p>
                                      </div><p class="MsoNormal" style="margin-bottom:12.0pt"><b>So
                                          is there any ways to convert
                                          ASCII to netcdf format ???</b></p>
                                    </div><p class="MsoNormal"><b>Thank You</b></p>
                                    <div>
                                      <div>
                                        <div><p class="MsoNormal"><br clear="all">
                                          </p>
                                          <div>
                                            <div>
                                              <div>
                                                <div>
                                                  <div>
                                                    <div>
                                                      <div><p class="MsoNormal">Kunal
                                                          Bali</p>
                                                      </div>
                                                      <div><p class="MsoNormal">Research
                                                          Scholar </p>
                                                      </div>
                                                      <div><p class="MsoNormal">Radio
                                                          &amp;
                                                          Atmospheric
                                                          Science
                                                          Division </p>
                                                      </div>
                                                      <div><p class="MsoNormal">CSIR
                                                          - National
                                                          Physical
                                                          Laboratory</p>
                                                      </div>
                                                      <div><p class="MsoNormal" style="margin-bottom:12.0pt">New Delhi - 110012</p>
                                                      </div>
                                                      <div><div> <br></div>
                                                      </div>
                                                      <div><div> <br></div>
                                                      </div>
                                                      <div><div> <br></div>
                                                      </div>
                                                      <div><p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> </span></p>
                                                      </div>
                                                    </div>
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                          </div>
                          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                            <div><p class="MsoNormal">_______________________________________________<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></p>
                            </div>
                          </blockquote>
                        </div>
                      </div><div> <br></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
    </blockquote>
  </div></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>
_______________________________________________<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></blockquote></div></div></div><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word"><span style="border-collapse:separate;font-family:Helvetica;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word">____________________________________</div></span><span style="font-size:13px;font-family:&#39;Courier New&#39;">Dipl. Geophys. Karin Meier-Fleischer</span></div></span><div><font face="Courier New"><span style="font-size:13px">Visualisierung</span></font></div><div><font face="Courier New"><span style="font-size:13px">Abteilung Anwendungen</span></font></div><div><font face="Courier New"><span style="font-size:13px"><br></span></font></div><div><font face="Courier New"><span style="font-size:13px">Deutsches Klimarechenzentrum GmbH (DKRZ)</span></font></div><div><font face="Courier New"><span style="font-size:13px">Bundesstrasse 45a * D-</span></font><span style="font-size:13px;font-family:&#39;Courier New&#39;;text-align:-webkit-auto">20146 Hamburg                          </span></div><div><font face="Courier New"><span style="font-size:13px">Germany                                </span></font></div><div><font face="Courier New"><span style="font-size:13px"><br></span></font></div><div><span style="font-family:&#39;Courier New&#39;;font-size:13px">Phone:<span style="white-space:pre-wrap">        </span><a href="tel:%2B49%20%280%2940%20460094%20126" value="+4940460094126" target="_blank">+49 (0)40 460094 126</a></span></div><div><div><span style="font-family:&#39;Courier New&#39;;font-size:13px;text-align:-webkit-auto">Fax:<span style="white-space:pre-wrap">        </span><a href="tel:%2B49%20%280%2940%20460094%20270" value="+4940460094270" target="_blank">+49 (0)40 460094 270</a></span></div><div><font face="Courier New"><span style="font-size:13px">E-Mail:<span style="white-space:pre-wrap">        </span></span></font><span style="font-size:13px;font-family:&#39;Courier New&#39;;text-align:-webkit-auto"><a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a></span></div></div><div><font face="Courier New"><span style="font-size:13px">URL:<span style="white-space:pre-wrap">        </span></span></font><span style="text-align:-webkit-auto;font-size:13px;font-family:&#39;Courier New&#39;"><a href="http://www.dkrz.de/" target="_blank">http://www.dkrz.de/</a></span></div><div><font face="Courier New"><span style="font-size:13px"><br></span></font></div><div><font face="Courier New"><span style="font-size:13px">Geschäftsführer: Prof. Dr. Thomas Ludwig</span></font></div><div><font face="Courier New"><span style="font-size:13px">Sitz der Gesellschaft: Hamburg</span></font></div><div><font face="Courier New"><span style="font-size:13px">Amtsgericht Hamburg HRB 39784</span></font></div><div><br></div></div></span></div></div></div></div></div><br><br>
</div>
<br></div></div></blockquote></div><br></div>