GraDs into Matlab

Arlindo da Silva dasilva at ALUM.MIT.EDU
Sun Apr 27 14:24:11 EDT 2008


On Fri, Apr 25, 2008 at 4:25 PM, Shun Jie Liu <shun.jie.liu at invenia.ca>
wrote:

>  Hi, I have some WRF output post-processed using ARWpost.
> Now I am trying to get them into Matlab.
> The matlab script I find wrote by *Christophe Sturm*<http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectType=author&objectId=1097568> on
>
>
> http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15326&objectType=File didn't
> quite work for me.
>
> Does anyone have any experience working with GrADs and Matlab together ?
>

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  very
feasible, it just needs someone to carefully translate what has been done
for the other interfaces into Matlab.

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:

ga_new()   % start GrADS
ga_ ('open model.ctl')   % open a file
var = ga_get('ts')   % return variable ts as a 2D matlab array
ga_end() % stops GrADS

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.  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.

   Arlindo


--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080427/47d47b16/attachment.html 


More information about the gradsusr mailing list