Testing the new growth branch, I found a bug that made my model crash (R session aborted) and produce NaNs when running retros. The same issue happened (but the model did not crash, I don't know why yet) when using the devel branch.
The problem is here. avg_years_ind and XSPR_R_avg_yrs are not changed before running retros, so the indices are out of range and produced NaN or Inf when running _get_static_SPRres function.
Testing the new growth branch, I found a bug that made my model crash (R session aborted) and produce NaNs when running retros. The same issue happened (but the model did not crash, I don't know why yet) when using the devel branch.
The problem is here. avg_years_ind and XSPR_R_avg_yrs are not changed before running retros, so the indices are out of range and produced NaN or Inf when running _get_static_SPRres function.
This can be easily solved by adding here:
temp$data$avg_years_ind = temp$data$avg_years_ind - peel temp$data$XSPR_R_avg_yrs = temp$data$XSPR_R_avg_yrs[1:n_years]
Hope this helps.