2009
DOI: 10.1504/ijcse.2009.029165
|View full text |Cite
|
Sign up to set email alerts
|

F2PY: a tool for connecting Fortran and Python programs

Abstract: Abstract:In this paper we tackle the problem of connecting low-level Fortran programs to high-level Python programs. The difficulties of mixed language programming between Fortran and C are resolved in an almost compiler and platform independent way. We provide a polished software tool F2PY that can (semi-)automatically build interfaces between the Python and Fortran languages and hence almost completely hide the difficulties from the target user: a research scientist who develops a computer model using a high… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
160
0
2

Year Published

2009
2009
2022
2022

Publication Types

Select...
6
3

Relationship

0
9

Authors

Journals

citations
Cited by 212 publications
(164 citation statements)
references
References 7 publications
0
160
0
2
Order By: Relevance
“…The Python language is particularly beneficial in allowing the system to be expended, because: (1) there are a large number of Python libraries already available, such as pandas [36] and statsmodels [37], which provide functions for statistical analysis; (2) Python provides good interoperability with other languages, such as C/C++ and Fortran (through f2py; [38]), allowing existing code to be incorporated as part of the workflow. Presenting the attributes of each object as a NumPy arrays, through RIOS, makes it easy to interface with these packages.…”
Section: Expansion Of the Systemmentioning
confidence: 99%
“…The Python language is particularly beneficial in allowing the system to be expended, because: (1) there are a large number of Python libraries already available, such as pandas [36] and statsmodels [37], which provide functions for statistical analysis; (2) Python provides good interoperability with other languages, such as C/C++ and Fortran (through f2py; [38]), allowing existing code to be incorporated as part of the workflow. Presenting the attributes of each object as a NumPy arrays, through RIOS, makes it easy to interface with these packages.…”
Section: Expansion Of the Systemmentioning
confidence: 99%
“…With a scripting language as coupling infrastructure, as promoted by Ousterhout (1998) and implemented in this study, a lightweight, flexible and less formalized interface can be used for exchanging data between models. Converting an existing model, like one of the mentioned well known plant growth models into a module of a scripting language is relatively simple, given automation tools such as SWIG (Beazley and Lomdahl, 1996) for model codes in C or C++ or F2PY (Peterson, 2009) for model codes in FORTRAN. In difference to coupling platforms, the user of a "pure" submodel integrated into a scripting language yields benefits, such as simplified testing or model run batching.…”
Section: Discussionmentioning
confidence: 99%
“…Since CMF and DECOMP are Python extensions, written in C++ and PMF is entirely written in Python, the integration is straightforward. Existing legacy model codes can be wrapped as a Python extension using tools like SWIG (Simple Wrapper Interface Generator) (Beazley and Lomdahl, 1996) for model codes written in C or C++ or F2PY (Peterson, 2009) for model codes written in FORTRAN. The level required to wrap an existing model code depends primarily on the modularity of the existing code.…”
Section: Integrationmentioning
confidence: 99%
“…21 This tool can be used as an automatic interface generator for both Fortran and C languages. The first step consists of creating an interface file, for example named wrap cfd.c, written in C language allowing easy access to any C function from Python and avoiding the need to modify directly the source code.…”
Section: Iiia1 Wrapping C Language With Pythonmentioning
confidence: 99%