Open Source and Performant Hydrological Modeling in Python: mosartwmpy, a Case Study
Efficient development strategies for generating open-source, production-ready, component-based hydrologic modeling software are needed to promote co-development by a multi-agency user base comprising researchers with varying research objectives and levels of experience. These themes are explored in the translation of the MOSART-WM (MOdel for Scale Adaptive River Transport with Water Management) from Fortran to Python. The development of mosartwmpy was motivated by a desire to facilitate agile experimentation using an infrastructure that promotes native interoperability for rapid prototyping of coupled systems, support simultaneous multiple feature additions and testing to accelerate cross-agency research objectives, and provide accessibility to a broader community that may not have access to supercomputers or domain experts – all without compromising performance. As a Python package, mosartwmpy can easily be installed and run in most computational environments and offers parallelization scalability to suit varying resources. By implementing the Basic Model Interface, mosartwmpy offers a simple and familiar control surface for interoperability, meaning model coupling complies with community-accepted standards. This software is shipped with concise documentation, hands on tutorials, permanent links to sample input datasets, and a built-in validation utility. By prioritizing these facets that are often externalities to the science, mosartwmpy gives researchers cutting-edge technology while having the freedom to focus on advancing hydrological science.