Making composites of data for specific OLR values within an certain area

Arlindo da Silva arlindo.dasilva at GMAIL.COM
Thu Nov 12 15:05:28 EST 2009


On Thu, Nov 12, 2009 at 11:32 AM, Jason Snyder <jmssnyder at ucdavis.edu>wrote:

> I am trying to make a script that composites pressure values from dates
> when OLR values over a certain area (latitude range: 5S to 5N and
> longitude: 120E and 120W) are below a certain value.  I tried using this
> script and it did not seem to work properly.  What should I do to make
> this script so that I can make this script work properly?  Also how can I
> composite wind data at specific pressure levels such as 850 mb and 500 mb
> based on this script?
> 'sdfopen olr.day.mean.nc'
> 'sdfopen pres.sfc.1993.nc'
> 'set t 6790'
> 'define presa = 0'
> 'define number = 0'
> count = 6790
> while (count < 12267)
>  'set t 'count
>  'define olra = aave(olr,lon=120,lon=240,lat=-5,lat=5)'
>  if (olra < 230)
>

This is not valid. Grads scripting does not have access to defined
variables, grads scripts  operate on a separate namespace from the
expression parser. However, the bjt extensions have a if() function that
could be used to implement this:

ga-> define presb = if(olra<230,pres.2,0.0)

Function maskout() can accomplished much of the same, but I find the if()
syntax easier to read. More information on the bjt extensions here:

    http://opengrads.org/doc/udxt/libbjt/

    Arlindo


--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20091112/89b669bb/attachment.html 


More information about the gradsusr mailing list