This PR fixes a division by zero error that occures when using the h16 or h16s5 region mapping using 67k preprocessing.
The value sum((cell(i,j),w), fm_croparea("y1995",j,w,knbe14)) in LN 130 of the preloop is above but very close to zero. Like this the >0 condition is fulfilled but still LN 134 results in division by zero.
:bird: Description of this PR :bird:
This PR fixes a division by zero error that occures when using the h16 or h16s5 region mapping using 67k preprocessing.
The value
sum((cell(i,j),w), fm_croparea("y1995",j,w,knbe14))
in LN 130 of the preloop is above but very close to zero. Like this the >0 condition is fulfilled but still LN 134 results in division by zero.:wrench: Checklist for PR creator :wrench:
[x] Label pull request from the label list.
[x] Self-review own code
magpie4
R library has been updated accordingly and backwards compatible where necessary.scenario_config.csv
has been updated accordingly (important ifdefault.cfg
has been updated)[x] Document changes
CHANGELOG.md
goxygen::goxygen()
and verify the modified code is properly documented[x] Perform test runs
Rscript start.R --> "compilation check"
Rscript start.R --> "test runs"
Rscript start.R --> "test runs"
:chart_with_downwards_trend: Performance changes :chart_with_upwards_trend:
:rotating_light: Checklist for reviewer :rotating_light:
CHANGELOG
is updated correctly