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

Implement multi-mixotroph generalization of the NPBD model #6

Open
glwagner opened this issue Apr 5, 2023 · 3 comments
Open

Implement multi-mixotroph generalization of the NPBD model #6

glwagner opened this issue Apr 5, 2023 · 3 comments

Comments

@glwagner
Copy link
Member

glwagner commented Apr 5, 2023

It would seem that the NPBD model might be our first "useful" model? So we should implement that in the source code.

I know @emilyzakem also has aspiration for an "Multi-species NPBD", where I think either P or B can profilerate into NP or NB "species". This model would then have NP + NB + 2 tracers.

Perhaps MultiSpeciesNutrientsPlanktonBacteriaDetritus is a good name for that model?

@emilyzakem
Copy link
Collaborator

emilyzakem commented Apr 5, 2023 via email

@glwagner
Copy link
Member Author

glwagner commented Apr 5, 2023

Yes sure, happy to take a look next week! You can also paste or link to code in this issue to further the discussion.

In terms of implementing this within the current Oceananigans interface, the main challenge is software. Right now we require a different function for each tracer. So here we will have, for example, model.tracers.mixotroph_1, model.tracers.mixotroph_2, etc, and we require a different "dynamics function" for each one that dispatches on ::Val{:mixotroph_1}, ::Val{mixotroph_2}, etc.

This challenge is easily overcome however, since we can use metaprogramming to automatically generate such functions. Again more of a julia 102 than julia 101 concept, but nonetheless straightforward in principle.

Once that minor software hurdle is overcome, its trivial to use matrices, tuples, etc to hold any number of parameters that generate different behavior for each mixotroph species within some homogeneous mathematical framework (ie all mixotrophs have their own maximum growth rate, mortality rate, etc).

@glwagner glwagner changed the title Move NPBD model to source code Implement multi-mixotroph generalization of the NPBD model Apr 25, 2023
@glwagner
Copy link
Member Author

I changed the title of this issue to reflect the discussion!

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

2 participants