[gradsusr] SET A CONSTANT

Arlindo da Silva dasilva at alum.mit.edu
Thu Mar 21 04:35:18 EDT 2019


On Fri, Mar 15, 2019 at 9:14 AM Stephen McMillan <smcmillan at planalytics.com>
wrote:

> Marian,
> You are correct, regarding the "if" function in your version of
> OpenGrADS.  The syntax I provided was for the latest (2.2.1) version.  In
> the latest OpenGrADS version, you can either use "if" with the syntax as I
> provided, or use "if_" with the syntax you provided.  Either way, you're
> good to go!
>
>
This is a subtle point. OpenGrADS has included an if() function for many
years. Recently, COLA introduced an if() function, but unfortunately with a
different syntax so it broke the code of people that had been using the
OpenGrADS version. In 2.2.1 I renamed the OpenGrADS version if_() so they
two can co-exist, although I strongly recommend that everyone migrate to
the COLA version.

   Arlindo





> Best wishes--
> Stephen
>
> On Thu, Mar 14, 2019 at 10:53 PM AMS EmsiWx Bytča <emsiwx at pocasie-bytca.sk>
> wrote:
>
>> Once again thank you both guys, gave up const/maskout after sveral hours
>> combining :D , used IF (did not know that it is already in 2.1.x version
>> which I have), the correct syntax is:
>>
>>
>> 'define A=if(tempdif,>,25,0,if(tempdif,>=,22,2,6))'
>>
>>
>> Marian
>>
>>
>>
>> Dňa 14. 3. 2019 o 20:04 AMS EmsiWx Bytča napísal(a):
>>
>> Thank you Jeff and Stephen, will try to play with const/maskout first,
>> then I will reinstall my Opengrads and try the if statement.
>>
>>
>> Marian
>> Dňa 14. 3. 2019 o 15:09 Stephen McMillan napísal(a):
>>
>> Marian,
>>
>> One correction to what I sent...
>>
>> 'define A=if(dt>25,0,if(dt>=22,2,6))'     added the second )
>>
>> Stephen
>>
>> On Thu, Mar 14, 2019 at 10:06 AM Stephen McMillan <
>> smcmillan at planalytics.com> wrote:
>>
>>> Marian,
>>>
>>> If you have the latest version of GrADS or OpenGrADS, you could do
>>> something like this:
>>>
>>> 'define dt=t850-t500'
>>> 'define A=if(dt>25,0,if(dt>=22,2,6)'
>>> 'd A'
>>>
>>> Stephen McMillan
>>>
>>> On Wed, Mar 13, 2019 at 4:14 PM AMS EmsiWx Bytča <
>>> emsiwx at pocasie-bytca.sk> wrote:
>>>
>>>> Dear all,
>>>>
>>>>
>>>> I am going crazy combining const/maskout to get what I need.
>>>>
>>>> I need to set A according the following:
>>>>
>>>> A= 0 when T850-T500 >25
>>>>
>>>> A= 2 when T850-T500 22-25
>>>>
>>>> A= 6 when T850-T500 <22
>>>>
>>>>
>>>> Would like to ask any master of const/maskout for help.
>>>>
>>>>
>>>> Thank you very much in advance.
>>>>
>>>>
>>>> Marian
>>>>
>>>> _______________________________________________
>>>> 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 listgradsusr at gradsusr.orghttp://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>> _______________________________________________
>> gradsusr mailing listgradsusr at gradsusr.orghttp://gradsusr.org/mailman/listinfo/gradsusr
>>
>> _______________________________________________
>> 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
>


-- 
Arlindo da Silva
*dasilva at alum.mit.edu <dasilva at alum.mit.edu>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20190321/6cebc5a3/attachment-0001.html>


More information about the gradsusr mailing list