{"title":"tmm4py: Global Ocean Biogeochemical Modeling in Python With the Transport Matrix Method","authors":"Samar Khatiwala","doi":"10.1029/2025MS005028","DOIUrl":null,"url":null,"abstract":"<p>Marine biogeochemical models are important tools in the quest to understand the cycling of chemical and biological tracers such as nutrients, carbon and oxygen, as well as key components of the Earth System Models used to project climate change. Historically, given the need for speed, global scale modeling has been performed in compiled languages like Fortran. However, as high level scripting languages such as Python and Julia gain popularity, the need for models and tools accessible from them has become imperative. This paper introduces <span>tmm4py</span>, a Python interface to a redesigned version of the Transport Matrix Method (TMM) software, a computationally efficient numerical scheme for “offline” simulation of marine geochemical and biogeochemical tracers. The TMM provides a convenient framework for developing and testing new biogeochemical parameterizations, as well as running existing complex models driven by circulations derived from state-of-the-art physical models. <span>tmm4py</span> exposes all of the TMM library's functionality in Python, including transparent parallelization, allowing users to not only interactively use models written in compiled languages, but also develop complex models in pure Python with performance similar to compiled code. <span>tmm4py</span> enables users to exploit the large Python-based scientific software ecosystem, including libraries for machine learning and deploying models on Graphics Processing Units. The various features of <span>tmm4py</span> are described and illustrated through practical examples, including a full-fledged biogeochemical model written entirely in Python.</p>","PeriodicalId":14881,"journal":{"name":"Journal of Advances in Modeling Earth Systems","volume":"17 8","pages":""},"PeriodicalIF":4.6000,"publicationDate":"2025-08-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://agupubs.onlinelibrary.wiley.com/doi/epdf/10.1029/2025MS005028","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Advances in Modeling Earth Systems","FirstCategoryId":"89","ListUrlMain":"https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2025MS005028","RegionNum":2,"RegionCategory":"地球科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"METEOROLOGY & ATMOSPHERIC SCIENCES","Score":null,"Total":0}
引用次数: 0
Abstract
Marine biogeochemical models are important tools in the quest to understand the cycling of chemical and biological tracers such as nutrients, carbon and oxygen, as well as key components of the Earth System Models used to project climate change. Historically, given the need for speed, global scale modeling has been performed in compiled languages like Fortran. However, as high level scripting languages such as Python and Julia gain popularity, the need for models and tools accessible from them has become imperative. This paper introduces tmm4py, a Python interface to a redesigned version of the Transport Matrix Method (TMM) software, a computationally efficient numerical scheme for “offline” simulation of marine geochemical and biogeochemical tracers. The TMM provides a convenient framework for developing and testing new biogeochemical parameterizations, as well as running existing complex models driven by circulations derived from state-of-the-art physical models. tmm4py exposes all of the TMM library's functionality in Python, including transparent parallelization, allowing users to not only interactively use models written in compiled languages, but also develop complex models in pure Python with performance similar to compiled code. tmm4py enables users to exploit the large Python-based scientific software ecosystem, including libraries for machine learning and deploying models on Graphics Processing Units. The various features of tmm4py are described and illustrated through practical examples, including a full-fledged biogeochemical model written entirely in Python.
期刊介绍:
The Journal of Advances in Modeling Earth Systems (JAMES) is committed to advancing the science of Earth systems modeling by offering high-quality scientific research through online availability and open access licensing. JAMES invites authors and readers from the international Earth systems modeling community.
Open access. Articles are available free of charge for everyone with Internet access to view and download.
Formal peer review.
Supplemental material, such as code samples, images, and visualizations, is published at no additional charge.
No additional charge for color figures.
Modest page charges to cover production costs.
Articles published in high-quality full text PDF, HTML, and XML.
Internal and external reference linking, DOI registration, and forward linking via CrossRef.