Nov 4 – 5, 2025
Virtual
Europe/Zurich timezone
Final timetable has been published! Registration will close this Friday!

Gfort2py: A simple way to call Fortran from Python

Nov 4, 2025, 6:00 PM
30m
ZOOM (Virtual)

ZOOM

Virtual

Presentations (25 + 5 minutes) Sessions

Speaker

Robert Farmer

Description

Here I will discuss my open source project Gfort2py, a library designed to make it simple to call Fortran from Python, which has been developed over the last 10 years. Gfort2py was designed to make it simple to interface Fortran to Python without needing to make any changes to the Fortran code, while also minimizing changes to build systems. I will discuss how you can interface Fortran with Python, without having to rewrite your code to use iso_c_binding or otherwise annotating your source code to make Python understand Fortran. I will show some of the problems I encountered along the way in understanding Fortran code and creating an interface to it. I will demonstrate its abilities to call Fortran procedures and access module variables, this will also include demonstrating some of its advanced capabilities including accessing allocatable arrays, derived types, and IEE 754 quadruple precision variables.

Author

Presentation materials

There are no materials yet.