<div class="gmail_quote">On Fri, Apr 25, 2008 at 4:25 PM, Shun Jie Liu &lt;<a href="mailto:shun.jie.liu@invenia.ca">shun.jie.liu@invenia.ca</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




<div>
Hi, I have some WRF output post-processed using ARWpost.<br>
Now I am trying to get them into Matlab.<br>
The matlab script I find wrote by <a href="http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectType=author&amp;objectId=1097568" target="_blank"><u><font color="#0000ff">Christophe&nbsp;Sturm</font></u></a>&nbsp;on <br>

<a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15326&amp;objectType=File" target="_blank">http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15326&amp;objectType=File</a>&nbsp;didn&#39;t quite work for me.<br>

&nbsp;<br>
Does anyone have any experience working with GrADs and Matlab together ?<br>
</div></blockquote><div><br></div><div>I have started working on a GrADS-Matlab/octave interface similar to PyGrADS/Gerl, but I never brought it to the level of functionality of the Python/Perl interfaces. My initial experience shows that it is &nbsp;very feasible, it just needs someone to carefully translate what has been done for the other interfaces into Matlab.</div>
<div><br></div><div>The main idea of a GrADS/Matlab is to eliminate any need for file conversions, making any GrADS readable file immediately accessible from Matlab (really, any GrADS expression). Basically, you start GrADS from within Matlab:</div>
<div><br></div><div>ga_new() &nbsp; % start GrADS</div><div>ga_ (&#39;open model.ctl&#39;) &nbsp; % open a file<br></div><div>var = ga_get(&#39;ts&#39;) &nbsp; % return variable ts as a 2D matlab array<br></div><div>ga_end() % stops GrADS<br>
</div><div><br></div><div>I have a prototype for ga_new(), ga_() and ga_end() tested with octave. As I said, since it relies on the same bi-directional pipe technique used for the perl/python interfaces, it should be relatively straightforward to translated what has been done for these interfaces.&nbsp;&nbsp;If anyone with Matlab experience would like to volunteer I can share the pilot code I have and help guiding you through the steps. My focus these days remains with PyGrADS.</div>
<div><br></div><div>&nbsp;&nbsp; Arlindo</div><div><br></div><div><br></div></div>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a>