%% ==============================================================================
%% NEMO_book.tex: build the NEMO Reference Manual
%% ==============================================================================


%% Run build_NEMO_manual.sh to generate the PDF version (with pdflatex)


%% Preamble
%% ==============================================================================

\include{texfiles/preamble}

\begin{document}


%% 'minted' env. & shortcuts for syntax highlighting

\setminted[fortran]{fontsize=\tiny, breaklines}
\newminted{fortran}{}			% \begin{fortrancode}
\newmintinline{fortran}{}		% \fortraninline
\newmintedfile{fortran}{}		% \fortranfile
\newminted{xml}{fontsize=\tiny, breaklines}
\newminted{sh}{}
\newminted{c}{}


%% Frontmatter
%% ==============================================================================

\include{texfiles/top_matter}


%% Frontpage

\maketitle
\frontmatter


%% ToC i.e. Table of Contents

\dominitoc
\tableofcontents


%% Mainmatter
%% ==============================================================================

\mainmatter


%% Abstract - Foreword

\subfile{texfiles/chapters/abstract_foreword}


% Introduction

\subfile{texfiles/chapters/introduction}


% Chapters

\subfile{texfiles/chapters/chap_model_basics}

\subfile{texfiles/chapters/chap_step}				% Time discretisation (time stepping strategy)

\subfile{texfiles/chapters/chap_DOM}				% Space discretisation

\subfile{texfiles/chapters/chap_TRA}				% Tracer advection/diffusion equation

\subfile{texfiles/chapters/chap_DYN}				% Dynamics : momentum equation

\subfile{texfiles/chapters/chap_SBC}				% Surface Boundary Conditions

\subfile{texfiles/chapters/chap_LBC}				% Lateral Boundary Conditions

\subfile{texfiles/chapters/chap_LDF}				% Lateral diffusion

\subfile{texfiles/chapters/chap_ZDF}				% Vertical diffusion

\subfile{texfiles/chapters/chap_DIA}				% Outputs and Diagnostics

\subfile{texfiles/chapters/chap_OBS}				% Observation operator

\subfile{texfiles/chapters/chap_ASM}				% Assimilation increments

\subfile{texfiles/chapters/chap_STO}				% Stochastic param.

\subfile{texfiles/chapters/chap_misc}				% Miscellaneous topics

\subfile{texfiles/chapters/chap_CONFIG}			% Predefined configurations


% Appendix

\appendix

\subfile{texfiles/chapters/annex_A}					% Generalised vertical coordinate

\subfile{texfiles/chapters/annex_B}					% Diffusive operator

\subfile{texfiles/chapters/annex_C}					% Discrete invariants of the eqs.

\subfile{texfiles/chapters/annex_iso}				% Isoneutral diffusion using triads

\subfile{texfiles/chapters/annex_D}					% Coding rules

%% Not included
%\subfile{texfiles/chapters/chap_conservation}	%
%\subfile{texfiles/chapters/annex_E}				% Notes on some on going staff
%\subfile{texfiles/chapters/annex_Fox-Kemper}	% Notes on Fox-Kemper
%\subfile{texfiles/chapters/annex_EVP}				% Notes on EVP


%% Backmatter
%% ==============================================================================

\backmatter


%% Index

%\addcontentsline{toc}{chapter}{Index}
\printindex


%% Bibliography

\bibliography{texfiles/bibliography/NEMO_manual}


\end{document}
