lkerr / groundfish-MSE

Development of Robust Management Strategies for Northeast Groundfish Fisheries in a Changing Climate
MIT License
4 stars 2 forks source link

Post features #274

Closed mle2718 closed 1 year ago

mle2718 commented 1 year ago

This does a few things.

  1. 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.
  2. move the saving step of mproc and set_om_parameters_global.R out of runPost.R and into runSim.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.
  3. 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.
  4. 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.
mle2718 commented 1 year ago

@jerellejesse -- this probably breaks things on HPCC runs. I think I have a fix.

move the saving step of mproc and set_om_parameters_global.R out of runPost.R and into runSim.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.

mle2718 commented 1 year ago

ugh. I did it again. I merged EconOnly2 into the PostFeatures branch.