hector

The Hector Simple Climate Model

https://github.com/jgcri/hector

Science Score: 72.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    11 of 21 committers (52.4%) from academic institutions
  • Institutional organization owner
    Organization jgcri has institutional domain (www.pnnl.gov)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

climate climate-change climate-model hector science
Last synced: 6 months ago · JSON representation ·

Repository

The Hector Simple Climate Model

Basic Info
Statistics
  • Stars: 119
  • Watchers: 13
  • Forks: 49
  • Open Issues: 44
  • Releases: 18
Topics
climate climate-change climate-model hector science
Created over 11 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Code of conduct Citation

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
    collapse = TRUE,
    comment = "#>",
    fig.path = "man/figures/README-",
    out.width = "100%"
)
library(hector)
library(ggplot2)
```

# hector

[![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) 

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.

```{r tas_plot, echo=FALSE, fig.width=8, fig.height=4}

# The variable naps and dates of variables to save.
vars_to_plot <- GLOBAL_TAS()
dates_to_plot <- 1850:2100

# Color palette used by the IPCC
SSP_COLORS <- c("ssp119" = "#00a9cf", "ssp126" = "#003466", "ssp245" = "#f69320",
                "ssp370" = "#df0000", "ssp434" = "#2274ae","ssp460" = "#b0724e",
                "ssp585"= "#980002",   "ssp534-overshoot" = "grey", "historical" = "#000000",
                "historical"="#92397a")

# Set up and run hector.
ini_files <- list.files(file.path("inst", "input"), pattern = "ini", full.names = TRUE)
hector_tas_results <- do.call(lapply(ini_files, function(f){
    name <- gsub(pattern = "hector_|.ini", x = basename(path = f), replacement = "")
    hc <- newcore(f, name = name)
    run(hc)
    out <- fetchvars(hc, dates_to_plot, vars = vars_to_plot)
    return(out)
}), what = "rbind")

# Modify the results data frame.
hector_tas_results$scenario <- ifelse(hector_tas_results$scenario == "ssp534-over",
                                      "ssp534-overshoot", hector_tas_results$scenario)
hector_tas_results$scenario <- ifelse(hector_tas_results$year <= 2016, "historical",
                                      hector_tas_results$scenario)
ggplot(hector_tas_results) +
    geom_line(aes(year, value, color = scenario), linewidth = 1) +
    theme_bw(base_size = 15) +
    labs(color = NULL, x = NULL, y = expression("Temperature Anomaly ("~degree~"C)")) +
    scale_color_manual(values = SSP_COLORS)
```

Hector's output for global mean air temperature change for eight Shared Socioeconomic Pathways (SSPs).

## Installation 

The `hector` R package can be installed using the `remotes::install_github` 
function. More detailed installation instructions, including how to set up
Hector as a command line executable, can be found [here](articles/BuildHector.html).

```r
remotes::install_github('jgcri/hector')
library(hector)
```

## Tools and Software That Work with Hector

* [GCAM](https://github.com/JGCRI/gcam-core): Hector can be used as the climate component in [GCAM](http://jgcri.github.io/gcam-doc/)
* [pyhector](https://github.com/openclimatedata/pyhector): a Python
interface to Hector
* [fldgen](https://github.com/JGCRI/fldgen): a spatially resolved temperature & precipitation emulator for CMIP5 ESMs
* [HectorUI](https://jgcri.shinyapps.io/HectorUI/): run Hector in a web interface!

## Contributing to Hector

The Hector team welcomes and values community contributions, but please see 
our [Contribution Guide](https://jgcri.github.io/hector/articles/ContributionsGuide.html) and note by  contributing 
to this project, you agree to abide to our [Contributor Code of Conduct](CODE_OF_CONDUCT.md)

*** 

This research was supported by the U.S. Department of Energy, Office of Science, as part of research in Multi-Sector Dynamics, Earth and Environmental System Modeling Program. The Pacific Northwest National Laboratory is operated for DOE by Battelle Memorial Institute under contract DE-AC05-76RL01830.

Owner

  • Name: Joint Global Change Research Institute
  • Login: JGCRI
  • Kind: organization
  • Location: College Park, MD, USA

Advancing fundamental understanding of human and Earth systems

Citation (CITATION.cff)

cff-version: 3.0.1
message: "If you use this software in your work, please cite it as below."
authors:
- family-names: "Dorheim"
  given-names: "Kalyn"
  orcid: "https://orcid.org/0000-0001-8093-8397"
- family-names: "Bond-Lamberty"
  given-names: "Ben"
  orcid: "https://orcid.org/0000-0001-9525-4633"
- family-names: "Hartin"
  given-names: "Corinne"
  orcid: "https://orcid.org/0000-0003-1834-6539"
- family-names: "Link"
  given-names: "Robert"
  orcid: "https://orcid.org/0000-0002-7071-248X"
- family-names: "Nicholson"
  given-names: "Mat"
- family-names: "Pralit"
  given-names: "Patel"
  orcid: "https://orcid.org/0000-0003-3992-1061"
- family-names: "Pressburger"
  given-names: "Leeya"
  orcid: "https://orcid.org/0000-0002-6850-2504"
- family-names: "Shiklomanov"
  given-names: "Alexey"
  orcid: "https://orcid.org/0000-0003-4022-5979"
- family-names: "Vega-Westhoff"
  given-names: "Benjamin"
  orcid: "https://orcid.org/0000-0001-7881-8388"
- family-names: "Woodard"
  given-names: "Dawn"
  orcid: "https://orcid.org/0000-0002-0468-4660"
title: "Hector a simple carbon-climate model"
version: 3.0.1
doi: 10.5281/zenodo.7617326
date-released: 2023-02-07
url: "https://github.com/jgcri/hector"

GitHub Events

Total
  • Create event: 20
  • Issues event: 16
  • Watch event: 10
  • Delete event: 25
  • Member event: 1
  • Issue comment event: 91
  • Push event: 91
  • Pull request review event: 46
  • Pull request review comment event: 39
  • Pull request event: 41
  • Fork event: 3
Last Year
  • Create event: 20
  • Issues event: 16
  • Watch event: 10
  • Delete event: 25
  • Member event: 1
  • Issue comment event: 91
  • Push event: 91
  • Pull request review event: 46
  • Pull request review comment event: 39
  • Pull request event: 41
  • Fork event: 3

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 1,119
  • Total Committers: 21
  • Avg Commits per committer: 53.286
  • Development Distribution Score (DDS): 0.69
Past Year
  • Commits: 7
  • Committers: 3
  • Avg Commits per committer: 2.333
  • Development Distribution Score (DDS): 0.429
Top Committers
Name Email Commits
Ben Bond-Lamberty b****y@p****v 347
Alexey Shiklomanov a****v@g****m 179
Robert Link r****k@p****v 158
kdorheim k****m@p****v 154
cahartin c****n@p****v 86
crvernon c****n@g****m 44
leeyap 8****p 37
Pralit Patel p****l@p****v 28
Ben V-W b****e@g****m 20
Sven Willner s****r@p****e 18
Skylar Gering s****g@g****u 11
mnichol3 n****4@g****m 9
Robert Gieseke r****g@w****e 9
Steve Smith (PNNL-JGCRI) s****h@p****v 7
Corinne Hartin c****n 3
Cary Lynch c****h@p****v 2
Dawn Woodard d****d@p****v 2
Tom Payerle p****e@u****u 2
Ben Elliston b****e@a****u 1
gaelforget g****t@m****u 1
mbins 3****s 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 414
  • Total pull requests: 396
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 23 days
  • Total issue authors: 27
  • Total pull request authors: 21
  • Average comments per issue: 2.93
  • Average comments per pull request: 2.98
  • Merged pull requests: 307
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 11
  • Pull requests: 43
  • Average time to close issues: 4 days
  • Average time to close pull requests: 21 days
  • Issue authors: 5
  • Pull request authors: 3
  • Average comments per issue: 0.73
  • Average comments per pull request: 2.14
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • bpbond (186)
  • kdorheim (61)
  • cahartin (47)
  • rplzzz (45)
  • rgieseke (19)
  • ashiklom (15)
  • ssmithClimate (9)
  • leeyap (4)
  • dawnlwoodard (4)
  • mnichol3 (3)
  • pralitp (3)
  • payerle (2)
  • swillner (2)
  • bvegawe (1)
  • akschw04 (1)
Pull Request Authors
  • bpbond (126)
  • kdorheim (114)
  • rplzzz (30)
  • ashiklom (27)
  • leeyap (24)
  • cahartin (14)
  • pralitp (12)
  • rgieseke (11)
  • bvegawe (9)
  • mnichol3 (6)
  • swillner (6)
  • dawnlwoodard (2)
  • skygering (2)
  • bje- (2)
  • payerle (2)
Top Labels
Issue Labels
enhancement (78) bug (53) documentation (23) housekeeping (22) question (12) model-development (12) code-cleanup (9) help wanted (8) R (5) tests (4) GCAM (2) Project Notes (1) invalid (1) PR Documentation (1) duplicate (1)
Pull Request Labels
bug (4) enhancement (4) documentation (3) code-cleanup (2) tests (2) model-development (1) R (1)

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/leeyabot.yml actions
  • actions/checkout v3 composite
  • iterative/setup-cml v1 composite
  • r-lib/actions/setup-r v2 composite
.github/workflows/unit-testing.yaml actions
  • actions/checkout v2 composite
DESCRIPTION cran
  • R >= 3.3 depends
  • BH >= 1.69 imports
  • Rcpp >= 0.12 imports
  • ggplot2 * suggests
  • here * suggests
  • knitr * suggests
  • magrittr >= 1.5 suggests
  • nleqslv * suggests
  • ragg * suggests
  • rmarkdown * suggests
  • testthat * suggests
.github/workflows/codecov.yaml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc master composite
  • r-lib/actions/setup-r master composite
.github/workflows/command-line.yaml actions
  • actions/checkout v2 composite
.github/workflows/pkgdown.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite