Keywords
Crop simulation model; DSSAT; R language; RCropgro package.
Location
Session H8: New Challenges for Agricultural Systems Modeling and Software
Start Date
17-6-2014 10:40 AM
End Date
17-6-2014 12:00 PM
Abstract
Computer crop simulations have been successfully used around the world, specially, towards the understanding and transferring of agricultural technology. However, as soon as crop models become more complex, increases the difficulty to use, maintain, expand and improve these models. Most of crop simulation models are written in Fortran, a well-established computer language especially suited to numeric computation and scientific computing. However, Fortran has severe limitations regarding integration, interoperability and data visualization. In this study, an approach for wrapping a Fortran coded model into a R package is presented using a free and multiplatform software. By encapsulating the simulation engine in the package, one can freely manipulate both input and output data as any other regular variable eliminating the need of tabulated text files. Running the model becomes as simple as running any other R package. In addition, R can connect to databases and access data from web services. Here, two case studies are presented to illustrate the approach and to discuss the advantages on realistic crop modeling applications. These case studies include an application of the approach in a simple and in a complex crop model such as the CSM- CROPGRO-Soybean model present in the Decision Support System for Agrotechnology Transfer (DSSAT) suite.
Included in
Civil Engineering Commons, Data Storage Systems Commons, Environmental Engineering Commons, Other Civil and Environmental Engineering Commons
An approach for encapsulating Fortran coded models into a R package
Session H8: New Challenges for Agricultural Systems Modeling and Software
Computer crop simulations have been successfully used around the world, specially, towards the understanding and transferring of agricultural technology. However, as soon as crop models become more complex, increases the difficulty to use, maintain, expand and improve these models. Most of crop simulation models are written in Fortran, a well-established computer language especially suited to numeric computation and scientific computing. However, Fortran has severe limitations regarding integration, interoperability and data visualization. In this study, an approach for wrapping a Fortran coded model into a R package is presented using a free and multiplatform software. By encapsulating the simulation engine in the package, one can freely manipulate both input and output data as any other regular variable eliminating the need of tabulated text files. Running the model becomes as simple as running any other R package. In addition, R can connect to databases and access data from web services. Here, two case studies are presented to illustrate the approach and to discuss the advantages on realistic crop modeling applications. These case studies include an application of the approach in a simple and in a complex crop model such as the CSM- CROPGRO-Soybean model present in the Decision Support System for Agrotechnology Transfer (DSSAT) suite.