On Jul 1, 2012, at 11:25 AM, Dennis Heimbigner wrote:
> > ... One comment. I think you misunderstood my point about
> > Matlab and R. I am not interested in Matlab specific
> > implementations. The point was because the URL completely
> > defines the request, I can implement scripts in any application
> > that can send an URL and receive a file in terms of functions
> > built-in to that application - that is my clients do not break as
> > the application or operating system change.
> Not quite sure I understand. This phrase "...receive a file in
> terms of functions built-in to that application" sounds
> like you are creating an association between functions defined
> on the client side and functions defined on the server side.
> Can you elaborate?
Okay, let's start with my original example. Put the following URL in your
You just downloaded a netcdf file that was a subset of a larger virtual file.
And try this one:
You just got a png of the same data. These URL's completely define the service
request, in this case the service is ERDDAP. So given that, any application
that has a command that can send an URL and receive a file, can use the
service. In the case of Matlab that command is "urlwrite". In case of R, that
command is "download.file". So now we can develop scripts for Matlab and R
that are based on the commands "urlwrite" or "download.file", can use the
service by just constructing the proper URL, and therefore every command in the
script is a command built into that application, so the updating and
maintenance of that command is the job of the application developer.
Just to either make the point clearer or to muddy the waters (you never know),
here is a brief matlab script that uses the command (it does use the m_map
toolbox for mapping but that is separate from the service):
> pcolor(double(ssta));shading flat;colorbar;
> latitude= erdBAsstamday.latitude;
> longitude= erdBAsstamday.longitude;
> m_proj('mercator','lon',[-140 -115], 'lat', [30 50]);
> shading flat;
> m_coast('patch',[.7 .7 .7]);
And similarly in R:
To see this idea taken to a further level, see
"The contents of this message do not reflect any position of the U.S.
Government or NOAA."
Supervisory Operations Research Analyst
Environmental Research Division
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097
e-mail: Roy.Mendelssohn@xxxxxxxx (Note new e-mail address)
"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected"
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.