[MITgcm-support] Noise in vertical velocity field with ocean cooling/sea ice

Martin Losch Martin.Losch at awi.de
Wed Apr 20 09:10:51 EDT 2022


Hi Lily,

Thanks, that’s very useful. I am not surprised that the KPP_SMOOTH_REGULARISATION doesn’t do much, because just does things like replacing max(v,vmin) by sqrt(v**2+vmin**2) and similar. 

I think it is very nice that KPP_SCALE_SHEARMIXING has a large effect, because there is actually some physical reasoning behind the code that is included with this flag:
#ifdef KPP_SCALE_SHEARMIXING
C     reduce shear mixing when there is no shear (Polzin, 1996, JPO, 1409-1425)
C     imported from MOM5 code
            fRi   = fRi * shsq(i,ki)*shsq(i,ki)
     &           /(shsq(i,ki)*shsq(i,ki) + 1. _d -16)
#endif
Where fRi is (1-ratio**2)**3, so something that is likely to be strange because of the 5th power of ratio, which contains the Richardson number (N2/shear), which will go into the viscosity coefficient. If shear is small Ri will be large and everything will becomes difficult and noisy, so it’s a good idea to tape down this term for small shear.

KPP_DO_NOT_MATCH_DIFFUSIVITIES is a bit of a hack to avoid noisy interior mixing to be “transported” into the mixed layer, see comment in KPP_OPTIONS.h and references therein. It’s good that it does what it is supposed to do (reduce the noise), but it’s even better that something very similar can be achieved with the more physical flag KPP_SCALE_SHEARMIXING. I would also opt for using KPP_SCALE_SHEARMIXING over KPP_DO_NOT_MATCH_DIFFUSIVITIES, if possible.

Martin


> On 20. Apr 2022, at 14:36, Lily Greig <l.greig at pgr.reading.ac.uk> wrote:
> 
> 
> Hi Martin, 
> 
> I looked at turning on these flags one at a time. Attached is some snapshot comparisons of velocities and RHO, THETA, SALT at depth of 26 m, 1/4 way down the mixed layer. 
> 
> It seems that turning on only KPP_SCALE_SHEARMIXING or only KPP_DO_NOT_MATCH_DIFFUSIVITIES has a very similar impact (labelled 'defKPP_SCALE_SHEARMIXING/ def KPP_DO_NOT_MATCH_DIFFUSIVITIES') . Turning on KPP_SMOOTH_REGULARISATION makes very little difference compared to default (all 3 flags turned off is labelled 'Kpp default'). Turning on all 3 flags reduces noise the most (labelled 'All 3 flags ON').
> 
> May I ask why the reasons behind your hopes/fears?
> 
> Best wishes, 
> 
> Lily 
>   
> From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Lily Greig <l.greig at pgr.reading.ac.uk>
> Sent: 19 April 2022 16:07
> To: mitgcm-support at mitgcm.org <mitgcm-support at mitgcm.org>
> Subject: Re: [MITgcm-support] Noise in vertical velocity field with ocean cooling/sea ice
>  
> Hi Martin, 
> 
> I will look into this and get back to you. 
> 
> Best wishes, 
> 
> Lily
> From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Martin Losch <Martin.Losch at awi.de>
> Sent: 19 April 2022 15:18
> To: MITgcm Support <mitgcm-support at mitgcm.org>
> Subject: Re: [MITgcm-support] Noise in vertical velocity field with ocean cooling/sea ice
>  
> Thanks Lily,
> 
> Do you have a sense which of the three flags is most important? My hope is that it is KPP_SCALE_SHEARMIXING, but my fear is that it is KPP_DO_NOT_MATCH_DIFFUSIVITIES …
> 
> Martin
> 
>> On 19. Apr 2022, at 15:34, Lily Greig <l.greig at pgr.reading.ac.uk> wrote:
>> 
>> Hi Martin, 
>> 
>> Yes, sorry if I wasn't clear. So in the left-hand column of the image I attached, titled 'kpp regularisation', the 3 following flags were defined (the other flags in KPP_OPTIONS were left as default):
>> 
>> -KPP_DO_NOT_MATCH_DIFFUSIVITIES
>> -KPP_SMOOTH_REGULARISATION
>> -KPP_SCALE_SHEARMIXING
>> 
>> In the right-hand column all flags were set as default (so the only difference between the two runs is the above 3 flags defined/undefined).
>> 
>> Best wishes, 
>> 
>> Lily
>> 
>> 
>> From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Martin Losch <Martin.Losch at awi.de>
>> Sent: 19 April 2022 12:08
>> To: MITgcm Support <mitgcm-support at mitgcm.org>
>> Subject: Re: [MITgcm-support] Noise in vertical velocity field with ocean cooling/sea ice
>>  
>> Hi Lily,
>> 
>> That’s very interesting. Just out of interest, did you define all of the flags?
>> 
>> Martin
>> 
>>> On 19. Apr 2022, at 12:53, Lily Greig <l.greig at pgr.reading.ac.uk> wrote:
>>> 
>>> Hi Martin, 
>>> 
>>> An update on this which could be of interest. With the updated code and using the KPP regularisation you suggested below, there is noticeable smoothing of the noise in the flow fields of the simulation. I'm attaching 2D Y-Z snapshots of the flow fields, with (left) and without (right) the regularisation. It is a clean comparison so there are no other changes between the simulations other than these suggested regularisations (both simulations use viscosity vicA4Grid=0.01 as per your previous suggestion). 
>>> 
>>> The smoothing is most obvious in the Northern half of the domain, which is initially sea-ice covered (Southern half initially open ocean). Although there is also ice forming over time in the initially open ocean, the regularisation has less of an impact here. 
>>> 
>>> It was also noted that it seems that the appearance of noise is in general is related to the onset of sea ice formation. 
>>> 
>>> Best wishes, 
>>> 
>>> Lily
>>> From: Lily Greig <l.greig at pgr.reading.ac.uk>
>>> Sent: 10 March 2022 10:44
>>> To: mitgcm-support at mitgcm.org <mitgcm-support at mitgcm.org>
>>> Subject: Re: [MITgcm-support] Noise in vertical velocity field with ocean cooling/sea ice
>>>  
>>> Hi Martin, 
>>> 
>>> Indeed, the problem persists without KPP! 
>>> 
>>> Ah yes, my code is a couple of years old, so did not have these updates. Thanks. 
>>> 
>>> Best wishes, 
>>> 
>>> Lily 
>>> From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Martin Losch <Martin.Losch at awi.de>
>>> Sent: 08 March 2022 15:55
>>> To: MITgcm Support <mitgcm-support at mitgcm.org>
>>> Subject: Re: [MITgcm-support] Noise in vertical velocity field with ocean cooling/sea ice
>>>  
>>> Hi Lily,
>>> 
>>> viscA4Grid=0.5 is clearly too high to be useful.
>>> 
>>> Do you have these issues also without KPP?
>>> 
>>> Are you using more or less recent code? The KPP flags are all described in the pkg/kpp/KPP_OPTIONS.h file (in fact I just copy-pasted them from there into the email).
>>> 
>>> Martin
>>> 
>>> > On 8. Mar 2022, at 16:31, Lily Greig <l.greig at pgr.reading.ac.uk> wrote:
>>> > 
>>> > Hi Martin & all, 
>>> > 
>>> > Thanks very much for your help, I have tried your suggestions however am still unfortunately having the noise issues, so am just prying for any further thoughts. I forgot to mention in my original email, but I am using a 2D set-up here (Nx=1), although an analogous 3D set-up with eddies also has noise. 
>>> > 
>>> > Following your recommendations with viscA4Grid, what I found is a similar picture to my previous experiments, in that I had to increase the value of viscA4Grid a lot, from 0.01 up to around 0.5 in order for the noise in the vertical velocity field to reduce. At such high values of viscosity, the zonal jet is also damped an undesirable amount. 
>>> > 
>>> > I have tried your suggestions with viscC2leith+D which also didn't reduce the noise much. I also ran using non-hydrostatic dynamics, which made only a very small difference to the noise.
>>> > 
>>> > Also just to mention for the KPP options you described, I could not find a KPP_SCALE_SHEARMIXING flag anywhere in the code. 
>>> > 
>>> > If you did have any further recommendations, it would be great to hear. Thanks a lot. 
>>> > 
>>> > Best wishes, 
>>> > 
>>> > Lily 
>>> > From: Lily Greig <l.greig at pgr.reading.ac.uk>
>>> > Sent: 17 February 2022 18:02
>>> > To: mitgcm-support at mitgcm.org <mitgcm-support at mitgcm.org>
>>> > Subject: Re: [MITgcm-support] Noise in vertical velocity field with ocean cooling/sea ice
>>> >  
>>> > Thank you Martin, 
>>> > 
>>> > I will give this a try :) 
>>> > 
>>> > Best wishes, 
>>> > 
>>> > Lily 
>>> > 
>>> > From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Martin Losch <Martin.Losch at awi.de>
>>> > Sent: 17 February 2022 17:31
>>> > To: MITgcm Support <mitgcm-support at mitgcm.org>
>>> > Subject: Re: [MITgcm-support] Noise in vertical velocity field with ocean cooling/sea ice
>>> >  
>>> > Hi Lily,
>>> > 
>>> > hydrostatic simulations will always have noise issues in the vertical velocity (as the vertical velocity is the vertical integral of the horizontal velocity divergence, so any noise accumulates, and C-grids tend to have noisy horizontal fields), unless you have very smooth horizontal velocities.
>>> > 
>>> > I would use viscA4Grid to tune this noise away, also I would use a smaller viscAXGridMax of maybe 0.5 (1 is the limit; X=h,4). I wouldn’t use smag and leigth simultaneously, as the do the same thing, also the Smagorinsky parameterisation is for 3D isotropic turbulence, which you don’t have in your set up. 
>>> > I suggest to start with this:
>>> > 
>>> > # viscC4leith = 2,
>>> > #viscC4leithD = 2,
>>> >  viscA4Grid = 0.01,
>>> >  viscA4GridMax = 0.5,
>>> > # only necessary if you use harmonic viscosity
>>> >  viscAhGridMax = 0.5,
>>> > 
>>> > and vary viscA4Grid until you are happy. Alternatively I would try  viscC2leith+D in addition to constant backround (or you can use viscC2leith+D = 2 + viscAhMin = 0.01.)
>>> > 
>>> > A trick is to use non-hydrostatic dynamics (with very few cg3d iterations O(40) to not make too expensive), because that introduces horizontal viscosity for vertical velocity.
>>> > 
>>> > There are a few regularization in KPP, but in experience they don’t do much, but maybe worth a try:
>>> > 
>>> > # personally, I think this should be default, but it isn't
>>> > C o reduce shear mxing by shsq**2/(shsq**2+1e-16) according to
>>> > C   Polzin (1996), JPO, 1409-1425), so that there will be no shear mixing
>>> > C   with very small shear
>>> > #undef KPP_SCALE_SHEARMIXING
>>> > 
>>> > # this improves things sometimes at high resolution.
>>> > #undef KPP_DO_NOT_MATCH_DIFFUSIVITIES
>>> > #ifndef KPP_DO_NOT_MATCH_DIFFUSIVITIES
>>> > C only makes sense if the diffusitivies are matched
>>> > # undef KPP_DO_NOT_MATCH_DERIVATIVES
>>> > #endif /*  KPP_DO_NOT_MATCH_DIFFUSIVITIES */
>>> > 
>>> > C o Include/exclude smooth regularization at the cost of changed results (maybe useful for AD-simulations)
>>> > C   With this flag defined, some MAX(var,phepsi) are replaced by var+phepsi
>>> > #undef KPP_SMOOTH_REGULARISATION
>>> > 
>>> > 
>>> > Hope that helps,
>>> > 
>>> > Martin
>>> > 
>>> > > On 17. Feb 2022, at 18:06, Lily Greig <l.greig at pgr.reading.ac.uk> wrote:
>>> > > 
>>> > > Hi MITgcm community, 
>>> > > 
>>> > > I'm using MITgcm with set-up similar to Horvat et al. 2016 (75  by 75 km at 2 km resolution, zonally re-entrant channel, northern half sea ice covered, hydrostatic). The ocean is cooling everywhere, sea ice forming with thsice package. I am having some issues with grid scale noise and large values of the vertical velocity field. I have tried a few adjustments so far: I turned KPP smoothing options on, to no effect, and next I tried using different viscosities/tuning the viscosity constants using examples in the MLAdjust tutorial. Using modified Leith & Smagorinsky, noise reduction only happens in the model when I increase the viscosity constants by up to 2 orders of magnitude, but increasing them this much also dampens the dynamics, reducing magnitude of the zonal jet. 
>>> > > 
>>> > > For reference, I've attached an image with snapshots of zonal & vertical velocity fields, model day 105, for a range of viscosity constant values from 1.85 -> 250, all using modified Leith & Smagorinsky. The subplot titles e.g 'UVEL LS30' stand for velocity field + viscosities used (all Leith and Smag. here, or LS) + the value used for every viscosity constant. I've also attached an example data file to this email. Increasing the viscosity constants reduces the vertical velocity from ~ 4e-4 m/s to 1e-4 m/s, but also the zonal jet by ~ factor 2. 
>>> > > 
>>> > > I have also tried also using Leith & Smagorinsky individually, QGLeith, harmonic/biharmonic but all to little avail unfortunately. Any help would be much appreciated, if anyone has an idea of what could be the issue, or further adjustments to try.
>>> > > 
>>> > > Many thanks, 
>>> > > 
>>> > > Lily 
>>> > > <data><UVEL_WVEL_snap.png>_______________________________________________
>>> > > MITgcm-support mailing list
>>> > > MITgcm-support at mitgcm.org
>>> > > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-support&data=04%7C01%7Cl.greig%40pgr.reading.ac.uk%7Cf5323f8d024c443358eb08da011c250e%7C4ffa3bc4ecfc48c09080f5e43ff90e5f%7C0%7C0%7C637823517632184418%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vdk%2BHTXeEM5i9u%2Bmth6lM9ErK%2BZ9ph5nBVne7P5NkLs%3D&reserved=0
>>> > 
>>> > _______________________________________________
>>> > MITgcm-support mailing list
>>> > MITgcm-support at mitgcm.org
>>> > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-support&data=04%7C01%7Cl.greig%40pgr.reading.ac.uk%7Cf5323f8d024c443358eb08da011c250e%7C4ffa3bc4ecfc48c09080f5e43ff90e5f%7C0%7C0%7C637823517632184418%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vdk%2BHTXeEM5i9u%2Bmth6lM9ErK%2BZ9ph5nBVne7P5NkLs%3D&reserved=0
>>> 
>>> <UVW_comp.png>_______________________________________________
>>> 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
> 
> <UVWRTS_1dslice_kpp_comp.png>_______________________________________________
> 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