Skip to content

Round down w_repro_max to next-lower point on w grid #301

@gustavdelius

Description

@gustavdelius

Due to mizer's numerical integration scheme, when the growth rate is zero at the start of a size class, this can nevertheless lead to a non-zero abundance in that size class. This is potentially confusing because it means that if w_repro_max falls within one size class, and hence the growth rate at the end of that size class is zero, individuals can nevertheless grow into the next larger size class, clashing with the idea that w_repro_max is the maximum size. @LucaBroadbentCefas proposed therefore to round down w_repro_max to the next-lower point on the w grid, so that the growth rate would be zero already at that point and hence no fish would grow beyond the size class containing w_repro_max.

I have no objection to this change, as long as it is done in a way that does not confuse people with existing models. So I propose that the rounding down takes place in setReproduction() where repro_prop is calculated, but only for params objects that were created in a newer version of mizer, i.e., when getMetadata(params)$mizer_version > "2.5.3.9000".

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions