Documentation for GCAM
The Global Change Analysis Model
View the Project on GitHub JGCRI/gcam-doc
This section describes the new climate module - Hector - that is available for use in GCAM. MAGICC5.3 (Wiglley, 2008) has traditionally been the only climate module available in GCAM. In GCAM’s recent release, there is now the option to run Hector (Hartin et al., 2015). Both Hector and MAGICC are reduced-form climate carbon-cycle models.
Hector, an open-source, object-oriented, reduced-form global climate carbon-cycle model, is written in C++. This model runs essentially instantaneously while still representing the most critical global-scale earth system processes. Hector has a three-part main carbon cycle: a one-pool atmosphere, land, and ocean. The model’s terrestrial carbon cycle includes primary production and respiration fluxes, accommodating arbitrary geographic divisions into, e.g., ecological biomes or political units. Hector actively solves the inorganic carbon system in the surface ocean, directly calculating air– sea fluxes of carbon and ocean pH. Hector reproduces the global historical trends of atmospheric [CO2], radiative forcing, and surface temperatures. The model simulates all four Representative Concentration Pathways (RCPs) with equivalent rates of change of key variables over time compared to current observations, MAGICC, and models from CMIP5 (Hartin et al., 2015). Hector’s flexibility, open-source nature, and modular design facilitates a broad range of research in various areas.
Figure 1: Representation of Hector’s carbon cycle, land, atmosphere, and ocean. The atmosphere consists of one well-mixed box. The ocean consists of four boxes, with advection and water mass exchange simulating thermohaline circulation. At steady state, the high-latitude surface ocean takes up carbon from the atmosphere, while the low-latitude surface ocean off-gases carbon to the atmosphere. The land consists of a user-defined number of biomes or regions for vegetation, detritus and soil. At steady state the vegetation takes up carbon from the atmosphere while the detritus and soil release carbon back into the atmosphere. The earth pool is continually debited with each time step to act as a mass balance check on the carbon system.
Currently the GCAM sectors interact with Hector via their emissions. At every time step, emissions from GCAM are passed to Hector. Hector converts these emissions to concentrations when necessary, and calculates the associated radiative forcing, as well as the response of the climate system (e.g., temperature, carbon-fluxes, etc.)
Table 1: Emissions and sources from each sector passed to Hector.
Emission | Sector | Notes |
---|---|---|
CO2* | AgLU, Energy | |
CH4 | AgLU, Energy, Industrial Processes | |
N2O | AgLU, Energy | |
NH3 | AgLU, Energy | |
SO2 | AgLU, Energy, Industrial Processes | |
CO | AgLU, Energy, Industrial Processes | |
BC | AgLU, Energy | |
OC | AgLU, Energy | |
NOx | AgLU, Energy, Industrial Processes | |
NMVOC | Energy, Industrial Processes | |
C2F6 | Energy, Industrial Processes | |
CF4 | Industrial Processes, Urban Processes | |
SF6 | Energy, Industrial Processes | |
HFC134a | Energy | |
HFC32 | Energy | |
HFC125 | Urban Processes | |
HFC227ea | Urban Processes | |
HFC23 | Urban Processes | |
HFC236fa | Urban Processes | not included in Hector |
HFC134a | Industrial Processes | |
HFC245fa | Industrial Processes | |
HFC365mfc | Industrial Processes | not included in Hector |
* CO2 emissions from the AgLU sector are separate from CO2 emissions from the Energy sector. Any change in atmospheric carbon, occurs as a function of anthropogenic fossil fuel and industrial emissions (FA), land-use change emissions (FLC), and the atmospheri-ocean (FO) and atmosphere-land (FL) carbon fluxes.
dCatm/dt = FA(t) + FLC(t) - FO(t) - FL(t)
Land carbon pools change as a result of NPP, RH and land-use change fluxes, whose effects are partiioned among the carbon pools (Hartin et al., 2015).
At every time step Hector calculates and outputs key climate variables.
This section describes step by step instructions for various platforms to build and link GCAM with Hector. Users can set Hector as the climate model in GCAM instead of MAGICC.
Frst download Hctor from (Note that at the time of this writing only v1.1.2 has been tested): https://github.com/JGCRI/hector/releases
cvs/objects/climate/source/hector
. Note that the name of the
workspace that GCAM will be looking for will be “hector”. If you
wish to retain version numbering etc we recommend creating a
symlink: cd cvs/objects/climate/source
ln –s /path/to/your/hector-v1.1.2 hector
Verify that both GCAM and hector successfully build independently. If not you should consult the build instructions for each. BuildHector
Open the GCAM project in Xcode.
Locate the “objects” project properties from the Project
Navigator. Go to the Build Settings and find the Preprocessor
Macros and add to whichever build configuration you need: USE_HECTOR=1
Go to the Build Settings and find the Other Linker Flags and add to
whichever build configuration you need: -lgsl -lgslcblas -lm
Go to the Build Settings and find the Library Search Paths and add
to whichever build configuration you need: <path to gsl
install>/lib
Go to the Build Settings and find the User Header Search Paths and
add to it the following entry: ../../climate/source/hector/headers
Go to the Build Settings and find the C++ Language Dialect and ensure that it is set to the following value from the drop down menu: Compiler Default
Go to the Build Settings and find the C++ Standard Library and ensure that it is set to the following value from the drop down menu: libstdc++
Next add the Hector project to GCAM by right clicking on the
“objects” project properties in the Project Navigator and select
Add to “objects”…
. Select the Hector project file which is
located in
cvs/objects/climate/source/hector/project_files/Xcode/hector.xcodeproj
Under the “objects” project properties from the Project Navigator go to the Build Phases. Open the Target Dependencies and click the +. In the dialog find “hector-lib” from under the “Hector” project. Open the Link Binary With Libraries and click the +. In the dialog find “libhector-lib.a” from under the “Workspace” category.
Ensure that objects is your current build target and Xcode will now re-build Hector and GCAM as necessary and link them together. The GCAM is still run the same as always and will control calling Hector (if configured via add-on files to use Hector instead of MAGICC).
cvs/objects/climate/source/hector
Note that the name of the workspace that GCAM will be looking for will be “Hector”. If you wish to retain version numbering etc we recommend creating a symlink: cd cvs/objects/climate/source
mklink /D hector c:/path/to/your/hector-v1.1.2
Verify that both GCAM and Hector successfully build independently. If not you should consult the build instructions for each. BuildHector
Open the GCAM project in Visual Studio.
Locate the “objects-main” project properties from the Solution
Explorer. Go to the Configuration Properties –- C/C++ –
Preprocessor and find the Preprocessor Definitions and add to
whichever build configuration you need: USE_HECTOR
Go to the Configuration Properties –- C/C++ – General and find the Additional Include Directories and add to it the following entry: ..\..\climate\source\hector\headers
Go to the Configuration Properties –- Linker – General and find the Additional Library Directories and add to whichever build configuration you need: <path to gsl install>/Release
Go to the Configuration Properties –- Linker – Input and find the Additional Dependencies and add to whichever build configuration you need: gsl.lib
Next add the Hector project to GCAM by right clicking on the
“Solution” project properties in the Solution Explorer and select
Add -> Existing project…
. Select the Hector project file which is
located in
cvs/objects/climate/source/hector/project_files/VS/hector-lib.vcxproj
Right click on “objects-main” from the Solution Explorer and select References. In the dialog click the button Add New References… In the dialog check the “hector-lib” and click ok and ok again.
Now you can build solution and GCAM and Hector will be re-built as necessary and link them together. The GCAM is still run the same as always and will control calling Hector (if configured via add-on files to use Hector instead of MAGICC).