Giter VIP home page Giter VIP logo

gcamland's Introduction

Offline version of the GCAM land allocation module

Travis-CI Build Status Coverage Status

DOI

Description

gcamland replicates the land allocation decisions made in GCAM (https:://github.com/jgcri/gcam-core). The equations are documented in Wise et al. (2014). gcamland takes in prices and agricultural productivity growth and calculates land allocation. The model can operate in either hindcast (1975-2010) or future mode (2010-2100), running either single simulations or large ensembles.

Using gcamland

A wiki describing how to use and modify gcamland is provided at: https://github.com/JGCRI/gcamland/wiki

Please cite Wise et al. (2014) when using this package.

References

Wise, M., K. Calvin, P. Kyle, P. Luckow and J. Edmonds (2014). "Economic and Physical Modeling of Land Use in GCAM 3.0 and an Application to Agricultural Productivity, Land, and Terrestrial Carbon." Climate Change Economics 5(2).

gcamland's People

Contributors

abigailsnyder avatar evasinha avatar kvcalvin avatar rplzzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gcamland's Issues

unable to install gcamland

I am getting the following message when trying to install the gcamland using the code specified. can anyone help at the soonest possible,

> devtools::install_github("jgcri/gcamland")
Downloading GitHub repo jgcri/gcamland@HEAD
v  checking for file 'C:\Users\Rajiv\AppData\Local\Temp\RtmpGEKU0u\remotes47841db127af\JGCRI-gcamland-be3d382/DESCRIPTION' ...
-  preparing 'gcamland':
v  checking DESCRIPTION meta-information ... 
-  checking for LF line-endings in source and make files and shell scripts (1.4s)
-  checking for empty or unneeded directories
   Removed empty directory 'gcamland/outputs'
   Removed empty directory 'gcamland/vignettes/outputs'
     NB: this package now depends on R (>= 3.5.0)
     WARNING: Added dependency on R >= 3.5.0 because serialized objects in
     serialize/load version 3 cannot be read in older versions of R.
     File(s) containing such objects:
       'gcamland/tests/testthat/data/bayes-scenario-info.rds'
-  building 'gcamland_1.1.1.tar.gz'
   
Installing package intoC:/GCAM/GCAM_V6/input/gcamdata/renv/library/R-4.1/x86_64-w64-mingw32’
(aslibis unspecified)
* installing *source* package 'gcamland' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in vec_assign(x = col, i = missing, value = value, x_arg = col_arg,  : 
  Can't convert `replace$ha` <double> to match type of `data$ha` <character>.
Error: unable to load R code in package 'gcamland'
Execution halted
ERROR: lazy loading failed for package 'gcamland'
* removing 'C:/GCAM/GCAM_V6/input/gcamdata/renv/library/R-4.1/x86_64-w64-mingw32/gcamland'
Warning messages:
1: In untar2(tarfile, files, list, exdir, restore_times) :
  skipping pax global extended headers
2: In untar2(tarfile, files, list, exdir, restore_times) :
  skipping pax global extended headers
3: In i.p(...) :
  installation of package ‘C:/Users/Rajiv/AppData/Local/Temp/RtmpGEKU0u/file4784682d6fab/gcamland_1.1.1.tar.gz’ had non-zero exit status

error.txt

Thank you

Error checking

Package currently assumes that you read in consistent data (e.g., all of the right years). Need to add checks for this.

Update to read-in data

Currently, I've hard-coded the relevant data and parameters in a constants file. We need to switch this to read in data, ideally using the files generated by the gcamdata system.

Fertilizer

To match behavior in C++ GCAM, we'll need to calculate the cost of fertilizer from inputs and fertilizer prices. Need to add this capability into the model.

Output

Figure out how to output information, possibly graph things too.

Figure out time series

Write now each variable can only have a single value. We can overwrite it if it is re-calculated, but we'd ideally store data that changes over time as a time series.

Inconsistent Documentation for Running Inidividual gcamland Simulations

Good afternoon,

I just received your submission to the Journal of Open Research Software from Dr. Kate Calvin. When attempting to run the code using the documentation in R, I kept encountering errors. However, using the instructions within paper I just received (page 5, Installing and Running the Package) it ran successfully!

So it looks like the documentation in the R package is a bit behind; I was unable to locate the documentation files to edit them for you, so I figured I should give you a heads up.

Thanks for all of the work you've put into this!

Peter

UCT

Implement the UCT option

Restructure code for readability?

The code is currently organized the way that the GCAM C++ code is organized. However, that makes it difficult to find/track the equations and calculations. May be worth restructuring the code to make it easier for users to follow/understand.

Modeltime

Do I need a system to store periods & years?

Performance

The model is pretty quick with a single AEZ, but running lots of AEZs slows it down. Need to do some profiling and improvement of performance.

Define linear model for fractional values of `linear.years`

Right now when running samples we round our sample values of linear.years to the nearest integer. In the long run that is going to create some problems for doing inference with these samples. We can (relatively) easily define the model for fractional values by interpreting a fractional number of years as a weighted average of the two surrounding integer values. Thus, linear.years==3.4 is a 40% weighting of a 3-year model averaged with a 60% weighting of a 4-year model. This will allow us to avoid having to do inference with a mixture of discrete and continuous parameters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.