-
Notifications
You must be signed in to change notification settings - Fork 188
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
Problematic behavior of the RiBasedVerticalDiffusivity
#3283
Comments
Interesting! Good find. This not the only thing to worry about regarding the entrainment diffusivity. It's effect also seems to depend on vertical resolution, and it only seems useful at low resolutions. In general, I recommend switching to CATKEVerticalDiffusivity, where we have put a lot of effort into solving those problems. I'm going to suggest a different solution that setting some maximum capping diffusivity. I think setting a maximum diffusivity could work, but that there are better solutions that more directly address the underlying issue. I think the issue here is that "entrainment" should not occur across low stratification regions. Thus this model for "entrainment" assumes the stratification is "strong". More generally, we are dividing the boundary layer into a convecting region and an entraining region. We identify the convecting region by One way to fix the issue but retaining a 3D kernel is to change the way we estimate "convecting" and "entraining" regions. Those criteria are Lines 247 to 248 in 94e99e1
If we introduce a new parameter, say convecting = N² < 0 # applies regardless of Qᵇ
N²_entrainment = minimum_entrainment_buoyancy_frequency
entraining = (N²_above < 0) & (N² > N²_entrainment) (Qᵇ > 0) Now the user can determine |
And note I think a more satisfying model would assess the buoyancy jump across the entrainment region relative to the "convective potential" in the column above. Then we could say that we're convecting until we reach a grid cell with a significant stable buoyancy jump that's an appreciable multiple of the convective potential above. That would introduce a non-dimensional parameter rather than a dimensional one. But it would also require a vertical integral. |
RiBasedVerticalDiffusivity
RiBasedVerticalDiffusivity
with @sandreza we found out that the new
RiBasedVerticalDiffusivity
has some stability issues.These issues are related to the entrainment diffusivity added to the tracer diffusivity.
In particular, the change is
to
where
Previously, a maximum of
Cᵉⁿ
was added (a constant free parameter with a value of 0.1 calibrated from LES).When substituting this with a fraction with
N²
at the denominator, the diffusivity has no upper bound, exploding towards very unphysical values where stratification is low.This, compounded with the averaging in time, has the effect of having an ever-growing diffusivity which eventually leads to
N² = 0
and consequentlyκᵉⁿ == NaN
There are to possible fix to this:
κᵉⁿ_max
andκᵉⁿ = min(κᵉⁿ_max, ifelse(entraining, Cᵉⁿ * Qᵇ / N², zero(grid)))
The text was updated successfully, but these errors were encountered: