Skip to content
kvcalvin edited this page Apr 30, 2019 · 5 revisions

Welcome to the gcamland wiki!

Installing gcamland

The package can be installed directly from its github repository using the R devtools package. From an R prompt, run the command:

devtools::install_github(‘jgcri/gcamland’)

Running gcamland

Documentation on how to use gcamland is found in the help pages associated with the packages. These can be accessed using the following command:

??gcamland

Examining gcamland outputs

There are several ways to access gcamland outputs, depending on how gcamland was run. If you have run a single scenario, run_model returns the results. Alternatively, you can write the outputs to disk as a rds file using the aVerbose = TRUE option for run_model. If you have saved the outputs to disk, these can be exported to a csv file using

export_results(scenInfo)

or plotted using

plotRegionalLandAllocation(scenInfo)

If you have used run_ensemble, all results are saved to as rds files in the output directory automatically.

Modifying the future scenario information

Changes in land allocation in the future occur due to changes in yield or price of commodities. Both of these values can be easily changed from the current defaults by modifying their values in the inst/extdata/scenario-data folder. Yield changes are currently input as productivity growth, measured in % per year. Prices are currently in 1975$/kg for most commodities and 1975$/m^3 for Forest, but could be input in any unit as long as it is consistent.

Modifying the initialization data

There are several modifications users may want to make to the initialization data, with differing degrees of difficulty. Some of these options are listed here:

  1. If you want to change the region to a different GCAM region, then you need to modify the DEFAULT.REGION constant in the constants.R file.
  2. If you want to change the any of the inputs (e.g., land allocation, cost, production, logit exponent, etc.) without modifying the structure of the nest or the land types, then you simply need to modify the values in the input files (csv files contained in the inst/extdata/initialization-data folder).
  3. If you want to model a new region (e.g., individual country, state, subnational entity), you need to add the information for your region to each of the input files in the inst/extdata/initialization-data folder and modify the DEFAULT.REGION in the constants.R file. Note that gcamland will work for any region and regions do not need to be defined by geopolitical boundaries.
  4. If you want to change the land types, but keep the number general nesting structure (including number of levels and where managed and unmanaged land leafs exist), then you only need to update the information in the input files.
  5. If you want to restructure the nest, adding new levels, then you will need to modify the read_data.R and setup.R files accordingly. This is a more difficult change than the other options.

In all cases, the user must ensure that the initialization data is consistent, meaning that the area of the land leafs adds up to the total land area in a region AND that all necessary information is read in for each node and leaf.