`run.sensitivity.analysis()` not creating `sensitivity.results.Rdata`
Aariq opened this issue · comments
Bug Description
I'm working on runs with sensitivity analysis of ± 1 SD and run.sensitivity.analysis()
generates plots correctly but does not save sensitivity.results.Rdata. In addition, I get error messages from splinefun
such as:
Error in stats::splinefun(quantiles.input, quantiles.output, method = "monoH.FC") :
length(m) must be at least two
or
Error in stats::splinefun(quantiles.input, quantiles.output, method = "monoH.FC") :
zero non-NA points
In addition: Warning message:
In run.sensitivity.analysis(settings) :
missing >2 runs for 'quantum_efficiency','cuticular_cond','SLA','stomatal_slope','fineroot2leaf','Vcmax'
sensitivity analysis or variance decomposition will be performed on these trait(s)
it is likely that the runs did not complete, this should be fixed !!!!!!
But as far as I can tell, neither of these is true. The latter error didn't happen when I stepped through the function in debug, I'm pretty sure. Still haven't pinned this one down, but I'll edit this issue when I figure out the problem.
The code that triggers the latter error is here:
pecan/modules/uncertainty/R/run.sensitivity.analysis.R
Lines 103 to 109 in 24d86ae
But if I load sensitivity.output
manually and inspect it, it has 3 rows and no NA
s, so this shouldn't be triggering an error.
Oh, this is likely because I deleted the run folders generated for SA for one of the PFTs, which I think is the only way to "turn off" sensitivity analysis for a PFT. I'll still try to see if there is a solution that still exports the data in some form.