[gradsusr] Averaging over multiple dimension ranges

Ivan Toman ivtoman at inet.hr
Tue Sep 17 12:45:51 EDT 2013


Hello,

If I want to find average value over a lat/lon range, I would do:

ave(variable,lat=20,lat=21),lon=70,lon=71)


However, if I want to do average over multiple areas, for example:

Area 1: lat=20,lat=21 ; lon=60,lon=61
Area 2: lat=30,lat=31 ; lon=70,lon=71
Area 3: lat=40,lat=41 ; lon=80,lon=81

how can I solve this problem? I can't simply find three area averages, 
sum them together and divide by three, because areas are not the same sizes.

Thanks for any hint.

Regards,
Ivan Toman



More information about the gradsusr mailing list