<div dir="ltr"><div><div><div><b><span style="font-family:arial,helvetica,sans-serif"><font>Dear Olaguera,<br></font></span></b></div><span style="font-family:arial,helvetica,sans-serif"><font><b>This is a simple script I use. </b><u><br></u><i><br>'reinit'<br>****Open your netcdf file <br>'sdfopen C:\Users\Joshua\Documents\<a href="http://precipitation.nc" target="_blank">precipitation.nc</a>'<br>*** Set the longitudes and latitudes of you stations e.g in East Africa<br>lon.1=36.4<br>lon.2=36<br>lon.3=36.8<br>lon.4=35.3<br><br>lat.1=-0.4<br>lat.2=1.3<br>lat.3=-1.3<br>lat.4=0.5<br>lat.5=-0.5<br><br>***set names of stations corresponding to your coordinates<br>sta.1=Kenya<br>sta.2=Uganda<br>sta.3=Tanzania<br>sta.4=Rwanda<br>sta.5=Burundi<br><br>i=1<br>while(i<=5)<br>ln=lon.i<br>lt=lat.i<br>stn=sta.i<br>'set lon 'ln<br>'set lat 'lt<br>'set t 1'<br>****** pr is your variable<br>***define where your values will be extracted to e.g<br>****** %g 1 1 will extract your values in one continues column<br><br>'fprintf pr C:\Users\Joshua\Documents\precipitation-data\'stn.txt %g 1 1'<br>i=i+1<br>endwhile<br><br>***Also ensure the fprintf file is in the same folder with your grads script<br>say 'I AM HOME AND DRY...........'<br></i><u><br></u></font></span><span style="font-family:arial,helvetica,sans-serif"><font><span style="font-family:arial,helvetica,sans-serif"><font>I hope it helps</font></span><u><span style="font-family:arial,helvetica,sans-serif"><font><b><br></b></font></span></u></font></span><br></div>Kind Regards<br></div>Joshua<br><div><br><div><span style="font-family:arial,helvetica,sans-serif"></span><div class="gmail_extra"><span style="font-family:arial,helvetica,sans-serif"><font></font></span><div class="gmail_quote"><span style="font-family:arial,helvetica,sans-serif"><font>On Sat, Oct 4, 2014 at 8:48 AM, Lyndon Mark Olaguera <span dir="ltr"><<a href="mailto:olagueralyndonmark429@gmail.com" target="_blank">olagueralyndonmark429@gmail.com</a>></span> wrote:<br></font></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span style="font-family:arial,helvetica,sans-serif"><font>Hi all,</font></span><div><span style="font-family:arial,helvetica,sans-serif"><font>I'd like to extract values of rainfall from selected stations froma netcdf file with lat lon.</font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font>What is the simplest way of doing this?</font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font>Any suggestions?</font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font>I tried to use the <a href="http://fprintf.gs" target="_blank">fprintf.gs</a> from GRADS but theres an error saying Invalid arguments of Lat anf Lon.</font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font><br></font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font><br></font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font>Thanks for any help.</font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font><br clear="all"></font></span><div><div dir="ltr"><span style="font-family:arial,helvetica,sans-serif"><font><u>Lyndon Mark P. Olaguera</u></font></span><div><span style="font-family:arial,helvetica,sans-serif"><font>Assistant Instructor</font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font>Ateneo de Manila University</font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font>426 6001</font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font>loc 5695</font></span></div></div></div>
</div></div>
<span style="font-family:arial,helvetica,sans-serif"><font><br>______________________________</font></span><span style="font-family:arial,helvetica,sans-serif"><font>_________________<br>
gradsusr mailing list<br></font></span>
<span style="font-family:arial,helvetica,sans-serif"><font><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br></font></span>
<span style="font-family:arial,helvetica,sans-serif"><font><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></font></span>
<span style="font-family:arial,helvetica,sans-serif"><font><br></font></span></blockquote></div><span style="font-family:arial,helvetica,sans-serif"><font><br></font></span></div></div></div></div>