<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Good Evening All,<br>
<br>
I'm currently trying to create a very simple function script (.gsf) where a weekday is changed from say &quot;Sun&quot; to &quot;Sunday&quot; and then plotted. I have sought help from a few people who are GrADS-proficient and they are as stumped as I am.<br>
<div><br>
Here's what I'm dealing with:<br>
<br>
<b>Function Script:</b><br>
<br>
function convertday(fday)<br>
<br>
rc = gsfallow(&quot;on&quot;)<br>
<br>
if (fday=&quot;Sun&quot;); newday=&quot;Sunday&quot;; endif<br>
if (fday=&quot;Mon&quot;); newday=&quot;Monday&quot;; endif<br>
if (fday=&quot;Tue&quot;); newday=&quot;Tuesday&quot;; endif<br>
if (fday=&quot;Wed&quot;); newday=&quot;Wednesday&quot;; endif<br>
if (fday=&quot;Thu&quot;); newday=&quot;Thursday&quot;; endif<br>
if (fday=&quot;Fri&quot;); newday=&quot;Friday&quot;; endif<br>
if (fday=&quot;Sat&quot;); newday=&quot;Saturday&quot;; endif<br>
<br>
return(newday)<br>
<br>
<b>Command to function in main script:</b><br>
<br>
'/home/aaron/grads/day_abv.gsf 'fday''<br>
<br>
<b>How I'm attempting to plot the variable:</b><br>
<br>
'draw string 2.60 8.05 Valid: 'thour' 'tz' ('thour2') 'newday' 'fday2' 'fmonth' 'fyear''<br>
<br>
Also, I'm using <b>'q time' fday = subwrd(result,6)</b> to get the actual weekday name at the top of the main script.<br>
<br>
This function should be working, as it's probably as simple as you could get for a function.<br>
<br>
Any ideas?<br>
<br>
<br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">Onward and Upward,<br>
<div style="font-family:Tahoma; font-size:13px"><font size="3"><font face="Arial"><font face="Tahoma" size="2"><font size="2"><br>
</font>Aaron D. Perry<br>
</font><font size="3"><font size="3"><font face="Tahoma" size="2">Atmospheric Sciences<br>
Lyndon State College<br>
Class of 2016<br>
</font></font></font></font></font><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma" size="2"><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma" size="2">Boston, MA</font></font></font></font></font>
<br>
Twitter: <a href="https://twitter.com/AaronPerryLSC">@AaronPerryLSC</a><br>
</font></font></font></font></font><font size="3"><font face="Arial"><font size="3"><font size="3"><font face="Tahoma" size="2">Mobile: 617-780-4312</font></font></font></font></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>