Load PFT priors and posteriors from disk/database
Source:R/load_pft_posteriors.R
load_pft_posteriors.RdResolves each PFT's output directory and reads its prior distributions and
(where available) MCMC posterior chains into memory. This is the disk/BETY
I/O step that used to live inside get.parameter.samples; it is
kept separate so that the sampling functions (get_parameter_samples
and the design generators) can share one loader rather than each carrying
their own copy.
Value
A list with four elements:
- pft_names
character vector of PFT names ("NULL" where unnamed).
- prior_distns_list
list of prior distribution data frames, one per PFT (
NULLentry where none was found).- trait_mcmc_list
list of trait MCMC results, one per PFT (
NULLentry where the PFT has no MCMC chains).- independent
logical,
FALSEif any PFT carries a joint posterior,TRUEotherwise.
Details
Posterior type is detected by content, not filename, via
load.posteriors: MCMC chains take precedence over distribution
summaries. When a PFT's posterior is a joint fit (e.g. from PDA), the
returned independent flag is set to FALSE so downstream
sampling preserves the parameter correlations.
See also
get_parameter_samples for the sampling step that
consumes this output.