Skip to content

Commit 0ea644b

Browse files
authored
Merge pull request #715 from JGCRI/krd/gh697/change_default_branch
switch to the main branch
2 parents 4337eeb + b6946af commit 0ea644b

26 files changed

+78
-40
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: R-CMD-check
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
branches:
99
- '**' # matches every branch

.github/workflows/codecov.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
push:
33
branches:
4-
- master
4+
- main
55
pull_request:
66
branches:
77
- '**' # matches every branch

.github/workflows/command-line.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# This is a basic workflow to help you get started with Actions
2-
# based on https://github.com/JGCRI/hector/new/master?filename=.github%2Fworkflows%2Fmain.yml&workflow_template=blank
2+
# based on https://github.com/JGCRI/hector/new/main?filename=.github%2Fworkflows%2Fmain.yml&workflow_template=blank
33

44
name: Command Line Hector
55

66
# Controls when the action will run.
77
on:
88
push:
99
branches:
10-
- master
10+
- main
1111
pull_request:
1212
branches:
1313
- '**' # matches every branch

.github/workflows/leeyabot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2323
run: |
2424
install.packages(c("ggplot2", "rmarkdown", "dplyr", "remotes", "here"))
25-
remotes::install_github("hadley/emo")
2625
remotes::install_deps(dependencies = TRUE)
2726
shell: Rscript {0}
2827

.github/workflows/pkgdown.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
pull_request:
77
branches:
88
- '**' # matches every branch

R/messages.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ default_fetchvars <- c(CONCENTRATIONS_CO2, RF_TOTAL, RF_CO2, GLOBAL_TAS)
1717
#' The list of variables to fetch if you don't specify \code{vars} is stored in
1818
#' the \code{hector.default.fetchvars} option. If this option is also unset, then
1919
#' the default variable list is CO2 concentration, total radiative forcing, CO2
20-
#' forcing, and global mean temperature.
20+
#' forcing, and global mean temperature. To see a list of the potential \code{vars}
21+
#' see \code{data(inputstable)} and \code{data(fxntable)}.
2122
#'
2223
#' @seealso \link{concentrations}, \link{emissions}, \link{forcings},
2324
#' \link{carboncycle}, \link{haloemiss}, \link{haloforcings}, \link{methane},
@@ -34,6 +35,14 @@ default_fetchvars <- c(CONCENTRATIONS_CO2, RF_TOTAL, RF_CO2, GLOBAL_TAS)
3435
#' of the Hector core object will be used.
3536
#' @family main user interface functions
3637
#' @export
38+
#' @examples
39+
#' \dontrun{
40+
#' ini <- system.file(package = "hector", "input/hector_ssp245.ini")
41+
#' hc <- newcore(ini)
42+
#' run(hc)
43+
#' out <- fetchvars(core = hc, dates = 1900:2100, vars = c(GLOBAL_TAS(), NPP()))
44+
#' print(out)
45+
#' }
3746
fetchvars <- function(core, dates, vars = NULL, scenario = NULL) {
3847
if (is.null(vars)) {
3948
vars <- getOption("hector.default.fetchvars",

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ library(ggplot2)
1717

1818
# hector
1919

20-
[![DOI](https://zenodo.org/badge/22892935.svg)](https://zenodo.org/badge/latestdoi/22892935) [![C++ unit tests](https://github.com/JGCRI/hector/actions/workflows/unit-testing.yaml/badge.svg)](https://github.com/JGCRI/hector/actions/workflows/unit-testing.yaml) [![Command Line Hector](https://github.com/JGCRI/hector/actions/workflows/command-line.yaml/badge.svg)](https://github.com/JGCRI/hector/actions/workflows/command-line.yaml) [![R-CMD-check](https://github.com/JGCRI/hector/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/JGCRI/hector/actions/workflows/R-CMD-check.yaml) [![codecov](https://codecov.io/gh/JGCRI/hector/branch/master/graph/badge.svg?token=EGM0lXDxRv)](https://codecov.io/gh/JGCRI/hector)
20+
[![DOI](https://zenodo.org/badge/22892935.svg)](https://zenodo.org/badge/latestdoi/22892935) [![C++ unit tests](https://github.com/JGCRI/hector/actions/workflows/unit-testing.yaml/badge.svg)](https://github.com/JGCRI/hector/actions/workflows/unit-testing.yaml) [![Command Line Hector](https://github.com/JGCRI/hector/actions/workflows/command-line.yaml/badge.svg)](https://github.com/JGCRI/hector/actions/workflows/command-line.yaml) [![R-CMD-check](https://github.com/JGCRI/hector/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/JGCRI/hector/actions/workflows/R-CMD-check.yaml) [![codecov](https://codecov.io/gh/JGCRI/hector/branch/main/graph/badge.svg?token=EGM0lXDxRv)](https://codecov.io/gh/JGCRI/hector)
2121

2222
This is the repository for **Hector**, an open source, object-oriented, simple
2323
global climate carbon-cycle model that runs very quickly while still

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tests](https://github.com/JGCRI/hector/actions/workflows/unit-testing.yaml/badge
99
[![Command Line
1010
Hector](https://github.com/JGCRI/hector/actions/workflows/command-line.yaml/badge.svg)](https://github.com/JGCRI/hector/actions/workflows/command-line.yaml)
1111
[![R-CMD-check](https://github.com/JGCRI/hector/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/JGCRI/hector/actions/workflows/R-CMD-check.yaml)
12-
[![codecov](https://codecov.io/gh/JGCRI/hector/branch/master/graph/badge.svg?token=EGM0lXDxRv)](https://codecov.io/gh/JGCRI/hector)
12+
[![codecov](https://codecov.io/gh/JGCRI/hector/branch/main/graph/badge.svg?token=EGM0lXDxRv)](https://codecov.io/gh/JGCRI/hector)
1313

1414
This is the repository for **Hector**, an open source, object-oriented,
1515
simple global climate carbon-cycle model that runs very quickly while

inst/input/hector_ssp119.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ delta_HFC32=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6
226226
molarMass=52.0 ; grams
227227
HFC32_emissions=csv:tables/ssp119_emiss-constraints_rf.csv
228228

229-
[HFC4310_halocarbon] ; This is equivalent to HFC-43-10mee
229+
[HFC4310_halocarbon]
230+
; This is equivalent to HFC-43-10mee
230231
tau=17.0 ; lifetime in years (Table 7.SM.7 IPPC AR6)
231232
rho_HFC4310=0.000357 ; radiative efficiencies W/m2/ppt (Table 7.SM.7 IPPC AR6)
232233
delta_HFC4310=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6)

inst/input/hector_ssp126.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ delta_HFC32=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6
226226
molarMass=52.0 ; grams
227227
HFC32_emissions=csv:tables/ssp126_emiss-constraints_rf.csv
228228

229-
[HFC4310_halocarbon] ; This is equivalent to HFC-43-10mee
229+
[HFC4310_halocarbon]
230+
; This is equivalent to HFC-43-10mee
230231
tau=17.0 ; lifetime in years (Table 7.SM.7 IPPC AR6)
231232
rho_HFC4310=0.000357 ; radiative efficiencies W/m2/ppt (Table 7.SM.7 IPPC AR6)
232233
delta_HFC4310=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6)

inst/input/hector_ssp245.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ delta_HFC32=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6
226226
molarMass=52.0 ; grams
227227
HFC32_emissions=csv:tables/ssp245_emiss-constraints_rf.csv
228228

229-
[HFC4310_halocarbon] ; This is equivalent to HFC-43-10mee
229+
[HFC4310_halocarbon]
230+
; This is equivalent to HFC-43-10mee
230231
tau=17.0 ; lifetime in years (Table 7.SM.7 IPPC AR6)
231232
rho_HFC4310=0.000357 ; radiative efficiencies W/m2/ppt (Table 7.SM.7 IPPC AR6)
232233
delta_HFC4310=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6)

inst/input/hector_ssp370.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ delta_HFC32=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6
226226
molarMass=52.0 ; grams
227227
HFC32_emissions=csv:tables/ssp370_emiss-constraints_rf.csv
228228

229-
[HFC4310_halocarbon] ; This is equivalent to HFC-43-10mee
229+
[HFC4310_halocarbon]
230+
; This is equivalent to HFC-43-10mee
230231
tau=17.0 ; lifetime in years (Table 7.SM.7 IPPC AR6)
231232
rho_HFC4310=0.000357 ; radiative efficiencies W/m2/ppt (Table 7.SM.7 IPPC AR6)
232233
delta_HFC4310=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6)

inst/input/hector_ssp434.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ delta_HFC32=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6
226226
molarMass=52.0 ; grams
227227
HFC32_emissions=csv:tables/ssp434_emiss-constraints_rf.csv
228228

229-
[HFC4310_halocarbon] ; This is equivalent to HFC-43-10mee
229+
[HFC4310_halocarbon]
230+
; This is equivalent to HFC-43-10mee
230231
tau=17.0 ; lifetime in years (Table 7.SM.7 IPPC AR6)
231232
rho_HFC4310=0.000357 ; radiative efficiencies W/m2/ppt (Table 7.SM.7 IPPC AR6)
232233
delta_HFC4310=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6)

inst/input/hector_ssp460.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ delta_HFC32=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6
226226
molarMass=52.0 ; grams
227227
HFC32_emissions=csv:tables/ssp460_emiss-constraints_rf.csv
228228

229-
[HFC4310_halocarbon] ; This is equivalent to HFC-43-10mee
229+
[HFC4310_halocarbon]
230+
; This is equivalent to HFC-43-10mee
230231
tau=17.0 ; lifetime in years (Table 7.SM.7 IPPC AR6)
231232
rho_HFC4310=0.000357 ; radiative efficiencies W/m2/ppt (Table 7.SM.7 IPPC AR6)
232233
delta_HFC4310=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6)

inst/input/hector_ssp534-over.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ delta_HFC32=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6
226226
molarMass=52.0 ; grams
227227
HFC32_emissions=csv:tables/ssp534-over_emiss-constraints_rf.csv
228228

229-
[HFC4310_halocarbon] ; This is equivalent to HFC-43-10mee
229+
[HFC4310_halocarbon]
230+
; This is equivalent to HFC-43-10mee
230231
tau=17.0 ; lifetime in years (Table 7.SM.7 IPPC AR6)
231232
rho_HFC4310=0.000357 ; radiative efficiencies W/m2/ppt (Table 7.SM.7 IPPC AR6)
232233
delta_HFC4310=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6)

inst/input/hector_ssp585.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ delta_HFC32=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6
226226
molarMass=52.0 ; grams
227227
HFC32_emissions=csv:tables/ssp585_emiss-constraints_rf.csv
228228

229-
[HFC4310_halocarbon] ; This is equivalent to HFC-43-10mee
229+
[HFC4310_halocarbon]
230+
; This is equivalent to HFC-43-10mee
230231
tau=17.0 ; lifetime in years (Table 7.SM.7 IPPC AR6)
231232
rho_HFC4310=0.000357 ; radiative efficiencies W/m2/ppt (Table 7.SM.7 IPPC AR6)
232233
delta_HFC4310=0.0 ; tropospheric adjustments scalar unitless (7.3.2.4 IPCC AR6)

man/fetchvars.Rd

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/OutputDifferences.Rmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ knitr::opts_chunk$set(echo = TRUE)
88

99
## Differences in Hector outputs
1010

11-
Hello, this is `leeyabot`! `r emo::ji("robot")`
11+
Hello, this is `leeyabot`!
1212

1313
``` {r differences, echo = FALSE, message = FALSE, include = FALSE}
1414
# Load packages
1515
library(dplyr)
1616
library(ggplot2)
1717
library(hector)
18-
library(emo)
1918
library(here)
2019
2120
# Set root directory

tests/testthat/test_old-new.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
context("Old new tests")
22
# Verify that hector output for the canonical rcps matches the output from the
3-
# master branch. This "bit for bit" comparison of the output is intended to help
3+
# main branch. This "bit for bit" comparison of the output is intended to help
44
# guarantee that Hector's outputs don't change during "minor" and "patch" development.
55
# When "major" development is expected to impact Hector output, the comparison data will
66
# need to be updated by running data-raw/generate-comp-data.R

vignettes/articles/BuildHector.Rmd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ building instructions for the R Hector package and the executable.
99

1010
# R Hector
1111

12-
To install R, follow the [official instructions](https://cloud.r-project.org/) for your platform.
12+
To install R, follow the [official instructions](https://cloud.r-project.org/) for your platform.
1313

14-
To install the version associated with the current `master` git branch on GitHub,
14+
Follow this [YouTube video](https://www.youtube.com/watch?v=Pg3WY8wg1cY) or continue reading.
15+
16+
To install the version associated with the current `main` git branch on GitHub,
1517
use the `remotes`::install_github` function.
1618
This will automatically install all of Hector's dependencies as well.
1719
(Note that because this requires compiling from source, you will need to have a C compiler installed and configured.)

vignettes/articles/ContributionsGuide.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Contribution Guide
44

55
The Hector team welcomes and values community contributions to Hector, but there are a few important things to know.
66

7-
All contributions must pass through a pull request (PR) process before being merged into the master branch of Hector. Please note that opening a PR does **not** guarantee your work will be merged; we assess potential model changes for fit with Hector’s long-term strategic plan, compatibility, conformance to the model’s code style, and other factors.
7+
All contributions must pass through a pull request (PR) process before being merged into the main branch of Hector. Please note that opening a PR does **not** guarantee your work will be merged; we assess potential model changes for fit with Hector’s long-term strategic plan, compatibility, conformance to the model’s code style, and other factors.
88

99
We encourage all contributors to read and comply with the following guidelines:
1010

@@ -19,7 +19,7 @@ Hector adheres to the [semantic versioning](https://semver.org/) ideology. This
1919

2020
* "Patch changes" that make no impact on Hector functionality, such as documentation fixes or removing dead code, are the easiest to assess and merge.
2121
* "Minor changes" that don’t change the model’s behavior in any fundamental way and don’t change its inputs may require unit tests and some more review.
22-
* "Major changes" that change the model’s input or output structure or induce major behavioral shifts, are considered _breaking changes_. These are subject to the most stringent reviews and will require scientific justification of the development and evidence that the changes have the intended consequences. PRs will almost always be merged into a development branch, not master until a new version of the Hector is ready for release.
22+
* "Major changes" that change the model’s input or output structure or induce major behavioral shifts, are considered _breaking changes_. These are subject to the most stringent reviews and will require scientific justification of the development and evidence that the changes have the intended consequences. PRs will almost always be merged into a development branch, not main until a new version of the Hector is ready for release.
2323

2424

2525
Thank you for your interest in contributing to Hector and we look forward to working with you! However, we maintain the right to refuse to merge PRs that do not comply with these guidelines or that do not meet contribution standards.

vignettes/articles/Hector-Wider-World.Rmd

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,6 @@ pyhector is a Python interface for Hector.
9595
[Here](https://joss.theoj.org/papers/10.21105/joss.00248) is a paper describing pyhector by Sven N Wilner, Corrine Hartin, and Robert Gieseke.
9696
Github found [here](https://github.com/openclimatedata/pyhector).
9797

98-
### YouTube Walkthrough
99-
[Here](https://www.youtube.com/watch?v=EFJS-buvGN8) is a video walk through by Kalyn Dorheim including information on using Hector v2.5:
100-
101-
* Installing Hector
102-
* Running a core
103-
* Running a scenario
104-
* Accessing and plotting results
105-
* Shutting down a core
106-
* Changing a parameter
107-
* A brief explanation of documentation
108-
10998
### HectorUI
11099
HectorUI is an R Shiny web interface designed to be user-friendly and to provide an alternative to the command line for running Hector. This allows users who may not be fluent in C++ or R to explore model scenarios and outputs.
111100

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "Hector Videos & Tutorials"
3+
---
4+
5+
```{r, include = FALSE}
6+
knitr::opts_chunk$set(
7+
collapse = TRUE,
8+
comment = "#>"
9+
)
10+
```
11+
12+
## Hector V3
13+
14+
* [Interactive Jupyter notebook](https://hector.msdlive.org/)
15+
* Hector V3 installation [YouTube Video](https://www.youtube.com/watch?v=Pg3WY8wg1cY)
16+
17+
18+
## Hector V2.5
19+
20+
[YouTube Video](https://www.youtube.com/watch?v=EFJS-buvGN8) that covers the following: Hector v2.5 Package setup; changing a parameter value; how to visualize
21+

vignettes/articles/InputFiles.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Hector input files
66

77
When Hector is invoked from the command line, it takes a single parameter: the name of the primary input file to read. This file, typically stored in the `input/` directory, contains configuration and parameter data controlling the model's run, output, and behavior.
88

9-
The primary input file is a text file with *sections*, *properties*, and *values*. For example, the beginning of the [SSP245 file](/tree/master/inst/input/hector_ssp245.ini) included in the repository looks like this:
9+
The primary input file is a text file with *sections*, *properties*, and *values*. For example, the beginning of the [SSP245 file](/tree/main/inst/input/hector_ssp245.ini) included in the repository looks like this:
1010

1111
```
1212
; Config file for hector model: SSP245

vignettes/articles/SimpleNBox.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ At each Hector time step, `c` is solved by the `CarbonCycleSolver::run()` functi
9090
These steps are described in more detail below.
9191
The complete code for the terrestrial C cycle lives in [`src/simpleNbox.cpp`][cpp] file (with associated headers in [`inst/include/simpleNbox.hpp`][hpp]).
9292

93-
[solver]: https://github.com/JGCRI/hector/blob/master/src/carbon-cycle-solver.cpp
94-
[cpp]: https://github.com/jgcri/hector/blob/master/src/simpleNbox.cpp
95-
[hpp]: https://github.com/JGCRI/hector/blob/master/inst/include/simpleNbox.hpp
93+
[solver]: https://github.com/JGCRI/hector/blob/main/src/carbon-cycle-solver.cpp
94+
[cpp]: https://github.com/jgcri/hector/blob/main/src/simpleNbox.cpp
95+
[hpp]: https://github.com/JGCRI/hector/blob/main/inst/include/simpleNbox.hpp
9696

9797
## Setting the `c` vector (`getCValues`)
9898

vignettes/articles/manual.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Building and Running Hector
2626
* How to [do a basic run and sensitivity analysis](intro-to-hector.html)
2727
* How to [run Hector under constraints](Constraints.html)
2828
* How to [run Hector with multiple biomes](multiple-biomes.html)
29+
* [Videos & other resources](HectorResources.html)
2930

3031
For Developers
3132
--------------------

0 commit comments

Comments
 (0)