gadget-framework / gadget2

Gadget is the Globally applicable Area Disaggregated General Ecosystem Toolbox
GNU General Public License v2.0
18 stars 20 forks source link

add stomach LH data #2

Closed vbartolino closed 8 years ago

vbartolino commented 8 years ago

I'm trying to add a stomach LH in a 2 species model (cod-sprat). I've tried 1 simulation in the terminal, I continue to get the same error and I haven't been able to figure out the reason. Thankful for any suggestion where to look.

Finished reading model data files, starting to run simulation Error when checking length structure for the following lengthgroups Minimum length of length group division is 1 Maximum length of length group division is 137 Minimum length of length group division is 20 Maximum length of length group division is 100 Error in predatoraggregator - invalid predator length group structure

This is how I've set the lengths in the stockfiles and aggrfiles:

bthe commented 8 years ago

I guess your problem is related to the definition of length bins. The aggregation file doesn't match your definition of length bin for the stock. That is the stock dynamics is calculated in terms of odd numbers while the predator agg file is in even numbers.

jmbegley commented 8 years ago

It's some time since I looked at this, but isn't the problem the fact that the predator aggregation bins start at 20cm but the stock is defined down to 1cm (and the maximum length in the aggregation file is 100cm but the stock is defined up to 137cm)? If you create a new entry in the predator aggregation file of "len10 1 20" (for example) and another one for the maximum lengths of "len100 100 137" does it get a little further?

vbartolino commented 8 years ago

Yes, the mismatch between the length bin in the stock and the aggregation file (odd and even numbers) was the cause. As far as I can see the min and max length in the predator aggregation file do not have to be the same as in the stock file (which make sense to me). Thanks for the prompt and effective reply.

James, nice to see you back on the old good Gadget :)