[gradsusr] Fwd: define new field
Stephen McMillan
smcmillan at planalytics.com
Fri Jul 18 08:42:20 EDT 2014
Rabah,
This reply was repeated, this time to the Users Forum. Perhaps another
user can explain why your example did not work.
Stephen
---------- Forwarded message ----------
From: Stephen McMillan <smcmillan at planalytics.com>
Date: Fri, Jul 18, 2014 at 8:39 AM
Subject: Re: [gradsusr] define new field
To: Rabah Hachelaf <r.hachelaf at gmail.com>
Rabah,
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:
'define newfld=const(maskout(vgrd10m,vgrd10m-1000),1,-u)'
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.
For more information, see:
http://grads.iges.org/grads/gadoc/gradfuncconst.html
http://grads.iges.org/grads/gadoc/gradfuncmaskout.html
Good luck--
Stephen Mc
On Thu, Jul 17, 2014 at 5:23 PM, Rabah Hachelaf <r.hachelaf at gmail.com>
wrote:
> Hi Stephen,
>
> Thank yo for reply but when using the second way :
> i have this error :
>
> ga-> define newfld=const(vgrd10m,1,-a)
> Syntax Error: Invalid dimension expression
> Expecting +/-/= operator, found 1
> Variable name = const
> Error ocurred at column 1
> DEFINE error: Invalid expression.
>
> I am using grads2.1 .
>
>
> 2014-07-17 15:55 GMT-04:00 Stephen McMillan <smcmillan at planalytics.com>:
>
>> Rabah,
>> If you have opengrads, you could use "if" function, for example:
>> 'define newfld=if(var,<,1000,1,-u)' where var is an available variable
>> whose values are < 1000
>>
>> Otherwise, you could use const, for example:
>> 'define newfld=const(var,1,-a)' where var is an available variable
>>
>> Hope above helps.
>> Stephen McMillan
>>
>>
>> On Thu, Jul 17, 2014 at 3:07 PM, Rabah Hachelaf <r.hachelaf at gmail.com>
>> wrote:
>>
>>> Hello all,
>>>
>>> How can i define a new field (Xsize,Ysize) containing constant value (1
>>> for exemple) in GRADS.
>>>
>>> Thanks.
>>>
>>> --
>>> ------------------------------
>>> Cordialement,
>>> Best regards,
>>> Rabah Hachelaf
>>>
>>>
>>>
>>> _______________________________________________
>>> 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.
>> ***************************************************
>>
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
>
> --
> ------------------------------
> Cordialement,
> Best regards,
> Rabah Hachelaf
> ____
> ( )
> ( )
> (___ __)
> /////////
>
>
***************************************************
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/20140718/d3fbebe1/attachment.html
More information about the gradsusr
mailing list