[MITgcm-support] [EXTERNAL] Banding, Checkerboarding in KPP Viscosities

Martin Losch Martin.Losch at awi.de
Thu Apr 9 10:46:24 EDT 2020


Hi Senja,

I have stripped down your experiment to a 50x1x60 vertical slice and get the same noisy phenomena. With this setup I tested all sorts of things, but I could not find a solution that is useful. Here are some of my observations, I note them here more for reference than for anything else.

The noise goes away when all mixing due to shear and convective instabilities is turned off in data.kpp by setting all diffusivities to zero:
These are the default diffusivities
# diffusivity due to shear instability
#difm0   = 5.E-3,
#difs0   = 5.E-3,
#dift0   = 5.E-3,
# diffusivity due to convective instability
#difmcon = 0.1E0,
#difscon = 0.1E0,
#diftcon = 0.1E0,
If you do that, only the boundary layer dynamics are left and by themselves they do look stable to me. The shear instabilities are more critical than the convective instabilities, so a hack would be to reduce the difm/s/t0 by an order of magnitude. You’ll still get some noise, but it’s much less.

As far as I can see the vertical gradients of buoyancy (dbloc) is the main problem, but instabilities develop only in time. When you remove the boundary layer physics and only use the shear and convective mixing noisy patterns appear, but am not sure if this is an artefact of my tests.

Vertical smoothing (ALLOW_KPP_VERTICALLY_SMOOTH) as implemented does not help very much unless you use a large number of smoothing cycles “num_v_smooth_Rm” (it only smoothes the shear Richardson number, but even adding the smoothing dbloc in the code does not help much).
Simple vertical smoothing (with a simple 0.25+.5+0.25 filter) of dbloc right after it is computed (to suppress vertica grid scale) was most effective, but not a good permanent solution.

I turned of all advective and horziontal diffusion processes so that the domain becomes a series of column models, but even with this the model develops the grid scale noise in the vertical, so that I believe that all of these many horizontal smoothing options are just supressing the problem a little, but never solve it.

Instead there’s genuine instabilitiy problem in the KPP implementation that shows up at high vertical resolutions, with shorter time steps (I tried 5s) and larger vertical deltaZ, this instability doesn’t show it’s face, but I am sure it’s still there somehow.

Interesting: I moved the buoyancy dbloc on cell interface up: dbloc(i,j,k) = dbloc(i,j,k+1) and with this change, the noise goes away (but this is certainly incorrect). To me this indicates that there is an indexing problem in KPP. Variables at the k-interface in the MITgcm are computed between cell k and k-1, so k is the ‘upper’ interface. In KPP it is the ‘lower’ interface between cell k and k+1. The code carefully takes care of that (except for one mask, I think), but my little test seems to show, there may be a problem (or at least the problem is smoothed away by shifting dbloc by one k up).

Martin

> On 8. Apr 2020, at 20:46, Martin Losch <Martin.Losch at awi.de> wrote:
> 
> Senja,
> 
> I noticed this line in the default KPP_OPTIONS.h:
> #define KPP_SMOOTH_DBLOC
> 
> I turned it off and found much better solutions in the first phase of high viscosities, but then it deterioriates. See attached plot of a timeseries at grid point i=39,j=51. Top is your original code (with default KPP_OPTIONS.h), second is with KPP_SMOOTH_DBLOC undefined, and third with GGL90 instead of KPP.
> 
> I guess it’s pretty clear what to use (o: It’s particularly unclear where there’s large viscosities below the actively mixed layer come from, the same with the enhance viscosities below 20m.
> 
> These instabilities in KPP need a more efficient test setup, before I can look into this further. Maybe we can construct something from your setup.
> 
> Martin
> 
> <visc_timeseries.png>
> 
> 
>> On 8. Apr 2020, at 15:32, Martin Losch <Martin.Losch at awi.de> wrote:
>> 
>> Senja,
>> 
>> I reset the KPP_OPTIONS.h to the default version in pkg/kpp to see the full drama.
>> I can see that after about 16h of integration, the model becomes dynamically instable (more motion) and the described patterns appear, but they also disappear again when the forcing becomes weaker (right?)
>> 
>> The phases with the vertical grid scale noise in the viscosities is associated with interersting surface field patterns (e.g. temperature and KPPdbloc, which is gravity*drho/rho). In my opinion this has got to do something with the way KPP handles the surface forcing. On the other hand, your surface forcing is fairly smooth and I don’t see how that should lead to this noise. There are so many thresholds and if statements/min/max function in the kpp-code that I find it hard to trace down the source of these instabilities.
>> 
>> I have tried your configuration wih GGL90 instead of KPP. The surface forcing by wind is quite similar in that mixed layer model code, but the noise never appears. So if you don’t have to use KPP I would recommend to use GGL90 for your simulations.
>> 
>> Martin
>> 
>>> On 7. Apr 2020, at 21:40, Martin Losch <Martin.Losch at awi.de> wrote:
>>> 
>>> OK, got it to run, but how long does it take until these patterns appear?
>>> 
>>> I am not at all certain that this matters: I assume that salinity is zero all the time, but I would suggest either setting a diffusive advection scheme for salinity (saltAdvScheme = 33) or turn salinity off (saltStepping = .FALSE.). With the default advection scheme (2) and the tiny diffusivities, there may be unexpected results.
>>> 
>>> Martin
>>> 
>>>> On 7. Apr 2020, at 19:18, Senja Walberg <senja.w at gmail.com> wrote:
>>>> 
>>>> Thanks Martin for moving this back to the support board. 
>>>> 
>>>> I haven't looked at all the fluxes and will output those next to see. I also haven't played with the time step, but I've changed the vertical grid spacing (dz). I'm using a 15 s timestep, when dz=1m I don't get any banding or artifacts. I've tried dz=0.5m and dz=0.25m and the banding is gridscale for both of those cases. 
>>>> 
>>>> My case is small enough to share, I've attached it in a zip file. Just run 'genbins.py' to get all the binary files and do the usual steps compiling to set up my configuration.
>>>> 
>>>> Cheers,
>>>> Senja
>>>> <KPPIssueSetup.zip>_______________________________________________
>>>> MITgcm-support mailing list
>>>> MITgcm-support at mitgcm.org
>>>> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>>> 
>>> _______________________________________________
>>> MITgcm-support mailing list
>>> MITgcm-support at mitgcm.org
>>> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>> 
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support



More information about the MITgcm-support mailing list