|TAYLOR, R.A.J. - Texas Agrilife Research|
|JEONG, JAEHAK - Texas Agrilife Research|
Submitted to: International Journal of Agricultural and Biological Engineering
Publication Type: Peer Reviewed Journal
Publication Acceptance Date: 9/15/2014
Publication Date: 6/1/2015
Publication URL: https://handle.nal.usda.gov/10113/62920
Citation: Taylor, R., Jeong, J., White, M.J., Arnold, J.G. 2015. Code modernization and modularization of APEX and SWAT watershed simulation models. International Journal of Agricultural and Biological Engineering. 8(3):81-94. doi:10.3965/j.ijabe.20150803.1081.
Interpretive Summary: The SWAT (Soil and Water Assessment Tool) and APEX (Agricultural Policy / Environmental eXtender) are widely used watershed simulation models. These models have been written over the course of many years in the FORTRAN programming language and still contain much of their original code. In the meantime, FORTRAN has evolved to include new functionality. This paper describes an ongoing major revision to take advantage of these new FORTRAN structures that will make these models easier to use, maintain, modify, and document.
Technical Abstract: SWAT (Soil and Water Assessment Tool) and APEX (Agricultural Policy / Environmental eXtender) are respectively large and small watershed simulation models derived from EPIC Environmental Policy Integrated Climate), a field-scale agroecology simulation model. All three models are coded in FORTRAN and have evolved over several decades. They are widely used to analyze anthropogenic influences on soil and water quality and quantity. Much of the original FORTRAN code has been retained even though FORTRAN has been through several cycles of development. FORTRAN now provides functionality originally restricted to languages like C, designed to communicate directly with the operating system and hardware. One can now use an object-oriented style of programming in FORTRAN, including inheritance, run-time polymorphism and overloading. In order to enhance their utility in research and policy-making, the models are undergoing a major revision to use some of the new FORTRAN features. With these new programming paradigms the developers of SWAT, APEX, and EPIC are working to make communication between the two models seamless. This paper describes the ongoing revision of these models that will make them easier to use, maintain, modify, and document. It is intended that they will converge as they continue to evolution, while maintaining their distinctive features, capabilities, and identities.