<div class="gmail_quote">2008/6/9 Fredrick Mashingia <<a href="mailto:fmashingia@yahoo.com">fmashingia@yahoo.com</a>>: <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0" style="font-family:arial;font-size:10pt;color:#000000;background-color:#ffffff;width:100%"><tbody><tr><td valign="top" style="font:inherit"><p style="margin:0in 0in 0pt;line-height:normal;text-align:justify">
<span style="font-size:12pt">Hi,</span></p>
<p style="margin:0in 0in 0pt;line-height:normal;text-align:justify"><span style="font-size:12pt"></span> </p></td></tr></tbody></table></blockquote><div><br></div><div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0); ">First of all, please do not send questions like this directly to me. Always send it to the "gradsusr" list. Two reasons: 1) generally there are more knowledgeable people out there that may have direct experience with your problem, and 2) in case I know the answer, the list provides a searchable resource for future reference by other users. </span></div>
<div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"><br></span></div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0" style="font-family:arial;font-size:10pt;color:#000000;background-color:#ffffff;width:100%">
<tbody><tr><td valign="top" style="font:inherit"><p style="margin:0in 0in 0pt;line-height:normal;text-align:justify"></p>
<p style="margin:0in 0in 0pt;line-height:normal;text-align:justify"><span style="font-size:12pt">I am trying to appy the GSMaP-TMI hourly precipitatition data(in grads format) over Africa and I can display the data( for the events of 19th to 22nd April 1999,28th to 30th April 1999 and 14th to 18th May 1999) using GrADS 1.9b4 in FC5 OS machine. I would like to ask if it is possible to extract time series data (in text format) from each GrADS lat/lon grids in my 52 <a href="http://sq.km" target="_blank">sq.km</a> catchment located between lon 37<sup>0</sup>19'08''E and 37<sup>0</sup>24'15''E, and lat 3<sup>0</sup>04'33''S to 3<sup>0</sup>17'14''S at an elevation between 1000masl and 5895masl (the summit of Mt.Kilimanjaro). </span></p>
</td></tr></tbody></table></blockquote><div><br></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);">Have you had a chance to search "gradsusr" about this? It is unfortunate that "gradsusr" requires people to register in order to search it, but you will be surprised how much information you can find there. For this particular issue (writing ASCII), the answer is "yes". While you "set gxout fwrite" to write binary files, you "set gxout print" to produce ASCII output. The documentation can be found here:</span></div>
<div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"><br></span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"> <a href="http://grads.iges.org/grads/gadoc/gradcomdsetprnopts.html">http://grads.iges.org/grads/gadoc/gradcomdsetprnopts.html</a></span></div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0" style="font-family:arial;font-size:10pt;color:#000000;background-color:#ffffff;width:100%">
<tbody><tr><td valign="top" style="font:inherit"><p style="margin:0in 0in 0pt;line-height:normal;text-align:justify"><span style="font-size:12pt">And also if it is possible to change the GrADS lat/lon grids into match with my model grid resolution. </span></p>
</td></tr></tbody></table></blockquote><div><br></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);">You have several options for "regridding" data from one resolution into another. For smooth, continuous fields linear or even cubic interpolation works fine. For discontinuous fields such as precipitation you may want to use a "box averaging" or "mass conserving" scheme. In the GrADS v1.9 series these are implemented by the classic user defined function "regrid2" in GrADS v1.9b4 and older, or by the "re" extension available with the OpenGrADS extensiona in v1.9-rc1:</span></div>
<div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"><br></span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"> <a href="http://opengrads.org/wiki/index.php?title=User_Defined_Extensions">http://opengrads.org/wiki/index.php?title=User_Defined_Extensions</a></span></div>
<div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"><br></span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);">In particular the man page:</span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"><br>
</span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"> <a href="http://opengrads.org/doc/udxt/re/">http://opengrads.org/doc/udxt/re/</a><br></span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"> </span></div>
<div><span class="Apple-style-span" style="color: rgb(153, 0, 0);">You can download v1.9-rc1 and extensions from the OpenGrADS <a href="http://sf.net">sf.net</a> area:</span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"><br>
</span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"> <a href="http://sourceforge.net/project/showfiles.php?group_id=161773">http://sourceforge.net/project/showfiles.php?group_id=161773</a><br>
</span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"><br></span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);">As of this writing, GrADS v2 only offers a linear interpolation option by means of the built in function lterp().</span></div>
<div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"> </span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0" style="font-family:arial;font-size:10pt;color:#000000;background-color:#ffffff;width:100%">
<tbody><tr><td valign="top" style="font:inherit"><p style="margin:0in 0in 0pt;line-height:normal;text-align:justify"><span style="font-size:12pt">I understand the two
operations can be done under ArcView environment easly but then I dont know how one can convert grads data into arcview shapefiles. Please if you can help I should be very grateful.</span></p></td></tr></tbody></table></blockquote>
<div><br></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);">As of now there is no shapefile output capability in GrADS, although some of us have started working on it. In any case, I am not sure one would use shapefiles, which is often used to write out "vector graphics" (lines, filled polygons, etc), to output gridded data. I never used ArcView myself, but I wonder if it cannot read regular binary or netcdf files. Does anybody know? If so, can you post a mini "how-to" to the list?</span></div>
<div><br></div><div> <span class="Apple-style-span" style="color: rgb(153, 0, 0);">Good Luck,</span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"><br></span></div><div><span class="Apple-style-span" style="color: rgb(153, 0, 0);"> Arlindo</span></div>
</div><br clear="all"><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a>