<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Thanks Ian,</p>
<p>Trying to recompile with <br>
</p>
<p><span style="font-size:11.0pt">#define ALLOW_SST_CONTROL<br>
#define ALLOW_SSS_CONTROL <br>
</span></p>
<p><span style="font-size:11.0pt">in my ctrl_options.h results in
errors at compile thrown by TAF:</span></p>
<p><span style="font-size:11.0pt">*ERROR* : type of variable xx_sss0
not defined.<br>
*ERROR* : type of variable xx_sss1 not defined.</span></p>
<p><span style="font-size:11.0pt">As far as I can see xx_sss0 and
xx_sss1 have types defined in ctrl.h so not sure why I'm getting
this...<br>
</span></p>
<p><span style="font-size:11.0pt">Is it possible to instead add
xx_sst/sss to the GENTIM2D list? Which file is this defined in?</span></p>
<p><span style="font-size:11.0pt">Thanks,</span></p>
<p><span style="font-size:11.0pt">Emma<br>
</span></p>
<p><span style="font-size:11.0pt"><br>
</span></p>
<div class="moz-cite-prefix">On 16/03/2023 01:13, Fenty, Ian G (US
329B) wrote:<br>
</div>
<blockquote type="cite" cite="mid:SA1PR09MB9456EC8068CE4E160CD8D610C7BC9@SA1PR09MB9456.namprd09.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi Emma,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">MITgcm code
within “#ifdef blocks” are only compiled if the variable is
defined via a ‘define directive’.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><a href="https://www.gsp.com/cgi-bin/man.cgi?section=1&topic=fpp#Conditional_source_code_selection" moz-do-not-send="true">https://www.gsp.com/cgi-bin/man.cgi?section=1&topic=fpp#Conditional_source_code_selection</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Take the
code block below as an example.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#ifdef ZZZ<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> X = 1+1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#endif<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The code X =
1+1 would only be compiled if ‘ZZZ’ were defined via a
define directive. The corresponding define directive is
simply:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#define ZZZ<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Define
directives are added to the *.h files (like CTRL_OPTIONS.h)
that you modify to configure your model setup. After
changing define directives in your *.h files, you have to
recompile your code:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Take a look
at the following lines from the CTRL_OPTIONS.h file used for
ECCO V4r4: <a href="https://github.com/ECCO-GROUP/ECCO-v4-Configurations/blob/bdaaf6308e8e09f08a52d28f559119ff34a59827/ECCOv4%20Release%204/code/CTRL_OPTIONS.h#L43-L45" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/ECCO-GROUP/ECCO-v4-Configurations/blob/bdaaf6308e8e09f08a52d28f559119ff34a59827/ECCOv4%20Release%204/code/CTRL_OPTIONS.h#L43-L45</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#define
ALLOW_UVEL0_CONTROL<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#define
ALLOW_VVEL0_CONTROL<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I believe
all you need to do to enable adxx_sst and adxx_sss is to add
the following define directives to your CTRL_OPTIONS.h file
and then recompile.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#define
ALLOW_SST_CONTROL<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#define
ALLOW_SSS_CONTROL <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-Ian<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">ecco-support
<a class="moz-txt-link-rfc2396E" href="mailto:ecco-support-bounces@mit.edu"><ecco-support-bounces@mit.edu></a> on behalf of Emma
Boland <a class="moz-txt-link-rfc2396E" href="mailto:emmomp@bas.ac.uk"><emmomp@bas.ac.uk></a><br>
<b>Date: </b>Tuesday, March 14, 2023 at 8:43 AM<br>
<b>To: </b><a class="moz-txt-link-abbreviated" href="mailto:ecco-support@mit.edu">ecco-support@mit.edu</a>
<a class="moz-txt-link-rfc2396E" href="mailto:ecco-support@mit.edu"><ecco-support@mit.edu></a><br>
<b>Subject: </b>[EXTERNAL] [ecco-support] adxx_sst and
sss<o:p></o:p></span></p>
</div>
<p>Hi All,<o:p></o:p></p>
<p>I've been successfully running ECCOv4 r4 in adjoint mode and
generating sensitivities such as adxx_qnet, adxx_tauu. I'm now
interested in looking at sensitivities to SST and SSS, and can
see from the ctrl package code that it should be possible to
add xx_sst and xx_sss as control variables. I've run a short
test and I am indeed generating adxx_sst/sss but they are
coming out all zeros (other adxx files from the same run are
non-zero).
<o:p></o:p></p>
<p>Can anyone let me know if I need to do anything else to get
adxx_sst and sss working? I can see from inspection of the
code that the ctrl variable contributions are only summed if
ALLOW_SS[T/S]_CONTROL are defined but I can't see where these
logical variables are set?<o:p></o:p></p>
<p>Thanks,<o:p></o:p></p>
<p>Emma<o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">-- <br>
<b>Dr Emma Boland</b> | Physical Oceanographer | British
Antarctic Survey<br>
High Cross, Madingley Road, Cambridge CB3 0ET <br>
<a href="mailto:emmomp@bas.ac.uk" moz-do-not-send="true" class="moz-txt-link-freetext">emmomp@bas.ac.uk</a> |
Phone: (0)1223 221276<br>
Web: <a href="https://urldefense.us/v3/__http:/www.bas.ac.uk/profile/emmomp__;!!PvBDto6Hs4WbVuu7!KqAR5K2Ly_GVOlNnINtQg86KXmArMOpbpYV-3GovYvQSXdql-efsfa7dTakASpvvvhGygy7DFaNAn1k2pdjHFQ$" moz-do-not-send="true">
www.bas.ac.uk/profile/eboland</a> <br>
<br>
NERC is part of UK Research and Innovation <a href="https://urldefense.us/v3/__http:/www.ukri.org__;!!PvBDto6Hs4WbVuu7!KqAR5K2Ly_GVOlNnINtQg86KXmArMOpbpYV-3GovYvQSXdql-efsfa7dTakASpvvvhGygy7DFaNAn1mpprZxJg$" moz-do-not-send="true">
www.ukri.org</a> <br>
Please think of the environment before printing out this
message<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt"><br>
<br>
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.<o:p></o:p></span></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
ecco-support mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ecco-support@mit.edu">ecco-support@mit.edu</a>
<a class="moz-txt-link-freetext" href="https://mailman.mit.edu/mailman/listinfo/ecco-support">https://mailman.mit.edu/mailman/listinfo/ecco-support</a>
</pre>
</blockquote>
<div class="moz-signature">-- <br>
<b>Dr Emma Boland</b> | Physical Oceanographer | British Antarctic
Survey<br>
High Cross, Madingley Road, Cambridge CB3 0ET <br>
<a href="mailto:emmomp@bas.ac.uk" class="moz-txt-link-freetext">emmomp@bas.ac.uk</a><a>
| Phone: (0)1223 221276<br>
Web: </a><a href="www.bas.ac.uk/staff/profile/emmomp"></a><a class="moz-txt-link-abbreviated" href="http://www.bas.ac.uk/profile/emmomp">www.bas.ac.uk/profile/eboland</a>
<br>
<br>
NERC is part of UK Research and Innovation <a href="www.ukri.org" class="moz-txt-link-freetext">www.ukri.org</a> <br>
Please think of the environment before printing out this message</div>
</body>
</html>