<div dir="ltr">Hello Stephen,<div> I have corrected but still getting a single value......not the values for all 12 months separately. </div><div><br></div><div>Regards</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 28, 2016 at 6:02 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">Gargi,<div><br></div><div>You are getting only January because your current script is redefining "month" on the first iteration of the while loop. Rename it to something different, since it's already defined on the third line you provided.</div><div><br></div><div>Stephen Mc</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Mar 28, 2016 at 7:51 AM, Gargi Akhoury <span dir="ltr"><<a href="mailto:gargiakhoury@bitmesra.ac.in" target="_blank">gargiakhoury@bitmesra.ac.in</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 User's,<div> </div><div> I have tried a program to display the monthly sum of precipitation. But I am getting only the January value. Kindly, help me regarding this.</div><div><br></div><div>Tha program is as follows:</div><div><br></div><div><div>'reinit'</div><div> mday = '31 28 31 30 31 30 31 31 30 31 30 31'</div><div> month = 'jan feb mar apr may jun jul aug sep oct nov dec'</div><div><br></div><div>'open rfc.ctl'</div><div>*'set t 1 365' </div><div> yr = 1951</div><div><br></div><div>imon=1</div><div> while(imon <= 12)</div><div> md = subwrd(mday,imon)</div><div> mc = subwrd(month,imon)</div><div> time1 = '01'mc''yr</div><div> time2 = md''mc''yr</div><div>'define month=sum(rf,t='time1',t='time2')' </div><div> imon = imon + 1</div><div> endwhile </div><div>'d month'</div><div><br></div><div>val=subwrd(result,4)</div><div>hj=write(rf_month.csv,val)</div><div><br></div></div><div><br></div><div>Thanks & Regards</div></div>
<br></div></div><span class="">_______________________________________________<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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></span></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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>