[Thread Prev][Thread Next][Index]

Re: Running LAS with GrADS as the visualization program



Jennifer,

It will work if you use Perl backquotes instead of the system call. Apply the following patch to your custom.pl code:

112,113c112,116
<     my $status = system("$GradsDir/grads -lbc $Script");
<     debug("status = $status\n");
---
>     my $comm = "$GradsDir/grads -lbc $Script";
>     debug("Command is $comm\n");
>     my $results = `$comm`;
> #    my $results = system($comm);
>     debug("results = $results\n");

The variable $results will contain the output from GrADS (you might want to look at this output to trap errors).

Jennifer M. Adams" wrote:

 
> Here are a few things to look at:
> ...If you're not
> going to use any of the CLC machinery for communicating
> with a child process, it would probably be easier to just
> use the "system" call in Perl to execute GrADS.

Right! That makes it much simpler, as I really have no need
for the CLC protocol. I have implemented this change and I
can get it to work ... except for one little problem: on my
first request to 'get data' I see the text output from the
GrADS execution into the display window instead of an image.
The text is what I would see if I were to run the script
from my unix command line plus 2 lines of extra text:

    Status: 302 Moved
    Location: <the URL of the .gif image to display>

If I then hit the "reload" button in the display window, the
image comes up. Is this another timing issue?

Here's the URL: http://192.239.84.113:8001/las/

Thanks for all your patience and help,
Jennifer

--
----------------------------------------
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
Phone: (301)902-1278 or (301)595-7000
Fax:   (301)595-9793
Email: jma@cola.iges.org

--
Joe Sirott
 
[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement