gadget-framework / gadget3

TMB-based gadget implemtation
GNU General Public License v2.0
8 stars 6 forks source link

g3_to_variable_list #15

Open lentinj opened 3 years ago

lentinj commented 3 years ago

@bthe Here's an idea I had whilst scrubbing potatoes.

To make best use of the reporting, you need to know what variables are available in the model. You can look at the code, but the variable list isn't that easy to parse, especially as the array definitions are quite lengthy with the dimension names.

Instead, compile a model to a list of variables and their dimensions, which should be easier to pick through.

For bonus points, we can attach a description to each variable, say attr(ling_mat__wgt, "desc") <- "Mean weight at current point in time" which could also be returned. This could be threaded into the source code as a comment above the variable definition.

bthe commented 3 years ago

Sounds like a pretty useful thing to have, and I guess that, at the very least, it would make it easier to parse the data into a more R friendly data frame object.