Skip to contents

Process large MSE output data stored in multiple RDS files in "data/active" or in a list of model run objects. Applies a processing function to each model run's output variable, and combines the results into a single tibble.

Usage

process_big_outputs(
  model_runs,
  var,
  extra_columns,
  hcr_filter,
  om_filter,
  process_func,
  ...
)

Arguments

model_runs

a list of MSE model run objects (created via `run_mse(...)`) or NULL to read from RDS files in "data/active"

var

the output variable from the model run objects

extra_columns

a data.frame of extra column names and values to add to the tibble (ignored if reading from RDS files)

process_func

a function to apply to each model runs' output variable

...

additional arguments to pass to `process_func`

Value

a tibble of processed MSE output data

Details

This is necessary because the total size of spatial MSE output data objects generally exceeds available memory, so they must be processed in chunks.

When reading from RDS files, the files will be processed in parallel using ncores-2 cores.