-
+
This is the repository for Hector , an open source, object-oriented, simple global climate carbon-cycle model that runs very quickly while still representing the most critical global scale earth system processes. Hector is a simple climate model (SCM, also known as a reduced-complexity climate model), a class of models that are extremely versatile with a wide range of applications. Due to their computational efficiency, SCMs can easily be coupled to other models and used to design scenarios, emulate more complex climate models, and conduct uncertainty analyses.
Hector’s output for global mean air temperature change for eight Shared Socioeconomic Pathways (SSPs).
diff --git a/news/index.html b/news/index.html
index 8f0eeb6bd..740e7f53c 100644
--- a/news/index.html
+++ b/news/index.html
@@ -1,5 +1,5 @@
-
Changelog • hector Changelog • hector
diff --git a/pkgdown.yml b/pkgdown.yml
index 351f5ddde..8f2614d4d 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -11,6 +11,7 @@ articles:
ContributionsGuide: ContributionsGuide.html
ExternalAPI: ExternalAPI.html
Hector-Wider-World: Hector-Wider-World.html
+ HectorResources: HectorResources.html
HectorSummary: HectorSummary.html
InputFiles: InputFiles.html
Permafrost: Permafrost.html
@@ -33,7 +34,7 @@ articles:
units: units.html
v3_output_changes: v3_output_changes.html
hector: hector.html
-last_built: 2023-08-31T19:58Z
+last_built: 2023-12-20T22:34Z
urls:
reference: https://jgcri.github.io/hector/reference
article: https://jgcri.github.io/hector/articles
diff --git a/reference/carboncycle.html b/reference/carboncycle.html
index f95eb465c..e1996d0e8 100644
--- a/reference/carboncycle.html
+++ b/reference/carboncycle.html
@@ -1,6 +1,6 @@
Identifiers for variables in the Hector carbon cycle component — NBP • hector Identifiers for variables in the Hector carbon cycle component — NBP • hector Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O • hector Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O • hector Identifiers for constraints — FTOT_CONSTRAIN • hector Identifiers for constraints — FTOT_CONSTRAIN • hector
diff --git a/reference/create_biome.html b/reference/create_biome.html
index f945e14fd..ae6129740 100644
--- a/reference/create_biome.html
+++ b/reference/create_biome.html
@@ -1,5 +1,5 @@
-
Create new biome — create_biome • hector Create new biome — create_biome • hector
diff --git a/reference/create_biome_impl.html b/reference/create_biome_impl.html
index 91cd80fbf..6e7674492 100644
--- a/reference/create_biome_impl.html
+++ b/reference/create_biome_impl.html
@@ -1,5 +1,5 @@
-
Create a biome — create_biome_impl • hector Create a biome — create_biome_impl • hector
diff --git a/reference/delete_biome_impl.html b/reference/delete_biome_impl.html
index 81660ded0..14d921d47 100644
--- a/reference/delete_biome_impl.html
+++ b/reference/delete_biome_impl.html
@@ -1,5 +1,5 @@
-
Delete a biome — delete_biome_impl • hector Delete a biome — delete_biome_impl • hector
diff --git a/reference/delta.html b/reference/delta.html
index a759a88ac..4e2356b48 100644
--- a/reference/delta.html
+++ b/reference/delta.html
@@ -2,7 +2,7 @@
Identifiers for Hector forcing component parameters — DELTA_CO2 • hector Identifiers for Hector forcing component parameters — DELTA_CO2 • hector Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC • hector Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC • hector Fetch results from a running Hector core — fetchvars • hector Fetch results from a running Hector core — fetchvars • hector Identifiers for capabilities in the Hector forcing component — RF_TOTAL • hector Identifiers for capabilities in the Hector forcing component — RF_TOTAL • hector A data.frame containing information R hector function name and hector string names. — fxntable • hector A data.frame containing information R hector function name and hector string names. — fxntable • hector
diff --git a/reference/get_biome_inits.html b/reference/get_biome_inits.html
index fe0563f84..602b774be 100644
--- a/reference/get_biome_inits.html
+++ b/reference/get_biome_inits.html
@@ -1,5 +1,5 @@
-
Retrieve the initial conditions and parameters for a given biome — get_biome_inits • hector Retrieve the initial conditions and parameters for a given biome — get_biome_inits • hector
diff --git a/reference/get_biome_list.html b/reference/get_biome_list.html
index 99842abba..9fe19ebc8 100644
--- a/reference/get_biome_list.html
+++ b/reference/get_biome_list.html
@@ -1,5 +1,5 @@
-
Retrieve the current list of biomes for a Hector instance — get_biome_list • hector Retrieve the current list of biomes for a Hector instance — get_biome_list • hector
diff --git a/reference/get_tracking_data.html b/reference/get_tracking_data.html
index 2b23ef622..19602ec15 100644
--- a/reference/get_tracking_data.html
+++ b/reference/get_tracking_data.html
@@ -1,5 +1,5 @@
-
Retrieve the tracking data for a Hector instance — get_tracking_data • hector Retrieve the tracking data for a Hector instance — get_tracking_data • hector
diff --git a/reference/get_tracking_data_impl.html b/reference/get_tracking_data_impl.html
index 7a510a8c4..e0ca74f77 100644
--- a/reference/get_tracking_data_impl.html
+++ b/reference/get_tracking_data_impl.html
@@ -1,5 +1,5 @@
-
Retrieve the tracking data for a Hector instance — get_tracking_data_impl • hector Retrieve the tracking data for a Hector instance — get_tracking_data_impl • hector
diff --git a/reference/getfxn.html b/reference/getfxn.html
index 39f32693f..412773861 100644
--- a/reference/getfxn.html
+++ b/reference/getfxn.html
@@ -1,5 +1,5 @@
-
Get the hector function associated with a specific string — getfxn • hector Get the hector function associated with a specific string — getfxn • hector
diff --git a/reference/getunits.html b/reference/getunits.html
index a03dcd69d..def6f9e19 100644
--- a/reference/getunits.html
+++ b/reference/getunits.html
@@ -2,7 +2,7 @@
Get the hector unit strings for one or more variables — getunits • hector Get the hector unit strings for one or more variables — getunits • hector Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN • hector Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN • hector Identifiers for halocarbon emissions — EMISSIONS_CF4 • hector Identifiers for halocarbon emissions — EMISSIONS_CF4 • hector Identifiers for halocarbon forcings — RF_CF4 • hector hector: The Hector Simple Climate Model — hector-package • hector hector: The Hector Simple Climate Model — hector-package • hector
diff --git a/reference/hectorutil.html b/reference/hectorutil.html
index 88f251d82..442158800 100644
--- a/reference/hectorutil.html
+++ b/reference/hectorutil.html
@@ -4,7 +4,7 @@
isactive: Indicate whether a Hector instance is active
startdate: Report the start date for a Hector instance
enddate: Report the end date for a Hector instance
-getname: Report the name for a Hector instance">
getdate: Get the current date for a Hector instance — getdate • hector getdate: Get the current date for a Hector instance — getdate • hector Function reference • hector Function reference • hector
diff --git a/reference/inputstable.html b/reference/inputstable.html
index 611a7e33d..b3c1f48aa 100644
--- a/reference/inputstable.html
+++ b/reference/inputstable.html
@@ -1,7 +1,7 @@
A data.frame containing information on all of the Hector inputs listed in
-an ini file created by save-input-params.R. — inputstable • hector Hector logging levels — LL_DEBUG • hector Hector logging levels — LL_DEBUG • hector Identifiers for quantities in the methane component — CONCENTRATIONS_CH4 • hector Identifiers for quantities in the methane component — CONCENTRATIONS_CH4 • hector Hector instance object methods — methods • hector Hector instance object methods — methods • hector
diff --git a/reference/msgtype.html b/reference/msgtype.html
index 41b5a0db1..762c5480d 100644
--- a/reference/msgtype.html
+++ b/reference/msgtype.html
@@ -1,6 +1,6 @@
Message type identifiers — GETDATA • hector Message type identifiers — GETDATA • hector Create and initialize a new hector instance — newcore • hector Create and initialize a new hector instance — newcore • hector Identifiers for quantities in the ocean component — OCEAN_UPTAKE • hector Identifiers for quantities in the ocean component — OCEAN_UPTAKE • hector Identifiers for model parameters — TRACKING_DATE • hector Rename an existing biome — rename_biome • hector Rename an existing biome — rename_biome • hector Reset a Hector instance to an earlier date — reset • hector Identifiers for Hector forcing component parameters — RHO_BC • hector Identifiers for Hector forcing component parameters — RHO_BC • hector Run the Hector climate model — run • hector Run the Hector climate model — run • hector Run a single scenario — runscenario • hector Run a single scenario — runscenario • hector Send a message to a Hector instance — sendmessage • hector Set values for a Hector variable — setvar • hector Set values for a Hector variable — setvar • hector Shut down a hector instance — shutdown • hector Shut down a hector instance — shutdown • hector Identifiers for quantities in the SO2 component — EMISSIONS_SO2 • hector Identifiers for quantities in the SO2 component — EMISSIONS_SO2 • hector Create new biomes by splitting up an existing biome — split_biome • hector Create new biomes by splitting up an existing biome — split_biome • hector Identifiers for variables associated with the temperature component — GLOBAL_TAS • hector Identifiers for variables associated with the temperature component — GLOBAL_TAS • hector A data.frame containing information on all of the Hector variable created by units-data.R
-used within the getunits function. — unitstable • hector getComponentName() ] = temp; void CSVOutputStreamVisitor::visit( XComponent* c ) { if( !core->outputEnabled( c->getComponentName() ) && !in_spinup ) return; STREAM_MESSAGE_DATE( csvFile, c, D_X_COMPONENT, current_date ); } under public `virtual void visit( XComponent* c);`"},{"path":"https://jgcri.github.io/hector/articles/AddNewVariable.html","id":"c-changes","dir":"Articles","previous_headings":"","what":"C++ Changes","title":"Add a new variable","text":"hector.ini corresponding component add variable Ex: SN = 42000; component_data.hpp Add variable tseries, unitval, double, etc. add associated time series (necessary; see ). Define variables added Ex: # define D_ATMOSPHERIC_SO2 \"SN\" names match internal component variables INI definition match appears quotes. X_component.cpp init, need register capability core->registerCapability( D_ATMOSPHERIC_SO2, getComponentName() ); getData setData, add new variables Error message. See tseries documentation information getData (getData) (setData) variable used X_component.cpp example, adding variable within forcing component: unitval SN = core->getData( D_ATMOSPHERIC_SO2, runToDate); variable unitval, relevant code file must include unitval.hpp.","code":"else if(varName == D_ATMOSPHERIC_SO2 ) { returnval = SN; else if( varName == D_ATMOSPHERIC_SO2 ) { H_ASSERT( data.date == Core::undefinedIndex(), \"date not allowed\"); SN.set( lexical_cast
( value ), U_GG ); }"},{"path":"https://jgcri.github.io/hector/articles/AddNewVariable.html","id":"R","dir":"Articles","previous_headings":"","what":"R changes","title":"Add a new variable","text":"order able use R Hector setvar fetchvars functions, add helper function rcpp_constants.cpp example GLOBAL_TAS() used get global mean temperature data.","code":"//' @describeIn DocumentationGroupName A description of the variable name. //' @export // [[Rcpp::export]] String R_FUNCTION_NAME() { return D_VARIABLE_NAME; } //' @describeIn temperature Global mean temperature anomaly //' @export // [[Rcpp::export]] String GLOBAL_TAS() { return D_GLOBAL_TEMP; }"},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"r-hector","dir":"Articles","previous_headings":"","what":"R Hector","title":"Installing and building Hector","text":"install R, follow official instructions platform. install version associated current master git branch GitHub, use remotes::install_github` function. automatically install Hector’s dependencies well. (Note requires compiling source, need C compiler installed configured.) Windows, also need install Rtools. Download instructions can found . installation, another step put Rtools make utilities system PATH. allow compile R packages. , create text file .Renviron Documents folder following line: PATH=\"${RTOOLS40_HOME}\\usr\\bin;${PATH}\". can done either text editor R : Remember restart R (Rstudio) verify make can found. Executing Sys.(\"make\") show path Rtools installation. Mac OS Linux, required tools included part standard R installation. Hector’s mandatory dependencies listed DESCRIPTION file Imports, currently follows: Rcpp – Facilitates integration C++ code R packages BH – Boost C++ header files","code":"writeLines('PATH=\"${RTOOLS40_HOME}\\\\usr\\\\bin;${PATH}\"', con = \"~/.Renviron\") # If the `remotes` package isn't installed, first run: # install.packages(\"remotes\") remotes::install_github(\"jgcri/hector\")"},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"standalone-executable","dir":"Articles","previous_headings":"","what":"Standalone Executable","title":"Installing and building Hector","text":"Hector can also compiled standalone executable. Unlike R package, method installation automatically pull dependencies, install manually. Hector’s external dependency, Boost, free, peer-reviewed portable C++ source library, available http://www.boost.org/. Hector primarily uses Boost “header-” libraries, need compiled independently need extracted included Hector source. Note C++ compiler standard library support C++ 17 standard Boost system filesystem libraries need compiled/installed (see ).","code":""},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"command-line-linux-mac-osx","dir":"Articles","previous_headings":"Standalone Executable","what":"Command Line (Linux & Mac OSX)","title":"Installing and building Hector","text":"Hector makefiles look Boost libraries headers certain locations; defaults can overridden setting following environment variables: BOOSTROOT (default /usr/local/). variable contain full name directory include/ lib/ subdirectories contain, respectively, Boost header library files. installed Boost using package manager, likely . built Boost source used tool Homebrew install Boost, need set variable explicitly. Alternatively, header library locations subdirectories single directory, can set BOOSTINC BOOSTLIB variables respective locations. case, BOOSTROOT ignored. GTROOT (default /usr/local/). variable contain full name directory include/ lib/ subdirectories contain, respectively, Googletest header library files. Alternatively, header library locations subdirectories single directory, can set GTINC GTLIB variables locations. case, GTROOT ignored. Note needed want run Hector unit tests. ’s needed running model. Shared Library Search Path C++ compiler standard library support C++ 17 standard (see ), Boost libraries used Hector compiled shared libraries must loaded run time. best libraries directories part system’s shared library search path. many systems /usr/local already path. unable add library installation directory library search path, need add installation directory environment variable LD_LIBRARY_PATH. Try use approach can help , can cause conflicts software system. Instead, ask system administrator ldconfig right .","code":""},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"build-run-hector","dir":"Articles","previous_headings":"Standalone Executable > Command Line (Linux & Mac OSX)","what":"Build & Run Hector","title":"Installing and building Hector","text":"necessary libraries installed, change top-level Hector directory type make hector. Hector executable built source/ subdirectory. ever need rebuild, can type make clean clear away executable intermediate files. two additional environment variables can use fine-tune build process. CXXEXTRA variable passed C++ compiler. can use variable pass extra options compiler without changing Makefile. particular, specifying optimization options CXXEXTRA -O -O0 override default value -O3. CXXPROF variable passed compiler linker. intended turn performance profiling, must specified compile link stages build, generally either unset (normal operation) set -pg (profiling). Profiling slows code dramatically, use , sure unset CXXPROF, clean build directories make clean, rebuild ready go back production runs.","code":""},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"no-stdfilesystem-support","dir":"Articles","previous_headings":"Standalone Executable > Command Line (Linux & Mac OSX) > Build & Run Hector","what":"No std::filesystem Support","title":"Installing and building Hector","text":"C++ compiler standard library old, support C++ 17 std::filesystem. case may receive errors building Hector following: versions macOS prior Catalina (10.15): case, can set environment variable: need Compile Boost Libraries – specifically, system filesystem libraries. Finally, ensure environment variable BOOSTROOT BOOSTLIB set properly (see ).","code":"g++ -L. -o hector main.o -lhector -lm ./libhector.a(ini_to_core_reader.o): In function `boost::filesystem::exists(boost::filesystem::path const&)': /pic/projects/GCAM/GCAM-libraries/include/boost/filesystem/operations.hpp:404: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' ini_to_core_reader.cpp:159:17: error: 'path' is unavailable: introduced in macOS 10.15 fs::path csvFilePath( csvFileName ); ^ export NO_CXX17=1"},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"running-hector","dir":"Articles","previous_headings":"Standalone Executable > Command Line (Linux & Mac OSX) > Build & Run Hector","what":"Running Hector","title":"Installing and building Hector","text":"Run Hector terminal: build run Hector unit tests, type make testing ","code":"./src/hector ./inst/input/name-of-ini.ini ./src/unit-testing/hector-unit-tests"},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"xcode-mac-os-x","dir":"Articles","previous_headings":"Standalone Executable","what":"Xcode (Mac OS X)","title":"Installing and building Hector","text":"directions assume basic familiarity Xcode Mac OS X software installation. Install Xcode necessary. Hector built tested MacOS >= 10.8.5, Monterey (12.6.1). project files Xcode 14.1. Download install Boost, following instructions . Download Hector zip file check repository using Git. Xcode, open project file project_files/Xcode/hector.xcodeproj. Xcode project file configured use constants defining custom paths, rather hard-coded paths. means developers users can set paths without overwriting . BOOSTROOT root directory Boost headers can found boost/. HECTORDIR set root directory model (repository root) Xcode use path ini files used various schemes write csv files output directory. want build Hector’s testing framework (hector-tests target; optional relevant C++ developers) add GTEST GTESTLIB custom paths Xcode; analogous Boost counterparts. need install googletest machine. point ready go: Build project, making sure ’re building hector target. Run! run different scenario, change current Scheme settings (Scheme->Edit Scheme) modify add command-line argument (Arguments tab, e.g. “./inst/input/hector_ssp245.ini”). Xcode profile file includes hector-tests target builds unit testing framework described . Xcode Resources Xcode Schemes Xcode Debugging","code":""},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"visual-studio-microsoft-visual-c","dir":"Articles","previous_headings":"Standalone Executable","what":"Visual Studio / Microsoft Visual C++","title":"Installing and building Hector","text":"Install Visual Studio sure Visual C++ add-well. Download install Boost. BOOSTROOT location installed Boost (e.g. C:\\boost_1_75_0) Open Visual Studio project file located Hector repository project_files/VS/hector.sln Build hector target CMD prompt: project_files/VS/x64/Release/hector.exe ./inst/input/name--ini.ini Visual Studio debugger (working directory default project_files/VS): x64/Release/hector.exe ../../inst/input/name--ini.ini","code":""},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"setting-constraints-in-hector","dir":"Articles","previous_headings":"","what":"Setting Constraints in Hector","title":"Constraints","text":"two ways activate constraint Hector: ini file setvar() function R. generic overview two different approaches. See specific implementation constraints.","code":""},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"constraints-via-the-ini-file","dir":"Articles","previous_headings":"Setting Constraints in Hector","what":"Constraints via the ini file","title":"Constraints","text":"Hector input file broken sections [core], [temperature], [carbon-cycle-solver], . Within section, users can define parameter values pass input variables – including constraints. constraint variables named pattern variable_constrain points csv file variables’ time series defined. line starts symbol ;, constraint Hector free running. constraint line beings without ;, Hector using constraint user-provided data used lieu Hector’s internal calculations. Changes constraints input files apply Hector runs executed command line R interface.","code":""},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"constraints-via-setvar","dir":"Articles","previous_headings":"Setting Constraints in Hector","what":"Constraints via setvar()","title":"Constraints","text":"Hector R package, setvar() function can used set constraints Hector instance. See specific examples run help(\"constraints\") help(\"haloconstrain\") static R help documentation.","code":""},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"discontinuous-constraints","dir":"Articles","previous_headings":"Setting Constraints in Hector","what":"Discontinuous constraints","title":"Constraints","text":"Hector perform interpolation constraints – constraints applied exact years provided user, years (including immediately constrained years) treated unconstrained (typically, emissions-driven). means constraints can abruptly force Hector’s climate system state inconsistent previous time step. Concentrations first year constraint can discontinuous compared previous year without constraint. Concentrations last year constraint necessarily discontinuity, behavior corresponding component related components may change point. user’s responsibility make sure constraints continuous.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"atmospheric-co2","dir":"Articles","previous_headings":"Current Constraint Capabilities","what":"Atmospheric CO2","title":"Constraints","text":"CO\\(_2\\) concentrations ([CO\\(_2\\)], given ppmv CO\\(_2\\)) largest effect total radiative forcing affected carbon-cycle climate interactions. Running Hector CO\\(_2\\) concentration constraint turned mimics default behavior Earth System Models GHG concentration driven. capability also helpful debugging. atmospheric CO\\(_2\\) constraint turned , carbon-cycle climate feedback parameters (\\(Q_{10}\\) \\(\\beta\\)) essentially ignored. Uncommenting (removing ;) following line [simpleNbox] section input file turn atmospheric CO\\(_2\\) concentration constraint . model’s atmospheric CO\\(_2\\) concentration ([CO\\(_2\\)], given ppmv CO\\(_2\\)) follow contents file (must include least two columns titled Date CO2_constrain). Alternatively, Hector’s atmospheric CO\\(_2\\) concentration constraint can set using setvar() function CO2_CONSTRAIN(). example R. Plot results free running Hector constrained Hector. constraint implemented Hector (C++) CO\\(_2\\) constraint applied end current time step. full sequence events follows: First, model solves current time-step’s carbon cycle conditioned previous time step’s carbon pools, ignoring CO\\(_2\\) constraint. , CO\\(_2\\) constraint present, Hector calculates difference calculated atmospheric CO\\(_2\\) prescribed CO\\(_2\\) constraint. target atmospheric CO\\(_2\\) concentration lower calculated CO\\(_2\\), excess carbon transferred atmosphere deep ocean; conversely, target atmospheric CO\\(_2\\) concentration greater calculated value, additional carbon transferred deep ocean atmosphere. Finally, Hector records current atmospheric CO\\(_2\\) concentration (now equal constraint value); value used next time step’s evaluation carbon-climate feedbacks (e.g. CO\\(_2\\) fertilization net primary productivity, surface ocean carbonate chemistry…). words, atmospheric CO\\(_2\\) constraint time \\(t\\) affect carbon-climate feedbacks \\(t+1\\). CO\\(_2\\) constraint need span entirety Hector simulation, even continuous. given time step, Hector check whether CO\\(_2\\) constraint exists time step apply constraint present. means “hybrid” runs possible, specific time ranges CO\\(_2\\) constraints others calculate atmospheric carbon pool CO\\(_2\\) concentrations according Hector’s standard carbon cycle.","code":";CO2_constrain=csv:path/to/constraint/file.csv # Set up an instance of Hector & run, this is the free running Hector to be # used as a comparison to the constrained Hector ini <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") core <- newcore(ini, name = \"ssp245\") invisible(run(core)) # `invisible` prevents Hector core info from being printed out # Extract the output dates_to_keep <- 1850:2100 vars_to_keep <- c(ATMOSPHERIC_CO2(), RF_TOTAL(), GLOBAL_TAS()) free_out <- fetchvars(core, 1850:2100, vars = vars_to_keep) # Make a time series of new CO2 values to use as the constraint constraint_yrs <- 1950:2050 new_co2 <- seq(from = 200, to = 400, length.out = length(constraint_yrs)) # Use setvar() to set up the the constraint, reset and run Hector, and fetch the results setvar(core, dates = constraint_yrs, var = CO2_CONSTRAIN(), values = new_co2, unit = getunits(CO2_CONSTRAIN())) reset(core) ## Hector core: ssp245 ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini invisible(run(core)) constrained_out <- fetchvars(core, 1850:2100, vars = vars_to_keep)"},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"non-co2-concentrations","dir":"Articles","previous_headings":"Current Constraint Capabilities","what":"Non CO2 concentrations","title":"Constraints","text":"Hector can constrain non CO\\(_2\\) GHG concentrations (N\\(_2\\)O, CH\\(_4\\), halocarbons). work --less way atmospheric CO\\(_2\\) constraint (), except equivalent carbon pool adjustment gases. input file, triggered line like following corresponding component section: CSV inputs, /path//file.csv must include columns Date X_constrain. Alternatively, constraints can set R interface using setvar(). Implementing constraints follows pattern temperature, radiative forcing, atmospheric CO\\(_2\\): Set active Hector core, use setvar() set constraint, run, fetch output Hector core. constraint implemented Hector (C++) using CH4 example given time step, Hector check constraint value time step (e.g. CH4_constrain.exists(t)). constraint exists, Hector skip atmospheric chemistry calculations set corresponding atmospheric concentration value constraint value (e.g. CH4.set(t, CH4_constrain.get(t)). constraint exist, Hector proceed standard atmospheric chemistry routines calculating atmospheric concentration based emissions concentrations relevant species. means concentration constraints always take precedence emissions; words, particular time step emissions concentration constraint, emissions constraint ignored. Note CH\\(_4\\) N\\(_2\\)O special variables pre-industrial concentration conflict constraint. Hector, concentration constraints take precedence pre-industrial concentrations; words, Hector assumes provide concentration constraint pre-industrial timestep, concentration want, regardless prescribed pre-industrial value. equations CH\\(_4\\) N\\(_2\\)O concentrations radiative forcing parameterized specific pre-industrial concentrations. Users must cautions changes pre-industrial values may affect radiative forcing calculations.","code":"X_constrain=csv:path/to/file.csv"},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"radiative-forcing","dir":"Articles","previous_headings":"Current Constraint Capabilities","what":"Radiative forcing","title":"Constraints","text":"model’s global radiative forcing Ftot drives global temperature changes can constrained. Free running Hector calculates Ftot based radiative forcing contributions GHG concentrations, aerosol emissions, forcing inputs [UNSURE WORDING] (e.g. land albedo solar forcing). Using radiative forcing constraint Ftot_constrain means parameters /variables affect radiative forcing (carbon cycle feedback parameters emissions) affect Ftot constraint effect. model extrapolate within Ftot_constrain necessary, beyond endpoints. Hector’s internal date passes last date Ftot_constrain, model’s forcing component becomes unconstrained. Uncommenting (removing ;) following line [forcing] section input file turn radiative forcing constraint . example using R package implement radiative forcing constraint. Plot total radiative forcing global mean temperature. Recall constraint effect 1950 2050.","code":";Ftot_constrain=csv:path/to/constraint/file.csv # Set up an instance of Hector & run ini <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") core <- newcore(ini, name = \"ssp245\") invisible(run(core)) # the invisible call prevents Hector core info from being printed out # Extract the output. dates_to_keep <- 1850:2100 vars_to_keep <- c(RF_TOTAL(), GLOBAL_TAS()) free_out <- fetchvars(core, 1850:2100, vars = vars_to_keep) # Make a time series of new RF values to use as the RF constraint. We are only # going to change the RF for a subset of the years. new_rf <- free_out[free_out$variable == RF_TOTAL() & free_out$year %in% 1950:2050, ] new_rf$value <- new_rf$value + 3 # increase the total RF # Use setvar() to set up the the constraint, reset and run Hector, and fetch the results. setvar(core, dates = new_rf$year, var = FTOT_CONSTRAIN(), values = new_rf$value, unit = \"W/m2\") reset(core) ## Hector core: ssp245 ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini invisible(run(core)) constrained_out <- fetchvars(core, 1850:2100, vars = vars_to_keep)"},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"temperature","dir":"Articles","previous_headings":"Current Constraint Capabilities","what":"Temperature","title":"Constraints","text":"Uncommenting (removing ;) following line [temperature] section input file turn global mean constraint . model’s global mean temperature global_tas follow contents file (must contain columns titled Date tas_constrain; sample file included repository (see inst/input/tables/tgav_historical.csv). model extrapolate within data necessary, beyond endpoints. Hector’s internal date passes last date constraint file, model’s temperature component becomes unconstrained, except permit suddenly jump new temperature. Instead, changes global radiative forcing (temperature change computed) applied end--constraint temperature. details, see detailed comments TemperatureComponent::run (temperature_component.cpp). example using R package implement global average mean temperature (global_tas) constraint. Plot total radiative forcing global mean temperature. Recall constraint effect 1950 2050.","code":"tas_constrain=csv:path/to/constraint/file.csv # Set up an instance of Hector & run ini <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") core <- newcore(ini, name = \"ssp245\") invisible(run(core)) # `invisible` prevents Hector core info from being printed # Extract the output dates_to_keep <- 1850:2100 vars_to_keep <- c(GLOBAL_TAS()) free_out <- fetchvars(core, 1850:2100, vars = vars_to_keep) # Make a time series of new temperature values to use as the constraint new_tgav <- free_out[free_out$variable == GLOBAL_TAS(), ] new_tgav$value <- new_tgav$value + new_tgav$value * 0.25 # increase global temp by 25% # Use setvar() to set up the the constraint, reset and run Hector, and fetch the results setvar(core, dates = new_tgav$year, var = TAS_CONSTRAIN(), values = new_tgav$value, unit = getunits(TAS_CONSTRAIN())) reset(core) ## Hector core: ssp245 ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini invisible(run(core)) constrained_out <- fetchvars(core, 1850:2100, vars = vars_to_keep)"},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"nbp","dir":"Articles","previous_headings":"Current Constraint Capabilities","what":"NBP","title":"Constraints","text":"NBP constraint can activated via ini file adding line [simpleNbox] section input file, constraint csv file columns titled Date NBP_constrain similar sample file included repository (see inst/input/tables/tgav_historical.csv). example implemented R interface Plot results free running Hector constrained Hector. model hits constraint exactly raising RH lowering NPP. , atmospheric CO\\(_2\\) rises rapidly constraint period, ’ve basically shut land C sink. result, model exits constraint period, NPP shoots high (atmosphere saturated CO\\(_2\\)). similar vein, suppressed NPP means, outside constraint, RH low thus land becomes large sink draws excess atmospheric CO\\(_2\\).","code":"NBP_constrain=csv:path/to/constraint/file.csv constraint_yrs <- 2001:2010 constraint_values <- c(0.1, 0.2, 0.3, -0.4, -0.5, -0.6, 0.7, 0.8, 0.9, 1.0) ini <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") core <- newcore(ini, name = \"ssp245\") invisible(run(core)) # `invisible` prevents Hector core info from being printed out # Extract the output dates_to_keep <- 1850:2100 vars_to_keep <- c(ATMOSPHERIC_CO2(), NBP(), NPP(), RH()) free_out <- fetchvars(core, 1850:2100, vars = vars_to_keep) # Use setvar() to set up the the constraint, reset and run Hector, and fetch the results setvar(core, dates = constraint_yrs, var = NBP_CONSTRAIN(), values = constraint_values, unit = getunits(NBP_CONSTRAIN())) reset(core) ## Hector core: ssp245 ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini invisible(run(core)) constrained_out <- fetchvars(core, 1850:2100, vars = vars_to_keep)"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Hector External API","text":"Hector external API allows another program execute one Hector runs within another program. functionality available stand-alone version Hector available API. fact, stand-alone Hector implemented wrapper around series calls API. Therefore, program using Hector API can following: * Set one Hector instances read configuration files. * Set emissions values. * Run Hector specified date, resuming wherever model last stopped. * Retrieve current concentrations forcings. many ways capabilities can used, examples concentrate one work flow interesting integrated assessment (IA) model users: Set Hector. Run start date IA model using stored historical emissions. Run IA model step. Set Hector emissions IA model outputs. Run Hector start next IA model step. Read Hector outputs. Repeat steps 3-6 desired end date reached.","code":""},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"requirements","dir":"Articles","previous_headings":"","what":"Requirements","title":"Hector External API","text":"Hector API supported Hector version 1.1 later. written C++. use , either code must written C++, need way calling C++ functions whatever language using. instructions presuppose Linux install, basic procedure, tweaking file paths , work Windows Mac systems.","code":""},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"installation-and-setup","dir":"Articles","previous_headings":"","what":"Installation and Setup","title":"Hector External API","text":"Install build Hector normally. build process produce library called libhector.. need link file executable build program. place store libraries (e.g., /usr/local/lib), can copy , can just use place wish. also need able include Hector header files code. found ‘headers’ directory directory installed Hector. copy entire directory tree something like /usr/include/hector wish, ’s probably just easy leave . don’t absolutely need files Hector directories, others might useful examples. file src/main.cpp example use API get data Hector. can build example code uncommenting lines Makefile: run make hector-api build example. top-level Hector directory, run hector-api input/api-example.ini run example code. example code reads emissions several gases files input/emissions directory loads emissions Hector core API. Emissions remaining gases set input file, stand-alone version Hector.","code":"# hector-api: libhector.a main-api.o # $(CXX) $(LDFLAGS) -o hector-api main-api.o -lhector -lgsl -lgslcblas -lm"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"using-the-api","dir":"Articles","previous_headings":"","what":"Using the API","title":"Hector External API","text":"Hector classes (one exception) contained Hector:: namespace. classes needed use Hector API : Hector::Core Master controller mediates interactions Hector components outside code. Hector::unitval Structure representing numerical value attached units. Values send receive Hector packaged structure. unitval class implicit conversion double defined, strips unit returns numerical value. Writing unitval std::ostream writes value unit (e.g. 12345 Tg). Hector::message_data Structure holding messages Hector components. message_data can hold variety different message types, messages outside Hector, message either date (retrieving data component), date paired unitval (sending data component). Hector::Logger Hector’s logging class. need deal want attach loggers Hector components. Hector::INIToCoreReader Helper class used initialization. Hector::CSVOutputStreamVisitor Class formats writes Hector’s output. need want Hector produce native output. planning retrieving data Hector using code’s output mechanism, can skip . h_exception Exception class. something goes wrong Hector throw class exception. Hector core interface controlling interacting simulation. run simulation, use core’s run method. get component something, tell Hector core send component message. type message determines component response, contents message provide input whatever component . core routes message returns response, . message comprises three parts: * type indicates want component . types encounter frequently SETDATA GETDATA * target indicates message . Usually name gas type forcing. Valid targets defined constants given [[appendix|Hector Message Targets]]. * contents provide input component’s action. message_data object packed relevant data.","code":""},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"initialization","dir":"Articles","previous_headings":"Using the API","what":"Initialization","title":"Hector External API","text":"general procedure initialization : Create instance Hector::Core. Initialize core. Read parse configuration (INI) file. (Optionally) Attach output stream visitor Hector. Set core ready run. together, procedure looks like :","code":"Hector::Core hcore; // create the core hcore.init(); // run init method // create the INI reader: Hector::INIToCoreReader coreParser(&hcore); // use it to parse an input file: coreParser.parse(\"input/myinput.ini\"); /* This next part is OPTIONAL. You only have to do it if you want Hector's native output */ // set up an output file stream std::ofstream ofile(\"output/my-hector-outputstream.csv\"); // The output stream visitor formats and creates the output. It needs // the output stream we just created. Hector::CSVOutputStreamVisitor hcosv(&ofile, true); // Add the visitor to the core hcore.addVisitor(&hcosv); /* END of the OPTIONAL part */ hcore.prepareToRun(); // prepare Hector to run"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"setting-emissions","dir":"Articles","previous_headings":"Using the API","what":"Setting Emissions","title":"Hector External API","text":"set emissions gas, send SETDATA message targeted gas want set emissions . don’t know component handles gas; core takes care looking . message contents date (year setting emissions ) unitval (emissions value). Hector checks units data passed , doesn’t convert fly. Units gases tracked Hector given separate appendix. entire process looks like : can ignore return value sendMessage() case, since purpose message set data, retrieve . Emissions set using method overwrite previously existing emissions time gas specified message. includes emissions configured INI file. result, safe read complete set emissions INI file (e.g., using one packaged configurations) replace emissions needed. Note, however, emissions data packaged Hector provided annually. Therefore, model generates emissions time steps greater one year, make certain overwrite emissions years model’s time steps, get unexpected results.","code":"// emiss is a double with CO2 emissions in GtC/yr, presumably calculated elsewhere // year is a double that gives the year // hcore is an object of type Hector::Core Hector::unitval data(emiss, U_PGC_YR); Hector::message_data msg(year, data); hcore.sendMessage(M_SETDATA, D_ANTHRO_EMISSIONS, msg);"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"running-the-model","dir":"Articles","previous_headings":"Using the API","what":"Running the Model","title":"Hector External API","text":"run model, call Hector::Core::run method: calculation start start year configured INI file including stopYear. practical upshot set emissions years desired stop year calling run(). Subsequent calls resume previous run left run new stop year, following workflow supported: currently way make model go backwards time. Attempting run Hector::run() argument less equal last stop year produce warning otherwise nothing. Running model past end date configured INI file also produce warning, run normally. Note, however, components may use configured end date calculations, guaranteed valid configured end date. Therefore, safest make sure end date configured INI file latest date expect use run.","code":"hcore.run(stopYear); for(double year=model_start; year<=model_end; year+=model_timestep) { // run your model here... // set emissions from your model into Hector here... hcore.run(year); // get Hector results and do something with them here... }"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"retrieving-data","dir":"Articles","previous_headings":"Using the API","what":"Retrieving Data","title":"Hector External API","text":"retrieve results Hector, use GETDATA message. procedure similar setting emissions data; however, case need supply unitval argument, want keep return value, since contains value retrieving. bit inconsistency use dates calls. Generally, date forbidden forcings, except halocarbon forcings, required. Dates forbidden CO\\(_2\\) concentrations, required gases. hope address inconsistencies subsequent updates. Note outputs allow date supplied, way get value output particular date stop run date call sendMessage() get value current model time. return value unitval structure. can manipulated directly, assigned double, units stripped , leaving value:","code":"// retrieve CO2 concentration at the current model time Hector::unitval co2conc = hcore.sendMessage(M_GETDATA, D_ATMOSPHERIC_CO2); // retrieve N2O concentration at specified year Hector::unitval n2oconc = hcore.sendMessage(M_GETDATA, D_ATMOSPHERIC_N2O, year); // retrieve total forcing at current model time Hector::unitval rftot = hcore.sendMessage(M_GETDATA, D_RF_TOTAL); double globaltemp = hcore.sendMessage(M_GETDATA, D_GLOBAL_TEMP); double ocean_c_flux = hcore.sendMessage(M_GETDATA, D_OCEAN_C_UPTAKE);"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"shutdown","dir":"Articles","previous_headings":"Using the API","what":"Shutdown","title":"Hector External API","text":"stop core delete Hector components, call shutdown() method: method called, calls methods Hector core fail. instantiated one Hector core, core shutdown() called affected. Others continue operate normally.","code":"hcore.shutdown();"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"exceptions","dir":"Articles","previous_headings":"Using the API","what":"Exceptions","title":"Hector External API","text":"Hector encounters unrecoverable error, throw exception h_exception exception argument. object can passed ostream print function, file, line number problem detected, along (hopefully) descriptive message.","code":"try { // do some Hector calculations... } catch(const h_exception &e) { std::cerr << e << std::endl; // prints info about what went wrong throw; }"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"building-and-running-your-code","dir":"Articles","previous_headings":"","what":"Building and Running Your Code","title":"Hector External API","text":"two things build model linked Hector. first make sure compiler can find hector.hpp include file header files included . adding Hector headers directory compiler’s include path. example, installed Hector /usr/src/hector, compile command might look something like : second thing link object files Hector library, libhector.. also need link GNU Scientific Library (GSL). Similar compiling step, set library search path. also add -l options needed libraries. example, Hector /usr/src/hector GSL libraries /usr/local/lib, link command looks like : Hector library statically linked, won’t worry library load paths runtime. GSL typically dynamically linked, need make sure executable can find library runtime. See [[Hector build instructions|BuildHector]] advice arrange . build succeeds, end executable version model can run usual way. Input code’s control, supply Hector libraries name INI file (see instructions ). Unless followed instructions create Hector output stream, code also responsible producing whatever output want Hector.","code":"g++ -I/usr/src/hector/headers -O -c mycode.cpp g++ -L/usr/src/hector/source -L/usr/local/lib mycode.o -lhector -lgsl -lgslcblas -lm"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"limitations-and-caveats","dir":"Articles","previous_headings":"","what":"Limitations and Caveats","title":"Hector External API","text":"’re using Hector output stream, code can’t create output file (e.g., directory doesn’t exist), output silently discarded. true Hector log files. currently way rewind Hector simulation earlier time. want , shut Hector core instantiate initialize whole new core. new core won’t know anything emissions put old core, want follow emissions pathway rewind point, code store emissions add new core initialized. can run Hector point wanted rewind .","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"hector_documentation","dir":"Articles","previous_headings":"","what":"Hector Publications","title":"Hector in the Wider World","text":"three documentation manuscripts Hector.","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"hector-v1","dir":"Articles","previous_headings":"Hector Publications","what":"Hector v1","title":"Hector in the Wider World","text":"Hartin, C. ., Patel, P., Schwarber, ., Link, R. P., Bond-Lamberty, B. P. (2015). simple object-oriented open-source model scientific policy analyses global climate system – Hector v1.0, Geosci. Model Dev., 8, 939–955. https://doi.org/10.5194/gmd-8-939-2015. original manuscript Hector v1.0 published 2015. Hector open-source, object-oriented simple global carbon cycle model. model takes CO\\(_2\\) non-CO\\(_2\\) emissions (e.g., CH\\(_4\\), N\\(_2\\)O), converting emissions concentrations needed, calculates global radiative forcing global mean temperature change","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"hector-v1-1","dir":"Articles","previous_headings":"Hector Publications","what":"Hector v1.1","title":"Hector in the Wider World","text":"Hartin, C. ., Bond-Lamberty, B. P., Patel, P., Mundra, . (2016). Ocean acidification next three centuries using simple global climate carbon-cycle model: projections sensitivities, Biogeosciences, 13, 4329 – 4342. https://doi.org/10.5194/bg-13-4329-2016 Hector v1.1 contains updated ocean temperature algorithm better match CMIP5 mean.","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"hector-v2-0","dir":"Articles","previous_headings":"Hector Publications","what":"Hector v2.0","title":"Hector in the Wider World","text":"Vega-Westhoff, B., Sriver, R. L., Hartin, C. ., Wong, T. E., & Keller, K. (2019). Impacts observational constraints related sea level estimates climate sensitivity. Earth’s Future, 7, 677– 690. https://doi.org/10.1029/2018EF001082 Hector v2.0 incorporates one-dimensional diffusive heat energy balance model called DOECLIM global sea level module called BRICK.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"journal-articles","dir":"Articles","previous_headings":"Hector in Literature","what":"Journal articles","title":"Hector in the Wider World","text":"journal articles use reference Hector. – Climate module disparities explain inconsistent estimates social cost carbon integrated assessment models Wang, Tianpeng, Fei Teng, Xu Deng, Jun Xie. 2022. “Climate Module Disparities Explain Inconsistent Estimates Social Cost Carbon Integrated Assessment Models.” One Earth 5 (7): 767–78. – permafrost implementation simple carbon-climate model Hector v.2.3pf Woodard, D. L., Shiklomanov, . N., Kravitz, B., Hartin, C., Bond-Lamberty, B. (2021). permafrost implementation simple carbon-climate model Hector v.2.3pf. Geosci. Model Dev., 14, 4751–4767. ttps://doi.org/10.5194/gmd-14-4751-2021 study adds permafrost Hector separate land carbon pool decomposes CH\\(_4\\) CO\\(_2\\) thawed. thaw rate controlled region-specific air temperature increases. – role climate sensitivity upper-tail sea level rise projections Vega‐Westhoff, B., Sriver, R. L., Hartin, C., Wong, T. E., & Keller, K. (2020). role climate sensitivity upper‐tail sea level rise projections. Geophysical Research Letters, 47, e2019GL085792. https://doi.org/10.1029/2019GL085792 study uses Hector-BRICK investigate effects Earth’s equilibrium climate sensitivity, long-term temperature response doubling atmospheric CO\\(_2\\), sea-level rise focus high-impact upper tail. – Calibrating simple climate models individual Earth System Models: Lessons learned calibrating Hector Dorheim, K., Link, R., Hartin, C., Kravitz, B., & Snyder, . (2020). Calibrating simple climate models individual Earth system models: Lessons learned calibrating Hector. Earth Space Science, 7, e2019EA000980. > https://doi.org/10.1029/2019EA000980 article, authors use Hector v2.5.0 emulate multiforcing historical RCP scenario output 31 concentration seven emissions-driven Earth System Models. – Evaluating climate emulation: fundamental impulse testing simple climate models Schwarber, . K., Smith, S. J., Hartin, C. ., Vega-Westhoff, B. ., Sriver, R. (2019). Evaluating climate emulation: fundamental impulse testing simple climate models, Earth Syst. Dynam., 10, 729–739. https://doi.org/10.5194/esd-10-729-2019 authors use fundamental impulse tests CO\\(_2\\), CH\\(_4\\), black carbon understand fundamental gas cycle climate system responses comprehensive idealized simple climate models.","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"rcmip-project","dir":"Articles","previous_headings":"Hector in Literature","what":"RCMIP Project","title":"Hector in the Wider World","text":"Reduced Complexity Model Intercomparison Project (RCMIP) first systematic intercomparison project reduced-complexity climate models (RCM) provides standard protocol one-line models simple reduced-complexity models perform experiments common set assumptions. short, creates standardized test RCMs reproduce Earth System Model projections. Hector one model used RCMIP. RCMIP Phase 1 focuses RCMs’ global mean temperature responses RCMIP Phase 2 explores extent different RCMs can calibrated reproduce knowledge specialized research communities.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"mimi-framework","dir":"Articles","previous_headings":"Other Places","what":"Mimi Framework","title":"Hector in the Wider World","text":"MIMI Julia package integrated assessment models. MimiHECTOR partial implementation Hector Julia. Github found .","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"pyhector","dir":"Articles","previous_headings":"Other Places","what":"pyhector","title":"Hector in the Wider World","text":"pyhector Python interface Hector. paper describing pyhector Sven N Wilner, Corrine Hartin, Robert Gieseke. Github found .","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"youtube-walkthrough","dir":"Articles","previous_headings":"Other Places","what":"YouTube Walkthrough","title":"Hector in the Wider World","text":"video walk Kalyn Dorheim including information using Hector v2.5: Installing Hector Running core Running scenario Accessing plotting results Shutting core Changing parameter brief explanation documentation","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"hectorui","dir":"Articles","previous_headings":"Other Places","what":"HectorUI","title":"Hector in the Wider World","text":"HectorUI R Shiny web interface designed user-friendly provide alternative command line running Hector. allows users may fluent C++ R explore model scenarios outputs. HectorUI interface can found . HectorUI paper can found Evanoff J.E., Vernon, C.R., Waldhoff, S.T., Snyder, . C., Hartin, C.. (2020). “hectorui: web-based interactive scenario builder visualization application Hector climate model.” Journal Open Source Software 5, . 56:Article . 2782. PNNL-SA-156861. https://doi.org/10.21105/joss.02782 YouTube overview HectorUI Stephanie Pennington can found .","code":""},{"path":"https://jgcri.github.io/hector/articles/HectorSummary.html","id":"introduction-to-hector","dir":"Articles","previous_headings":"","what":"Introduction to Hector","title":"Hector general summary","text":"Hector open-source, object-oriented, simple global carbon cycle model. simple climate model, Hector runs quickly still representing critical global Earth system processes. Hector default carbon cycle module integrated assessment model GCAM (Global Change Assessment Model). open-source nature modular design allows user edit input files code, meaning user design new submodel answer particular science question. Hector can accurately reproduce historical trends future projections atmospheric CO2, radiative forcing, global temperature change RCPs SSPs.1 Hector contains well-mixed global atmosphere, ocean component, land component composed vegetation, detritus, soil. Briefly, terrestrial vegetation, detritus, soil linked atmosphere first-order differential equations. Carbon flows vegetation detritus soil, losing fractional amounts heterotrophic respiration. details terrestrial carbon cycle, please reference “model’s terrestrial carbon cycle”. Note Hector’s fundamental time step one year, carbon cycle can scaled finer resolution necessary.2 ocean component consists four boxes: two surface boxes, one high-latitude low-latitude, one intermediate, one deep box. cold high-latitude (>55\\(^◦\\)) box makes 15% ocean surface area warm low-latitude box (>55\\(^◦\\)) makes remaining 85%. Ocean temperatures linearly related global atmospheric temperature change; temperature gradient causes flux carbon high-latitude box flux carbon warm low-latitude box.3 Hector can also calculate near surface global atmospheric temperature. Radiative forcing calculated various atmospheric greenhouse gases, aerosols, pollutants, including halocarbons, tropospheric ozone, black organic carbon, sulfate aerosols, methane (CH4), nitrous oxide (N20), stratospheric H20 methane oxidation.4 Hector v2.0 replaced temperature component model coupled 0-D climate 1-D ocean heat diffusion model, DOECLIM. Hector implementation, like past assessments using DOECLIM, three tuneable physical parameters: equilibrium climate sensitivity doubling CO2, vertical ocean diffusivity, aerosol forcing scaling factor. addition improved vertical ocean structure heat uptake well surface temperature response radiative forcing. Additionally, Hector V2.0 incorporates semiempirical model based global temperature calculate global sea level change. component based BRICK model framework, global sea level changes treated sum contributions thermal expansion, glaciers small ice caps, Greenland Antarctic ice sheets, changes land water storage. BRICK updated within Hector simplify coupling.5","code":""},{"path":"https://jgcri.github.io/hector/articles/HectorSummary.html","id":"other-simple-climate-models","dir":"Articles","previous_headings":"","what":"Other simple climate models","title":"Hector general summary","text":"Simple climate models, also referred reduced-complexity climate models, represent critical global-scale Earth system processes low spatial temporal resolution. models relatively easy use understand computationally less expensive time-consuming complex Earth system models. simple climate models calculate future concentrations greenhouse gases given emissions modeling global carbon cycle, calculating global mean radiative forcing greenhouse gas concentrations, converting radiative forcing global mean temperature.6 simple climate models include, although limited , following: ACC2: Aggregated Carbon Cycle, Atmospheric Chemistry, Climate model AR5IR: Fifth Assessment Report Impulse Response Model CICERO-SCM: CICERO Simple Climate Model EMGC: Empirical Model Global Climate ESCIMO: Earth System Climate Interpretable Model FaIR-v1-5 FaIR-v2-0-0: Finite-amplitude Impulse Response GENIE: Grid Enabled Integrated Earth System Model GREB: Globally Resolved Energy Balance model, also referred Monash Simple Climate Model MAGICC: Model Assessment Greenhouse Gas Induced Climate Change MARGO: MARGO represents four potential climate controls, emissions Mitigation, carbon dioxide Removal, Geo-engineering, Adaptation. MCE: minimal CMIP emulator OSCAR: simple earth system model non-linear box model RDCEP: Center Robust Decision-making Climate Energy Policy created statistical climate emulator. WASP: Warming Acidification Sea level Projector","code":""},{"path":"https://jgcri.github.io/hector/articles/HectorSummary.html","id":"further-information","dir":"Articles","previous_headings":"","what":"Further information","title":"Hector general summary","text":"Please see documentation manuscripts: Hector v1: Hartin, C. ., Patel, P., Schwarber, ., Link, R. P., Bond-Lamberty, B. P. (2015). simple object-oriented open-source model scientific policy analyses global climate system – Hector v1.0, Geosci. Model Dev., 8, 939–955. https://doi.org/10.5194/gmd-8-939-2015 Hector v1.1: Hartin, C. ., Bond-Lamberty, B. P., Patel, P., Mundra, . (2016). Ocean acidification next three centuries using simple global climate carbon-cycle model: projections sensitivities, Biogeosciences, 13, 4329 – 4342. https://doi.org/10.5194/bg-13-4329-2016 Hector v2.0: Vega-Westhoff, B., Sriver, R. L., Hartin, C. ., Wong, T. E., & Keller, K. (2019). Impacts observational constraints related sea level estimates climate sensitivity. Earth’s Future, 7, 677– 690. https://doi.org/10.1029/2018EF001082","code":""},{"path":"https://jgcri.github.io/hector/articles/InputFiles.html","id":"general-information","dir":"Articles","previous_headings":"","what":"General information","title":"Hector input files","text":"Hector invoked command line, takes single parameter: name primary input file read. file, typically stored input/ directory, contains configuration parameter data controlling model’s run, output, behavior. primary input file text file sections, properties, values. example, beginning SSP245 file included repository looks like : , comments start semicolon (;); section names (core) enclosed square brackets; property (run_name) assigned value (ssp245). Properties guaranteed unique within particular section, sections match one--one model component.","code":"; Config file for hector model: SSP245 ;------------------------------------------------------------------------ [core] run_name=ssp245"},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/InputFiles.html","id":"table-of-biome-specific-inputs","dir":"Articles","previous_headings":"General information","what":"Table of biome-specific inputs","title":"Hector input files","text":"possible run Hector multiple distinct biomes. following parameters specific particular biome.","code":""},{"path":"https://jgcri.github.io/hector/articles/InputFiles.html","id":"table-of-variable-inputs-with-a-time-index","dir":"Articles","previous_headings":"General information","what":"Table of variable inputs (with a time index)","title":"Hector input files","text":"two Hector-specific wrinkles INI property-value assignment scheme. First, properties time index ’s required assigning: commonly, time series assigned reading data comma-separated value text file: case, input/emissions/ssp245_emissions.csv file parsed data column lucEmissions assigned model variable, required Date column providing time index. Note “(csv)” entry default column indicates values passed via path csv file.","code":"Ftalbedo[1750]=0.0 Ftalbedo[1950]=-0.2 lucEmissions=csv:input/emissions/ssp245_emissions.csv"},{"path":"https://jgcri.github.io/hector/articles/Permafrost.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"An Introduction to Permafrost in Hector","text":"Start setting default Hector core running : noted , currently default model initialized permafrost carbon: Run default core save outputs:","code":"library(hector) ini <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") core <- newcore(ini, name = \"ssp245-default\") fetchvars(core, dates = NA, vars = PERMAFROST_C()) #> scenario year variable value units #> 1 ssp245-default NA permafrost_c 0 Pg C invisible(run(core)) # Output variables we want to retrieve climate_vars <- c(ATMOSPHERIC_CO2(), GLOBAL_TAS(), RF_CO2(), RF_TOTAL()) permafrost_vars <- c(PERMAFROST_C(), THAWEDP_C(), RH(), CONCENTRATIONS_CH4()) run1 <- fetchvars(core, dates = 1745:2300, vars = c(climate_vars, permafrost_vars)) shutdown(core) #> Hector core (INACTIVE)"},{"path":"https://jgcri.github.io/hector/articles/Permafrost.html","id":"enabling-permafrost","dir":"Articles","previous_headings":"","what":"Enabling permafrost","title":"An Introduction to Permafrost in Hector","text":"Set new core set initial permafrost carbon 865 Pg C, value used Woodard et al. (2021): can check confirm permafrost lost atmosphere climate warmed… …leading earth system climate differences:","code":"core <- newcore(ini, name = \"ssp245-permafrost\") setvar(core, 0, PERMAFROST_C(), 865, \"Pg C\") invisible(run(core)) #> Auto-resetting core to -1 run2 <- fetchvars(core, dates = 1745:2300, vars = c(climate_vars, permafrost_vars)) fetchvars(core, 2300, PERMAFROST_C()) #> scenario year variable value units #> 1 ssp245-permafrost 2300 permafrost_c 629.4915 Pg C shutdown(core) #> Hector core (INACTIVE) results <- rbind(run1, run2) library(ggplot2) ggplot(subset(results, variable %in% climate_vars), aes(year, value, color = scenario)) + geom_line() + facet_wrap(~variable, scales = \"free\")"},{"path":"https://jgcri.github.io/hector/articles/Permafrost.html","id":"a-closer-look-at-permafrost-dynamics","dir":"Articles","previous_headings":"","what":"A closer look at permafrost dynamics","title":"An Introduction to Permafrost in Hector","text":"thaw rate controlled biome-specific air temperature, thawed permafrost slowly decomposes CH\\(_4\\) CO\\(_2\\). can look effects detail: can see permafrost thaws , 22nd century, slightly refreezes; thawed permafrost pool peaks second half 20th century declines; atmospheric methane total heterotrophic respiration significantly higher permafrost non-permafrost simulations.","code":"ggplot(subset(results, variable %in% permafrost_vars), aes(year, value, color = scenario)) + geom_line() + facet_wrap(~variable, scales = \"free\")"},{"path":"https://jgcri.github.io/hector/articles/Permafrost.html","id":"controlling-the-behavior-of-permafrost-thaw","dir":"Articles","previous_headings":"","what":"Controlling the behavior of permafrost thaw","title":"An Introduction to Permafrost in Hector","text":"described Woodard et al. (2021), relationship air temperature thaw fraction controlled two parameters calibrated CMIP6 data: can test effect varying parameters: Hector’s permafrost capability planned fully science-ready v3.2.","code":"core <- newcore(ini, name = \"ssp245-permafrost\") setvar(core, 0, PERMAFROST_C(), 865, \"Pg C\") fetchvars(core, NA, c(PERMAFROST_MU(), PERMAFROST_SIGMA())) #> scenario year variable value units #> 1 ssp245-permafrost NA pf_mu 1.670 degC #> 2 ssp245-permafrost NA pf_sigma 0.986 degC run_fn <- function(value, core, variable) { setvar(core, NA, variable, value, \"degC\") reset(core) run(core) out <- fetchvars(core, 2100:2300, vars = GLOBAL_TAS()) out$varying <- variable out$param_value <- value out } # Run basic parameter sensitivity test results_mu <- lapply(seq(1.4, 2.1, length.out = 6), run_fn, core, PERMAFROST_MU()) #> Auto-resetting core to -1 results_sigma <- lapply(seq(0.7, 1.2, length.out = 6), run_fn, core, PERMAFROST_SIGMA()) # Combine results and plot results <- do.call(\"rbind\", c(results_mu, results_sigma)) default <- subset(run2, variable == GLOBAL_TAS() & year %in% 2100:2300) ggplot(results, aes(year, value, color = param_value, group = paste(varying, param_value))) + geom_line(linetype = 2) + ylab(GLOBAL_TAS()) + facet_wrap(~varying) + # add a thick black line to show default behavior annotate(geom = \"line\", x = default$year, y = default$value, linewidth = 1.5)"},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"science","dir":"Articles","previous_headings":"","what":"Science","title":"Terrestrial C cycle","text":"Hector’s land system divided three pools: vegetation (\\(C_v\\)), detritus (\\(C_d\\)), soil (\\(C_s\\)); fourth pool, earth (\\(C_earth\\)) used anthropogenic emissions uptake. pools global default, can divided \\(n\\) “biomes” unique parameters initial pool sizes. total C flux atmosphere land time \\(t\\) (\\(F_{L}(t)\\); also known Net Biome Production, NBP) net C sequestration photosynthesis (net primary productivity, \\(NPP_i(t)\\)) C release heterotrophic respiration (\\(RH_i(t)\\)) summed across biome \\(\\), global land use change (\\(LUC(t)\\)) (note calculation currently include fire, another important land C source): \\[ F_{L}(t) = \\sum_{=1}^{n} \\left( NPP_i(t) - RH_i(t) \\right) - LUC(t) \\] NPP calculated product user-specified pre-industrial value (\\(NPP_0\\), default 56.2 Pg C/year), CO2 fertilization multiplier (\\(f(C_{atm}, \\beta)\\)), effect land use change (LUC) vegetation carbon stocks: \\[ NPP_i(t) = NPP_{0,} \\times f(C_{atm}, \\beta_i) \\times f(LUC_{v}) \\] CO2 fertilization multiplier function current atmospheric CO2 concentration (\\(C_{atm}\\)), initial (“pre-industrial”) CO2 concentration (\\(C_0\\)), biome-specific CO2 fertilization parameter \\(\\beta_i\\) (default = 0.36): \\[ f(C_{atm}, \\beta_i) = 1 + \\beta_i \\left( \\log(\\frac{C_{atm}}{C_0})\\right) \\] LUC multiplier accounts effect vegetation losses gains NPP (although recognize LUC always result ‘lost’ NPP); behavior new Hector v3. computed fraction based preindustrial (end--spinup) vegetation carbon (\\(C_{v}\\)) running sum LUC-driven losses – gains – vegetation: \\[ f(LUC_{v}) = \\frac{C_{0v} - \\sum LUC_{veg}}{C_{0v}} \\] Heterotrophic respiration occurs soil (\\(RH_s(t)\\)) detritus (\\(RH_d(t))\\)) function biome-specific atmospheric temperature anomaly (\\(T_i\\), calculated global atmospheric temperature anomaly scaled biome-specific warming factor \\(\\delta\\)) size current soil detritus C pools (\\(C_s\\) \\(C_d\\), respectively). \\[ T_i(t) = \\delta \\, T_G(t) \\] \\[ RH_s = \\frac{1}{50} C_s Q_{10}^{T_{}(t) / 10}\\] \\[ RH_d = \\frac{1}{4} C_d Q_{10}^{T_{}(t) / 10}\\] Note residence times soil detritus C pools – 50 4 years, respectively – currently hard-coded values Hector. Fluxes associated land use change (\\(LUC\\)) prescribed via luc_emissions variable INI file. Example time series associated shared socioeconomic pathways (SSPs) included Hector corresponding inst/input/tables/ssp**_emiss-constraints_rf.csv files. two LUC fluxes, land uptake loss, add remove carbon land pools proportion pools’ size. (behavior new version 3 model.) Note cumulative \\(LUC_{v}\\), LUC effects vegetation, affects NPP documented . biome time step, vegetation pools change follows (biome, \\(\\) time, \\(t\\) subscripts omitted clarity): C gain NPP distributed vegetation, detritus, soil according fraction parameters \\(f_{nv}\\), \\(f_{nd}\\), \\(f_{ns}\\), respectively. Similarly, pool bears fraction total C loss land-use change (\\(F_{LC}\\)), according fractions \\(f_{lv}\\), \\(f_{ld}\\), \\(f_{ls}\\). detritus soil pools also lose C via heterotrophic respiration (\\(RH_d\\) \\(RH_s\\), respectively). Finally, fixed fraction vegetation C transferred detritus litterfall (\\(f_{vd}\\)), fraction vegetation (\\(f_{vs}\\)) detritus (\\(f_{ds}\\)) C transferred soil. \\[ \\frac{dC_v}{dt} = NPP\\, f_{nv} - C_v (f_{vd} + f_{vs}) - F_{LC} f_{lv} \\] \\[ \\frac{dC_d}{dt} = NPP\\, f_{nd} + C_v f_{vd} - C_d f_{ds} - RH_d - F_{LC} f_{ld} \\] \\[ \\frac{dC_s}{dt} = NPP\\, f_{ns} + C_v f_{vs} - C_d f_{ds} - RH_s - F_{LC} f_{ls} \\] Anthropogenic changes earth system driven fossil fuel industrial emissions (FFI) well , scenarios, direct air carbon capture storage (DACCS). fluxes occur , , ‘earth’ pool used mass-balance checks: \\[ \\frac{dC_{earth}}{dt} = DACCS - FFI\\] Finally, atmosphere changes result fluxes : anthropogenic emissions uptake; land use change emissions uptake; fluxes ocean; heterotrophic respiration net primary production. \\[ \\frac{dC_{atm}}{dt} = FFI - DACCS + LUC_{e} - LUC_{u} + O_{} - O_{u} + RH - NPP \\] entire terrestrial C cycle summarized following diagram: Summary terrestrial C cycle Hector. full Hector C cycle also includes ocean “Earth” C pools exchange C atmosphere, omitted clarity.","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"implementation","dir":"Articles","previous_headings":"","what":"Implementation","title":"Terrestrial C cycle","text":"state global C cycle Hector defined length 6 vector c, describes amount C (Pg C) atmosphere (0), vegetation (1), detritus (2), soil (3), ocean (4), “Earth” (5) current time step. Hector time step, c solved CarbonCycleSolver::run() function (defined src/carbon-cycle-solver.cpp) following general steps: Retrieve current estimates various pools variables defined C cycle model assign relevant parts c (getCValues). Integrate beginning time step using updated slow parameters (slowparameval). Solve ordinary differential equations associated C cycle model based time derivatives (defined calcderivs). Re-calculate C cycle model internal variables based solved values c (stashCValues). Record model state (record_state). steps described detail . complete code terrestrial C cycle lives src/simpleNbox.cpp file (associated headers inst/include/simpleNbox.hpp).","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"setting-the-c-vector-getcvalues","dir":"Articles","previous_headings":"","what":"Setting the c vector (getCValues)","title":"Terrestrial C cycle","text":"function sets values c vector corresponding state variables C cycle model. atmospheric C pool current time step defined atmos_co2, always scalar unit quantity (CO2 assumed well-mixed atmosphere). Vegetation, detritus, soil pools current time step stored veg_c, detritus_c, soil_c, respectively. vector quantities (“stringmaps”), one value biome (default biome name “global”), value stored corresponding slot c sum across biomes. ocean C pool retrieved call current ocean model’s getCValues function. (NOTE: means simpleNBox model depends existence ocean C cycle model.) Finally, “Earth” C pool stored earth_c, also scalar unit quantity. variables units Pg C.","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"slow-parameter-evaluation-slowparameval","dir":"Articles","previous_headings":"","what":"Slow parameter evaluation (slowparameval)","title":"Terrestrial C cycle","text":"Perform ocean C model’s slow parameter evaluation (omodel->slowparameval) Calculate CO2 fertilization effect biome (co2fert[biome]) using function calc_co2fert …unless spin-phase, case assume effect (co2fert = 1) Calculate temperature effect respiration detritus (tempfertd) soil (tempferts). Note soil warming “sticky” – can increase, decline (even temperature declines time steps) Note also detritus warming based actual current biome temperature, soil warming based 200-year running mean Note effect parameters calculated yet applied. applied actual NPP RH estimates ODE solving loop.","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"c-cycle-derivatives-calcderivs","dir":"Articles","previous_headings":"","what":"C cycle derivatives (calcderivs)","title":"Terrestrial C cycle","text":"Calculate NPP biome (npp function) Partition NPP C gain vegetation, detritus, soil pools according fractions Calculate RH detritus soil Partition C losses RH according fractions Calculate partition litter flux Store changes pools dcdt vector (structure c)","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"storing-the-results-stashcvalues","dir":"Articles","previous_headings":"","what":"Storing the results (stashCValues)","title":"Terrestrial C cycle","text":"Reset atmospheric CO2 state variable (atmos_co2) current value c Calculate difference vegetation, detritus, soil C calculated ODE solver (.e. c) stored current state variables (veg_c, detritus_c, soil_c). Store differences veg_delta, det_delta, soil_delta. Calculate total GPP across biomes (npp_rh_total = sum_npp() + sum_rh()) Calculate biome’s weight (wt[biome] = (npp(biome) + rh(biome)) / npp_rh_total) Add corresponding difference multiplied weight biome’s current pool (e.g. veg_c[biome] = veg_c[biome] + veg_delta * wt[biome]) NOTE: workaround. future, Hector use ODE solver separately solve boxes multi-biome system. Stash ocean C pools using omodel->stashCValues function Stash Earth C pool (earth_c) NOTE: check skipped first time function evaluated, point masstot initialized calculated sum. Hector running atmospheric CO2 constraint, re-calculate atmospheric CO2 pool match constraint move residual C /deep ocean pool.","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"recording-the-state-record_state","dir":"Articles","previous_headings":"","what":"Recording the state (record_state)","title":"Terrestrial C cycle","text":"just sets time-series versions C cycle state variables (e.g. atmos_c_ts, veg_c_tv, detritus_c_tv, tempfertd_tv) corresponding state variables current time step (e.g. atmos_c, veg_c, detritus_c, tempfertd).","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"simplenbox-setdata","dir":"Articles","previous_headings":"","what":"Setting (setData) and retrieving (getData) values","title":"Terrestrial C cycle","text":"following values related terrestrial C cycle can set via setData.","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"other-routines","dir":"Articles","previous_headings":"","what":"Other routines","title":"Terrestrial C cycle","text":"co2fert (CO2 fertilization multiplier) – 1.0 warmingfactor (biome warming multiplier relative global average) – 1.0 residual (difference modeled atmospheric CO2 constraint) – 0 tempfertd, tempferts (Q10 warming effects detritus soil respiration, respectively) – 1.0 Add \"global\" biome list Register C cycle model capabilities, dependencies, inputs Set values current-time state variables (e.g. atmos_co2, veg_c, tempfertd) time-series values time time (e.g. atmos_c_ts.get(time), veg_c_tv.get(time), tempfertd_tv.get(time)) Re-calculate CO2 fertilization effect biome (co2fert). spinup, force 1.0. “Truncate” time series variables current time; .e. erase values time Set tcurrent time pools fluxes (biome) must greater equal 0 Partitioning fraction parameters (e.g. f_nppv, f_litterd) must 0 1, must sum 1 Check biome-specific pools, fluxes, parameters data biomes. (optional biome-specific parameter warmingfactor, set 1.0 missing). Also check biome-specific CO2 fertilization (beta) Q10 (q10_rh) parameters valid. albedo forcing data provided, set value MAGICC default -0.2 Initialize atmospheric CO2 concentration (CO2_concentrations, ppm) C pool (atmos_co2, PgC) user-specified initial value (C0; converted accordingly PgC CO2_concentrations) Run checks sanitychecks()","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"coding-style","dir":"Articles","previous_headings":"C++ Hector Code Base","what":"Coding style:","title":"Style guide","text":"New C++ code follow LLVL coding standards Hector codebase periodically reformatted using clang-format. example, assuming working directory repository root: general principles: basic file intro top every file (see existing examples) line dashes separating functions use ‘const’ possible: functions, parameters, variables methods start assertions inputs try use C++ STL Boost data structures functions (instead rolling )","code":"# First, if needed: brew install clang-format # Important note: we do NOT want to touch `src/rcpp_constants.cpp` pr `src/rcpp_hector.cpp` find src/ -name \"*.c*\" | grep -v rcpp_constants | clang-format -i clang-format -i inst/include/*.h*"},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"unit-testing","dir":"Articles","previous_headings":"C++ Hector Code Base","what":"Unit testing:","title":"Style guide","text":"writing test case part writing code every method least one test possible every class/subunit dedicated test group","code":""},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"expected-documentation","dir":"Articles","previous_headings":"C++ Hector Code Base","what":"Expected documentation:","title":"Style guide","text":"\\brief (always) \\param[] () \\param[] () \\returns (returns value) \\exception (throws assertions) trivial vars Doxygen comments headers comments generally say ","code":""},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"r-hector-code-base","dir":"Articles","previous_headings":"","what":"R Hector Code Base","title":"Style guide","text":"R code generated Rcpp code; edit files hand. files start : make changes files, find corresponding .cpp file make changes .","code":"# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: Numbers-Letters-Token"},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"coding-style-1","dir":"Articles","previous_headings":"R Hector Code Base","what":"Coding style:","title":"Style guide","text":"follows R package format style guidelines R CMD checks pass CRAN checks follows R style guide R code pass lintr::lint_package() (run one package tests)","code":""},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"expected-documentation-1","dir":"Articles","previous_headings":"R Hector Code Base","what":"Expected documentation:","title":"Style guide","text":"@param describe every function argument @return description object returned function clear concise inline comments describe code add vignette article appropriate","code":""},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"unit-testing-1","dir":"Articles","previous_headings":"R Hector Code Base","what":"Unit testing:","title":"Style guide","text":"add R package unit tests unit tests quick use minimal (needed) package data","code":""},{"path":"https://jgcri.github.io/hector/articles/TimeSeries.html","id":"how-to-add-a-new-tseries","dir":"Articles","previous_headings":"","what":"How to add a new tseries","title":"Time series (`tseries`) variables","text":"Steps creating new tseries variable within Hector C++ codebase follows. example adding tseries variable called NewVar_ts example variable added called","code":""},{"path":"https://jgcri.github.io/hector/articles/TimeSeries.html","id":"add-to-x_component-hpp","dir":"Articles","previous_headings":"How to add a new tseries","what":"1. Add to X_component.hpp:","title":"Time series (`tseries`) variables","text":"Add tseries appropriate hpp file example within dummy_model_component.hpp file.","code":"tseries NewVar_ts"},{"path":"https://jgcri.github.io/hector/articles/TimeSeries.html","id":"add-to-component_names-hpp","dir":"Articles","previous_headings":"How to add a new tseries","what":"2. Add to component_names.hpp","title":"Time series (`tseries`) variables","text":"Add string variable name component_names.hpp message passed components. string message names start prefix D_.","code":"#define D_NEWVAR \"example variable\""},{"path":"https://jgcri.github.io/hector/articles/TimeSeries.html","id":"changes-to-to-x_component-cpp","dir":"Articles","previous_headings":"How to add a new tseries","what":"3. Changes to to X_component.cpp:","title":"Time series (`tseries`) variables","text":"Add tseries init constructor, setData, getData sections cpp file. DummyModelComponent::init DummyModelComponent::constructor: DummyModelComponent::setData: U_unitval value listed unitval.hpp, adding new variable section reads data component. DummyModelComponent::getData: Adding new variable getData section lets values passed Hector components. setting new variable, see AddNewVariable DummyModelComponent::run: Set variable tseries order – (runToDate, unitval) order print log file:","code":"Allow for interpolation NewVar_ts.allowInterp(true); if( varName == D_NEWVAR ) { H_ASSERT( data.date != Core::undefinedIndex(), \"date required\" ); NewVar_ts.set( data.date, unitval::parse_unitval( data.value_str, data.units_str, U_unitval ) ); if( varName == D_NEWVAR ) { H_ASSERT( date != Core::undefinedIndex(), \"Date required for variable name\" ); returnval = NewVar_ts.get( date ); NewVar_ts.set( runToDate, unitval( previous_x + dx, U_unitval ) ); H_LOG( logger, Logger::DEBUG ) << \"Year \" << runToDate << \" variable = \" << NewVar_ts.get( runToDate ) << std::endl;"},{"path":"https://jgcri.github.io/hector/articles/TimeSeries.html","id":"pass-to-other-components","dir":"Articles","previous_headings":"How to add a new tseries","what":"4. Pass to other components","title":"Time series (`tseries`) variables","text":"another component needs variable add appropriate hpp cpp files. example lets say X_component needs new variable X_component.hpp file add X::run: X_component.cpp add","code":"unitval NewVar; NewVar = core->sendMessage( M_GETDATA, D_NEWVAR, message_data( runToDate ) ).value( U_unitval);"},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"creating-a-variable-with-associated-unit","dir":"Articles","previous_headings":"","what":"Creating a variable with associated unit","title":"Units values (`unitvals` and `fluxpools`)","text":"Two ways create unitval:","code":"unitval x(1, U_PGC); # x now holds 1 petagram of carbon unitval y; y.set(2, U_CO2_PPMV);"},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"doing-math","dir":"Articles","previous_headings":"","what":"Doing math","title":"Units values (`unitvals` and `fluxpools`)","text":"unitval class supports basic mathematical operations.","code":"# assume that y and z are already defined unitvals unitval x = y + z; # y and z must have identical units or an error is thrown unitval x = y * 2.0; # multiplying by a constant always works"},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"extracting-a-unitval-value","dir":"Articles","previous_headings":"","what":"Extracting a unitval value","title":"Units values (`unitvals` and `fluxpools`)","text":"Internally within components, often simply want work numbers, extracting unitval objects. straightforward, first ‘prove’ know correct units: core throw error get results y wrong.","code":"double x = y.value(U_PGC); # we assert that y's units are petagrams C"},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"when-is-unitval-required","dir":"Articles","previous_headings":"","what":"When is unitval required?","title":"Units values (`unitvals` and `fluxpools`)","text":"Using unitvals within component optional, ’s required passing data components. falls three categories: Querying core data. Read Hector’s internal data passing. Responding query data. Output. Read Hector’s output visitors.","code":""},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"fluxpool-values","dir":"Articles","previous_headings":"","what":"Fluxpool values","title":"Units values (`unitvals` and `fluxpools`)","text":"Hector v3 introduces new internal unit class: fluxpool, subclass unitval defined inst/include/fluxpool.hpp. class imposes restriction: values may zero positive, negative value, operation results negative value, throws error. used carbon fluxes pools may negative; pools hopefully obvious, fluxes think possibly ‘negative’ (e.g., net biome production) fact difference two nominally positive fluxes. Currently fluxpools may passed model components. Finally, fluxpool class carbon tracking implemented; see relevant exmaple.","code":""},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"missing-values","dir":"Articles","previous_headings":"","what":"Missing values","title":"Units values (`unitvals` and `fluxpools`)","text":"Briefly, need return missing value, use MISSING_FLOAT macro defined inst/include/unitval.hpp. macro return NA_REAL (Rcpp) Hector compiled R package (technically, USE_RCPP macro defined) NAN (std) otherwise. complexity? R (, extension, Rcpp) distinguishes two kinds “placeholder” numeric values: missing value (NA_real_ R; often abbreviated NA) represents unobserved value; instance, take annual observations 1990 2000 failed make measurement 1996. hand, number (NaN) represents result invalid mathematical operation, taking square root negative number. values propagate calculations involved, R C++, can detected removed R’s .na() similar functions. (Note R function .nan() can used check specifically NaN values – .nan(NaN) => TRUE, .nan(NA) => FALSE). However, mean fundamentally different things (suggest different errors), try preserve distinction can. See also notes hector units","code":""},{"path":"https://jgcri.github.io/hector/articles/addnewforcer.html","id":"objective","dir":"Articles","previous_headings":"","what":"Objective","title":"Adding a new forcer to Hector","text":"notes add new species affect Hector’s radiative forcing budget order answer question “much impact newly discovered forcer X .” notes : Option 1: add estimated radiative forcing values miscellaneous radiative forcing variable Option 2: add new component Hector pass appropriate information Hector’s forcing components","code":""},{"path":"https://jgcri.github.io/hector/articles/addnewforcer.html","id":"option-1","dir":"Articles","previous_headings":"","what":"Option 1","title":"Adding a new forcer to Hector","text":"Use Hector’s miscellaneous radiative forcing variable read additional radiative forcing values. approach requires little coding experience require users radiative forcing values readily available. Users can read new radiative forcing values via ini file Fmisc variable. Fmisc column Hector csv input tables named something like ssp434_emiss-constraints_rf.csv. Depending user configuration, Fmisc may numeric values equal zeros. Fmisc non-zero, user add new values existing values. Alternatively, using Hector R package, users can read miscellaneous forcing Hector core RF_MISC() setvar() function.","code":""},{"path":"https://jgcri.github.io/hector/articles/addnewforcer.html","id":"option-2","dir":"Articles","previous_headings":"","what":"Option 2","title":"Adding a new forcer to Hector","text":"Add new forcer Hector; require changes C++ code base. Create new Hector component: use existing model component dummy_model_component.hpp dummy_model_component.cpp files template. Within new component, add new variables appropriate. Use component read emissions. forcer added GHG, use appropriate method convert emissions concentrations expose concentrations (via getData) may passed Hector components. new model component cpp file return new emissions concentrations (whichever one appropriate). Next, modify forcing_compoent.cpp. Add equation converts emissions concentration time series radiative forcing values. new values added forcing map (“forcings”, see N2O RF set example) new values incorporated total radiative forcing calculation. Lastly, make sure update rcpp_constants.cpp new variables can accessed via R interface (see new variables).","code":""},{"path":"https://jgcri.github.io/hector/articles/climate.html","id":"science","dir":"Articles","previous_headings":"","what":"Science","title":"Hector's Climate","text":"Hector open source, object-oriented, simple global climate carbon-cycle model. Greenhouse gases (GHGs) aerosols emitted atmosphere, GHGs accumulate. GHG concentrations aerosol emissions impact Earth’s radiative forcing budget. Hector’s temperature component (based DOECLIM1, diffusion ocean-energy balance) uses total radiative forcing calculate mean global air temperature sea-surface land-surface temperature anomalies. Hector returns global mean air surface temperate (GMAT), land surface temperature, ocean surface temperature can used calculate global mean surface temperature (see details). DOECLIM simulates different rates warming land ocean surfaces global mean surface temperature, meaning land-ocean warming ratio emergent property Hector. However, users option provide land-ocean warming ratio used place DOECLIM’s internal calculations (see example details feature).","code":""},{"path":"https://jgcri.github.io/hector/articles/climate.html","id":"implementation","dir":"Articles","previous_headings":"","what":"Implementation","title":"Hector's Climate","text":"Emissions read Hector Hector components prepared passed forcing_component. example, black carbon (BC) emissions read Hector bc_component whereas methane emissions read ch4_component. aerosol components (bc_component,oc_component, so2_component, nh3_component) can directly pass emissions forcing_component whereas GHG emissions methane must first converted concentrations. Effective radiative forcing GHG concentration aerosol calculated based IPCC AR62. Additional sources radiative forcing changes land albedo volcanoes added together determine total change radiative forcing within forcing_component. forcing_component passes total radiative forcing temperature_component DOECLIM3, diffusion ocean-energy balance model, determines change Earth’s radiative forcing budget manifests changes mean global air temperature sea-surface land-surface temperature anomalies. Important note: atmospheric CO2, carbon cycle must solved Hector able calculate radiative forcing CO2 temperature effects CO2 lagged time.","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_GMAT-GMST.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Example: Calculating GMST from GMAT in Hector","text":"global mean surface temperature (GMST) average air temperature 2 meters Earth’s surface temperature surface ocean. 1 useful metric observing global temperature changes. Although changes GMST relatively small terms numbers, takes great deal heat warm entire planet even fraction degree. Measurements temperature changes provide evidence anthropogenic climate change. GMST global mean air temperature (GMAT) reported Hector outputs. GMAT air temperature measured 2 meters ground presented daily weather report.2 vignette demonstrates set calculate GMST compares two temperature results. (Note Hector assumes land air temperature land surface temperature equivalent.3)","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_GMAT-GMST.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Example: Calculating GMST from GMAT in Hector","text":"Let’s load packages need run scenario.","code":"library(hector) library(ggplot2) inifile <- file.path(system.file(\"input\", package = \"hector\"), \"hector_ssp245.ini\") core <- newcore(inifile) invisible(run(core))"},{"path":"https://jgcri.github.io/hector/articles/ex_GMAT-GMST.html","id":"find-gmst","dir":"Articles","previous_headings":"","what":"Find GMST","title":"Example: Calculating GMST from GMAT in Hector","text":"GMST can calculated Hector outputs computing weighted sum land air ocean surface temperatures using following equation: $ = ( * ) + ( * (1 - )) $ Hector, land air temperature represented land_tas (LAND_TAS()) ocean surface temperature represented sst (SST()). components stem variable tas (GLOBAL_TAS()), Hector stores GMAT. Note reason variable represented two different ways due interaction R interface underlying C++ model. example, LAND_TAS() function R returns string message land_tas, passed base C++ Hector model. method user-friendly spelling/capitalization issue developer-friendly string C++ can changed without changing R user interface.","code":"flnd <- 0.29 # fractional land area, a constant in Hector hector_output <- fetchvars(core, 1745:2300, vars = c(LAND_TAS(), SST(), GLOBAL_TAS())) # Get the variables we want and corresponding years/value output <- subset(hector_output, variable %in% c(LAND_TAS(), SST())) output <- subset(output, select = c(year, variable, value)) # Reorder and clean up data output <- reshape(output, direction = \"wide\", idvar = \"year\", timevar = \"variable\") names(output) <- gsub(\"value.\", \"\", names(output)) # Conversion equation output$GMST <- with(output, (land_tas * flnd + sst * (1 - flnd))) global_surface_temp <- subset(output, select = c(year, GMST)) # Organize final data, year and corresponding GMST names(global_surface_temp)[names(global_surface_temp) == \"output$year\"] <- \"year\" names(global_surface_temp)[names(global_surface_temp) == \"GMST\"] <- \"value\" variable <- rep(\"GMST\", times = 556) variable <- as.data.frame(variable) global_surface_temp <- cbind(global_surface_temp, variable) # Rename Hector's variable for GMAT global_air_temp <- subset(hector_output, variable == GLOBAL_TAS()) global_air_temp <- subset(global_air_temp, select = c(variable, year, value)) global_air_temp$variable <- \"GMAT\""},{"path":"https://jgcri.github.io/hector/articles/ex_GMAT-GMST.html","id":"plot-results","dir":"Articles","previous_headings":"","what":"Plot results","title":"Example: Calculating GMST from GMAT in Hector","text":"following plot shows GMST GMAT time. see 2000, GMAT begins increase quickly GMST. 2300, significant gap two; GMAT higher GMST GMAT responding quickly anthropogenic forcing. makes sense GMST accounts heating ocean surface warms slowly atmosphere. , highlight gap two temperatures, can plot difference.","code":"data <- rbind(global_surface_temp, global_air_temp) ggplot(data) + geom_line(aes(year, value, color = variable)) + theme_bw() + labs(y = expression(degree ~ \"C\"), title = \"Comparison of Hector GMST and GMAT\") GMST_d <- subset(data, variable == \"GMST\") GMAT_d <- subset(data, variable == \"GMAT\") GMAT_d$variable <- \"GMAT - GMST\" GMAT_d$value <- GMAT_d$value - GMST_d$value ggplot(GMAT_d) + geom_line(aes(year, value, color = variable)) + theme_bw() + labs(y = expression(degree ~ \"C\"), title = \"Differences in temperature over time\")"},{"path":"https://jgcri.github.io/hector/articles/ex_GMAT-GMST.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Example: Calculating GMST from GMAT in Hector","text":"GMST allows measuring global temperature fluctuations used report global warming trends. Hector directly return GMST output, straightforward calculate metric using land ocean surface temperatures. Remember shut core.","code":"shutdown(core) ## Hector core (INACTIVE)"},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Carbon tracking with Hector","text":"vignette walk Hector’s carbon tracking feature show turn tracking, retrieve tracking data, display results. Additionally, vignette demonstrates application carbon tracking feature shows calculate model’s airborne fraction. Hector’s carbon tracking feature helps trace movement carbon various pools model runs. user-chosen start date, pool deemed composed 100% carbon , .e. moment time deep ocean pool 100% composed carbon deep pool. model moves forward time start date, Hector tracks pool’s fractional composition – .e. sources current carbon. run finished, data can read R analyzed.","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Carbon tracking with Hector","text":"First, let’s load packages need.","code":"library(hector) library(ggplot2)"},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"carbon-tracking","dir":"Articles","previous_headings":"","what":"Carbon tracking","title":"Carbon tracking with Hector","text":"Now, read INI file create new core. example, use SSP245. order use carbon tracking feature, must use setvar fetchvars. 1 First, let’s look trackingDate prior setting value. returns variable trackingDate value 9999. default value turn carbon tracking (model never reaches year 9999). Now, set trackingDate, check worked, run core. Let’s begin tracking 1750. date, model mark carbon pools originating pool: atmosphere 100% ‘atmosphere-origin’ C, soil 100% ‘soil-origin’ C, etc. point, model run. retrieve carbon tracking data, use get_tracking_data() function. returns data frame gives current state pool, fractions carbon sourced , model time point trackingDate. tdata dataset now contains information year (note first year start-tracking date asked ), model component, name pool within component, amount carbon pool, fraction (0-1) source pool. Importantly, source fractions given pool year always sum 1. Side note: names carbon tracking data (pool_name, pool_value, pool_units) differ used model’s standard stream output (variable, value, units respectively). contrast, year component named identically two output datasets.","code":"inifile <- file.path(system.file(\"input\", package = \"hector\"), \"hector_ssp245.ini\") core <- newcore(inifile) fetchvars(core, NA, TRACKING_DATE()) ## scenario year variable value units ## 1 Unnamed Hector core NA trackingDate 9999 (unitless) setvar(core, NA, TRACKING_DATE(), 1750, \"(unitless)\") fetchvars(core, NA, TRACKING_DATE()) ## scenario year variable value units ## 1 Unnamed Hector core NA trackingDate 1750 (unitless) invisible(reset(core)) run(core) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 2300 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini tdata <- get_tracking_data(core) head(tdata) ## year component pool_name pool_value pool_units source_name source_fraction ## 1 1750 ocean HL 150.050 Pg C atmos_co2 0.00390956 ## 2 1750 ocean HL 150.050 Pg C HL 0.58577800 ## 3 1750 ocean HL 150.050 Pg C intermediate 0.16750400 ## 4 1750 ocean HL 150.050 Pg C LL 0.24280900 ## 5 1750 ocean LL 837.628 Pg C atmos_co2 0.00000000 ## 6 1750 ocean LL 837.628 Pg C LL 0.91883400"},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"results","dir":"Articles","previous_headings":"","what":"Results","title":"Carbon tracking with Hector","text":"using ggplot, can create time series graphs origin one carbon pools model changes time. Let’s take look graphs. Note earth_c pool always 100% earth_c: inflows pool SSP245 (contrast, SSP19 direct-air carbon capture storage, earth_c pool origins change). see around 1800, human emissions (earth_c) begin appear pools atmos_co2 soil_c_global. 1900-2000, human emissions take become major sources 2100. Let’s examine just one pool: allows us better examine contributions source atmosphere.","code":"ggplot(tdata, aes(year, source_fraction, fill = source_name)) + geom_area() + facet_wrap(~pool_name) + theme(axis.text = element_text(size = 7)) + labs(x = \"Year\", y = \"Source Fraction\", title = \"Source Percentage Change Over Time\") atmos <- subset(tdata, pool_name == \"atmos_co2\") ggplot(atmos, aes(year, source_fraction, fill = source_name)) + geom_area() + facet_wrap(~pool_name) + labs(x = \"Year\", y = \"Source Fraction\", title = \"Source Percentage Change Over Time - Atmosphere\")"},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"example-airborne-fraction-calculation","dir":"Articles","previous_headings":"","what":"Example: Airborne fraction calculation","title":"Carbon tracking with Hector","text":"can also use tracking feature calculate airborne fraction given point time, much carbon emitted humans remains atmosphere fraction total emissions opposed absorbed land ocean. First, can define two functions. first run core turn tracking return data frame results, including column source amount pool (opposed source fraction). second function perform airborne fraction calculation finding amount earth_c (human emissions) atmos_co2 (atmosphere) pool start end date run dividing difference difference earth_c pool start run end, .e. much carbon left earth_c pool. Next, run functions SSP245 scenario 1750 2050 tracking beginning start run. can find value airborne fraction year model run. Let’s look airborne fraction changes time 1950 2020 ten year increments well value just year 2020. see airborne fraction 2020 -89%. words, -89% anthropogenic emissions remain atmosphere. can compare values study published W. Knorr 2009.2 Knorr computes seven values airborne fractions 2000 can average. can compute difference maximum value minimum give error range. airborne fraction found Hector towards lower end range values found Knorr 2009, varied 45% - 52%. However, see airborne fraction value Hector remains relatively constant time around 40%. aligns Knorr’s conclusion airborne fraction shows clear trend increasing decreasing. Additionally, Hector’s value falls within range CMIP models, seen Jones et al. 2013.3","code":"tracking_results <- function(inifile, start, stop, tracking, scenarioName) { # Establish core, turn on tracking, run core core <- newcore(inifile) setvar(core, NA, TRACKING_DATE(), tracking, \"(unitless)\") reset(core) run(core) # Get results, filter by correct years, add columns containing the amount # of carbon by source and the given scenario name results <- get_tracking_data(core) results <- subset(results, results$year >= start & results$year <= stop) results$source_amount <- results$source_fraction * results$pool_value results$scenario_name <- scenarioName return(results) } AF_calc <- function(start, results, stop) { # Isolate the atmos_co2 pool and earth_c source in start/end years atm_c <- subset(results, results$pool_name == \"atmos_co2\") atm_c <- subset(atm_c, atm_c$source_name == \"earth_c\") atm_c1 <- subset(atm_c, atm_c$year == start) atm_c2 <- subset(atm_c, atm_c$year == stop) atm_c <- rbind(atm_c1, atm_c2) # Calculate atmospheric uptake of Earth carbon atm_c <- tail(atm_c$source_amount, n = 1) - head(atm_c$source_amount, n = 1) # Isolate earth_c pool and source in start/end years earth_c_loss <- subset(results, results$pool_name == \"earth_c\" & results$source_name == \"earth_c\" & results$year %in% c(start, stop)) # Calculate change in Earth carbon earth_c_loss <- head(earth_c_loss$source_amount, n = 1) - tail(earth_c_loss$source_amount, n = 1) # Airborne fraction calculation AF <- atm_c / earth_c_loss return(AF) } ssp245 <- system.file(\"input\", \"hector_ssp245.ini\", package = \"hector\") results <- tracking_results(ssp245, 1750, 2050, 1750, \"SSP245\") years <- seq(1950, 2020, by = 10) airborne_frac <- cbind(make.row.names = years, lapply(years, AF_calc, results, 1750)) colnames(airborne_frac) <- c(\"year\", \"AF\") tail(airborne_frac, n = 1) ## year AF ## [8,] 2020 -0.893688 # Knorr avg - values from Knorr 2009 knorr_values <- c(0.45, 0.453, 0.518, 0.468, 0.468, 0.514, 0.449) knorr_avg <- mean(knorr_values) knorr_minmax <- max(knorr_values) - min(knorr_values) vars <- c(\"Knorr avg\", years) values <- c(knorr_avg, as.numeric(airborne_frac[, 2])) error <- c(knorr_minmax, rep(0, times = 8)) df <- data.frame(vars, values, error) ggplot(df) + aes(x = vars, y = values, fill = vars) + geom_bar(stat = \"identity\") + geom_errorbar(aes(ymin = values - error, ymax = values + error), width = 0.2) + scale_fill_manual(values = c(\"paleturquoise3\", \"paleturquoise2\", \"paleturquoise1\", \"darkslategray1\", \"darkslategray2\", \"darkslategray3\", \"darkslategray4\", \"darkslategray\", \"grey50\")) + theme(legend.position = \"none\") + labs(x = \"Year\", y = \"Airborne fraction over time\", title = \"Airborne Fraction Composition\")"},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Carbon tracking with Hector","text":"carbon tracking feature allows users identify trace composition source pool Hector. useful , example, calculate model’s airborne fraction. Remember shut core.","code":"invisible(shutdown(core))"},{"path":"https://jgcri.github.io/hector/articles/ex_hector_apply.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Solving for an emissions pathway","text":"tutorial shows use Hector climate model R answer simple science question. case, ’ll looking solving methane emissions required time produce constant atmospheric methane concentration 2000 2100. run experiment, need nleqslv package installed. package used generate successive guesses search emissions pathway produces target concentration.","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_hector_apply.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Solving for an emissions pathway","text":"nleqslv package requires us supply function takes vector inputs (.e., emissions year) produces vector outputs discrepancies Hector output target concentrations. order create function, need set interface Hector. Since calculations going involve years 2000 beyond, run 1999. target function take vector emission values input return vector discrepancies Hector outputs target output. ’ll make target concentration value 1820 ppbv CH\\(_4\\) (bit higher year 2000 value baseline scenario).","code":"library(ggplot2) library(hector) hector_inifile <- file.path(system.file(\"input\", package = \"hector\"), \"hector_ssp245.ini\") hcore <- newcore(hector_inifile, suppresslogging = TRUE) run(hcore, 1999) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 1999 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini f <- function(emiss) { setvar(hcore, 2000:2100, EMISSIONS_CH4(), emiss, \"Tg CH4\") reset(hcore, 1999) run(hcore, 2100) hout <- fetchvars(hcore, 2000:2100, CONCENTRATIONS_CH4()) ## return the difference between the target of 1820 (constant) and the actual hout$value - 1820 }"},{"path":"https://jgcri.github.io/hector/articles/ex_hector_apply.html","id":"solve-for-the-target-emissions","dir":"Articles","previous_headings":"","what":"Solve for the target emissions","title":"Solving for an emissions pathway","text":"solve target emissions just pass target function nleqslv. also need initial guess emissions. doesn’t really matter guess , long isn’t something large cause model fail outright. use constant 300 Tg CH\\(_4\\) initial guess. check see algorithm really converged. discrepancy values last iteration stored fvec entry.","code":"x <- rep(300.0, times = 101) # 2000:2001 includes both endpoints slv <- nleqslv::nleqslv(x, f, method = \"Broyden\") max(abs(slv$fvec)) ## [1] 5.137281e-08"},{"path":"https://jgcri.github.io/hector/articles/ex_hector_apply.html","id":"results","dir":"Articles","previous_headings":"","what":"Results","title":"Solving for an emissions pathway","text":"convergence looks okay, let’s plot results: concentration target 1820 ppbv CH\\(_4\\) specified 2000 bit jump scenario based run (original 1811 ppbv), small spike emissions 2000. , emissions settle something smoother. ’re done Hector instance, need make sure shut , memory using freed.","code":"df <- data.frame(year = 2000:2100, value = slv[[\"x\"]]) ggplot(data = df, aes(year, value)) + geom_point() + labs(x = \"year\", y = \"Emissions (Tg CH4)\") shutdown(hcore) ## Hector core (INACTIVE)"},{"path":"https://jgcri.github.io/hector/articles/ex_hector_apply.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Solving for an emissions pathway","text":"simple example shows kind thing can combining Hector R interface packages available R. easy enough add emissions gasses work terms forcing temperature. Likewise, instead solving equilibrium minimize maximize function emissions (using optim function), run one many Monte Carlo packages available R.","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Land Ocean Warming","text":"Hector uses DOECLIM1, diffusion ocean-energy balance, calculate mean global air temperature sea-surface land-surface temperature anomalies. DOECLIM can simulate different rates warming land ocean surfaces, meaning land-ocean warming ratio emergent property Hector. However, users also option provide land-ocean warming ratio used place DOECLIM’s internal calculations. enables Hector emulate land-ocean warming dynamics specific Earth System Models. vignette demonstrates providing user-defined land-ocean warming ratio can affect Hector output.","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Land Ocean Warming","text":"","code":"library(ggplot2) library(hector) theme_set(theme_bw(base_size = 14))"},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"run-default-hector","dir":"Articles","previous_headings":"","what":"Run default Hector","title":"Land Ocean Warming","text":"Complete default run Hector, one uses DOECLIM calculate land ocean air temperature.","code":"years_to_keep <- 1850:2100 vars_to_keep <- c(GLOBAL_TAS(), LAND_TAS(), OCEAN_TAS(), CONCENTRATIONS_CO2()) inifile <- file.path(system.file(\"input\", package = \"hector\"), \"hector_ssp245.ini\") core <- newcore(inifile) run(core, max(years_to_keep)) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 2100 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini out1 <- fetchvars(core, years_to_keep, vars_to_keep) out1$scenario <- \"default\" out1$variable <- paste0(gsub(out1$variable, pattern = \"_\", replacement = \" \"), \" (\", out1$units, \")\") ggplot(data = out1) + geom_line(aes(year, value)) + facet_wrap(\"variable\", scales = \"free\") + labs(title = \"Default Hector\", subtitle = \"ssp245\", x = NULL) + theme(axis.text.x = element_text(angle = 90))"},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"run-hector-with-different-land-ocean-warming-ratios","dir":"Articles","previous_headings":"","what":"Run Hector with different land ocean warming ratios","title":"Land Ocean Warming","text":"Start writing function help us set land ocean warming ratio, run Hector, fetch results.","code":"# Helper function that runs a Hector core with a new land-ocean warming ratio. # # Args # hc: an active Hector core # value: the land ocean warming ratio to use # Return: data frame of Hector results run_with_lo <- function(hc, value) { # Set the land ocean warming ratio setvar(hc, NA, LO_WARMING_RATIO(), value, getunits(LO_WARMING_RATIO())) # Reset and run Hector reset(hc) run(hc) # Fetch and format the output out <- fetchvars(hc, years_to_keep, vars_to_keep) out$scenario <- value out$variable <- paste0(gsub(out$variable, pattern = \"_\", replacement = \" \"), \" (\", out$units, \")\") return(out) } # Make a vector of the land ocean warming ratios to test out lo_to_use <- seq(from = 1, to = 2.5, length.out = 20) # Apply our helper function to the various land ocean warming ratio values and # concatenate the results into a single data frame results_list <- lapply(lo_to_use, run_with_lo, hc = core) hector_lo_results <- do.call(results_list, what = \"rbind\")"},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"plot-the-results","dir":"Articles","previous_headings":"","what":"Plot the results","title":"Land Ocean Warming","text":"","code":"ggplot(data = hector_lo_results) + geom_line(aes(year, value, color = scenario, group = scenario)) + facet_wrap(\"variable\", scales = \"free\") + labs(title = \"User provided land-ocean warming ratio\", subtitle = \"ssp245\", x = NULL, y = NULL) + theme(axis.text.x = element_text(angle = 90)) + guides(color = guide_legend(title = \"lo ratio\"))"},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"compare-default-hector-with-user-provided-land-ocean-warming-ratio","dir":"Articles","previous_headings":"","what":"Compare default Hector with user provided land ocean warming ratio","title":"Land Ocean Warming","text":"","code":"last_plot() + geom_line(data = out1, aes(year, value), color = \"orange\", size = 1) ## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0. ## ℹ Please use `linewidth` instead. ## This warning is displayed once every 8 hours. ## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was ## generated."},{"path":"https://jgcri.github.io/hector/articles/ex_multiple-biomes.html","id":"example-1-accelerated-high-latitude-warming","dir":"Articles","previous_headings":"","what":"Example 1: Accelerated high-latitude warming","title":"Running Hector with multiple biomes","text":"Observational modeling studies found high-latitude ecosystems, particularly Northern Hemisphere, warming significantly faster global average. example, explore implications effect Hector. First, let’s run reference case. Now, let’s redo run, accounting accelerated high-latitude warming. , use split_biome() function, takes existing Hector biome splits arbitrary number new biomes, partitioning C pools initializing parameters accordingly. purposes example, let’s assume high latitudes ~10% world’s vegetation detritus carbon ~40% world’s soil carbon, high-latitudes warming 2.5x faster global average. Now, let’s plot results. Hector results vs. without accelerated high-latitude warming. results show accelerated high-latitude warming induces positive global feedback Hector: warmer high-latitudes respire carbon soil detritus faster rate, leads higher CO2 concentrations warming. can look results detail examining biome-specific pools fluxes via optional biome argument Hector’s identifier functions (e.g. VEG_C()). plotting, let’s split variable column components – biome variable.","code":"ssp245 <- system.file(\"input\", \"hector_ssp245.ini\", package = \"hector\") core <- newcore(ssp245, suppresslogging = TRUE) invisible(run(core, 2100)) result_vars <- c(CONCENTRATIONS_CO2(), RF_TOTAL(), GLOBAL_TAS(), VEG_C(), SOIL_C(), DETRITUS_C()) reference_results <- fetchvars(core, 2000:2100, result_vars, scenario = \"reference\") split_biome(core, \"global\", c(\"low-latitude\", \"high-latitude\"), fveg_c = c(0.9, 0.1), fdetritus_c = c(0.9, 0.1), fsoil_c = c(0.6, 0.4), warmingfactor = c(1, 2.5)) invisible(reset(core)) invisible(run(core, 2100)) ## Auto-resetting core to -1 warming_results <- fetchvars(core, 2000:2100, result_vars, scenario = \"warming\") plot_data <- rbind(reference_results, warming_results) plot_data$variable <- factor(plot_data$variable, result_vars) ggplot(plot_data) + aes(x = year, y = value, color = scenario) + geom_line() + facet_wrap(vars(variable), scales = \"free_y\") + theme_bw() warming_details <- fetchvars(core, 2000:2100, c(VEG_C(\"low-latitude\"), VEG_C(\"high-latitude\"), DETRITUS_C(\"low-latitude\"), DETRITUS_C(\"high-latitude\"), SOIL_C(\"low-latitude\"), SOIL_C(\"high-latitude\")), scenario = \"warming\") head(warming_details) ## scenario year variable value units ## 1 warming 2000 low-latitude.veg_c 505.9479 Pg C ## 2 warming 2001 low-latitude.veg_c 506.2329 Pg C ## 3 warming 2002 low-latitude.veg_c 506.5745 Pg C ## 4 warming 2003 low-latitude.veg_c 506.9243 Pg C ## 5 warming 2004 low-latitude.veg_c 507.3095 Pg C ## 6 warming 2005 low-latitude.veg_c 507.6409 Pg C variable_split <- strsplit(warming_details$variable, \".\", fixed = TRUE) warming_details$biome <- factor(vapply(variable_split, \"[[\", character(1), 1), c(\"low-latitude\", \"high-latitude\")) warming_details$variable <- vapply(variable_split, \"[[\", character(1), 2) ggplot(warming_details) + aes(x = year, y = value, color = biome) + geom_line() + facet_wrap(vars(variable), scales = \"free_y\") + theme_bw()"},{"path":"https://jgcri.github.io/hector/articles/ex_multiple-biomes.html","id":"example-2-c3-and-c4-plants","dir":"Articles","previous_headings":"","what":"Example 2: C3 and C4 plants","title":"Running Hector with multiple biomes","text":"can conduct similar experiment one looking differential impact CO2 fertilization C3 C4 plants. Specifically, C4 plants possess special mechanism concentrating CO2 inside leaves, thereby reducing sensitivity changes atmospheric CO2. Although makes C4 plants efficient (particularly hot dry environments), also means reduced CO2 fertilization effect compared C3 plants. Hector, CO2 fertilization effect controlled parameter \\(\\beta\\) (BETA()). example, create two “biomes,” corresponding C3 C4 plants, different BETA() values, compare model outputs special case reference case (can recycle reference_results object previous example). purposes example, assume ~10% world’s terrestrial carbon associated C4 plants, CO2 fertilization effect C4 plans half strong C3 plants. Similarly accounting high-latitude warming, accounting reduced CO2 fertilization effect C4 plants results slightly warmer CO2-rich atmosphere.","code":"core <- newcore(ssp245, suppresslogging = TRUE) split_biome(core, \"global\", c(\"C3\", \"C4\"), fveg_c = c(0.9, 0.1), beta = c(0.36, 0.18)) invisible(reset(core)) invisible(run(core, 2100)) ## Auto-resetting core to -1 c4_results <- fetchvars(core, 2000:2100, result_vars, scenario = \"c3 vs c4\") c4_results_biome <- fetchvars(core, 2000:2100, c(VEG_C(\"C3\"), VEG_C(\"C4\"), DETRITUS_C(\"C3\"), DETRITUS_C(\"C4\"), SOIL_C(\"C3\"), SOIL_C(\"C4\")), scenario = \"c3 vs c4\") variable_split <- strsplit(c4_results_biome$variable, \".\", fixed = TRUE) c4_results_biome$biome <- vapply(variable_split, \"[[\", character(1), 1) c4_results_biome$variable <- vapply(variable_split, \"[[\", character(1), 2) c4_results$biome <- \"global\" reference_results$biome <- \"global\" plot_data <- rbind(reference_results, c4_results, c4_results_biome) plot_data$variable <- factor(plot_data$variable, result_vars) ggplot(plot_data) + aes(x = year, y = value, linetype = scenario, color = biome) + geom_line() + facet_wrap(vars(variable), scales = \"free_y\") + theme_bw()"},{"path":"https://jgcri.github.io/hector/articles/hector.html","id":"basic-run","dir":"Articles","previous_headings":"","what":"Basic run","title":"hector","text":"First, load hector package. Hector configured via INI file, defines run metadata, inputs (e.g., emissions scenarios), parameters. details file, see InputFiles. files ship Hector R package input/ subdirectory, allows accessed via system.file. First, determine path input file (ini) corresponding scenario SPP245. Alternatively, users may provide path ini file external Hector package local machine. file must comply Hector ini requirements. Next, initialize Hector instance, “core”, using configuration. core self-contained object contains information Hector’s inputs outputs. core initialized via newcore function: Now configured Hector core, can run run function. Notice returns output. Instead, output stored inside core object. retrieve , use fetchvars() function. , also specify want retrieve results 2000 2300. results returned long data.frame. makes easy plot using ggplot2. default, fetchvars() returns four outputs shown – atmospheric CO\\(_2\\) concentration, CO\\(_2\\) radiative forcing, total radiative forcing, temperature change – model output(s) can specified.","code":"library(hector) ini_file <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") external_ini_file <- \"/path/to/ini/on/local/machine/my_ini.ini\" core <- newcore(ini_file) core ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini run(core) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 2300 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini results <- fetchvars(core, 2000:2300) head(results) ## scenario year variable value units ## 1 Unnamed Hector core 2000 CO2_concentration 369.1708 ppmv CO2 ## 2 Unnamed Hector core 2001 CO2_concentration 370.8896 ppmv CO2 ## 3 Unnamed Hector core 2002 CO2_concentration 372.5325 ppmv CO2 ## 4 Unnamed Hector core 2003 CO2_concentration 374.2783 ppmv CO2 ## 5 Unnamed Hector core 2004 CO2_concentration 376.0798 ppmv CO2 ## 6 Unnamed Hector core 2005 CO2_concentration 378.1072 ppmv CO2 library(ggplot2) ggplot(results) + aes(x = year, y = value) + geom_line() + facet_wrap(~variable, scales = \"free_y\")"},{"path":"https://jgcri.github.io/hector/articles/hector.html","id":"setting-parameters","dir":"Articles","previous_headings":"","what":"Setting parameters","title":"hector","text":"Hector R interface interacts parameters variables way. Therefore, variables can set checked via setvar() fetchvars(). First, let’s get current value \\(\\beta\\) (beta), CO\\(_2\\) fertilization factor. variables parameter names retrieved Hector core, stored R functions (e.g. BETA()). However, functions return string corresponding variable name. Just load results, use fetchvars() query parameter values. result fetchvars() always data.frame columns, even returning parameter value. Note also use NA second argument (dates). current value set 0.36 (note unitless quantity, hence (unitless) unit). Let’s bump little 0.40. Similarly run, returns output. Rather, change stored inside Hector “core” object. can confirm change took effect another call fetchvars(). Now, let’s run simulation higher value CO\\(_2\\) fertilization. , , let’s look Hector core object. Notice Current date set 2300. already run core end date. ability stop resume Hector runs configuration, possibly adjusting values certain variables stopped, essential part model’s functionality. , ’s something ’re interested . already stored previous run’s output results , can safely reset core: effectively ‘rewinds’ core back either provided date (defaults 0 missing) model start date (set INI file; default 1745), whichever greater. addition, date argument less model start date spinup enabled (do_spinup = 1 INI file), core re-spinup process current set parameters. NOTE Prior normal run beginning 1745, Hector optional “spinup” mode runs carbon cycle perturbations stabilizes. Essentially, model removes human emissions runs changes carbon pools system reached equilibrium. changing Hector parameters can change post-spinup equilibrium values state variables, Hector automatically run reset(core, date = 0) beginning next run call detects parameters changed. means currently possible change Hector parameters (\\(\\beta\\) preindustrial CO2) part-way run. However, still possible change values specific drivers state variables (CO2 emissions) middle run. , result reset command, core’s Current Date now model start date – 1745. can now perform another run new CO\\(_2\\) fertilization value. Let’s see changing CO\\(_2\\) fertilization affects results. expected, increasing CO\\(_2\\) fertilization increases strength terrestrial carbon sink therefore reduces atmospheric CO\\(_2\\), radiative forcing, global temperature. However, effects become pronounced latter half 21st century.","code":"BETA() ## [1] \"beta\" beta <- fetchvars(core, NA, BETA()) beta ## scenario year variable value units ## 1 Unnamed Hector core NA beta 0.55 (unitless) setvar(core, NA, BETA(), 0.40, \"(unitless)\") fetchvars(core, NA, BETA()) ## scenario year variable value units ## 1 Unnamed Hector core NA beta 0.4 (unitless) core ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 2300 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini reset(core) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini run(core) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 2300 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini results_40 <- fetchvars(core, 2000:2300) head(results_40) ## scenario year variable value units ## 1 Unnamed Hector core 2000 CO2_concentration 382.1723 ppmv CO2 ## 2 Unnamed Hector core 2001 CO2_concentration 384.1810 ppmv CO2 ## 3 Unnamed Hector core 2002 CO2_concentration 386.1196 ppmv CO2 ## 4 Unnamed Hector core 2003 CO2_concentration 388.1667 ppmv CO2 ## 5 Unnamed Hector core 2004 CO2_concentration 390.2758 ppmv CO2 ## 6 Unnamed Hector core 2005 CO2_concentration 392.6141 ppmv CO2 results[[\"beta\"]] <- 0.36 results_40[[\"beta\"]] <- 0.40 compare_results <- rbind(results, results_40) ggplot(compare_results) + aes(x = year, y = value, color = factor(beta)) + geom_line() + facet_wrap(~variable, scales = \"free_y\") + guides(color = guide_legend(title = expression(beta)))"},{"path":"https://jgcri.github.io/hector/articles/hector.html","id":"sensitivity-analysis","dir":"Articles","previous_headings":"","what":"Sensitivity analysis","title":"hector","text":"Hector runs quickly, making easy run many simulations slightly different configurations. One application explore sensitivity Hector variability parameters. basic procedure previous section. However, save typing (, general, good programmers!), let’s create functions. can see, ability CO\\(_2\\) fertilization offset carbon emissions saturates, high values \\(\\beta\\), increase \\(\\beta\\) translates smaller decrease atmospheric CO\\(_2\\) related climate effects.","code":"#' Run Hector with a parameter set to a particular value, and return results #' #' @param core Hector core to use for execution #' @param parameter Hector parameter name, as a function call (e.g. `BETA()`) #' @param value Parameter value #' @return Results, as data.frame, with additional `parameter_value` column run_with_param <- function(core, parameter, value) { setvar(core, NA, parameter, value, getunits(parameter)) reset(core) run(core) result <- fetchvars(core, 2000:2300) result[[\"parameter_value\"]] <- value result[[\"parameter_units\"]] <- getunits(parameter) result } #' Run Hector with a range of parameter values run_with_param_range <- function(core, parameter, values) { mapped <- Map(function(x) run_with_param(core, parameter, x), values) Reduce(rbind, mapped) } sensitivity_beta <- run_with_param_range(core, BETA(), seq(0, 1, length.out = 5)) ggplot(sensitivity_beta) + aes(x = year, y = value, color = parameter_value, group = parameter_value) + geom_line() + facet_wrap(~variable, scales = \"free_y\") + guides(color = guide_colorbar(title = expression(beta))) + scale_color_viridis_c()"},{"path":"https://jgcri.github.io/hector/articles/manual.html","id":"model-philosophy","dir":"Articles","previous_headings":"","what":"Model Philosophy","title":"Manual","text":"Quick run time Complexity warranted Clean, modern, well-documented object-oriented code Open source - code freely available & accessible Flexible - model components, outputs, inputs can changed Hector’s version numbering","code":""},{"path":"https://jgcri.github.io/hector/articles/manual.html","id":"science","dir":"Articles","previous_headings":"","what":"Science","title":"Manual","text":"general summary science behind Hector Introduction Hector’s climate, terrestrial carbon cycle, ocean carbon cycle Model documentation manuscripts publications feature Hector","code":""},{"path":"https://jgcri.github.io/hector/articles/manual.html","id":"building-and-running-hector","dir":"Articles","previous_headings":"","what":"Building and Running Hector","title":"Manual","text":"build Hector source basic run sensitivity analysis run Hector constraints run Hector multiple biomes","code":""},{"path":"https://jgcri.github.io/hector/articles/manual.html","id":"for-developers","dir":"Articles","previous_headings":"","what":"For Developers","title":"Manual","text":"mixture notes related C++ R Hector code bases External API Component API Add new component Add new variable Add new forcer","code":""},{"path":"https://jgcri.github.io/hector/articles/manual.html","id":"contributing-to-hector","dir":"Articles","previous_headings":"","what":"Contributing to Hector","title":"Manual","text":"Contribution guide Authorship Guidelines Style Guide","code":""},{"path":"https://jgcri.github.io/hector/articles/ocean-carbon-cycle.html","id":"science","dir":"Articles","previous_headings":"","what":"Science","title":"Ocean Carbon Cycle","text":"Based work Lenton (2000)1, Knox McElroy (1984)2, Sarmiento Toggweiler (1984)3, Hector’s implementation ocean carbon cycle documented Hartin et al. (2016).4 Hector’s ocean four box model two surface level boxes (high latitude low latitude), intermediate, deep ocean boxes. Within surface boxes Hector solves pCO2, pH, [HCO\\({_3}^{-1}\\) ], [CO\\(_{3}^{-2}\\)], aragonite \\(\\Omega_{Ar}\\) calcite \\(\\Omega_{Ca}\\). chemistry carbon surface boxes depends salinity, dissolved inorganic carbon (DIC), temperature.","code":""},{"path":"https://jgcri.github.io/hector/articles/ocean-carbon-cycle.html","id":"parameters","dir":"Articles","previous_headings":"","what":"Parameters","title":"Ocean Carbon Cycle","text":"Six parameters may set INI file R interface: tt (TT() R), thermohaline overturning (m3/s) tu (TU()), high latitude overturning (m3/s) twi (TWI()), warm-intermediate exchange (m3/s) tid (TID()), intermediate-deep exchange (m3/s) preind_surface_c (OCEAN_PREIND_C_SURF()), preindustrial carbon surface ocean (Pg C) preind_interdeep_c (OCEAN_PREIND_C_ID()), preindustrial carbon intermediate deep ocean (Pg C)","code":""},{"path":"https://jgcri.github.io/hector/articles/ocean-carbon-cycle.html","id":"implementation","dir":"Articles","previous_headings":"","what":"Implementation","title":"Ocean Carbon Cycle","text":"oceanbox cpp hpp files set four ocean boxes determine connections one another. carbon, energy, volume move four ocean boxes. ocean_csys cpp hpp files define solver temperature dependent system equations determine solubility equilibrium constants. Within ocean_component","code":""},{"path":"https://jgcri.github.io/hector/articles/output.html","id":"standalone-executable","dir":"Articles","previous_headings":"","what":"Standalone Executable","title":"Outputs","text":"Output standalone executable written output sub-directory hector’s root directory. Hector results stored outputstream_name.csv; applicable, carbon tracking results written tracking_name.csv (name refers hector run name). output stream csv contains results output spin-period handful variables.","code":""},{"path":"https://jgcri.github.io/hector/articles/output.html","id":"r-hector","dir":"Articles","previous_headings":"","what":"R Hector","title":"Outputs","text":"fetchvars function used get results hector core identifier functions listed R_function table .","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/outputstream.html","id":"output-stream-categories","dir":"Articles","previous_headings":"","what":"Output stream categories:","title":"Command line Hector's outputstream","text":"important note time: outputstream code currently writes end date current timestep outputstream.csv file; e.g., ’re running 1 January 1745 - 31 December 1745, gets written “1746”. intuitive (people think “1746” denoting January 1-December 31) numerically correct: date 1746.0, .e. midnight December 31 1745. consequence carbon fluxes logged timepoint effectively calendar year 1745 (1745-01-01 1745-12-31). first line file timestamp version number line, skipped CSV-reading code. variables appear outputstream table include: TODO: auto-generated @leeyap output table?","code":""},{"path":"https://jgcri.github.io/hector/articles/units.html","id":"units-for-hector-outputs","dir":"Articles","previous_headings":"","what":"Units for Hector outputs","title":"Units for emissions passed into Hector","text":"Hector outputs returned unitval structures, doubt, can always dump return value output stream see unit (test units field likely candidates). follows non-exhaustive list commonly-used outputs. See also unitval notes","code":""},{"path":"https://jgcri.github.io/hector/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Kalyn Dorheim. Author, maintainer. Ben Bond-Lamberty. Author. Skylar Gering. Contributor. Corinne Hartin. Contributor. Robert Link. Contributor. Mat Nicholson. Contributor. mnichol3 Pralit Patel. Contributor. Leeya Pressburger. Contributor, data contributor. Alexey Shiklomanov. Contributor. Benjamin Vega-Westhoff. Contributor. Dawn Woodard. Contributor.","code":""},{"path":"https://jgcri.github.io/hector/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Dorheim K, Bond-Lamberty B (2023). hector: Hector Simple Climate Model. https://github.com/JGCRI/hector, https://jgcri.github.io/hector/.","code":"@Manual{, title = {hector: The Hector Simple Climate Model}, author = {Kalyn Dorheim and Ben Bond-Lamberty}, year = {2023}, note = {https://github.com/JGCRI/hector, https://jgcri.github.io/hector/}, }"},{"path":"https://jgcri.github.io/hector/index.html","id":"hector","dir":"","previous_headings":"","what":"The Hector Simple Climate Model","title":"The Hector Simple Climate Model","text":"repository Hector, open source, object-oriented, simple global climate carbon-cycle model runs quickly still representing critical global scale earth system processes. Hector simple climate model (SCM, also known reduced-complexity climate model), class models extremely versatile wide range applications. Due computational efficiency, SCMs can easily coupled models used design scenarios, emulate complex climate models, conduct uncertainty analyses. Hector’s output global mean air temperature change eight Shared Socioeconomic Pathways (SSPs).","code":""},{"path":"https://jgcri.github.io/hector/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"The Hector Simple Climate Model","text":"hector R package can installed using remotes::install_github function. detailed installation instructions, including set Hector command line executable, can found .","code":"remotes::install_github('jgcri/hector') library(hector)"},{"path":"https://jgcri.github.io/hector/index.html","id":"tools-and-software-that-work-with-hector","dir":"","previous_headings":"","what":"Tools and Software That Work with Hector","title":"The Hector Simple Climate Model","text":"GCAM: Hector can used climate component GCAM pyhector: Python interface Hector fldgen: spatially resolved temperature & precipitation emulator CMIP5 ESMs HectorUI: run Hector web interface!","code":""},{"path":"https://jgcri.github.io/hector/index.html","id":"contributing-to-hector","dir":"","previous_headings":"","what":"Contributing to Hector","title":"The Hector Simple Climate Model","text":"Hector team welcomes values community contributions, please see Contribution Guide note contributing project, agree abide Contributor Code Conduct research supported U.S. Department Energy, Office Science, part research Multi-Sector Dynamics, Earth Environmental System Modeling Program. Pacific Northwest National Laboratory operated DOE Battelle Memorial Institute contract DE-AC05-76RL01830.","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for variables in the Hector carbon cycle component — NBP","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"identifiers correspond variables can read /set carbon cycle","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"","code":"NBP() CONCENTRATIONS_CO2() NPP() RH() ATMOSPHERIC_CO2() FFI_EMISSIONS() DACCS_UPTAKE() LUC_EMISSIONS() LUC_UPTAKE() CO2_CONSTRAIN() NBP_CONSTRAIN() VEG_C(biome = \"\") DETRITUS_C(biome = \"\") SOIL_C(biome = \"\") PERMAFROST_C(biome = \"\") THAWEDP_C(biome = \"\") FRAC_FROZEN(biome = \"\") FRAC_STATIC(biome = \"\") PERMAFROST_MU(biome = \"\") PERMAFROST_SIGMA(biome = \"\") FRAC_DECOMP_CH4(biome = \"\") EARTH_C() NPP_FLUX0(biome = \"\")"},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"biome Name biome (leave empty global)","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"CO2_CONSTRAIN(): Constrain atmospheric CO2 concentration (\"(ppmv CO2)\") NBP_CONSTRAIN(): Constrain net biome production (land-atmosphere flux) (\"(PgC/yr)\") VEG_C(): Vegetation C pool (`\"Pg C\"`) DETRITUS_C(): Vegetation detritus C pool (`\"Pg C\"`) SOIL_C(): Soil C pool (`\"Pg C\"`) PERMAFROST_C(): Permafrost C pool (`\"Pg C\"`) THAWEDP_C(): Thawed permafrost C pool (`\"Pg C\"`) FRAC_FROZEN(): Fraction permafrost still frozen (\"(unitless)\") FRAC_STATIC(): Fraction thawed permafrost static (\"(unitless)\") PERMAFROST_MU(): Permafrost thaw mu parameter (\"(unitless)\") PERMAFROST_SIGMA(): Permafrost thaw sigma parameter (\"(unitless)\") FRAC_DECOMP_CH4(): Methane fraction permafrost decomposition (\"(unitless)\") NPP_FLUX0(): Initial net primary productivity (NPP)flux (`\"Pg C year^-1\"`)","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"See Woodard et al. (2021) See Woodard et al. (2021)","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"output-variables","dir":"Reference","previous_headings":"","what":"Output variables","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"variables can read using GETDATA message type: CONCENTRATIONS_CO2 Atmospheric CO2 concentration ATMOSPHERIC_CO2 Atmospheric CO2 units C NBP Net biome production. Annual global C flux atmosphere land. positive value means net flux atmosphere land (.e. land net carbon sink), negative value means net flux land atmosphere (.e. land net carbon source). Note despite name--follows disciplinary convention, see Chapin et al. 2006--currently globally-averaged variable. FFI_EMISSIONS Fossil fuel industrial emissions LUC_EMISSIONS Land use change emissions NPP Net primary production RH Heterotrophic respiration EARTH_C Earth pool","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"input-variables","dir":"Reference","previous_headings":"","what":"Input variables","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"FFI_EMISSIONS Fossil fuel industrial emissions (\"Pg C/yr\") LUC_EMISSIONS Land use change emissions (\"Pg C/yr\") CO2_CONSTRAIN Prescribed atmospheric CO2 concentration (\"ppmv CO2\") NBP_CONSTRAIN Prescribed net biome production (land-atmosphere C flux) (\"Pg C/yr\") DACCS_UPTAKE Direct air carbon capture storage LUC_UPTAKE Land use change uptake","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"note-1","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/concentrations.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O","title":"Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O","text":"variables can read using GETDATA message type.","code":""},{"path":"https://jgcri.github.io/hector/reference/concentrations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O","text":"","code":"CONCENTRATIONS_N2O() PREINDUSTRIAL_N2O() PREINDUSTRIAL_O3() CONCENTRATIONS_O3()"},{"path":"https://jgcri.github.io/hector/reference/concentrations.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O","text":"CONCENTRATIONS_N2O(): Atmospheric N2O concentration PREINDUSTRIAL_N2O(): Preindustrial atmospheric N2O concentration PREINDUSTRIAL_O3(): Preindustrial ozone concentration CONCENTRATIONS_O3(): Atmospheric ozone concentration","code":""},{"path":"https://jgcri.github.io/hector/reference/concentrations.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/constraints.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for constraints — FTOT_CONSTRAIN","title":"Identifiers for constraints — FTOT_CONSTRAIN","text":"identifiers correspond Hector's constraint capabilities","code":""},{"path":"https://jgcri.github.io/hector/reference/constraints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for constraints — FTOT_CONSTRAIN","text":"","code":"FTOT_CONSTRAIN() CH4_CONSTRAIN() N2O_CONSTRAIN() TAS_CONSTRAIN()"},{"path":"https://jgcri.github.io/hector/reference/constraints.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for constraints — FTOT_CONSTRAIN","text":"FTOT_CONSTRAIN(): Constrain total radiative forcing CH4_CONSTRAIN(): CH4 concentration constraint \"ppbv CH4\" N2O_CONSTRAIN(): N2O concentration constraint (\"pbbv N2O\") TAS_CONSTRAIN(): Constrain global mean temperature (\"(degC)\")","code":""},{"path":"https://jgcri.github.io/hector/reference/constraints.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for constraints — FTOT_CONSTRAIN","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/create_biome.html","id":null,"dir":"Reference","previous_headings":"","what":"Create new biome — create_biome","title":"Create new biome — create_biome","text":"Create new biome","code":""},{"path":"https://jgcri.github.io/hector/reference/create_biome.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create new biome — create_biome","text":"","code":"create_biome( core, biome, veg_c0, detritus_c0, soil_c0, permafrost_c0, npp_flux0, warmingfactor, beta, q10_rh, f_nppv, f_nppd, f_litterd )"},{"path":"https://jgcri.github.io/hector/reference/create_biome.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create new biome — create_biome","text":"core Hector core biome Name new biome veg_c0 Initial vegetation C pool detritus_c0 Initial detritus C pool soil_c0 Initial soil C pool permafrost_c0 Initial permafrost C pool npp_flux0 Initial net primary productivity warmingfactor Temperature multiplier (default = `1.0`) beta CO2 fertilization effect (default = `0.36`) q10_rh Q10 heterotrophic respiration (default = `2.0`) f_nppv Fraction NPP vegetation (default = `0.35`) f_nppd Fraction NPP detritus (default = `0.60`) f_litterd Fraction litter flux detritus (default = `0.98`)","code":""},{"path":"https://jgcri.github.io/hector/reference/create_biome.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create new biome — create_biome","text":"Hector core, invisibly","code":""},{"path":"https://jgcri.github.io/hector/reference/create_biome.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create new biome — create_biome","text":"Alexey Shiklomanov","code":""},{"path":"https://jgcri.github.io/hector/reference/create_biome_impl.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a biome — create_biome_impl","title":"Create a biome — create_biome_impl","text":"Create biome","code":""},{"path":"https://jgcri.github.io/hector/reference/create_biome_impl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a biome — create_biome_impl","text":"","code":"create_biome_impl(core, biome)"},{"path":"https://jgcri.github.io/hector/reference/create_biome_impl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a biome — create_biome_impl","text":"core Handle Hector instance run. biome (character) Name new biome","code":""},{"path":"https://jgcri.github.io/hector/reference/delete_biome_impl.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete a biome — delete_biome_impl","title":"Delete a biome — delete_biome_impl","text":"Delete biome","code":""},{"path":"https://jgcri.github.io/hector/reference/delete_biome_impl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete a biome — delete_biome_impl","text":"","code":"delete_biome_impl(core, biome)"},{"path":"https://jgcri.github.io/hector/reference/delete_biome_impl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete a biome — delete_biome_impl","text":"core Handle Hector instance run. biome (character) Name biome delete","code":""},{"path":"https://jgcri.github.io/hector/reference/delta.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for Hector forcing component parameters — DELTA_CO2","title":"Identifiers for Hector forcing component parameters — DELTA_CO2","text":"identifiers specify tropospheric adjustments stratospheric-temperature adjusted radiative forcings. values must number -1 1, can read /set hectors forcing halocarbon components.","code":""},{"path":"https://jgcri.github.io/hector/reference/delta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for Hector forcing component parameters — DELTA_CO2","text":"","code":"DELTA_CO2() RF_N2O() DELTA_N2O() DELTA_CF4() DELTA_C2F6() DELTA_HFC23() DELTA_HFC32() DELTA_HFC4310() DELTA_HFC125() DELTA_HFC134A() DELTA_HFC143A() DELTA_HFC227EA() DELTA_HFC245FA() DELTA_SF6() DELTA_CFC11() DELTA_CFC12() DELTA_CFC113() DELTA_CFC114() DELTA_CFC115() DELTA_CCL4() DELTA_CH3CCL3() DELTA_HCFC22() DELTA_HCFC141B() DELTA_HCFC142B() DELTA_HALON1211() DELTA_HALON1301() DELTA_HALON2402() DELTA_CH3CL() DELTA_CH3BR() DELTA_CH4()"},{"path":"https://jgcri.github.io/hector/reference/delta.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for Hector forcing component parameters — DELTA_CO2","text":"DELTA_CO2(): foring tropospheric adjustments N2O RF_N2O(): foring tropospheric adjustments N2O DELTA_N2O(): Radiative forcing due N2O DELTA_CF4(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_C2F6(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC23(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC32(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing ' @export DELTA_HFC4310(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC125(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC134A(): tropospheric adjustments used convert tratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC143A(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC227EA(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC245FA(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_SF6(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CFC11(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CFC12(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CFC113(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CFC114(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CFC115(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CCL4(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CH3CCL3(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HCFC22(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HCFC141B(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HCFC142B(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HALON1211(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HALON1301(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HALON2402(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CH3CL(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CH3BR(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CH4(): Radiative forcing tropospheric adjustment CH4","code":""},{"path":"https://jgcri.github.io/hector/reference/delta.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for Hector forcing component parameters — DELTA_CO2","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/emissions.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC","title":"Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC","text":"variables can set using SETDATA message type.","code":""},{"path":"https://jgcri.github.io/hector/reference/emissions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC","text":"","code":"EMISSIONS_BC() EMISSIONS_N2O() NAT_EMISSIONS_N2O() EMISSIONS_NOX() EMISSIONS_CO() EMISSIONS_NMVOC() EMISSIONS_OC() EMISSIONS_NH3()"},{"path":"https://jgcri.github.io/hector/reference/emissions.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC","text":"EMISSIONS_BC(): Black carbon emissions EMISSIONS_N2O(): N2O emissions (\"Tg N\") NAT_EMISSIONS_N2O(): Natural N2O emissions (\"Tg N\") EMISSIONS_NOX(): Emissions NOx compounds (\"Tg N\") EMISSIONS_CO(): Emissions carbon monoxide (\"Tg CO\") EMISSIONS_NMVOC(): Emissions non-methane volatile organic compounds (NMVOC) (\"Tg NMVOC\") EMISSIONS_OC(): Emissions organic carbon (\"Tg\") EMISSIONS_NH3(): Emissions NH3 (\"Tg\")","code":""},{"path":"https://jgcri.github.io/hector/reference/emissions.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/fetchvars.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch results from a running Hector core — fetchvars","title":"Fetch results from a running Hector core — fetchvars","text":"function fetch results return data frame. core must active order work; attempting fetch results core shut cause error.","code":""},{"path":"https://jgcri.github.io/hector/reference/fetchvars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch results from a running Hector core — fetchvars","text":"","code":"fetchvars(core, dates, vars = NULL, scenario = NULL)"},{"path":"https://jgcri.github.io/hector/reference/fetchvars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch results from a running Hector core — fetchvars","text":"core Hector core object dates Vector dates fetch; automatically trimmed dates start date latest date currently run. Set NA return data associated dates model parameters. vars List (vector) capability strings defining variables fetched result. scenario Optional scenario name. specified, name element Hector core object used.","code":""},{"path":"https://jgcri.github.io/hector/reference/fetchvars.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fetch results from a running Hector core — fetchvars","text":"variables fetch given sequence character strings corresponding capabilities declared hector components. strings generated using capability identifier functions (see list documentation pages ). list variables fetch specify vars stored hector.default.fetchvars option. option also unset, default variable list CO2 concentration, total radiative forcing, CO2 forcing, global mean temperature.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/forcings.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for capabilities in the Hector forcing component — RF_TOTAL","title":"Identifiers for capabilities in the Hector forcing component — RF_TOTAL","text":"identifiers specify forcing values can provided hector via forcing component. values corresponding identifiers read-(.e., can appear GETDATA messages.)","code":""},{"path":"https://jgcri.github.io/hector/reference/forcings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for capabilities in the Hector forcing component — RF_TOTAL","text":"","code":"RF_TOTAL() RF_ALBEDO() RF_CO2() RF_H2O_STRAT() RF_O3_TROP() RF_BC() RF_OC() RF_NH3() RF_SO2() RF_ACI() RF_VOL() RF_MISC() Q_CO2() RF_CH4()"},{"path":"https://jgcri.github.io/hector/reference/forcings.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for capabilities in the Hector forcing component — RF_TOTAL","text":"RF_TOTAL(): Total radiative forcing RF_ALBEDO(): Radiative forcing due albedo RF_CO2(): Radiative forcing due CO2 RF_H2O_STRAT(): Radiative forcing due stratospheric water vapor RF_O3_TROP(): Radiative forcing due tropospheric ozone RF_BC(): Radiative forcing due black carbon aerosol-radiation interactions RF_OC(): Radiative forcing due organic carbon aerosol-radiation interactions RF_NH3(): Radiative forcing due NH3 aerosol-radiation interactions RF_SO2(): Radiative forcing due SO2 aerosol-radiation interactions RF_ACI(): aerosol-cloud interactions, includes contributions SO2, BC OC RF_VOL(): Radiative forcing due volcanic activity RF_MISC(): Radiative miscellaneous forcing read ini. Q_CO2(): Radiative forcing efficiency doubling CO2 RF_CH4(): Radiative forcing due methane","code":""},{"path":"https://jgcri.github.io/hector/reference/forcings.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for capabilities in the Hector forcing component — RF_TOTAL","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/fxntable.html","id":null,"dir":"Reference","previous_headings":"","what":"A data.frame containing information R hector function name and hector string names. — fxntable","title":"A data.frame containing information R hector function name and hector string names. — fxntable","text":"data.frame containing information R hector function name hector string names.","code":""},{"path":"https://jgcri.github.io/hector/reference/fxntable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A data.frame containing information R hector function name and hector string names. — fxntable","text":"","code":"fxntable"},{"path":"https://jgcri.github.io/hector/reference/fxntable.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A data.frame containing information R hector function name and hector string names. — fxntable","text":"data.frame 2 columns 239 rows. fxn String R hector function name string String variable name","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_inits.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","title":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","text":"Internal helper function biome functions.","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_inits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","text":"","code":"get_biome_inits(core, biome)"},{"path":"https://jgcri.github.io/hector/reference/get_biome_inits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","text":"core Hector core biome Name biome retrieve data","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_inits.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","text":"Named numeric vector biome initial conditions parameters","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_inits.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","text":"Alexey Shiklomanov","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the current list of biomes for a Hector instance — get_biome_list","title":"Retrieve the current list of biomes for a Hector instance — get_biome_list","text":"Retrieve current list biomes Hector instance","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the current list of biomes for a Hector instance — get_biome_list","text":"","code":"get_biome_list(core)"},{"path":"https://jgcri.github.io/hector/reference/get_biome_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the current list of biomes for a Hector instance — get_biome_list","text":"core Handle Hector instance retrieve biome list.","code":""},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the tracking data for a Hector instance — get_tracking_data","title":"Retrieve the tracking data for a Hector instance — get_tracking_data","text":"Retrieve tracking data Hector instance","code":""},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the tracking data for a Hector instance — get_tracking_data","text":"","code":"get_tracking_data(core)"},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the tracking data for a Hector instance — get_tracking_data","text":"core Handle Hector instance.","code":""},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve the tracking data for a Hector instance — get_tracking_data","text":"data.frame tracking data. Columns include year (integer), component (character), pool_name (character), pool_value (double), pool_units (character), source_name (character), source_fraction (double). fractions always sum 1 given pool year.","code":""},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Retrieve the tracking data for a Hector instance — get_tracking_data","text":"pool_name, pool_value, pool_units names differ used model's standard output stream (variable, value, units respectively).","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data_impl.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the tracking data for a Hector instance — get_tracking_data_impl","title":"Retrieve the tracking data for a Hector instance — get_tracking_data_impl","text":"Retrieve tracking data Hector instance","code":""},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data_impl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the tracking data for a Hector instance — get_tracking_data_impl","text":"","code":"get_tracking_data_impl(core)"},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data_impl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the tracking data for a Hector instance — get_tracking_data_impl","text":"core Handle Hector instance.","code":""},{"path":"https://jgcri.github.io/hector/reference/getfxn.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the hector function associated with a specific string — getfxn","title":"Get the hector function associated with a specific string — getfxn","text":"function provides Hector function returns Hector string","code":""},{"path":"https://jgcri.github.io/hector/reference/getfxn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the hector function associated with a specific string — getfxn","text":"","code":"getfxn(str)"},{"path":"https://jgcri.github.io/hector/reference/getfxn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the hector function associated with a specific string — getfxn","text":"str String name find Hector function ","code":""},{"path":"https://jgcri.github.io/hector/reference/getfxn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the hector function associated with a specific string — getfxn","text":"Hector function name","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/getfxn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the hector function associated with a specific string — getfxn","text":"","code":"getfxn(\"beta\") #> [1] \"BETA()\" getfxn(\"q10_rh\") #> [1] \"Q10_RH()\""},{"path":"https://jgcri.github.io/hector/reference/getunits.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the hector unit strings for one or more variables — getunits","title":"Get the hector unit strings for one or more variables — getunits","text":"function provides units variables can set model using setvar. Variables read model fetchvars units column data frame returned .","code":""},{"path":"https://jgcri.github.io/hector/reference/getunits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the hector unit strings for one or more variables — getunits","text":"","code":"getunits(vars)"},{"path":"https://jgcri.github.io/hector/reference/getunits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the hector unit strings for one or more variables — getunits","text":"vars Capability strings variables get units .","code":""},{"path":"https://jgcri.github.io/hector/reference/getunits.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the hector unit strings for one or more variables — getunits","text":"Character vector unit strings. Variables found NA entries.","code":""},{"path":"https://jgcri.github.io/hector/reference/haloconstrain.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN","title":"Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN","text":"identifiers correspond concentration constraints halocarbons. cases, expected input units volumetric parts per trillion (\"ppvt\").","code":""},{"path":"https://jgcri.github.io/hector/reference/haloconstrain.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN","text":"","code":"CF4_CONSTRAIN() C2F6_CONSTRAIN() HFC23_CONSTRAIN() HFC32_CONSTRAIN() HFC4310_CONSTRAIN() HFC125_CONSTRAIN() HFC134A_CONSTRAIN() HFC143A_CONSTRAIN() HFC227EA_CONSTRAIN() HFC245FA_CONSTRAIN() SF6_CONSTRAIN() CFC11_CONSTRAIN() CFC12_CONSTRAIN() CFC113_CONSTRAIN() CFC114_CONSTRAIN() CFC115_CONSTRAIN() CCL4_CONSTRAIN() CH3CCL3_CONSTRAIN() HCFC22_CONSTRAIN() HCFC141B_CONSTRAIN() HCFC142B_CONSTRAIN() HALON1211_CONSTRAIN() HALON1301_CONSTRAIN() HALON2402_CONSTRAIN() CH3CL_CONSTRAIN() CH3BR_CONSTRAIN()"},{"path":"https://jgcri.github.io/hector/reference/haloconstrain.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN","text":"CF4_CONSTRAIN(): Concentration constraint CF4 C2F6_CONSTRAIN(): Concentration constraint C2F6 HFC23_CONSTRAIN(): Concentration constraint HFC-23 HFC32_CONSTRAIN(): Concentration constraint HFC-32 HFC4310_CONSTRAIN(): Concentration constraint HFC-4310 HFC125_CONSTRAIN(): Concentration constraint HFC-125 HFC134A_CONSTRAIN(): Concentration constraint HFC-134a HFC143A_CONSTRAIN(): Concentration constraint HFC-143a HFC227EA_CONSTRAIN(): Concentration constraint HFC-227ea HFC245FA_CONSTRAIN(): Concentration constraint HFC-254fa SF6_CONSTRAIN(): Concentration constraint sulfur hexafluoride CFC11_CONSTRAIN(): Concentration constraint CFC-11 CFC12_CONSTRAIN(): Concentration constraint CFC-12 CFC113_CONSTRAIN(): Concentration constraint CFC-113 CFC114_CONSTRAIN(): Concentration constraint CFC-114 CFC115_CONSTRAIN(): Concentration constraint CFC-115 CCL4_CONSTRAIN(): Concentration constraint carbon tetrachloride CH3CCL3_CONSTRAIN(): Concentration constraint trichloroethane HCFC22_CONSTRAIN(): Concentration constraint HCFC-22 HCFC141B_CONSTRAIN(): Concentration constraint HCFC-141b HCFC142B_CONSTRAIN(): Concentration constraint HCFC-142b HALON1211_CONSTRAIN(): Concentration constraint halon-1211 HALON1301_CONSTRAIN(): Concentration constraint halon-1301 HALON2402_CONSTRAIN(): Concentration constraint halon-2402 CH3CL_CONSTRAIN(): Concentration constraint chloromethane CH3BR_CONSTRAIN(): Concentration constraint bromomethane","code":""},{"path":"https://jgcri.github.io/hector/reference/haloconstrain.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/haloemiss.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for halocarbon emissions — EMISSIONS_CF4","title":"Identifiers for halocarbon emissions — EMISSIONS_CF4","text":"identifiers correspond emissions values halocarbons. (now) write , meaning can appear SETDATA messages. cases, expected input units gigagrams (\"Gg\").","code":""},{"path":"https://jgcri.github.io/hector/reference/haloemiss.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for halocarbon emissions — EMISSIONS_CF4","text":"","code":"EMISSIONS_CF4() EMISSIONS_C2F6() EMISSIONS_HFC23() EMISSIONS_HFC32() EMISSIONS_HFC4310() EMISSIONS_HFC125() EMISSIONS_HFC134A() EMISSIONS_HFC143A() EMISSIONS_HFC227EA() EMISSIONS_HFC245FA() EMISSIONS_SF6() EMISSIONS_CFC11() EMISSIONS_CFC12() EMISSIONS_CFC113() EMISSIONS_CFC114() EMISSIONS_CFC115() EMISSIONS_CCL4() EMISSIONS_CH3CCL3() EMISSIONS_HCFC22() EMISSIONS_HCFC141B() EMISSIONS_HCFC142B() EMISSIONS_HALON1211() EMISSIONS_HALON1301() EMISSIONS_HALON2402() EMISSIONS_CH3CL() EMISSIONS_CH3BR()"},{"path":"https://jgcri.github.io/hector/reference/haloemiss.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for halocarbon emissions — EMISSIONS_CF4","text":"EMISSIONS_CF4(): Emissions CF4 EMISSIONS_C2F6(): Emissions C2F6 EMISSIONS_HFC23(): Emissions HFC-23 EMISSIONS_HFC32(): Emissions HFC-32 EMISSIONS_HFC4310(): Emissions HFC-4310 EMISSIONS_HFC125(): Emissions HFC-125 EMISSIONS_HFC134A(): Emissions HFC-134a EMISSIONS_HFC143A(): Emissions HFC-143a EMISSIONS_HFC227EA(): Emissions HFC-227ea EMISSIONS_HFC245FA(): Emissions HFC-254fa EMISSIONS_SF6(): Emissions sulfur hexafluoride EMISSIONS_CFC11(): Emissions CFC-11 EMISSIONS_CFC12(): Emissions CFC-12 EMISSIONS_CFC113(): Emissions CFC-113 EMISSIONS_CFC114(): Emissions CFC-114 EMISSIONS_CFC115(): Emissions CFC-115 EMISSIONS_CCL4(): Emissions carbon tetrachloride EMISSIONS_CH3CCL3(): Emissions trichloroethane EMISSIONS_HCFC22(): Emissions HCFC-22 EMISSIONS_HCFC141B(): Emissions HcFC-141b EMISSIONS_HCFC142B(): Emissions HCFC-142b EMISSIONS_HALON1211(): Emissions halon-1211 EMISSIONS_HALON1301(): Emissions halon-1301 EMISSIONS_HALON2402(): Emissions halon-2402 EMISSIONS_CH3CL(): Emissions chloromethane EMISSIONS_CH3BR(): Emissions bromomethane","code":""},{"path":"https://jgcri.github.io/hector/reference/haloemiss.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for halocarbon emissions — EMISSIONS_CF4","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/haloforcings.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for halocarbon forcings — RF_CF4","title":"Identifiers for halocarbon forcings — RF_CF4","text":"identifiers specify forcing values can provided hector via one myriad halocarbon components. values corresponding identifiers read-(.e., can appear GETDATA messages.) forcings returned relative forcings, base year (typically 1750) values subtracted .","code":""},{"path":"https://jgcri.github.io/hector/reference/haloforcings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for halocarbon forcings — RF_CF4","text":"","code":"RF_CF4() RF_C2F6() RF_HFC23() RF_HFC32() RF_HFC4310() RF_HFC125() RF_HFC134A() RF_HFC143A() RF_HFC227EA() RF_HFC245FA() RF_SF6() RF_CFC11() RF_CFC12() RF_CFC113() RF_CFC114() RF_CFC115() RF_CCL4() RF_CH3CCL3() RF_HCFC22() RF_HCFC141B() RF_HCFC142B() RF_HALON1211() RF_HALON1301() RF_HALON2402() RF_CH3CL() RF_CH3BR()"},{"path":"https://jgcri.github.io/hector/reference/haloforcings.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for halocarbon forcings — RF_CF4","text":"RF_CF4(): Radiative forcing due CF4 RF_C2F6(): Radiative forcing due C2F6 RF_HFC23(): Radiative forcing due HFC-23 RF_HFC32(): Radiative forcing due HFC-32 RF_HFC4310(): Radiative forcing due HFC-4310 RF_HFC125(): Radiative forcing due HFC-125 RF_HFC134A(): Radiative forcing due HFC-134a RF_HFC143A(): Radiative forcing due HFC-143a RF_HFC227EA(): Radiative forcing due HFC227ea RF_HFC245FA(): Radiative forcing due HFC-245fa RF_SF6(): Radiative forcing due sulfur hexafluoride RF_CFC11(): Radiative forcing due CFC-11 RF_CFC12(): Radiative forcing due CFC-12 RF_CFC113(): Radiative forcing due CFC-113 RF_CFC114(): Radiative forcing due CFC-114 RF_CFC115(): Radiative forcing due CFC-115 RF_CCL4(): Radiative forcing due carbon tetrachloride RF_CH3CCL3(): Radiative forcing due trichloroethane RF_HCFC22(): Radiative forcing due HCFC-22 RF_HCFC141B(): Radiative forcing due HCFC-141b RF_HCFC142B(): Radiative forcing due HCCFC-142b RF_HALON1211(): Radiative forcing due halon-1211 RF_HALON1301(): Radiative forcing due halon-1301 RF_HALON2402(): Radiative forcing due halon-2402 RF_CH3CL(): Radiative forcing due chloromethane RF_CH3BR(): Radiative forcing due bromomethane","code":""},{"path":"https://jgcri.github.io/hector/reference/haloforcings.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for halocarbon forcings — RF_CF4","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":null,"dir":"Reference","previous_headings":"","what":"hector: The Hector Simple Climate Model — hector-package","title":"hector: The Hector Simple Climate Model — hector-package","text":"Provides R interface Hector Simple Climate Model. Using interface can set initialize model, change model parameters emissions inputs, run Hector, retrieve model outputs. Note package authors identical C++ model authors.","code":""},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"hector: The Hector Simple Climate Model — hector-package","text":"package allows run Hector Simple Climate Model (SCM) R receive results back R data frames.","code":""},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":"getting-started","dir":"Reference","previous_headings":"","what":"Getting started","title":"hector: The Hector Simple Climate Model — hector-package","text":"run scenario, need scenario input file. Several examples included input directory, can find expression system.file('input', package='hector'). input files names like 'hector_sspNNN.ini', NNN one 119, 126, 245, 370, 434, 460, ssp585. quickstart wrapper called runscenario, takes input file argument, runs scenario, returns results data frame. variables get controlled option setting. Setting option explained manual page fetchvars.","code":""},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":"advanced-usage","dir":"Reference","previous_headings":"","what":"Advanced usage","title":"hector: The Hector Simple Climate Model — hector-package","text":"can get lot control hector run create hector instance (sometimes called \"core\" elsewhere documentation) using newcore function. can run Hector specific dates, fetch results, set parameters input data, rewind earlier date can rerun (e.g., changed emissions parameters). finished hector instance, call shutdown release resources allocated.","code":""},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"hector: The Hector Simple Climate Model — hector-package","text":"Hartin, C. ., Patel, P., Schwarber, ., Link, R. P., Bond-Lamberty, B. P.: simple object-oriented open-source model scientific policy analyses global climate system - Hector v1.0, Geosci. Model Dev., 8, 939-955, https://doi.org/10.5194/gmd-8-939-2015, 2015. Hartin, C. ., Bond-Lamberty, B., Patel, P., Mundra, .: Ocean acidification next three centuries using simple global climate carbon-cycle model: projections sensitivities, Biogeosciences, 13, 4329-4342, https://doi.org/10.5194/bg-13-4329-2016, 2016.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"hector: The Hector Simple Climate Model — hector-package","text":"Maintainer: Kalyn Dorheim kalyn.dorheim@pnnl.gov (ORCID) Authors: Ben Bond-Lamberty bondlamberty@pnnl.gov (ORCID) contributors: Skylar Gering sgering@g.hmc.edu (ORCID) [contributor] Corinne Hartin hartin.corinne@epa.gov (ORCID) [contributor] Robert Link (ORCID) [contributor] Mat Nicholson (mnichol3) [contributor] Pralit Patel pralit.patel@pnnl.gov (ORCID) [contributor] Leeya Pressburger leeya.pressburger@pnnl.gov (ORCID) [contributor, data contributor] Alexey Shiklomanov alexey.shiklomanov@nasa.gov (ORCID) [contributor] Benjamin Vega-Westhoff (ORCID) [contributor] Dawn Woodard dawn.woodard@pnnl.gov (ORCID) [contributor]","code":""},{"path":"https://jgcri.github.io/hector/reference/hectorutil.html","id":null,"dir":"Reference","previous_headings":"","what":"getdate: Get the current date for a Hector instance — getdate","title":"getdate: Get the current date for a Hector instance — getdate","text":"getdate: Get current date Hector instance Utility functions Hector instances isactive: Indicate whether Hector instance active startdate: Report start date Hector instance enddate: Report end date Hector instance getname: Report name Hector instance","code":""},{"path":"https://jgcri.github.io/hector/reference/hectorutil.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"getdate: Get the current date for a Hector instance — getdate","text":"","code":"getdate(core) isactive(core) startdate(core) enddate(core) getname(core)"},{"path":"https://jgcri.github.io/hector/reference/hectorutil.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"getdate: Get the current date for a Hector instance — getdate","text":"core Hector instance operate ","code":""},{"path":"https://jgcri.github.io/hector/reference/inputstable.html","id":null,"dir":"Reference","previous_headings":"","what":"A data.frame containing information on all of the Hector inputs listed in\nan ini file created by save-input-params.R. — inputstable","title":"A data.frame containing information on all of the Hector inputs listed in\nan ini file created by save-input-params.R. — inputstable","text":"data.frame containing information Hector inputs listed ini file created save-input-params.R.","code":""},{"path":"https://jgcri.github.io/hector/reference/inputstable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A data.frame containing information on all of the Hector inputs listed in\nan ini file created by save-input-params.R. — inputstable","text":"","code":"inputstable"},{"path":"https://jgcri.github.io/hector/reference/inputstable.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A data.frame containing information on all of the Hector inputs listed in\nan ini file created by save-input-params.R. — inputstable","text":"data.frame 8 columns 222 rows. section String section ini file parameter parameter String parameter name biome.specific String whether parameter biome-specific time.variant String whether parameter time-variant required String wheterh parameter required default String default value parameter units String parameter units description String brief description parameter ini file","code":""},{"path":"https://jgcri.github.io/hector/reference/loglevels.html","id":null,"dir":"Reference","previous_headings":"","what":"Hector logging levels — LL_DEBUG","title":"Hector logging levels — LL_DEBUG","text":"functions return constants can used newcore set minimum logging level","code":""},{"path":"https://jgcri.github.io/hector/reference/loglevels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hector logging levels — LL_DEBUG","text":"","code":"LL_DEBUG() LL_NOTICE() LL_WARNING() LL_SEVERE()"},{"path":"https://jgcri.github.io/hector/reference/loglevels.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Hector logging levels — LL_DEBUG","text":"LL_DEBUG(): Set logging 'debug' level. LL_NOTICE(): Set logging 'notice' level. LL_WARNING(): Set logging 'warning' level. LL_SEVERE(): Set logging 'severe' level.","code":""},{"path":"https://jgcri.github.io/hector/reference/methane.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","title":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","text":"identifiers correspond variables can read /set methane component.","code":""},{"path":"https://jgcri.github.io/hector/reference/methane.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","text":"","code":"CONCENTRATIONS_CH4() PREINDUSTRIAL_CH4() EMISSIONS_CH4() NATURAL_CH4() LIFETIME_SOIL() LIFETIME_STRAT()"},{"path":"https://jgcri.github.io/hector/reference/methane.html","id":"output-variables","dir":"Reference","previous_headings":"","what":"Output variables","title":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","text":"variables can read methane component. CONCENTRATIONS_CH4 Atmospheric methane concentration PREINDUSTRIAL_CH4 Preindustrial methane concentration","code":""},{"path":"https://jgcri.github.io/hector/reference/methane.html","id":"input-variables","dir":"Reference","previous_headings":"","what":"Input variables","title":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","text":"variables can set methane component. expected units string given description. EMISSIONS_CH4 Methane emissions (\"Tg CH4\") PREINDUSTRIAL_CH4 Preindustrial methane concentration (\"ppbv CH4\") CH4_CONSTRAIN N2O concentration constraint (\"ppbv CH4\") NATURAL_CH4 Natural methane emissions (\"Tg CH4\") LIFETIME_SOIL Time scale methane loss soil (\"Years\") LIFETIME_STRAT Time scale methane loss stratosphere (\"Years\")","code":""},{"path":"https://jgcri.github.io/hector/reference/methane.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/methods.html","id":null,"dir":"Reference","previous_headings":"","what":"Hector instance object methods — methods","title":"Hector instance object methods — methods","text":"Hector instance object methods","code":""},{"path":"https://jgcri.github.io/hector/reference/methods.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hector instance object methods — methods","text":"","code":"# S3 method for hcore format(x, ...) # S3 method for hcore print(x, ...)"},{"path":"https://jgcri.github.io/hector/reference/methods.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Hector instance object methods — methods","text":"x Hector core object ... Additional arguments","code":""},{"path":"https://jgcri.github.io/hector/reference/methods.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Hector instance object methods — methods","text":"format(hcore): Format method print(hcore): Print method","code":""},{"path":"https://jgcri.github.io/hector/reference/msgtype.html","id":null,"dir":"Reference","previous_headings":"","what":"Message type identifiers — GETDATA","title":"Message type identifiers — GETDATA","text":"identifiers indicate type message core can route correct method recipient.","code":""},{"path":"https://jgcri.github.io/hector/reference/msgtype.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Message type identifiers — GETDATA","text":"","code":"GETDATA() SETDATA() BIOME_SPLIT_CHAR()"},{"path":"https://jgcri.github.io/hector/reference/msgtype.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Message type identifiers — GETDATA","text":"GETDATA(): Message type retrieving data component SETDATA(): Message type setting data component BIOME_SPLIT_CHAR(): Character used separate biome variable name","code":""},{"path":"https://jgcri.github.io/hector/reference/msgtype.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Message type identifiers — GETDATA","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":"https://jgcri.github.io/hector/reference/newcore.html","id":null,"dir":"Reference","previous_headings":"","what":"Create and initialize a new hector instance — newcore","title":"Create and initialize a new hector instance — newcore","text":"object returned handle newly created instance. required argument functions operate instance. Creating multiple instances simultaneously supported.","code":""},{"path":"https://jgcri.github.io/hector/reference/newcore.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create and initialize a new hector instance — newcore","text":"","code":"newcore( inifile, loglevel = 0, suppresslogging = TRUE, name = \"Unnamed Hector core\" )"},{"path":"https://jgcri.github.io/hector/reference/newcore.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create and initialize a new hector instance — newcore","text":"inifile (String) name hector input file. loglevel (int) minimum message level output logs (see loglevels). suppresslogging (bool) true, suppress logging (loglevel ignored case). name (string) optional name identify core.","code":""},{"path":"https://jgcri.github.io/hector/reference/newcore.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create and initialize a new hector instance — newcore","text":"handle Hector instance.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/ocean.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for quantities in the ocean component — OCEAN_UPTAKE","title":"Identifiers for quantities in the ocean component — OCEAN_UPTAKE","text":"identifiers correspond variables can read ocean component using GETDATA message type.","code":""},{"path":"https://jgcri.github.io/hector/reference/ocean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for quantities in the ocean component — OCEAN_UPTAKE","text":"","code":"OCEAN_UPTAKE() OCEAN_C() OCEAN_C_HL() OCEAN_C_LL() OCEAN_C_ML() OCEAN_C_IO() OCEAN_C_DO() OCEAN_PREIND_C_SURF() OCEAN_PREIND_C_ID() TT() TU() TWI() TID() PH_HL() PH_LL() PH() HL_OCEAN_UPTAKE() LL_OCEAN_UPTAKE() PCO2_HL() PCO2_LL() PCO2() DIC_HL() DIC() DIC_LL() SST_HL() SST_LL() CO3_LL() CO3_HL() CO3()"},{"path":"https://jgcri.github.io/hector/reference/ocean.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for quantities in the ocean component — OCEAN_UPTAKE","text":"OCEAN_UPTAKE(): Atmosphere-ocean carbon flux OCEAN_C(): Ocean total carbon pool OCEAN_C_HL(): Ocean surface high-latitude carbon pool OCEAN_C_LL(): Ocean surface low-latitude carbon pool OCEAN_C_ML(): Ocean surface mixed layer carbon pool OCEAN_C_IO(): Intermediate ocean carbon pool OCEAN_C_DO(): Deep ocean carbon pool OCEAN_PREIND_C_SURF(): Preindustrial surface ocean carbon pool OCEAN_PREIND_C_ID(): Preindustrial intermediate+deep ocean carbon pool TT(): Thermohaline overturning TU(): High-latitude overturning TWI(): Warm-intermediate exchange TID(): Intermediate-deep exchange PH_HL(): High-latitude pH PH_LL(): Low-latitude pH PH(): Ocean surface pH HL_OCEAN_UPTAKE(): Atmosphere-ocean carbon flux, high-latitude LL_OCEAN_UPTAKE(): Atmosphere-ocean carbon flux, low-latitude PCO2_HL(): Partial pressure CO2, high-latitude PCO2_LL(): Partial pressure CO2, low-latitude PCO2(): Ocean surface partial pressure CO2 DIC_HL(): Dissolved inorganic carbon, high-latitude DIC(): Ocean surface dissolved inorganic carbon DIC_LL(): Dissolved inorganic carbon, low-latitude SST_HL(): Absolute ocean surface temperature, high-latitude (deg C) SST_LL(): Absolute ocean surface temperature, low-latitude (deg C) CO3_LL(): Carbonate concentration, low-latitude CO3_HL(): Carbonate concentration, high-latitude CO3(): Ocean surface carbonate concentration","code":""},{"path":"https://jgcri.github.io/hector/reference/ocean.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for quantities in the ocean component — OCEAN_UPTAKE","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for model parameters — TRACKING_DATE","title":"Identifiers for model parameters — TRACKING_DATE","text":"identifiers correspond settable parameters change model behavior subject uncertainty. can set using SETDATA message type. Changing parameters typically invalidate hector core's internal state; therefore, setting one values call reset attempting run model . rerun spinup produce new internally consistent state. Attempting run model without resetting first usually produce error (often message failing conserve mass).","code":""},{"path":"https://jgcri.github.io/hector/reference/parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for model parameters — TRACKING_DATE","text":"","code":"TRACKING_DATE() PREINDUSTRIAL_CO2() BETA(biome = \"\") Q10_RH(biome = \"\") WARMINGFACTOR(biome = \"\") F_NPPV(biome = \"\") F_NPPD(biome = \"\") F_LITTERD(biome = \"\") ECS() AERO_SCALE() VOLCANIC_SCALE() LO_WARMING_RATIO() DIFFUSIVITY()"},{"path":"https://jgcri.github.io/hector/reference/parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identifiers for model parameters — TRACKING_DATE","text":"biome Biome retrieve parameter. missing `\"\"`, default `\"global\"`.","code":""},{"path":"https://jgcri.github.io/hector/reference/parameters.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for model parameters — TRACKING_DATE","text":"TRACKING_DATE(): Start carbon tracking (Year) PREINDUSTRIAL_CO2(): Preindustrial CO2 concentration (\"ppmv CO2\") BETA(): CO2 fertilization factor (\"(unitless)\") Q10_RH(): Heterotrophic respiration temperature sensitivity factor (\"(unitless)\") WARMINGFACTOR(): Biome-specific warming factor (`(unitless)`) F_NPPV(): NPP fraction vegetation (\"(unitless)\") F_NPPD(): NPP fraction detritus (\"(unitless)\") F_LITTERD(): Litter fraction detritus (\"(unitless)\") ECS(): Equilibrium Climate Sensitivity (\"degC\") AERO_SCALE(): Aerosol forcing scaling factor (\"(unitless)\") VOLCANIC_SCALE(): Volcanic forcing scaling factor (\"(unitless)\") LO_WARMING_RATIO(): Land-Ocean Warming Ratio (\"(unitless)\"), default set 0 meaning land ocean warming ratio emergent property Hector's temperature component otherwise user defined land ocean warming ratio used. DIFFUSIVITY(): Ocean heat diffusivity (\"cm2/s\")","code":""},{"path":"https://jgcri.github.io/hector/reference/parameters.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for model parameters — TRACKING_DATE","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/rename_biome.html","id":null,"dir":"Reference","previous_headings":"","what":"Rename an existing biome — rename_biome","title":"Rename an existing biome — rename_biome","text":"create new biome called `newname`, assign C stocks parameter values biome `oldname`, delete biome `oldname`.","code":""},{"path":"https://jgcri.github.io/hector/reference/rename_biome.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rename an existing biome — rename_biome","text":"","code":"rename_biome(core, oldname, newname)"},{"path":"https://jgcri.github.io/hector/reference/rename_biome.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rename an existing biome — rename_biome","text":"core Handle Hector instance run. oldname (character) Name existing biome replaced newname (character) Name new biome","code":""},{"path":"https://jgcri.github.io/hector/reference/reset.html","id":null,"dir":"Reference","previous_headings":"","what":"Reset a Hector instance to an earlier date — reset","title":"Reset a Hector instance to an earlier date — reset","text":"Resetting model returns state previous time. requested time model start date, spinup rerun, model left ready run start date. (contrast, resetting start date leaves model ready run start date, without rerun spinup.)","code":""},{"path":"https://jgcri.github.io/hector/reference/reset.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reset a Hector instance to an earlier date — reset","text":"","code":"reset(core, date = 0)"},{"path":"https://jgcri.github.io/hector/reference/reset.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reset a Hector instance to an earlier date — reset","text":"core Handle Hector instance reset. date Date reset . default reset model start date rerun spinup.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/rho.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for Hector forcing component parameters — RHO_BC","title":"Identifiers for Hector forcing component parameters — RHO_BC","text":"identifiers specify radiative forcing efficiency hector values can read /set hectors forcing halocarbon components. forcing component.","code":""},{"path":"https://jgcri.github.io/hector/reference/rho.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for Hector forcing component parameters — RHO_BC","text":"","code":"RHO_BC() RHO_OC() RHO_NH3() RHO_SO2() RHO_CF4() RHO_C2F6() RHO_HFC23() RHO_HFC32() RHO_HFC4310() RHO_HFC125() RHO_HFC134A() RHO_HFC143A() RHO_HFC227EA() RHO_HFC245FA() RHO_SF6() RHO_CFC11() RHO_CFC12() RHO_CFC113() RHO_CFC114() RHO_CFC115() RHO_CCL4() RHO_CH3CCL3() RHO_HCFC22() RHO_HCFC141B() RHO_HCFC142B() RHO_HALON1211() RHO_HALON1301() RHO_HALON2402() RHO_CH3CL() RHO_CH3BR()"},{"path":"https://jgcri.github.io/hector/reference/rho.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for Hector forcing component parameters — RHO_BC","text":"RHO_BC(): radiative forcing efficiency BC aerosol-radiation interactions RHO_OC(): radiative forcing efficiency OC aerosol-radiation interactions RHO_NH3(): radiative forcing efficiency NH3 aerosol-radiation interactions RHO_SO2(): radiative forcing efficiency SO2 RHO_CF4(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CF4 RHO_C2F6(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) C2F6 RHO_HFC23(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-23 RHO_HFC32(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-32 RHO_HFC4310(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-4310 RHO_HFC125(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-125 RHO_HFC134A(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-134a RHO_HFC143A(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-143a RHO_HFC227EA(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-227ea RHO_HFC245FA(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-254fa RHO_SF6(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) sulfur hexafluoride RHO_CFC11(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CFC-11 RHO_CFC12(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CFC-12 RHO_CFC113(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CFC-113 RHO_CFC114(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CFC-114 RHO_CFC115(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CFC-115 RHO_CCL4(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) carbon tetrachloride RHO_CH3CCL3(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) trichloroethane ' RHO_HCFC22(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-22 RHO_HCFC141B(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-141b RHO_HCFC142B(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HCFC-142b RHO_HALON1211(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) halon-1211 ' RHO_HALON1301(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) halon-1301 RHO_HALON2402(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) halon-2402 ' RHO_CH3CL(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) chloromethane RHO_CH3BR(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) bromomethane","code":""},{"path":"https://jgcri.github.io/hector/reference/rho.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for Hector forcing component parameters — RHO_BC","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/run.html","id":null,"dir":"Reference","previous_headings":"","what":"Run the Hector climate model — run","title":"Run the Hector climate model — run","text":"Run Hector specified time. function return results run. get results, run fetch.","code":""},{"path":"https://jgcri.github.io/hector/reference/run.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run the Hector climate model — run","text":"","code":"run(core, runtodate = -1)"},{"path":"https://jgcri.github.io/hector/reference/run.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run the Hector climate model — run","text":"core Handle Hector instance run. runtodate Date run . default run end date configured input file used initialize core.","code":""},{"path":"https://jgcri.github.io/hector/reference/run.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run the Hector climate model — run","text":"Hector instance handle","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/runscenario.html","id":null,"dir":"Reference","previous_headings":"","what":"Run a single scenario — runscenario","title":"Run a single scenario — runscenario","text":"Run scenario defined input file return data frame containing results default variable list. default variable list can changed setting hector.default.fetchvars option, described fetchvars.","code":""},{"path":"https://jgcri.github.io/hector/reference/runscenario.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run a single scenario — runscenario","text":"","code":"runscenario(infile)"},{"path":"https://jgcri.github.io/hector/reference/runscenario.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run a single scenario — runscenario","text":"infile INI-format file containing scenario definition","code":""},{"path":"https://jgcri.github.io/hector/reference/runscenario.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run a single scenario — runscenario","text":"Data frame containing Hector output default variables","code":""},{"path":"https://jgcri.github.io/hector/reference/sendmessage.html","id":null,"dir":"Reference","previous_headings":"","what":"Send a message to a Hector instance — sendmessage","title":"Send a message to a Hector instance — sendmessage","text":"Messages mechanism used get data Hector model components set values within components. message comprises type (e.g. GETDATA retrieve data component, SETDATA set data component), capability, identifies information operated (e.g. Atmospheric CO2 concentration, global total radiative forcing), optional structure extra data (comprising date numerical value units). arguments function organized slightly R-friendly way. message type capability passed single string. date portion extra data passed numeric vector (one message generated date). value portion extra data numeric vector length either 1 length date vector.units portion single string (support sending vector values heterogeneous units single call. Either date value () may NA. date NA cases parameter referenced change time. value NA cases optional data ignored.","code":""},{"path":"https://jgcri.github.io/hector/reference/sendmessage.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Send a message to a Hector instance — sendmessage","text":"","code":"sendmessage(core, msgtype, capability, date, value, unit)"},{"path":"https://jgcri.github.io/hector/reference/sendmessage.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Send a message to a Hector instance — sendmessage","text":"core Hector instance msgtype (String) type message. Usually either GETDATA SETDATA capability (String) capability targeted message date (NumericVector NA) Date set/get variable value (NumericVector) Numeric value optional data unit (String) Unit value vector.","code":""},{"path":"https://jgcri.github.io/hector/reference/setvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Set values for a Hector variable — setvar","title":"Set values for a Hector variable — setvar","text":"function selects variable capability name sets requested values requested dates. units must also supplied single string (heterogeneous units supported). checked expected unit code, error signaled match (.e., attempt convert units).","code":""},{"path":"https://jgcri.github.io/hector/reference/setvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set values for a Hector variable — setvar","text":"","code":"setvar(core, dates, var, values, unit)"},{"path":"https://jgcri.github.io/hector/reference/setvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set values for a Hector variable — setvar","text":"core Hector core object dates Vector dates var Capability string variable set values Values set. Must either single value vector length dates. unit Unit string. Can set NA unitless variables.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/shutdown.html","id":null,"dir":"Reference","previous_headings":"","what":"Shut down a hector instance — shutdown","title":"Shut down a hector instance — shutdown","text":"Shutting instance free instance objects created. attempted operation instance raise error.","code":""},{"path":"https://jgcri.github.io/hector/reference/shutdown.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shut down a hector instance — shutdown","text":"","code":"shutdown(core)"},{"path":"https://jgcri.github.io/hector/reference/shutdown.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shut down a hector instance — shutdown","text":"core Handle Hector instance","code":""},{"path":"https://jgcri.github.io/hector/reference/shutdown.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shut down a hector instance — shutdown","text":"Hector instance handle","code":""},{"path":"https://jgcri.github.io/hector/reference/shutdown.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Shut down a hector instance — shutdown","text":"function called mycore <- shutdown(mycore) change active inactive recorded caller.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/so2.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","title":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","text":"identifiers correspond variables can read /set SO2 component","code":""},{"path":"https://jgcri.github.io/hector/reference/so2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","text":"","code":"EMISSIONS_SO2() VOLCANIC_SO2()"},{"path":"https://jgcri.github.io/hector/reference/so2.html","id":"output-variables","dir":"Reference","previous_headings":"","what":"Output variables","title":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","text":"variables can read using GETDATA message type. NATURAL_SO2 Natural SO2 emissions Y2000_SO2 Year 2000 SO2 emissions EMISIONS_SO2 Anthropogenic SO2 emissions VOLCANIC_SO2 Forcing due volcanic SO2 emissions","code":""},{"path":"https://jgcri.github.io/hector/reference/so2.html","id":"input-variables","dir":"Reference","previous_headings":"","what":"Input variables","title":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","text":"variables can set using SETDATA message type. EMISSIONS_SO2 Anthropogenic SO2 emissions (\"Gg S\") VOLCANIC_SO2 Forcing due volcanic SO2 emissions (\"W/m2\")","code":""},{"path":"https://jgcri.github.io/hector/reference/so2.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/split_biome.html","id":null,"dir":"Reference","previous_headings":"","what":"Create new biomes by splitting up an existing biome — split_biome","title":"Create new biomes by splitting up an existing biome — split_biome","text":"Distributes vegetation, detritus, soil C, initial NPP flux existing biome across multiple new biomes.","code":""},{"path":"https://jgcri.github.io/hector/reference/split_biome.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create new biomes by splitting up an existing biome — split_biome","text":"","code":"split_biome( core, old_biome, new_biomes, fveg_c = rep(1/length(new_biomes), length(new_biomes)), fdetritus_c = fveg_c, fsoil_c = fveg_c, fpermafrost_c = fveg_c, fnpp_flux0 = fveg_c, ... )"},{"path":"https://jgcri.github.io/hector/reference/split_biome.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create new biomes by splitting up an existing biome — split_biome","text":"core Hector core old_biome Name biome split new_biomes Names biomes created fveg_c Fractions vegetation C distributed biome new_biomes; must length . Default split vegetation C evenly biomes. fdetritus_c Fractions detritus C distributed biome. Defaults value fveg_c. fsoil_c Fractions soil C distributed biome. Defaults value fveg_c. fpermafrost_c Fraction permafrost C distributed biome. Defaults value fveg_c. fnpp_flux0 Fraction initial NPP flux distributed biome. Defaults value fveg_c. ... Additional biome parameters passed create_biome.","code":""},{"path":"https://jgcri.github.io/hector/reference/temperature.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for variables associated with the temperature component — GLOBAL_TAS","title":"Identifiers for variables associated with the temperature component — GLOBAL_TAS","text":"variables can read using GETDATA message type.","code":""},{"path":"https://jgcri.github.io/hector/reference/temperature.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for variables associated with the temperature component — GLOBAL_TAS","text":"","code":"GLOBAL_TAS() GMST() SST() OCEAN_TAS() LAND_TAS() FLUX_MIXED() FLUX_INTERIOR() HEAT_FLUX()"},{"path":"https://jgcri.github.io/hector/reference/temperature.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for variables associated with the temperature component — GLOBAL_TAS","text":"GLOBAL_TAS(): Global mean air temperature anomaly GMST(): Global mean surface temperature anomaly SST(): Average sea surface temperature anomaly OCEAN_TAS(): Average air temperature anomaly ocean LAND_TAS(): Average air temperature anomaly land, land surface temperature air temperature land assumed equivalent. FLUX_MIXED(): Heat flux mixed layer ocean FLUX_INTERIOR(): Heat flux interior layer ocean HEAT_FLUX(): Total heat flux ocean","code":""},{"path":"https://jgcri.github.io/hector/reference/temperature.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for variables associated with the temperature component — GLOBAL_TAS","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/unitstable.html","id":null,"dir":"Reference","previous_headings":"","what":"A data.frame containing information on all of the Hector variable created by units-data.R\nused within the getunits function. — unitstable","title":"A data.frame containing information on all of the Hector variable created by units-data.R\nused within the getunits function. — unitstable","text":"data.frame containing information Hector variable created units-data.R used within getunits function.","code":""},{"path":"https://jgcri.github.io/hector/reference/unitstable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A data.frame containing information on all of the Hector variable created by units-data.R\nused within the getunits function. — unitstable","text":"","code":"unitstable"},{"path":"https://jgcri.github.io/hector/reference/unitstable.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A data.frame containing information on all of the Hector variable created by units-data.R\nused within the getunits function. — unitstable","text":"data.frame 2 columns 114 rows. variable String hector variable units String unit value","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-311","dir":"Changelog","previous_headings":"","what":"hector 3.1.1","title":"hector 3.1.1","text":"Return global mean surface temperature Hector output.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-301","dir":"Changelog","previous_headings":"","what":"hector 3.0.1","title":"hector 3.0.1","text":"Minor documentation change citation file.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-300","dir":"Changelog","previous_headings":"","what":"hector 3.0.0","title":"hector 3.0.0","text":"Updated parameterization, incorporating latest consensus science best model performance relative historical observations New radiative forcing calculations consistency AR6 Better complete software tests; many bug fixes Updated RCPs SSPs default included scenarios New net biome production (land-atmosphere carbon exchange) constraint New online documentation Experimental implementation permafrost implementation: models permafrost thaw well CO2 CH4 release; optional currently default. See Woodard et al. 2021 New carbon tracking: lets users trace origin fate CO2-C within Hector’s carbon cycle; optional currently default see carbon tracking example additional details can found changes documented Dorheim et al. prep Variable name changes see v3 variable changes details","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-250","dir":"Changelog","previous_headings":"","what":"hector 2.5.0","title":"hector 2.5.0","text":"Register Ftalbedo input Add non CO2 GHG constraints Version Hector participated RCMIP RCMIP II","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-230","dir":"Changelog","previous_headings":"","what":"hector 2.3.0","title":"hector 2.3.0","text":"Constrain atmospheric CO2 concentration equal preindustrial concentration model spinup. result concentration beginning simulation equal value specified PREINDUSTRIAL_CO2 parameter, case previously.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-222","dir":"Changelog","previous_headings":"","what":"hector 2.2.2","title":"hector 2.2.2","text":"Fix bug causing requests H2O forcing R interface return N2O forcing instead (model internals unaffected). Fix bug causing API requests halocarbon forcing return absolute forcing values, rather values relative base year (done forcings). Add missing RF_VOL (volcanic forcing) dependency forcing component. practice missing dependency effect forcing component already dependency SO2 component, also provides volcanic forcing, event ever split , ensure dependency graph still valid. (2.2.2 changes merged PR #303)","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-221","dir":"Changelog","previous_headings":"","what":"hector 2.2.1","title":"hector 2.2.1","text":"Report global averages land temperature, ocean air temperature, ocean surface temperature. Fix bug prevented CH4 emissions read.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-220","dir":"Changelog","previous_headings":"","what":"hector 2.2.0","title":"hector 2.2.0","text":"Add new parameter: VOLCANIC_SCALE. parameter adjusts strength response volcanic forcing. (PR #291) Add getname() function return name Hector core.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-210","dir":"Changelog","previous_headings":"","what":"hector 2.1.0","title":"hector 2.1.0","text":"Add reset() function API. Calling function resets Hector core earlier time, rerunning spinup appropriate. (PR #243)","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-200","dir":"Changelog","previous_headings":"","what":"hector 2.0.0","title":"hector 2.0.0","text":"Incorporated 1-D diffusive ocean heat model new temperature component (DOECLIM) (PR #206) Bugfix: double counting halocarbon radiative forcing (PR #201) Bugfix: re-enabled CO2 concentration constraint (PR #163) Various changes internals support calling Hector external code like pyhector Component loggers now optional (PR #218) Renamed anthro emissions ffi emissions (fossil fuel industrial) (PR #116)","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-112","dir":"Changelog","previous_headings":"","what":"hector 1.1.2","title":"hector 1.1.2","text":"Add libhector target OS X Windows project files (already available Linux build). library used want link Hector outside program.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-111","dir":"Changelog","previous_headings":"","what":"hector 1.1.1","title":"hector 1.1.1","text":"Fix OS X build Update sample output files Add GPL license","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-11","dir":"Changelog","previous_headings":"","what":"hector 1.1","title":"hector 1.1","text":"API linking external models. Backend R scripts faster cleaner. Minor bug fixes documentation updates.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-10","dir":"Changelog","previous_headings":"","what":"hector 1.0","title":"hector 1.0","text":"First release. Corresponds Hartin et al. (2015).","code":""}]
+[{"path":[]},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported project leads, Kalyn Dorheim /Ben Bond-Lamberty. complaints reviewed investigated promptly fairly. Community leaders obligated respect privacy security reporter incident. code conduct, including consequences laid , applies equally community leaders, course. temporary permanent ban result person question removed leadership.","code":""},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://jgcri.github.io/hector/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/ code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https:// www.contributor-covenant.org/translations.","code":""},{"path":"https://jgcri.github.io/hector/articles/AddNewComponent.html","id":"step-one","dir":"Articles","previous_headings":"","what":"Step one:","title":"Add a new Hector component","text":"Add two new files: header file inst/include/X.hpp corresponding source file src/core/X.cpp best copy modify corresponding files already constructed component.","code":""},{"path":"https://jgcri.github.io/hector/articles/AddNewComponent.html","id":"step-two-within-x-hpp","dir":"Articles","previous_headings":"","what":"Step two (within X.hpp):","title":"Add a new Hector component","text":"private, list variables used component corresponding type. Hector’s ability reset, every state variable generally needs associated time series history variable. example: tseries x create time series. unitval x declare value associated units. double x","code":""},{"path":"https://jgcri.github.io/hector/articles/AddNewComponent.html","id":"step-three-within-x-cpp","dir":"Articles","previous_headings":"","what":"Step three (within X.cpp):","title":"Add a new Hector component","text":"Make sure #include X.hpp. class constructor variable tseries, add variables allowing interpolation corresponding names Within X::init Inform core data component can provide (registerCapability) data component depends (registerDependency) Within X::setData Set data used inputs within component, typically coming INI file. examples tseries vs. unitvals Time Series. Within X::prepareToRun code can vary can hard-coded parameters coded. Within X::run run method contains equations code used component. want log statement, written component’s log. Within X::getData data component can provide another component data generated within component. [[examples tseries vs. unitvals getData|AddTSeries]]. Within X::shutDown","code":"XComponent::XComponent() { X_emissions.allowInterp( true ); X_emissions.name = X_COMPONENT_NAME; core->registerCapability( D_ATMOSPHERIC_X, getComponentName() ); core->registerDependency( D_LIFETIME_X, getComponentName() ); H_LOG( logger, Logger::DEBUG ) << \"Year \" << runToDate << \" X concentration = \" << X.get( runToDate ) << std::endl; H_LOG( logger, Logger::DEBUG ) << \"goodbye \" << getComponentName() << std::endl; logger.close();"},{"path":"https://jgcri.github.io/hector/articles/AddNewComponent.html","id":"step-four-outside-of-x-cpp-and-x-hpp","dir":"Articles","previous_headings":"","what":"Step four (Outside of X.cpp and X.hpp):","title":"Add a new Hector component","text":"avistor.hpp Add class XComponent declarations subclasses add virtual void visit( XComponent*c ) {} core.cpp Add #include \"xcomponent.hpp\" Core::init() section add code create new component: component_names.hpp component names: #define X_COMPONENT_NAME “x” component_data.hpp Define variables within component; string passed core via sendMessage via R wrapper. #define D_ATMOSPHERIC_X \"X\" csv_outputstream_visitor.cpp (visitor necessary; see particular carbon-tracking visitor) need add code write component’s outputs: #include 'xcomponent.hpp' Finally, csv_outputsream_visitor.hpp","code":"temp = new XComponent(); modelComponents[ temp-->getComponentName() ] = temp; void CSVOutputStreamVisitor::visit( XComponent* c ) { if( !core->outputEnabled( c->getComponentName() ) && !in_spinup ) return; STREAM_MESSAGE_DATE( csvFile, c, D_X_COMPONENT, current_date ); } under public `virtual void visit( XComponent* c);`"},{"path":"https://jgcri.github.io/hector/articles/AddNewVariable.html","id":"c-changes","dir":"Articles","previous_headings":"","what":"C++ Changes","title":"Add a new variable","text":"hector.ini corresponding component add variable Ex: SN = 42000; component_data.hpp Add variable tseries, unitval, double, etc. add associated time series (necessary; see ). Define variables added Ex: # define D_ATMOSPHERIC_SO2 \"SN\" names match internal component variables INI definition match appears quotes. X_component.cpp init, need register capability core->registerCapability( D_ATMOSPHERIC_SO2, getComponentName() ); getData setData, add new variables Error message. See tseries documentation information getData (getData) (setData) variable used X_component.cpp example, adding variable within forcing component: unitval SN = core->getData( D_ATMOSPHERIC_SO2, runToDate); variable unitval, relevant code file must include unitval.hpp.","code":"else if(varName == D_ATMOSPHERIC_SO2 ) { returnval = SN; else if( varName == D_ATMOSPHERIC_SO2 ) { H_ASSERT( data.date == Core::undefinedIndex(), \"date not allowed\"); SN.set( lexical_cast( value ), U_GG ); }"},{"path":"https://jgcri.github.io/hector/articles/AddNewVariable.html","id":"R","dir":"Articles","previous_headings":"","what":"R changes","title":"Add a new variable","text":"order able use R Hector setvar fetchvars functions, add helper function rcpp_constants.cpp example GLOBAL_TAS() used get global mean temperature data.","code":"//' @describeIn DocumentationGroupName A description of the variable name. //' @export // [[Rcpp::export]] String R_FUNCTION_NAME() { return D_VARIABLE_NAME; } //' @describeIn temperature Global mean temperature anomaly //' @export // [[Rcpp::export]] String GLOBAL_TAS() { return D_GLOBAL_TEMP; }"},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"r-hector","dir":"Articles","previous_headings":"","what":"R Hector","title":"Installing and building Hector","text":"install R, follow official instructions platform. Follow YouTube video continue reading. install version associated current main git branch GitHub, use remotes::install_github` function. automatically install Hector’s dependencies well. (Note requires compiling source, need C compiler installed configured.) Windows, also need install Rtools. Download instructions can found . installation, another step put Rtools make utilities system PATH. allow compile R packages. , create text file .Renviron Documents folder following line: PATH=\"${RTOOLS40_HOME}\\usr\\bin;${PATH}\". can done either text editor R : Remember restart R (Rstudio) verify make can found. Executing Sys.(\"make\") show path Rtools installation. Mac OS Linux, required tools included part standard R installation. Hector’s mandatory dependencies listed DESCRIPTION file Imports, currently follows: Rcpp – Facilitates integration C++ code R packages BH – Boost C++ header files","code":"writeLines('PATH=\"${RTOOLS40_HOME}\\\\usr\\\\bin;${PATH}\"', con = \"~/.Renviron\") # If the `remotes` package isn't installed, first run: # install.packages(\"remotes\") remotes::install_github(\"jgcri/hector\")"},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"standalone-executable","dir":"Articles","previous_headings":"","what":"Standalone Executable","title":"Installing and building Hector","text":"Hector can also compiled standalone executable. Unlike R package, method installation automatically pull dependencies, install manually. Hector’s external dependency, Boost, free, peer-reviewed portable C++ source library, available http://www.boost.org/. Hector primarily uses Boost “header-” libraries, need compiled independently need extracted included Hector source. Note C++ compiler standard library support C++ 17 standard Boost system filesystem libraries need compiled/installed (see ).","code":""},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"command-line-linux-mac-osx","dir":"Articles","previous_headings":"Standalone Executable","what":"Command Line (Linux & Mac OSX)","title":"Installing and building Hector","text":"Hector makefiles look Boost libraries headers certain locations; defaults can overridden setting following environment variables: BOOSTROOT (default /usr/local/). variable contain full name directory include/ lib/ subdirectories contain, respectively, Boost header library files. installed Boost using package manager, likely . built Boost source used tool Homebrew install Boost, need set variable explicitly. Alternatively, header library locations subdirectories single directory, can set BOOSTINC BOOSTLIB variables respective locations. case, BOOSTROOT ignored. GTROOT (default /usr/local/). variable contain full name directory include/ lib/ subdirectories contain, respectively, Googletest header library files. Alternatively, header library locations subdirectories single directory, can set GTINC GTLIB variables locations. case, GTROOT ignored. Note needed want run Hector unit tests. ’s needed running model. Shared Library Search Path C++ compiler standard library support C++ 17 standard (see ), Boost libraries used Hector compiled shared libraries must loaded run time. best libraries directories part system’s shared library search path. many systems /usr/local already path. unable add library installation directory library search path, need add installation directory environment variable LD_LIBRARY_PATH. Try use approach can help , can cause conflicts software system. Instead, ask system administrator ldconfig right .","code":""},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"build-run-hector","dir":"Articles","previous_headings":"Standalone Executable > Command Line (Linux & Mac OSX)","what":"Build & Run Hector","title":"Installing and building Hector","text":"necessary libraries installed, change top-level Hector directory type make hector. Hector executable built source/ subdirectory. ever need rebuild, can type make clean clear away executable intermediate files. two additional environment variables can use fine-tune build process. CXXEXTRA variable passed C++ compiler. can use variable pass extra options compiler without changing Makefile. particular, specifying optimization options CXXEXTRA -O -O0 override default value -O3. CXXPROF variable passed compiler linker. intended turn performance profiling, must specified compile link stages build, generally either unset (normal operation) set -pg (profiling). Profiling slows code dramatically, use , sure unset CXXPROF, clean build directories make clean, rebuild ready go back production runs.","code":""},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"no-stdfilesystem-support","dir":"Articles","previous_headings":"Standalone Executable > Command Line (Linux & Mac OSX) > Build & Run Hector","what":"No std::filesystem Support","title":"Installing and building Hector","text":"C++ compiler standard library old, support C++ 17 std::filesystem. case may receive errors building Hector following: versions macOS prior Catalina (10.15): case, can set environment variable: need Compile Boost Libraries – specifically, system filesystem libraries. Finally, ensure environment variable BOOSTROOT BOOSTLIB set properly (see ).","code":"g++ -L. -o hector main.o -lhector -lm ./libhector.a(ini_to_core_reader.o): In function `boost::filesystem::exists(boost::filesystem::path const&)': /pic/projects/GCAM/GCAM-libraries/include/boost/filesystem/operations.hpp:404: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' ini_to_core_reader.cpp:159:17: error: 'path' is unavailable: introduced in macOS 10.15 fs::path csvFilePath( csvFileName ); ^ export NO_CXX17=1"},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"running-hector","dir":"Articles","previous_headings":"Standalone Executable > Command Line (Linux & Mac OSX) > Build & Run Hector","what":"Running Hector","title":"Installing and building Hector","text":"Run Hector terminal: build run Hector unit tests, type make testing ","code":"./src/hector ./inst/input/name-of-ini.ini ./src/unit-testing/hector-unit-tests"},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"xcode-mac-os-x","dir":"Articles","previous_headings":"Standalone Executable","what":"Xcode (Mac OS X)","title":"Installing and building Hector","text":"directions assume basic familiarity Xcode Mac OS X software installation. Install Xcode necessary. Hector built tested MacOS >= 10.8.5, Monterey (12.6.1). project files Xcode 14.1. Download install Boost, following instructions . Download Hector zip file check repository using Git. Xcode, open project file project_files/Xcode/hector.xcodeproj. Xcode project file configured use constants defining custom paths, rather hard-coded paths. means developers users can set paths without overwriting . BOOSTROOT root directory Boost headers can found boost/. HECTORDIR set root directory model (repository root) Xcode use path ini files used various schemes write csv files output directory. want build Hector’s testing framework (hector-tests target; optional relevant C++ developers) add GTEST GTESTLIB custom paths Xcode; analogous Boost counterparts. need install googletest machine. point ready go: Build project, making sure ’re building hector target. Run! run different scenario, change current Scheme settings (Scheme->Edit Scheme) modify add command-line argument (Arguments tab, e.g. “./inst/input/hector_ssp245.ini”). Xcode profile file includes hector-tests target builds unit testing framework described . Xcode Resources Xcode Schemes Xcode Debugging","code":""},{"path":"https://jgcri.github.io/hector/articles/BuildHector.html","id":"visual-studio-microsoft-visual-c","dir":"Articles","previous_headings":"Standalone Executable","what":"Visual Studio / Microsoft Visual C++","title":"Installing and building Hector","text":"Install Visual Studio sure Visual C++ add-well. Download install Boost. BOOSTROOT location installed Boost (e.g. C:\\boost_1_75_0) Open Visual Studio project file located Hector repository project_files/VS/hector.sln Build hector target CMD prompt: project_files/VS/x64/Release/hector.exe ./inst/input/name--ini.ini Visual Studio debugger (working directory default project_files/VS): x64/Release/hector.exe ../../inst/input/name--ini.ini","code":""},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"setting-constraints-in-hector","dir":"Articles","previous_headings":"","what":"Setting Constraints in Hector","title":"Constraints","text":"two ways activate constraint Hector: ini file setvar() function R. generic overview two different approaches. See specific implementation constraints.","code":""},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"constraints-via-the-ini-file","dir":"Articles","previous_headings":"Setting Constraints in Hector","what":"Constraints via the ini file","title":"Constraints","text":"Hector input file broken sections [core], [temperature], [carbon-cycle-solver], . Within section, users can define parameter values pass input variables – including constraints. constraint variables named pattern variable_constrain points csv file variables’ time series defined. line starts symbol ;, constraint Hector free running. constraint line beings without ;, Hector using constraint user-provided data used lieu Hector’s internal calculations. Changes constraints input files apply Hector runs executed command line R interface.","code":""},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"constraints-via-setvar","dir":"Articles","previous_headings":"Setting Constraints in Hector","what":"Constraints via setvar()","title":"Constraints","text":"Hector R package, setvar() function can used set constraints Hector instance. See specific examples run help(\"constraints\") help(\"haloconstrain\") static R help documentation.","code":""},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"discontinuous-constraints","dir":"Articles","previous_headings":"Setting Constraints in Hector","what":"Discontinuous constraints","title":"Constraints","text":"Hector perform interpolation constraints – constraints applied exact years provided user, years (including immediately constrained years) treated unconstrained (typically, emissions-driven). means constraints can abruptly force Hector’s climate system state inconsistent previous time step. Concentrations first year constraint can discontinuous compared previous year without constraint. Concentrations last year constraint necessarily discontinuity, behavior corresponding component related components may change point. user’s responsibility make sure constraints continuous.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"atmospheric-co2","dir":"Articles","previous_headings":"Current Constraint Capabilities","what":"Atmospheric CO2","title":"Constraints","text":"CO\\(_2\\) concentrations ([CO\\(_2\\)], given ppmv CO\\(_2\\)) largest effect total radiative forcing affected carbon-cycle climate interactions. Running Hector CO\\(_2\\) concentration constraint turned mimics default behavior Earth System Models GHG concentration driven. capability also helpful debugging. atmospheric CO\\(_2\\) constraint turned , carbon-cycle climate feedback parameters (\\(Q_{10}\\) \\(\\beta\\)) essentially ignored. Uncommenting (removing ;) following line [simpleNbox] section input file turn atmospheric CO\\(_2\\) concentration constraint . model’s atmospheric CO\\(_2\\) concentration ([CO\\(_2\\)], given ppmv CO\\(_2\\)) follow contents file (must include least two columns titled Date CO2_constrain). Alternatively, Hector’s atmospheric CO\\(_2\\) concentration constraint can set using setvar() function CO2_CONSTRAIN(). example R. Plot results free running Hector constrained Hector. constraint implemented Hector (C++) CO\\(_2\\) constraint applied end current time step. full sequence events follows: First, model solves current time-step’s carbon cycle conditioned previous time step’s carbon pools, ignoring CO\\(_2\\) constraint. , CO\\(_2\\) constraint present, Hector calculates difference calculated atmospheric CO\\(_2\\) prescribed CO\\(_2\\) constraint. target atmospheric CO\\(_2\\) concentration lower calculated CO\\(_2\\), excess carbon transferred atmosphere deep ocean; conversely, target atmospheric CO\\(_2\\) concentration greater calculated value, additional carbon transferred deep ocean atmosphere. Finally, Hector records current atmospheric CO\\(_2\\) concentration (now equal constraint value); value used next time step’s evaluation carbon-climate feedbacks (e.g. CO\\(_2\\) fertilization net primary productivity, surface ocean carbonate chemistry…). words, atmospheric CO\\(_2\\) constraint time \\(t\\) affect carbon-climate feedbacks \\(t+1\\). CO\\(_2\\) constraint need span entirety Hector simulation, even continuous. given time step, Hector check whether CO\\(_2\\) constraint exists time step apply constraint present. means “hybrid” runs possible, specific time ranges CO\\(_2\\) constraints others calculate atmospheric carbon pool CO\\(_2\\) concentrations according Hector’s standard carbon cycle.","code":";CO2_constrain=csv:path/to/constraint/file.csv # Set up an instance of Hector & run, this is the free running Hector to be # used as a comparison to the constrained Hector ini <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") core <- newcore(ini, name = \"ssp245\") invisible(run(core)) # `invisible` prevents Hector core info from being printed out # Extract the output dates_to_keep <- 1850:2100 vars_to_keep <- c(ATMOSPHERIC_CO2(), RF_TOTAL(), GLOBAL_TAS()) free_out <- fetchvars(core, 1850:2100, vars = vars_to_keep) # Make a time series of new CO2 values to use as the constraint constraint_yrs <- 1950:2050 new_co2 <- seq(from = 200, to = 400, length.out = length(constraint_yrs)) # Use setvar() to set up the the constraint, reset and run Hector, and fetch the results setvar(core, dates = constraint_yrs, var = CO2_CONSTRAIN(), values = new_co2, unit = getunits(CO2_CONSTRAIN())) reset(core) ## Hector core: ssp245 ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini invisible(run(core)) constrained_out <- fetchvars(core, 1850:2100, vars = vars_to_keep)"},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"non-co2-concentrations","dir":"Articles","previous_headings":"Current Constraint Capabilities","what":"Non CO2 concentrations","title":"Constraints","text":"Hector can constrain non CO\\(_2\\) GHG concentrations (N\\(_2\\)O, CH\\(_4\\), halocarbons). work --less way atmospheric CO\\(_2\\) constraint (), except equivalent carbon pool adjustment gases. input file, triggered line like following corresponding component section: CSV inputs, /path//file.csv must include columns Date X_constrain. Alternatively, constraints can set R interface using setvar(). Implementing constraints follows pattern temperature, radiative forcing, atmospheric CO\\(_2\\): Set active Hector core, use setvar() set constraint, run, fetch output Hector core. constraint implemented Hector (C++) using CH4 example given time step, Hector check constraint value time step (e.g. CH4_constrain.exists(t)). constraint exists, Hector skip atmospheric chemistry calculations set corresponding atmospheric concentration value constraint value (e.g. CH4.set(t, CH4_constrain.get(t)). constraint exist, Hector proceed standard atmospheric chemistry routines calculating atmospheric concentration based emissions concentrations relevant species. means concentration constraints always take precedence emissions; words, particular time step emissions concentration constraint, emissions constraint ignored. Note CH\\(_4\\) N\\(_2\\)O special variables pre-industrial concentration conflict constraint. Hector, concentration constraints take precedence pre-industrial concentrations; words, Hector assumes provide concentration constraint pre-industrial timestep, concentration want, regardless prescribed pre-industrial value. equations CH\\(_4\\) N\\(_2\\)O concentrations radiative forcing parameterized specific pre-industrial concentrations. Users must cautions changes pre-industrial values may affect radiative forcing calculations.","code":"X_constrain=csv:path/to/file.csv"},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"radiative-forcing","dir":"Articles","previous_headings":"Current Constraint Capabilities","what":"Radiative forcing","title":"Constraints","text":"model’s global radiative forcing Ftot drives global temperature changes can constrained. Free running Hector calculates Ftot based radiative forcing contributions GHG concentrations, aerosol emissions, forcing inputs [UNSURE WORDING] (e.g. land albedo solar forcing). Using radiative forcing constraint Ftot_constrain means parameters /variables affect radiative forcing (carbon cycle feedback parameters emissions) affect Ftot constraint effect. model extrapolate within Ftot_constrain necessary, beyond endpoints. Hector’s internal date passes last date Ftot_constrain, model’s forcing component becomes unconstrained. Uncommenting (removing ;) following line [forcing] section input file turn radiative forcing constraint . example using R package implement radiative forcing constraint. Plot total radiative forcing global mean temperature. Recall constraint effect 1950 2050.","code":";Ftot_constrain=csv:path/to/constraint/file.csv # Set up an instance of Hector & run ini <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") core <- newcore(ini, name = \"ssp245\") invisible(run(core)) # the invisible call prevents Hector core info from being printed out # Extract the output. dates_to_keep <- 1850:2100 vars_to_keep <- c(RF_TOTAL(), GLOBAL_TAS()) free_out <- fetchvars(core, 1850:2100, vars = vars_to_keep) # Make a time series of new RF values to use as the RF constraint. We are only # going to change the RF for a subset of the years. new_rf <- free_out[free_out$variable == RF_TOTAL() & free_out$year %in% 1950:2050, ] new_rf$value <- new_rf$value + 3 # increase the total RF # Use setvar() to set up the the constraint, reset and run Hector, and fetch the results. setvar(core, dates = new_rf$year, var = FTOT_CONSTRAIN(), values = new_rf$value, unit = \"W/m2\") reset(core) ## Hector core: ssp245 ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini invisible(run(core)) constrained_out <- fetchvars(core, 1850:2100, vars = vars_to_keep)"},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"temperature","dir":"Articles","previous_headings":"Current Constraint Capabilities","what":"Temperature","title":"Constraints","text":"Uncommenting (removing ;) following line [temperature] section input file turn global mean constraint . model’s global mean temperature global_tas follow contents file (must contain columns titled Date tas_constrain; sample file included repository (see inst/input/tables/tgav_historical.csv). model extrapolate within data necessary, beyond endpoints. Hector’s internal date passes last date constraint file, model’s temperature component becomes unconstrained, except permit suddenly jump new temperature. Instead, changes global radiative forcing (temperature change computed) applied end--constraint temperature. details, see detailed comments TemperatureComponent::run (temperature_component.cpp). example using R package implement global average mean temperature (global_tas) constraint. Plot total radiative forcing global mean temperature. Recall constraint effect 1950 2050.","code":"tas_constrain=csv:path/to/constraint/file.csv # Set up an instance of Hector & run ini <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") core <- newcore(ini, name = \"ssp245\") invisible(run(core)) # `invisible` prevents Hector core info from being printed # Extract the output dates_to_keep <- 1850:2100 vars_to_keep <- c(GLOBAL_TAS()) free_out <- fetchvars(core, 1850:2100, vars = vars_to_keep) # Make a time series of new temperature values to use as the constraint new_tgav <- free_out[free_out$variable == GLOBAL_TAS(), ] new_tgav$value <- new_tgav$value + new_tgav$value * 0.25 # increase global temp by 25% # Use setvar() to set up the the constraint, reset and run Hector, and fetch the results setvar(core, dates = new_tgav$year, var = TAS_CONSTRAIN(), values = new_tgav$value, unit = getunits(TAS_CONSTRAIN())) reset(core) ## Hector core: ssp245 ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini invisible(run(core)) constrained_out <- fetchvars(core, 1850:2100, vars = vars_to_keep)"},{"path":"https://jgcri.github.io/hector/articles/Constraints.html","id":"nbp","dir":"Articles","previous_headings":"Current Constraint Capabilities","what":"NBP","title":"Constraints","text":"NBP constraint can activated via ini file adding line [simpleNbox] section input file, constraint csv file columns titled Date NBP_constrain similar sample file included repository (see inst/input/tables/tgav_historical.csv). example implemented R interface Plot results free running Hector constrained Hector. model hits constraint exactly raising RH lowering NPP. , atmospheric CO\\(_2\\) rises rapidly constraint period, ’ve basically shut land C sink. result, model exits constraint period, NPP shoots high (atmosphere saturated CO\\(_2\\)). similar vein, suppressed NPP means, outside constraint, RH low thus land becomes large sink draws excess atmospheric CO\\(_2\\).","code":"NBP_constrain=csv:path/to/constraint/file.csv constraint_yrs <- 2001:2010 constraint_values <- c(0.1, 0.2, 0.3, -0.4, -0.5, -0.6, 0.7, 0.8, 0.9, 1.0) ini <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") core <- newcore(ini, name = \"ssp245\") invisible(run(core)) # `invisible` prevents Hector core info from being printed out # Extract the output dates_to_keep <- 1850:2100 vars_to_keep <- c(ATMOSPHERIC_CO2(), NBP(), NPP(), RH()) free_out <- fetchvars(core, 1850:2100, vars = vars_to_keep) # Use setvar() to set up the the constraint, reset and run Hector, and fetch the results setvar(core, dates = constraint_yrs, var = NBP_CONSTRAIN(), values = constraint_values, unit = getunits(NBP_CONSTRAIN())) reset(core) ## Hector core: ssp245 ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini invisible(run(core)) constrained_out <- fetchvars(core, 1850:2100, vars = vars_to_keep)"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Hector External API","text":"Hector external API allows another program execute one Hector runs within another program. functionality available stand-alone version Hector available API. fact, stand-alone Hector implemented wrapper around series calls API. Therefore, program using Hector API can following: * Set one Hector instances read configuration files. * Set emissions values. * Run Hector specified date, resuming wherever model last stopped. * Retrieve current concentrations forcings. many ways capabilities can used, examples concentrate one work flow interesting integrated assessment (IA) model users: Set Hector. Run start date IA model using stored historical emissions. Run IA model step. Set Hector emissions IA model outputs. Run Hector start next IA model step. Read Hector outputs. Repeat steps 3-6 desired end date reached.","code":""},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"requirements","dir":"Articles","previous_headings":"","what":"Requirements","title":"Hector External API","text":"Hector API supported Hector version 1.1 later. written C++. use , either code must written C++, need way calling C++ functions whatever language using. instructions presuppose Linux install, basic procedure, tweaking file paths , work Windows Mac systems.","code":""},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"installation-and-setup","dir":"Articles","previous_headings":"","what":"Installation and Setup","title":"Hector External API","text":"Install build Hector normally. build process produce library called libhector.. need link file executable build program. place store libraries (e.g., /usr/local/lib), can copy , can just use place wish. also need able include Hector header files code. found ‘headers’ directory directory installed Hector. copy entire directory tree something like /usr/include/hector wish, ’s probably just easy leave . don’t absolutely need files Hector directories, others might useful examples. file src/main.cpp example use API get data Hector. can build example code uncommenting lines Makefile: run make hector-api build example. top-level Hector directory, run hector-api input/api-example.ini run example code. example code reads emissions several gases files input/emissions directory loads emissions Hector core API. Emissions remaining gases set input file, stand-alone version Hector.","code":"# hector-api: libhector.a main-api.o # $(CXX) $(LDFLAGS) -o hector-api main-api.o -lhector -lgsl -lgslcblas -lm"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"using-the-api","dir":"Articles","previous_headings":"","what":"Using the API","title":"Hector External API","text":"Hector classes (one exception) contained Hector:: namespace. classes needed use Hector API : Hector::Core Master controller mediates interactions Hector components outside code. Hector::unitval Structure representing numerical value attached units. Values send receive Hector packaged structure. unitval class implicit conversion double defined, strips unit returns numerical value. Writing unitval std::ostream writes value unit (e.g. 12345 Tg). Hector::message_data Structure holding messages Hector components. message_data can hold variety different message types, messages outside Hector, message either date (retrieving data component), date paired unitval (sending data component). Hector::Logger Hector’s logging class. need deal want attach loggers Hector components. Hector::INIToCoreReader Helper class used initialization. Hector::CSVOutputStreamVisitor Class formats writes Hector’s output. need want Hector produce native output. planning retrieving data Hector using code’s output mechanism, can skip . h_exception Exception class. something goes wrong Hector throw class exception. Hector core interface controlling interacting simulation. run simulation, use core’s run method. get component something, tell Hector core send component message. type message determines component response, contents message provide input whatever component . core routes message returns response, . message comprises three parts: * type indicates want component . types encounter frequently SETDATA GETDATA * target indicates message . Usually name gas type forcing. Valid targets defined constants given [[appendix|Hector Message Targets]]. * contents provide input component’s action. message_data object packed relevant data.","code":""},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"initialization","dir":"Articles","previous_headings":"Using the API","what":"Initialization","title":"Hector External API","text":"general procedure initialization : Create instance Hector::Core. Initialize core. Read parse configuration (INI) file. (Optionally) Attach output stream visitor Hector. Set core ready run. together, procedure looks like :","code":"Hector::Core hcore; // create the core hcore.init(); // run init method // create the INI reader: Hector::INIToCoreReader coreParser(&hcore); // use it to parse an input file: coreParser.parse(\"input/myinput.ini\"); /* This next part is OPTIONAL. You only have to do it if you want Hector's native output */ // set up an output file stream std::ofstream ofile(\"output/my-hector-outputstream.csv\"); // The output stream visitor formats and creates the output. It needs // the output stream we just created. Hector::CSVOutputStreamVisitor hcosv(&ofile, true); // Add the visitor to the core hcore.addVisitor(&hcosv); /* END of the OPTIONAL part */ hcore.prepareToRun(); // prepare Hector to run"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"setting-emissions","dir":"Articles","previous_headings":"Using the API","what":"Setting Emissions","title":"Hector External API","text":"set emissions gas, send SETDATA message targeted gas want set emissions . don’t know component handles gas; core takes care looking . message contents date (year setting emissions ) unitval (emissions value). Hector checks units data passed , doesn’t convert fly. Units gases tracked Hector given separate appendix. entire process looks like : can ignore return value sendMessage() case, since purpose message set data, retrieve . Emissions set using method overwrite previously existing emissions time gas specified message. includes emissions configured INI file. result, safe read complete set emissions INI file (e.g., using one packaged configurations) replace emissions needed. Note, however, emissions data packaged Hector provided annually. Therefore, model generates emissions time steps greater one year, make certain overwrite emissions years model’s time steps, get unexpected results.","code":"// emiss is a double with CO2 emissions in GtC/yr, presumably calculated elsewhere // year is a double that gives the year // hcore is an object of type Hector::Core Hector::unitval data(emiss, U_PGC_YR); Hector::message_data msg(year, data); hcore.sendMessage(M_SETDATA, D_ANTHRO_EMISSIONS, msg);"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"running-the-model","dir":"Articles","previous_headings":"Using the API","what":"Running the Model","title":"Hector External API","text":"run model, call Hector::Core::run method: calculation start start year configured INI file including stopYear. practical upshot set emissions years desired stop year calling run(). Subsequent calls resume previous run left run new stop year, following workflow supported: currently way make model go backwards time. Attempting run Hector::run() argument less equal last stop year produce warning otherwise nothing. Running model past end date configured INI file also produce warning, run normally. Note, however, components may use configured end date calculations, guaranteed valid configured end date. Therefore, safest make sure end date configured INI file latest date expect use run.","code":"hcore.run(stopYear); for(double year=model_start; year<=model_end; year+=model_timestep) { // run your model here... // set emissions from your model into Hector here... hcore.run(year); // get Hector results and do something with them here... }"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"retrieving-data","dir":"Articles","previous_headings":"Using the API","what":"Retrieving Data","title":"Hector External API","text":"retrieve results Hector, use GETDATA message. procedure similar setting emissions data; however, case need supply unitval argument, want keep return value, since contains value retrieving. bit inconsistency use dates calls. Generally, date forbidden forcings, except halocarbon forcings, required. Dates forbidden CO\\(_2\\) concentrations, required gases. hope address inconsistencies subsequent updates. Note outputs allow date supplied, way get value output particular date stop run date call sendMessage() get value current model time. return value unitval structure. can manipulated directly, assigned double, units stripped , leaving value:","code":"// retrieve CO2 concentration at the current model time Hector::unitval co2conc = hcore.sendMessage(M_GETDATA, D_ATMOSPHERIC_CO2); // retrieve N2O concentration at specified year Hector::unitval n2oconc = hcore.sendMessage(M_GETDATA, D_ATMOSPHERIC_N2O, year); // retrieve total forcing at current model time Hector::unitval rftot = hcore.sendMessage(M_GETDATA, D_RF_TOTAL); double globaltemp = hcore.sendMessage(M_GETDATA, D_GLOBAL_TEMP); double ocean_c_flux = hcore.sendMessage(M_GETDATA, D_OCEAN_C_UPTAKE);"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"shutdown","dir":"Articles","previous_headings":"Using the API","what":"Shutdown","title":"Hector External API","text":"stop core delete Hector components, call shutdown() method: method called, calls methods Hector core fail. instantiated one Hector core, core shutdown() called affected. Others continue operate normally.","code":"hcore.shutdown();"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"exceptions","dir":"Articles","previous_headings":"Using the API","what":"Exceptions","title":"Hector External API","text":"Hector encounters unrecoverable error, throw exception h_exception exception argument. object can passed ostream print function, file, line number problem detected, along (hopefully) descriptive message.","code":"try { // do some Hector calculations... } catch(const h_exception &e) { std::cerr << e << std::endl; // prints info about what went wrong throw; }"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"building-and-running-your-code","dir":"Articles","previous_headings":"","what":"Building and Running Your Code","title":"Hector External API","text":"two things build model linked Hector. first make sure compiler can find hector.hpp include file header files included . adding Hector headers directory compiler’s include path. example, installed Hector /usr/src/hector, compile command might look something like : second thing link object files Hector library, libhector.. also need link GNU Scientific Library (GSL). Similar compiling step, set library search path. also add -l options needed libraries. example, Hector /usr/src/hector GSL libraries /usr/local/lib, link command looks like : Hector library statically linked, won’t worry library load paths runtime. GSL typically dynamically linked, need make sure executable can find library runtime. See [[Hector build instructions|BuildHector]] advice arrange . build succeeds, end executable version model can run usual way. Input code’s control, supply Hector libraries name INI file (see instructions ). Unless followed instructions create Hector output stream, code also responsible producing whatever output want Hector.","code":"g++ -I/usr/src/hector/headers -O -c mycode.cpp g++ -L/usr/src/hector/source -L/usr/local/lib mycode.o -lhector -lgsl -lgslcblas -lm"},{"path":"https://jgcri.github.io/hector/articles/ExternalAPI.html","id":"limitations-and-caveats","dir":"Articles","previous_headings":"","what":"Limitations and Caveats","title":"Hector External API","text":"’re using Hector output stream, code can’t create output file (e.g., directory doesn’t exist), output silently discarded. true Hector log files. currently way rewind Hector simulation earlier time. want , shut Hector core instantiate initialize whole new core. new core won’t know anything emissions put old core, want follow emissions pathway rewind point, code store emissions add new core initialized. can run Hector point wanted rewind .","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"hector_documentation","dir":"Articles","previous_headings":"","what":"Hector Publications","title":"Hector in the Wider World","text":"three documentation manuscripts Hector.","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"hector-v1","dir":"Articles","previous_headings":"Hector Publications","what":"Hector v1","title":"Hector in the Wider World","text":"Hartin, C. ., Patel, P., Schwarber, ., Link, R. P., Bond-Lamberty, B. P. (2015). simple object-oriented open-source model scientific policy analyses global climate system – Hector v1.0, Geosci. Model Dev., 8, 939–955. https://doi.org/10.5194/gmd-8-939-2015. original manuscript Hector v1.0 published 2015. Hector open-source, object-oriented simple global carbon cycle model. model takes CO\\(_2\\) non-CO\\(_2\\) emissions (e.g., CH\\(_4\\), N\\(_2\\)O), converting emissions concentrations needed, calculates global radiative forcing global mean temperature change","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"hector-v1-1","dir":"Articles","previous_headings":"Hector Publications","what":"Hector v1.1","title":"Hector in the Wider World","text":"Hartin, C. ., Bond-Lamberty, B. P., Patel, P., Mundra, . (2016). Ocean acidification next three centuries using simple global climate carbon-cycle model: projections sensitivities, Biogeosciences, 13, 4329 – 4342. https://doi.org/10.5194/bg-13-4329-2016 Hector v1.1 contains updated ocean temperature algorithm better match CMIP5 mean.","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"hector-v2-0","dir":"Articles","previous_headings":"Hector Publications","what":"Hector v2.0","title":"Hector in the Wider World","text":"Vega-Westhoff, B., Sriver, R. L., Hartin, C. ., Wong, T. E., & Keller, K. (2019). Impacts observational constraints related sea level estimates climate sensitivity. Earth’s Future, 7, 677– 690. https://doi.org/10.1029/2018EF001082 Hector v2.0 incorporates one-dimensional diffusive heat energy balance model called DOECLIM global sea level module called BRICK.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"journal-articles","dir":"Articles","previous_headings":"Hector in Literature","what":"Journal articles","title":"Hector in the Wider World","text":"journal articles use reference Hector. – Climate module disparities explain inconsistent estimates social cost carbon integrated assessment models Wang, Tianpeng, Fei Teng, Xu Deng, Jun Xie. 2022. “Climate Module Disparities Explain Inconsistent Estimates Social Cost Carbon Integrated Assessment Models.” One Earth 5 (7): 767–78. – permafrost implementation simple carbon-climate model Hector v.2.3pf Woodard, D. L., Shiklomanov, . N., Kravitz, B., Hartin, C., Bond-Lamberty, B. (2021). permafrost implementation simple carbon-climate model Hector v.2.3pf. Geosci. Model Dev., 14, 4751–4767. ttps://doi.org/10.5194/gmd-14-4751-2021 study adds permafrost Hector separate land carbon pool decomposes CH\\(_4\\) CO\\(_2\\) thawed. thaw rate controlled region-specific air temperature increases. – role climate sensitivity upper-tail sea level rise projections Vega‐Westhoff, B., Sriver, R. L., Hartin, C., Wong, T. E., & Keller, K. (2020). role climate sensitivity upper‐tail sea level rise projections. Geophysical Research Letters, 47, e2019GL085792. https://doi.org/10.1029/2019GL085792 study uses Hector-BRICK investigate effects Earth’s equilibrium climate sensitivity, long-term temperature response doubling atmospheric CO\\(_2\\), sea-level rise focus high-impact upper tail. – Calibrating simple climate models individual Earth System Models: Lessons learned calibrating Hector Dorheim, K., Link, R., Hartin, C., Kravitz, B., & Snyder, . (2020). Calibrating simple climate models individual Earth system models: Lessons learned calibrating Hector. Earth Space Science, 7, e2019EA000980. > https://doi.org/10.1029/2019EA000980 article, authors use Hector v2.5.0 emulate multiforcing historical RCP scenario output 31 concentration seven emissions-driven Earth System Models. – Evaluating climate emulation: fundamental impulse testing simple climate models Schwarber, . K., Smith, S. J., Hartin, C. ., Vega-Westhoff, B. ., Sriver, R. (2019). Evaluating climate emulation: fundamental impulse testing simple climate models, Earth Syst. Dynam., 10, 729–739. https://doi.org/10.5194/esd-10-729-2019 authors use fundamental impulse tests CO\\(_2\\), CH\\(_4\\), black carbon understand fundamental gas cycle climate system responses comprehensive idealized simple climate models.","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"rcmip-project","dir":"Articles","previous_headings":"Hector in Literature","what":"RCMIP Project","title":"Hector in the Wider World","text":"Reduced Complexity Model Intercomparison Project (RCMIP) first systematic intercomparison project reduced-complexity climate models (RCM) provides standard protocol one-line models simple reduced-complexity models perform experiments common set assumptions. short, creates standardized test RCMs reproduce Earth System Model projections. Hector one model used RCMIP. RCMIP Phase 1 focuses RCMs’ global mean temperature responses RCMIP Phase 2 explores extent different RCMs can calibrated reproduce knowledge specialized research communities.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"mimi-framework","dir":"Articles","previous_headings":"Other Places","what":"Mimi Framework","title":"Hector in the Wider World","text":"MIMI Julia package integrated assessment models. MimiHECTOR partial implementation Hector Julia. Github found .","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"pyhector","dir":"Articles","previous_headings":"Other Places","what":"pyhector","title":"Hector in the Wider World","text":"pyhector Python interface Hector. paper describing pyhector Sven N Wilner, Corrine Hartin, Robert Gieseke. Github found .","code":""},{"path":"https://jgcri.github.io/hector/articles/Hector-Wider-World.html","id":"hectorui","dir":"Articles","previous_headings":"Other Places","what":"HectorUI","title":"Hector in the Wider World","text":"HectorUI R Shiny web interface designed user-friendly provide alternative command line running Hector. allows users may fluent C++ R explore model scenarios outputs. HectorUI interface can found . HectorUI paper can found Evanoff J.E., Vernon, C.R., Waldhoff, S.T., Snyder, . C., Hartin, C.. (2020). “hectorui: web-based interactive scenario builder visualization application Hector climate model.” Journal Open Source Software 5, . 56:Article . 2782. PNNL-SA-156861. https://doi.org/10.21105/joss.02782 YouTube overview HectorUI Stephanie Pennington can found .","code":""},{"path":"https://jgcri.github.io/hector/articles/HectorResources.html","id":"hector-v3","dir":"Articles","previous_headings":"","what":"Hector V3","title":"Hector Videos & Tutorials","text":"Interactive Jupyter notebook Hector V3 installation YouTube Video","code":""},{"path":"https://jgcri.github.io/hector/articles/HectorResources.html","id":"hector-v2-5","dir":"Articles","previous_headings":"","what":"Hector V2.5","title":"Hector Videos & Tutorials","text":"YouTube Video covers following: Hector v2.5 Package setup; changing parameter value; visualize","code":""},{"path":"https://jgcri.github.io/hector/articles/HectorSummary.html","id":"introduction-to-hector","dir":"Articles","previous_headings":"","what":"Introduction to Hector","title":"Hector general summary","text":"Hector open-source, object-oriented, simple global carbon cycle model. simple climate model, Hector runs quickly still representing critical global Earth system processes. Hector default carbon cycle module integrated assessment model GCAM (Global Change Assessment Model). open-source nature modular design allows user edit input files code, meaning user design new submodel answer particular science question. Hector can accurately reproduce historical trends future projections atmospheric CO2, radiative forcing, global temperature change RCPs SSPs.1 Hector contains well-mixed global atmosphere, ocean component, land component composed vegetation, detritus, soil. Briefly, terrestrial vegetation, detritus, soil linked atmosphere first-order differential equations. Carbon flows vegetation detritus soil, losing fractional amounts heterotrophic respiration. details terrestrial carbon cycle, please reference “model’s terrestrial carbon cycle”. Note Hector’s fundamental time step one year, carbon cycle can scaled finer resolution necessary.2 ocean component consists four boxes: two surface boxes, one high-latitude low-latitude, one intermediate, one deep box. cold high-latitude (>55\\(^◦\\)) box makes 15% ocean surface area warm low-latitude box (>55\\(^◦\\)) makes remaining 85%. Ocean temperatures linearly related global atmospheric temperature change; temperature gradient causes flux carbon high-latitude box flux carbon warm low-latitude box.3 Hector can also calculate near surface global atmospheric temperature. Radiative forcing calculated various atmospheric greenhouse gases, aerosols, pollutants, including halocarbons, tropospheric ozone, black organic carbon, sulfate aerosols, methane (CH4), nitrous oxide (N20), stratospheric H20 methane oxidation.4 Hector v2.0 replaced temperature component model coupled 0-D climate 1-D ocean heat diffusion model, DOECLIM. Hector implementation, like past assessments using DOECLIM, three tuneable physical parameters: equilibrium climate sensitivity doubling CO2, vertical ocean diffusivity, aerosol forcing scaling factor. addition improved vertical ocean structure heat uptake well surface temperature response radiative forcing. Additionally, Hector V2.0 incorporates semiempirical model based global temperature calculate global sea level change. component based BRICK model framework, global sea level changes treated sum contributions thermal expansion, glaciers small ice caps, Greenland Antarctic ice sheets, changes land water storage. BRICK updated within Hector simplify coupling.5","code":""},{"path":"https://jgcri.github.io/hector/articles/HectorSummary.html","id":"other-simple-climate-models","dir":"Articles","previous_headings":"","what":"Other simple climate models","title":"Hector general summary","text":"Simple climate models, also referred reduced-complexity climate models, represent critical global-scale Earth system processes low spatial temporal resolution. models relatively easy use understand computationally less expensive time-consuming complex Earth system models. simple climate models calculate future concentrations greenhouse gases given emissions modeling global carbon cycle, calculating global mean radiative forcing greenhouse gas concentrations, converting radiative forcing global mean temperature.6 simple climate models include, although limited , following: ACC2: Aggregated Carbon Cycle, Atmospheric Chemistry, Climate model AR5IR: Fifth Assessment Report Impulse Response Model CICERO-SCM: CICERO Simple Climate Model EMGC: Empirical Model Global Climate ESCIMO: Earth System Climate Interpretable Model FaIR-v1-5 FaIR-v2-0-0: Finite-amplitude Impulse Response GENIE: Grid Enabled Integrated Earth System Model GREB: Globally Resolved Energy Balance model, also referred Monash Simple Climate Model MAGICC: Model Assessment Greenhouse Gas Induced Climate Change MARGO: MARGO represents four potential climate controls, emissions Mitigation, carbon dioxide Removal, Geo-engineering, Adaptation. MCE: minimal CMIP emulator OSCAR: simple earth system model non-linear box model RDCEP: Center Robust Decision-making Climate Energy Policy created statistical climate emulator. WASP: Warming Acidification Sea level Projector","code":""},{"path":"https://jgcri.github.io/hector/articles/HectorSummary.html","id":"further-information","dir":"Articles","previous_headings":"","what":"Further information","title":"Hector general summary","text":"Please see documentation manuscripts: Hector v1: Hartin, C. ., Patel, P., Schwarber, ., Link, R. P., Bond-Lamberty, B. P. (2015). simple object-oriented open-source model scientific policy analyses global climate system – Hector v1.0, Geosci. Model Dev., 8, 939–955. https://doi.org/10.5194/gmd-8-939-2015 Hector v1.1: Hartin, C. ., Bond-Lamberty, B. P., Patel, P., Mundra, . (2016). Ocean acidification next three centuries using simple global climate carbon-cycle model: projections sensitivities, Biogeosciences, 13, 4329 – 4342. https://doi.org/10.5194/bg-13-4329-2016 Hector v2.0: Vega-Westhoff, B., Sriver, R. L., Hartin, C. ., Wong, T. E., & Keller, K. (2019). Impacts observational constraints related sea level estimates climate sensitivity. Earth’s Future, 7, 677– 690. https://doi.org/10.1029/2018EF001082","code":""},{"path":"https://jgcri.github.io/hector/articles/InputFiles.html","id":"general-information","dir":"Articles","previous_headings":"","what":"General information","title":"Hector input files","text":"Hector invoked command line, takes single parameter: name primary input file read. file, typically stored input/ directory, contains configuration parameter data controlling model’s run, output, behavior. primary input file text file sections, properties, values. example, beginning SSP245 file included repository looks like : , comments start semicolon (;); section names (core) enclosed square brackets; property (run_name) assigned value (ssp245). Properties guaranteed unique within particular section, sections match one--one model component.","code":"; Config file for hector model: SSP245 ;------------------------------------------------------------------------ [core] run_name=ssp245"},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/InputFiles.html","id":"table-of-biome-specific-inputs","dir":"Articles","previous_headings":"General information","what":"Table of biome-specific inputs","title":"Hector input files","text":"possible run Hector multiple distinct biomes. following parameters specific particular biome.","code":""},{"path":"https://jgcri.github.io/hector/articles/InputFiles.html","id":"table-of-variable-inputs-with-a-time-index","dir":"Articles","previous_headings":"General information","what":"Table of variable inputs (with a time index)","title":"Hector input files","text":"two Hector-specific wrinkles INI property-value assignment scheme. First, properties time index ’s required assigning: commonly, time series assigned reading data comma-separated value text file: case, input/emissions/ssp245_emissions.csv file parsed data column lucEmissions assigned model variable, required Date column providing time index. Note “(csv)” entry default column indicates values passed via path csv file.","code":"Ftalbedo[1750]=0.0 Ftalbedo[1950]=-0.2 lucEmissions=csv:input/emissions/ssp245_emissions.csv"},{"path":"https://jgcri.github.io/hector/articles/Permafrost.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"An Introduction to Permafrost in Hector","text":"Start setting default Hector core running : noted , currently default model initialized permafrost carbon: Run default core save outputs:","code":"library(hector) ini <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") core <- newcore(ini, name = \"ssp245-default\") fetchvars(core, dates = NA, vars = PERMAFROST_C()) #> scenario year variable value units #> 1 ssp245-default NA permafrost_c 0 Pg C invisible(run(core)) # Output variables we want to retrieve climate_vars <- c(ATMOSPHERIC_CO2(), GLOBAL_TAS(), RF_CO2(), RF_TOTAL()) permafrost_vars <- c(PERMAFROST_C(), THAWEDP_C(), RH(), CONCENTRATIONS_CH4()) run1 <- fetchvars(core, dates = 1745:2300, vars = c(climate_vars, permafrost_vars)) shutdown(core) #> Hector core (INACTIVE)"},{"path":"https://jgcri.github.io/hector/articles/Permafrost.html","id":"enabling-permafrost","dir":"Articles","previous_headings":"","what":"Enabling permafrost","title":"An Introduction to Permafrost in Hector","text":"Set new core set initial permafrost carbon 865 Pg C, value used Woodard et al. (2021): can check confirm permafrost lost atmosphere climate warmed… …leading earth system climate differences:","code":"core <- newcore(ini, name = \"ssp245-permafrost\") setvar(core, 0, PERMAFROST_C(), 865, \"Pg C\") invisible(run(core)) #> Auto-resetting core to -1 run2 <- fetchvars(core, dates = 1745:2300, vars = c(climate_vars, permafrost_vars)) fetchvars(core, 2300, PERMAFROST_C()) #> scenario year variable value units #> 1 ssp245-permafrost 2300 permafrost_c 629.4915 Pg C shutdown(core) #> Hector core (INACTIVE) results <- rbind(run1, run2) library(ggplot2) ggplot(subset(results, variable %in% climate_vars), aes(year, value, color = scenario)) + geom_line() + facet_wrap(~variable, scales = \"free\")"},{"path":"https://jgcri.github.io/hector/articles/Permafrost.html","id":"a-closer-look-at-permafrost-dynamics","dir":"Articles","previous_headings":"","what":"A closer look at permafrost dynamics","title":"An Introduction to Permafrost in Hector","text":"thaw rate controlled biome-specific air temperature, thawed permafrost slowly decomposes CH\\(_4\\) CO\\(_2\\). can look effects detail: can see permafrost thaws , 22nd century, slightly refreezes; thawed permafrost pool peaks second half 20th century declines; atmospheric methane total heterotrophic respiration significantly higher permafrost non-permafrost simulations.","code":"ggplot(subset(results, variable %in% permafrost_vars), aes(year, value, color = scenario)) + geom_line() + facet_wrap(~variable, scales = \"free\")"},{"path":"https://jgcri.github.io/hector/articles/Permafrost.html","id":"controlling-the-behavior-of-permafrost-thaw","dir":"Articles","previous_headings":"","what":"Controlling the behavior of permafrost thaw","title":"An Introduction to Permafrost in Hector","text":"described Woodard et al. (2021), relationship air temperature thaw fraction controlled two parameters calibrated CMIP6 data: can test effect varying parameters: Hector’s permafrost capability planned fully science-ready v3.2.","code":"core <- newcore(ini, name = \"ssp245-permafrost\") setvar(core, 0, PERMAFROST_C(), 865, \"Pg C\") fetchvars(core, NA, c(PERMAFROST_MU(), PERMAFROST_SIGMA())) #> scenario year variable value units #> 1 ssp245-permafrost NA pf_mu 1.670 degC #> 2 ssp245-permafrost NA pf_sigma 0.986 degC run_fn <- function(value, core, variable) { setvar(core, NA, variable, value, \"degC\") reset(core) run(core) out <- fetchvars(core, 2100:2300, vars = GLOBAL_TAS()) out$varying <- variable out$param_value <- value out } # Run basic parameter sensitivity test results_mu <- lapply(seq(1.4, 2.1, length.out = 6), run_fn, core, PERMAFROST_MU()) #> Auto-resetting core to -1 results_sigma <- lapply(seq(0.7, 1.2, length.out = 6), run_fn, core, PERMAFROST_SIGMA()) # Combine results and plot results <- do.call(\"rbind\", c(results_mu, results_sigma)) default <- subset(run2, variable == GLOBAL_TAS() & year %in% 2100:2300) ggplot(results, aes(year, value, color = param_value, group = paste(varying, param_value))) + geom_line(linetype = 2) + ylab(GLOBAL_TAS()) + facet_wrap(~varying) + # add a thick black line to show default behavior annotate(geom = \"line\", x = default$year, y = default$value, linewidth = 1.5)"},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"science","dir":"Articles","previous_headings":"","what":"Science","title":"Terrestrial C cycle","text":"Hector’s land system divided three pools: vegetation (\\(C_v\\)), detritus (\\(C_d\\)), soil (\\(C_s\\)); fourth pool, earth (\\(C_earth\\)) used anthropogenic emissions uptake. pools global default, can divided \\(n\\) “biomes” unique parameters initial pool sizes. total C flux atmosphere land time \\(t\\) (\\(F_{L}(t)\\); also known Net Biome Production, NBP) net C sequestration photosynthesis (net primary productivity, \\(NPP_i(t)\\)) C release heterotrophic respiration (\\(RH_i(t)\\)) summed across biome \\(\\), global land use change (\\(LUC(t)\\)) (note calculation currently include fire, another important land C source): \\[ F_{L}(t) = \\sum_{=1}^{n} \\left( NPP_i(t) - RH_i(t) \\right) - LUC(t) \\] NPP calculated product user-specified pre-industrial value (\\(NPP_0\\), default 56.2 Pg C/year), CO2 fertilization multiplier (\\(f(C_{atm}, \\beta)\\)), effect land use change (LUC) vegetation carbon stocks: \\[ NPP_i(t) = NPP_{0,} \\times f(C_{atm}, \\beta_i) \\times f(LUC_{v}) \\] CO2 fertilization multiplier function current atmospheric CO2 concentration (\\(C_{atm}\\)), initial (“pre-industrial”) CO2 concentration (\\(C_0\\)), biome-specific CO2 fertilization parameter \\(\\beta_i\\) (default = 0.36): \\[ f(C_{atm}, \\beta_i) = 1 + \\beta_i \\left( \\log(\\frac{C_{atm}}{C_0})\\right) \\] LUC multiplier accounts effect vegetation losses gains NPP (although recognize LUC always result ‘lost’ NPP); behavior new Hector v3. computed fraction based preindustrial (end--spinup) vegetation carbon (\\(C_{v}\\)) running sum LUC-driven losses – gains – vegetation: \\[ f(LUC_{v}) = \\frac{C_{0v} - \\sum LUC_{veg}}{C_{0v}} \\] Heterotrophic respiration occurs soil (\\(RH_s(t)\\)) detritus (\\(RH_d(t))\\)) function biome-specific atmospheric temperature anomaly (\\(T_i\\), calculated global atmospheric temperature anomaly scaled biome-specific warming factor \\(\\delta\\)) size current soil detritus C pools (\\(C_s\\) \\(C_d\\), respectively). \\[ T_i(t) = \\delta \\, T_G(t) \\] \\[ RH_s = \\frac{1}{50} C_s Q_{10}^{T_{}(t) / 10}\\] \\[ RH_d = \\frac{1}{4} C_d Q_{10}^{T_{}(t) / 10}\\] Note residence times soil detritus C pools – 50 4 years, respectively – currently hard-coded values Hector. Fluxes associated land use change (\\(LUC\\)) prescribed via luc_emissions variable INI file. Example time series associated shared socioeconomic pathways (SSPs) included Hector corresponding inst/input/tables/ssp**_emiss-constraints_rf.csv files. two LUC fluxes, land uptake loss, add remove carbon land pools proportion pools’ size. (behavior new version 3 model.) Note cumulative \\(LUC_{v}\\), LUC effects vegetation, affects NPP documented . biome time step, vegetation pools change follows (biome, \\(\\) time, \\(t\\) subscripts omitted clarity): C gain NPP distributed vegetation, detritus, soil according fraction parameters \\(f_{nv}\\), \\(f_{nd}\\), \\(f_{ns}\\), respectively. Similarly, pool bears fraction total C loss land-use change (\\(F_{LC}\\)), according fractions \\(f_{lv}\\), \\(f_{ld}\\), \\(f_{ls}\\). detritus soil pools also lose C via heterotrophic respiration (\\(RH_d\\) \\(RH_s\\), respectively). Finally, fixed fraction vegetation C transferred detritus litterfall (\\(f_{vd}\\)), fraction vegetation (\\(f_{vs}\\)) detritus (\\(f_{ds}\\)) C transferred soil. \\[ \\frac{dC_v}{dt} = NPP\\, f_{nv} - C_v (f_{vd} + f_{vs}) - F_{LC} f_{lv} \\] \\[ \\frac{dC_d}{dt} = NPP\\, f_{nd} + C_v f_{vd} - C_d f_{ds} - RH_d - F_{LC} f_{ld} \\] \\[ \\frac{dC_s}{dt} = NPP\\, f_{ns} + C_v f_{vs} - C_d f_{ds} - RH_s - F_{LC} f_{ls} \\] Anthropogenic changes earth system driven fossil fuel industrial emissions (FFI) well , scenarios, direct air carbon capture storage (DACCS). fluxes occur , , ‘earth’ pool used mass-balance checks: \\[ \\frac{dC_{earth}}{dt} = DACCS - FFI\\] Finally, atmosphere changes result fluxes : anthropogenic emissions uptake; land use change emissions uptake; fluxes ocean; heterotrophic respiration net primary production. \\[ \\frac{dC_{atm}}{dt} = FFI - DACCS + LUC_{e} - LUC_{u} + O_{} - O_{u} + RH - NPP \\] entire terrestrial C cycle summarized following diagram: Summary terrestrial C cycle Hector. full Hector C cycle also includes ocean “Earth” C pools exchange C atmosphere, omitted clarity.","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"implementation","dir":"Articles","previous_headings":"","what":"Implementation","title":"Terrestrial C cycle","text":"state global C cycle Hector defined length 6 vector c, describes amount C (Pg C) atmosphere (0), vegetation (1), detritus (2), soil (3), ocean (4), “Earth” (5) current time step. Hector time step, c solved CarbonCycleSolver::run() function (defined src/carbon-cycle-solver.cpp) following general steps: Retrieve current estimates various pools variables defined C cycle model assign relevant parts c (getCValues). Integrate beginning time step using updated slow parameters (slowparameval). Solve ordinary differential equations associated C cycle model based time derivatives (defined calcderivs). Re-calculate C cycle model internal variables based solved values c (stashCValues). Record model state (record_state). steps described detail . complete code terrestrial C cycle lives src/simpleNbox.cpp file (associated headers inst/include/simpleNbox.hpp).","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"setting-the-c-vector-getcvalues","dir":"Articles","previous_headings":"","what":"Setting the c vector (getCValues)","title":"Terrestrial C cycle","text":"function sets values c vector corresponding state variables C cycle model. atmospheric C pool current time step defined atmos_co2, always scalar unit quantity (CO2 assumed well-mixed atmosphere). Vegetation, detritus, soil pools current time step stored veg_c, detritus_c, soil_c, respectively. vector quantities (“stringmaps”), one value biome (default biome name “global”), value stored corresponding slot c sum across biomes. ocean C pool retrieved call current ocean model’s getCValues function. (NOTE: means simpleNBox model depends existence ocean C cycle model.) Finally, “Earth” C pool stored earth_c, also scalar unit quantity. variables units Pg C.","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"slow-parameter-evaluation-slowparameval","dir":"Articles","previous_headings":"","what":"Slow parameter evaluation (slowparameval)","title":"Terrestrial C cycle","text":"Perform ocean C model’s slow parameter evaluation (omodel->slowparameval) Calculate CO2 fertilization effect biome (co2fert[biome]) using function calc_co2fert …unless spin-phase, case assume effect (co2fert = 1) Calculate temperature effect respiration detritus (tempfertd) soil (tempferts). Note soil warming “sticky” – can increase, decline (even temperature declines time steps) Note also detritus warming based actual current biome temperature, soil warming based 200-year running mean Note effect parameters calculated yet applied. applied actual NPP RH estimates ODE solving loop.","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"c-cycle-derivatives-calcderivs","dir":"Articles","previous_headings":"","what":"C cycle derivatives (calcderivs)","title":"Terrestrial C cycle","text":"Calculate NPP biome (npp function) Partition NPP C gain vegetation, detritus, soil pools according fractions Calculate RH detritus soil Partition C losses RH according fractions Calculate partition litter flux Store changes pools dcdt vector (structure c)","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"storing-the-results-stashcvalues","dir":"Articles","previous_headings":"","what":"Storing the results (stashCValues)","title":"Terrestrial C cycle","text":"Reset atmospheric CO2 state variable (atmos_co2) current value c Calculate difference vegetation, detritus, soil C calculated ODE solver (.e. c) stored current state variables (veg_c, detritus_c, soil_c). Store differences veg_delta, det_delta, soil_delta. Calculate total GPP across biomes (npp_rh_total = sum_npp() + sum_rh()) Calculate biome’s weight (wt[biome] = (npp(biome) + rh(biome)) / npp_rh_total) Add corresponding difference multiplied weight biome’s current pool (e.g. veg_c[biome] = veg_c[biome] + veg_delta * wt[biome]) NOTE: workaround. future, Hector use ODE solver separately solve boxes multi-biome system. Stash ocean C pools using omodel->stashCValues function Stash Earth C pool (earth_c) NOTE: check skipped first time function evaluated, point masstot initialized calculated sum. Hector running atmospheric CO2 constraint, re-calculate atmospheric CO2 pool match constraint move residual C /deep ocean pool.","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"recording-the-state-record_state","dir":"Articles","previous_headings":"","what":"Recording the state (record_state)","title":"Terrestrial C cycle","text":"just sets time-series versions C cycle state variables (e.g. atmos_c_ts, veg_c_tv, detritus_c_tv, tempfertd_tv) corresponding state variables current time step (e.g. atmos_c, veg_c, detritus_c, tempfertd).","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"simplenbox-setdata","dir":"Articles","previous_headings":"","what":"Setting (setData) and retrieving (getData) values","title":"Terrestrial C cycle","text":"following values related terrestrial C cycle can set via setData.","code":""},{"path":"https://jgcri.github.io/hector/articles/SimpleNBox.html","id":"other-routines","dir":"Articles","previous_headings":"","what":"Other routines","title":"Terrestrial C cycle","text":"co2fert (CO2 fertilization multiplier) – 1.0 warmingfactor (biome warming multiplier relative global average) – 1.0 residual (difference modeled atmospheric CO2 constraint) – 0 tempfertd, tempferts (Q10 warming effects detritus soil respiration, respectively) – 1.0 Add \"global\" biome list Register C cycle model capabilities, dependencies, inputs Set values current-time state variables (e.g. atmos_co2, veg_c, tempfertd) time-series values time time (e.g. atmos_c_ts.get(time), veg_c_tv.get(time), tempfertd_tv.get(time)) Re-calculate CO2 fertilization effect biome (co2fert). spinup, force 1.0. “Truncate” time series variables current time; .e. erase values time Set tcurrent time pools fluxes (biome) must greater equal 0 Partitioning fraction parameters (e.g. f_nppv, f_litterd) must 0 1, must sum 1 Check biome-specific pools, fluxes, parameters data biomes. (optional biome-specific parameter warmingfactor, set 1.0 missing). Also check biome-specific CO2 fertilization (beta) Q10 (q10_rh) parameters valid. albedo forcing data provided, set value MAGICC default -0.2 Initialize atmospheric CO2 concentration (CO2_concentrations, ppm) C pool (atmos_co2, PgC) user-specified initial value (C0; converted accordingly PgC CO2_concentrations) Run checks sanitychecks()","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"coding-style","dir":"Articles","previous_headings":"C++ Hector Code Base","what":"Coding style:","title":"Style guide","text":"New C++ code follow LLVL coding standards Hector codebase periodically reformatted using clang-format. example, assuming working directory repository root: general principles: basic file intro top every file (see existing examples) line dashes separating functions use ‘const’ possible: functions, parameters, variables methods start assertions inputs try use C++ STL Boost data structures functions (instead rolling )","code":"# First, if needed: brew install clang-format # Important note: we do NOT want to touch `src/rcpp_constants.cpp` pr `src/rcpp_hector.cpp` find src/ -name \"*.c*\" | grep -v rcpp_constants | clang-format -i clang-format -i inst/include/*.h*"},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"unit-testing","dir":"Articles","previous_headings":"C++ Hector Code Base","what":"Unit testing:","title":"Style guide","text":"writing test case part writing code every method least one test possible every class/subunit dedicated test group","code":""},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"expected-documentation","dir":"Articles","previous_headings":"C++ Hector Code Base","what":"Expected documentation:","title":"Style guide","text":"\\brief (always) \\param[] () \\param[] () \\returns (returns value) \\exception (throws assertions) trivial vars Doxygen comments headers comments generally say ","code":""},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"r-hector-code-base","dir":"Articles","previous_headings":"","what":"R Hector Code Base","title":"Style guide","text":"R code generated Rcpp code; edit files hand. files start : make changes files, find corresponding .cpp file make changes .","code":"# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: Numbers-Letters-Token"},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"coding-style-1","dir":"Articles","previous_headings":"R Hector Code Base","what":"Coding style:","title":"Style guide","text":"follows R package format style guidelines R CMD checks pass CRAN checks follows R style guide R code pass lintr::lint_package() (run one package tests)","code":""},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"expected-documentation-1","dir":"Articles","previous_headings":"R Hector Code Base","what":"Expected documentation:","title":"Style guide","text":"@param describe every function argument @return description object returned function clear concise inline comments describe code add vignette article appropriate","code":""},{"path":"https://jgcri.github.io/hector/articles/StyleGuide.html","id":"unit-testing-1","dir":"Articles","previous_headings":"R Hector Code Base","what":"Unit testing:","title":"Style guide","text":"add R package unit tests unit tests quick use minimal (needed) package data","code":""},{"path":"https://jgcri.github.io/hector/articles/TimeSeries.html","id":"how-to-add-a-new-tseries","dir":"Articles","previous_headings":"","what":"How to add a new tseries","title":"Time series (`tseries`) variables","text":"Steps creating new tseries variable within Hector C++ codebase follows. example adding tseries variable called NewVar_ts example variable added called","code":""},{"path":"https://jgcri.github.io/hector/articles/TimeSeries.html","id":"add-to-x_component-hpp","dir":"Articles","previous_headings":"How to add a new tseries","what":"1. Add to X_component.hpp:","title":"Time series (`tseries`) variables","text":"Add tseries appropriate hpp file example within dummy_model_component.hpp file.","code":"tseries NewVar_ts"},{"path":"https://jgcri.github.io/hector/articles/TimeSeries.html","id":"add-to-component_names-hpp","dir":"Articles","previous_headings":"How to add a new tseries","what":"2. Add to component_names.hpp","title":"Time series (`tseries`) variables","text":"Add string variable name component_names.hpp message passed components. string message names start prefix D_.","code":"#define D_NEWVAR \"example variable\""},{"path":"https://jgcri.github.io/hector/articles/TimeSeries.html","id":"changes-to-to-x_component-cpp","dir":"Articles","previous_headings":"How to add a new tseries","what":"3. Changes to to X_component.cpp:","title":"Time series (`tseries`) variables","text":"Add tseries init constructor, setData, getData sections cpp file. DummyModelComponent::init DummyModelComponent::constructor: DummyModelComponent::setData: U_unitval value listed unitval.hpp, adding new variable section reads data component. DummyModelComponent::getData: Adding new variable getData section lets values passed Hector components. setting new variable, see AddNewVariable DummyModelComponent::run: Set variable tseries order – (runToDate, unitval) order print log file:","code":"Allow for interpolation NewVar_ts.allowInterp(true); if( varName == D_NEWVAR ) { H_ASSERT( data.date != Core::undefinedIndex(), \"date required\" ); NewVar_ts.set( data.date, unitval::parse_unitval( data.value_str, data.units_str, U_unitval ) ); if( varName == D_NEWVAR ) { H_ASSERT( date != Core::undefinedIndex(), \"Date required for variable name\" ); returnval = NewVar_ts.get( date ); NewVar_ts.set( runToDate, unitval( previous_x + dx, U_unitval ) ); H_LOG( logger, Logger::DEBUG ) << \"Year \" << runToDate << \" variable = \" << NewVar_ts.get( runToDate ) << std::endl;"},{"path":"https://jgcri.github.io/hector/articles/TimeSeries.html","id":"pass-to-other-components","dir":"Articles","previous_headings":"How to add a new tseries","what":"4. Pass to other components","title":"Time series (`tseries`) variables","text":"another component needs variable add appropriate hpp cpp files. example lets say X_component needs new variable X_component.hpp file add X::run: X_component.cpp add","code":"unitval NewVar; NewVar = core->sendMessage( M_GETDATA, D_NEWVAR, message_data( runToDate ) ).value( U_unitval);"},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"creating-a-variable-with-associated-unit","dir":"Articles","previous_headings":"","what":"Creating a variable with associated unit","title":"Units values (`unitvals` and `fluxpools`)","text":"Two ways create unitval:","code":"unitval x(1, U_PGC); # x now holds 1 petagram of carbon unitval y; y.set(2, U_CO2_PPMV);"},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"doing-math","dir":"Articles","previous_headings":"","what":"Doing math","title":"Units values (`unitvals` and `fluxpools`)","text":"unitval class supports basic mathematical operations.","code":"# assume that y and z are already defined unitvals unitval x = y + z; # y and z must have identical units or an error is thrown unitval x = y * 2.0; # multiplying by a constant always works"},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"extracting-a-unitval-value","dir":"Articles","previous_headings":"","what":"Extracting a unitval value","title":"Units values (`unitvals` and `fluxpools`)","text":"Internally within components, often simply want work numbers, extracting unitval objects. straightforward, first ‘prove’ know correct units: core throw error get results y wrong.","code":"double x = y.value(U_PGC); # we assert that y's units are petagrams C"},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"when-is-unitval-required","dir":"Articles","previous_headings":"","what":"When is unitval required?","title":"Units values (`unitvals` and `fluxpools`)","text":"Using unitvals within component optional, ’s required passing data components. falls three categories: Querying core data. Read Hector’s internal data passing. Responding query data. Output. Read Hector’s output visitors.","code":""},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"fluxpool-values","dir":"Articles","previous_headings":"","what":"Fluxpool values","title":"Units values (`unitvals` and `fluxpools`)","text":"Hector v3 introduces new internal unit class: fluxpool, subclass unitval defined inst/include/fluxpool.hpp. class imposes restriction: values may zero positive, negative value, operation results negative value, throws error. used carbon fluxes pools may negative; pools hopefully obvious, fluxes think possibly ‘negative’ (e.g., net biome production) fact difference two nominally positive fluxes. Currently fluxpools may passed model components. Finally, fluxpool class carbon tracking implemented; see relevant exmaple.","code":""},{"path":"https://jgcri.github.io/hector/articles/Unitvals.html","id":"missing-values","dir":"Articles","previous_headings":"","what":"Missing values","title":"Units values (`unitvals` and `fluxpools`)","text":"Briefly, need return missing value, use MISSING_FLOAT macro defined inst/include/unitval.hpp. macro return NA_REAL (Rcpp) Hector compiled R package (technically, USE_RCPP macro defined) NAN (std) otherwise. complexity? R (, extension, Rcpp) distinguishes two kinds “placeholder” numeric values: missing value (NA_real_ R; often abbreviated NA) represents unobserved value; instance, take annual observations 1990 2000 failed make measurement 1996. hand, number (NaN) represents result invalid mathematical operation, taking square root negative number. values propagate calculations involved, R C++, can detected removed R’s .na() similar functions. (Note R function .nan() can used check specifically NaN values – .nan(NaN) => TRUE, .nan(NA) => FALSE). However, mean fundamentally different things (suggest different errors), try preserve distinction can. See also notes hector units","code":""},{"path":"https://jgcri.github.io/hector/articles/addnewforcer.html","id":"objective","dir":"Articles","previous_headings":"","what":"Objective","title":"Adding a new forcer to Hector","text":"notes add new species affect Hector’s radiative forcing budget order answer question “much impact newly discovered forcer X .” notes : Option 1: add estimated radiative forcing values miscellaneous radiative forcing variable Option 2: add new component Hector pass appropriate information Hector’s forcing components","code":""},{"path":"https://jgcri.github.io/hector/articles/addnewforcer.html","id":"option-1","dir":"Articles","previous_headings":"","what":"Option 1","title":"Adding a new forcer to Hector","text":"Use Hector’s miscellaneous radiative forcing variable read additional radiative forcing values. approach requires little coding experience require users radiative forcing values readily available. Users can read new radiative forcing values via ini file Fmisc variable. Fmisc column Hector csv input tables named something like ssp434_emiss-constraints_rf.csv. Depending user configuration, Fmisc may numeric values equal zeros. Fmisc non-zero, user add new values existing values. Alternatively, using Hector R package, users can read miscellaneous forcing Hector core RF_MISC() setvar() function.","code":""},{"path":"https://jgcri.github.io/hector/articles/addnewforcer.html","id":"option-2","dir":"Articles","previous_headings":"","what":"Option 2","title":"Adding a new forcer to Hector","text":"Add new forcer Hector; require changes C++ code base. Create new Hector component: use existing model component dummy_model_component.hpp dummy_model_component.cpp files template. Within new component, add new variables appropriate. Use component read emissions. forcer added GHG, use appropriate method convert emissions concentrations expose concentrations (via getData) may passed Hector components. new model component cpp file return new emissions concentrations (whichever one appropriate). Next, modify forcing_compoent.cpp. Add equation converts emissions concentration time series radiative forcing values. new values added forcing map (“forcings”, see N2O RF set example) new values incorporated total radiative forcing calculation. Lastly, make sure update rcpp_constants.cpp new variables can accessed via R interface (see new variables).","code":""},{"path":"https://jgcri.github.io/hector/articles/climate.html","id":"science","dir":"Articles","previous_headings":"","what":"Science","title":"Hector's Climate","text":"Hector open source, object-oriented, simple global climate carbon-cycle model. Greenhouse gases (GHGs) aerosols emitted atmosphere, GHGs accumulate. GHG concentrations aerosol emissions impact Earth’s radiative forcing budget. Hector’s temperature component (based DOECLIM1, diffusion ocean-energy balance) uses total radiative forcing calculate mean global air temperature sea-surface land-surface temperature anomalies. Hector returns global mean air surface temperate (GMAT), land surface temperature, ocean surface temperature can used calculate global mean surface temperature (see details). DOECLIM simulates different rates warming land ocean surfaces global mean surface temperature, meaning land-ocean warming ratio emergent property Hector. However, users option provide land-ocean warming ratio used place DOECLIM’s internal calculations (see example details feature).","code":""},{"path":"https://jgcri.github.io/hector/articles/climate.html","id":"implementation","dir":"Articles","previous_headings":"","what":"Implementation","title":"Hector's Climate","text":"Emissions read Hector Hector components prepared passed forcing_component. example, black carbon (BC) emissions read Hector bc_component whereas methane emissions read ch4_component. aerosol components (bc_component,oc_component, so2_component, nh3_component) can directly pass emissions forcing_component whereas GHG emissions methane must first converted concentrations. Effective radiative forcing GHG concentration aerosol calculated based IPCC AR62. Additional sources radiative forcing changes land albedo volcanoes added together determine total change radiative forcing within forcing_component. forcing_component passes total radiative forcing temperature_component DOECLIM3, diffusion ocean-energy balance model, determines change Earth’s radiative forcing budget manifests changes mean global air temperature sea-surface land-surface temperature anomalies. Important note: atmospheric CO2, carbon cycle must solved Hector able calculate radiative forcing CO2 temperature effects CO2 lagged time.","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_GMAT-GMST.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Example: Calculating GMST from GMAT in Hector","text":"global mean surface temperature (GMST) average air temperature 2 meters Earth’s surface temperature surface ocean. 1 useful metric observing global temperature changes. Although changes GMST relatively small terms numbers, takes great deal heat warm entire planet even fraction degree. Measurements temperature changes provide evidence anthropogenic climate change. GMST global mean air temperature (GMAT) reported Hector outputs. GMAT air temperature measured 2 meters ground presented daily weather report.2 vignette demonstrates set calculate GMST compares two temperature results. (Note Hector assumes land air temperature land surface temperature equivalent.3)","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_GMAT-GMST.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Example: Calculating GMST from GMAT in Hector","text":"Let’s load packages need run scenario.","code":"library(hector) library(ggplot2) inifile <- file.path(system.file(\"input\", package = \"hector\"), \"hector_ssp245.ini\") core <- newcore(inifile) invisible(run(core))"},{"path":"https://jgcri.github.io/hector/articles/ex_GMAT-GMST.html","id":"find-gmst","dir":"Articles","previous_headings":"","what":"Find GMST","title":"Example: Calculating GMST from GMAT in Hector","text":"GMST can calculated Hector outputs computing weighted sum land air ocean surface temperatures using following equation: $ = ( * ) + ( * (1 - )) $ Hector, land air temperature represented land_tas (LAND_TAS()) ocean surface temperature represented sst (SST()). components stem variable tas (GLOBAL_TAS()), Hector stores GMAT. Note reason variable represented two different ways due interaction R interface underlying C++ model. example, LAND_TAS() function R returns string message land_tas, passed base C++ Hector model. method user-friendly spelling/capitalization issue developer-friendly string C++ can changed without changing R user interface.","code":"flnd <- 0.29 # fractional land area, a constant in Hector hector_output <- fetchvars(core, 1745:2300, vars = c(LAND_TAS(), SST(), GLOBAL_TAS())) # Get the variables we want and corresponding years/value output <- subset(hector_output, variable %in% c(LAND_TAS(), SST())) output <- subset(output, select = c(year, variable, value)) # Reorder and clean up data output <- reshape(output, direction = \"wide\", idvar = \"year\", timevar = \"variable\") names(output) <- gsub(\"value.\", \"\", names(output)) # Conversion equation output$GMST <- with(output, (land_tas * flnd + sst * (1 - flnd))) global_surface_temp <- subset(output, select = c(year, GMST)) # Organize final data, year and corresponding GMST names(global_surface_temp)[names(global_surface_temp) == \"output$year\"] <- \"year\" names(global_surface_temp)[names(global_surface_temp) == \"GMST\"] <- \"value\" variable <- rep(\"GMST\", times = 556) variable <- as.data.frame(variable) global_surface_temp <- cbind(global_surface_temp, variable) # Rename Hector's variable for GMAT global_air_temp <- subset(hector_output, variable == GLOBAL_TAS()) global_air_temp <- subset(global_air_temp, select = c(variable, year, value)) global_air_temp$variable <- \"GMAT\""},{"path":"https://jgcri.github.io/hector/articles/ex_GMAT-GMST.html","id":"plot-results","dir":"Articles","previous_headings":"","what":"Plot results","title":"Example: Calculating GMST from GMAT in Hector","text":"following plot shows GMST GMAT time. see 2000, GMAT begins increase quickly GMST. 2300, significant gap two; GMAT higher GMST GMAT responding quickly anthropogenic forcing. makes sense GMST accounts heating ocean surface warms slowly atmosphere. , highlight gap two temperatures, can plot difference.","code":"data <- rbind(global_surface_temp, global_air_temp) ggplot(data) + geom_line(aes(year, value, color = variable)) + theme_bw() + labs(y = expression(degree ~ \"C\"), title = \"Comparison of Hector GMST and GMAT\") GMST_d <- subset(data, variable == \"GMST\") GMAT_d <- subset(data, variable == \"GMAT\") GMAT_d$variable <- \"GMAT - GMST\" GMAT_d$value <- GMAT_d$value - GMST_d$value ggplot(GMAT_d) + geom_line(aes(year, value, color = variable)) + theme_bw() + labs(y = expression(degree ~ \"C\"), title = \"Differences in temperature over time\")"},{"path":"https://jgcri.github.io/hector/articles/ex_GMAT-GMST.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Example: Calculating GMST from GMAT in Hector","text":"GMST allows measuring global temperature fluctuations used report global warming trends. Hector directly return GMST output, straightforward calculate metric using land ocean surface temperatures. Remember shut core.","code":"shutdown(core) ## Hector core (INACTIVE)"},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Carbon tracking with Hector","text":"vignette walk Hector’s carbon tracking feature show turn tracking, retrieve tracking data, display results. Additionally, vignette demonstrates application carbon tracking feature shows calculate model’s airborne fraction. Hector’s carbon tracking feature helps trace movement carbon various pools model runs. user-chosen start date, pool deemed composed 100% carbon , .e. moment time deep ocean pool 100% composed carbon deep pool. model moves forward time start date, Hector tracks pool’s fractional composition – .e. sources current carbon. run finished, data can read R analyzed.","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Carbon tracking with Hector","text":"First, let’s load packages need.","code":"library(hector) library(ggplot2)"},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"carbon-tracking","dir":"Articles","previous_headings":"","what":"Carbon tracking","title":"Carbon tracking with Hector","text":"Now, read INI file create new core. example, use SSP245. order use carbon tracking feature, must use setvar fetchvars. 1 First, let’s look trackingDate prior setting value. returns variable trackingDate value 9999. default value turn carbon tracking (model never reaches year 9999). Now, set trackingDate, check worked, run core. Let’s begin tracking 1750. date, model mark carbon pools originating pool: atmosphere 100% ‘atmosphere-origin’ C, soil 100% ‘soil-origin’ C, etc. point, model run. retrieve carbon tracking data, use get_tracking_data() function. returns data frame gives current state pool, fractions carbon sourced , model time point trackingDate. tdata dataset now contains information year (note first year start-tracking date asked ), model component, name pool within component, amount carbon pool, fraction (0-1) source pool. Importantly, source fractions given pool year always sum 1. Side note: names carbon tracking data (pool_name, pool_value, pool_units) differ used model’s standard stream output (variable, value, units respectively). contrast, year component named identically two output datasets.","code":"inifile <- file.path(system.file(\"input\", package = \"hector\"), \"hector_ssp245.ini\") core <- newcore(inifile) fetchvars(core, NA, TRACKING_DATE()) ## scenario year variable value units ## 1 Unnamed Hector core NA trackingDate 9999 (unitless) setvar(core, NA, TRACKING_DATE(), 1750, \"(unitless)\") fetchvars(core, NA, TRACKING_DATE()) ## scenario year variable value units ## 1 Unnamed Hector core NA trackingDate 1750 (unitless) invisible(reset(core)) run(core) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 2300 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini tdata <- get_tracking_data(core) head(tdata) ## year component pool_name pool_value pool_units source_name source_fraction ## 1 1750 ocean HL 150.050 Pg C atmos_co2 0.00390956 ## 2 1750 ocean HL 150.050 Pg C HL 0.58577800 ## 3 1750 ocean HL 150.050 Pg C intermediate 0.16750400 ## 4 1750 ocean HL 150.050 Pg C LL 0.24280900 ## 5 1750 ocean LL 837.628 Pg C atmos_co2 0.00000000 ## 6 1750 ocean LL 837.628 Pg C LL 0.91883400"},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"results","dir":"Articles","previous_headings":"","what":"Results","title":"Carbon tracking with Hector","text":"using ggplot, can create time series graphs origin one carbon pools model changes time. Let’s take look graphs. Note earth_c pool always 100% earth_c: inflows pool SSP245 (contrast, SSP19 direct-air carbon capture storage, earth_c pool origins change). see around 1800, human emissions (earth_c) begin appear pools atmos_co2 soil_c_global. 1900-2000, human emissions take become major sources 2100. Let’s examine just one pool: allows us better examine contributions source atmosphere.","code":"ggplot(tdata, aes(year, source_fraction, fill = source_name)) + geom_area() + facet_wrap(~pool_name) + theme(axis.text = element_text(size = 7)) + labs(x = \"Year\", y = \"Source Fraction\", title = \"Source Percentage Change Over Time\") atmos <- subset(tdata, pool_name == \"atmos_co2\") ggplot(atmos, aes(year, source_fraction, fill = source_name)) + geom_area() + facet_wrap(~pool_name) + labs(x = \"Year\", y = \"Source Fraction\", title = \"Source Percentage Change Over Time - Atmosphere\")"},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"example-airborne-fraction-calculation","dir":"Articles","previous_headings":"","what":"Example: Airborne fraction calculation","title":"Carbon tracking with Hector","text":"can also use tracking feature calculate airborne fraction given point time, much carbon emitted humans remains atmosphere fraction total emissions opposed absorbed land ocean. First, can define two functions. first run core turn tracking return data frame results, including column source amount pool (opposed source fraction). second function perform airborne fraction calculation finding amount earth_c (human emissions) atmos_co2 (atmosphere) pool start end date run dividing difference difference earth_c pool start run end, .e. much carbon left earth_c pool. Next, run functions SSP245 scenario 1750 2050 tracking beginning start run. can find value airborne fraction year model run. Let’s look airborne fraction changes time 1950 2020 ten year increments well value just year 2020. see airborne fraction 2020 -89%. words, -89% anthropogenic emissions remain atmosphere. can compare values study published W. Knorr 2009.2 Knorr computes seven values airborne fractions 2000 can average. can compute difference maximum value minimum give error range. airborne fraction found Hector towards lower end range values found Knorr 2009, varied 45% - 52%. However, see airborne fraction value Hector remains relatively constant time around 40%. aligns Knorr’s conclusion airborne fraction shows clear trend increasing decreasing. Additionally, Hector’s value falls within range CMIP models, seen Jones et al. 2013.3","code":"tracking_results <- function(inifile, start, stop, tracking, scenarioName) { # Establish core, turn on tracking, run core core <- newcore(inifile) setvar(core, NA, TRACKING_DATE(), tracking, \"(unitless)\") reset(core) run(core) # Get results, filter by correct years, add columns containing the amount # of carbon by source and the given scenario name results <- get_tracking_data(core) results <- subset(results, results$year >= start & results$year <= stop) results$source_amount <- results$source_fraction * results$pool_value results$scenario_name <- scenarioName return(results) } AF_calc <- function(start, results, stop) { # Isolate the atmos_co2 pool and earth_c source in start/end years atm_c <- subset(results, results$pool_name == \"atmos_co2\") atm_c <- subset(atm_c, atm_c$source_name == \"earth_c\") atm_c1 <- subset(atm_c, atm_c$year == start) atm_c2 <- subset(atm_c, atm_c$year == stop) atm_c <- rbind(atm_c1, atm_c2) # Calculate atmospheric uptake of Earth carbon atm_c <- tail(atm_c$source_amount, n = 1) - head(atm_c$source_amount, n = 1) # Isolate earth_c pool and source in start/end years earth_c_loss <- subset(results, results$pool_name == \"earth_c\" & results$source_name == \"earth_c\" & results$year %in% c(start, stop)) # Calculate change in Earth carbon earth_c_loss <- head(earth_c_loss$source_amount, n = 1) - tail(earth_c_loss$source_amount, n = 1) # Airborne fraction calculation AF <- atm_c / earth_c_loss return(AF) } ssp245 <- system.file(\"input\", \"hector_ssp245.ini\", package = \"hector\") results <- tracking_results(ssp245, 1750, 2050, 1750, \"SSP245\") years <- seq(1950, 2020, by = 10) airborne_frac <- cbind(make.row.names = years, lapply(years, AF_calc, results, 1750)) colnames(airborne_frac) <- c(\"year\", \"AF\") tail(airborne_frac, n = 1) ## year AF ## [8,] 2020 -0.893688 # Knorr avg - values from Knorr 2009 knorr_values <- c(0.45, 0.453, 0.518, 0.468, 0.468, 0.514, 0.449) knorr_avg <- mean(knorr_values) knorr_minmax <- max(knorr_values) - min(knorr_values) vars <- c(\"Knorr avg\", years) values <- c(knorr_avg, as.numeric(airborne_frac[, 2])) error <- c(knorr_minmax, rep(0, times = 8)) df <- data.frame(vars, values, error) ggplot(df) + aes(x = vars, y = values, fill = vars) + geom_bar(stat = \"identity\") + geom_errorbar(aes(ymin = values - error, ymax = values + error), width = 0.2) + scale_fill_manual(values = c(\"paleturquoise3\", \"paleturquoise2\", \"paleturquoise1\", \"darkslategray1\", \"darkslategray2\", \"darkslategray3\", \"darkslategray4\", \"darkslategray\", \"grey50\")) + theme(legend.position = \"none\") + labs(x = \"Year\", y = \"Airborne fraction over time\", title = \"Airborne Fraction Composition\")"},{"path":"https://jgcri.github.io/hector/articles/ex_carbon_tracking.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Carbon tracking with Hector","text":"carbon tracking feature allows users identify trace composition source pool Hector. useful , example, calculate model’s airborne fraction. Remember shut core.","code":"invisible(shutdown(core))"},{"path":"https://jgcri.github.io/hector/articles/ex_hector_apply.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Solving for an emissions pathway","text":"tutorial shows use Hector climate model R answer simple science question. case, ’ll looking solving methane emissions required time produce constant atmospheric methane concentration 2000 2100. run experiment, need nleqslv package installed. package used generate successive guesses search emissions pathway produces target concentration.","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_hector_apply.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Solving for an emissions pathway","text":"nleqslv package requires us supply function takes vector inputs (.e., emissions year) produces vector outputs discrepancies Hector output target concentrations. order create function, need set interface Hector. Since calculations going involve years 2000 beyond, run 1999. target function take vector emission values input return vector discrepancies Hector outputs target output. ’ll make target concentration value 1820 ppbv CH\\(_4\\) (bit higher year 2000 value baseline scenario).","code":"library(ggplot2) library(hector) hector_inifile <- file.path(system.file(\"input\", package = \"hector\"), \"hector_ssp245.ini\") hcore <- newcore(hector_inifile, suppresslogging = TRUE) run(hcore, 1999) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 1999 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini f <- function(emiss) { setvar(hcore, 2000:2100, EMISSIONS_CH4(), emiss, \"Tg CH4\") reset(hcore, 1999) run(hcore, 2100) hout <- fetchvars(hcore, 2000:2100, CONCENTRATIONS_CH4()) ## return the difference between the target of 1820 (constant) and the actual hout$value - 1820 }"},{"path":"https://jgcri.github.io/hector/articles/ex_hector_apply.html","id":"solve-for-the-target-emissions","dir":"Articles","previous_headings":"","what":"Solve for the target emissions","title":"Solving for an emissions pathway","text":"solve target emissions just pass target function nleqslv. also need initial guess emissions. doesn’t really matter guess , long isn’t something large cause model fail outright. use constant 300 Tg CH\\(_4\\) initial guess. check see algorithm really converged. discrepancy values last iteration stored fvec entry.","code":"x <- rep(300.0, times = 101) # 2000:2001 includes both endpoints slv <- nleqslv::nleqslv(x, f, method = \"Broyden\") max(abs(slv$fvec)) ## [1] 5.137258e-08"},{"path":"https://jgcri.github.io/hector/articles/ex_hector_apply.html","id":"results","dir":"Articles","previous_headings":"","what":"Results","title":"Solving for an emissions pathway","text":"convergence looks okay, let’s plot results: concentration target 1820 ppbv CH\\(_4\\) specified 2000 bit jump scenario based run (original 1811 ppbv), small spike emissions 2000. , emissions settle something smoother. ’re done Hector instance, need make sure shut , memory using freed.","code":"df <- data.frame(year = 2000:2100, value = slv[[\"x\"]]) ggplot(data = df, aes(year, value)) + geom_point() + labs(x = \"year\", y = \"Emissions (Tg CH4)\") shutdown(hcore) ## Hector core (INACTIVE)"},{"path":"https://jgcri.github.io/hector/articles/ex_hector_apply.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Solving for an emissions pathway","text":"simple example shows kind thing can combining Hector R interface packages available R. easy enough add emissions gasses work terms forcing temperature. Likewise, instead solving equilibrium minimize maximize function emissions (using optim function), run one many Monte Carlo packages available R.","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Land Ocean Warming","text":"Hector uses DOECLIM1, diffusion ocean-energy balance, calculate mean global air temperature sea-surface land-surface temperature anomalies. DOECLIM can simulate different rates warming land ocean surfaces, meaning land-ocean warming ratio emergent property Hector. However, users also option provide land-ocean warming ratio used place DOECLIM’s internal calculations. enables Hector emulate land-ocean warming dynamics specific Earth System Models. vignette demonstrates providing user-defined land-ocean warming ratio can affect Hector output.","code":""},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Land Ocean Warming","text":"","code":"library(ggplot2) library(hector) theme_set(theme_bw(base_size = 14))"},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"run-default-hector","dir":"Articles","previous_headings":"","what":"Run default Hector","title":"Land Ocean Warming","text":"Complete default run Hector, one uses DOECLIM calculate land ocean air temperature.","code":"years_to_keep <- 1850:2100 vars_to_keep <- c(GLOBAL_TAS(), LAND_TAS(), OCEAN_TAS(), CONCENTRATIONS_CO2()) inifile <- file.path(system.file(\"input\", package = \"hector\"), \"hector_ssp245.ini\") core <- newcore(inifile) run(core, max(years_to_keep)) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 2100 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini out1 <- fetchvars(core, years_to_keep, vars_to_keep) out1$scenario <- \"default\" out1$variable <- paste0(gsub(out1$variable, pattern = \"_\", replacement = \" \"), \" (\", out1$units, \")\") ggplot(data = out1) + geom_line(aes(year, value)) + facet_wrap(\"variable\", scales = \"free\") + labs(title = \"Default Hector\", subtitle = \"ssp245\", x = NULL) + theme(axis.text.x = element_text(angle = 90))"},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"run-hector-with-different-land-ocean-warming-ratios","dir":"Articles","previous_headings":"","what":"Run Hector with different land ocean warming ratios","title":"Land Ocean Warming","text":"Start writing function help us set land ocean warming ratio, run Hector, fetch results.","code":"# Helper function that runs a Hector core with a new land-ocean warming ratio. # # Args # hc: an active Hector core # value: the land ocean warming ratio to use # Return: data frame of Hector results run_with_lo <- function(hc, value) { # Set the land ocean warming ratio setvar(hc, NA, LO_WARMING_RATIO(), value, getunits(LO_WARMING_RATIO())) # Reset and run Hector reset(hc) run(hc) # Fetch and format the output out <- fetchvars(hc, years_to_keep, vars_to_keep) out$scenario <- value out$variable <- paste0(gsub(out$variable, pattern = \"_\", replacement = \" \"), \" (\", out$units, \")\") return(out) } # Make a vector of the land ocean warming ratios to test out lo_to_use <- seq(from = 1, to = 2.5, length.out = 20) # Apply our helper function to the various land ocean warming ratio values and # concatenate the results into a single data frame results_list <- lapply(lo_to_use, run_with_lo, hc = core) hector_lo_results <- do.call(results_list, what = \"rbind\")"},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"plot-the-results","dir":"Articles","previous_headings":"","what":"Plot the results","title":"Land Ocean Warming","text":"","code":"ggplot(data = hector_lo_results) + geom_line(aes(year, value, color = scenario, group = scenario)) + facet_wrap(\"variable\", scales = \"free\") + labs(title = \"User provided land-ocean warming ratio\", subtitle = \"ssp245\", x = NULL, y = NULL) + theme(axis.text.x = element_text(angle = 90)) + guides(color = guide_legend(title = \"lo ratio\"))"},{"path":"https://jgcri.github.io/hector/articles/ex_land_ocean_warming.html","id":"compare-default-hector-with-user-provided-land-ocean-warming-ratio","dir":"Articles","previous_headings":"","what":"Compare default Hector with user provided land ocean warming ratio","title":"Land Ocean Warming","text":"","code":"last_plot() + geom_line(data = out1, aes(year, value), color = \"orange\", size = 1) ## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0. ## ℹ Please use `linewidth` instead. ## This warning is displayed once every 8 hours. ## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was ## generated."},{"path":"https://jgcri.github.io/hector/articles/ex_multiple-biomes.html","id":"example-1-accelerated-high-latitude-warming","dir":"Articles","previous_headings":"","what":"Example 1: Accelerated high-latitude warming","title":"Running Hector with multiple biomes","text":"Observational modeling studies found high-latitude ecosystems, particularly Northern Hemisphere, warming significantly faster global average. example, explore implications effect Hector. First, let’s run reference case. Now, let’s redo run, accounting accelerated high-latitude warming. , use split_biome() function, takes existing Hector biome splits arbitrary number new biomes, partitioning C pools initializing parameters accordingly. purposes example, let’s assume high latitudes ~10% world’s vegetation detritus carbon ~40% world’s soil carbon, high-latitudes warming 2.5x faster global average. Now, let’s plot results. Hector results vs. without accelerated high-latitude warming. results show accelerated high-latitude warming induces positive global feedback Hector: warmer high-latitudes respire carbon soil detritus faster rate, leads higher CO2 concentrations warming. can look results detail examining biome-specific pools fluxes via optional biome argument Hector’s identifier functions (e.g. VEG_C()). plotting, let’s split variable column components – biome variable.","code":"ssp245 <- system.file(\"input\", \"hector_ssp245.ini\", package = \"hector\") core <- newcore(ssp245, suppresslogging = TRUE) invisible(run(core, 2100)) result_vars <- c(CONCENTRATIONS_CO2(), RF_TOTAL(), GLOBAL_TAS(), VEG_C(), SOIL_C(), DETRITUS_C()) reference_results <- fetchvars(core, 2000:2100, result_vars, scenario = \"reference\") split_biome(core, \"global\", c(\"low-latitude\", \"high-latitude\"), fveg_c = c(0.9, 0.1), fdetritus_c = c(0.9, 0.1), fsoil_c = c(0.6, 0.4), warmingfactor = c(1, 2.5)) invisible(reset(core)) invisible(run(core, 2100)) ## Auto-resetting core to -1 warming_results <- fetchvars(core, 2000:2100, result_vars, scenario = \"warming\") plot_data <- rbind(reference_results, warming_results) plot_data$variable <- factor(plot_data$variable, result_vars) ggplot(plot_data) + aes(x = year, y = value, color = scenario) + geom_line() + facet_wrap(vars(variable), scales = \"free_y\") + theme_bw() warming_details <- fetchvars(core, 2000:2100, c(VEG_C(\"low-latitude\"), VEG_C(\"high-latitude\"), DETRITUS_C(\"low-latitude\"), DETRITUS_C(\"high-latitude\"), SOIL_C(\"low-latitude\"), SOIL_C(\"high-latitude\")), scenario = \"warming\") head(warming_details) ## scenario year variable value units ## 1 warming 2000 low-latitude.veg_c 505.9479 Pg C ## 2 warming 2001 low-latitude.veg_c 506.2329 Pg C ## 3 warming 2002 low-latitude.veg_c 506.5745 Pg C ## 4 warming 2003 low-latitude.veg_c 506.9243 Pg C ## 5 warming 2004 low-latitude.veg_c 507.3095 Pg C ## 6 warming 2005 low-latitude.veg_c 507.6409 Pg C variable_split <- strsplit(warming_details$variable, \".\", fixed = TRUE) warming_details$biome <- factor(vapply(variable_split, \"[[\", character(1), 1), c(\"low-latitude\", \"high-latitude\")) warming_details$variable <- vapply(variable_split, \"[[\", character(1), 2) ggplot(warming_details) + aes(x = year, y = value, color = biome) + geom_line() + facet_wrap(vars(variable), scales = \"free_y\") + theme_bw()"},{"path":"https://jgcri.github.io/hector/articles/ex_multiple-biomes.html","id":"example-2-c3-and-c4-plants","dir":"Articles","previous_headings":"","what":"Example 2: C3 and C4 plants","title":"Running Hector with multiple biomes","text":"can conduct similar experiment one looking differential impact CO2 fertilization C3 C4 plants. Specifically, C4 plants possess special mechanism concentrating CO2 inside leaves, thereby reducing sensitivity changes atmospheric CO2. Although makes C4 plants efficient (particularly hot dry environments), also means reduced CO2 fertilization effect compared C3 plants. Hector, CO2 fertilization effect controlled parameter \\(\\beta\\) (BETA()). example, create two “biomes,” corresponding C3 C4 plants, different BETA() values, compare model outputs special case reference case (can recycle reference_results object previous example). purposes example, assume ~10% world’s terrestrial carbon associated C4 plants, CO2 fertilization effect C4 plans half strong C3 plants. Similarly accounting high-latitude warming, accounting reduced CO2 fertilization effect C4 plants results slightly warmer CO2-rich atmosphere.","code":"core <- newcore(ssp245, suppresslogging = TRUE) split_biome(core, \"global\", c(\"C3\", \"C4\"), fveg_c = c(0.9, 0.1), beta = c(0.36, 0.18)) invisible(reset(core)) invisible(run(core, 2100)) ## Auto-resetting core to -1 c4_results <- fetchvars(core, 2000:2100, result_vars, scenario = \"c3 vs c4\") c4_results_biome <- fetchvars(core, 2000:2100, c(VEG_C(\"C3\"), VEG_C(\"C4\"), DETRITUS_C(\"C3\"), DETRITUS_C(\"C4\"), SOIL_C(\"C3\"), SOIL_C(\"C4\")), scenario = \"c3 vs c4\") variable_split <- strsplit(c4_results_biome$variable, \".\", fixed = TRUE) c4_results_biome$biome <- vapply(variable_split, \"[[\", character(1), 1) c4_results_biome$variable <- vapply(variable_split, \"[[\", character(1), 2) c4_results$biome <- \"global\" reference_results$biome <- \"global\" plot_data <- rbind(reference_results, c4_results, c4_results_biome) plot_data$variable <- factor(plot_data$variable, result_vars) ggplot(plot_data) + aes(x = year, y = value, linetype = scenario, color = biome) + geom_line() + facet_wrap(vars(variable), scales = \"free_y\") + theme_bw()"},{"path":"https://jgcri.github.io/hector/articles/hector.html","id":"basic-run","dir":"Articles","previous_headings":"","what":"Basic run","title":"hector","text":"First, load hector package. Hector configured via INI file, defines run metadata, inputs (e.g., emissions scenarios), parameters. details file, see InputFiles. files ship Hector R package input/ subdirectory, allows accessed via system.file. First, determine path input file (ini) corresponding scenario SPP245. Alternatively, users may provide path ini file external Hector package local machine. file must comply Hector ini requirements. Next, initialize Hector instance, “core”, using configuration. core self-contained object contains information Hector’s inputs outputs. core initialized via newcore function: Now configured Hector core, can run run function. Notice returns output. Instead, output stored inside core object. retrieve , use fetchvars() function. , also specify want retrieve results 2000 2300. results returned long data.frame. makes easy plot using ggplot2. default, fetchvars() returns four outputs shown – atmospheric CO\\(_2\\) concentration, CO\\(_2\\) radiative forcing, total radiative forcing, temperature change – model output(s) can specified.","code":"library(hector) ini_file <- system.file(\"input/hector_ssp245.ini\", package = \"hector\") external_ini_file <- \"/path/to/ini/on/local/machine/my_ini.ini\" core <- newcore(ini_file) core ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini run(core) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 2300 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini results <- fetchvars(core, 2000:2300) head(results) ## scenario year variable value units ## 1 Unnamed Hector core 2000 CO2_concentration 369.1708 ppmv CO2 ## 2 Unnamed Hector core 2001 CO2_concentration 370.8896 ppmv CO2 ## 3 Unnamed Hector core 2002 CO2_concentration 372.5325 ppmv CO2 ## 4 Unnamed Hector core 2003 CO2_concentration 374.2783 ppmv CO2 ## 5 Unnamed Hector core 2004 CO2_concentration 376.0798 ppmv CO2 ## 6 Unnamed Hector core 2005 CO2_concentration 378.1072 ppmv CO2 library(ggplot2) ggplot(results) + aes(x = year, y = value) + geom_line() + facet_wrap(~variable, scales = \"free_y\")"},{"path":"https://jgcri.github.io/hector/articles/hector.html","id":"setting-parameters","dir":"Articles","previous_headings":"","what":"Setting parameters","title":"hector","text":"Hector R interface interacts parameters variables way. Therefore, variables can set checked via setvar() fetchvars(). First, let’s get current value \\(\\beta\\) (beta), CO\\(_2\\) fertilization factor. variables parameter names retrieved Hector core, stored R functions (e.g. BETA()). However, functions return string corresponding variable name. Just load results, use fetchvars() query parameter values. result fetchvars() always data.frame columns, even returning parameter value. Note also use NA second argument (dates). current value set 0.36 (note unitless quantity, hence (unitless) unit). Let’s bump little 0.40. Similarly run, returns output. Rather, change stored inside Hector “core” object. can confirm change took effect another call fetchvars(). Now, let’s run simulation higher value CO\\(_2\\) fertilization. , , let’s look Hector core object. Notice Current date set 2300. already run core end date. ability stop resume Hector runs configuration, possibly adjusting values certain variables stopped, essential part model’s functionality. , ’s something ’re interested . already stored previous run’s output results , can safely reset core: effectively ‘rewinds’ core back either provided date (defaults 0 missing) model start date (set INI file; default 1745), whichever greater. addition, date argument less model start date spinup enabled (do_spinup = 1 INI file), core re-spinup process current set parameters. NOTE Prior normal run beginning 1745, Hector optional “spinup” mode runs carbon cycle perturbations stabilizes. Essentially, model removes human emissions runs changes carbon pools system reached equilibrium. changing Hector parameters can change post-spinup equilibrium values state variables, Hector automatically run reset(core, date = 0) beginning next run call detects parameters changed. means currently possible change Hector parameters (\\(\\beta\\) preindustrial CO2) part-way run. However, still possible change values specific drivers state variables (CO2 emissions) middle run. , result reset command, core’s Current Date now model start date – 1745. can now perform another run new CO\\(_2\\) fertilization value. Let’s see changing CO\\(_2\\) fertilization affects results. expected, increasing CO\\(_2\\) fertilization increases strength terrestrial carbon sink therefore reduces atmospheric CO\\(_2\\), radiative forcing, global temperature. However, effects become pronounced latter half 21st century.","code":"BETA() ## [1] \"beta\" beta <- fetchvars(core, NA, BETA()) beta ## scenario year variable value units ## 1 Unnamed Hector core NA beta 0.55 (unitless) setvar(core, NA, BETA(), 0.40, \"(unitless)\") fetchvars(core, NA, BETA()) ## scenario year variable value units ## 1 Unnamed Hector core NA beta 0.4 (unitless) core ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 2300 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini reset(core) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 1745 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini run(core) ## Hector core: Unnamed Hector core ## Start date: 1745 ## End date: 2300 ## Current date: 2300 ## Input file: /home/runner/work/_temp/Library/hector/input/hector_ssp245.ini results_40 <- fetchvars(core, 2000:2300) head(results_40) ## scenario year variable value units ## 1 Unnamed Hector core 2000 CO2_concentration 382.1723 ppmv CO2 ## 2 Unnamed Hector core 2001 CO2_concentration 384.1810 ppmv CO2 ## 3 Unnamed Hector core 2002 CO2_concentration 386.1196 ppmv CO2 ## 4 Unnamed Hector core 2003 CO2_concentration 388.1667 ppmv CO2 ## 5 Unnamed Hector core 2004 CO2_concentration 390.2758 ppmv CO2 ## 6 Unnamed Hector core 2005 CO2_concentration 392.6141 ppmv CO2 results[[\"beta\"]] <- 0.36 results_40[[\"beta\"]] <- 0.40 compare_results <- rbind(results, results_40) ggplot(compare_results) + aes(x = year, y = value, color = factor(beta)) + geom_line() + facet_wrap(~variable, scales = \"free_y\") + guides(color = guide_legend(title = expression(beta)))"},{"path":"https://jgcri.github.io/hector/articles/hector.html","id":"sensitivity-analysis","dir":"Articles","previous_headings":"","what":"Sensitivity analysis","title":"hector","text":"Hector runs quickly, making easy run many simulations slightly different configurations. One application explore sensitivity Hector variability parameters. basic procedure previous section. However, save typing (, general, good programmers!), let’s create functions. can see, ability CO\\(_2\\) fertilization offset carbon emissions saturates, high values \\(\\beta\\), increase \\(\\beta\\) translates smaller decrease atmospheric CO\\(_2\\) related climate effects.","code":"#' Run Hector with a parameter set to a particular value, and return results #' #' @param core Hector core to use for execution #' @param parameter Hector parameter name, as a function call (e.g. `BETA()`) #' @param value Parameter value #' @return Results, as data.frame, with additional `parameter_value` column run_with_param <- function(core, parameter, value) { setvar(core, NA, parameter, value, getunits(parameter)) reset(core) run(core) result <- fetchvars(core, 2000:2300) result[[\"parameter_value\"]] <- value result[[\"parameter_units\"]] <- getunits(parameter) result } #' Run Hector with a range of parameter values run_with_param_range <- function(core, parameter, values) { mapped <- Map(function(x) run_with_param(core, parameter, x), values) Reduce(rbind, mapped) } sensitivity_beta <- run_with_param_range(core, BETA(), seq(0, 1, length.out = 5)) ggplot(sensitivity_beta) + aes(x = year, y = value, color = parameter_value, group = parameter_value) + geom_line() + facet_wrap(~variable, scales = \"free_y\") + guides(color = guide_colorbar(title = expression(beta))) + scale_color_viridis_c()"},{"path":"https://jgcri.github.io/hector/articles/manual.html","id":"model-philosophy","dir":"Articles","previous_headings":"","what":"Model Philosophy","title":"Manual","text":"Quick run time Complexity warranted Clean, modern, well-documented object-oriented code Open source - code freely available & accessible Flexible - model components, outputs, inputs can changed Hector’s version numbering","code":""},{"path":"https://jgcri.github.io/hector/articles/manual.html","id":"science","dir":"Articles","previous_headings":"","what":"Science","title":"Manual","text":"general summary science behind Hector Introduction Hector’s climate, terrestrial carbon cycle, ocean carbon cycle Model documentation manuscripts publications feature Hector","code":""},{"path":"https://jgcri.github.io/hector/articles/manual.html","id":"building-and-running-hector","dir":"Articles","previous_headings":"","what":"Building and Running Hector","title":"Manual","text":"build Hector source basic run sensitivity analysis run Hector constraints run Hector multiple biomes Videos & resources","code":""},{"path":"https://jgcri.github.io/hector/articles/manual.html","id":"for-developers","dir":"Articles","previous_headings":"","what":"For Developers","title":"Manual","text":"mixture notes related C++ R Hector code bases External API Component API Add new component Add new variable Add new forcer","code":""},{"path":"https://jgcri.github.io/hector/articles/manual.html","id":"contributing-to-hector","dir":"Articles","previous_headings":"","what":"Contributing to Hector","title":"Manual","text":"Contribution guide Authorship Guidelines Style Guide","code":""},{"path":"https://jgcri.github.io/hector/articles/ocean-carbon-cycle.html","id":"science","dir":"Articles","previous_headings":"","what":"Science","title":"Ocean Carbon Cycle","text":"Based work Lenton (2000)1, Knox McElroy (1984)2, Sarmiento Toggweiler (1984)3, Hector’s implementation ocean carbon cycle documented Hartin et al. (2016).4 Hector’s ocean four box model two surface level boxes (high latitude low latitude), intermediate, deep ocean boxes. Within surface boxes Hector solves pCO2, pH, [HCO\\({_3}^{-1}\\) ], [CO\\(_{3}^{-2}\\)], aragonite \\(\\Omega_{Ar}\\) calcite \\(\\Omega_{Ca}\\). chemistry carbon surface boxes depends salinity, dissolved inorganic carbon (DIC), temperature.","code":""},{"path":"https://jgcri.github.io/hector/articles/ocean-carbon-cycle.html","id":"parameters","dir":"Articles","previous_headings":"","what":"Parameters","title":"Ocean Carbon Cycle","text":"Six parameters may set INI file R interface: tt (TT() R), thermohaline overturning (m3/s) tu (TU()), high latitude overturning (m3/s) twi (TWI()), warm-intermediate exchange (m3/s) tid (TID()), intermediate-deep exchange (m3/s) preind_surface_c (OCEAN_PREIND_C_SURF()), preindustrial carbon surface ocean (Pg C) preind_interdeep_c (OCEAN_PREIND_C_ID()), preindustrial carbon intermediate deep ocean (Pg C)","code":""},{"path":"https://jgcri.github.io/hector/articles/ocean-carbon-cycle.html","id":"implementation","dir":"Articles","previous_headings":"","what":"Implementation","title":"Ocean Carbon Cycle","text":"oceanbox cpp hpp files set four ocean boxes determine connections one another. carbon, energy, volume move four ocean boxes. ocean_csys cpp hpp files define solver temperature dependent system equations determine solubility equilibrium constants. Within ocean_component","code":""},{"path":"https://jgcri.github.io/hector/articles/output.html","id":"standalone-executable","dir":"Articles","previous_headings":"","what":"Standalone Executable","title":"Outputs","text":"Output standalone executable written output sub-directory hector’s root directory. Hector results stored outputstream_name.csv; applicable, carbon tracking results written tracking_name.csv (name refers hector run name). output stream csv contains results output spin-period handful variables.","code":""},{"path":"https://jgcri.github.io/hector/articles/output.html","id":"r-hector","dir":"Articles","previous_headings":"","what":"R Hector","title":"Outputs","text":"fetchvars function used get results hector core identifier functions listed R_function table .","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/articles/outputstream.html","id":"output-stream-categories","dir":"Articles","previous_headings":"","what":"Output stream categories:","title":"Command line Hector's outputstream","text":"important note time: outputstream code currently writes end date current timestep outputstream.csv file; e.g., ’re running 1 January 1745 - 31 December 1745, gets written “1746”. intuitive (people think “1746” denoting January 1-December 31) numerically correct: date 1746.0, .e. midnight December 31 1745. consequence carbon fluxes logged timepoint effectively calendar year 1745 (1745-01-01 1745-12-31). first line file timestamp version number line, skipped CSV-reading code. variables appear outputstream table include: TODO: auto-generated @leeyap output table?","code":""},{"path":"https://jgcri.github.io/hector/articles/units.html","id":"units-for-hector-outputs","dir":"Articles","previous_headings":"","what":"Units for Hector outputs","title":"Units for emissions passed into Hector","text":"Hector outputs returned unitval structures, doubt, can always dump return value output stream see unit (test units field likely candidates). follows non-exhaustive list commonly-used outputs. See also unitval notes","code":""},{"path":"https://jgcri.github.io/hector/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Kalyn Dorheim. Author, maintainer. Ben Bond-Lamberty. Author. Skylar Gering. Contributor. Corinne Hartin. Contributor. Robert Link. Contributor. Mat Nicholson. Contributor. mnichol3 Pralit Patel. Contributor. Leeya Pressburger. Contributor, data contributor. Alexey Shiklomanov. Contributor. Benjamin Vega-Westhoff. Contributor. Dawn Woodard. Contributor.","code":""},{"path":"https://jgcri.github.io/hector/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Dorheim K, Bond-Lamberty B (2023). hector: Hector Simple Climate Model. R package version 3.1.1, https://jgcri.github.io/hector/, https://github.com/JGCRI/hector.","code":"@Manual{, title = {hector: The Hector Simple Climate Model}, author = {Kalyn Dorheim and Ben Bond-Lamberty}, year = {2023}, note = {R package version 3.1.1, https://jgcri.github.io/hector/}, url = {https://github.com/JGCRI/hector}, }"},{"path":"https://jgcri.github.io/hector/index.html","id":"hector","dir":"","previous_headings":"","what":"The Hector Simple Climate Model","title":"The Hector Simple Climate Model","text":"repository Hector, open source, object-oriented, simple global climate carbon-cycle model runs quickly still representing critical global scale earth system processes. Hector simple climate model (SCM, also known reduced-complexity climate model), class models extremely versatile wide range applications. Due computational efficiency, SCMs can easily coupled models used design scenarios, emulate complex climate models, conduct uncertainty analyses. Hector’s output global mean air temperature change eight Shared Socioeconomic Pathways (SSPs).","code":""},{"path":"https://jgcri.github.io/hector/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"The Hector Simple Climate Model","text":"hector R package can installed using remotes::install_github function. detailed installation instructions, including set Hector command line executable, can found .","code":"remotes::install_github('jgcri/hector') library(hector)"},{"path":"https://jgcri.github.io/hector/index.html","id":"tools-and-software-that-work-with-hector","dir":"","previous_headings":"","what":"Tools and Software That Work with Hector","title":"The Hector Simple Climate Model","text":"GCAM: Hector can used climate component GCAM pyhector: Python interface Hector fldgen: spatially resolved temperature & precipitation emulator CMIP5 ESMs HectorUI: run Hector web interface!","code":""},{"path":"https://jgcri.github.io/hector/index.html","id":"contributing-to-hector","dir":"","previous_headings":"","what":"Contributing to Hector","title":"The Hector Simple Climate Model","text":"Hector team welcomes values community contributions, please see Contribution Guide note contributing project, agree abide Contributor Code Conduct research supported U.S. Department Energy, Office Science, part research Multi-Sector Dynamics, Earth Environmental System Modeling Program. Pacific Northwest National Laboratory operated DOE Battelle Memorial Institute contract DE-AC05-76RL01830.","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for variables in the Hector carbon cycle component — NBP","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"identifiers correspond variables can read /set carbon cycle","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"","code":"NBP() CONCENTRATIONS_CO2() NPP() RH() ATMOSPHERIC_CO2() FFI_EMISSIONS() DACCS_UPTAKE() LUC_EMISSIONS() LUC_UPTAKE() CO2_CONSTRAIN() NBP_CONSTRAIN() VEG_C(biome = \"\") DETRITUS_C(biome = \"\") SOIL_C(biome = \"\") PERMAFROST_C(biome = \"\") THAWEDP_C(biome = \"\") FRAC_FROZEN(biome = \"\") FRAC_STATIC(biome = \"\") PERMAFROST_MU(biome = \"\") PERMAFROST_SIGMA(biome = \"\") FRAC_DECOMP_CH4(biome = \"\") EARTH_C() NPP_FLUX0(biome = \"\")"},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"biome Name biome (leave empty global)","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"CO2_CONSTRAIN(): Constrain atmospheric CO2 concentration (\"(ppmv CO2)\") NBP_CONSTRAIN(): Constrain net biome production (land-atmosphere flux) (\"(PgC/yr)\") VEG_C(): Vegetation C pool (`\"Pg C\"`) DETRITUS_C(): Vegetation detritus C pool (`\"Pg C\"`) SOIL_C(): Soil C pool (`\"Pg C\"`) PERMAFROST_C(): Permafrost C pool (`\"Pg C\"`) THAWEDP_C(): Thawed permafrost C pool (`\"Pg C\"`) FRAC_FROZEN(): Fraction permafrost still frozen (\"(unitless)\") FRAC_STATIC(): Fraction thawed permafrost static (\"(unitless)\") PERMAFROST_MU(): Permafrost thaw mu parameter (\"(unitless)\") PERMAFROST_SIGMA(): Permafrost thaw sigma parameter (\"(unitless)\") FRAC_DECOMP_CH4(): Methane fraction permafrost decomposition (\"(unitless)\") NPP_FLUX0(): Initial net primary productivity (NPP)flux (`\"Pg C year^-1\"`)","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"See Woodard et al. (2021) See Woodard et al. (2021)","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"output-variables","dir":"Reference","previous_headings":"","what":"Output variables","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"variables can read using GETDATA message type: CONCENTRATIONS_CO2 Atmospheric CO2 concentration ATMOSPHERIC_CO2 Atmospheric CO2 units C NBP Net biome production. Annual global C flux atmosphere land. positive value means net flux atmosphere land (.e. land net carbon sink), negative value means net flux land atmosphere (.e. land net carbon source). Note despite name--follows disciplinary convention, see Chapin et al. 2006--currently globally-averaged variable. FFI_EMISSIONS Fossil fuel industrial emissions LUC_EMISSIONS Land use change emissions NPP Net primary production RH Heterotrophic respiration EARTH_C Earth pool","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"input-variables","dir":"Reference","previous_headings":"","what":"Input variables","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"FFI_EMISSIONS Fossil fuel industrial emissions (\"Pg C/yr\") LUC_EMISSIONS Land use change emissions (\"Pg C/yr\") CO2_CONSTRAIN Prescribed atmospheric CO2 concentration (\"ppmv CO2\") NBP_CONSTRAIN Prescribed net biome production (land-atmosphere C flux) (\"Pg C/yr\") DACCS_UPTAKE Direct air carbon capture storage LUC_UPTAKE Land use change uptake","code":""},{"path":"https://jgcri.github.io/hector/reference/carboncycle.html","id":"note-1","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for variables in the Hector carbon cycle component — NBP","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/concentrations.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O","title":"Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O","text":"variables can read using GETDATA message type.","code":""},{"path":"https://jgcri.github.io/hector/reference/concentrations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O","text":"","code":"CONCENTRATIONS_N2O() PREINDUSTRIAL_N2O() PREINDUSTRIAL_O3() CONCENTRATIONS_O3()"},{"path":"https://jgcri.github.io/hector/reference/concentrations.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O","text":"CONCENTRATIONS_N2O(): Atmospheric N2O concentration PREINDUSTRIAL_N2O(): Preindustrial atmospheric N2O concentration PREINDUSTRIAL_O3(): Preindustrial ozone concentration CONCENTRATIONS_O3(): Atmospheric ozone concentration","code":""},{"path":"https://jgcri.github.io/hector/reference/concentrations.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for miscellaneous concentrations not elsewhere described — CONCENTRATIONS_N2O","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/constraints.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for constraints — FTOT_CONSTRAIN","title":"Identifiers for constraints — FTOT_CONSTRAIN","text":"identifiers correspond Hector's constraint capabilities","code":""},{"path":"https://jgcri.github.io/hector/reference/constraints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for constraints — FTOT_CONSTRAIN","text":"","code":"FTOT_CONSTRAIN() CH4_CONSTRAIN() N2O_CONSTRAIN() TAS_CONSTRAIN()"},{"path":"https://jgcri.github.io/hector/reference/constraints.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for constraints — FTOT_CONSTRAIN","text":"FTOT_CONSTRAIN(): Constrain total radiative forcing CH4_CONSTRAIN(): CH4 concentration constraint \"ppbv CH4\" N2O_CONSTRAIN(): N2O concentration constraint (\"pbbv N2O\") TAS_CONSTRAIN(): Constrain global mean temperature (\"(degC)\")","code":""},{"path":"https://jgcri.github.io/hector/reference/constraints.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for constraints — FTOT_CONSTRAIN","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/create_biome.html","id":null,"dir":"Reference","previous_headings":"","what":"Create new biome — create_biome","title":"Create new biome — create_biome","text":"Create new biome","code":""},{"path":"https://jgcri.github.io/hector/reference/create_biome.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create new biome — create_biome","text":"","code":"create_biome( core, biome, veg_c0, detritus_c0, soil_c0, permafrost_c0, npp_flux0, warmingfactor, beta, q10_rh, f_nppv, f_nppd, f_litterd )"},{"path":"https://jgcri.github.io/hector/reference/create_biome.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create new biome — create_biome","text":"core Hector core biome Name new biome veg_c0 Initial vegetation C pool detritus_c0 Initial detritus C pool soil_c0 Initial soil C pool permafrost_c0 Initial permafrost C pool npp_flux0 Initial net primary productivity warmingfactor Temperature multiplier (default = `1.0`) beta CO2 fertilization effect (default = `0.36`) q10_rh Q10 heterotrophic respiration (default = `2.0`) f_nppv Fraction NPP vegetation (default = `0.35`) f_nppd Fraction NPP detritus (default = `0.60`) f_litterd Fraction litter flux detritus (default = `0.98`)","code":""},{"path":"https://jgcri.github.io/hector/reference/create_biome.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create new biome — create_biome","text":"Hector core, invisibly","code":""},{"path":"https://jgcri.github.io/hector/reference/create_biome.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create new biome — create_biome","text":"Alexey Shiklomanov","code":""},{"path":"https://jgcri.github.io/hector/reference/create_biome_impl.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a biome — create_biome_impl","title":"Create a biome — create_biome_impl","text":"Create biome","code":""},{"path":"https://jgcri.github.io/hector/reference/create_biome_impl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a biome — create_biome_impl","text":"","code":"create_biome_impl(core, biome)"},{"path":"https://jgcri.github.io/hector/reference/create_biome_impl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a biome — create_biome_impl","text":"core Handle Hector instance run. biome (character) Name new biome","code":""},{"path":"https://jgcri.github.io/hector/reference/delete_biome_impl.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete a biome — delete_biome_impl","title":"Delete a biome — delete_biome_impl","text":"Delete biome","code":""},{"path":"https://jgcri.github.io/hector/reference/delete_biome_impl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete a biome — delete_biome_impl","text":"","code":"delete_biome_impl(core, biome)"},{"path":"https://jgcri.github.io/hector/reference/delete_biome_impl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete a biome — delete_biome_impl","text":"core Handle Hector instance run. biome (character) Name biome delete","code":""},{"path":"https://jgcri.github.io/hector/reference/delta.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for Hector forcing component parameters — DELTA_CO2","title":"Identifiers for Hector forcing component parameters — DELTA_CO2","text":"identifiers specify tropospheric adjustments stratospheric-temperature adjusted radiative forcings. values must number -1 1, can read /set hectors forcing halocarbon components.","code":""},{"path":"https://jgcri.github.io/hector/reference/delta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for Hector forcing component parameters — DELTA_CO2","text":"","code":"DELTA_CO2() RF_N2O() DELTA_N2O() DELTA_CF4() DELTA_C2F6() DELTA_HFC23() DELTA_HFC32() DELTA_HFC4310() DELTA_HFC125() DELTA_HFC134A() DELTA_HFC143A() DELTA_HFC227EA() DELTA_HFC245FA() DELTA_SF6() DELTA_CFC11() DELTA_CFC12() DELTA_CFC113() DELTA_CFC114() DELTA_CFC115() DELTA_CCL4() DELTA_CH3CCL3() DELTA_HCFC22() DELTA_HCFC141B() DELTA_HCFC142B() DELTA_HALON1211() DELTA_HALON1301() DELTA_HALON2402() DELTA_CH3CL() DELTA_CH3BR() DELTA_CH4()"},{"path":"https://jgcri.github.io/hector/reference/delta.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for Hector forcing component parameters — DELTA_CO2","text":"DELTA_CO2(): foring tropospheric adjustments N2O RF_N2O(): foring tropospheric adjustments N2O DELTA_N2O(): Radiative forcing due N2O DELTA_CF4(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_C2F6(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC23(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC32(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing ' @export DELTA_HFC4310(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC125(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC134A(): tropospheric adjustments used convert tratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC143A(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC227EA(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HFC245FA(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_SF6(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CFC11(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CFC12(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CFC113(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CFC114(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CFC115(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CCL4(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CH3CCL3(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HCFC22(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HCFC141B(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HCFC142B(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HALON1211(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HALON1301(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_HALON2402(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CH3CL(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CH3BR(): tropospheric adjustments used convert stratospheric-temperature adjusted radiative forcing effective radiative forcing DELTA_CH4(): Radiative forcing tropospheric adjustment CH4","code":""},{"path":"https://jgcri.github.io/hector/reference/delta.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for Hector forcing component parameters — DELTA_CO2","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/emissions.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC","title":"Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC","text":"variables can set using SETDATA message type.","code":""},{"path":"https://jgcri.github.io/hector/reference/emissions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC","text":"","code":"EMISSIONS_BC() EMISSIONS_N2O() NAT_EMISSIONS_N2O() EMISSIONS_NOX() EMISSIONS_CO() EMISSIONS_NMVOC() EMISSIONS_OC() EMISSIONS_NH3()"},{"path":"https://jgcri.github.io/hector/reference/emissions.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC","text":"EMISSIONS_BC(): Black carbon emissions EMISSIONS_N2O(): N2O emissions (\"Tg N\") NAT_EMISSIONS_N2O(): Natural N2O emissions (\"Tg N\") EMISSIONS_NOX(): Emissions NOx compounds (\"Tg N\") EMISSIONS_CO(): Emissions carbon monoxide (\"Tg CO\") EMISSIONS_NMVOC(): Emissions non-methane volatile organic compounds (NMVOC) (\"Tg NMVOC\") EMISSIONS_OC(): Emissions organic carbon (\"Tg\") EMISSIONS_NH3(): Emissions NH3 (\"Tg\")","code":""},{"path":"https://jgcri.github.io/hector/reference/emissions.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for miscellaneous emissions not elsewhere described — EMISSIONS_BC","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/fetchvars.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch results from a running Hector core — fetchvars","title":"Fetch results from a running Hector core — fetchvars","text":"function fetch results return data frame. core must active order work; attempting fetch results core shut cause error.","code":""},{"path":"https://jgcri.github.io/hector/reference/fetchvars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch results from a running Hector core — fetchvars","text":"","code":"fetchvars(core, dates, vars = NULL, scenario = NULL)"},{"path":"https://jgcri.github.io/hector/reference/fetchvars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch results from a running Hector core — fetchvars","text":"core Hector core object dates Vector dates fetch; automatically trimmed dates start date latest date currently run. Set NA return data associated dates model parameters. vars List (vector) capability strings defining variables fetched result. scenario Optional scenario name. specified, name element Hector core object used.","code":""},{"path":"https://jgcri.github.io/hector/reference/fetchvars.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fetch results from a running Hector core — fetchvars","text":"variables fetch given sequence character strings corresponding capabilities declared hector components. strings generated using capability identifier functions (see list documentation pages ). list variables fetch specify vars stored hector.default.fetchvars option. option also unset, default variable list CO2 concentration, total radiative forcing, CO2 forcing, global mean temperature. see list potential vars see data(inputstable) data(fxntable).","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/fetchvars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch results from a running Hector core — fetchvars","text":"","code":"if (FALSE) { ini <- system.file(package = \"hector\", \"input/hector_ssp245.ini\") hc <- newcore(ini) run(hc) out <- fetchvars(core = hc, dates = 1900:2100, vars = c(GLOBAL_TAS(), NPP())) print(out) }"},{"path":"https://jgcri.github.io/hector/reference/forcings.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for capabilities in the Hector forcing component — RF_TOTAL","title":"Identifiers for capabilities in the Hector forcing component — RF_TOTAL","text":"identifiers specify forcing values can provided hector via forcing component. values corresponding identifiers read-(.e., can appear GETDATA messages.)","code":""},{"path":"https://jgcri.github.io/hector/reference/forcings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for capabilities in the Hector forcing component — RF_TOTAL","text":"","code":"RF_TOTAL() RF_ALBEDO() RF_CO2() RF_H2O_STRAT() RF_O3_TROP() RF_BC() RF_OC() RF_NH3() RF_SO2() RF_ACI() RF_VOL() RF_MISC() Q_CO2() RF_CH4()"},{"path":"https://jgcri.github.io/hector/reference/forcings.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for capabilities in the Hector forcing component — RF_TOTAL","text":"RF_TOTAL(): Total radiative forcing RF_ALBEDO(): Radiative forcing due albedo RF_CO2(): Radiative forcing due CO2 RF_H2O_STRAT(): Radiative forcing due stratospheric water vapor RF_O3_TROP(): Radiative forcing due tropospheric ozone RF_BC(): Radiative forcing due black carbon aerosol-radiation interactions RF_OC(): Radiative forcing due organic carbon aerosol-radiation interactions RF_NH3(): Radiative forcing due NH3 aerosol-radiation interactions RF_SO2(): Radiative forcing due SO2 aerosol-radiation interactions RF_ACI(): aerosol-cloud interactions, includes contributions SO2, BC OC RF_VOL(): Radiative forcing due volcanic activity RF_MISC(): Radiative miscellaneous forcing read ini. Q_CO2(): Radiative forcing efficiency doubling CO2 RF_CH4(): Radiative forcing due methane","code":""},{"path":"https://jgcri.github.io/hector/reference/forcings.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for capabilities in the Hector forcing component — RF_TOTAL","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/fxntable.html","id":null,"dir":"Reference","previous_headings":"","what":"A data.frame containing information R hector function name and hector string names. — fxntable","title":"A data.frame containing information R hector function name and hector string names. — fxntable","text":"data.frame containing information R hector function name hector string names.","code":""},{"path":"https://jgcri.github.io/hector/reference/fxntable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A data.frame containing information R hector function name and hector string names. — fxntable","text":"","code":"fxntable"},{"path":"https://jgcri.github.io/hector/reference/fxntable.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A data.frame containing information R hector function name and hector string names. — fxntable","text":"data.frame 2 columns 239 rows. fxn String R hector function name string String variable name","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_inits.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","title":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","text":"Internal helper function biome functions.","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_inits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","text":"","code":"get_biome_inits(core, biome)"},{"path":"https://jgcri.github.io/hector/reference/get_biome_inits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","text":"core Hector core biome Name biome retrieve data","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_inits.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","text":"Named numeric vector biome initial conditions parameters","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_inits.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Retrieve the initial conditions and parameters for a given biome — get_biome_inits","text":"Alexey Shiklomanov","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the current list of biomes for a Hector instance — get_biome_list","title":"Retrieve the current list of biomes for a Hector instance — get_biome_list","text":"Retrieve current list biomes Hector instance","code":""},{"path":"https://jgcri.github.io/hector/reference/get_biome_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the current list of biomes for a Hector instance — get_biome_list","text":"","code":"get_biome_list(core)"},{"path":"https://jgcri.github.io/hector/reference/get_biome_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the current list of biomes for a Hector instance — get_biome_list","text":"core Handle Hector instance retrieve biome list.","code":""},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the tracking data for a Hector instance — get_tracking_data","title":"Retrieve the tracking data for a Hector instance — get_tracking_data","text":"Retrieve tracking data Hector instance","code":""},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the tracking data for a Hector instance — get_tracking_data","text":"","code":"get_tracking_data(core)"},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the tracking data for a Hector instance — get_tracking_data","text":"core Handle Hector instance.","code":""},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve the tracking data for a Hector instance — get_tracking_data","text":"data.frame tracking data. Columns include year (integer), component (character), pool_name (character), pool_value (double), pool_units (character), source_name (character), source_fraction (double). fractions always sum 1 given pool year.","code":""},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Retrieve the tracking data for a Hector instance — get_tracking_data","text":"pool_name, pool_value, pool_units names differ used model's standard output stream (variable, value, units respectively).","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data_impl.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the tracking data for a Hector instance — get_tracking_data_impl","title":"Retrieve the tracking data for a Hector instance — get_tracking_data_impl","text":"Retrieve tracking data Hector instance","code":""},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data_impl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the tracking data for a Hector instance — get_tracking_data_impl","text":"","code":"get_tracking_data_impl(core)"},{"path":"https://jgcri.github.io/hector/reference/get_tracking_data_impl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the tracking data for a Hector instance — get_tracking_data_impl","text":"core Handle Hector instance.","code":""},{"path":"https://jgcri.github.io/hector/reference/getfxn.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the hector function associated with a specific string — getfxn","title":"Get the hector function associated with a specific string — getfxn","text":"function provides Hector function returns Hector string","code":""},{"path":"https://jgcri.github.io/hector/reference/getfxn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the hector function associated with a specific string — getfxn","text":"","code":"getfxn(str)"},{"path":"https://jgcri.github.io/hector/reference/getfxn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the hector function associated with a specific string — getfxn","text":"str String name find Hector function ","code":""},{"path":"https://jgcri.github.io/hector/reference/getfxn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the hector function associated with a specific string — getfxn","text":"Hector function name","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/getfxn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the hector function associated with a specific string — getfxn","text":"","code":"getfxn(\"beta\") #> [1] \"BETA()\" getfxn(\"q10_rh\") #> [1] \"Q10_RH()\""},{"path":"https://jgcri.github.io/hector/reference/getunits.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the hector unit strings for one or more variables — getunits","title":"Get the hector unit strings for one or more variables — getunits","text":"function provides units variables can set model using setvar. Variables read model fetchvars units column data frame returned .","code":""},{"path":"https://jgcri.github.io/hector/reference/getunits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the hector unit strings for one or more variables — getunits","text":"","code":"getunits(vars)"},{"path":"https://jgcri.github.io/hector/reference/getunits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the hector unit strings for one or more variables — getunits","text":"vars Capability strings variables get units .","code":""},{"path":"https://jgcri.github.io/hector/reference/getunits.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the hector unit strings for one or more variables — getunits","text":"Character vector unit strings. Variables found NA entries.","code":""},{"path":"https://jgcri.github.io/hector/reference/haloconstrain.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN","title":"Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN","text":"identifiers correspond concentration constraints halocarbons. cases, expected input units volumetric parts per trillion (\"ppvt\").","code":""},{"path":"https://jgcri.github.io/hector/reference/haloconstrain.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN","text":"","code":"CF4_CONSTRAIN() C2F6_CONSTRAIN() HFC23_CONSTRAIN() HFC32_CONSTRAIN() HFC4310_CONSTRAIN() HFC125_CONSTRAIN() HFC134A_CONSTRAIN() HFC143A_CONSTRAIN() HFC227EA_CONSTRAIN() HFC245FA_CONSTRAIN() SF6_CONSTRAIN() CFC11_CONSTRAIN() CFC12_CONSTRAIN() CFC113_CONSTRAIN() CFC114_CONSTRAIN() CFC115_CONSTRAIN() CCL4_CONSTRAIN() CH3CCL3_CONSTRAIN() HCFC22_CONSTRAIN() HCFC141B_CONSTRAIN() HCFC142B_CONSTRAIN() HALON1211_CONSTRAIN() HALON1301_CONSTRAIN() HALON2402_CONSTRAIN() CH3CL_CONSTRAIN() CH3BR_CONSTRAIN()"},{"path":"https://jgcri.github.io/hector/reference/haloconstrain.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN","text":"CF4_CONSTRAIN(): Concentration constraint CF4 C2F6_CONSTRAIN(): Concentration constraint C2F6 HFC23_CONSTRAIN(): Concentration constraint HFC-23 HFC32_CONSTRAIN(): Concentration constraint HFC-32 HFC4310_CONSTRAIN(): Concentration constraint HFC-4310 HFC125_CONSTRAIN(): Concentration constraint HFC-125 HFC134A_CONSTRAIN(): Concentration constraint HFC-134a HFC143A_CONSTRAIN(): Concentration constraint HFC-143a HFC227EA_CONSTRAIN(): Concentration constraint HFC-227ea HFC245FA_CONSTRAIN(): Concentration constraint HFC-254fa SF6_CONSTRAIN(): Concentration constraint sulfur hexafluoride CFC11_CONSTRAIN(): Concentration constraint CFC-11 CFC12_CONSTRAIN(): Concentration constraint CFC-12 CFC113_CONSTRAIN(): Concentration constraint CFC-113 CFC114_CONSTRAIN(): Concentration constraint CFC-114 CFC115_CONSTRAIN(): Concentration constraint CFC-115 CCL4_CONSTRAIN(): Concentration constraint carbon tetrachloride CH3CCL3_CONSTRAIN(): Concentration constraint trichloroethane HCFC22_CONSTRAIN(): Concentration constraint HCFC-22 HCFC141B_CONSTRAIN(): Concentration constraint HCFC-141b HCFC142B_CONSTRAIN(): Concentration constraint HCFC-142b HALON1211_CONSTRAIN(): Concentration constraint halon-1211 HALON1301_CONSTRAIN(): Concentration constraint halon-1301 HALON2402_CONSTRAIN(): Concentration constraint halon-2402 CH3CL_CONSTRAIN(): Concentration constraint chloromethane CH3BR_CONSTRAIN(): Concentration constraint bromomethane","code":""},{"path":"https://jgcri.github.io/hector/reference/haloconstrain.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for halocarbon concentration constraints — CF4_CONSTRAIN","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/haloemiss.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for halocarbon emissions — EMISSIONS_CF4","title":"Identifiers for halocarbon emissions — EMISSIONS_CF4","text":"identifiers correspond emissions values halocarbons. (now) write , meaning can appear SETDATA messages. cases, expected input units gigagrams (\"Gg\").","code":""},{"path":"https://jgcri.github.io/hector/reference/haloemiss.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for halocarbon emissions — EMISSIONS_CF4","text":"","code":"EMISSIONS_CF4() EMISSIONS_C2F6() EMISSIONS_HFC23() EMISSIONS_HFC32() EMISSIONS_HFC4310() EMISSIONS_HFC125() EMISSIONS_HFC134A() EMISSIONS_HFC143A() EMISSIONS_HFC227EA() EMISSIONS_HFC245FA() EMISSIONS_SF6() EMISSIONS_CFC11() EMISSIONS_CFC12() EMISSIONS_CFC113() EMISSIONS_CFC114() EMISSIONS_CFC115() EMISSIONS_CCL4() EMISSIONS_CH3CCL3() EMISSIONS_HCFC22() EMISSIONS_HCFC141B() EMISSIONS_HCFC142B() EMISSIONS_HALON1211() EMISSIONS_HALON1301() EMISSIONS_HALON2402() EMISSIONS_CH3CL() EMISSIONS_CH3BR()"},{"path":"https://jgcri.github.io/hector/reference/haloemiss.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for halocarbon emissions — EMISSIONS_CF4","text":"EMISSIONS_CF4(): Emissions CF4 EMISSIONS_C2F6(): Emissions C2F6 EMISSIONS_HFC23(): Emissions HFC-23 EMISSIONS_HFC32(): Emissions HFC-32 EMISSIONS_HFC4310(): Emissions HFC-4310 EMISSIONS_HFC125(): Emissions HFC-125 EMISSIONS_HFC134A(): Emissions HFC-134a EMISSIONS_HFC143A(): Emissions HFC-143a EMISSIONS_HFC227EA(): Emissions HFC-227ea EMISSIONS_HFC245FA(): Emissions HFC-254fa EMISSIONS_SF6(): Emissions sulfur hexafluoride EMISSIONS_CFC11(): Emissions CFC-11 EMISSIONS_CFC12(): Emissions CFC-12 EMISSIONS_CFC113(): Emissions CFC-113 EMISSIONS_CFC114(): Emissions CFC-114 EMISSIONS_CFC115(): Emissions CFC-115 EMISSIONS_CCL4(): Emissions carbon tetrachloride EMISSIONS_CH3CCL3(): Emissions trichloroethane EMISSIONS_HCFC22(): Emissions HCFC-22 EMISSIONS_HCFC141B(): Emissions HcFC-141b EMISSIONS_HCFC142B(): Emissions HCFC-142b EMISSIONS_HALON1211(): Emissions halon-1211 EMISSIONS_HALON1301(): Emissions halon-1301 EMISSIONS_HALON2402(): Emissions halon-2402 EMISSIONS_CH3CL(): Emissions chloromethane EMISSIONS_CH3BR(): Emissions bromomethane","code":""},{"path":"https://jgcri.github.io/hector/reference/haloemiss.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for halocarbon emissions — EMISSIONS_CF4","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/haloforcings.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for halocarbon forcings — RF_CF4","title":"Identifiers for halocarbon forcings — RF_CF4","text":"identifiers specify forcing values can provided hector via one myriad halocarbon components. values corresponding identifiers read-(.e., can appear GETDATA messages.) forcings returned relative forcings, base year (typically 1750) values subtracted .","code":""},{"path":"https://jgcri.github.io/hector/reference/haloforcings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for halocarbon forcings — RF_CF4","text":"","code":"RF_CF4() RF_C2F6() RF_HFC23() RF_HFC32() RF_HFC4310() RF_HFC125() RF_HFC134A() RF_HFC143A() RF_HFC227EA() RF_HFC245FA() RF_SF6() RF_CFC11() RF_CFC12() RF_CFC113() RF_CFC114() RF_CFC115() RF_CCL4() RF_CH3CCL3() RF_HCFC22() RF_HCFC141B() RF_HCFC142B() RF_HALON1211() RF_HALON1301() RF_HALON2402() RF_CH3CL() RF_CH3BR()"},{"path":"https://jgcri.github.io/hector/reference/haloforcings.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for halocarbon forcings — RF_CF4","text":"RF_CF4(): Radiative forcing due CF4 RF_C2F6(): Radiative forcing due C2F6 RF_HFC23(): Radiative forcing due HFC-23 RF_HFC32(): Radiative forcing due HFC-32 RF_HFC4310(): Radiative forcing due HFC-4310 RF_HFC125(): Radiative forcing due HFC-125 RF_HFC134A(): Radiative forcing due HFC-134a RF_HFC143A(): Radiative forcing due HFC-143a RF_HFC227EA(): Radiative forcing due HFC227ea RF_HFC245FA(): Radiative forcing due HFC-245fa RF_SF6(): Radiative forcing due sulfur hexafluoride RF_CFC11(): Radiative forcing due CFC-11 RF_CFC12(): Radiative forcing due CFC-12 RF_CFC113(): Radiative forcing due CFC-113 RF_CFC114(): Radiative forcing due CFC-114 RF_CFC115(): Radiative forcing due CFC-115 RF_CCL4(): Radiative forcing due carbon tetrachloride RF_CH3CCL3(): Radiative forcing due trichloroethane RF_HCFC22(): Radiative forcing due HCFC-22 RF_HCFC141B(): Radiative forcing due HCFC-141b RF_HCFC142B(): Radiative forcing due HCCFC-142b RF_HALON1211(): Radiative forcing due halon-1211 RF_HALON1301(): Radiative forcing due halon-1301 RF_HALON2402(): Radiative forcing due halon-2402 RF_CH3CL(): Radiative forcing due chloromethane RF_CH3BR(): Radiative forcing due bromomethane","code":""},{"path":"https://jgcri.github.io/hector/reference/haloforcings.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for halocarbon forcings — RF_CF4","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":null,"dir":"Reference","previous_headings":"","what":"hector: The Hector Simple Climate Model — hector-package","title":"hector: The Hector Simple Climate Model — hector-package","text":"Provides R interface Hector Simple Climate Model. Using interface can set initialize model, change model parameters emissions inputs, run Hector, retrieve model outputs. Note package authors identical C++ model authors.","code":""},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"hector: The Hector Simple Climate Model — hector-package","text":"package allows run Hector Simple Climate Model (SCM) R receive results back R data frames.","code":""},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":"getting-started","dir":"Reference","previous_headings":"","what":"Getting started","title":"hector: The Hector Simple Climate Model — hector-package","text":"run scenario, need scenario input file. Several examples included input directory, can find expression system.file('input', package='hector'). input files names like 'hector_sspNNN.ini', NNN one 119, 126, 245, 370, 434, 460, ssp585. quickstart wrapper called runscenario, takes input file argument, runs scenario, returns results data frame. variables get controlled option setting. Setting option explained manual page fetchvars.","code":""},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":"advanced-usage","dir":"Reference","previous_headings":"","what":"Advanced usage","title":"hector: The Hector Simple Climate Model — hector-package","text":"can get lot control hector run create hector instance (sometimes called \"core\" elsewhere documentation) using newcore function. can run Hector specific dates, fetch results, set parameters input data, rewind earlier date can rerun (e.g., changed emissions parameters). finished hector instance, call shutdown release resources allocated.","code":""},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"hector: The Hector Simple Climate Model — hector-package","text":"Hartin, C. ., Patel, P., Schwarber, ., Link, R. P., Bond-Lamberty, B. P.: simple object-oriented open-source model scientific policy analyses global climate system - Hector v1.0, Geosci. Model Dev., 8, 939-955, https://doi.org/10.5194/gmd-8-939-2015, 2015. Hartin, C. ., Bond-Lamberty, B., Patel, P., Mundra, .: Ocean acidification next three centuries using simple global climate carbon-cycle model: projections sensitivities, Biogeosciences, 13, 4329-4342, https://doi.org/10.5194/bg-13-4329-2016, 2016.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/hector-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"hector: The Hector Simple Climate Model — hector-package","text":"Maintainer: Kalyn Dorheim kalyn.dorheim@pnnl.gov (ORCID) Authors: Ben Bond-Lamberty bondlamberty@pnnl.gov (ORCID) contributors: Skylar Gering sgering@g.hmc.edu (ORCID) [contributor] Corinne Hartin hartin.corinne@epa.gov (ORCID) [contributor] Robert Link (ORCID) [contributor] Mat Nicholson (mnichol3) [contributor] Pralit Patel pralit.patel@pnnl.gov (ORCID) [contributor] Leeya Pressburger leeya.pressburger@pnnl.gov (ORCID) [contributor, data contributor] Alexey Shiklomanov alexey.shiklomanov@nasa.gov (ORCID) [contributor] Benjamin Vega-Westhoff (ORCID) [contributor] Dawn Woodard dawn.woodard@pnnl.gov (ORCID) [contributor]","code":""},{"path":"https://jgcri.github.io/hector/reference/hectorutil.html","id":null,"dir":"Reference","previous_headings":"","what":"getdate: Get the current date for a Hector instance — getdate","title":"getdate: Get the current date for a Hector instance — getdate","text":"getdate: Get current date Hector instance Utility functions Hector instances isactive: Indicate whether Hector instance active startdate: Report start date Hector instance enddate: Report end date Hector instance getname: Report name Hector instance","code":""},{"path":"https://jgcri.github.io/hector/reference/hectorutil.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"getdate: Get the current date for a Hector instance — getdate","text":"","code":"getdate(core) isactive(core) startdate(core) enddate(core) getname(core)"},{"path":"https://jgcri.github.io/hector/reference/hectorutil.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"getdate: Get the current date for a Hector instance — getdate","text":"core Hector instance operate ","code":""},{"path":"https://jgcri.github.io/hector/reference/inputstable.html","id":null,"dir":"Reference","previous_headings":"","what":"A data.frame containing information on all of the Hector inputs listed in\nan ini file created by save-input-params.R. — inputstable","title":"A data.frame containing information on all of the Hector inputs listed in\nan ini file created by save-input-params.R. — inputstable","text":"data.frame containing information Hector inputs listed ini file created save-input-params.R.","code":""},{"path":"https://jgcri.github.io/hector/reference/inputstable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A data.frame containing information on all of the Hector inputs listed in\nan ini file created by save-input-params.R. — inputstable","text":"","code":"inputstable"},{"path":"https://jgcri.github.io/hector/reference/inputstable.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A data.frame containing information on all of the Hector inputs listed in\nan ini file created by save-input-params.R. — inputstable","text":"data.frame 8 columns 222 rows. section String section ini file parameter parameter String parameter name biome.specific String whether parameter biome-specific time.variant String whether parameter time-variant required String wheterh parameter required default String default value parameter units String parameter units description String brief description parameter ini file","code":""},{"path":"https://jgcri.github.io/hector/reference/loglevels.html","id":null,"dir":"Reference","previous_headings":"","what":"Hector logging levels — LL_DEBUG","title":"Hector logging levels — LL_DEBUG","text":"functions return constants can used newcore set minimum logging level","code":""},{"path":"https://jgcri.github.io/hector/reference/loglevels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hector logging levels — LL_DEBUG","text":"","code":"LL_DEBUG() LL_NOTICE() LL_WARNING() LL_SEVERE()"},{"path":"https://jgcri.github.io/hector/reference/loglevels.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Hector logging levels — LL_DEBUG","text":"LL_DEBUG(): Set logging 'debug' level. LL_NOTICE(): Set logging 'notice' level. LL_WARNING(): Set logging 'warning' level. LL_SEVERE(): Set logging 'severe' level.","code":""},{"path":"https://jgcri.github.io/hector/reference/methane.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","title":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","text":"identifiers correspond variables can read /set methane component.","code":""},{"path":"https://jgcri.github.io/hector/reference/methane.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","text":"","code":"CONCENTRATIONS_CH4() PREINDUSTRIAL_CH4() EMISSIONS_CH4() NATURAL_CH4() LIFETIME_SOIL() LIFETIME_STRAT()"},{"path":"https://jgcri.github.io/hector/reference/methane.html","id":"output-variables","dir":"Reference","previous_headings":"","what":"Output variables","title":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","text":"variables can read methane component. CONCENTRATIONS_CH4 Atmospheric methane concentration PREINDUSTRIAL_CH4 Preindustrial methane concentration","code":""},{"path":"https://jgcri.github.io/hector/reference/methane.html","id":"input-variables","dir":"Reference","previous_headings":"","what":"Input variables","title":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","text":"variables can set methane component. expected units string given description. EMISSIONS_CH4 Methane emissions (\"Tg CH4\") PREINDUSTRIAL_CH4 Preindustrial methane concentration (\"ppbv CH4\") CH4_CONSTRAIN N2O concentration constraint (\"ppbv CH4\") NATURAL_CH4 Natural methane emissions (\"Tg CH4\") LIFETIME_SOIL Time scale methane loss soil (\"Years\") LIFETIME_STRAT Time scale methane loss stratosphere (\"Years\")","code":""},{"path":"https://jgcri.github.io/hector/reference/methane.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for quantities in the methane component — CONCENTRATIONS_CH4","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/methods.html","id":null,"dir":"Reference","previous_headings":"","what":"Hector instance object methods — methods","title":"Hector instance object methods — methods","text":"Hector instance object methods","code":""},{"path":"https://jgcri.github.io/hector/reference/methods.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hector instance object methods — methods","text":"","code":"# S3 method for hcore format(x, ...) # S3 method for hcore print(x, ...)"},{"path":"https://jgcri.github.io/hector/reference/methods.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Hector instance object methods — methods","text":"x Hector core object ... Additional arguments","code":""},{"path":"https://jgcri.github.io/hector/reference/methods.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Hector instance object methods — methods","text":"format(hcore): Format method print(hcore): Print method","code":""},{"path":"https://jgcri.github.io/hector/reference/msgtype.html","id":null,"dir":"Reference","previous_headings":"","what":"Message type identifiers — GETDATA","title":"Message type identifiers — GETDATA","text":"identifiers indicate type message core can route correct method recipient.","code":""},{"path":"https://jgcri.github.io/hector/reference/msgtype.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Message type identifiers — GETDATA","text":"","code":"GETDATA() SETDATA() BIOME_SPLIT_CHAR()"},{"path":"https://jgcri.github.io/hector/reference/msgtype.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Message type identifiers — GETDATA","text":"GETDATA(): Message type retrieving data component SETDATA(): Message type setting data component BIOME_SPLIT_CHAR(): Character used separate biome variable name","code":""},{"path":"https://jgcri.github.io/hector/reference/msgtype.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Message type identifiers — GETDATA","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":"https://jgcri.github.io/hector/reference/newcore.html","id":null,"dir":"Reference","previous_headings":"","what":"Create and initialize a new hector instance — newcore","title":"Create and initialize a new hector instance — newcore","text":"object returned handle newly created instance. required argument functions operate instance. Creating multiple instances simultaneously supported.","code":""},{"path":"https://jgcri.github.io/hector/reference/newcore.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create and initialize a new hector instance — newcore","text":"","code":"newcore( inifile, loglevel = 0, suppresslogging = TRUE, name = \"Unnamed Hector core\" )"},{"path":"https://jgcri.github.io/hector/reference/newcore.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create and initialize a new hector instance — newcore","text":"inifile (String) name hector input file. loglevel (int) minimum message level output logs (see loglevels). suppresslogging (bool) true, suppress logging (loglevel ignored case). name (string) optional name identify core.","code":""},{"path":"https://jgcri.github.io/hector/reference/newcore.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create and initialize a new hector instance — newcore","text":"handle Hector instance.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/ocean.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for quantities in the ocean component — OCEAN_UPTAKE","title":"Identifiers for quantities in the ocean component — OCEAN_UPTAKE","text":"identifiers correspond variables can read ocean component using GETDATA message type.","code":""},{"path":"https://jgcri.github.io/hector/reference/ocean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for quantities in the ocean component — OCEAN_UPTAKE","text":"","code":"OCEAN_UPTAKE() OCEAN_C() OCEAN_C_HL() OCEAN_C_LL() OCEAN_C_ML() OCEAN_C_IO() OCEAN_C_DO() OCEAN_PREIND_C_SURF() OCEAN_PREIND_C_ID() TT() TU() TWI() TID() PH_HL() PH_LL() PH() HL_OCEAN_UPTAKE() LL_OCEAN_UPTAKE() PCO2_HL() PCO2_LL() PCO2() DIC_HL() DIC() DIC_LL() SST_HL() SST_LL() CO3_LL() CO3_HL() CO3()"},{"path":"https://jgcri.github.io/hector/reference/ocean.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for quantities in the ocean component — OCEAN_UPTAKE","text":"OCEAN_UPTAKE(): Atmosphere-ocean carbon flux OCEAN_C(): Ocean total carbon pool OCEAN_C_HL(): Ocean surface high-latitude carbon pool OCEAN_C_LL(): Ocean surface low-latitude carbon pool OCEAN_C_ML(): Ocean surface mixed layer carbon pool OCEAN_C_IO(): Intermediate ocean carbon pool OCEAN_C_DO(): Deep ocean carbon pool OCEAN_PREIND_C_SURF(): Preindustrial surface ocean carbon pool OCEAN_PREIND_C_ID(): Preindustrial intermediate+deep ocean carbon pool TT(): Thermohaline overturning TU(): High-latitude overturning TWI(): Warm-intermediate exchange TID(): Intermediate-deep exchange PH_HL(): High-latitude pH PH_LL(): Low-latitude pH PH(): Ocean surface pH HL_OCEAN_UPTAKE(): Atmosphere-ocean carbon flux, high-latitude LL_OCEAN_UPTAKE(): Atmosphere-ocean carbon flux, low-latitude PCO2_HL(): Partial pressure CO2, high-latitude PCO2_LL(): Partial pressure CO2, low-latitude PCO2(): Ocean surface partial pressure CO2 DIC_HL(): Dissolved inorganic carbon, high-latitude DIC(): Ocean surface dissolved inorganic carbon DIC_LL(): Dissolved inorganic carbon, low-latitude SST_HL(): Absolute ocean surface temperature, high-latitude (deg C) SST_LL(): Absolute ocean surface temperature, low-latitude (deg C) CO3_LL(): Carbonate concentration, low-latitude CO3_HL(): Carbonate concentration, high-latitude CO3(): Ocean surface carbonate concentration","code":""},{"path":"https://jgcri.github.io/hector/reference/ocean.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for quantities in the ocean component — OCEAN_UPTAKE","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for model parameters — TRACKING_DATE","title":"Identifiers for model parameters — TRACKING_DATE","text":"identifiers correspond settable parameters change model behavior subject uncertainty. can set using SETDATA message type. Changing parameters typically invalidate hector core's internal state; therefore, setting one values call reset attempting run model . rerun spinup produce new internally consistent state. Attempting run model without resetting first usually produce error (often message failing conserve mass).","code":""},{"path":"https://jgcri.github.io/hector/reference/parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for model parameters — TRACKING_DATE","text":"","code":"TRACKING_DATE() PREINDUSTRIAL_CO2() BETA(biome = \"\") Q10_RH(biome = \"\") WARMINGFACTOR(biome = \"\") F_NPPV(biome = \"\") F_NPPD(biome = \"\") F_LITTERD(biome = \"\") ECS() AERO_SCALE() VOLCANIC_SCALE() LO_WARMING_RATIO() DIFFUSIVITY()"},{"path":"https://jgcri.github.io/hector/reference/parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identifiers for model parameters — TRACKING_DATE","text":"biome Biome retrieve parameter. missing `\"\"`, default `\"global\"`.","code":""},{"path":"https://jgcri.github.io/hector/reference/parameters.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for model parameters — TRACKING_DATE","text":"TRACKING_DATE(): Start carbon tracking (Year) PREINDUSTRIAL_CO2(): Preindustrial CO2 concentration (\"ppmv CO2\") BETA(): CO2 fertilization factor (\"(unitless)\") Q10_RH(): Heterotrophic respiration temperature sensitivity factor (\"(unitless)\") WARMINGFACTOR(): Biome-specific warming factor (`(unitless)`) F_NPPV(): NPP fraction vegetation (\"(unitless)\") F_NPPD(): NPP fraction detritus (\"(unitless)\") F_LITTERD(): Litter fraction detritus (\"(unitless)\") ECS(): Equilibrium Climate Sensitivity (\"degC\") AERO_SCALE(): Aerosol forcing scaling factor (\"(unitless)\") VOLCANIC_SCALE(): Volcanic forcing scaling factor (\"(unitless)\") LO_WARMING_RATIO(): Land-Ocean Warming Ratio (\"(unitless)\"), default set 0 meaning land ocean warming ratio emergent property Hector's temperature component otherwise user defined land ocean warming ratio used. DIFFUSIVITY(): Ocean heat diffusivity (\"cm2/s\")","code":""},{"path":"https://jgcri.github.io/hector/reference/parameters.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for model parameters — TRACKING_DATE","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/rename_biome.html","id":null,"dir":"Reference","previous_headings":"","what":"Rename an existing biome — rename_biome","title":"Rename an existing biome — rename_biome","text":"create new biome called `newname`, assign C stocks parameter values biome `oldname`, delete biome `oldname`.","code":""},{"path":"https://jgcri.github.io/hector/reference/rename_biome.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rename an existing biome — rename_biome","text":"","code":"rename_biome(core, oldname, newname)"},{"path":"https://jgcri.github.io/hector/reference/rename_biome.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rename an existing biome — rename_biome","text":"core Handle Hector instance run. oldname (character) Name existing biome replaced newname (character) Name new biome","code":""},{"path":"https://jgcri.github.io/hector/reference/reset.html","id":null,"dir":"Reference","previous_headings":"","what":"Reset a Hector instance to an earlier date — reset","title":"Reset a Hector instance to an earlier date — reset","text":"Resetting model returns state previous time. requested time model start date, spinup rerun, model left ready run start date. (contrast, resetting start date leaves model ready run start date, without rerun spinup.)","code":""},{"path":"https://jgcri.github.io/hector/reference/reset.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reset a Hector instance to an earlier date — reset","text":"","code":"reset(core, date = 0)"},{"path":"https://jgcri.github.io/hector/reference/reset.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reset a Hector instance to an earlier date — reset","text":"core Handle Hector instance reset. date Date reset . default reset model start date rerun spinup.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/rho.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for Hector forcing component parameters — RHO_BC","title":"Identifiers for Hector forcing component parameters — RHO_BC","text":"identifiers specify radiative forcing efficiency hector values can read /set hectors forcing halocarbon components. forcing component.","code":""},{"path":"https://jgcri.github.io/hector/reference/rho.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for Hector forcing component parameters — RHO_BC","text":"","code":"RHO_BC() RHO_OC() RHO_NH3() RHO_SO2() RHO_CF4() RHO_C2F6() RHO_HFC23() RHO_HFC32() RHO_HFC4310() RHO_HFC125() RHO_HFC134A() RHO_HFC143A() RHO_HFC227EA() RHO_HFC245FA() RHO_SF6() RHO_CFC11() RHO_CFC12() RHO_CFC113() RHO_CFC114() RHO_CFC115() RHO_CCL4() RHO_CH3CCL3() RHO_HCFC22() RHO_HCFC141B() RHO_HCFC142B() RHO_HALON1211() RHO_HALON1301() RHO_HALON2402() RHO_CH3CL() RHO_CH3BR()"},{"path":"https://jgcri.github.io/hector/reference/rho.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for Hector forcing component parameters — RHO_BC","text":"RHO_BC(): radiative forcing efficiency BC aerosol-radiation interactions RHO_OC(): radiative forcing efficiency OC aerosol-radiation interactions RHO_NH3(): radiative forcing efficiency NH3 aerosol-radiation interactions RHO_SO2(): radiative forcing efficiency SO2 RHO_CF4(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CF4 RHO_C2F6(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) C2F6 RHO_HFC23(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-23 RHO_HFC32(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-32 RHO_HFC4310(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-4310 RHO_HFC125(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-125 RHO_HFC134A(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-134a RHO_HFC143A(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-143a RHO_HFC227EA(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-227ea RHO_HFC245FA(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-254fa RHO_SF6(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) sulfur hexafluoride RHO_CFC11(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CFC-11 RHO_CFC12(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CFC-12 RHO_CFC113(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CFC-113 RHO_CFC114(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CFC-114 RHO_CFC115(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) CFC-115 RHO_CCL4(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) carbon tetrachloride RHO_CH3CCL3(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) trichloroethane ' RHO_HCFC22(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-22 RHO_HCFC141B(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HFC-141b RHO_HCFC142B(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) HCFC-142b RHO_HALON1211(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) halon-1211 ' RHO_HALON1301(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) halon-1301 RHO_HALON2402(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) halon-2402 ' RHO_CH3CL(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) chloromethane RHO_CH3BR(): radiative forcing efficiency user-specified preindustrial concentration (Wm-2 pptv-1) bromomethane","code":""},{"path":"https://jgcri.github.io/hector/reference/rho.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for Hector forcing component parameters — RHO_BC","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/run.html","id":null,"dir":"Reference","previous_headings":"","what":"Run the Hector climate model — run","title":"Run the Hector climate model — run","text":"Run Hector specified time. function return results run. get results, run fetch.","code":""},{"path":"https://jgcri.github.io/hector/reference/run.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run the Hector climate model — run","text":"","code":"run(core, runtodate = -1)"},{"path":"https://jgcri.github.io/hector/reference/run.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run the Hector climate model — run","text":"core Handle Hector instance run. runtodate Date run . default run end date configured input file used initialize core.","code":""},{"path":"https://jgcri.github.io/hector/reference/run.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run the Hector climate model — run","text":"Hector instance handle","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/runscenario.html","id":null,"dir":"Reference","previous_headings":"","what":"Run a single scenario — runscenario","title":"Run a single scenario — runscenario","text":"Run scenario defined input file return data frame containing results default variable list. default variable list can changed setting hector.default.fetchvars option, described fetchvars.","code":""},{"path":"https://jgcri.github.io/hector/reference/runscenario.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run a single scenario — runscenario","text":"","code":"runscenario(infile)"},{"path":"https://jgcri.github.io/hector/reference/runscenario.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run a single scenario — runscenario","text":"infile INI-format file containing scenario definition","code":""},{"path":"https://jgcri.github.io/hector/reference/runscenario.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run a single scenario — runscenario","text":"Data frame containing Hector output default variables","code":""},{"path":"https://jgcri.github.io/hector/reference/sendmessage.html","id":null,"dir":"Reference","previous_headings":"","what":"Send a message to a Hector instance — sendmessage","title":"Send a message to a Hector instance — sendmessage","text":"Messages mechanism used get data Hector model components set values within components. message comprises type (e.g. GETDATA retrieve data component, SETDATA set data component), capability, identifies information operated (e.g. Atmospheric CO2 concentration, global total radiative forcing), optional structure extra data (comprising date numerical value units). arguments function organized slightly R-friendly way. message type capability passed single string. date portion extra data passed numeric vector (one message generated date). value portion extra data numeric vector length either 1 length date vector.units portion single string (support sending vector values heterogeneous units single call. Either date value () may NA. date NA cases parameter referenced change time. value NA cases optional data ignored.","code":""},{"path":"https://jgcri.github.io/hector/reference/sendmessage.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Send a message to a Hector instance — sendmessage","text":"","code":"sendmessage(core, msgtype, capability, date, value, unit)"},{"path":"https://jgcri.github.io/hector/reference/sendmessage.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Send a message to a Hector instance — sendmessage","text":"core Hector instance msgtype (String) type message. Usually either GETDATA SETDATA capability (String) capability targeted message date (NumericVector NA) Date set/get variable value (NumericVector) Numeric value optional data unit (String) Unit value vector.","code":""},{"path":"https://jgcri.github.io/hector/reference/setvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Set values for a Hector variable — setvar","title":"Set values for a Hector variable — setvar","text":"function selects variable capability name sets requested values requested dates. units must also supplied single string (heterogeneous units supported). checked expected unit code, error signaled match (.e., attempt convert units).","code":""},{"path":"https://jgcri.github.io/hector/reference/setvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set values for a Hector variable — setvar","text":"","code":"setvar(core, dates, var, values, unit)"},{"path":"https://jgcri.github.io/hector/reference/setvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set values for a Hector variable — setvar","text":"core Hector core object dates Vector dates var Capability string variable set values Values set. Must either single value vector length dates. unit Unit string. Can set NA unitless variables.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/shutdown.html","id":null,"dir":"Reference","previous_headings":"","what":"Shut down a hector instance — shutdown","title":"Shut down a hector instance — shutdown","text":"Shutting instance free instance objects created. attempted operation instance raise error.","code":""},{"path":"https://jgcri.github.io/hector/reference/shutdown.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shut down a hector instance — shutdown","text":"","code":"shutdown(core)"},{"path":"https://jgcri.github.io/hector/reference/shutdown.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shut down a hector instance — shutdown","text":"core Handle Hector instance","code":""},{"path":"https://jgcri.github.io/hector/reference/shutdown.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shut down a hector instance — shutdown","text":"Hector instance handle","code":""},{"path":"https://jgcri.github.io/hector/reference/shutdown.html","id":"caution","dir":"Reference","previous_headings":"","what":"Caution","title":"Shut down a hector instance — shutdown","text":"function called mycore <- shutdown(mycore) change active inactive recorded caller.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/so2.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","title":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","text":"identifiers correspond variables can read /set SO2 component","code":""},{"path":"https://jgcri.github.io/hector/reference/so2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","text":"","code":"EMISSIONS_SO2() VOLCANIC_SO2()"},{"path":"https://jgcri.github.io/hector/reference/so2.html","id":"output-variables","dir":"Reference","previous_headings":"","what":"Output variables","title":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","text":"variables can read using GETDATA message type. NATURAL_SO2 Natural SO2 emissions Y2000_SO2 Year 2000 SO2 emissions EMISIONS_SO2 Anthropogenic SO2 emissions VOLCANIC_SO2 Forcing due volcanic SO2 emissions","code":""},{"path":"https://jgcri.github.io/hector/reference/so2.html","id":"input-variables","dir":"Reference","previous_headings":"","what":"Input variables","title":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","text":"variables can set using SETDATA message type. EMISSIONS_SO2 Anthropogenic SO2 emissions (\"Gg S\") VOLCANIC_SO2 Forcing due volcanic SO2 emissions (\"W/m2\")","code":""},{"path":"https://jgcri.github.io/hector/reference/so2.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for quantities in the SO2 component — EMISSIONS_SO2","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/split_biome.html","id":null,"dir":"Reference","previous_headings":"","what":"Create new biomes by splitting up an existing biome — split_biome","title":"Create new biomes by splitting up an existing biome — split_biome","text":"Distributes vegetation, detritus, soil C, initial NPP flux existing biome across multiple new biomes.","code":""},{"path":"https://jgcri.github.io/hector/reference/split_biome.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create new biomes by splitting up an existing biome — split_biome","text":"","code":"split_biome( core, old_biome, new_biomes, fveg_c = rep(1/length(new_biomes), length(new_biomes)), fdetritus_c = fveg_c, fsoil_c = fveg_c, fpermafrost_c = fveg_c, fnpp_flux0 = fveg_c, ... )"},{"path":"https://jgcri.github.io/hector/reference/split_biome.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create new biomes by splitting up an existing biome — split_biome","text":"core Hector core old_biome Name biome split new_biomes Names biomes created fveg_c Fractions vegetation C distributed biome new_biomes; must length . Default split vegetation C evenly biomes. fdetritus_c Fractions detritus C distributed biome. Defaults value fveg_c. fsoil_c Fractions soil C distributed biome. Defaults value fveg_c. fpermafrost_c Fraction permafrost C distributed biome. Defaults value fveg_c. fnpp_flux0 Fraction initial NPP flux distributed biome. Defaults value fveg_c. ... Additional biome parameters passed create_biome.","code":""},{"path":"https://jgcri.github.io/hector/reference/temperature.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifiers for variables associated with the temperature component — GLOBAL_TAS","title":"Identifiers for variables associated with the temperature component — GLOBAL_TAS","text":"variables can read using GETDATA message type.","code":""},{"path":"https://jgcri.github.io/hector/reference/temperature.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifiers for variables associated with the temperature component — GLOBAL_TAS","text":"","code":"GLOBAL_TAS() GMST() SST() OCEAN_TAS() LAND_TAS() FLUX_MIXED() FLUX_INTERIOR() HEAT_FLUX()"},{"path":"https://jgcri.github.io/hector/reference/temperature.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Identifiers for variables associated with the temperature component — GLOBAL_TAS","text":"GLOBAL_TAS(): Global mean air temperature anomaly GMST(): Global mean surface temperature anomaly SST(): Average sea surface temperature anomaly OCEAN_TAS(): Average air temperature anomaly ocean LAND_TAS(): Average air temperature anomaly land, land surface temperature air temperature land assumed equivalent. FLUX_MIXED(): Heat flux mixed layer ocean FLUX_INTERIOR(): Heat flux interior layer ocean HEAT_FLUX(): Total heat flux ocean","code":""},{"path":"https://jgcri.github.io/hector/reference/temperature.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Identifiers for variables associated with the temperature component — GLOBAL_TAS","text":"identifiers provided #define macros hector code, identifiers provided R interface functions. Therefore, objects must called use ; e.g., GETDATA() instead natural looking GETDATA.","code":""},{"path":[]},{"path":"https://jgcri.github.io/hector/reference/unitstable.html","id":null,"dir":"Reference","previous_headings":"","what":"A data.frame containing information on all of the Hector variable created by units-data.R\nused within the getunits function. — unitstable","title":"A data.frame containing information on all of the Hector variable created by units-data.R\nused within the getunits function. — unitstable","text":"data.frame containing information Hector variable created units-data.R used within getunits function.","code":""},{"path":"https://jgcri.github.io/hector/reference/unitstable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A data.frame containing information on all of the Hector variable created by units-data.R\nused within the getunits function. — unitstable","text":"","code":"unitstable"},{"path":"https://jgcri.github.io/hector/reference/unitstable.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A data.frame containing information on all of the Hector variable created by units-data.R\nused within the getunits function. — unitstable","text":"data.frame 2 columns 114 rows. variable String hector variable units String unit value","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-311","dir":"Changelog","previous_headings":"","what":"hector 3.1.1","title":"hector 3.1.1","text":"Return global mean surface temperature Hector output.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-301","dir":"Changelog","previous_headings":"","what":"hector 3.0.1","title":"hector 3.0.1","text":"Minor documentation change citation file.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-300","dir":"Changelog","previous_headings":"","what":"hector 3.0.0","title":"hector 3.0.0","text":"Updated parameterization, incorporating latest consensus science best model performance relative historical observations New radiative forcing calculations consistency AR6 Better complete software tests; many bug fixes Updated RCPs SSPs default included scenarios New net biome production (land-atmosphere carbon exchange) constraint New online documentation Experimental implementation permafrost implementation: models permafrost thaw well CO2 CH4 release; optional currently default. See Woodard et al. 2021 New carbon tracking: lets users trace origin fate CO2-C within Hector’s carbon cycle; optional currently default see carbon tracking example additional details can found changes documented Dorheim et al. prep Variable name changes see v3 variable changes details","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-250","dir":"Changelog","previous_headings":"","what":"hector 2.5.0","title":"hector 2.5.0","text":"Register Ftalbedo input Add non CO2 GHG constraints Version Hector participated RCMIP RCMIP II","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-230","dir":"Changelog","previous_headings":"","what":"hector 2.3.0","title":"hector 2.3.0","text":"Constrain atmospheric CO2 concentration equal preindustrial concentration model spinup. result concentration beginning simulation equal value specified PREINDUSTRIAL_CO2 parameter, case previously.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-222","dir":"Changelog","previous_headings":"","what":"hector 2.2.2","title":"hector 2.2.2","text":"Fix bug causing requests H2O forcing R interface return N2O forcing instead (model internals unaffected). Fix bug causing API requests halocarbon forcing return absolute forcing values, rather values relative base year (done forcings). Add missing RF_VOL (volcanic forcing) dependency forcing component. practice missing dependency effect forcing component already dependency SO2 component, also provides volcanic forcing, event ever split , ensure dependency graph still valid. (2.2.2 changes merged PR #303)","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-221","dir":"Changelog","previous_headings":"","what":"hector 2.2.1","title":"hector 2.2.1","text":"Report global averages land temperature, ocean air temperature, ocean surface temperature. Fix bug prevented CH4 emissions read.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-220","dir":"Changelog","previous_headings":"","what":"hector 2.2.0","title":"hector 2.2.0","text":"Add new parameter: VOLCANIC_SCALE. parameter adjusts strength response volcanic forcing. (PR #291) Add getname() function return name Hector core.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-210","dir":"Changelog","previous_headings":"","what":"hector 2.1.0","title":"hector 2.1.0","text":"Add reset() function API. Calling function resets Hector core earlier time, rerunning spinup appropriate. (PR #243)","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-200","dir":"Changelog","previous_headings":"","what":"hector 2.0.0","title":"hector 2.0.0","text":"Incorporated 1-D diffusive ocean heat model new temperature component (DOECLIM) (PR #206) Bugfix: double counting halocarbon radiative forcing (PR #201) Bugfix: re-enabled CO2 concentration constraint (PR #163) Various changes internals support calling Hector external code like pyhector Component loggers now optional (PR #218) Renamed anthro emissions ffi emissions (fossil fuel industrial) (PR #116)","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-112","dir":"Changelog","previous_headings":"","what":"hector 1.1.2","title":"hector 1.1.2","text":"Add libhector target OS X Windows project files (already available Linux build). library used want link Hector outside program.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-111","dir":"Changelog","previous_headings":"","what":"hector 1.1.1","title":"hector 1.1.1","text":"Fix OS X build Update sample output files Add GPL license","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-11","dir":"Changelog","previous_headings":"","what":"hector 1.1","title":"hector 1.1","text":"API linking external models. Backend R scripts faster cleaner. Minor bug fixes documentation updates.","code":""},{"path":"https://jgcri.github.io/hector/news/index.html","id":"hector-10","dir":"Changelog","previous_headings":"","what":"hector 1.0","title":"hector 1.0","text":"First release. Corresponds Hartin et al. (2015).","code":""}]
diff --git a/sitemap.xml b/sitemap.xml
index 910421da5..8145d07f9 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -36,6 +36,9 @@
https://jgcri.github.io/hector/articles/Hector-Wider-World.html
+
+ https://jgcri.github.io/hector/articles/HectorResources.html
+
https://jgcri.github.io/hector/articles/HectorSummary.html