JGCRI / hector

The Hector Simple Climate Model
http://jgcri.github.io/hector/
GNU General Public License v3.0
111 stars 47 forks source link

Add warning when preindustrial CO2, CH4, and N2O are changed from default values #669

Closed kdorheim closed 1 year ago

kdorheim commented 1 year ago

As part of the update to using the AR6 RF equations, preindustrial CO2, CH4, and N2O should be treated as fixed parameters since in this PR I added log-level warnings for when these values are changed from their respective default values.

See here

> library(magrittr)
> here::here("inst", "input", "hector_ssp119.ini") -> ini
> core <- newcore(ini, suppresslogging = FALSE, loglevel = LL_WARNING())
> run(core)

Screen Shot 2023-01-04 at 9 18 49 AM

Compared with

> setvar(core, dates = NA, var = PREINDUSTRIAL_N2O(), values = 100, unit = getunits(PREINDUSTRIAL_N2O()))
> reset(core)
Hector core:    Unnamed Hector core
Start date: 1745
End date:   2300
Current date:   1745
Input file: /Users/dorh012/Documents/Hector-Versions/v3/hector/inst/input/hector_ssp119.ini
> run(core)

now returns

Screen Shot 2023-01-04 at 9 20 02 AM

kdorheim commented 1 year ago

Is this enough warning? we also have warnings in the ini files, what do you think @bpbond

github-actions[bot] commented 1 year ago

“leeyabot down“

kdorheim commented 1 year ago

re the testing in R... hmmm I don't know we don't really do any other log testing in R so other than "do the logs exist" so I am inclined to say no what do you think?

bpbond commented 1 year ago

Makes sense. Thanks.

github-actions[bot] commented 1 year ago

“leeyabot down“