<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style id="css_styles" type="text/css"><!--blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: center; '], li[style='text-align: right;'], li[style='text-align: right; '] {  list-style-position: inside;}
body { font-family: 'Segoe UI'; font-size: 12pt; }
.quote { margin-left: 1em; margin-right: 1em; border-left: 5px #ebebeb solid; padding-left: 0.3em; }
--></style>
</head>
<body>
<div>hi Matt,</div>
<div><br>
</div>
<div>the gl.i.j is a script variable(?)  you'd have to 'print' it to a txt file and then convert to grads...</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div id="signature_old" style="clear:both">
<div id="x8f018f01bc4b4a58894c5b6a4e3a55c0">
<div id="x93967ce21a0947d291a1197fb14e5013">Best Regards, Mike<br>
<br>
Michael Fiorino, Ph.D. (meteorology, NPS)<br>
Commander, US Navy (retired)<br>
AOES George Mason University<br>
Fairfax, VA<br>
<br>
<a href="mailto:mfiorino@gmu.edu">mfiorino@gmu.edu</a> (GMU)<br>
<a href="mailto:tenkiman@pm.me">tenkiman@pm.me</a> (home)</div>
<div id="x93967ce21a0947d291a1197fb14e5013"><br>
</div>
<div id="x93967ce21a0947d291a1197fb14e5013">+1 720-204-0876 (mobile)<br>
<br>
AOES is the Atmospheric, Oceanic and Earth Sciences department<br>
<a href="https://science.gmu.edu/academics/departments-units/atmospheric-oceanic-earth-sciences">https://science.gmu.edu/academics/departments-units/atmospheric-oceanic-earth-sciences</a><br>
<br>
"Well Mike, it just goes to show ya, it's always something--if it ain't one thing, it's another"<br>
-- Roseanne Roseannadanna</div>
<div></div>
</div>
</div>
<div style="clear:both"><br>
</div>
<div><br>
</div>
<div>
<div>------ Original Message ------</div>
<div>From "Matt Bunkers - NWS Rapid City" <<a href="mailto:matthew.bunkers@noaa.gov">matthew.bunkers@noaa.gov</a>></div>
<div>To "GrADS Users Forum" <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>></div>
<div>Date 1/25/2023 11:42:39 AM</div>
<div>Subject [gradsusr] Using maskout in definition failing</div>
</div>
<div><br>
</div>
<div id="x3c0ab4cceeb74e9">
<blockquote cite="CAB_myoNjvohr1YtyvGsrG08p-g1pf1cmObf83sRYFQ0gvhQToQ@mail.gmail.com" type="cite" class="cite2">
<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>
</blockquote>
</div>
</body>
</html>