mapspamc
packageR/create_globiom_input.R
create_globiom_input.Rd
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.
create_globiom_input(lc_map, crop_map, lc, simu, grid, param, area_type = "pa")
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.
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.
National land cover map that is consistent with the mapping data.frame.
grid file created by `mapspamc.
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.
Selection of crop distribution maps produced by mapspamc
:
"pa" (physical area - default) or "ha" (harvested area).