[gradsusr] Averaging over multiple dimension ranges

Kishore Ragi kishoreragi at gmail.com
Tue Sep 17 14:43:17 EDT 2013


Ivan,

How can you find the area average with asum? If you can do with asum, the
same is with aave()/ave() ...

Anyway, I don't understand what you wanted to calculate.

Regards,

Kishore




On Tue, Sep 17, 2013 at 11:59 PM, Ivan Toman <ivtoman at inet.hr> wrote:

>  Jeff,
>
> Option (2) seems to be a logical approach and very nice idea. It looks to
> me that asum() also works OK for "measuring" area sizes, it is probably
> accurate enough.
>
> Best regards,
> Ivan
>
>
>
> On 09/17/2013 06:57 PM, Jeff Duda wrote:
>
>    You could either...
>
>  (1) Knowing the geometry of earth, set up a math problem and solve for
> the areas of a sphere bounded by such latitudinal/longitudinal coordinates
> to find the areas of those three regions (I would use spherical coordinates)
>
>  OR
>
>  (2) -Create a flat field of ones (e.g., 'define ones = tmp2m/tmp2m')
>       -Use the atot function (grads 2.0.2+ only) to compute the sum of the
> ones field over your area, which I think should give you the area of each
> region
>
> Then weight each areal average by the area and compute the final weighted
> average.
>
>  I've never tried this, so I'm not 100% sure it will work and be
> accurate.  I would play around with the atot function first to see if it
> really does give you the areas of the regions.
>
> Jeff Duda
>
>
> On Tue, Sep 17, 2013 at 11:45 AM, Ivan Toman <ivtoman at inet.hr> wrote:
>
>> 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
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>
>
>
> --
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms
>
>
> _______________________________________________
> gradsusr mailing listgradsusr at gradsusr.orghttp://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130918/4dfcf09d/attachment-0003.html 


More information about the gradsusr mailing list