Preprints
https://doi.org/10.5194/gmd-2021-22
https://doi.org/10.5194/gmd-2021-22

Submitted as: development and technical paper 10 Mar 2021

Submitted as: development and technical paper | 10 Mar 2021

Review status: this preprint is currently under review for the journal GMD.

fv3gfs-wrapper: a Python wrapper of the FV3GFS atmospheric model

Jeremy McGibbon1, Noah D. Brenowitz1, Mark Cheeseman1, Spencer K. Clark1,2, Johann Dahm1, Eddie Davis1, Oliver D. Elbert1,2, Rhea C. George1, Lucas M. Harris2, Brian Henn1, Anna Kwa1, W. Andre Perkins1, Oliver Watt-Meyer1, Tobias Wicky1, Christopher S. Bretherton1,3, and Oliver Fuhrer1 Jeremy McGibbon et al.
  • 1Vulcan Inc., Seattle, WA, USA
  • 2Geophysical Fluid Dynamics Laboratory, NOAA, Princeton, NJ, USA
  • 3Department of Atmospheric Sciences, University of Washington, Seattle, WA, USA

Abstract. Simulation software in geophysics is traditionally written in Fortran or C++ due to the stringent performance requirements these codes have to satisfy. As a result, these codes are often hard to understand, hard to modify and hard to interface with high-productivity languages used for exploratory work. fv3gfs-wrapper is an open-source Python-wrapped version of NOAA's FV3GFS global atmospheric model, which is coded in Fortran. The wrapper provides simple interfaces to progress the Fortran main loop and get or set state from the Fortran model. These interfaces enable a wide range of use cases such as modifying the behavior of the model, introducing online analysis code, or saving model state and reading forcings directly to and from cloud storage. Model performance is identical to the fully-compiled Fortran model, unless routines to copy state in and out of the model are used. This copy overhead is well within an acceptable range of performance, and could be avoided with modifications to the Fortran source code. The wrapping approach is outlined and can be applied similarly in other Fortran models to enable more productive scientific workflows.

Jeremy McGibbon et al.

Status: open (until 05 May 2021)

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
  • RC1: 'Comment on gmd-2021-22', Anonymous Referee #1, 22 Mar 2021 reply
  • RC2: 'Comment on gmd-2021-22', Anonymous Referee #2, 31 Mar 2021 reply
  • RC3: 'Comment on gmd-2021-22', Anonymous Referee #3, 08 Apr 2021 reply

Jeremy McGibbon et al.

Data sets

Example 6-hour directory for FV3GFS atmospheric model Jeremy McGibbon, Oliver Watt-Meyer, Fanglin Yang, and Lucas Harris https://doi.org/10.5281/zenodo.4429298

Model code and software

VulcanClimateModeling/fv3gfs-wrapper: v0.6.0 GMD release Jeremy McGibbon, Noah D. Brenowitz, Oliver Watt-Meyer, Spencer Clark, Mark Cheeseman, Brian Henn, Oliver Fuhrer, Tobias Wicky, and Oliver Elbert https://doi.org/10.5281/zenodo.4474598

Executable research compendia (ERC)

VulcanClimateModeling/fv3gfs-wrapper: v0.6.0 GMD release Docker Image Jeremy McGibbon, Noah D. Brenowitz, Oliver Watt-Meyer, Spencer Clark, Mark Cheeseman, Brian Henn, Oliver Fuhrer, Tobias Wicky, and Oliver Elbert https://doi.org/10.5281/zenodo.4474639

Jeremy McGibbon et al.

Viewed

Total article views: 788 (including HTML, PDF, and XML)
HTML PDF XML Total BibTeX EndNote
573 207 8 788 2 2
  • HTML: 573
  • PDF: 207
  • XML: 8
  • Total: 788
  • BibTeX: 2
  • EndNote: 2
Views and downloads (calculated since 10 Mar 2021)
Cumulative views and downloads (calculated since 10 Mar 2021)

Viewed (geographical distribution)

Total article views: 654 (including HTML, PDF, and XML) Thereof 654 with geography defined and 0 with unknown origin.
Country # Views %
  • 1
1
 
 
 
 
Latest update: 19 Apr 2021
Download
Short summary
The FV3GFS is a weather and climate model written in Fortran. It uses Fortran so it can run fast, but this makes it hard to add features if you don't (or even if you do) know Fortran. We've written a Python interface to FV3GFS that lets you import the Fortran model as a Python package. We show examples of how this is used to write model scripts, which reproduce or build on what the Fortran model can do. You could do this same wrapping for any compiled model, not just FV3GFS.