Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
This archive contains code used in the following paper: Bryant BP, Kelsey TR, Vogl AL, Wolny SA, MacEwan DJ, Selmants PC, Biswas T and Butterfield HS (2020). Shaping Land Use Change and Ecosystem Restoration in a Water-Stressed Agricultural Landscape to Achieve Multiple Benefits. *Front. Sustain. Food Syst.* 4:138. doi: 10.3389/fsufs.2020.00138 Below is a lightly modified version of the archived Readme file: ### What is this repository for? ### This code implements the workflow described in the above paper that uses land use change modeling and spatial optimization to examine the potential for improving environmental outcomes in changing agricultural landscapes. The specific application is in the San Joaquin Valley of California (SJV), where new policies requiring more sustainable use of groundwater will likely reduce overall water availability, creating opportunities for conservation actors to engage with the agricultural community to further ecological goals while mitigating negative impacts of water shortages. This workflow supports the majority of the key analytic steps involved in identifying these opportunities, with a focus on: * Pixel-level spatial allocation of agricultural land use change and retirement given subregional crop-specific areas supplied by an external model; * Pixel-level spatial optimization to generate recommended land use patterns that meet multiple habitat and water savings targets at least cost to agricultural production; * Support for iterating through and analyzing large numbers of scenarios -- both of land use change and in terms of optimization problem structure; * Pre- and post-processing tools to support the above. ### How do I get set up? ### * For overall workflow, please see supplemental material for the paper. The file "master_workflow.R" is heavily commented and sequences the elements of the workflow in chunks, but the comments assume familiarity with additional SI documentation. * The spatial optimization portion of the workflow (captured in "optim_batching.R") relies heavily on the prioritizr package (https://prioritizr.net/), and the implementation used in the paper interfaces with the commercial optimization software Gurobi. If Gurobi is unavailable, prioritizr can be deployed with open source solvers, though it is unknown whether existing problem formulations will have acceptable memory and runtime characteristics. However, the workflow is designed to be run at alternate resolutions with minimal additional effort. Originally for the purposes of sensitivity analysis, this capability can also be utilized to coarsen the resolution until solve times are acceptable, though the user must consider the realism and relevance of the raster cell size. * The spatial allocation framework (captured mostly in "RB_downscaling.R") relies on non-spatial subregional estimates of areas cultivated under different crops as an input. This SJV project utilized results from contracted runs of the California-specific Statewide Agricultural Production model (SWAP), but other models may be available in different contexts. A user seeking to extend this analysis will need to secure their own method for developing scenarios of gross cropping area. * R dependencies: Major atypical dependences include raster, rdgal, prioritizr, and gurobi. Packages used at multiple points in the workflow are loaded in an initialization script (initialize_workspace.R), and those specific to an analytic step are loaded in the script associated with that file. A more complete list with versions used in the final results will be added upon paper submission. Note, at the time of final runs, R 4.X had been released, but the Gurobi interface required R 3.6, so the workflow was run in 3.6.3. ### Contribution guidelines ### * This is an archival version of the code. For access to a working repository, please contact the author. ### Who do I talk to? ### * Benjamin Bryant (bpbryant@stanford.edu) -- research coordinator and code author. Work was conducted from 2017-2020 while at Water in the West and the Natural Capital Project at Stanford University. This is no longer his primary appointment but as of Summer 2020 he retains a courtesy affiliation and is responsive to email, with occasional delay. A stable web presence is: http://www.bpbryant.org * Rodd Kelsey at the Nature Conservancy of California is the project sponsor and research co-lead. ### License ### GPL 3
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.