Delete get_catdf(). It is used 1 time, in runPost.R, and is used to save mproc in memory to the fig folder. As far as I can tell, the saved version of mproc was never used. get_catdf() is not good, because it does not save a csv, it saves a space delimited file. write.csv() is part of base are and can do the job.
move the saving step of mproc and set_om_parameters_global.R out of runPost.R and into runPre.R. This better matches the workflow. simulation parameters are saved at the end of the model run, not while processing model results. I think it would be better to put this all the way at the beginning, during the model setup (see point 4 below) but there's too much going on and I'm sure I'll break something.
get_plots() points to the versions of mproc and set_om_parameterts_global.R that were saved in step 2. This is important because you may run a model, change some parameters, run another model, and want to make plots from the first model. You can't actually do this without fiddling with runPost , because it will always find the most recent set of results.
runSetup.R gets run alot. Some of this is a little duplicative. There's almost zero computer cost, but I'm not confident I can rearrange things without breaking something. Especially because I don't know what happens on an HPCC model run.
@jerellejesse -- I put annotated comments to make the changes a little clearer.
This does a few things.
@jerellejesse -- I put annotated comments to make the changes a little clearer.