<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Yu-Kun,
<div class=""><br class="">
</div>
<div class="">I suspect that your timestep violates the cfl stability criterion. You should check that deltaTtracer*velocity/grid_spacing is less than 1. Ideally you’d like it to be much less than 1.</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">Ed</div>
<div class=""><br class="">
<div class="">
<div style="color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><br class="Apple-interchange-newline">
<hr style="font-family: Tahoma; font-size: 13px;" class="">
<span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><b class="">Edward
Doddridge</b><br class="">
<i class="">Postdoctoral researcher</i></font></span></font></span></font></span></span></div>
<div style="color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><i class="">Earth,
Atmospheric and Planetary Sciences</i></font></span></font></span></font></span></span></div>
<div style="color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><i class="">Massachusetts
Institute of Technology</i></font></span></font></span></font></span></span></div>
<div style="color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<div style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal;" class="">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><i class=""><br class="">
</i></font></span></font></span></font></span></span></div>
<div style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal;" class="">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><a href="http://www.doddridge.me" class="">www.doddridge.me</a></font></span></span></div>
</div>
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 30 May 2019, at 09:48, 钱钰坤 <<a href="mailto:qianyk@mail3.sysu.edu.cn" class="">qianyk@mail3.sysu.edu.cn</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hi all,</div>
<div class=""><br class="">
</div>
<div class="">I am using a series of geostrophic velocity data (derived from AVISO sea surface height)</div>
<div class="">to advect a passive tracer in an offline mode. Following the paper by Abernathey and Marshall</div>
<div class="">(2013, JGR), first I made a nondivergent correction to the original geostrophic velocity data</div>
<div class="">through Helmholtz Decomposition. Then I used the nondivergent velocity to advect a tracer.</div>
<div class="">However, after a few timesteps the tracer field is unstable and generates very large values and</div>
<div class="">eventually contaminated the results.</div>
<div class=""><br class="">
</div>
<div class="">I think there are two things need to be verified.</div>
<div class=""><br class="">
</div>
<div class="">First, the correction is done correctly. Actually</div>
<div class="">I followed the guidance by Ryan Abernathey at:</div>
<div class=""> <a href="https://github.com/rabernat/mitgcm_2D_global/blob/master/notebooks/correction.ipynb" class="">https://github.com/rabernat/mitgcm_2D_global/blob/master/notebooks/correction.ipynb</a></div>
<div class="">I run the offline model first using original geostrophic velocity to dump the diagnostics of streamfunction</div>
<div class="">(psi) and velocity potential (phi). Then I use the xmitgcm utility to calculate the nondivergent velocity as:</div>
<div class="">
<div class=""> u_psi = -(numpy.roll(psi, -1, axis=-2) - psi) / dyG / drF</div>
<div class=""> v_psi = (numpy.roll(psi, -1, axis=-1) - psi) / dxG / drF</div>
</div>
<div class="">This code above should be modified somewhat if one uses the latest xmitgcm released a few days ago.</div>
<div class="">I did not do any mask since I think the MITgcm model will mask the velocity when run in offline mode (</div>
<div class="">I provided a bathymetry data to the model generated based on AVISO SSH land-sea mask).</div>
<div class=""><br class="">
</div>
<div class="">Second, the offline model parameters (delta-t related) are correctly set. Although I've read some emails</div>
<div class="">on this issue, I'm still not so sure how to set these parameters. The following are my choices:</div>
<div class=""> data: deltaTtracer = 86400,</div>
<div class=""> deltaTClock = 86400,</div>
<div class=""> data.off: deltaToffline = 3600, (smaller dt for accuracy)</div>
<div class=""> offlineForcingPeriod = 86400, (AVISO data is daily mean)</div>
<div class=""> offlineForcingCycle = 0, (no need to reuse the velocity)</div>
<div class="">When using the above params, the offline model asks for velocity data whose names are: u.0.data, u.24.data,</div>
<div class="">u.48.data... So I rename the velocity data into this convention.</div>
<div class=""><br class="">
</div>
<div class="">Now I am really confused why the tracer overflows after only 4-5 timesteps (days). Is there anything wrong</div>
<div class="">with the above two procedures?</div>
<div class=""><sign signid="0" class="">
<div style="color:#909090;font-family:Arial Narrow;font-size:12px" class=""><br class="">
<br class="">
------------------</div>
<div style="font-size: 14px; font-family: Verdana;" class="">
<div class=""><font size="2" class="">Best regards <br class="">
<br class="">
Yu-Kun Qian (钱钰坤) <br class="">
Center for Monsoon and Environment Research</font> </div>
<font size="2" class="">Department of Atmospheric Sciences<br class="">
School of Environmental Science and Engineering<font size="2" class=""> <br class="">
</font>Sun Yat-sen University <br class="">
No. 135 Xingang West Road, Haizhu District <br class="">
Guangzhou, 510275, P.R. China <br class="">
Tel; 020-84115227 <br class="">
Email: <a href="mailto:qianyk@mail2.sysu.edu.cn" class="">qianyk@mail3.sysu.edu.cn</a>
</font>
<div class=""><font size="2" class=""></font> </div>
</div>
</sign></div>
<div class=""> </div>
<div class=""><includetail class=""><!--<![endif]--></includetail></div>
_______________________________________________<br class="">
MITgcm-support mailing list<br class="">
<a href="mailto:MITgcm-support@mitgcm.org" class="">MITgcm-support@mitgcm.org</a><br class="">
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>