Closed hrlai closed 3 years ago
When I ran the script locally with very high dilution factor (1000), it did not fail.
My gut feeling is still that largish dilution factor (>10) generates some zero-length population vectors...
Since it says arg 1
, if it means the first argument in inter.calc
then trees.hetero
may be the culprit.
Sorry for the slow reply. Did settting the dilution factor back to 10 resolve the issue? I can't really figure out what is wrong, because I cannot replicate the error. But I agree that you're probably right that all of the seedlings might have died out, leaving a zero-length n to the rbinom function? Is the model running now or are we still looking for a fix before restarting the simulation?
Did settting the dilution factor back to 10 resolve the issue?
Yes it did. The output is now pushed. Let's deal with the issue later. Closing for now.
Opening this issue again, because I am facing the same issue now as of b87ab095b23686872d00fda4fecb5a080e85bf01 .
In year 2 I got the following error message:
task 579 failed - "NA/NaN/Inf in foreign function call (arg 1)"
and troubleshot it to the inter.calc
function. The root seems to be the grid
column in ppoS
having NA
s:
> summary(ppoS)
x y logheight grid
Min. :366994 Min. :153004 Min. :1.970 Min. : 1.00
1st Qu.:367133 1st Qu.:153150 1st Qu.:2.879 1st Qu.: 6.00
Median :367291 Median :153268 Median :3.067 Median :13.00
Mean :367268 Mean :153267 Mean :3.067 Mean :12.75
3rd Qu.:367400 3rd Qu.:153393 3rd Qu.:3.253 3rd Qu.:19.00
Max. :367496 Max. :153507 Max. :4.153 Max. :25.00
NA's :90
Are these the seedlings that dispersed outside of the map extent, so they have NA ?
sorry I must have missed this. I've checked and you are right. these grid NAs are all from just outside the boundary. I've inserted a quick and dirty fix. we will eventually make the landscape a torus so I think that this fix is good enough for now
Nice this seems to have been resolved now. The simulation runs into 10+ as of now without issue.
The three-species script fails with the following errors:
This happens consistently at around year 6. I suspect it is related to a new warning message related to the
p_bz
function:Still debugging it, but very slowly. Any idea?