The source code to the web interface to the Global Calculator.
For more information about the global calculator, see: http://www.globalcalculator.org
To play with this web interface, go to: http://tool.globalcalculator.org
Canonical source: http://github.com/decc/global-calculator
Please report issues and suggest patches there.
What you need:
- A server with at least 4 GB and ideally 8 GB of memory
- Running a flavour of Unix
- With the standard build tools installed
- With version 2.1 of Ruby installed, including development headers
Steps:
- git clone http://github.com/decc/global-calculator
- cd global-calculator
- bundle
- cd model/global_2050_model
- bundle exec rake
- cd ../..
- rackup # This starts the server
The bundle step should install all the dependencies. If it fails it may ask you to check a particular 'gem' installs manually. Doing that normally fixes the problem and the step can be repeated.
The bundle exec Rake step compiles the C version of the model. This can take tens of minutes, and requires plenty of memory.
You should now be able to browse to http://0.0.0.0:9292 and see the local copy running.
If you change the spreadsheet, you need to re-translate it into its C equivalent.
To do this:
- change the spreadsheet in model/
- cd model
- bundle exec ruby translate_excel_into_c.rb
Note:
- that the C version only includes outputs that are given in named ranges starting with 'webtool'
- That translating a spreadsheet of this size needs at least 4 GB of RAM and can take 5 or 6 hours.