/TMB-POP

Template Model Builder Code for Pacific Ocean Perch

Primary LanguageR

TMB-POP

Template Model Builder Code for Pacific Ocean Perch

Background

This is initially the TMB and R code that William Aeberhard wrote (as a contract) based on the equations from our Pacific Ocean Perch stock assessment for the west coast of Vancouver Island.

Initially this is to easily share with fellow Pacific participants of the TMB course in Halifax, lest they go their own way and spend time starting from scratch. I ran this code on Friday in the workshop and it worked fine and was very fast. It will be a good starting point for future assessments.

I haven't had time (or expertise) to check it, test it, or think about it in detail. But that can now happen given our newly acquired TMB knowledge.

An ideal plan would be something like

  1. Test and understand the code.
  2. Compare to previous results.
  3. If satisfied then this could be used for the next POP assessment, or in conjunction with exiting (Awatea) code. Using the TMB code for a full assessment will initially require a lot of setting up of directories and structure and writing code for figures and tables, but we can utilise the structures that Chris developed for hake and then herring, and have code we can adapt for the figures and tables.
  4. Maybe there should be a knitr file that plots results for a single model run (for quick understanding, and checking of convergence etc.), and also an assessment file that builds the assessment (with sensitivities and bridging analyses as necessary).
  5. I think I can even automate the writing of the equations (based on the input file).

Thinking and discussing this stuff before starting will help a lot.

If you want to contribute to this repository (in a way that may help us) then please fork (on GitHub) and then clone to your machine. If you don't know what that means, or you just want to take the code and use it yourself (i.e. you may make changes but don't anticipate they will be useful for anyone else), then you can just download the repository (see the green 'Clone or download' button and download the .zip file). Ideally I think we'd want to keep this repository fairly 'clean', in that changes are expected to be shared and merged into the main repository.

Directory structure

POP-code/ - contains the original code from William, his report POPreport.pdf, and any adaptions/tests that we do.

POP-code/orig-code/ the original code from William - do not edit this code (so that we always have the original version available). Includes his original .zip file.

POP-code/extend-code/ the original code from William to be edited and tested as necessary.