Title: | An R package to create crop distribution maps as input for GLOBIOM |
---|---|
Description: | The aim of the mapspam2globiom R package is to facilitate the creation of country level crop distribution maps, which can be used as input by the IIASA's Global Biosphere Management Model (GLOBIOM) for a selected country. mapspam2globiom includes several functions to aggregate crop distribution maps that were created with the mapspamc package (Van Dijk et al. 2022) to the GLOBIOM input format. mapspamc was specifically developed to create national crop distribution maps using the Spatial Production Allocation Model (SPAM) (You and Wood 2006; You, Wood, and Wood-Sichra 2009; You et al. 2014; Yu et al. 2020). |
Authors: | Michiel van Dijk |
Maintainer: | Michiel van Dijk <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1 |
Built: | 2024-11-19 02:50:36 UTC |
Source: | https://github.com/iiasa/mapspam2globiom |
mapspamc
packagecreate_globiom_input
creates two gdx files. One file updates
the global land cover data in GLOBIOM for the target country, while the
other file replaces global land use data. Both files will be saved in the
processed_data/results
folder created by mapspamc
. Note that the area
will be expressed in 1000 ha, which is common in GLOBIOM. Before
create_globiom_input()
can be run, you need to prepare four input files.
First, you need to collect a new country-level land cover map. Any product can be used as long as it contains information on the six GLOBIOM land cover classes. The most obvious choice would be to take a national land cover map for the year 2000 or any other map that is close to the year for which the subnational statistics are available. If such map is not available it is also possible to use a global land cover product and use the country polygon to mask the relevant area.
Second, you need to prepare a mapping between the land cover map and GLOBIOM land use classes. An example mapping is included for the ESACCI land cover files and can be opened by calling esacci2globiom.
Third, you need to prepare a mapping between the mapspamc
crop and GLOBIOM
crop classes. The standard mapping is and can be opened by calling
crop2globiom. In case the user wants to add an additional crop in GLOBIOM
(See vignette), the mapping can be changed.
Finally, a polygon file is needed with the location of the GLOBIOM simulation units (simu), which can be clipped from the global GLOBIOM simu shapefile that is stored in mapspamc_db.
create_globiom_input(lc_map, crop_map, lc, simu, grid, param, area_type = "pa")
create_globiom_input(lc_map, crop_map, lc, simu, grid, param, area_type = "pa")
lc_map |
Data.frame with the mapping between country and GLOBIOM land cover codes. The country land cover codes must have column name 'lc_code' and the GLOBIOM land cover codes must have column name 'globiom_lc_code'. Country land cover codes can correspond to multiple GLOBIOM land cover codes. |
crop_map |
Data.frame with the mapping between mapspamc and GLOBIOM crop codes. The country crop must have column name 'crop' and the GLOBIOM crop codes must have column name 'globiom_crop'. Country crop codes can correspond to multiple GLOBIOM crop codes. |
lc |
National land cover map that is consistent with the mapping data.frame. |
simu |
grid file created by 'mapspamc. |
param |
param Object of type |
area_type |
Selection of crop distribution maps produced by |