<div dir="ltr">Ramchandra,<div><br></div><div>To answer your first question, you will need to develop a script to calculate each months total for every year. Hard coding would be something like;</div><div><br></div><div>define jan=sum(precip,t=1,t=31)</div><div>define feb=sum(precip,t=32,t=59)</div><div>define mar=sum(precip,t=60,t=90)</div><div>....</div><div><br></div><div>Next year data i.e. 1952 jan 1st starts at t=366 and continues so on (you must have already known). Now if you can put this kind of commands in a loop then you have it. Eventually, if you want to build a climatology from the 57 year of data, I suggest you create monthly binary file and work on it. Daily rainfall data is useful only to study the extremes such as your next two questions.</div><div><br></div><div>Your second question about the number of rainy days - I presume number of rainy days in a year. Again you need a separate program which counts days when condition is fulfilled. In my case, I wrote o short program in Fortran which calculates number of days over each grid, then I used GrADS to read this file to display the number of rainy days.</div><div><br></div><div>Third question;</div><div>In order to calculate percentile, first you need to SORT the data and find the values for different percentile. Once you have the threshold value, you can follow the same procedure for finding number of rainy days and work on.</div><div><br></div><div>So the way forward is not that simple. For more queries, you can contact me at my office.</div><div><br></div><div>-rupak</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 1, 2015 at 11:07 PM, Ramchandra Karki <span dir="ltr">&lt;<a href="mailto:rammetro@hotmail.com" target="_blank">rammetro@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Hi all<div>I am beginner to grads and I want to calculate the following from these data set</div><div>i have <b>daily </b>Aphrodite data set  with control file in this format</div><div><br></div><div><div>dset F:\005deg\APHRO_NPL_005deg_V1003R1.%y4</div><div>*</div><div>undef -99.9</div><div>options little_endian template</div><div>title Averaged Daily Precipitation Value</div><div>*</div><div>xdef   190 linear   79.525 0.05</div><div>ydef   100 linear   26.025 0.05</div><div>zdef     1 levels 1</div><div>tdef 20819 linear 01jan1951 1dy</div><div>*</div><div>vars 3</div><div>precip 1 00 daily precipitation analysis (mm/day)</div><div>flgcnt 1 00 if 1, offline (individual country&#39;s) gauge(s) exists</div><div>flggts 1 00 if 1, online (GTS-based) gauge(s) exists</div><div>endvars</div><br><ol><li><i>how can i calculate the monthly rainfall total for each year from 1951 to 2009 using some loops or easier way</i></li><li>how can i get rainy days (count of days &gt;1mm rainfall)</li><li>how can i get percentile 99 for 1971 to 2000 and then days with count &gt; 99 percentile</li></ol></div><div><i><br></i></div><div><i>Regards<span class="HOEnZb"><font color="#888888"><br>Ramchandra Karki<br>Department of Hydrology and Meteorology, Nepal<br><br></font></span></i></div>                                               </div></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>