<div dir="auto">It was ENDVARS at my first attempt. Second time I change it as a testing but in both the cases errors are same.<div dir="auto"><br></div><div dir="auto">Tell me how to fix that two errors.</div><div dir="auto">Or give a sample one for my code.</div><div dir="auto"><br></div><div dir="auto">Arka</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Dec 18, 2017 9:53 PM, "Karin Meier-Fleischer" <<a href="mailto:meier-fleischer@dkrz.de">meier-fleischer@dkrz.de</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Please, reply to the ncl-talk list!<br>
    <br>
    Are you familiar with the array subscripts? NCL array indices start
    with index 0. <br>
    <br>
    The "END VARS" line has to be "ENDVARS"; the index of ctl starts
    with 0.<br>
    <br>
    Correct Tmin.ncl script:<br>
    <br>
    <font color="#3333ff"><tt>;Tmin</tt><tt><br>
      </tt><tt>begin</tt><tt><br>
      </tt><tt>  fn =(/"MINT1971.GRD","MINT1972.<wbr>GRD"/) ; file paths</tt><tt><br>
      </tt><tt>  </tt><tt><br>
      </tt><tt>  ctl=new(8,string)</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  ctl(<b>0</b>)="UNDEF  99.9"</tt><tt><br>
      </tt><tt>  ctl(<b>1</b>)="XDEF  35  LINEAR 66.5 1"</tt><tt><br>
      </tt><tt>  ctl(<b>2</b>)="YDEF  32  LINEAR 6.5  1" </tt><tt><br>
      </tt><tt>  ctl(<b>3</b>)="ZDEF   1  Linear 1 1"</tt><tt><br>
      </tt><tt>;* CHANGE TDEF TO 366 FOR LEAP YEARS </tt><tt><br>
      </tt><tt>  ctl(<b>4</b>)="TDEF 365  LINEAR 1JAN1994 1DY"</tt><tt><br>
      </tt><tt>  ctl(<b>5</b>)="VARS  1"</tt><tt><br>
      </tt><tt>  ctl(<b>6</b>)="T 0 99 DAILYTEMP"</tt><tt><br>
      </tt><tt>  ctl(<b>7</b>)="<b>ENDVARS</b>"</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  do gg = 0,dimsizes(fn)-1 </tt><tt><br>
      </tt><tt>      ctl(0) = "DSET "+fn(gg)</tt><tt><br>
      </tt><tt>      asciiwrite("file.ctl",ctl)</tt><tt><br>
      </tt><tt>      system("cdo -f nc import_binary file.ctl
        "+fn(gg)+".nc")</tt><tt><br>
      </tt><tt>      system("rm file.ctl")   ; optional</tt><tt><br>
      </tt><tt>  end do</tt><tt><br>
      </tt><tt><br>
      </tt><tt>end</tt></font><br>
    <br>
    -Karin<br>
    <br>
    <br>
    <div class="m_6516687254760282339moz-cite-prefix">Am 18.12.17 um 16:51 schrieb Arka
      Banerjee:<br>
    </div><div class="elided-text">
    <blockquote type="cite">
      <div dir="auto">You told me Adam was right.
        <div dir="auto">I also follow the steps if you have seen my
          script.</div>
        <div dir="auto">At the end there will be end but script is nt
          running</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Dec 18, 2017 9:17 PM, "Arka
          Banerjee" <<a href="mailto:arka354deb@gmail.com" target="_blank">arka354deb@gmail.com</a>> wrote:<br type="attribution">
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="auto">Seen already.
              <div dir="auto">But not helpful.</div>
            </div>
            <div class="gmail_extra"><br>
              <div class="gmail_quote">On Dec 18, 2017 9:15 PM, "Karin
                Meier-Fleischer" <<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>>
                wrote:<br type="attribution">
                <blockquote class="m_6516687254760282339m_3269425221698160371quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div text="#000000" bgcolor="#FFFFFF"> Have you seen
                    the example <a class="m_6516687254760282339m_3269425221698160371m_506550997051548854moz-txt-link-freetext" href="https://www.ncl.ucar.edu/Applications/Scripts/grads_2.ncl" target="_blank">https://www.ncl.ucar.edu/Appli<wbr>cations/Scripts/grads_2.ncl</a><br>
                    <br>
                    The script reads the same simple GrADS file in <b>
                      Example 1</b> but creates a netCDF file and plots
                    the data. The creation of netCDF necessitates the
                    creation of coordinate variables and other
                    information.<br>
                    <br>
                    -Karin<br>
                    <br>
                    <div class="m_6516687254760282339m_3269425221698160371m_506550997051548854moz-cite-prefix">Am
                      18.12.17 um 16:40 schrieb Karin Meier-Fleischer:<br>
                    </div>
                    <div class="m_6516687254760282339m_3269425221698160371elided-text">
                      <blockquote type="cite"> Hi Arka, <br>
                        <br>
                        please, don't send the same question again by
                        changing the subject! And always reply to the
                        ncl-talk mailing list.<br>
                        <br>
                        If you don't have the CDOs available, hopefully
                        you have Ruby installed. See<br>
                        <a class="m_6516687254760282339m_3269425221698160371m_506550997051548854moz-txt-link-freetext" href="https://www.ncl.ucar.edu/Applications/grads.shtml#ruby" target="_blank">https://www.ncl.ucar.edu/Appli<wbr>cations/grads.shtml#ruby</a><br>
                        <br>
                        The hardest way would be to write a program e.g.
                        Fortran to read the GrADS binary and write
                        netCDF using the netCDF library.<br>
                        <br>
                        Maybe you should install CDO, see <a class="m_6516687254760282339m_3269425221698160371m_506550997051548854moz-txt-link-freetext" href="https://code.mpimet.mpg.de/projects/cdo/wiki#Installation-and-Supported-Platforms" target="_blank">https://code.mpimet.mpg.de/pro<wbr>jects/cdo/wiki#Installation-an<wbr>d-Supported-Platforms</a><br>
                        <br>
                        -Karin<br>
                        <br>
                        <div class="m_6516687254760282339m_3269425221698160371m_506550997051548854moz-cite-prefix">Am
                          18.12.17 um 07:28 schrieb Arka Banerjee:<br>
                        </div>
                        <blockquote type="cite">
                          <div dir="ltr">Hi,
                            <div><br>
                            </div>
                            <div><span style="font-size:12.8px">I’d like
                                to convert data from .grd files to
                                netcdf files using a CTL file. If
                                somebody has the solution for it
                                please inform me.</span><br>
                            </div>
                            <div><span style="font-size:12.8px"><br>
                              </span></div>
                            <div><span style="font-size:12.8px"><br>
                              </span></div>
                            <div><span style="font-size:12.8px">Thanks</span></div>
                            <div><span style="font-size:12.8px"><br>
                              </span></div>
                            <div><span style="font-size:12.8px">Arka</span></div>
                          </div>
                          <br>
                          <fieldset class="m_6516687254760282339m_3269425221698160371m_506550997051548854mimeAttachmentHeader"></fieldset>
                          <br>
                          <pre>______________________________<wbr>_________________
ncl-talk mailing list
<a class="m_6516687254760282339m_3269425221698160371m_506550997051548854moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="m_6516687254760282339m_3269425221698160371m_506550997051548854moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a>
</pre>
                        </blockquote>
                        <br>
                        <br>
                        <fieldset class="m_6516687254760282339m_3269425221698160371m_506550997051548854mimeAttachmentHeader"></fieldset>
                        <br>
                        <pre>______________________________<wbr>_________________
ncl-talk mailing list
<a class="m_6516687254760282339m_3269425221698160371m_506550997051548854moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="m_6516687254760282339m_3269425221698160371m_506550997051548854moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a>
</pre>
                      </blockquote>
                      <br>
                    </div>
                  </div>
                  <br>
                  ______________________________<wbr>_________________<br>
                  ncl-talk mailing list<br>
                  <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
                  List instructions, subscriber options, unsubscribe:<br>
                  <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
                  <br>
                </blockquote>
              </div>
              <br>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <pre class="m_6516687254760282339moz-signature" cols="72">
</pre>
  </div></div>

</blockquote></div><br></div>