<img style="border: none; background:none; width: 0; height: 0;" src="https://share.polymail.io/v2/z/a/NWQ0NTg0N2I1ODEy/nQkAjxYJSLQufh4hI_WWC1Xefl3zPa_A2fhl4HlxIju71w7wBpIq2V3jIlV3cy00aY8ermz6N49iyn_Mvl_o6ZHSF23kqLl80tSAlcsmSyBXgb4Ezp0MwKTIQFiYhkNwi4cFs4ogWTbiWXd4hvCSRg==.png" alt="" width="0px" height="0px" border="0" /><div>Hello,</div><div><br></div><div>I've been trying to do some magic to create an index. I was trying to originally create a function that had an if to check to see if the temperature were between two values, and then another if to check the value of another computed variable. Here to find out, I couldn't get it to work because it wouldn't actually use the variables I created in the functions. Later, I stumbled across an email in this group saying that it would take *more* time to do an if like I was doing and would be quicker to do a mask out for computation time.</div><div><br></div><div>So, that leads me to my question. I'm trying to do an "advanced" maskout (advanced to me, most likely not to those advanced members in here)! Any chance anyone could give me a starting point, or at least get me started for the first temperature range.</div><div><br></div><div>Here's my "pseudo code" (where t is temp and z is lcl height):</div><div><div>    if(math_nint(t) = 0)</div><div>        if((z >= 38000) & (z < 42000)) ; 'define wsi = 1' ; endif</div><div>        if((z >= 42000) & (z < 49000)) ; 'define <span style="font-family: -apple-system, system-ui, "segoe ui", roboto, oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal;">wsi</span> = 2' ; endif</div><div>        if((z >= 49000) & (z <= 55000)) ; 'define <span style="font-family: -apple-system, system-ui, "segoe ui", roboto, oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal;">wsi</span> = 3' ; endif</div><div>    endif</div><div><br></div><div>    if(math_nint(t) = 1)</div><div>        if((z >= 35500) & (z < 42500)) ; 'define <span style="font-family: -apple-system, system-ui, "segoe ui", roboto, oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal;">wsi</span> = 1' ; endif</div><div>        if((z >= 42500) & (z < 47000)) ; 'define <span style="font-family: -apple-system, system-ui, "segoe ui", roboto, oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal;">wsi</span> = 2' ; endif</div><div>        if((z >= 47000) & (z <= 52500)) ; 'define <span style="font-family: -apple-system, system-ui, "segoe ui", roboto, oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal;">wsi</span> = 3' ; endif</div><div>    endif</div></div><div><br></div><div>Thanks,</div><div id="psignature"><div>Tyler Youschak</div></div>