Skip to content
Snippets Groups Projects
Commit 477ce676 authored by Tomas Lovato's avatar Tomas Lovato
Browse files

TOP manual workflow fig using Tikz

parent 50a898c2
No related branches found
No related tags found
No related merge requests found
doc/latex/TOP/figures/TOP_init.png

112 KiB

doc/latex/TOP/figures/TOP_step.png

196 KiB

# Create workflow using Mermaid
### Initialization procedure (called by OCE/nemogcm.F90)
```mermaid
graph LR
subgraph " "
trc_init["trc_init (trcini.F90)"] --> trc_nam["trc_nam (trcnam.F90) <br> initialize TOP tracers and run setting"]
trc_init --> trc_ini_sms["trc_ini_sms <br> initialize each submodule"]
trc_init --> trc_ini_trp["trc_ini_trp <br> initialize transport for tracers"]
trc_init --> trc_ice_ini["trc_ice_ini <br> initialize tracers in seaice "]
trc_init --> trc_ini_state["trc_ini_state <br> read BGC tracers from a restart or input data"]
end
```
### Time marching procedure (called by OCE/stp.F90)
```mermaid
graph LR
subgraph " "
trc_stp --> trc_wri["trc_wri <br> call XIOS for output of data"]
trc_stp --> trc_sms["trc_sms <br> BGC trends from each submodule"]
trc_stp --> trc_trp["trc_trp (TRP/trctrp.F90)<br> compute physical trends"]
trc_trp --> trc_bc["trc_bc <br> surface and coastal BCs trends"]
trc_trp --> trc_dmp["trc_dmp <br> tracer damping"]
trc_trp --> trc_ldf["trc_ldf <br> lateral diffusion"]
trc_trp --> trc_zdf["trc_zdf <br> vertical mixing & after tracer"]
trc_trp --> trc_nxt["trc_atf <br> time filtering of 'now' tracer fields <br> (Lateral Boundary Conditions called here)"]
trc_trp --> trc_rad["trc_rad <br> Correct artificial negative concentrations"]
trc_stp --> trc_rst_wri["trc_rst_wri <br> tracers restart files"]
end
```
...@@ -197,7 +197,7 @@ For icebergs, a homogeneous distribution of biogeochemical tracers is applied fr ...@@ -197,7 +197,7 @@ For icebergs, a homogeneous distribution of biogeochemical tracers is applied fr
\nlst{namtrc_ais} \nlst{namtrc_ais}
%-------------------------------------------------------------------------------------------------------- %--------------------------------------------------------------------------------------------------------
\subsection{Vertical light penetration} \subsection{Light vertical attenuation}
A dedicated module (\forcode{trcopt}) allows to compute form the sea surface solar radiation the amount of light that penetrate into the ocean interior depending on the chlorophyll field. A dedicated module (\forcode{trcopt}) allows to compute form the sea surface solar radiation the amount of light that penetrate into the ocean interior depending on the chlorophyll field.
The visible part of solar radiation is used to derive the photosynthetic available radiation (PAR) using a simplified version of the model by \cite{morel_1988}, as described in \cite{lengaigne_2007}. The visible part of solar radiation is used to derive the photosynthetic available radiation (PAR) using a simplified version of the model by \cite{morel_1988}, as described in \cite{lengaigne_2007}.
......
...@@ -42,22 +42,110 @@ The workflow of the TOP interface within the NEMO framework is organized around ...@@ -42,22 +42,110 @@ The workflow of the TOP interface within the NEMO framework is organized around
The initialization (\forcode{trc_init}) of passive tracers variables and parameters include reading namelist, set initial tracer fields (either read restart or read data), and specific initialisation for each SMS module. The initialization (\forcode{trc_init}) of passive tracers variables and parameters include reading namelist, set initial tracer fields (either read restart or read data), and specific initialisation for each SMS module.
%tikz common preamble
\tikzstyle{process} = [rectangle, minimum width=1cm, minimum height=1cm, text centered, align=center, draw=black, fill=orange!20]
\tikzstyle{line} = [thick,-,>=stealth]
\tikzstyle{arrow} = [thick,->,>=stealth]
\newcommand*{\connectorH}[2]{
\draw[arrow] (#1) -- ++(1.cm,0) |- (#2);
}
% initialization workflow
%
\begin{figure}[ht] \begin{figure}[ht]
\begin{center} \begin{center}
\vspace{0cm} \vspace{0cm}
\includegraphics[width=0.75\textwidth]{TOP_init}
\caption{TOP interface initialization workflow (called by nemo\_ini in \forcode{OCE/nemogcm.F90})} \begin{tikzpicture}[node distance=1.5cm and 1cm]
\node (main) [process, xshift=0 cm]
{nemo\verb!_!init \\ (nemogcm.F90) \\ NEMO General Initialisations};
\node (ini) [process, yshift=-3.5cm, xshift=3.5cm]
{trc\verb!_!init \\ (trcini.F90) \\ TOP Initialisation};
\node (ini1) [process, yshift=-0.5cm, xshift=11cm]
{trc\verb!_!nam (trcnam.F90)\\ initialize TOP tracers and run setting};
\node (ini2) [process, yshift=-2cm, xshift=11cm]
{trc\verb!_!ini\verb!_!sms \\ initialize each SMS sub-module};
\node (ini3) [process, yshift=-3.5cm, xshift=11cm]
{trc\verb!_!ini\verb!_!trp \\ initialize transport for tracers};
\node (ini4) [process, yshift=-5cm, xshift=11cm]
{trc\verb!_!ice\verb!_!ini \\ initialize tracers in seaice};
\node (ini5) [process, yshift=-6.5cm, xshift=11cm]
{trc\verb!_!ini\verb!_!state \\ set initial state from restart or inputdata};
\draw [arrow] (main.south) |- (ini.west);
\connectorH{ini.east}{ini1.west}
\connectorH{ini.east}{ini2.west}
\connectorH{ini.east}{ini3.west}
\connectorH{ini.east}{ini4.west}
\connectorH{ini.east}{ini5.west}
\end{tikzpicture}
\caption{TOP interface initialization workflow}
\label{fig:topinit} \label{fig:topinit}
\end{center} \end{center}
\end{figure} \end{figure}
In the time-marching procedure of the model (trc\_stp), trends are computed for all tracers in relation to biogeochemical processes (source minus sinks of each TOP sub-module), In the time-marching procedure of the model (trc\_stp), trends are computed for all tracers in relation to biogeochemical processes (source minus sinks of each TOP sub-module),
physical transport (advective \& diffusive, forcing and boundary conditions) and output is managed using the I/O library XIOS. physical transport (advective \& diffusive, forcing and boundary conditions) and output is managed using the I/O library XIOS.
% stepping workflow
%
\newcommand*{\connectorHH}[2]{
\draw[arrow] (#1) -- ++(2.cm,0) |- (#2);
}
\begin{figure}[ht] \begin{figure}[ht]
\begin{center} \begin{center}
\vspace{0cm} \vspace{0cm}
\includegraphics[width=0.75\textwidth]{TOP_step}
\begin{tikzpicture}[node distance=1.5cm and 1cm]
\node (main) [process, xshift=0 cm]
{trc\verb!_!stp \\ (trcstp.F90) \\ TOP time marching};
\node (wri) [process, yshift=-2.25cm, xshift=3.5cm]
{trc\verb!_!wri \\ (trcwri.F90) \\ call XIOS for output of data};
\node (sms) [process, yshift=-4.25cm, xshift=3.5cm]
{trc\verb!_!sms \\ (trcsms.F90) \\ BGC trends of each sub-module};
\node (trp) [process, yshift=-6.25cm, xshift=3.5cm]
{trc\verb!_!trp \\ (TRP/trctrp.F90) \\ compute physical trends};
\node (ini1) [process, yshift=-2.5cm, xshift=13cm]
{trc\verb!_!bc (trcbc.F90)\\ surface and coastal BCs trends};
\node (ini2) [process, yshift=-4cm, xshift=13cm]
{trc\verb!_!dmp (TRP/trcdmp.F90)\\ tracer damping};
\node (ini3) [process, yshift=-5.5cm, xshift=13cm]
{trc\verb!_!ldf (TRP/trcldf.F90)\\ lateral diffusion};
\node (ini4) [process, yshift=-7.0cm, xshift=13cm]
{trc\verb!_!zdf (TRP/trczdf.F90) \\ vertical mixing after tracer};
\node (ini5) [process, yshift=-8.5cm, xshift=13cm]
{trc\verb!_!aft (TRP/trcatf.F90) \\ time filtering of 'now' tracer fields \\ (Lateral Boundary Conditions called here)};
\node (ini6) [process, yshift=-10.0cm, xshift=13cm]
{trc\verb!_!rad (TRP/trcrad.F90) \\ Correct artificial negative concentrationst};
\node (rst) [process, yshift=-8.25 cm, xshift=3.5cm]
{trc\verb!_!rst \\ (trcrst.F90) \\ write restart files};
\draw [arrow] (main.south) |- (wri.west);
\draw [arrow] (main.south) |- (sms.west);
\draw [arrow] (main.south) |- (trp.west);
\draw [arrow] (main.south) |- (rst.west);
\connectorHH{trp.east}{ini1.west}
\connectorHH{trp.east}{ini2.west}
\connectorHH{trp.east}{ini3.west}
\connectorHH{trp.east}{ini4.west}
\connectorHH{trp.east}{ini5.west}
\connectorHH{trp.east}{ini6.west}
\end{tikzpicture}
\caption{TOP interface time-marching workflow (called by stp in \forcode{OCE/step.F90}} \caption{TOP interface time-marching workflow (called by stp in \forcode{OCE/step.F90}}
\label{fig:topstep} \label{fig:topstep}
\end{center} \end{center}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment