
Open + collect a per-scenario biomass_snapshots Arrow dataset
read_biomass_c_snapshots_for_scenario.RdConvenience wrapper that opens <scenario_dir>/<subdir> as an Arrow dataset
partitioned by replicate, collects the full contents into a tibble, and
returns NULL for missing directories or empty datasets so callers can
short-circuit gracefully.
Usage
read_biomass_c_snapshots_for_scenario(
scenario_dir,
subdir = "_aggregates/biomass_snapshots"
)Value
A tibble with columns
scenario, replicate, Time, row, column, ecoregion, species, biomass
(matching read_biomass_c_snapshots()'s output), or NULL.
Details
Isolated from the rest of the read_biomass_c_snapshots() pipeline so its
body stays stable across project-side refactors: {targets} does not track
installed-package function bodies, so consuming targets are not invalidated
by cosmetic changes to how the collect happens under the hood. Callers that
want that invalidation guarantee should call this function from their target
commands rather than inlining the arrow::open_dataset() |> collect() chain.
The default subdir = "_aggregates/biomass_snapshots" matches the layout
produced by write_biomass_c_snapshots_parquet()-style writers in the
FOR-CAST post-processing pipeline; override for other layouts.
See also
Other Vegetation transition helpers:
biomass_landscape_summary(),
community_label(),
leading_species(),
plot_species_biomass(),
plot_transitions(),
read_biomass_c_snapshots(),
read_biomass_output_rasters(),
transition_data(),
write_biomass_c_snapshots_parquet()