Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about permafrost refreeze sum over biomes #763

Open
pjbarjhoux opened this issue Dec 12, 2024 · 1 comment · May be fixed by #764
Open

question about permafrost refreeze sum over biomes #763

pjbarjhoux opened this issue Dec 12, 2024 · 1 comment · May be fixed by #764
Assignees
Labels

Comments

@pjbarjhoux
Copy link

pjbarjhoux commented Dec 12, 2024

Hi,

First of all, I thank you for sharing your work with the open-source climate modeling community!

I am currently working on implementing (/trying to) the model in Python, and these [lines] in simpleNbox-runtime.cpp (

for (auto biome : biome_list) {
auto [biome_c_thaw, biome_pf_refreeze_tp, biome_pf_refreeze_soil] =
compute_pf_thaw_refreeze(biome, rh_ftpa_co2(biome),
rh_ftpa_ch4(biome));
pf_thaw_c = pf_thaw_c + fluxpool(biome_c_thaw, U_PGC_YR);
pf_refreeze_tp =
pf_refreeze_tp + fluxpool(biome_pf_refreeze_tp, U_PGC_YR);
pf_refreeze_soil =
pf_refreeze_tp + fluxpool(biome_pf_refreeze_soil, U_PGC_YR);
}
) caught my attention - in particular the line 865.

My question : I was wondering why, during the sum over biomes, the iterative computation of refreezed soil pool (pf_refreeze_soil) relies on the permafrost thaw pool (pf_refreeze_tp) of current biome instead of the refreezed soil pool of previous biome ?

First I thought this was linked to issue #723 but I was not able to reproduce the mentioned error (comparison with 1 biome vs biome split) after reactivating the permafrost refreeze from soil feature, I guess I am doing something wrong.
In the other hand, I was thinking that maybe the refreezed tp is somehow part of the refreezed soil pool? but in this case, why refreezed soil and refreezed tp are added during permafrost derivatives computation a few lines after?

My apologies if this is a trivial one, but I didn't manage to find the answer ! and this seems to have a very small to no impact on the results according to the tests.

Regards
Pierre-Jean

@pjbarjhoux pjbarjhoux changed the title question about permafrost refreeze over biomes question about permafrost refreeze sum over biomes Dec 13, 2024
@bpbond
Copy link
Member

bpbond commented Dec 20, 2024

Hi @pjbarjhoux -

That is most definitely a mistake -- thank you for your sharp eyes! Agreed, it should be pf_refreeze_soil = pf_refreeze_soil + ....

@bpbond bpbond added the bug label Dec 20, 2024
@bpbond bpbond linked a pull request Dec 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants