[gradsusr] Question about variables, if, else with maskout and const

UwBe International - Severe Weather Research info at uwbeinternational.org
Mon Apr 5 13:27:08 EDT 2021


Hello Everyone

Sorry, i'm an a beginer in GrADS and came from php, etc.
I have read many documentation and tutorials, but i have still problems 
to understand the const and maskout function.
Now, i have a few questions and hope you can answer it and give me maybe 
a example.

1. how i can get a value from a variable? Example; i will get the 
temperature of tmp2m (result 71 fahreinheit or 65 fahreinheit, etc).
2. how i can write a if/else statement grads likely with const and 
maskout? Example, i will plot a shaded file and values only, if 
cape180mb are over 500J/kg and the shear is over 10m/s ?

Example what i try to get:

If the cape180mb is over 500J/kg AND the shear is over 10m/s, then grads 
should draw yellow color in the area, where caoe is over 500J and shear 
over 10m. on the other areas it should be nothing colored/drawed.

I don't know all of it, but in PHP i would be solved the problem with 
if/else:

if(cape >= 500 && shear > 10m/s)
draw red shades over the areas with the values above
else if (cape > 200 && < 500 && shear = 10m/s)
draw yellow shades over the areas
else
draw nothing (the chart/color should be white/transaprent)

Thank you for your inputs and help

-- 
Freundliche Grüsse / Best Regards
Dominic Kurz
Präsident / CEO

*UwBe International*
*Severe Weather Research & Taskforce*
Einschlagstrasse 30
CH-4622 Egerkingen
Switzerland

Tel.: +41 78 340 46 78
Direct: +41 76 270 70 87

<https://uwbeinternational.org>

E-Mail: info at uwbeinternational.org
Web: www.uwbeinternational.org <https://uwbeinternational.org>

Find us on Facebook <https://facebook.com/uwbeinternational>


-- 
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20210405/88fa3f26/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_uwbe_transparent_black_gross.png
Type: image/png
Size: 190518 bytes
Desc: not available
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20210405/88fa3f26/attachment-0001.png>


More information about the gradsusr mailing list