GraDs into Matlab

Shun Jie Liu shun.jie.liu at INVENIA.CA
Tue Apr 29 16:28:34 EDT 2008


Thats good to know ! I would like to help, as this would benefit me and my project with matlab.
However, I don't have alot of experience with python, so I am not sure if I am suited for the GrADS/Matlab project.
What skillset do you think is required to pick this up ?

- Shunjie


________________________________

Date: Sun, 27 Apr 2008 14:24:11 -0400
From: dasilva at ALUM.MIT.EDU
Subject: Re: GraDs into Matlab
To: GRADSUSR at LIST.CINECA.IT


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


________________________________

Sign in today. When you sign in to Windows Live Messenger you could win $1000 a day until May 12th. Learn more at SignInAndWIN.ca

_________________________________________________________________
Turn every day into $1000. Learn more at SignInAndWIN.ca
http://g.msn.ca/ca55/213



More information about the gradsusr mailing list