<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Kunal,<br>
    <br>
    if your one variable is <br>
    <br>
    <font color="#3333ff"><tt>  </tt><tt>var1(lat, lon, X1, time)</tt></font><br>
    <br>
    and the other is<br>
    <br>
    <font color="#3333ff"><tt>  var2(lat, lat_bands, lon, lon_bands, Y1,
        time, time_bands)</tt></font><br>
    <br>
    you can use the 'standard subscripts' to get rid of the bands in
    this second variable with<br>
    <br>
    <font color="#3333ff"><tt>  new_var2 = var2(:, 0, ;, 0, :, :, 0)   
            ;-- new_var2(lat,lon,Y1,time)</tt></font><br>
    <br>
    Please, read the NCL User Guide to learn more about the NCL basics.<br>
    <br>
    Bye,<br>
    Karin<br>
    <br>
    <div class="moz-cite-prefix">Am 19.06.17 um 09:17 schrieb Kunal
      Bali:<br>
    </div>
    <blockquote
cite="mid:CAOiHCtSPQnCONWwRH577Xgx8stt65O-C8pRUx7F_Esofz8BRKg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>Dear NCL users<br>
                    <br>
                    <br>
                  </div>
                  I am trying to get the spatial <br>
                  <br>
                  atal:Number of subscripts do not match number of
                  dimensions of variable,(3) Subscripts used, (5)
                  Subscripts expected<br>
                  <br>
                </div>
                I have two files with  <br>
                Ist file have lat, lon, X1, time dimensions<br>
              </div>
            </div>
            2nd file have lat, lat_bands, lon, lon_bands, Y1, time,
            time_bands dimensions<br>
            <br>
          </div>
          So how to remove the time_bands, lon_bands, and lat_bands so
          that all the dimensions of 2nd file will be matched with 1st
          file.<br>
          <br>
          <br>
          <br>
        </div>
        <div>I used the script<br>
          <br>
            in1  = addfile("/home/kunal/<a moz-do-not-send="true"
            href="http://x1.nc">x1.nc</a>","r")<br>
            in2  = addfile("/home/kunal/<a moz-do-not-send="true"
            href="http://y2.nc">y2.nc</a>","r")<br>
             filename = "/home/kunal/IND_adm/india_state.shp"<br>
            <br>
            tmp2 = int1-&gt;X1<br>
            tmp1 = in2-&gt;Y2<br>
          ;************************************************<br>
          ; reorder to get time as right most dimension<br>
          ;***********************************************<br>
            ts1 = tmp1(lat|:,lon|:,time|:)<br>
            ts2 = tmp2(lat|:,lon|:,time|:)<br>
          ;************************************************<br>
          ; calculate cross correlations<br>
          ;************************************************<br>
            maxlag = 0                                 ; set lag<br>
          ; note, the max lag should not be more than N/4<br>
            <br>
            ccr = esccr(ts2,ts1,maxlag)                   ; calc cross
          correlations<br>
          <br>
          ; copy meta data and coordinate variables using contributed
          functions<br>
            copy_VarAtts(ts1, ccr)                    <br>
            copy_VarCoords_1(ts2,ccr)<br>
            printVarSummary(ccr)<br>
        </div>
        <div>
          <div>
            <div>
              <div>
                <div><br>
                   plot = gsn_csm_contour_map_ce(wks,ccr(:,:,lag),res)<br>
                  <br>
                  <br>
                </div>
                <div>please provide some information on that.<br>
                </div>
                <div>Thank You<br>
                </div>
                <div><br>
                  <div>
                    <div>
                      <div>
                        <div class="gmail_signature">
                          <div dir="ltr">
                            <div>
                              <div>Regards<br>
                              </div>
                              <div>Kunal<br>
                              </div>
                              <div dir="ltr">
                                <div>
                                  <p
style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font
                                      color="#1F497D"><br>
                                    </font></p>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
ncl-talk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
    </blockquote>
  </body>
</html>