<div dir="ltr">Hello grads users,<div><br></div><div>I'm trying to create a file that has the daily maximum values from my hourly wrf output. I'm using grads2.0.a8. </div><div><br></div><div>Below is the script that I've written and the error messages I get after running the script. I'm not certain if there is a particular maximum value function necessary when using a script but hopefully someone can help. </div><div><br></div><div>In this script I did not put the line: <span style="color:rgb(0,0,255)">define tmax=max(t2, t=t, t+23) </span><font color="#000000">in quotes and there seems to be an issue with the 'max' function. In the second script, I put that line in quotes resulting in a couple syntax errors so I'm not certain if the quotes are necessary. </font></div><div><br></div><div><div><font color="#0000ff">'open Piarco_may1_hrly.ctl'</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff">'set gxout fwrite'</font></div><div><font color="#0000ff">'set fwrite tmaxtest.dat'</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff">t=1</font></div><div><font color="#0000ff">while (t<=25)</font></div><div><font color="#0000ff"> 'set t ' t</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff"> say t</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff"> define tmax=max(t2, t=t, t+23)</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff"> 'd tmax'</font></div><div><font color="#0000ff"> t = t+24</font></div><div><font color="#0000ff">endwhile</font></div><div><font color="#0000ff">'disable fwrite'</font></div><div><br></div><div><div><div>ERROR MESSAGE FOR ABOVE SCRIPT</div><div>Function not found: max </div><div> Error occurred on line 11</div><div> In file <a href="http://tmax.gs">tmax.gs</a></div></div><div><br></div><div><div><font color="#0000ff">'open Piarco_may1_hrly.ctl'</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff">'set gxout fwrite'</font></div><div><font color="#0000ff">'set fwrite tmaxtest.dat'</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff">t=1</font></div><div><font color="#0000ff">while (t<=25)</font></div><div><font color="#0000ff"> 'set t ' t</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff"> say t</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff"> 'define tmax=max(t2, t=t, t+23)'</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff"> 'd tmax'</font></div><div><font color="#0000ff"> t = t+24</font></div><div><font color="#0000ff">endwhile</font></div><div><font color="#0000ff">'disable fwrite'</font></div></div><div><br></div><div><div>ERROR MESSAGE FOR ABOVE SCRIPT</div></div><div>Syntax Error: Invalid dimension expression<br></div><div> Dimension value missing or invalid</div><div>Error from MAX: 1st dimension expression invalid</div><div>Operation Error: Error from max function</div><div> Error ocurred at column 1</div><div>DEFINE error: Invalid expression. </div><div>Syntax Error: Invalid Operand </div><div> 'tmax' not a variable or function name</div><div> Error ocurred at column 1</div><div>DISPLAY error: Invalid expression </div><div> Expression = tmax</div><div>25</div><div>Syntax Error: Invalid dimension expression</div><div> Dimension value missing or invalid</div><div>Error from MAX: 1st dimension expression invalid</div><div>Operation Error: Error from max function</div><div> Error ocurred at column 1</div><div>DEFINE error: Invalid expression. </div><div>Syntax Error: Invalid Operand </div><div> 'tmax' not a variable or function name</div><div> Error ocurred at column 1</div><div>DISPLAY error: Invalid expression </div><div> Expression = tmax</div></div><div><br></div><div><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Renée C. Elder<br><div>PhD Student </div><div>Geography (Meteorology-Climatology)</div><div>Arizona State University </div></div></div></div>
</div></div></div>