This model was initially developed as a class teaching tool, with the ultimate ambition of turning it into a working research tool. It was designed to evaluate fairly simple tradeoff scenarios in the African wet savannas, as defined by the FAO, and to be an extension of the work begun by Searchinger et al (cite here). The model was designed to identify the land that would be converted for new maize and soybean production, given their potential productivity and certain option constraints regarding other land use priorities: protect carbon stocks, protect biodiversity, and preferentially select those areas having the largest runoff (this was a year 2 add-on to the model). The model itself was based on work by Koh and Ghazoul (2010), in that it converts the value of land for each aspect (e.g. maize yield potential, carbon density, protected area presence, mammal diversity) to a standarized value (0-1), where 1 represents an area that will be converted first, and 0 an area to be converted last, if that value is chosen as a constraint. Let's take an example of three model grid cells
ID | Maize yield | Carbon | Biodiversity ------ | ----------- | ------ | ------------ Cell 1 | 1 | 0.5 | 0.1 Cell 2 | 0.5 | 1 | 0.5 Cell 3 | 0.25 | 0.75 | 1
If you only cared about prioritizing maize yields, you would convert cells 1-3 in order. If you cared only about carbon, you would convert cell 2 first (because it is has the least carbon stock--we calculate carbon as 1 - standardized tons of carbon), followed 3 and then 1. Biodiversity only gives us an order of cells 3-1. But then we can specify multiple constraints. By multiplying the values in all three cells, we account for the values of all 3. That gives us the following order:
sort(c("cell1" = 1 * 0.5 * 0.1, "cell2" = 0.5 * 1 * 0.5, "cell3" = 0.25 * 0.75 * 1), decreasing = TRUE)
Cell 2 goes first, because it has middling yield but very low carbon and moderate biodiversity. So that's basically how it works at it's core. But we need to build it out and downscale it now.
The model was next downscaled and improved for Zambia. Key changes:
Key changes in model structure were also made: Model converted to R package, therefore made more modular (many of its components converted to functions), with the intention that it can be rescaled more easily (I ultimately want to facilitate comparisons between tradeoffs made at local, national, and regional scales) gdal based calculations implemented for faster raster operations
gdal_calc
(via R function) on my mac I had to manually edit the first line of the file in /Library/Frameworks/GDAL.framework/Programs/gdal_calc.py
from #!/usr/bin/env python2.7
to \usr\bin\python
as apparently the anaconda install I have does not know where to find gdal. open -a RStudio
There are two alternate versions of the model: one that relies on raster-based calculations, the other on data.table. It remains to be seen which is faster. I have noted several things so far (as of 23/1/15):
data.table
seems to create much faster resultsdata.table
version is still twice as fast as the raster
-based version. Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.