The open source RFortran library for accessing R from Fortran, with applications in environmental modelling - INRAE - Institut national de recherche pour l’agriculture, l’alimentation et l’environnement Accéder directement au contenu
Article Dans Une Revue Environmental Modelling and Software Année : 2011

The open source RFortran library for accessing R from Fortran, with applications in environmental modelling

M. Thyer
D. Kavetski
Benjamin Renard

Résumé

The open source RFortran library is introduced as a convenient tool for accessing the functionality and packages of the R programming language from Fortran programs. It significantly enhances Fortran programming by providing a set of easy-to-use functions that enable access to R0s very rapidly growing statistical, numerical and visualization capabilities, and support a richer and more interactive model development, debugging and analysis setup. RFortran differs from current approaches that require calling Fortran Dynamic link libraries (DLL) from R, and instead enables the Fortran program to transfer data to/from R and invoke R-based procedures via the R command interpreter. More generally, RFortran obviates the need to re-organize Fortran code into DLLs callable from R, or to re-write existing R packages in Fortran, or to jointly compile their Fortran code with the R language itself. Code snippets illustrate the basic transfer of data and commmands to and from R using RFortran, while two case studies discuss its advantages and limitations in realistic environmental modelling applications. These case studies include the generation of automated and interactive inference diagnostics in hydrological model calibration, and the integration of R statistical packages into a Fortran-based numerical quadrature code for joint probability analysis of coastal flooding using numerical hydraulic models. Currently, RFortran uses the Component Object Model (COM) interface for data/command transfer and is supported on the Microsoft Windows operating system and the Intel and Compaq Visual Fortran compilers. Extending its support to other operating systems and compilers is planned for the future. We hope that RFortran expedites method and software development for scientists and engineers with primary programming expertise in Fortran, but who wish to take advantage of R0s extensive statistical, mathematical and visualization packages by calling them from their Fortran code. Further information can be found at www.rfortran.org.
Fichier principal
Vignette du fichier
LY2011-PUB00029840.pdf (533.71 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-00546910 , version 1 (15-12-2010)

Identifiants

Citer

M. Thyer, M. Leonard, D. Kavetski, S. Need, Benjamin Renard. The open source RFortran library for accessing R from Fortran, with applications in environmental modelling. Environmental Modelling and Software, 2011, 26, p. 219 - p. 234. ⟨10.1016/j.envsoft.2010.05.007⟩. ⟨hal-00546910⟩

Collections

IRSTEA INRAE
133 Consultations
1110 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More