<div dir="ltr">Rabah,<div>This reply was repeated, this time to the Users Forum. Perhaps another user can explain why your example did not work.</div><div>Stephen<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">Stephen McMillan</b> <span dir="ltr"><<a href="mailto:smcmillan@planalytics.com">smcmillan@planalytics.com</a>></span><br>Date: Fri, Jul 18, 2014 at 8:39 AM<br>Subject: Re: [gradsusr] define new field<br>
To: Rabah Hachelaf <<a href="mailto:r.hachelaf@gmail.com">r.hachelaf@gmail.com</a>><br><br><br><div dir="ltr">Rabah,<div>Sorry it did not work on yours. It works on mine, using the vgrd10m variable from GFS. I'm using version 2.0.1.oga.1. You might also try something like:</div>
<div><br></div><div>'define newfld=const(maskout(vgrd10m,vgrd10m-1000),1,-u)'</div>
<div><br></div><div>I used 1000, but it could be any number to make sure all values in field are masked out before the constant 1 is applied.</div><div><br></div><div>For more information, see:</div><div><a href="http://grads.iges.org/grads/gadoc/gradfuncconst.html" target="_blank">http://grads.iges.org/grads/gadoc/gradfuncconst.html</a><br>
</div><div><a href="http://grads.iges.org/grads/gadoc/gradfuncmaskout.html" target="_blank">http://grads.iges.org/grads/gadoc/gradfuncmaskout.html</a><br></div><div><br></div><div>Good luck--</div><div>Stephen Mc</div></div>
<div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Jul 17, 2014 at 5:23 PM, Rabah Hachelaf <span dir="ltr"><<a href="mailto:r.hachelaf@gmail.com" target="_blank">r.hachelaf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Stephen,<div><br></div><div>Thank yo for reply but when using the second way :</div><div>i have this error : </div><div><br></div><div><div>ga-> define newfld=const(vgrd10m,1,-a)</div><div>Syntax Error: Invalid dimension expression</div>
<div> Expecting +/-/= operator, found 1</div><div> Variable name = const</div><div> Error ocurred at column 1</div><div>DEFINE error: Invalid expression.</div></div><div><br></div><div>I am using grads2.1 .</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-17 15:55 GMT-04:00 Stephen McMillan <span dir="ltr"><<a href="mailto:smcmillan@planalytics.com" target="_blank">smcmillan@planalytics.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Rabah,<div>If you have opengrads, you could use "if" function, for example:</div>
<div>'define newfld=if(var,<,1000,1,-u)' where var is an available variable whose values are < 1000</div>
<div><br></div><div>Otherwise, you could use const, for example:</div><div>'define newfld=const(var,1,-a)' where var is an available variable</div><div><br></div><div>Hope above helps.</div><div>Stephen McMillan</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Thu, Jul 17, 2014 at 3:07 PM, Rabah Hachelaf <span dir="ltr"><<a href="mailto:r.hachelaf@gmail.com" target="_blank">r.hachelaf@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hello all,<div><br></div><div>How can i define a new field (Xsize,Ysize) containing constant value (1 for exemple) in GRADS.</div>
<div><br></div><div>Thanks.<span><font color="#888888"><br clear="all"><div><br></div>-- <br><div dir="ltr">
<div>------------------------------</div>Cordialement,<br>Best regards,<br>Rabah Hachelaf <br> <br><br></div>
</font></span></div></div>
<br></div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>
</div></div><pre>***************************************************
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.
***************************************************
</pre><div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><div>------------------------------</div>Cordialement,<br>Best regards,<br>Rabah Hachelaf <br> ____ <br></div> ( )<br>
( ) <br>
(___ __) <br> ///////// <br><br></div>
</div>
</blockquote></div><br></div>
</div></div></div><br></div></div>
<pre>***************************************************
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.
***************************************************