<div dir="ltr">I&#39;m not sure if I have my dimension settings wrong or if the max function is not capable of calculating the max of user defined fields. Take for instance the significant tornado parameter:<div>&#39;define stp = cterm*ltermA*hterm*stermA&#39;</div><div><br></div><div>To get the max function to work correctly, I cannot just do max(stp,t=1,t=24), I have to expand out each of the terms in that stp algorithm down to the actual fields available in the model data such as CAPEsfc for instance.</div><div><br></div><div>I have a new script that I created that does some if statements and such that simply cannot be broken down into one single line or their individual fields from the model data and thus, I cannot get the max function to work. It only will calculate one timestep.</div><div><br></div><div>I have tried setting t to vary, such as set t 1 24, etc but nothing works. Is there a way around this, or am I missing something?</div><div><br></div><div>Here is a snippet of the code that I am trying to work with:</div><div><br></div><div><div>...</div><div><br></div><div>    if (&#39;hgtprs(z=botzlev)&#39; &lt;= hgt0c)</div><div>    &#39;wt=0&#39;</div><div>    endif</div><div>    if (&#39;hgtdiffZero&#39; &gt; 0 &amp; &#39;hgtdiffTop&#39; &lt; 0)</div><div>    &#39;wt=hgtdiffZero/(HGTtop0C-HGT0C)&#39;</div><div>    endif</div><div>    if (&#39;hgtdiffTop&#39; &gt;= 0)</div><div>    &#39;wt=1&#39;</div><div>    endif</div><div>    nextZlev = botzlev+1</div><div>    &#39;define levDiff = hgtprs(z=&#39;nextZlev&#39;)-hgtprs(z=&#39;botzlev&#39;)&#39;</div><div>    &#39;hailsum=hailsum+(wt*E*levDiff)&#39;</div><div><br></div><div>    botzlev = botzlev + inc</div><div>    endwhile</div><div><br></div><div>  &#39;set gxout shaded&#39;</div><div>  &#39;SHI=hailsum*0.1&#39;</div><div>  &#39;MEHS=0.1*(2.54*pow(SHI,0.5))&#39;</div><div>endif</div><div><br></div><div>&#39;define hs = max(smth9(MEHS/2.54),t=1,t=24)&#39;</div><div><br></div><div><div class="gmail_signature"><div dir="ltr"><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><b>-------</b></div>William (L.B.) LaForce IV<br>Meteorologist<div><a href="http://www.tornadoinsanity.com" target="_blank">www.tornadoinsanity.com</a></div></div></div></div></div></div></div></div>
</div></div>