<div><font>Hi Huan,</font></div><div><font><br></font></div><div><sign signid="0"><div><font>I have done this before and details are recorded in this notebook:</font></div><div><font><br></font></div><div><font>https://github.com/miniufo/notebooks/blob/master/Budget%20in%20MITgcm%20Part%20I.ipynb<br></font><font><br>You may find some tips and pitfalls in this.  Hopefully it can help.<br></font><font><br></font><div style="color:#909090;font-family:Arial Narrow;font-size:12px"></div></div><div style="font-size:14px;font-family:Verdana;color:#000;" class="signRealArea">

<div> <font size="2">Best regards <br> <br>-----------------------------------------<br>Yu-Kun Qian (钱钰坤)</font><div style="font-family: Verdana;"><span style="font-size: small;">South China Sea Institute of Oceanology</span></div><font size="2" style="font-family: Verdana;">Sun Yat-sen University<br>Xingang West Road, Haizhu District<br>Guangzhou, P.R. China<br>Email: <u><font color="#0000ff">qianyukun@scsio.ac.cn</font></u>, <a href="mailto:qianyk@mail2.sysu.edu.cn">qianyk@mail3.sysu.edu.cn</a></font></div><div> <font size="2"> </font> </div>


</div></sign></div><div> </div><div><includetail><div> </div><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>发件人:</b> "郑欢"<huanzheng@stu.ouc.edu.cn>;</div><div><b>发送时间:</b> 2025年6月30日(星期一) 上午8:31</div><div><b>收件人:</b> "MITgcm-support"<mitgcm-support@mitgcm.org>; <wbr></div><div></div><div><b>主题:</b> [MITgcm-support] Heat budget Closure in MITgcm</div></div><div> </div><div style="position:relative;"><div id="tmpcontent_res"></div>
<style class="ke-style">
[list-style-type] {padding-left:20px;list-style-position:inside;}
[list-style-type] li {margin:0;}
[list-style-type] li:before, span.ke-list-item-matter {font-family:"sans serif",tahoma,verdana,helvetica;}
[list-style-type] li p,[list-style-type] li h1,[list-style-type] li h2,[list-style-type] li h3,[list-style-type] li h4,[list-style-type] li h5,[list-style-type] li div,[list-style-type] li blockquote{display:inline;word-break:break-all;}
[list-style-type] li table {display:inline-block;vertical-align:top;}
p{margin:0;}
td {word-break: break-word;}
.default-font-1751241523089{
font-size:14px;
}
</style><div class="default-font-1751241523089" dir="ltr"><p data-start="141" data-end="150">Dear all,</p><p data-start="152" data-end="462">I am using MITgcm to investigate heat transport in the Southern Ocean. However, I encountered a problem where the heat budget does not close in my model. To verify this issue, I ran the Southern Ocean re-entrant channel example, keeping all default settings except increasing <code data-start="428" data-end="440">nTimesteps</code> to simulate 30 years.</p><p data-start="464" data-end="743">In this case, both the GM/Redi package and partial cells are enabled. I used the diagnostics package to output the following variables: <code data-start="600" data-end="611">'TOTTEND'</code>, <code data-start="613" data-end="623">'gTForc'</code>, <code data-start="625" data-end="636">'ADVx_TH'</code>, <code data-start="638" data-end="649">'ADVy_TH'</code>, <code data-start="651" data-end="662">'ADVr_TH'</code>, <code data-start="664" data-end="675">'DFxE_TH'</code>, <code data-start="677" data-end="688">'DFyE_TH'</code>, <code data-start="690" data-end="701">'DFrI_TH'</code>, <code data-start="703" data-end="714">'DFrE_TH'</code>, <code data-start="716" data-end="725">'TFLUX'</code>, and <code data-start="731" data-end="742">'WTHMASS'</code>.</p><p data-start="745" data-end="945">I then read all the outputs into MATLAB and computed the heat budget terms. All terms were converted to units of °C/s for consistency.</p><p data-start="947" data-end="1181">However, I found a large mismatch: the magnitude of the advection term is around 10⁻⁶ °C/s, while <code data-start="1045" data-end="1056">'TOTTEND'</code> is around 10⁻¹¹ °C/s, resulting in a residual on the order of 10⁻⁵ °C/s. This indicates that the heat budget does not close.</p><p data-start="1183" data-end="1286">I have attached my MATLAB script used for the calculation, as well as the relevant MITgcm output files.</p><p data-start="1288" data-end="1439">I would greatly appreciate any suggestions or insights on how to resolve this heat budget issue. Thank you very much in advance for your time and help!</p><p data-start="1441" data-end="1468">Best regards,</p><p>Huan Zheng</p></div></div></div><!--<![endif]--></includetail></div>