<!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>rk4_tl_integrator 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">rk4_tl_integrator Module Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Tangent Linear (TL) model versions of MAOOAM. Fourth-order Runge-Kutta (RK4) integrators module.  
<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="structrk4__tl__integrator_1_1rk4tlintegrator.html">rk4tlintegrator</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Class for the fourth-order Runge-Kutta (RK4) TL integrator object.  <a href="structrk4__tl__integrator_1_1rk4tlintegrator.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:a5630423cca1b2495ece95e66814207a1"><td class="memItemLeft" align="right" valign="top">subroutine&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacerk4__tl__integrator.html#a5630423cca1b2495ece95e66814207a1">tl_step</a> (integr, y, ystar, t, res)</td></tr>
<tr class="memdesc:a5630423cca1b2495ece95e66814207a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Routine to perform an integration step (RK4 algorithm) of the tangent linear model. The incremented time is returned.  <a href="#a5630423cca1b2495ece95e66814207a1">More...</a><br /></td></tr>
<tr class="separator:a5630423cca1b2495ece95e66814207a1"><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>Tangent Linear (TL) model versions of MAOOAM. Fourth-order Runge-Kutta (RK4) integrators module. </p>
<dl class="section copyright"><dt>Copyright</dt><dd>2020 Lesley De Cruz, Jonathan Demaeyer &amp; Sebastian Schubert. See LICENSE.txt for license information. </dd></dl>
</div><h2 class="groupheader">Function/Subroutine Documentation</h2>
<a id="a5630423cca1b2495ece95e66814207a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5630423cca1b2495ece95e66814207a1">&#9670;&nbsp;</a></span>tl_step()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">subroutine rk4_tl_integrator::tl_step </td>
          <td>(</td>
          <td class="paramtype">class(<a class="el" href="structrk4__tl__integrator_1_1rk4tlintegrator.html">rk4tlintegrator</a>), intent(inout)&#160;</td>
          <td class="paramname"><em>integr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">real(kind=8), dimension(0:integr%ndim), intent(in)&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">real(kind=8), dimension(0:integr%ndim), intent(in)&#160;</td>
          <td class="paramname"><em>ystar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">real(kind=8), intent(inout)&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">real(kind=8), dimension(0:integr%ndim), intent(out)&#160;</td>
          <td class="paramname"><em>res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Routine to perform an integration step (RK4 algorithm) of the tangent linear model. The incremented time is returned. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">integr</td><td>Integrator object to perform the step with. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Initial point. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ystar</td><td>Evaluating the adjoint model at the point \(\boldsymbol{y}^\ast\). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">t</td><td>Actual integration time </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>Final point after the step. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="rk4__tl__integrator_8f90_source.html#l00047">47</a> of file <a class="el" href="rk4__tl__integrator_8f90_source.html">rk4_tl_integrator.f90</a>.</p>
<div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keywordtype">CLASS</span>(rk4tlintegrator), <span class="keywordtype">INTENT(INOUT)</span> :: integr</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordtype">REAL(KIND=8)</span>, <span class="keywordtype">DIMENSION(0:integr%ndim)</span>, <span class="keywordtype">INTENT(IN)</span> :: y,ystar</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordtype">REAL(KIND=8)</span>, <span class="keywordtype">INTENT(INOUT)</span> :: t</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordtype">REAL(KIND=8)</span>, <span class="keywordtype">DIMENSION(0:integr%ndim)</span>, <span class="keywordtype">INTENT(OUT)</span> :: res</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keyword">CALL </span>integr%pmodel%tl_tendencies(t,ystar,y,integr%buf_kA)</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    integr%buf_y1 = y+0.5*integr%dt*integr%buf_kA</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keyword">CALL </span>integr%pmodel%tl_tendencies(t+0.5*integr%dt,ystar,integr%buf_y1,integr%buf_kB)</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    integr%buf_y1 = y+0.5*integr%dt*integr%buf_kB</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    integr%buf_kA = integr%buf_kA+2*integr%buf_kB</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keyword">CALL </span>integr%pmodel%tl_tendencies(t+0.5*integr%dt,ystar,integr%buf_y1,integr%buf_kB)</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    integr%buf_y1 = y+0.5*integr%dt*integr%buf_kB</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    integr%buf_kA = integr%buf_kA+2*integr%buf_kB</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keyword">CALL </span>integr%pmodel%tl_tendencies(t+integr%dt,ystar,integr%buf_y1,integr%buf_kB)</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    integr%buf_kA = integr%buf_kA+integr%buf_kB</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    res=y+integr%buf_kA*integr%dt/6</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    t=t+integr%dt</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>
