<div dir="ltr"><div>This question is obscure. What does "check whether  a variable"  mean.</div><div><br></div><div>The one dimensional array is a "variable" .... x[:] ... the variable is "x"</div><div><br></div><div>Check if a *value* within the variable 'x' is present:</div><div><br></div><div>    value = 4.5     or    value = 2 <br></div><div>    if (any(x.eq.value))  then</div><div>        ...</div><div>    else</div><div>        ...</div><div>    end if<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 29, 2021 at 12:51 AM sangeeta maharjan via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I have a  1 Dimensional array with numbers.</div><div>I want to check whether  a variable is in the given 1 dimensional array then my code will proceed with  the if else condition.</div><div><br></div><div>Any help would be appreciated.</div><div><br></div><div>Sang.</div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>