<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,<div><br>I created a variable ("gl") that uses two for-loops and an if-else statement to determine areas that need to be masked.  Here is a snippet of the code:</div><div><br></div><div><div>    if (landuse = -80 | landuse = -104 | landuse = 37)</div><div>      gl.i.j = 1</div><div>    else</div><div>      gl.i.j = -999000000</div><div>    endif</div></div><div><br></div><div>Then I close that file and open a new file to apply the mask:</div><div><br></div><div><div>'close 1'</div><div>'open /data/SOOapps/mjb-apps/NDVI/ndviout.ctl'</div><div>'define maskrh900mb=maskout(rh900mb,gl)'</div></div><div><br></div><div>This is giving me the following error:</div><div><br></div><div><div>Syntax Error:  Invalid Operand </div><div>  'gl' not a variable or function name</div><div>Operation Error:  Error from maskout function</div><div>  Error ocurred at column 1</div><div>DEFINE error:  Invalid expression. </div></div><div><br></div><div>The two arrays (rh900mb & gl) are the same dimensions, so I'm not sure what is going wrong.  Does anyone have any suggestions?</div><div><br>Thank you,</div><div><br></div><div>-- Matt</div><div><br></div></div></div></div></div></div></div>