<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
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;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Consolas",serif;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<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">You can add the two new controls xx_sst and xx_sss by modifying data.ctrl. You would add two new entries as follows (along with weights, multiplies etc.)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">xx_gentim2d_file(8)='xx_sst',<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">xx_gentim2d_file(9)='xx_sss',<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">You don’t need to recompile the code. The controls xx_sst and xx_sst are already defined in the code (S/R ctrl_map_forcing.F).<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">Best,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Ou<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 <ecco-support-bounces@mit.edu> on behalf of Emma Boland <emmomp@bas.ac.uk><br>
<b>Date: </b>Friday, March 17, 2023 at 4:00 AM<br>
<b>To: </b>ecco-support@mit.edu <ecco-support@mit.edu><br>
<b>Subject: </b>Re: [ecco-support] [EXTERNAL] adxx_sst and sss<o:p></o:p></span></p>
</div>
<p>Thanks Ian,<o:p></o:p></p>
<p>Trying to recompile with <o:p></o:p></p>
<p>#define ALLOW_SST_CONTROL<br>
#define ALLOW_SSS_CONTROL <o:p></o:p></p>
<p>in my ctrl_options.h results in errors at compile thrown by TAF:<o:p></o:p></p>
<p>*ERROR* : type of variable xx_sss0 not defined.<br>
*ERROR* : type of variable xx_sss1 not defined.<o:p></o:p></p>
<p>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...<o:p></o:p></p>
<p>Is it possible to instead add xx_sst/sss to the GENTIM2D list? Which file is this defined in?<o:p></o:p></p>
<p>Thanks,<o:p></o:p></p>
<p>Emma<o:p></o:p></p>
<p><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 16/03/2023 01:13, Fenty, Ian G (US 329B) wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi Emma,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></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’.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><a href="https://urldefense.us/v3/__https:/www.gsp.com/cgi-bin/man.cgi?section=1&topic=fpp*Conditional_source_code_selection__;Iw!!PvBDto6Hs4WbVuu7!Pt9fH1e-yFwxucyvjoMrKjz369afGSKitbjIpYbpFQbI-SuLqaxx6TsMnoP2Sr-cBQjlrhbR0vzN01oSaQor$">https://www.gsp.com/cgi-bin/man.cgi?section=1&topic=fpp#Conditional_source_code_selection</a></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Take the code block below as an example.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#ifdef ZZZ</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> X = 1+1</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#endif</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></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:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#define ZZZ</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></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:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></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://urldefense.us/v3/__https:/github.com/ECCO-GROUP/ECCO-v4-Configurations/blob/bdaaf6308e8e09f08a52d28f559119ff34a59827/ECCOv4*20Release*204/code/CTRL_OPTIONS.h*L43-L45__;JSUj!!PvBDto6Hs4WbVuu7!Pt9fH1e-yFwxucyvjoMrKjz369afGSKitbjIpYbpFQbI-SuLqaxx6TsMnoP2Sr-cBQjlrhbR0vzN02LpyaBt$">https://github.com/ECCO-GROUP/ECCO-v4-Configurations/blob/bdaaf6308e8e09f08a52d28f559119ff34a59827/ECCOv4%20Release%204/code/CTRL_OPTIONS.h#L43-L45</a></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#define ALLOW_UVEL0_CONTROL</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#define ALLOW_VVEL0_CONTROL</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></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.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#define ALLOW_SST_CONTROL</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">#define ALLOW_SSS_CONTROL </span>
<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-Ian</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></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 href="mailto:ecco-support-bounces@mit.edu">
<ecco-support-bounces@mit.edu></a> on behalf of Emma Boland <a 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 href="mailto:ecco-support@mit.edu">ecco-support@mit.edu</a> <a href="mailto:ecco-support@mit.edu">
<ecco-support@mit.edu></a><br>
<b>Subject: </b>[EXTERNAL] [ecco-support] adxx_sst and sss</span><o:p></o:p></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">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$">
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$">
www.ukri.org</a> <br>
Please think of the environment before printing out this message</span><o:p></o:p></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.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>ecco-support mailing list<o:p></o:p></pre>
<pre><a href="mailto:ecco-support@mit.edu">ecco-support@mit.edu</a><o:p></o:p></pre>
<pre><a href="https://urldefense.us/v3/__https:/mailman.mit.edu/mailman/listinfo/ecco-support__;!!PvBDto6Hs4WbVuu7!Pt9fH1e-yFwxucyvjoMrKjz369afGSKitbjIpYbpFQbI-SuLqaxx6TsMnoP2Sr-cBQjlrhbR0vzN0zPIROGu$">https://mailman.mit.edu/mailman/listinfo/ecco-support</a><o:p></o:p></pre>
</blockquote>
<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">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!Pt9fH1e-yFwxucyvjoMrKjz369afGSKitbjIpYbpFQbI-SuLqaxx6TsMnoP2Sr-cBQjlrhbR0vzN0yb0iKte$">
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!Pt9fH1e-yFwxucyvjoMrKjz369afGSKitbjIpYbpFQbI-SuLqaxx6TsMnoP2Sr-cBQjlrhbR0vzN05JyEaUz$">
www.ukri.org</a> <br>
Please think of the environment before printing out this message<o:p></o:p></span></p>
</div>
</div>
</body>
</html>