set_dirs: Set and return all model directories for the project

View source: R/set-dirs.R

set_dirsR Documentation

Set and return all model directories for the project

Description

Set and return all model directories for the project

Usage

set_dirs(
  models_dir = NA,
  nongit_dir = NA,
  base_models_dir = "01-base-models",
  bridge_models_dir = "02-bridge-models",
  sens_models_dir = "03-sens-models",
  retro_models_dir = "04-retrospective-models",
  base_models_dirs = "01-base-model",
  bridge_models_dirs = NA,
  sens_models_dirs = NA,
  retro_models_dirs = NA,
  prepend_to_bridge = NA,
  suppress_warnings = FALSE,
  base_model_dir = NULL
)

Arguments

models_dir

Path in which the model directories are located for the current assessment year

nongit_dir

Path in which the non-git files for the assessment are located

base_models_dir

Name of the base models directory

bridge_models_dir

Name of the bridging models directory

sens_models_dir

Name of the sensitivity models directory

retro_models_dir

Name of the retrospectives models directory

base_models_dirs

A vector of subdirectory names in base_models_dir that each contain an individual base model

bridge_models_dirs

A vector of subdirectory names in bridge_models_dir that each contain an individual bridge model

sens_models_dirs

A vector of subdirectory names in sens_models_dir that each contain an individual sensitivity model

retro_models_dirs

A vector of subdirectory names in retro_models_dirthat each contain an individual retrospective model

prepend_to_bridge

Logical. If TRUE prepend the base model to the bridge model list (not implemented)

suppress_warnings

If TRUE, warnings about directories not existing will not be shown

base_model_dir

Path for the base model, if it is outside the file structure for an assessment. This is used for SR documents, where there is a new base model with more data included in a subsequent year. If this is NULL, the usual base model location will be used

Details

Sensitivity groups will have the base model directory prepended, The bridge model groups can have last_yr_base_model_dir prepended if prepend_to_bridge is set to TRUE for the model group. If directories do not exist, they will be assigned NULL and a warning issued. If the models_dir does not exist, an error will be thrown.

Value

A list of vectors of directory names, which will have NA elements for those which do not exist:

  1. The input directory for models_dir

  2. The input directory for nongit_dir

  3. The input directory for last_yr_base_model_dir

  4. The input directory for base_model_dir

  5. The input directory for bridge_models_dir

  6. The input directory for sens_models_dir

  7. The input directory for retrospective_models_dir

  8. The base model directories

  9. The bridge model directories

  10. The sensitivity model directories


pbs-assess/gfiscamutils documentation built on Oct. 24, 2024, 1:37 p.m.