-
Notifications
You must be signed in to change notification settings - Fork 21
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
Added invalid_fill_value
to ScaleNegativeTracers
#170
Conversation
…al tracer content is less than 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
only thing I think it'd be nice to mention the caveat in the docstring
src/Utils/negative_tracers.jl
Outdated
`invalid_fill_value` specifies the value to set the total cell content to if the total is less than 0 | ||
(meaning that total tracer conservation can not be enforced). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we elaborate a bit more here... eg mention the caveat you included in the first comment in the PR? also, if other models follow similar practice perhaps mention 1-2 here?
Thanks for sorting @navidcy, I'm going to bump the patch number and they merge |
This PR adds a parameter
invalid_fill_value
toScaleNegativeTracers
so that when the total cell content is less than 0 it doesn't have to be filled with NaNs. While even less ideal this seems to be the easiest way to keep complex models positive (e.g. the near global model), and is akin to how lots of earth system models do it.