<div dir="ltr">All,<div><br></div><div>I've got several WRF model runs that I would like to open at the same time using GrADS. This is easy enough, as I simply create and open control files for each model. While most of these models run out to 36hrs, I have one that runs out to 24 hrs. This causes me a problem when I start making plots for hours 27 and beyond, as I start getting the "Entire Grid Undefined" error for that shorter model run. </div>
<div><br></div><div>Is there any way that I can check to see if the data exist BEFORE I attempt to plot it? I thought I could accomplish this by using q defval on a variable (precipitable water in this case) for each forecast hour, check to see if the value is above 0, and include the data if that's the case. Here's what I've come up with:</div>
<div><br></div><div><div>'define test=pwatclm'</div><div>'q defval test 100 100'</div><div>rec=sublin(result,1)</div><div>value=subwrd(rec,3)</div><div>say 'the value at this point is 'value</div><div>
<br></div><div>if (value >=0.0)</div><div>say 'Looks like there is data in this file - we can include it'</div><div>else</div><div>say 'Looks like this file is missing data - skip it'</div><div>endif</div>
</div><div><br></div><div>I'm capturing the output of q defval properly, as I routinely get values of precipitable water for hours 00-24. Also, when I get into a time period where data are missing (hours 27 and beyond), I get a result that states "The value at this point is missing". However, I've obviously got a problem with my if statement. It still says there is data in this file. </div>
<div><br></div><div>Any idea what I might have done wrong, or if there's a better way to perform this check?</div><div><br></div><div>Thanks!<br>Dan Leins</div><div><br></div><div><br></div><div><br></div><div><br></div>
</div>