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

Modified particles to conserve tracers if sinking below zero, and fixed light #35

Merged
merged 4 commits into from
Aug 18, 2022

Conversation

jagoosw
Copy link
Collaborator

@jagoosw jagoosw commented Aug 18, 2022

Now instead of allowing tracers to go below zero the model requires
fallback properties of the particles to be defined where the deficite
is taken from. For example, in the SLatissima model this is N (gN/dm^2)
so we also require a "scale factor" which in this case is the A property
and the unit conversion from mmolN to gN.

Also updated tests.

Now instead of allowing tracers to go below zero the model requires
fallback properties of the particles to be defined where the deficite
is taken from. For example, in the SLatissima model this is N (gN/dm^2)
so we also require a "scale factor" which in this case is the A property
and the unit conversion from mmolN to gN.

Also updated tests.
@jagoosw jagoosw changed the title Modified particles to conserve tracers if pulling below zero Modified particles to conserve tracers if sinking below zero Aug 18, 2022
@jagoosw
Copy link
Collaborator Author

jagoosw commented Aug 18, 2022

Fixed the conservation issue now @johnryantaylor

It is slightly more complicated than I was expecting because N is per unit area, so to keep it general I have made it so that for each sink field you define a fallback property (of the particles) to take the defecate from, in this case N, as well as a scale factor. The scale factor can be a number, e.g. if the kelp model just tracked mass of nitrogen, or a number and another particle property to divide by, in this case A.

@jagoosw
Copy link
Collaborator Author

jagoosw commented Aug 18, 2022

Added a test for the /A case and looks good

@jagoosw jagoosw changed the title Modified particles to conserve tracers if sinking below zero Modified particles to conserve tracers if sinking below zero, and fixed light Aug 18, 2022
@jagoosw
Copy link
Collaborator Author

jagoosw commented Aug 18, 2022

Turns out I had broken the light function but repaired now

@jagoosw jagoosw merged commit d8ef6fb into main Aug 18, 2022
@jagoosw jagoosw deleted the particles-conserve-tracers branch August 18, 2022 17:40
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

Successfully merging this pull request may close these issues.

2 participants