[MITgcm-support] Irregular Velocity Fields Near Basin Boundaries in MITgcm
Jean-Michel Campin
jmc at mit.edu
Sat Apr 12 16:21:42 EDT 2025
Hi Elian,
I run the "tutorial_baroclinic_gyre" for 10.yr, only with original 1 x 1 degree
horizontal resolution, and I found that using "Jamar and Ozer" Coriolis option
(with default Flux-Form momentum, selectCoriScheme=1 or =3 ) does improve the
noise problem. It's still noisy but less and now confined to western-boundary
side (and easier to relates to Munk boundary layer issue).
>From there, I did a other run with higher horizontal viscosity (viscAh=20.e+3 instead
of 5.e+3 before) and it's better but still some noise in North-western side.
I am attaching 3 plots of uVel after 10.yr, first (tutor, r02) with tutorial params,
second (Jamar, r13) with selectCoriScheme=3, and third one (viscH, r16) with
selectCoriScheme=3 and viscAh=20.e+3.
I also tried to use "cosPower" but did not work well, not clear why, may be
it's also applies to Temperature diffusivity.
Cheers,
Jean-Michel
On Thu, Apr 10, 2025 at 05:37:04PM +0000, Vanderborght, E.Y.P. (Elian) wrote:
> Hi Martin,
>
> Implementing your suggested change indeed removes the irregularities (to a large extent). Thank you for your insight and into this problem!!
>
> Regards,
> Elian
> Van: MITgcm-support <mitgcm-support-bounces at mitgcm.org> Namens Martin Losch
> Verzonden: woensdag 9 april 2025 14:50
> Aan: MITgcm Support <mitgcm-support at mitgcm.org>
> Onderwerp: Re: [MITgcm-support] Irregular Velocity Fields Near Basin Boundaries in MITgcm
>
> U ontvangt niet vaak e-mail van martin.losch at awi.de<mailto:martin.losch at awi.de>. Ontdek waarom dit belangrijk is<https://aka.ms/LearnAboutSenderIdentification>
> CAUTION: This email originated from outside of Utrecht University. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> Hi Elian,
>
> this is odd, as I had thought that the tutorial_baroclinic_gyre experiment was well tuned.
>
> I had a look at the verification experiment and it looks like there are unresolved gravity waves emerging from the boundaries that fill the domain: Even after turning off momentum and tracer advection, these features remain.
>
> I tried using very large horizontal viscosity (viscAhGrid = 0.1 or viscA4Grid = 0.1) and it didn???t go away until (and this is the most suprising part) I modified the grid spacing. As I said before, the acutal dx in meters in spherical grids is really the prescribed delta in degrees (here 1) times cos(lat), this means that the grid cells are not nearly quadratic in higher latitudes (here the grid spans from 14 to 76degN). I changed the delY to include the cos factor like this (python):
>
> yg=[14]
>
> for k in range(62):
>
> yg.append(yg[-1]+cos(yg[-1]*pi/180))
>
>
>
> delY = np.diff(np.asarray(yg))
>
>
>
> delY=0.97029573, 0.96605988, 0.96156728, 0.95682412, 0.95183686,
>
> 0.94661222, 0.94115716, 0.93547886, 0.92958469, 0.92348219,
>
> 0.91717905, 0.9106831 , 0.90400227, 0.89714458, 0.89011811,
>
> 0.88293099, 0.87559138, 0.86810744, 0.86048733, 0.85273916,
>
> 0.844871 , 0.83689089, 0.82880674, 0.82062641, 0.81235764,
>
> 0.80400804, 0.79558512, 0.78709623, 0.77854857, 0.7699492 ,
>
> 0.76130498, 0.75262264, 0.7439087 , 0.73516951, 0.72641122,
>
> 0.71763981, 0.70886103, 0.70008046, 0.69130348, 0.68253526,
>
> 0.67378076, 0.66504477, 0.65633185, 0.64764638, 0.63899254,
>
> 0.63037432, 0.6217955 , 0.61325969, 0.6047703 , 0.59633058,
>
> 0.58794358, 0.57961218, 0.5713391 , 0.56312688, 0.55497789,
>
> 0.54689438, 0.53887841, 0.53093191, 0.52305665, 0.51525428,
>
> 0.50752631, 0.49987412,
>
> And reran with large viscosity (viscA4Grid = 0.1 or viscAhGrid) and the noise goes away (except at the boundary itself). Maybe that???s a way forward for you. Note, that I ran this only for 100 days.
>
> At the same time, we should inspect this and maybe explain this in the tutorial description (@Jeff)?
>
> Martin
>
>
> On 9. Apr 2025, at 10:42, Vanderborght, E.Y.P. (Elian) <e.y.p.vanderborght at uu.nl<mailto:e.y.p.vanderborght at uu.nl>> wrote:
>
>
> Dear Martin and Jody,
>
> Thank you for your suggestions and help. I have simplified the problem, removing practically everything and adding all processes step by step. The moment I obtain a non-zero flow field, the irregularities appear. I realized that this may just be an error in my source code, so I reinstalled the MITgcm and tried running again. Sadly, the error persisted. As a check I ran the baroclinic ocean gyre tutorial (outlined inhttps://mitgcm.readthedocs.io/en/latest/examples/baroclinic_gyre/baroclinic_gyre.html). While I do obtain similar results as outlined by the figures 4, a closer look at the velocity field reveals that they are again irregular (see attached figure)??? At this point the only thing I can think of is that something goes wrong during compilation or the post-processing. But I am curious for your suggestions.
>
> Kind regards,
> ELian
> Van: MITgcm-support <mitgcm-support-bounces at mitgcm.org<mailto:mitgcm-support-bounces at mitgcm.org>> Namens Jody Klymak
> Verzonden: dinsdag 8 april 2025 15:53
> Aan: mitgcm-support at mitgcm.org<mailto:mitgcm-support at mitgcm.org>
> Onderwerp: Re: [MITgcm-support] Irregular Velocity Fields Near Basin Boundaries in MITgcm
>
> U ontvangt niet vaak e-mail van jklymak at uvic.ca<mailto:jklymak at uvic.ca>. Ontdek waarom dit belangrijk is<https://aka.ms/LearnAboutSenderIdentification>
> CAUTION: This email originated from outside of Utrecht University. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> Good advice from Martin
>
> Also check that your forcing fields are the correct order. I once had wind forcing transposed so it varied in x direction instead of y and that definitely gave some strange results.
>
> Get Outlook for iOS<https://aka.ms/o0ukef>
> ________________________________
> From: MITgcm-support <mitgcm-support-bounces at mitgcm.org<mailto:mitgcm-support-bounces at mitgcm.org>> on behalf of Martin Losch <Martin.Losch at awi.de<mailto:Martin.Losch at awi.de>>
> Sent: Tuesday, April 8, 2025 2:57:53 AM
> To: MITgcm Support <mitgcm-support at mitgcm.org<mailto:mitgcm-support at mitgcm.org>>
> Subject: Re: [MITgcm-support] Irregular Velocity Fields Near Basin Boundaries in MITgcm
>
> Hi again,
>
> my approach in these kind of problems: Try to remove everything, forcing, intital conditions, etc. and simplify the problem as much as possible (remove convection, advection of tracer, of momentum, etc.) and see if the problem persists (shouldn???t) and then add them back one by one.
>
> You problem is simple enough that it should not have these issues, so I can only guess that it has to do with forcing or initial fields (unless you modified the code anywhere, what does "git diff??? say? what???s in your code directory?)
>
> Martin
>
>
>
> On 7. Apr 2025, at 19:14, Vanderborght, E.Y.P. (Elian) <e.y.p.vanderborght at uu.nl<mailto:e.y.p.vanderborght at uu.nl>> wrote:
>
> Dear Martin,
>
> Thank you very much for your response and suggestions. I???ve implemented all the proposed changes. Unfortunately, the output still shows irregularities near the northern boundary, even after significantly increasing viscAhGrid. Switching to synchronous time stepping also did not resolve the issue. The striping persists across all three components of the velocity field.
>
> Any further ideas are appreciated!
>
> Best regards,
> Elian
> -----Oorspronkelijk bericht-----
> Van: MITgcm-support <mitgcm-support-bounces at mitgcm.org<mailto:mitgcm-support-bounces at mitgcm.org>> Namens Martin Losch
> Verzonden: vrijdag 4 april 2025 8:12
> Aan: MITgcm Support <mitgcm-support at mitgcm.org<mailto:mitgcm-support at mitgcm.org>>
> Onderwerp: Re: [MITgcm-support] Irregular Velocity Fields Near Basin Boundaries in MITgcm
>
> [U ontvangt vaak geen e-mail van martin.losch at awi.de<mailto:martin.losch at awi.de>. Informatie over waarom dit belangrijk is op https://aka.ms/LearnAboutSenderIdentification]<https://aka.ms/LearnAboutSenderIdentification%5d>
>
> CAUTION: This email originated from outside of Utrecht University. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> Hi Elian,
>
> just a hunch, but your domain stretches from 3degN to 67degN, where the zonal (dx) spacing will have decreased from 1*cos(3deg) ~100km to 1*cos(64deg)~50km, the dy spacing will always be ~111km, so you???ll have non-square grid cells. At 1deg resolution it shouldn???t matter that much, but this could be a problem for the cfl-number, especially the one for viscosity. I???d try to use viscAhGrid instead of viscAh (see mom_common/mom_calc_visc.F or the corresponding part in the documentation), instead of viscAh=2e4, you could use viscAhGrid=0.0065, if I got it right. The vertical velocity is just a consequence of the noise in the horizontal velocities (as it is computed from the divergence of the horizontal velocities)
>
> I would turn off the CD-scheme (this may increase the noise, but a smoothing method may mask problems that you want to see for debugging). In general, I usually use viscA4Grid ~ 0.01 instead.
>
> Did you try synchronous time stepping (i.e. only use deltaT, but not deltaTtracer/Clock, and what???s missing is deltaTFreeSurf)?
>
> Is the striping only in zonal direction?
>
> unrelated: globalFiles does not always work, is not necessary here, useSingleCpuIO is enough.
>
> Martin
>
>
>
> On 3. Apr 2025, at 21:18, Vanderborght, E.Y.P. (Elian) <e.y.p.vanderborght at uu.nl<mailto:e.y.p.vanderborght at uu.nl>> wrote:
>
> Hi Jody,
> Thanks for the reply. The tracer field look fine, I also checked the convection adjustment index and there are no irregularities found here.
> Best regards,
> Elian
> Van: MITgcm-support <mitgcm-support-bounces at mitgcm.org<mailto:mitgcm-support-bounces at mitgcm.org>> Namens Jody
> Klymak
> Verzonden: donderdag 3 april 2025 20:41
> Aan: mitgcm-support at mitgcm.org<mailto:mitgcm-support at mitgcm.org>
> Onderwerp: Re: [MITgcm-support] Irregular Velocity Fields Near Basin
> Boundaries in MITgcm U ontvangt niet vaak e-mail van jklymak at uvic.ca<mailto:jklymak at uvic.ca>.
> Ontdek waarom dit belangrijk is
> CAUTION: This email originated from outside of Utrecht University. Do not click links or open attachments unless you recognize the sender and know the content is safe.
> Hi Elian,
> I would look at your tracer fields. Is that maybe just (poorly resolved) convection?
> Cheers, Jody
> From: MITgcm-support <mitgcm-support-bounces at mitgcm.org<mailto:mitgcm-support-bounces at mitgcm.org>> on behalf of
> "Vanderborght, E.Y.P. (Elian)" <e.y.p.vanderborght at uu.nl<mailto:e.y.p.vanderborght at uu.nl>>
> Reply-To: "mitgcm-support at mitgcm.org<mailto:mitgcm-support at mitgcm.org>" <MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>>
> Date: Thursday, April 3, 2025 at 8:25???AM
> To: MITgcm Support <MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>>
> Subject: [MITgcm-support] Irregular Velocity Fields Near Basin
> Boundaries in MITgcm You don't often get email from
> e.y.p.vanderborght at uu.nl<mailto:e.y.p.vanderborght at uu.nl>. Learn why this is important Dear MITgcm
> community, I am running MITgcm in a rectangular basin with a single-hemisphere setup. However, I am encountering irregularities in both vertical and horizontal velocity fields near the basin boundaries (see attached figure).
> Initially, I suspected insufficient horizontal viscosity. While increasing it to unrealistically high values reduced the issue, it did not resolve it entirely. I have also tested the following:
>
> ??? Decreasing time-step,
> ??? Using different advection schemes,
> ??? Increasing horizontal diffusion,
> ??? Increasing vertical viscosity.
> None of these approaches have fully addressed the problem. I have also reviewed studies using similar setups, but they do not report encountering this issue. Does anyone have insights into what might be causing this or suggestions for a fix? I have attached my data file and SIZE.h for reference.
> Any help would be greatly appreciated.
> Best regards,
> Elian
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
> http://mailm/
> an.mitgcm.org<http://an.mitgcm.org/>%2Fmailman%2Flistinfo%2Fmitgcm-support&data=05%7C02%7Ce.y
> .p.vanderborght%40uu.nl<http://40uu.nl/>%7Ce0d45c7644744079e0be08dd733faf50%7Cd72758a0a
> 4464e0fa0aa4bf95a4a10e7%7C0%7C0%7C638793439556237863%7CUnknown%7CTWFpb
> GZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkF
> OIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=AL4JLgPcbLRGF54MU5Z6m
> zdGh9OjhJQ0MkmzJkocVd4%3D&reserved=0
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>
> <UVEL.png>_______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org<mailto: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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uVel_10y_tutor.jpg
Type: image/jpeg
Size: 426669 bytes
Desc: not available
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20250412/9d97e2de/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uVel_10y_Jamar.jpg
Type: image/jpeg
Size: 352826 bytes
Desc: not available
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20250412/9d97e2de/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uVel_10y_viscH.jpg
Type: image/jpeg
Size: 334401 bytes
Desc: not available
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20250412/9d97e2de/attachment-0005.jpg>
More information about the MITgcm-support
mailing list