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

Allow users to specify n_plankton=0 #134

Open
nanophyto opened this issue Jan 28, 2025 · 1 comment
Open

Allow users to specify n_plankton=0 #134

nanophyto opened this issue Jan 28, 2025 · 1 comment

Comments

@nanophyto
Copy link
Contributor

This is not very relevant for the NPZD example, but once we implement more plankton functional types, it would be desirable if the user can specify some n_plankton to be 0.

It seems that currently, setting a plankton to 0 breaks things:

    @testset "n_zoo passed as 0" begin

        N2P0ZD = construct_size_structured_NPZD(n_zoo=0)
        model = N2P0ZD()

        @test !iszero(model(Val(:N), 0, 0, 0, 0, P1, P2, N, D, PAR))
        @test !iszero(model(Val(:D), 0, 0, 0, 0, P1, P2, N, D, PAR))
        @test !iszero(model(Val(:P1), 0, 0, 0, 0, P1, P2, N, D, PAR))
        @test !iszero(model(Val(:P2), 0, 0, 0, 0, P1, P2, N, D, PAR))

    end
@radka-j
Copy link
Contributor

radka-j commented Jan 28, 2025

Good point! This should just be a matter of including an if statement in the relevant constructor somewhere that skips those plankton groups when the n=0.

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