CVMix/CVMix-src

Non-local transport has a NaN in first element

Closed this issue · 3 comments

The non-local transport returned from cvmix_coeffs_kpp_low() contains a NaN in the first element (surface). Bug appeared in commit 4d2d987. Bug is still manifest in 4f3943a.

A possibly related change is that the diffusivity at the surface is no longer zero but a smallish (not tiny 1e-5) value.

Configuration uses MatchTechnique='SimpleShapes'.

The last working commit was 7ec9961.

This appears to be tied to issue #26 and how cvmix_coeffs_kpp calls enhanced diffusivity. I'm going to leave this ticket open in case it turns out to be more complicated than that, but I think we're on our way to fixing this.

Mike,

I think I have figured out what is/was happening. In the earlier code, up
to 7ec9961, cvmix_kpp_compute_enhanced_diff() was always called, even
though it shouldn't have been with the no matching condition. What is weird
is that by calling it we had reduced BL diffusivities relative to not
calling it!

Pause and then please reread that last sentence and think about that.

Using commit 7ec9961 and commenting out the call
to cvmix_kpp_compute_enhanced_diff() gives the same answers as eb7c85c,
which have larger BL diffusivities and shallower OBL depths. The response
to not calling Scvmix_kpp_compute_enhanced_diff() makes no sense which
indicates that function is making some assumptions (perhaps that
diffusivity at the bottom of the boundary layer is small?).

The upshot is that I will take the answer changes associated the last
commit which is due to not calling cvmix_kpp_compute_enhanced_diff()
because that is what we intended.

-A.

Dr Alistair Adcroft (Alistair.Adcroft@noaa.gov)
Princeton University Tel: (609) 987-5073
NOAA/GFDL, 201 Forrestal Road, Princeton, NJ 08540

On Tue, Jun 24, 2014 at 4:44 PM, Michael Levy notifications@github.com
wrote:

This appears to be tied to issue #26
#26 and how cvmix_coeffs_kpp
calls enhanced diffusivity. I'm going to leave this ticket open in case it
turns out to be more complicated than that, but I think we're on our way to
fixing this.


Reply to this email directly or view it on GitHub
#35 (comment).

While the bigger issue of the shallow boundary layer hasn't been solved, we're not returning NaNs in the nonlocal term any more so I'm going to close this ticket.