<div dir="ltr">Thank You<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 26, 2014 at 4:13 PM, Stephen McMillan <span dir="ltr"><<a href="mailto:smcmillan@planalytics.com" target="_blank">smcmillan@planalytics.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ipshita,<div>Try making it a dummy variable, for example:</div><div><br></div><div>dum=<span style="font-size:13px;font-family:arial,sans-serif">write('monthly_mean_Precp.txt'</span><span style="font-size:13px;font-family:arial,sans-serif">,monthavg)</span></div><div><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div><div><span style="font-size:13px;font-family:arial,sans-serif">Stephen Mc</span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Sep 26, 2014 at 4:41 PM, Ipshita Majhi <span dir="ltr"><<a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Dear Grads Users,<br><br>I am running a script to convert daily to monthly data and it runs till I put a write command to get an output then it tells me it is an unknown command.It will be great if someone can help me. <br><br>*************************************************************************************************<br>*Date 09/25/2014<br>*This script is to convert daily values to monthly values for different years which starts from 1901 <br>* and ends in 2010<br>**************************************************************************************************<br>rc=gsfallow("on")<br>'reinit'<br>mday = '31 28 31 30 31 30 31 31 30 31 30 31'<br>month = 'jan feb mar apr may jun jul aug sep oct nov dec'<br><br>'open prec.mean.imr.ctl'<br><br><br><br> yr1 = 1901<br> yr2 = 2010<br><br> yr = yr1<br> while(yr<=yr2)<br><br> leap = 0<br> if(math_mod(yr,400) = 0 | math_mod(yr,4) = 0 & math_mod(yr,100) != 0)<br><br> leap = 1<br><br> say yr' is a leap year.'<br>endif<br><br> imon = 1<br> while(imon <= 12)<br> md = subwrd(mday,imon)<br> mc = subwrd(month,imon)<br> if(imon = 2); md = md + leap; endif;<br> time1 = '01'mc''yr<br> time2 = md''mc''yr<br><br> ' monthavg= ave(p,time='time1',time='time2')'<br> imon = imon + 1<br> endwhile<br> yr = yr + 1<br> endwhile<br><br>write('monthly_mean_Precp.txt',monthavg)<br><br><br></div>
<br></div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>