<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Mehwish,<br>
    <br>
    I think the problem is your file names contain different decades, so
    in your .ctl file where you have:<br>
    <br>
    DSET&nbsp; cru_ts3.21.%x31.%x30.tmp.dat.nc<br>
    <br>
    the %x3 will be the same.&nbsp; For example, the first time through the
    substitution will be 197, or<br>
    <br>
    DSET cru_ts3.21.1971.1970.tmp.dat.nc<br>
    <br>
    One way around this would be to instead use chsub:<br>
    <br>
    DSET ^cru_ts3.21.%ch.tmp.dat.nc<br>
    CHSUB&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; 120 1971.1980<br>
    CHSUB 121&nbsp; 240 1981.1990<br>
    CHSUB 241&nbsp; 360 1991.2000<br>
    OPTIONS template<br>
    DTYPE netcdf<br>
    <br>
    More details at <a class="moz-txt-link-freetext" href="http://www.iges.org/grads/gadoc/templates.html">http://www.iges.org/grads/gadoc/templates.html</a><br>
    <br>
    Jim<br>
    <br>
    <div class="moz-cite-prefix">On 5/11/14 9:02 PM, Malleswararao
      Maguluri wrote:<br>
    </div>
    <blockquote
cite="mid:CAM+Tnx3i9UMyH2DnNDyW4YBm7PvTQB6bJVYYx1HqZt4gjih_Xg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Hi,<br>
            <br>
          </div>
          &nbsp;&nbsp; Better to use cdo for calculating climatology. otherwise
          you can combine your decadal files as a single file using cat
          command in cdo and use it as input to grads.<br>
          <br>
        </div>
        Thanks &amp; regards,<br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Mon, May 12, 2014 at 12:18 PM,
          mehwish ramzan <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:mehwish.ramzan@gmail.com" target="_blank">mehwish.ramzan@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 dir="ltr">
              <div>Dear GrADS community,</div>
              <div><br>
              </div>
              <div>I am trying to&nbsp;merge multiple netcdf files into one
                control&nbsp;file so that i can calculate the climatology of
                25 years. The data is available in decadal format like
                this;</div>
              <div><br>
              </div>
              <div>&nbsp;<font color="#0000ff"><a moz-do-not-send="true"
                    href="http://cru_ts3.21.1971.1980.tmp.dat.nc"
                    target="_blank">cru_ts3.21.1971.1980.tmp.dat.nc</a>
                </font></div>
              <div><font color="#0000ff">&nbsp;<a moz-do-not-send="true"
                    href="http://cru_ts3.21.1981.1990.tmp.dat.nc"
                    target="_blank">cru_ts3.21.1981.1990.tmp.dat.nc</a></font></div>
              <div><font color="#0000ff">&nbsp;<a moz-do-not-send="true"
                    href="http://cru_ts3.21.1991.2000.tmp.dat.nc"
                    target="_blank">cru_ts3.21.1991.2000.tmp.dat.nc</a></font></div>
              <div><font color="#0000ff">&nbsp;<a moz-do-not-send="true"
                    href="http://cru_ts3.21.1991.2000.tmp.dat.nc"
                    target="_blank">cru_ts3.21.1991.2000.tmp.dat.nc</a></font></div>
              <div><br>
              </div>
              <div>while the information of one .nc file is as;</div>
              <div><br>
              </div>
              <div><font size="3" color="#000000" face="Times New Roman">
                </font><font size="3" color="#000000" face="Times New
                  Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font size="3"
                    color="#0000ff" face="Calibri">File 1 : CRU TS3.21
                    Mean Temperature</font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font face="Calibri"><font
                      color="#0000ff"><font size="3">&nbsp; </font><font
                        size="3">Descriptor:
                        <a moz-do-not-send="true"
                          href="http://cru_ts3.21.1971.1980.tmp.dat.nc"
                          target="_blank">cru_ts3.21.1971.1980.tmp.dat.nc</a></font></font></font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font face="Calibri"><font
                      color="#0000ff"><font size="3">&nbsp; </font><font
                        size="3">Binary:
                        <a moz-do-not-send="true"
                          href="http://cru_ts3.21.1971.1980.tmp.dat.nc"
                          target="_blank">cru_ts3.21.1971.1980.tmp.dat.nc</a></font></font></font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font face="Calibri"><font
                      color="#0000ff"><font size="3">&nbsp; </font><font
                        size="3">Type = Gridded</font></font></font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font face="Calibri"><font
                      color="#0000ff"><font size="3">&nbsp; </font><font
                        size="3">Xsize = 720</font><font size="3">&nbsp; </font><font
                        size="3">Ysize = 360</font><font size="3">&nbsp;
                      </font><font size="3">Zsize = 1</font><font
                        size="3">&nbsp; </font><font size="3">Tsize = 120</font></font></font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font face="Calibri"><font
                      color="#0000ff"><font size="3">&nbsp; </font><font
                        size="3">Number of Variables
                        = 1</font></font></font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font face="Calibri"><font
                      color="#0000ff"><font size="3">&nbsp;&nbsp;&nbsp;<font
                          color="#0000ff"> </font></font><font size="3"
                        color="#0000ff">tmp 0 -999
                        near-surface temperature</font></font></font></p>
                <font size="3" color="#000000" face="Times New Roman">
                </font></div>
              <div>&nbsp;</div>
              <div>By following some previous posts regarding same
                issue, according to my understanding i prepared one ctl
                file which can be used as a combination of above four
                separate files. The .ctl file is as follows;</div>
              <div><br>
                <font size="3" color="#000000" face="Times New Roman">
                </font></div>
              <div>
                <p style="margin:0in 0in 10pt"><font face="Calibri"><font
                      color="#0000ff"><font size="3" color="#000000">DSET</font><font
                        size="3">&nbsp;
                      </font><font size="3">cru_ts3.21.%x31.%<a
                          moz-do-not-send="true"
                          href="http://x30.tmp.dat.nc" target="_blank">x30.tmp.dat.nc</a></font></font></font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font size="3"
                    color="#0000ff" face="Calibri">OPTIONS template</font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font size="3"
                    color="#0000ff" face="Calibri">DTYPE netcdf</font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font size="3"
                    color="#0000ff" face="Calibri">XDEF 720 linear
                    -89.75 89.75</font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font size="3"
                    color="#0000ff" face="Calibri">YDEF 360 linear 0 360</font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font face="Calibri"><font
                      color="#0000ff"><font size="3">ZDEF</font><font
                        size="3">&nbsp;&nbsp; </font><font size="3">1 linear 1000</font></font></font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font size="3"
                    color="#0000ff" face="Calibri">TDEF 480 linear
                    jan1971 1mo</font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font size="3"
                    color="#0000ff" face="Calibri">vars 1</font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font face="Calibri"><font
                      color="#0000ff"><font size="3">tmp 0</font><font
                        size="3">&nbsp; </font><font size="3">99
                        near-surface
                        temperature</font></font></font></p>
                <font size="3" color="#0000ff" face="Times New Roman">
                </font>
                <p style="margin:0in 0in 10pt"><font size="3"
                    color="#0000ff" face="Calibri">endvars</font></p>
                <p style="margin:0in 0in 10pt"><br>
                </p>
                <p style="margin:0in 0in 10pt">
                  <font size="3" color="#000000" face="Calibri">But when
                    i tried to open this control file. It give error
                    message;</font></p>
                <font size="3" color="#000000" face="Calibri">
                  <p style="margin:0in 0in 10pt"><font color="#0000ff">Invalid
                      variable
                      record</font></p>
                  <p style="margin:0in 0in 10pt"><font color="#0000ff">&nbsp;
                      --&gt; The invalid
                      description file record is:</font></p>
                  <p style="margin:0in 0in 10pt"><font color="#0000ff">&nbsp;
                      --&gt; tmp 0 -999
                      near-surface temperature</font></p>
                  <p style="margin:0in 0in 10pt"><font color="#0000ff">&nbsp;
                      The data file was
                      not opened.</font></p>
                  <p style="margin:0in 0in 10pt"><font face="Times New
                      Roman">
                      I know i am making mistake in&nbsp;preparing ctl file&nbsp;
                      but i don't know how to put right information ?</font></p>
                  <p style="margin:0in 0in 10pt"><font face="Times New
                      Roman">Please help me in solving this issue.</font></p>
                  <p style="margin:0in 0in 10pt"><br>
                  </p>
                  <p style="margin:0in 0in 10pt"><font face="Times New
                      Roman">Thank You</font></p>
                  <p style="margin:0in 0in 10pt"><br>
                  </p>
                  <p style="margin:0in 0in 10pt"><font face="Times New
                      Roman">With Best Regards,</font></p>
                  <p style="margin:0in 0in 10pt"><br>
                  </p>
                  <p style="margin:0in 0in 10pt"><font face="Times New
                      Roman">Mehwish</font></p>
                </font>
                <p style="margin:0in 0in 10pt"><br>
                </p>
                <p style="margin:0in 0in 10pt"><br>
                </p>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            gradsusr mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
            <a moz-do-not-send="true"
              href="http://gradsusr.org/mailman/listinfo/gradsusr"
              target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div dir="ltr">M. MALLESWARA RAO<br>
          M.Tech (Atmospheric Science) &amp; M.Sc (Physics)<br>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>