<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:Menlo;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.xapple-converted-space
        {mso-style-name:xapple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NL" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Hi Martin,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Implementing your suggested change indeed removes the irregularities (to a large extent). Thank you for your insight and into this problem!!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Elian<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Van:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> MITgcm-support <mitgcm-support-bounces@mitgcm.org>
<b>Namens </b>Martin Losch<br>
<b>Verzonden:</b> woensdag 9 april 2025 14:50<br>
<b>Aan:</b> MITgcm Support <mitgcm-support@mitgcm.org><br>
<b>Onderwerp:</b> Re: [MITgcm-support] Irregular Velocity Fields Near Basin Boundaries in MITgcm<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td width="0" style="width:.3pt;background:#A6A6A6;padding:5.25pt 1.5pt 5.25pt 1.5pt">
</td>
<td width="100%" style="width:100.0%;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 11.25pt;aspect-ratio: revert !important;background:revert !important;block-size: revert !important;border:revert !important;bottom: revert !important;color:revert !important;color-scheme: revert !important;content-visibility: revert !important;cursor:revert !important;direction:revert !important;display:revert !important;font-size:revert !important;height:revert !important;hyphens: revert !important;letter-spacing:revert !important;line-height:revert !important;margin:revert !important;opacity: revert !important;order: revert !important;outline: revert !important;overflow:revert !important;padding:revert !important;position:revert !important;resize: revert !important;rotate: revert !important;scale: revert !important;tab-size: revert !important;table-layout:revert !important;text-align:revert !important;text-indent:revert !important;text-orientation: revert !important;text-overflow: revert !important;text-shadow:revert !important;text-transform:revert !important;text-wrap: revert !important;top:revert !important;transition: revert !important;user-select: revert !important;vertical-align:revert !important;visibility:revert !important;white-space:revert !important;width:revert !important;word-break:revert !important;word-spacing:revert !important;writing-mode:revert !important;zoom: revert !important">
<div>
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:#212121">U ontvangt niet vaak e-mail van
<a href="mailto:martin.losch@awi.de">martin.losch@awi.de</a>. <a href="https://aka.ms/LearnAboutSenderIdentification">
Ontdek waarom dit belangrijk is</a> <o:p></o:p></span></p>
</div>
</td>
<td width="75" style="width:56.25pt;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 3.75pt;aspect-ratio: revert !important;background:revert !important;block-size: revert !important;border:revert !important;bottom: revert !important;color:revert !important;color-scheme: revert !important;content-visibility: revert !important;cursor:revert !important;direction:revert !important;display:revert !important;font-size:revert !important;height:revert !important;hyphens: revert !important;letter-spacing:revert !important;line-height:revert !important;margin:revert !important;opacity: revert !important;order: revert !important;outline: revert !important;overflow:revert !important;padding:revert !important;position:revert !important;resize: revert !important;rotate: revert !important;scale: revert !important;tab-size: revert !important;table-layout:revert !important;text-align:revert !important;text-indent:revert !important;text-orientation: revert !important;text-overflow: revert !important;text-shadow:revert !important;text-transform:revert !important;text-wrap: revert !important;top:revert !important;transition: revert !important;user-select: revert !important;vertical-align:revert !important;visibility:revert !important;white-space:revert !important;width:revert !important;word-break:revert !important;word-spacing:revert !important;writing-mode:revert !important;zoom: revert !important;align: left !important">
</td>
</tr>
</tbody>
</table>
<div>
<div style="border:solid #9C6500 1.0pt;padding:2.0pt 2.0pt 2.0pt 2.0pt">
<p class="MsoNormal" style="line-height:12.0pt;background:#FFEB9C"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:#9C6500">CAUTION:</span><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"> 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.<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Elian, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">this is odd, as I had thought that the tutorial_baroclinic_gyre experiment was well tuned.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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):<o:p></o:p></p>
</div>
<div>
<p style="margin:0cm;font-variant-caps: normal;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-variant-emoji: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">yg=[<span style="color:#2FB41D">14</span>]<o:p></o:p></span></p>
<p style="margin:0cm;font-variant-caps: normal;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-variant-emoji: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<b><span style="font-size:8.5pt;font-family:"Menlo",serif;color:#2D961E">for</span></b><span style="font-size:8.5pt;font-family:"Menlo",serif;color:black"> k
</span><b><span style="font-size:8.5pt;font-family:"Menlo",serif;color:#C200FF">in</span></b><span style="font-size:8.5pt;font-family:"Menlo",serif;color:black">
</span><span style="font-size:8.5pt;font-family:"Menlo",serif;color:#2D961E">range</span><span style="font-size:8.5pt;font-family:"Menlo",serif;color:black">(</span><span style="font-size:8.5pt;font-family:"Menlo",serif;color:#2FB41D">62</span><span style="font-size:8.5pt;font-family:"Menlo",serif;color:black">):</span><span style="font-size:8.5pt;font-family:"Menlo",serif;color:#2FB41D"><o:p></o:p></span></p>
<p style="margin:0cm;font-variant-caps: normal;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-variant-emoji: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif;color:#2FB41D"> </span><span style="font-size:8.5pt;font-family:"Menlo",serif">    yg.append(yg[-<span style="color:#2FB41D">1</span>]+cos(yg[-<span style="color:#2FB41D">1</span>]*pi/<span style="color:#2FB41D">180</span>))<o:p></o:p></span></p>
<p style="margin:0cm;font-variant-caps: normal;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-variant-emoji: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif"><o:p> </o:p></span></p>
<p style="margin:0cm;font-variant-caps: normal;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-variant-emoji: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">delY = np.diff(np.asarray(yg))<o:p></o:p></span></p>
<p style="margin:0cm;font-variant-caps: normal;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-variant-emoji: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif"><o:p> </o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif"> delY=0.97029573, 0.96605988, 0.96156728, 0.95682412, 0.95183686,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.94661222, 0.94115716, 0.93547886, 0.92958469, 0.92348219,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.91717905, 0.9106831 , 0.90400227, 0.89714458, 0.89011811,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.88293099, 0.87559138, 0.86810744, 0.86048733, 0.85273916,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.844871  , 0.83689089, 0.82880674, 0.82062641, 0.81235764,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.80400804, 0.79558512, 0.78709623, 0.77854857, 0.7699492 ,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.76130498, 0.75262264, 0.7439087 , 0.73516951, 0.72641122,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.71763981, 0.70886103, 0.70008046, 0.69130348, 0.68253526,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.67378076, 0.66504477, 0.65633185, 0.64764638, 0.63899254,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.63037432, 0.6217955 , 0.61325969, 0.6047703 , 0.59633058,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.58794358, 0.57961218, 0.5713391 , 0.56312688, 0.55497789,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.54689438, 0.53887841, 0.53093191, 0.52305665, 0.51525428,<o:p></o:p></span></p>
<p style="margin:0cm;font-stretch: normal;font-size-adjust: none;font-kerning: auto;font-variant-alternates: normal;font-variant-ligatures: normal;font-variant-numeric: normal;font-variant-east-asian: normal;font-variant-position: normal;font-feature-settings: normal;font-optical-sizing: auto;font-variation-settings: normal">
<span style="font-size:8.5pt;font-family:"Menlo",serif">       0.50752631, 0.49987412,<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">At the same time, we should inspect this and maybe explain this in the tutorial description (@Jeff)?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Martin<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 9. Apr 2025, at 10:42, Vanderborght, E.Y.P. (Elian) <<a href="mailto:e.y.p.vanderborght@uu.nl">e.y.p.vanderborght@uu.nl</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Dear Martin and Jody,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">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 in<a href="https://mitgcm.readthedocs.io/en/latest/examples/baroclinic_gyre/baroclinic_gyre.html">https://mitgcm.readthedocs.io/en/latest/examples/baroclinic_gyre/baroclinic_gyre.html</a>).
 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.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Kind regards,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">ELian</span><o:p></o:p></p>
</div>
<div>
<div style="border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-color:currentcolor currentcolor;border-image: none">
<div>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Van:</span></b><span class="apple-converted-space"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">MITgcm-support
 <<a href="mailto:mitgcm-support-bounces@mitgcm.org">mitgcm-support-bounces@mitgcm.org</a>><span class="apple-converted-space"> </span><b>Namens<span class="apple-converted-space"> </span></b>Jody Klymak<br>
<b>Verzonden:</b><span class="apple-converted-space"> </span>dinsdag 8 april 2025 15:53<br>
<b>Aan:</b><span class="apple-converted-space"> </span><a href="mailto:mitgcm-support@mitgcm.org">mitgcm-support@mitgcm.org</a><br>
<b>Onderwerp:</b><span class="apple-converted-space"> </span>Re: [MITgcm-support] Irregular Velocity Fields Near Basin Boundaries in MITgcm</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td width="0" style="width:.3pt;background:#A6A6A6;padding:5.25pt 1.5pt 5.25pt 1.5pt">
</td>
<td width="100%" style="width:100.0%;padding:0cm 0cm 0cm 0cm;aspect-ratio: revert !important;background:revert !important;block-size: revert !important;border:revert !important;bottom: revert !important;color:revert !important;color-scheme: revert !important;content-visibility: revert !important;cursor:revert !important;direction:revert !important;display:revert !important;font-size:revert !important;height:revert !important;hyphens: revert !important;letter-spacing:revert !important;line-height:revert !important;margin:revert !important;opacity: revert !important;order: revert !important;outline: revert !important;overflow:revert !important;padding:revert !important;position:revert !important;resize: revert !important;rotate: revert !important;scale: revert !important;tab-size: revert !important;table-layout:revert !important;text-align:revert !important;text-indent:revert !important;text-orientation: revert !important;text-overflow: revert !important;text-shadow:revert !important;text-transform:revert !important;text-wrap: revert !important;top:revert !important;transition: revert !important;vertical-align:revert !important;visibility:revert !important;white-space:revert !important;width:revert !important;word-break:revert !important;word-spacing:revert !important;writing-mode:revert !important;zoom: revert !important">
<div>
<div>
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:#212121">U ontvangt niet vaak e-mail van<span class="apple-converted-space"> </span><a href="mailto:jklymak@uvic.ca">jklymak@uvic.ca</a>.<span class="apple-converted-space"> </span><a href="https://aka.ms/LearnAboutSenderIdentification">Ontdek
 waarom dit belangrijk is</a></span><o:p></o:p></p>
</div>
</div>
</td>
<td width="75" style="width:56.25pt;padding:0cm 0cm 0cm 0cm;aspect-ratio: revert !important;background:revert !important;block-size: revert !important;border:revert !important;bottom: revert !important;color:revert !important;color-scheme: revert !important;content-visibility: revert !important;cursor:revert !important;direction:revert !important;display:revert !important;font-size:revert !important;height:revert !important;hyphens: revert !important;letter-spacing:revert !important;line-height:revert !important;margin:revert !important;opacity: revert !important;order: revert !important;outline: revert !important;overflow:revert !important;padding:revert !important;position:revert !important;resize: revert !important;rotate: revert !important;scale: revert !important;tab-size: revert !important;table-layout:revert !important;text-align:revert !important;text-indent:revert !important;text-orientation: revert !important;text-overflow: revert !important;text-shadow:revert !important;text-transform:revert !important;text-wrap: revert !important;top:revert !important;transition: revert !important;vertical-align:revert !important;visibility:revert !important;white-space:revert !important;width:revert !important;word-break:revert !important;word-spacing:revert !important;writing-mode:revert !important;zoom: revert !important">
</td>
</tr>
</tbody>
</table>
<div>
<div style="border:solid #9C6500 1.0pt;padding:2.0pt 2.0pt 2.0pt 2.0pt">
<div>
<p class="MsoNormal" style="line-height:12.0pt;background:#FFEB9C"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:#9C6500">CAUTION:</span><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"> </span></span><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">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.</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Good advice from Martin<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">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.  <o:p></o:p></p>
</div>
</div>
</div>
<div id="ms-outlook-mobile-body-separator-line">
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div id="ms-outlook-mobile-signature">
<div>
<p class="MsoNormal">Get<span class="apple-converted-space"> </span><a href="https://aka.ms/o0ukef">Outlook for iOS</a><o:p></o:p></p>
</div>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="1" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<div>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span class="apple-converted-space"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">MITgcm-support
 <<a href="mailto:mitgcm-support-bounces@mitgcm.org">mitgcm-support-bounces@mitgcm.org</a>> on behalf of Martin Losch <<a href="mailto:Martin.Losch@awi.de">Martin.Losch@awi.de</a>><br>
<b>Sent:</b><span class="apple-converted-space"> </span>Tuesday, April 8, 2025 2:57:53 AM<br>
<b>To:</b><span class="apple-converted-space"> </span>MITgcm Support <<a href="mailto:mitgcm-support@mitgcm.org">mitgcm-support@mitgcm.org</a>><br>
<b>Subject:</b><span class="apple-converted-space"> </span>Re: [MITgcm-support] Irregular Velocity Fields Near Basin Boundaries in MITgcm</span><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal">Hi again,<span class="apple-converted-space"> </span><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">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?)<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">Martin<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">On 7. Apr 2025, at 19:14, Vanderborght, E.Y.P. (Elian) <<a href="mailto:e.y.p.vanderborght@uu.nl">e.y.p.vanderborght@uu.nl</a>> wrote:<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">Dear Martin,<br>
<br>
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.<br>
<br>
Any further ideas are appreciated!<br>
<br>
Best regards,<br>
Elian<br>
-----Oorspronkelijk bericht-----<br>
Van: MITgcm-support <</span><a href="mailto:mitgcm-support-bounces@mitgcm.org"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">mitgcm-support-bounces@mitgcm.org</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">> Namens
 Martin Losch<br>
Verzonden: vrijdag 4 april 2025 8:12<br>
Aan: MITgcm Support <</span><a href="mailto:mitgcm-support@mitgcm.org"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">mitgcm-support@mitgcm.org</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">><br>
Onderwerp: Re: [MITgcm-support] Irregular Velocity Fields Near Basin Boundaries in MITgcm<br>
<br>
[U ontvangt vaak geen e-mail van<span class="xapple-converted-space"> </span></span><a href="mailto:martin.losch@awi.de"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">martin.losch@awi.de</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">.
 Informatie over waarom dit belangrijk is op<span class="xapple-converted-space"> </span></span><a href="https://aka.ms/LearnAboutSenderIdentification%5d"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">https://aka.ms/LearnAboutSenderIdentification]</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
<br>
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.<br>
<br>
<br>
Hi Elian,<br>
<br>
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)<br>
<br>
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.<br>
<br>
Did you try synchronous time stepping (i.e. only use deltaT, but not deltaTtracer/Clock, and what’s missing is deltaTFreeSurf)?<br>
<br>
Is the striping only in zonal direction?<br>
<br>
unrelated: globalFiles does not always work, is not necessary here, useSingleCpuIO is enough.<br>
<br>
Martin<br>
<br>
<br>
<br>
</span><o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">On 3. Apr 2025, at 21:18, Vanderborght, E.Y.P. (Elian) <<a href="mailto:e.y.p.vanderborght@uu.nl">e.y.p.vanderborght@uu.nl</a>> wrote:<br>
<br>
Hi Jody,<br>
Thanks for the reply. The tracer field look fine, I also checked the convection adjustment index and there are no irregularities found here.<br>
Best regards,<br>
Elian<br>
Van: MITgcm-support <<a href="mailto:mitgcm-support-bounces@mitgcm.org">mitgcm-support-bounces@mitgcm.org</a>> Namens Jody<br>
Klymak<br>
Verzonden: donderdag 3 april 2025 20:41<br>
Aan:<span class="apple-converted-space"> </span><a href="mailto:mitgcm-support@mitgcm.org">mitgcm-support@mitgcm.org</a><br>
Onderwerp: Re: [MITgcm-support] Irregular Velocity Fields Near Basin<br>
Boundaries in MITgcm  U ontvangt niet vaak e-mail van<span class="apple-converted-space"> </span><a href="mailto:jklymak@uvic.ca">jklymak@uvic.ca</a>.<br>
Ontdek waarom dit belangrijk is<br>
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.<br>
Hi Elian,<br>
I would look at your tracer fields.  Is that maybe just (poorly resolved) convection?<br>
Cheers,   Jody<br>
From: MITgcm-support <<a href="mailto:mitgcm-support-bounces@mitgcm.org">mitgcm-support-bounces@mitgcm.org</a>> on behalf of<br>
"Vanderborght, E.Y.P. (Elian)" <<a href="mailto:e.y.p.vanderborght@uu.nl">e.y.p.vanderborght@uu.nl</a>><br>
Reply-To: "<a href="mailto:mitgcm-support@mitgcm.org">mitgcm-support@mitgcm.org</a>" <<a href="mailto:MITgcm-support@mitgcm.org">MITgcm-support@mitgcm.org</a>><br>
Date: Thursday, April 3, 2025 at 8:25 AM<br>
To: MITgcm Support <<a href="mailto:MITgcm-support@mitgcm.org">MITgcm-support@mitgcm.org</a>><br>
Subject: [MITgcm-support] Irregular Velocity Fields Near Basin<br>
Boundaries in MITgcm  You don't often get email from<br>
<a href="mailto:e.y.p.vanderborght@uu.nl">e.y.p.vanderborght@uu.nl</a>. Learn why this is important Dear MITgcm<br>
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).<br>
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:<br>
<br>
   • Decreasing time-step,<br>
   • Using different advection schemes,<br>
   • Increasing horizontal diffusion,<br>
   • Increasing vertical viscosity.<br>
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.<br>
Any help would be greatly appreciated.<br>
Best regards,<br>
Elian<br>
_______________________________________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org">MITgcm-support@mitgcm.org</a><br>
<a href="http://mailm/">http://mailm/</a><br>
<a href="http://an.mitgcm.org/">an.mitgcm.org</a>%2Fmailman%2Flistinfo%2Fmitgcm-support&data=05%7C02%7Ce.y<br>
.p.vanderborght%<a href="http://40uu.nl/">40uu.nl</a>%7Ce0d45c7644744079e0be08dd733faf50%7Cd72758a0a<br>
4464e0fa0aa4bf95a4a10e7%7C0%7C0%7C638793439556237863%7CUnknown%7CTWFpb<br>
GZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkF<br>
OIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=AL4JLgPcbLRGF54MU5Z6m<br>
zdGh9OjhJQ0MkmzJkocVd4%3D&reserved=0</span><o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
<br>
_______________________________________________<br>
MITgcm-support mailing list<br>
</span><a href="mailto:MITgcm-support@mitgcm.org"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">MITgcm-support@mitgcm.org</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
</span><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
_______________________________________________<br>
MITgcm-support mailing list<br>
</span><a href="mailto:MITgcm-support@mitgcm.org"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">MITgcm-support@mitgcm.org</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
</span><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</span></a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><UVEL.png><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">_______________________________________________<br>
MITgcm-support mailing list<br>
</span><a href="mailto:MITgcm-support@mitgcm.org"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">MITgcm-support@mitgcm.org</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
</span><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</span></a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>