[gradsusr] Meteorological field in circular area

Arlindo da Silva dasilva at alum.mit.edu
Sat Feb 25 10:27:30 EST 2012


On Sat, Feb 25, 2012 at 12:05 AM, Rodrigo de Souza Barreto Mathias <
rodrigowind at yahoo.com.br> wrote:

> Good morning!
> I wanna calculate a meteorological field in a circular area with radius R
> starting  at a point (lat, lon). For example: average temperature in a
> circular area with 200 km of radius from a point 20N/020W. I don't know a
> specific function in Grads to do what I want. Could you help me with some
> function or a script using a mask?
>
>
The attached script computes a circular mask with distance R from a
reference (lon,lat). For your point (20W,20N) and R=200 do this:

ga-> circ_mask -20 20 200

This will define a variable called "mask" with "1' inside the circle, undef
elsewhere. To get the average temperature inside the circle:

ga-> d aave(mask*temperature,global)

   Good Luck,

      Arlindo


-- 
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120225/28361791/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: circ_mask.gs
Type: application/octet-stream
Size: 788 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20120225/28361791/attachment-0003.obj 


More information about the gradsusr mailing list