[gradsusr] How to limit variable values to a range?

Brandon Schmidt admin at wilmingtonwx.com
Sat Mar 28 20:53:26 EDT 2015


GrADS users,

I'm currently trying to display a significant tornado parameter map but
I've reached an obstacle. One of the terms in the STP equation requires
it's variable values to be within a specific range. The term is "((2000 -
sbLCL) / 1000)" using the variable sbLCL. When sbLCL is below 1000, it
should be set to 1000. When sbLCL is above 2000, it should be set to 2000
(e.x. 130 should become 1000, 1350 should remain 1350, and 4000 should
become 2000).

I know this calculation will definitely involve manipulation with the
*maskout()* and/or *const()* functions but I have no idea where to begin.
Is there another work-around technique that I'm not seeing?

Any help would be greatly appreciated...Thanks! - Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20150328/8c13ca28/attachment.html 


More information about the gradsusr mailing list