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

negative values in sv0 svm from advection #7

Open
jiskattema opened this issue Sep 29, 2020 · 2 comments
Open

negative values in sv0 svm from advection #7

jiskattema opened this issue Sep 29, 2020 · 2 comments

Comments

@jiskattema
Copy link
Owner

The advection schemes can apparently give negative values for the sv0 and svm variables.
They are dealt with by a max(0., ..) call when used in modbulkmicro3, but at the moment i do not write back the positive values to svm and sv0, nor do i calculate how much moisture is lost when doing max().

Is it really necessary? Or can we add a max() to the relevant advection functions?

@fjansson
Copy link

I think this is a "feature" of some advection schemes. Schemes that guarantee not to over/undershoot are called positive, typically at the price of being more diffusive also. The kappa scheme is supposed to be positive.

Writing back clipped values is tricky because then the scheme is not conserving the total mass anymore. I'd rather not add clipping to the advection functions themselves. Maybe the solution is to use a positive advection scheme, or clip in the routines that cannot handle negative values.

@jiskattema
Copy link
Owner Author

It is a bit more complex than i thought: The advection calculates svp, and sv0 is unchanged there; negative values in sv0 cannot come from advection.

At the end of bulkmicro3, negative values for svm+svp*delt are checked and removed, so negative values in sv0 cannot come from bulkmicro either.

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