Index: NEMO/trunk/doc/latex/TOP/subfiles/miscellaneous.tex
===================================================================
--- NEMO/trunk/doc/latex/TOP/subfiles/miscellaneous.tex	(revision 14239)
+++ NEMO/trunk/doc/latex/TOP/subfiles/miscellaneous.tex	(revision 14929)
@@ -7,7 +7,95 @@
 \section{TOP synthetic Workflow}
 
-\subsection{Model initialization}
+A synthetic description of the TOP interface workflow is given below to summarize the steps involved in the computation of biogeochemical and physical trends and their time integration and outputs, by reporting also the principal Fortran subroutine herein involved.
 
-\subsection{Time marching procedure}
+%\begin{figure}[!h]
+%	\centering
+%	\includegraphics[width=0.80\textwidth]{Top_FlowChart}
+%	\caption{Schematic view of NEMO-TOP flowchart}
+%	\label{img_cfcatm}
+%\end{figure} 
+
+\begin{minted}{bash}
+nemogcm
+    !                      
+    nemo_init           !   NEMO General Initialisations
+         !                   
+         trc_init                              ! TOP  Initialisations 
+    !
+    stp()                   !   NEMO Time-stepping
+        !
+        trc_stp()                            ! TOP time-stepping
+            !
+            trc_wri()           ! I/O manager : Output of passive tracers 
+            trc_sms()           ! Sinks and sources program manager
+            trc_trp()            ! Transport of passive tracers
+            trc_rst_wri()      ! Write tracer restart file
+            trd_mxl_trc()     ! trends: Mixed-layer
+\end{minted}
+
+\subsection{Model initialization (./src/TOP/trcini.F90)}
+
+This module consists on inital set up of passive tracers variables and parameters  : read the namelist, set initial tracer fields (either read restart or read data or analytical formulation and  specific initailisation in each SMS module  ( analytical initialisation of tracers or constant values )
+
+\begin{minted}{bash}
+trc_init                              ! TOP  Initialisations 
+    !    
+    IF( PISCES )    trc_ini_pisces()     !  PISCES bio model
+    IF( MY_TRC)    trc_ini_my_trc()    !  MY_TRC model
+    IF( CFCs     )    trc_ini_cfc   ()       !  CFCs
+    IF( C14       )    trc_ini_c14   ()       !  C14 model
+    IF( AGE      )    trc_ini_age   ()       !  AGE tracer
+    !
+    IF( REST   )    trc_rst_read()         ! Restart from a file  
+    ELSE            trc_dta()                   ! Initialisation from data
+\end{minted}
+
+\subsection{BGC trends computation (./src/TOP/trcsms.F90)}
+
+This is the main module where the passive tracers source minus sinks of each TOP sub-module is managed.    
+
+\begin{minted}{bash}
+trc_sms()                               ! Sinks and sources prooram manager
+    ! 
+    IF( PISCES  )    trc_sms_pisces()         ! main program of PISCES 
+    IF( CFCs     )    trc_sms_cfc()               ! surface fluxes of CFC
+    IF( C14       )    trc_sms_c14()               ! surface fluxes of C14
+    IF( AGE       )    trc_sms_age()              ! Age tracer
+    IF( MY_TRC)    trc_sms_my_trc()         ! MY_TRC  tracers
+\end{minted}
+
+\subsection{Physical trends computation (./src/TOP/TRP/trctrp.F90)}
+
+This is the main module where the passive tracers transport is managed. All the physical trends is calculated ( advective \& diffusive trends, surface BC from freshwater or external inputs ) 
+
+\begin{minted}{bash}
+trc_trp()       ! Transport of passive tracers
+    !
+    trc_sbc()         ! Surface boundary condition of freshwater flux
+    trc_bc()           ! Surface and lateral Boundary Conditions 
+    trc_ais()          ! Tracers from Antarctic Ice Sheet (icb, isf)               
+    trc_bbl()          ! Advective (and/or diffusive) bottom boundary layer scheme
+    trc_dmp()        ! Internal damping trends
+    trc_bdy()         ! BDY damping trends
+    trc_adv()         ! Horizontal & Vertical advection 
+    trc_ldf()           ! Lateral mixing
+    trc_zdf()          ! Vert. mixing & after tracer
+    trc_atf()           ! Time filtering of "now" tracer fields    
+    trc_rad()         ! Correct artificial negative concentrations
+\end{minted}
+
+\subsection{Outputs  (./src/TOP/TRP/trcwri.F90)}
+
+This is the main module where the passive tracer outputs of each TOP sub-module is managed using the I/O library XIOS.
+
+\begin{minted}{bash}
+trc_wri()                               ! I/O manager : Output of passive tracers 
+!
+IF( PISCES   )    trc_wri_pisces()      ! Output of PISCES diagnostics 
+IF( CFCs      )    trc_wri_cfc()            ! Output of Cfcs diagnostics
+IF( C14         )    trc_wri_c14()           ! surface fluxes of C14
+IF( AGE        )    trc_wri_age()           ! Age tracer
+IF( MY_TRC )    trc_wri_my_trc()      ! MY_TRC  tracers
+\end{minted}
 
 \section{Coupling an external BGC model using NEMO framework}
@@ -27,18 +115,18 @@
 \end{minted}
 
-the compilation with \textit{makenemo} will be executed through the following syntax
+The compilation with \textit{makenemo} will be executed through the following syntax
 
 \begin{minted}{bash}
    makenemo -n NEMO_MYBGC -m <arch_my_machine> -j 8 -e <MYBGCPATH>
 \end{minted}
-%The makenemo feature ?-e? was introduced to readdress at compilation time the standard MY_SRC folder (usually found in NEMO configurations) with a user defined external one.
-%
-%
-%The compilation of more articulated BGC model code & infrastructure, like in the case of BFM (?BFM-NEMO coupling manual), requires some additional features.
-%
-%As before, let?s assume a coupled configuration name NEMO_MYBGC, but in this case MYBGC model root becomes <MYBGCPATH> that contains 4 different subfolders for biogeochemistry, named initialization, pelagic, and benthic, and a separate one named nemo_coupling including the modified MY_SRC routines. The latter folder containing the modified NEMO coupling interface will be still linked using the makenemo ?-e? option.
-%
-%In order to include the BGC model subfolders in the compilation of NEMO code, it will be necessary to extend the configuration cpp_NEMO_MYBGC.fcm file to include the specific paths of MYBGC folders, as in the following example
-%
+
+The makenemo feature \textit{-e} was introduced to readdress at compilation time the standard MY\_SRC folder (usually found in NEMO configurations) with a user defined external one. \\ \\
+
+The compilation of more articulated BGC model code \& infrastructure, like in the case of BFM (BFM-NEMO coupling manual), requires some additional features. \\ \\
+
+As before, let's assume a coupled configuration name NEMO\_MYBGC, but in this case MYBGC model root becomes <MYBGCPATH> that contains 4 different subfolders for biogeochemistry, named initialization, pelagic, and benthic, and a separate one named nemo\_coupling including the modified MY\_SRC routines. The latter folder containing the modified NEMO coupling interface will be still linked using the makenemo \textit{-e} option. \\ \\
+
+In order to include the BGC model subfolders in the compilation of NEMO code, it will be necessary to extend the configuration \textit{cpp\_NEMO\_MYBGC.fcm} file to include the specific paths of MYBGC folders, as in the following example
+
 \begin{minted}{bash}
    bld::tool::fppkeys   key_xios key_top
@@ -49,22 +137,28 @@
 
    bld::pp::MYBGC      1
-   bld::tool::fppflags::MYBGC   %FPPFLAGS
-   bld::tool::fppkeys   %bld::tool::fppkeys MYBGC_MACROS
+   bld::tool::fppflags::MYBGC   \%FPPFLAGS
+   bld::tool::fppkeys                  \%bld::tool::fppkeys MYBGC_MACROS
 \end{minted}
 
-%where MYBGC_MACROS is the space delimited list of macros used in MYBGC model for selecting/excluding specific parts of the code. The BGC model code will be preprocessed in the configuration BLD folder as for NEMO, but with an independent path, like NEMO_MYBGC/BLD/MYBGC/<subforlders>.
-%
-%The compilation will be performed similarly to in the previous case with the following
-%
-%makenemo -n NEMO_MYBGC -m <arch_my_machine> -j 8 -e <MYBGCPATH>/nemo_coupling
-%Note that, the additional lines specific for the BGC model source and build paths, can be written into a separate file, e.g. named MYBGC.fcm, and then simply included in the cpp_NEMO_MYBGC.fcm as follow
-%
-%bld::tool::fppkeys  key_zdftke key_dynspg_ts key_xios key_top
-%inc <MYBGCPATH>/MYBGC.fcm
-%This will enable a more portable compilation structure for all MYBGC related configurations.
-%
-%Important: the coupling interface contained in nemo_coupling cannot be added using the FCM syntax, as the same files already exists in NEMO and they are overridden only with the readdressing of MY_SRC contents to avoid compilation conflicts due to duplicate routines.
-%
-%All modifications illustrated above, can be easily implemented using shell or python scripting to edit the NEMO configuration cpp.fcm file and to create the BGC model specific FCM compilation file with code paths.
+where MYBGC\_MACROS is the space delimited list of macros used in MYBGC model for selecting/excluding specific parts of the code. The BGC model code will be preprocessed in the configuration BLD folder as for NEMO, but with an independent path, like NEMO\_MYBGC/BLD/MYBGC/<subfolders>.\\
+
+The compilation will be performed similarly to in the previous case with the following
+
+\begin{minted}{bash}
+makenemo -n NEMO_MYBGC -m <arch_my_machine> -j 8 -e <MYBGCPATH>/nemo_coupling
+\end{minted}
+
+Note that, the additional lines specific for the BGC model source and build paths, can be written into a separate file, e.g. named MYBGC.fcm, and then simply included in the cpp\_NEMO\_MYBGC.fcm as follow:
+
+\begin{minted}{bash}
+bld::tool::fppkeys  key_zdftke key_dynspg_ts key_xios key_top
+inc <MYBGCPATH>/MYBGC.fcm
+\end{minted}
+
+This will enable a more portable compilation structure for all MYBGC related configurations.  \\ \\
+
+Important: the coupling interface contained in nemo\_coupling cannot be added using the FCM syntax, as the same files already exists in NEMO and they are overridden only with the readdressing of MY\_SRC contents to avoid compilation conflicts due to duplicate routines.  \\ \\
+
+All modifications illustrated above, can be easily implemented using shell or python scripting to edit the NEMO configuration cpp.fcm file and to create the BGC model specific FCM compilation file with code paths.
 
 \end{document}
