<div dir="ltr">Hi,<br><div class="gmail_quote"><div dir="ltr"><div><div><div><br></div> 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 href="http://ndvi0.5deg.2006.nc" target="_blank">ndvi0.5deg.2006.nc</a>'<br>
'sdfopen /Users/geog493/ndvi/<a 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)' <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)' <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: 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> 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>