runSequence: Function to run a sequence of TCSAM2015 models.

Description Usage Arguments Details Value

View source: R/runSequence.R

Description

This functions runs a sequence of TCSAM2015 model.

Usage

1
2
3
runSequence(os = "osx", path = ".", model = "tcsam2015",
  path2model = "", configFile = "", numRuns = 4, mcmc = FALSE,
  mc.N = 1e+06, mc.save = 1000, mc.scale = 1000, plotResults = FALSE)

Arguments

os

- 'win' or 'mac' or 'osx'

path

- path for model output

model

- TCSAM2015 model executable name

path2model

- path to model executable

configFile

- full (absolute) path to model configuration file

numRuns

- number of runs in sequence to make

mcmc

- flag (T/F) to run mcmc on "best" model

mc.N

- number of mcmc iterations to make

mc.save

- number of iterations to skip when saving mcmc calculations

mc.scale

- number of iterations to adjust scale for mcmc calculations

plotResults

- T/F to plot final results using plotTCSAM2013I

Details

This function creates a shell script ('./tmp.sh') in the working directory and uses it to run a version of the TCSAM2015 model. Pin files are copied from the previous run's par file. The file 'best.txt' identifies the run with the best objective function value. The "best" sub-folder contains results from re-running the best run, this time estimating the hessian and obtaining the std file (if the hessian is invertible).

Uses function wtsUtilities::formatZeros().

Value

- list indicatng index of best run, the folder with the best run, and a list of results from the parameter files for each model run.


wStockhausen/rTCSAM2015 documentation built on May 3, 2019, 7:14 p.m.