Package 'mapspam2globiom'

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

Help Index


Creates GLOBIOM crop distribution and land cover input using output from the mapspamc package

Description

create_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.

Usage

create_globiom_input(lc_map, crop_map, lc, simu, grid, param, area_type = "pa")

Arguments

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 mapspamc_par that bundles all mapspamc parameters, including core model folders, alpha-3 country code, year, spatial resolution, most detailed level at which subnational statistics are available, administrative unit level at which the model is solved and type of model.

area_type

Selection of crop distribution maps produced by mapspamc: "pa" (physical area - default) or "ha" (harvested area).