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

Home » Public Forums » archive » Can I interface my fortran program in IDL code?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Can I interface my fortran program in IDL code? [message #88824] Tue, 24 June 2014 05:33 Go to next message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
Hello,

I have a fortran (.f90) program which includes some function subroutines and the code as a single file. But there are multiple input data files are required for compiling this f90 code. As I am using IDL for plotting and data processing, I was thinking if I can create the input files (i.e., ASCII & Binary), compile and run the f90 code, and then extract the data from multiple output files that were created to generate the plots automatically. I just wanted to know how I can work with FORTRAN program / function files from within an IDL code.

Any help with few examples or reference documentation on this topic will be appreciable.

Thanking you in advance,
Madhavan
Re: Can I interface my fortran program in IDL code? [message #88829 is a reply to message #88824] Tue, 24 June 2014 09:50 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/24/14, 6:33 AM, Madhavan Bomidi wrote:
> Hello,
>
> I have a fortran (.f90) program which includes some function
> subroutines and the code as a single file. But there are multiple
> input data files are required for compiling this f90 code. As I am
> using IDL for plotting and data processing, I was thinking if I can
> create the input files (i.e., ASCII & Binary), compile and run the
> f90 code, and then extract the data from multiple output files that
> were created to generate the plots automatically. I just wanted to
> know how I can work with FORTRAN program / function files from within
> an IDL code.
>
> Any help with few examples or reference documentation on this topic
> will be appreciable.
>
> Thanking you in advance, Madhavan
>

Did you try CALL_EXTERNAL? This is the simplest way to call C/Fortran
code from IDL.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
Re: Can I interface my fortran program in IDL code? [message #88843 is a reply to message #88829] Wed, 25 June 2014 04:58 Go to previous messageGo to next message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
No... I have not tried using CALL_EXTERNAL earlier. Any nice documentation with examples to use this function???

Thanks in advance,
Madhavan
Re: Can I interface my fortran program in IDL code? [message #88846 is a reply to message #88843] Wed, 25 June 2014 05:50 Go to previous messageGo to next message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
On Wednesday, June 25, 2014 7:58:12 AM UTC-4, Madhavan Bomidi wrote:
> No... I have not tried using CALL_EXTERNAL earlier. Any nice documentation with examples to use this function???

If you go here
http://exelisvis.com/docs/CALL_EXTERNAL.html

And look in the examples, you will see a reference to this document
http://www.exelisvis.com/docs/EDG.html

It has nine sections on using Call_External, including "Fortran examples".
Re: Can I interface my fortran program in IDL code? [message #88848 is a reply to message #88846] Wed, 25 June 2014 06:15 Go to previous message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
Thanks for the links .... I will go through them!!!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: A grid is overlaid on an image
Next Topic: Output matrix from Wavelet Toolkit 3D Wavelet Power Spectrum

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

Current Time: Wed Oct 08 13:57:06 PDT 2025

Total time taken to generate the page: 0.00683 seconds