hector

This repo is used to finished the original Script of Hector Adaptation

https://github.com/zeyuf/hector

Science Score: 54.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
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

This repo is used to finished the original Script of Hector Adaptation

Basic Info
  • Host: GitHub
  • Owner: ZeyuF
  • License: gpl-3.0
  • Language: C++
  • Default Branch: main
  • Size: 54.2 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 2 years ago · Last pushed about 2 years 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) [![codecov](https://codecov.io/gh/JGCRI/hector/branch/main/graph/badge.svg?token=EGM0lXDxRv)](https://codecov.io/gh/JGCRI/hector)

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](articles/ContributionsGuide.html) and note by  contributing 
to this project, you agree to abide to our [Contributor Code of Conduct](CODE_OF_CONDUCT.html)

*** 

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: Ze FISH
  • Login: ZeyuF
  • Kind: user

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
Last Year

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/codecov.yaml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
.github/workflows/command-line.yaml actions
  • actions/checkout 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/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 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/unit-testing.yaml actions
  • actions/checkout v2 composite
DESCRIPTION cran
  • R >= 3.3 depends
  • Rcpp >= 0.12 imports
  • ggplot2 * suggests
  • knitr * suggests
  • lintr >= 3.0 suggests
  • magrittr >= 1.5 suggests
  • rmarkdown * suggests
  • testthat * suggests