Dear Nitin, An easy, but a little cumbersome solution would be to define a mask of bad values and 1s where within India there are 1s and outside bad values and multiply precip with that mask before the averaging. This is assuming you have set a bad value for you data set, and you don’t have that many grid points. You probably have to put the mask on the correct axis. Cheers, Joerg From: owner-ferret_users@xxxxxxxx [mailto:owner-ferret_users@xxxxxxxx] On Behalf Of nitin patil Dear All, I am using the following script for averaging the rainfall values of one day over India only from my daily rainfall values from GCM but it averages also some area which is outside from India border. Is there is any way to average only India values which is in border? use precip_daily_JJAS_2001.nc let avg=precip[x=65:100@ave,y=5:40@ave,d=1,l=1] -- |