[gradsusr] Script Problems

Goodson,Ron [Edm] Ron.Goodson at EC.gc.ca
Fri Oct 22 11:30:49 EDT 2010


Beyond int vs floats .. 'm assuming hgt0deg is some grid, and you want
to set the MinCAPE in the grid .. not some single point-value.  If so,
you will have to use a combination of const() and maskout() to do this
.. as shown in the documentation under the const function
 
cheers
 
ron

 

________________________________

From: gradsusr-bounces at gradsusr.org
[mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Stephen McMillan
Sent: October 22, 2010 9:10 AM
To: GrADS Users Forum
Subject: Re: [gradsusr] Script Problems


Andrew, 
Is it critical to have the resulting defined field as integers?  If not,
you could do something like this, if your GrADS has the "if" conditional
UDF (such as in the opengrads version):

'define MinCAPE=1.4*hgt0deg-5400'
'define MinCAPE=if(MinCAPE,<,200,200,MinCAPE)'

Then, when you display MinCAPE, all areas < 200 from first define should
show up as 200.

Steve Mc


On Fri, Oct 22, 2010 at 12:08 AM, Andrew Revering <andy at f5data.com>
wrote:


	This is a simple but annoying problem... I have an equation in a
script...

	 

	'define MinCAPE = math_int(1.4 * hgt0deg - 5400)'

	if (MinCAPE < 200) ; MinCAPE = 200 ; endif

	 

	 

	 

	I get an error saying math_int() is not a valid function.... 

	also the whole IF statement is completely ignored. No matter
what I do, I still get negative values for MinCAPE.

	 

	BTW...this is a unconventional method for me to determine if
there is 'enough' CAPE to support a severe thunderstorm given the
freezing level height in case anyone is wondering.

	 

	Andrew Revering

	Convective Development, Inc.

	http://www.convectivedevelopment.com/

	 

	 


	_______________________________________________
	gradsusr mailing list
	gradsusr at gradsusr.org
	http://gradsusr.org/mailman/listinfo/gradsusr
	
	


***************************************************
The information contained in this e-mail message 
is intended only for the use of the recipient(s) 
named above and may contain information that is 
privileged, confidential, and/or proprietary. 
If you are not the intended recipient, you may not
review, copy or distribute this message. If you have
received this communication in error, please notify 
the sender immediately by e-mail, and delete the original message.
***************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101022/c09ac54b/attachment-0003.html 


More information about the gradsusr mailing list