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

Potential bug in logging model #1367

Open
XiulinGao opened this issue Mar 26, 2025 · 1 comment
Open

Potential bug in logging model #1367

XiulinGao opened this issue Mar 26, 2025 · 1 comment
Labels
science: logging Pertaining to logging disturbance

Comments

@XiulinGao
Copy link
Contributor

call LoggingMortality_frac(currentSite, bc_in, ipft, currentCohort%dbh, currentCohort%canopy_layer, &
currentCohort%lmort_direct, &
currentCohort%lmort_collateral, &
currentCohort%lmort_infra, &
currentCohort%l_degrad, &
bc_in%hlm_harvest_rates, &
bc_in%hlm_harvest_catnames, &
bc_in%hlm_harvest_units, &
land_use_label, &
age_since_anthro_disturbance, &
current_fates_landuse_state_vector, harvestable_forest_c, harvest_tag)

This call of logging mortality function here uses the calculated cohort level logging resulted mortality and degradation rate as the argument input. However, in the original logging mortality function, logging mortality and degradation rate are defined as output variables. This call here then will change the value. I don't think I understand what Mortality Derivative fun does here, and how that is related to the actual logging mortality applied to cohort to reflect logging effects, and how logging mortality is output as history variable. I indeed see some weird behavior of the logging model on my local branch that when runtime logging direct mortality is non-zero, but the output is zero and there is no logging effect at all. However, this is based on my local branch where I did a targeted logging: only apply logging to certain DBH size with different cap rate for each group and zero logging mortality when a defined patch level total basal area is approached with only degradation rate is preserved.

@XiulinGao
Copy link
Contributor Author

I think I figured it out why I'm getting a zero mortality rate. And this recall of logging mortality function does not affect the calculated logging mortality. It literally just recalculates the logging mortality for each cohort. But I still cannot understand why we have to recall the logging mortality function here if the purpose is just to use the derived mortality to calculate dndt_logging.

@glemieux glemieux added the science: logging Pertaining to logging disturbance label Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
science: logging Pertaining to logging disturbance
Projects
Status: ❕Todo
Development

No branches or pull requests

2 participants