<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Jonathan,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you very much for your help! I am now able to close the budget.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Wenrui</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> MITgcm-support <mitgcm-support-bounces@mitgcm.org> on behalf of Jonathan Lauderdale <jml1@mit.edu><br>
<b>Sent:</b> Wednesday, March 13, 2024 10:36 AM<br>
<b>To:</b> mitgcm-support@mitgcm.org <mitgcm-support@mitgcm.org><br>
<b>Subject:</b> Re: [MITgcm-support] Closing DIC budget</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<p><strong><br>
</strong><strong><span style="background:red; color:white; font-family:"Times New Roman",serif; font-size:12pt">      External Email - Use Caution      </span></strong></p>
<p><strong><span style="background:red; color:white; font-family:"Times New Roman",serif; font-size:12pt"><br>
</span></strong></p>
<p><strong><span style="background:red; color:white; font-family:"Times New Roman",serif; font-size:12pt"><br>
</span></strong></p>
<div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Hi Wenrui,
<div class=""><br class="">
</div>
<div class="">I have a DIC budget calculation in <a href="https://nbviewer.org/github/seamanticscience/Lauderdale_etal_2016_GBC/blob/master/CO2_Flux_Drivers_Online.ipynb" originalsrc="https://nbviewer.org/github/seamanticscience/Lauderdale_etal_2016_GBC/blob/master/CO2_Flux_Drivers_Online.ipynb" shash="EcxB3qXJw7S/ox5J9XdvALmEegot717MG5o+mNTFxZa8Z5wwvejltv6FYjbRWx0rzjULgPCqKqBGGsOzVpp9jIIg1g3dGmQVWXxrvOvxjKpPRw1AueITs0wJwS/1t1bJz9wVC1Yh87Zj841jvt136yu7yPkxkdO52TZH0ESWmEo=" class="">Jupyter
 Notebook format</a>. My 3° configuration differs from the tutorial slightly (I used KPP mixing, the virtual flux, and rigid lid), but it should give you something to compare to. </div>
<div class=""><br class="">
</div>
<div class="">You can see that the biological tendency is more than just DICBIOA, which only represents
<b class="">uptake of phosphate</b> due to net biological production, and DICCARB, which is net change in carbon due to calcite production/remin:</div>
<div class=""><br class="">
</div>
<div class="">
<blockquote type="cite" class=""># Calculate biological activity terms (mol/m2/s)<br class="">
dic_bio_flux  = (Rcp*(-dicdiag.DICBIOA+dicdiag.DICPFLUX+dicdiag.DICRDOP)*grid.drF).sel(ZC=slice(0,-kave)).sum("ZC")*grid.cmask.isel(ZC=0)<br class="">
dic_carb_flux = ((dicdiag.DICCARB)*grid.drF).sel(ZC=slice(0,-kave)).sum("ZC")*grid.cmask.isel(ZC=0)<br class="">
</blockquote>
</div>
<div class=""><br class="">
</div>
<div class="">See also the code for <a href="https://github.com/MITgcm/MITgcm/blob/7456fbd729aef084d56996e0e389c63422447ab9/pkg/dic/dic_biotic_forcing.F#L276" originalsrc="https://github.com/MITgcm/MITgcm/blob/7456fbd729aef084d56996e0e389c63422447ab9/pkg/dic/dic_biotic_forcing.F#L276" shash="B4W6ulXALEWngu2Axi2fjg3XZEdUJGx/VVCWOJwLWlMJhziBRw5O4uReuKZ3AlkiKuG2VXAAdph/QNX75HNPZ9+zUyiIrejMANHbNw2Aq+Q3NyvY5w4KEb6NYkT24pfFTQd9gst11szTCUorrFRgEy7dcoZpgnrz21YFQBWfsYs=" class="">S/R
 dic_biotic_forcing.F</a>.</div>
<div class=""><br class="">
</div>
<div class="">So, first, you need to multiply DICBIOA by the Redfield ratio (R_cp=117), which will get you two orders of magnitude. Then, you may need to include the additional diagnostics for DICPFLUX, which is the remineralization of sinking particulate organic
 phosphate, and DICRDOP, which is the remineralization of dissolved organic phosphate, again multiplied by R_cp. </div>
<div class=""><br class="">
</div>
<div class="">You might need to modify the code to get all the diagnostics you need: <span class="" style="color:rgb(0,0,0)">PFLUX should appear in your dic_tave file, but </span><font color="#000000" class=""><span class="" style="">doesn’t have a diagnostic
 package output, </span></font><span class="" style="color:rgb(0,0,0)">DICRDOP might appear as the g</span><font color="#000000" class="">chem tendency for tracer 4? L</font>et me know if you need further help with this.</div>
<div class=""><br class="">
</div>
<div class="">DICTFLX is probably the right diagnostic for CO2 fluxes in your case, but you might consider comparing DICTFLX and DICCFLX</div>
<div class=""><br class="">
</div>
<div class="">If you use r* coordinates, then you have to take into account the changing volume of the upper cell (see the <a href="https://ecco-v4-python-tutorial.readthedocs.io/ECCO_v4_Salt_and_salinity_budget.html" originalsrc="https://ecco-v4-python-tutorial.readthedocs.io/ECCO_v4_Salt_and_salinity_budget.html" shash="exiyNrnI91Ac6+ZijTcq+AyMWheqj4rOTBUFehqUajQpQ8Ml/hMl5DjYOsc66BSjVFqYvirRNFqkXSEuLkBwA6GA48lI2eSqn3oT+EzM1zYUX5FFO+hkrSmoMQSMbiGyEZ9h/XtCbvLwznKzeOYvMe0pqIYDoSry8l5FSNJ7tWE=" class="">example
 for salt/salinity budgets </a>in that case)</div>
<div class=""><br class="">
</div>
<div class="">Hope this helps, and sorry if I suggested things you already tried.</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class=""><br class="">
</div>
<div class="">Jonathan</div>
<div class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On Mar 12, 2024, at 12:31, Wenrui Jiang <<a href="mailto:wjiang33@jhu.edu" class="">wjiang33@jhu.edu</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="x_elementToProof" style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
Hi,</div>
<div class="x_elementToProof" style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="x_elementToProof" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">Thank you all for your help. Thanks to your advice, I can now close the budget when I turn the gchem package off. However, I am having
 some difficulties adding in the chemistry and atmospheric flux. Could you tell me what diagnostics are needed? It seems like the diagnostics I am using (DICTFLUX, DICBIOA, DICCARB) are off by some factor, but I could not figure them out.</span></div>
<div class="x_elementToProof" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
</div>
<div class="x_elementToProof" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">Thanks,</span></div>
<div class="x_elementToProof" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">Wenrui</span></div>
<div id="x_appendonsend" class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
</div>
<hr tabindex="-1" class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; display:inline-block; width:668.359375px">
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important"></span>
<div id="x_divRplyFwdMsg" dir="ltr" class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">From:</b><span class="x_Apple-converted-space"> </span>MITgcm-support <<a href="mailto:mitgcm-support-bounces@mitgcm.org" class="">mitgcm-support-bounces@mitgcm.org</a>> on behalf
 of Martin Losch <<a href="mailto:Martin.Losch@awi.de" class="">Martin.Losch@awi.de</a>><br class="">
<b class="">Sent:</b><span class="x_Apple-converted-space"> </span>Tuesday, March 12, 2024 5:03 AM<br class="">
<b class="">To:</b><span class="x_Apple-converted-space"> </span>MITgcm Support <<a href="mailto:mitgcm-support@mitgcm.org" class="">mitgcm-support@mitgcm.org</a>><br class="">
<b class="">Subject:</b><span class="x_Apple-converted-space"> </span>Re: [MITgcm-support] Closing DIC budget</font>
<div class=""> </div>
</div>
<div class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; line-break:after-white-space">
<div class="" style="margin-top:0px; margin-bottom:0px"><strong class=""><br class="">
</strong><strong class=""><span class="" style="background-color:red; color:white; font-family:"Times New Roman",serif; font-size:12pt">      External Email - Use Caution      </span></strong></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><strong class=""><span class="" style="background-color:red; color:white; font-family:"Times New Roman",serif; font-size:12pt"><br class="">
</span></strong></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><strong class=""><span class="" style="background-color:red; color:white; font-family:"Times New Roman",serif; font-size:12pt"><br class="">
</span></strong></div>
<div class="">Hi Dave, 
<div class=""><br class="">
</div>
<div class="">thanks for the clarification and sorry for my inaccurate post.</div>
<div class="">In fact, nonlinFreeSurf=4, select_rStar=2, turns on the r-start coordinates (sorry for not saying that in my previous post), and with r-star, the conservation should be most accurate (better than “just” non-linear free surface).
<div class=""><br class="">
</div>
<div class="">Martin<br id="x_x_lineBreakAtBeginningOfMessage" class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 11. Mar 2024, at 18:54, Dave Munday - BAS <<a href="mailto:danday@bas.ac.uk" class="">danday@bas.ac.uk</a>> wrote:</div>
<br class="x_x_Apple-interchange-newline">
<div class="">
<div class="" style="line-break:after-white-space"><span class="">I’ve been using the DIC pkg with r* coordinates and get extremely good conservation of all the tracers. I’d expect it to be almost as good with the non-linear free surface, as Martin says.</span>
<div class=""><br class="">
</div>
<div class="">Dave</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 11 Mar 2024, at 07:50, Martin Losch <<a href="mailto:Martin.Losch@awi.de" class="">Martin.Losch@awi.de</a>> wrote:</div>
<br class="x_x_Apple-interchange-newline">
<div class=""><span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">Hi,</span>
<div class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
</div>
<div class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
you can also try to set exactConserv = .TRUE., in data (but I am not sure if there’s an effect on the passive tracers).</div>
<div class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
</div>
<div class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
I am not sure, but I think that the tracer conservation will improve very much with the nonlinear free surface. verification/tutorial_global_oce_biogeo does not use a nonlinear free surface. To turn it on, you’d need to define NONLIN_FRSURF (in  CPP_OPTIONS.h),
 recompile (“make”) and use the appropriate runtime flags:  nonlinFreeSurf=4, select_rStar=2, and maybe hFacInf, hFacSup.</div>
<div class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
</div>
<div class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
Martin</div>
<div class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 6. Mar 2024, at 17:41, Wenrui Jiang <<a href="mailto:wjiang33@jhu.edu" class="">wjiang33@jhu.edu</a>> wrote:</div>
<br class="x_x_Apple-interchange-newline">
<div class="">
<div class="x_x_elementToProof" style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
Hi Sandy,</div>
<div class="x_x_elementToProof" style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="x_x_elementToProof" style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
Thank you very much for the suggestion. Although I have not figured out everything yet, but it is now much closer to a closure. Thank you!<br class="">
</div>
<div class="x_x_elementToProof" style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="x_x_elementToProof" style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
Best,
<div class="">Wenrui</div>
<br class="">
</div>
<div id="x_x_appendonsend" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
</div>
<hr tabindex="-1" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; display:inline-block; width:1025.078125px">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important"></span>
<div id="x_x_divRplyFwdMsg" dir="ltr" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">From:</b><span class="x_x_Apple-converted-space"> </span>MITgcm-support <<a href="mailto:mitgcm-support-bounces@mitgcm.org" class="">mitgcm-support-bounces@mitgcm.org</a>> on behalf
 of Gregorio Sandy <<a href="mailto:Sandy.Gregorio@uqar.ca" class="">Sandy.Gregorio@uqar.ca</a>><br class="">
<b class="">Sent:</b><span class="x_x_Apple-converted-space"> </span>Tuesday, March 5, 2024 11:13 AM<br class="">
<b class="">To:</b><span class="x_x_Apple-converted-space"> </span><a href="mailto:mitgcm-support@mitgcm.org" class="">mitgcm-support@mitgcm.org</a><span class="x_x_Apple-converted-space"> </span><<a href="mailto:mitgcm-support@mitgcm.org" class="">mitgcm-support@mitgcm.org</a>><br class="">
<b class="">Subject:</b><span class="x_x_Apple-converted-space"> </span>Re: [MITgcm-support] Closing DIC budget</font>
<div class=""> </div>
</div>
<div dir="ltr" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div class="" style="margin-top:0px; margin-bottom:0px"><strong class=""><br class="">
</strong><strong class=""><span class="" style="background-color:red; color:white; font-family:"Times New Roman",serif; font-size:12pt">      External Email - Use Caution      </span></strong></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><strong class=""><span class="" style="background-color:red; color:white; font-family:"Times New Roman",serif; font-size:12pt"><br class="">
</span></strong></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><strong class=""><span class="" style="background-color:red; color:white; font-family:"Times New Roman",serif; font-size:12pt"><br class="">
</span></strong></div>
<div class="">
<div class="x_x_x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<span class="" style="font-family:Arial,Helvetica,sans-serif">Hi Wenrui,</span></div>
<div class="x_x_x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<span class="" style="font-family:Arial,Helvetica,sans-serif"><br class="">
</span></div>
<div class="x_x_x_elementToProof"><span class="" style="font-family:Arial,Helvetica,sans-serif; font-size:12pt">I had a problem as well in closing my tracers budget (by just looking at timeseries of my tracers integrated over my domain, I could see a drift).
 I don't know if it can help you but I added the following line in data.ptracers for all my tracers (1 to 5):</span></div>
<div class="x_x_x_elementToProof"><span class="" style="font-family:Arial,Helvetica,sans-serif; font-size:12pt"><br class="">
</span></div>
<div class="x_x_x_elementToProof"><span class="" style="font-family:Arial,Helvetica,sans-serif; font-size:12pt"><b class="">PTRACERS_linFSConserve(1)=.TRUE.,</b></span></div>
<pre class=""><div class="x_x_x_elementToProof"><span class="" style="font-family:Arial,Helvetica,sans-serif; font-size:12pt">PTRACERS_linFSConserve applies mean Free-Surf source/sink at surface.</span></div></pre>
<div class="x_x_x_elementToProof"><span class="" style="font-family:Arial,Helvetica,sans-serif; font-size:12pt">Good luck,</span></div>
<div class="x_x_x_elementToProof"><span class="" style="font-family:Arial,Helvetica,sans-serif; font-size:12pt"><br class="">
</span></div>
<div class="x_x_x_elementToProof"><span class="" style="font-family:Arial,Helvetica,sans-serif; font-size:12pt">Sandy</span></div>
<div id="x_x_x_appendonsend" class=""></div>
<hr tabindex="-1" class="" style="display:inline-block; width:1025.078125px">
<div id="x_x_x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">De :</b><span class="x_x_Apple-converted-space"> </span>MITgcm-support <<a href="mailto:mitgcm-support-bounces@mitgcm.org" class="">mitgcm-support-bounces@mitgcm.org</a>>
 de la part de Wenrui Jiang <<a href="mailto:wjiang33@jhu.edu" class="">wjiang33@jhu.edu</a>><br class="">
<b class="">Envoyé :</b><span class="x_x_Apple-converted-space"> </span>lundi 4 mars 2024 13:18<br class="">
<b class="">À :</b><span class="x_x_Apple-converted-space"> </span><a href="mailto:mitgcm-support@mitgcm.org" class="">mitgcm-support@mitgcm.org</a> <<a href="mailto:mitgcm-support@mitgcm.org" class="">mitgcm-support@mitgcm.org</a>><br class="">
<b class="">Objet :</b><span class="x_x_Apple-converted-space"> </span>[MITgcm-support] Closing DIC budget</font>
<div class=""> </div>
</div>
<div dir="ltr" class="">
<table border="0" cellspacing="0" cellpadding="0" align="left" width="100%" class="">
<tbody class="">
<tr class="">
<td class="" style="background-color:rgb(255,0,0); padding:5pt 2pt"></td>
<td width="100%" cellpadding="7px 6px 7px 15px" class="" style="background-color:rgb(255,224,224); padding:5pt 4pt 5pt 12pt">
<div class=""><span class="" style="font-weight:bold">ATTENTION :</span><span class="x_x_Apple-converted-space"> </span><span class="" style="font-size:10pt">Ce courriel provient d'une source externe. Assurez-vous que cette dernière est sûre avant d'ouvrir
 une pièce jointe ou de cliquer sur un lien. Dans le doute, signalez le message.</span></div>
</td>
</tr>
</tbody>
</table>
<br class="">
<div class="">
<div class="x_x_x_x_elementToProof"><span class="" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">Dear MITgcm support group,<br class="">
<br class="">
Thanks for reading this. My name is Wenrui Jiang, and I am a PhD student from Johns Hopkins. I want to apologize in advance for my inexperience.<br class="">
<br class="">
I am trying to close the DIC budget on the biogeochemical tutorial example (<a href="https://mitgcm.readthedocs.io/en/latest/examples/global_oce_biogeo/global_oce_biogeo.html" originalsrc="https://mitgcm.readthedocs.io/en/latest/examples/global_oce_biogeo/global_oce_biogeo.html" shash="O/U1zhujZsKLRTEU4svhtzwkzO4pJuCIa2hG8sOl96Dq8Hwm0LaQDfTk7ICzI4irqUXMv32gnUdxPkIb4ObCTQXlODpNexsbX6sEf+R7Jh3coG178rh0XQ6cXY2IS1+/Bk2dNDP5ctqYngFhz2o2adBx2tEusMiWOBMi+E64spo=" originalsrc="https://mitgcm.readthedocs.io/en/latest/examples/global_oce_biogeo/global_oce_biogeo.html" shash="RxEm2QucUKJCMLfTS5on5cxdtUR/WuqLKFGon/C4iObeSrfrFZkqkHGQzTD/AToSFmRMil18ktIZ4puy3TgMa1RUkIFZ51S4c9JKHRmvhcwx9kWa6YBRYCoBQ5Z7w7BHvt51Koe18n4mDUQwmCN5H4SXu/pfAaKQTZSO0JTyXbE=" id="LPlnk840669" class="">https://mitgcm.readthedocs.io/en/latest/examples/global_oce_biogeo/global_oce_biogeo.html</a>).
 The diagnostics that I include are:<br class="">
<br class="">
TRAC01  |SMR     MR|mol/m^3         |Dissolved Inorganic Carbon (DIC) [mol C/m^3] concentration<br class="">
ForcTr01|SMR     MR|mol/m^3/s       |DIC forcing tendency<br class="">
AB_gTr01|SMR     MR|mol/m^3/s       |DIC tendency from Adams-Bashforth<br class="">
Tp_gTr01|SMR     MR|mol/m^3/s       |DIC total transport tendency (before gchem_forcing_sep)<br class="">
ADVrTr01|WM      LR|mol/m^3.m^3/s   |Vertical   Advective Flux of DIC<br class="">
ADVxTr01|UU      MR|mol/m^3.m^3/s   |Zonal      Advective Flux of DIC<br class="">
ADVyTr01|VV      MR|mol/m^3.m^3/s   |Meridional Advective Flux of DIC<br class="">
DFrETr01|WM      LR|mol/m^3.m^3/s   |Vertical Diffusive Flux of DIC (Explicit part)<br class="">
DFxETr01|UU      MR|mol/m^3.m^3/s   |Zonal      Diffusive Flux of DIC<br class="">
DFyETr01|VV      MR|mol/m^3.m^3/s   |Meridional Diffusive Flux of DIC<br class="">
DFrITr01|WM      LR|mol/m^3.m^3/s   |Vertical Diffusive Flux of DIC (Implicit part)<br class="">
<br class="">
DICBIOA | 15 |SM P    MR      |mol/m3/sec      |Biological Productivity (mol/m3/s)<br class="">
DICCARB | 15 |SM P    MR      |mol eq/m3/sec   |Carbonate chg-biol prod and remin (mol eq/m3/s)<br class="">
DICTFLX |  1 |SM P    L1      |mol/m3/sec      |Tendency of DIC due to air-sea exch (mol/m3/s<br class="">
<br class="">
So far, I managed to close the Tp_gTr01 term with the advective and diffusive flux in the interior to machine precision. However, at the surface there is a large residual, which I am not able to close with ForcTR01. I am wondering if this is a dilution effect
 from PTRACER_ref.<br class="">
<br class="">
I am also having a hard time matching Tp_gTr01 and the tendency diagnosed from DIC and Eta snapshots using the GCHEM diagnostics. The GCHEM diagnostics seems to have very small value (10^-10 mol/m^3/s) which is much smalller than the difference.<br class="">
<br class="">
I would really appreciate it if you could tell me whether:<br class="">
<br class="">
  1. I am using the correct diagnostics in the correct way;<br class="">
  2.there are any model setups that prevent a tracer closure.<br class="">
</span></div>
<div class="x_x_x_x_elementToProof"><span class="" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"><br class="">
</span></div>
<div class="x_x_x_x_elementToProof"><span class="" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">Thank you very much!<br class="">
</span></div>
<div class="x_x_x_x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="x_x_x_x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
Sincerely,
<div class="">Wenrui</div>
<br class="">
</div>
<div id="x_x_x_x_Signature" class="">
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<span class="" style="font-size:16pt; color:rgb(12,136,42)">Wenrui Jiang</span></div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Ph.D. Student,</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Department of Earth & Planetary Sciences,</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Johns Hopkins University.</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<a href="mailto:wjiang33@jh.edu" class="">Email: wjiang33@jh.edu</a></div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">MITgcm-support
 mailing list</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important"><a href="mailto:MITgcm-support@mitgcm.org" class="">MITgcm-support@mitgcm.org</a></span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important"><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" originalsrc="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" shash="FWEJBgKW5MnJPY/C+J7NljWHuuOgNqmdRyAH722Y4i1ghHfRt9heHzt1F92xEovihlH8rpAdcXOQd9dknTVf6QG3RWtCSM9bAdcMI0sXxlv5W2hqiyz35RwzRVgX6gEXHB4e5IZD1o7Z/nzqq8gSzU/loIx+nygF1gnYO8IR2mE=" class="">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a></span></div>
</blockquote>
</div>
<br class="">
</div>
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">MITgcm-support
 mailing list</span><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="mailto:MITgcm-support@mitgcm.org" class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">MITgcm-support@mitgcm.org</a><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" originalsrc="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" shash="Qc7WiRVN2oFfFPUs7aYm0Oz5AwEGG6/arWi7Wkdd5pd/enx/PIR4aX0VHYymeA+Axdq7wCKpZ9Q3prqm8zav0bk8HAnkxSMavIbtrd6dvUMsoIGFuckN40GcHg5w//+ASq7Bn97+qtNiFOOrC7V7ipF1KCxuIhhaHynmlmE1v1E=" originalsrc="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" shash="eaXLtl6U/HWQAGFGOMDV/bBRIC3r8mXmGj7H5EO3NL4nGa0gkjtUrLJOMLso9+6ohAtasH1gzjeJJt5DOiFnc3Hf8XN5fYYYNpH0LKZpJAH6IWzs0taHb5ngd+x4bCZJ+xNvlWnBxdpcYv9rUeOyExUNAuvNxLI3KVN6RjfsiFw=" class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a></div>
</blockquote>
</div>
<br class="">
<br class="">
<br class="">
This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete
 this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before
 opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses.<br class="">
<br class="">
</div>
_______________________________________________<br class="">
MITgcm-support mailing list<br class="">
<a href="mailto:MITgcm-support@mitgcm.org" class="">MITgcm-support@mitgcm.org</a><br class="">
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" originalsrc="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" shash="uXnBeJ2O1WoqHZ2N9PyuU+GY0nld0Ucxzb8UYiwW9b82fx8MJ7o6mulSVwaOag41pHcUTMUJIAhN2SUlKppm9e51Di0oieRAz8kV9lep7MgFAgvPUHcqPYETfOrFVp8T419fYvf1yBNWpK+cXb+IPkyBA6D/o8U2/t0qKWzWYMA=" class="">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">MITgcm-support
 mailing list</span><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important"><a href="mailto:MITgcm-support@mitgcm.org" class="">MITgcm-support@mitgcm.org</a></span><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important"><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" originalsrc="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" shash="PzZTFuqRrr8lMy7s8bUMigLWnJRqpH4WA5Nwvk1pxf349t1m07oDNcFm7r5+dl8i7cnskialKYaKaxI3LSBB42nC0Wk9gFl8ALKwVm1RV9PAIW3uKjXfYTKN6ug0D5JsIJ5qnj+RfTR7HawRmdIGr3v2g2jgIxShmk7NCZxjDsw=" class="">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a></span></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</body>
</html>