pyADCIRC: A Python interface for accessing functions and variables of ADCIRC in Python

Saved in:
Bibliographic Details
Title: pyADCIRC: A Python interface for accessing functions and variables of ADCIRC in Python
Authors: Choudhary, Gajanan K., Dawson, Clint
Publication Year: 2020
Collection: Carolina Digital Repository (UNC - University of North Carolina)
Subject Terms: Python interface, Coupled models, GSSHA, Compound flooding, ADCIRC, Software modernization
Description: Python has a vast collection of modern open-source libraries such as PyTorch and TensorFlow for machine learning and Matplotlib for visualization. On the other hand, Fortran has a significant advantage of speed over Python and a large number of legacy software written in it, including ADCIRC. This talk focuses on one method of modernizing ADCIRC to enable certain new applications with it. Some ways to modernize ADCIRC include (a) re-implementing ADCIRC in, say, Python, (b) re-implementing modern libraries such as PyTorch in Fortran for use with ADCIRC, and (c) combining Fortran and Python using libraries such as f2py or f90wrap. The first two approaches are costly and fraught with challenges, whereas the third approach, which is the focus of this talk, is more balanced. The ADCIRC source code is compiled into a shared library using f2py and imported into Python, allowing one to access most ADCIRC variables and functions in Python. The Python interface, pyADCIRC, is non-intrusive in that it does not require modification of any existing Fortran files; instead, new files are added to the source code. pyADCIRC acts as a parallel computational library that may be used and manipulated for any purpose in Python, such as machine learning and multi-software coupling. An application of pyADCIRC is presented, in which ADCIRC and GSSHA models are two-way weakly coupled through their Python interfaces for simulating compound flooding, without requiring any file I/O for data exchange.
Document Type: other/unknown material
Language: English
Relation: https://cdr.lib.unc.edu/downloads/8w32rb927?file=thumbnail; https://cdr.lib.unc.edu/downloads/8w32rb927
DOI: 10.17615/mnf0-hw98
Availability: https://doi.org/10.17615/mnf0-hw98
https://cdr.lib.unc.edu/downloads/8w32rb927?file=thumbnail
https://cdr.lib.unc.edu/downloads/8w32rb927
Rights: http://rightsstatements.org/vocab/InC/1.0/
Accession Number: edsbas.989BF89B
Database: BASE
Description
Abstract:Python has a vast collection of modern open-source libraries such as PyTorch and TensorFlow for machine learning and Matplotlib for visualization. On the other hand, Fortran has a significant advantage of speed over Python and a large number of legacy software written in it, including ADCIRC. This talk focuses on one method of modernizing ADCIRC to enable certain new applications with it. Some ways to modernize ADCIRC include (a) re-implementing ADCIRC in, say, Python, (b) re-implementing modern libraries such as PyTorch in Fortran for use with ADCIRC, and (c) combining Fortran and Python using libraries such as f2py or f90wrap. The first two approaches are costly and fraught with challenges, whereas the third approach, which is the focus of this talk, is more balanced. The ADCIRC source code is compiled into a shared library using f2py and imported into Python, allowing one to access most ADCIRC variables and functions in Python. The Python interface, pyADCIRC, is non-intrusive in that it does not require modification of any existing Fortran files; instead, new files are added to the source code. pyADCIRC acts as a parallel computational library that may be used and manipulated for any purpose in Python, such as machine learning and multi-software coupling. An application of pyADCIRC is presented, in which ADCIRC and GSSHA models are two-way weakly coupled through their Python interfaces for simulating compound flooding, without requiring any file I/O for data exchange.
DOI:10.17615/mnf0-hw98