Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gustavdelius opened this issue Dec 10, 2024 · 0 comments
Open

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

gustavdelius opened this issue Dec 10, 2024 · 0 comments

Comments

@gustavdelius
Copy link
Member

gustavdelius commented Dec 10, 2024

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant