<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>aotensor_def Module Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="MAOOAM_small.png"/></td>
    <td style="padding-left: 0.5em;">
    <div id="projectbrief">A Modular Arbitrary-Order Ocean-Atmosphere Model</div>
    </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Types</a> &#124;
<a href="#func-members">Functions/Subroutines</a>  </div>
  <div class="headertitle">
<div class="title">aotensor_def Module Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The equation tensor \(\mathcal{T}_{i,j,k}\) for the coupled ocean-atmosphere model with temperature which allows for an extensible set of modes in the ocean and in the atmosphere.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Types</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">type &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structaotensor__def_1_1atmoctensor.html">atmoctensor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Class to hold the tensor \(\mathcal{T}_{i,j,k}\) representation of the tendencies.  <a href="structaotensor__def_1_1atmoctensor.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions/Subroutines</h2></td></tr>
<tr class="memitem:af3321529da46b7dbd5792db9c397d4d7"><td class="memItemLeft" align="right" valign="top">subroutine&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceaotensor__def.html#af3321529da46b7dbd5792db9c397d4d7">init_aotensor</a> (aot, model_configuration, inprods)</td></tr>
<tr class="memdesc:af3321529da46b7dbd5792db9c397d4d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subroutine to initialise the AtmOcTensor tensor.  <a href="#af3321529da46b7dbd5792db9c397d4d7">More...</a><br /></td></tr>
<tr class="separator:af3321529da46b7dbd5792db9c397d4d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a255887ee29cab31f0f875181adc8d18a"><td class="memItemLeft" align="right" valign="top">subroutine&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceaotensor__def.html#a255887ee29cab31f0f875181adc8d18a">delete_aotensor</a> (aot)</td></tr>
<tr class="memdesc:a255887ee29cab31f0f875181adc8d18a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subroutine to clean a AtmOcTensor tensor.  <a href="#a255887ee29cab31f0f875181adc8d18a">More...</a><br /></td></tr>
<tr class="separator:a255887ee29cab31f0f875181adc8d18a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The equation tensor \(\mathcal{T}_{i,j,k}\) for the coupled ocean-atmosphere model with temperature which allows for an extensible set of modes in the ocean and in the atmosphere. </p>
<dl class="section copyright"><dt>Copyright</dt><dd>2015-2020 Lesley De Cruz &amp; Jonathan Demaeyer. See LICENSE.txt for license information. </dd></dl>
</div><h2 class="groupheader">Function/Subroutine Documentation</h2>
<a id="a255887ee29cab31f0f875181adc8d18a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a255887ee29cab31f0f875181adc8d18a">&#9670;&nbsp;</a></span>delete_aotensor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">subroutine aotensor_def::delete_aotensor </td>
          <td>(</td>
          <td class="paramtype">class(<a class="el" href="structaotensor__def_1_1atmoctensor.html">atmoctensor</a>), intent(inout)&#160;</td>
          <td class="paramname"><em>aot</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Subroutine to clean a AtmOcTensor tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">aot</td><td>The AtmOcTensor tensor object to initialize. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="aotensor__def_8f90_source.html#l00277">277</a> of file <a class="el" href="aotensor__def_8f90_source.html">aotensor_def.f90</a>.</p>
<div class="fragment"><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    <span class="keywordtype">CLASS</span>(atmoctensor), <span class="keywordtype">INTENT(INOUT)</span> :: aot</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    <span class="keywordflow">IF</span> (<span class="keyword">allocated</span>(aot%count_elems)) <span class="keyword">DEALLOCATE</span>(aot%count_elems)</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    <span class="keyword">CALL </span>aot%tensor%clean</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    <span class="keyword">NULLIFY</span>(aot%ndim)</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    <span class="keyword">NULLIFY</span>(aot%natm)</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="keyword">NULLIFY</span>(aot%noc)</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    aot%initialized = .false.</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div></div><!-- fragment -->
</div>
</div>
<a id="af3321529da46b7dbd5792db9c397d4d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af3321529da46b7dbd5792db9c397d4d7">&#9670;&nbsp;</a></span>init_aotensor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">subroutine aotensor_def::init_aotensor </td>
          <td>(</td>
          <td class="paramtype">class(<a class="el" href="structaotensor__def_1_1atmoctensor.html">atmoctensor</a>), intent(inout)&#160;</td>
          <td class="paramname"><em>aot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">class(<a class="el" href="structparams_1_1modelconfiguration.html">modelconfiguration</a>), intent(in), target&#160;</td>
          <td class="paramname"><em>model_configuration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">class(<a class="el" href="structinprod__analytic_1_1innerproducts.html">innerproducts</a>), intent(in), target&#160;</td>
          <td class="paramname"><em>inprods</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Subroutine to initialise the AtmOcTensor tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">aot</td><td>The AO tensor object to initialize. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">model_configuration</td><td>A model configuration object to initialize the model tensor with. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">inprods</td><td>A model inner products object to initialize the model with. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="aotensor__def_8f90_source.html#l00221">221</a> of file <a class="el" href="aotensor__def_8f90_source.html">aotensor_def.f90</a>.</p>
<div class="fragment"><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordtype">CLASS</span>(atmoctensor), <span class="keywordtype">INTENT(INOUT)</span> :: aot</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <span class="keywordtype">CLASS</span>(modelconfiguration), <span class="keywordtype">INTENT(IN)</span>, <span class="keywordtype">TARGET</span> :: model_configuration</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <span class="keywordtype">CLASS</span>(innerproducts), <span class="keywordtype">INTENT(IN)</span>, <span class="keywordtype">TARGET</span> :: inprods</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <span class="keywordtype">INTEGER</span> :: i</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    <span class="keywordtype">INTEGER</span> :: allocstat </div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    <span class="keywordflow">IF</span> (.NOT.model_configuration%initialized) <span class="keywordflow">THEN</span></div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;      print*, <span class="stringliteral">&quot;Warning: Model configuration not initialized.&quot;</span></div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;      print*, <span class="stringliteral">&quot;Aborting aotensor initialization.&quot;</span></div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;      <span class="keywordflow">RETURN</span></div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="keywordflow">    END IF</span></div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="keywordflow">IF</span> (.NOT.inprods%initialized) <span class="keywordflow">THEN</span></div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;      print*, <span class="stringliteral">&quot;Warning: Inner products not initialized.&quot;</span></div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;      print*, <span class="stringliteral">&quot;Aborting aotensor initialization.&quot;</span></div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;      <span class="keywordflow">RETURN</span></div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;<span class="keywordflow">    END IF</span></div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    aot%ndim =&gt; model_configuration%modes%ndim</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    aot%natm =&gt; model_configuration%modes%natm</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    aot%noc =&gt; model_configuration%modes%noc</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    <span class="keyword">ALLOCATE</span>(aot%count_elems(aot%ndim), <a class="code" href="namespacestat.html">stat</a>=allocstat)</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    <span class="keywordflow">IF</span> (allocstat /= 0) <span class="keywordflow">THEN</span></div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;      print*, <span class="stringliteral">&quot;*** init_aotensor: Problem with allocation! ***&quot;</span></div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;      stop <span class="stringliteral">&quot;Exiting ...&quot;</span></div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;<span class="keywordflow">    END IF</span></div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    aot%count_elems=0</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <span class="keyword">CALL </span>aot%tensor%init(aot%ndim)</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    aot%operation =&gt; ao_add_count</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    <span class="keyword">CALL </span>aot%compute_tensor(model_configuration, inprods)</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <span class="keywordflow">DO</span> i=1,aot%ndim</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;      <span class="keyword">ALLOCATE</span>(aot%tensor%t(i)%elems(aot%count_elems(i)), <a class="code" href="namespacestat.html">stat</a>=allocstat)</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;      <span class="keywordflow">IF</span> (allocstat /= 0) <span class="keywordflow">THEN</span></div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        print*, <span class="stringliteral">&quot;*** init_aotensor: Problem with allocation! ***&quot;</span></div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;      stop <span class="stringliteral">&quot;Exiting ...&quot;</span></div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;<span class="keywordflow">    END IF</span></div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;<span class="keywordflow">    END DO</span></div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    aot%operation =&gt; ao_coeff</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    <span class="keyword">CALL </span>aot%compute_tensor(model_configuration, inprods)</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    <span class="keyword">CALL </span>aot%tensor%simplify</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    aot%initialized = .true.</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;</div><div class="ttc" id="namespacestat_html"><div class="ttname"><a href="namespacestat.html">stat</a></div><div class="ttdoc">Statistics accumulators. </div><div class="ttdef"><b>Definition:</b> <a href="stat_8f90_source.html#l00014">stat.f90:14</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Jun 26 2020 17:41:24 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
