Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug with no permafrost run #752

Open
Open
Bug with no permafrost run#752
Assignees

Description

Describe the bug
This was brought to our attention by @cahartin she was having issues with turning the permafrost module off.

To Reproduce


hector_inifile <- file.path(system.file("input", package = "hector"), "hector_ssp245.ini")
name = "No Perm"
hcore <- newcore(hector_inifile, suppresslogging = TRUE, name = name)

# Here I fetch permafrost c and it matches what's in the ini file. Check.
fetchvars(hcore, NA, PERMAFROST_C())
# scenario year variable value units
# 1 WPerma NA permafrost_c 865 Pg C
# matches value in ini file

# Now I set that value to 0.
setvar(hcore, NA, PERMAFROST_C(), 0.0, "Pg C")

# I check again that the value is 0 and it is. Success?
fetchvars(hcore, NA, PERMAFROST_C())
# scenario year variable value units
# 1 No Perm NA permafrost_c 0 Pg C

run(hcore)

# I run hector and then pull out the Perma C value and it has carbon in it in 2100! Not what I was expecting
out <- fetchvars(hcore, 1950:2100, PERMAFROST_C())
# scenario year variable value units
# 1 No Perm 2100 permafrost_c 654.1661 Pg C

ggplot(data = out) +
geom_line(aes(year, value)) +
labs(title = "Permafrost C Pool",
y = "Pg C")


# I also double checked the initial value and it's back to the ini file value. bummer
fetchvars(hcore, 1745, PERMAFROST_C())
# scenario year variable value units
# 1 No Perm 1745 permafrost_c 865 Pg C

Expected behavior
Setting the permafrost carbon pool to 0 should mean that the size of the permafrost pool is set at 0 at the beginning on the run and is constant throughout the run.

Actual behavior

Additional context
Hector version 3.2.0 git 1ef0b4df8563a31580ffa94eb11b113e3f317b86

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions