[gradsusr] IF statement problem
Walter Arnoldo Bardales Espinoza
bardaleswa at gmail.com
Thu Feb 15 20:11:14 EST 2018
Hello, I did something similar days ago, I'll leave what I did, I hope it's
useful
'd tcdcclm'
nubs=sublin(result,1)
nub=subwrd(nubs,4)
if(0<=nub & nub<12.5)
clasnub='despejado'
endif
if(12.5<=nub & nub<37.5)
clasnub='con nubes dispersas'
endif
if(37.5<=nub & nub<62.5)
clasnub='medio nublado'
endif
if(62.5<=nub & nub<87.5)
clasnub='nublado'
endif
if(87.5<=nub)
clasnub='totalmente nublado'
endif
2018-02-15 17:45 GMT-06:00 AMS EmsiWx Bytča <emsiwx at pocasie-bytca.sk>:
> Dear GrADS users,
>
>
> I have been on this half a day, but still no success.
>
> Part of my script:
>
> 'define oblc = TCDCclm'
>
> if (oblc<10)
> obla='J'
> endif
> if (oblc>=10 & TCDCclm<30)
> obla='SJ'
> endif
> if (oblc>=30 & TCDCclm<60)
> obla='P'
> endif
> if (oblc>=60 & TCDCclm<90)
> obla='O'
> endif
> if (oblc>=90)
> obla='Z'
> endif
>
> I want to get obla string based on the total cloud cover, but somehow the
> conditions dont work. I always get the last obla='Z' eventhough the TCDCclm
> is 34%
>
> Could you please guide me on the right track?
>
>
> Thank you in advance for your replies.
>
>
> Marian
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
--
Atte.
Walter Arnoldo Bardales Espinoza
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20180215/5c3d853b/attachment.html>
More information about the gradsusr
mailing list