comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: giving input to fortran program using spawn in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: giving input to fortran program using spawn in IDL [message #62679] Fri, 26 September 2008 01:41 Go to previous message
vino is currently offline  vino
Messages: 36
Registered: March 2008
Member
On Sep 24, 6:05 pm, ramm...@gmail.com wrote:
> Dear all,
>
>       I have some programs written in fortran-77. I want to run them
> in
> the IDL editor. I tried using spawn command. Which is good only if I
> am not worry about input to fortran from IDL itself. The result from
> spawn can be split according our fortran program.
>
>       But I am creating some data from IDL, which is required for
> fortran
> as input. I search on the web and tried myself. But I could not make
> it.

Hi I dealt with this issue a couple of months ago. I too wanted to
transfer an array data from IDL to Fortran for processing and pass it
back.
I simply wrote an outfile from IDL, which fortran uses as an input
parameter file.And it worked well for me.
Here is what i did:

forprint,result,text='data.prt',/silent,/nocomment ;The variable
result contains the array that are the inputs of fortran and
these ;are stored in a file data.prt.

spawn,['./fortran.f'],/noshell, result ;Here the variable result
contains the output from fortran. I used the no shell keyword
to ;increase the speed.


Hope it was useful,

regards,
vino
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Possible to display .h5 ad .hdf together
Next Topic: Re: Possible to display .h5 ad .hdf together

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 09:33:50 PDT 2025

Total time taken to generate the page: 0.96178 seconds