<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Jean-Michel,<div><br></div><div>I am on it (new S/R), maybe I can submit a PR today, I just want to give the regularization another try.</div><div><br></div><div>Martin<br><div><br><blockquote type="cite"><div>On 30. Jun 2023, at 16:20, Jean-Michel Campin <jmc@mit.edu> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">Hi Martin,</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">May be we could consider moving the computation of this mixingLength in a dedicated S/R ?</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">This would shorten the rather long ggl90_calc.F file.</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">Cheers,</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">Jean-Michel</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">On Fri, Jun 30, 2023 at 03:19:44PM +0200, Martin Losch wrote:</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; 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; text-decoration: none;">In case you are interested: The problem is related to the (admittedly complicated) computation of the GGL90mixingLength. The simpler versions mxlMaxFlag=0,1 work. That should be possible to fix!<br><br>Martin<br><br><blockquote type="cite">On 30. Jun 2023, at 08:44, Martin Losch <Martin.Losch@awi.de> wrote:<br><br>OK, thanks. So you suspect it could have to do with the domain decomposition for KPP?<br><br>If you have any insights/pointers as to where I should start with GGL90, I would greatly appreciate it (but I am not sure when I will get to this).<br><br>Martin<br><br><blockquote type="cite">On 29. Jun 2023, at 19:41, Patrick Heimbach <heimbach@mit.edu> wrote:<br><br>KPP is a bit of a mystery.<br>We were able to use it (Gamma hat code off in adjoint) in the old vector code, but never in the ???UV??? (domain-decomposed) code. I did not figure out, why. I suspect a bug in the adjoint (but cannot prove it and am thus probably wrong).<br>p.<br><br>From: MITgcm-devel <mitgcm-devel-bounces@mitgcm.org> on behalf of Martin Losch <Martin.Losch@awi.de><br>Date: Thursday, June 29, 2023 at 12:12 PM<br>To: MITgcm-devel <MITgcm-devel@mitgcm.org><br>Subject: Re: [MITgcm-devel] [EXTERNAL] ggl90 adjoint?<br><br>Thanks Patrick and Ou,<br>that???s very helpful (so that I don???t have to debug my configuration hopelessly). Maybe I can find the time to stabilise this.<br><br>How about KPP. Does that work inADmode? If so, how did you make it work (probably @Patrick)? Maybe that can be used and transfered to ggl90.<br><br>Martin<br><br>PS. I was under the impression that ggl90 is preferred over kpp because it is more stable in ADmode, but obviously that was a misunderstanding ...<br><br><br>On 29. Jun 2023, at 18:13, Wang, Ou (US 329B) <ou.wang@jpl.nasa.gov> wrote:<br><br>Hi Martin,<br><br>I had also tried to do an adjoint run without turning off GGL90 in the adjoint mode a while ago, but was not successful. Similar to what you are experiencing, that run quickly crashed in the adjoint mode. I didn???t attempt to debug it at the time.<br><br>Best,<br>Ou<br><br>From: MITgcm-devel <mitgcm-devel-bounces@mitgcm.org> on behalf of Martin Losch <Martin.Losch@awi.de><br>Date: Thursday, June 29, 2023 at 8:27 AM<br>To: MITgcm-devel <MITgcm-devel@mitgcm.org><br>Subject: [EXTERNAL] [MITgcm-devel] ggl90 adjoint?<br><br>Hi there,<br><br>this is a question for the ECCO related crowd. Is there a successful run with pkg/ggl90 NOT turned off in ADmode? i.e. that can get along without<br>useGGL90inAdMode = .FALSE.,<br>in data.autodiff?<br><br>It keeps blowing up on me very quickly. Any insights are hightly appreciated? Did anyone try to debug this?<br><br>Martin<br>_______________________________________________<br>MITgcm-devel mailing list<br><a href="mailto:MITgcm-devel@mitgcm.org">MITgcm-devel@mitgcm.org</a><span class="Apple-converted-space"> </span><<a href="mailto:MITgcm-devel@mitgcm.org">mailto:MITgcm-devel@mitgcm.org</a>><br><a href="https://urldefense.us/v3/__http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel__;!!PvBDto6Hs4WbVuu7!OieMzp4qr_WHIv_jv0HM9CTxq9-He6b8Qy8S2sTUa3c8Z4VUvloerrbIqgqR-rvqoN82HKMeAARjDRR9973Dqye4Hw$">https://urldefense.us/v3/__http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel__;!!PvBDto6Hs4WbVuu7!OieMzp4qr_WHIv_jv0HM9CTxq9-He6b8Qy8S2sTUa3c8Z4VUvloerrbIqgqR-rvqoN82HKMeAARjDRR9973Dqye4Hw$</a><span class="Apple-converted-space"> </span><<a href="https://urldefense.us/v3/__http:/mailman.mitgcm.org/mailman/listinfo/mitgcm-devel__;!!PvBDto6Hs4WbVuu7!OieMzp4qr_WHIv_jv0HM9CTxq9-He6b8Qy8S2sTUa3c8Z4VUvloerrbIqgqR-rvqoN82HKMeAARjDRR9973Dqye4Hw$">https://urldefense.us/v3/__http:/mailman.mitgcm.org/mailman/listinfo/mitgcm-devel__;!!PvBDto6Hs4WbVuu7!OieMzp4qr_WHIv_jv0HM9CTxq9-He6b8Qy8S2sTUa3c8Z4VUvloerrbIqgqR-rvqoN82HKMeAARjDRR9973Dqye4Hw$</a>><br>_______________________________________________<br>MITgcm-devel mailing list<br><a href="mailto:MITgcm-devel@mitgcm.org">MITgcm-devel@mitgcm.org</a><span class="Apple-converted-space"> </span><<a href="mailto:MITgcm-devel@mitgcm.org">mailto:MITgcm-devel@mitgcm.org</a>><br><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel</a><br><br>_______________________________________________<br>MITgcm-devel mailing list<br><a href="mailto:MITgcm-devel@mitgcm.org">MITgcm-devel@mitgcm.org</a><span class="Apple-converted-space"> </span><<a href="mailto:MITgcm-devel@mitgcm.org">mailto:MITgcm-devel@mitgcm.org</a>><br><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel</a><br></blockquote><br>_______________________________________________<br>MITgcm-devel mailing list<br>MITgcm-devel@mitgcm.org<br>http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel<br></blockquote><br></blockquote><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; 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; text-decoration: none;">_______________________________________________<br>MITgcm-devel mailing list<br>MITgcm-devel@mitgcm.org<br>http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel<br></blockquote><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">MITgcm-devel mailing list</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">MITgcm-devel@mitgcm.org</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel</span></div></blockquote></div><br></div></body></html>