<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Yaqian,<br>
    <br>
    I think you need to specify all ranges for each file since the grids
    are different.&nbsp; You only define the lat/lon based on the first file
    (GIMMS).&nbsp; To be safe you should set the lat/lon/z/t for each data
    set.&nbsp; So, add the 'set lat 13 20' and 'set lon -15 20' after 'set
    dfile 2' to ensure your two grids are the same.<br>
    <br>
    Jim<br>
    <br>
    <div class="moz-cite-prefix">On 6/20/14 3:48 AM, Yaqian He wrote:<br>
    </div>
    <blockquote
cite="mid:CAKbvkVUoE2W9SFOo2dSdUL7E5n1RT4VNEmaruB4E9c_V8jZVLQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi,<br>
        <div class="gmail_quote">
          <div dir="ltr">
            <div>
              <div>
                <div><br>
                </div>
                &nbsp;&nbsp; I want to calculate the average seasonal (Dec to Feb)
                mean difference between GIMMS and MODIS NDVI, here is
                script I wrote:<br>
                <br>
                'reinit'<br>
                *gimms<br>
                'sdfopen /Users/geog493/ndvi/<a moz-do-not-send="true"
                  href="http://ndvi0.5deg.2006.nc" target="_blank">ndvi0.5deg.2006.nc</a>'<br>
                'sdfopen /Users/geog493/ndvi/<a moz-do-not-send="true"
                  href="http://ndvi0.5deg_modis_westafrica.nc"
                  target="_blank">ndvi0.5deg_modis_westafrica.nc</a>'<br>
                'set lat 13 20.0'<br>
                'set lon -15.0 20.0' <br>
                * DJF<br>
                'define gy01=ave(ndvi.1,t=467,t=472)' <br>
                'define gy02=ave(ndvi.1,t=491,t=496)'<br>
                'define gy03=ave(ndvi.1,t=515,t=520)'<br>
                'define gy04=ave(ndvi.1,t=539,t=544)'&nbsp;&nbsp;<br>
                'define gy05=ave(ndvi.1,t=563,t=568)'<br>
                'define gy06=ave(ndvi.1,t=587,t=592)' <br>
                'define gyclim=(gy01+gy02+gy03+gy04+gy05+gy06)/6.'<br>
                *'modis ndvi'<br>
                'set dfile 2'<br>
                'set t 1 307'<br>
                * DJF<br>
                'define my01=ave(ndvi.2,t=15,t=20)' <br>
                'define my02=ave(ndvi.2,t=38,t=43)'<br>
                'define my03=ave(ndvi.2,t=61,t=66)'<br>
                'define my04=ave(ndvi.2,t=84,t=89)'&nbsp;&nbsp;<br>
                'define my05=ave(ndvi.2,t=107,t=112)'<br>
                'define my06=ave(ndvi.2,t=130,t=135)'<br>
                'define myclim=(my01+my02+my03+my04+my05+my06)/6.'<br>
                'define difyclim=gyclim-myclim'<br>
                'd gyclim-myclim'<br>
                <br>
              </div>
              However, it always shows the error "Error in gagchk: axis
              sizes are not the same<br>
              Operation error:&nbsp;&nbsp;Incompatable grids"<br>
              <br>
            </div>
            <div>The two datasets have the same resolution (0.5X0.5),
              the original information for the two datasets are:<br>
              modis<br>
              xdef 81 linear -20 0.5<br>
              ydef 81 linear 0 0.5<br>
              gimms<br>
              xdef 720 linear -179.75 0.5<br>
              ydef 304 linear -61.75 0.5<br>
            </div>
            <div>&nbsp;Are there something wrong here? Could you help me?<br>
              <br>
            </div>
            <div>Thanks in advance!<br>
              <br>
            </div>
            <div>Best wishes!<span class="HOEnZb"><font color="#888888"><br>
                </font></span></div>
            <span class="HOEnZb"><font color="#888888">
                <div>Yaqian<br>
                </div>
              </font></span></div>
        </div>
        <br>
      </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>