PyNEMO.tex 10.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
%description: Book template

% template of document for LaTeX
% (C) Xavier Perseguers 2002 - xavier.perseguers@epfl.ch

\documentclass[a4paper,11pt]{book}
%\documentclass[a4paper,11pt,makeidx]{book} <== may need this to generate index

%  makeindex NEMO_BDY_tools     <== to regenerate the index
%  bibtex         NEMO_BDY_tools	<== to generate  the bibliography

% ================================================================
% HEADERS DEFINITION
% ================================================================

\usepackage[french]{babel}
%\usepackage{color}
\usepackage{xcolor}
%\usepackage{graphics}				% allows insertion of pictures
\usepackage{graphicx}				% allows insertion of pictures
\usepackage[capbesideposition={top,center}]{floatrow} % allows captions
\floatsetup[table]{style=plaintop}                                   % beside pictures
\usepackage[margin=10pt,font={small},labelsep=colon,labelfont={bf}]{caption} % Gives small font for captions
\usepackage{enumitem}                          % allows non-bold description items
%\usepackage{colortbl}                           % gives coloured panels behind table columns

%hyperref
\usepackage[					%
  pdftitle={NEMO BDY tools},	%
  pdfauthor={James Harle},		% pdfsubject={The preprint document class
                           				% elsart},% pdfkeywords={diapycnal diffusion,numerical mixing,z-level models},%
  pdfstartview=FitH,				%
  bookmarks=true,				%
  bookmarksopen=true,			%
  breaklinks=true,				%
  colorlinks=true,				%
  linkcolor=blue,anchorcolor=blue,	%
  citecolor=blue,filecolor=blue,		%
 menucolor=blue,                   	%
  urlcolor=blue]{hyperref}
%  usage of exteranl hyperlink :  \href{mailto:my_address@wikibooks.org}{my\_address@wikibooks.org}
%                                                 \url{http://www.wikibooks.org}
%                                     or         \href{http://www.wikibooks.org}{wikibooks home}



%%%% page styles etc................
\usepackage{fancyhdr}
\pagestyle{fancy}
% with this we ensure that the chapter and section
% headings are in lowercase.
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
\fancyhf{}             % delete current setting for header and footer
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{2.6pt}   % make space for the rule
%\addtolength{\headheight}{1.6pt}   % make space for the rule
\fancypagestyle{plain}{
  \fancyhead{}         % get rid of headers on plain pages
  \renewcommand{\headrulewidth}{0pt}  % and the line
}


%%%%  Section number in Margin.......
% typeset the number of each section in the left margin, with the start of each instance of
% sectional heading text aligned with the left hand edge of  the body text.
\makeatletter
\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}}
\makeatother

% Leave blank pages completely empty, w/o header
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  \hbox{}
  \vspace*{\fill}
  \vspace{\fill}
  \thispagestyle{empty}
  \newpage
  \if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

%%%% define the chapter  style ................
\usepackage{minitoc}				%In French : \usepackage[french]{minitoc}
%\usepackage{mtcoff}				% invalidate the use of minitocs
\usepackage{fancybox}

\makeatletter
\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax}
\def\LignesVerticales{%
  \let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
\def\GrosCarreAvecUnChiffre#1{%
  \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
 \rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}%
  \vrule height 0pt width 1cm depth 0pt}
\def\GrosCarreAvecTroisChiffre#1{%
  \rlap{\vrule height 0.8cm width 1.6cm depth 0.2cm}%
 \rlap{\hbox to 1.5cm{\hss\mbox{\color{white} #1}\hss}}%
  \vrule height 0pt width 1cm depth 0pt}

\def\@makechapterhead#1{\hbox{%
   \huge
    \LignesVerticales
    \hspace{-0.5cm}%
    \GrosCarreAvecUnChiffre{\thechapter}
    \hspace{0.2cm}\hbox{#1}%
%    \GrosCarreAvecTroisChiffre{\thechapter}
%    \hspace{1cm}\hbox{#1}%
%}\par\vskip 2cm}
}\par\vskip 1cm}
\def\@makeschapterhead#1{\hbox{%
   \huge
    \LignesVerticales
    %\hspace{0.5cm}%
    \hbox{#1}%
}\par\vskip 2cm}
\makeatother

%\def\thechapter{\Roman{chapter}}   	% chapter number to be Roman


%%%%           Mathematics...............
%\documentclass{amsart}
\usepackage{xspace}                              % helpd ensure correct spacing after macros
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{amsmath}
\allowdisplaybreaks[1]				% allow page breaks in the middle of equations
\usepackage{./TexFiles/math_abbrev}    % use maths shortcuts


\usepackage{times}				 	 % use times font for text
%\usepackage{mathtime}                          % font for illustrator to work (belleek fonts )
%\usepackage[latin1]{inputenc}                % allows some unicode removed (agn)


%%% essai commande
\newcommand{\nl} [1] {\texttt{\small {\textcolor{blue}{#1}} } }
\newcommand{\nlv} [1] {\texttt{\footnotesize#1}\xspace}
\newcommand{\smnlv} [1] {\texttt{\scriptsize#1}\xspace}

%%%% namelist & code display................................
\usepackage{alltt}  		%%  alltt for namelist
\usepackage{verbatim}  	%%  alltt for namelist
% namelists
\newcommand{\namdisplay} [1] {
\begin{alltt}

{\tiny \verbatiminput{#1}}
\end{alltt}
  \vspace{-10pt}
}
% code display
%\newcommand{\codedisplay} [1] { \begin{alltt} {\tiny  {\begin{verbatim} {#1}} \end{verbatim} }  \end{alltt}   }



%%%% commands for working with text................................
% command to "comment out" portions of text ({} argument) or not ({#1} argument)
\newcommand{\amtcomment}[1]{}   	% command to "commented out" portions of text or not (#1 in argument)
\newcommand{\sgacomment}[1]{}   	% command to "commented out" portions of
\newcommand{\gmcomment}[1]{}   	% command to "commented out" portions of
%                                    				% text that span line breaks
%Red (NR) or Yellow(WARN)
%\newcommand{\NR} {\colorbox{red}{#1}}
%\newcommand{\WARN} {{ \colorbox{yellow}{#1}} }



%%% index commands......................
\usepackage{makeidx}
%\usepackage{showidx}				% show the index entry

\newcommand{\mdl} [1] {\textit{#1.F90}\index{Modules!#1}}			%module (mdl)
\newcommand{\rou} [1] {\textit{#1}\index{Routines!#1}}				%module (routine)
\newcommand{\hf} [1] {\textit{#1.h90}\index{h90 file!#1}}				%module (h90 files)
\newcommand{\np} [1] {\textit{#1}\index{Namelist parameters!#1}}		%namelist parameter (nampar)
\newcommand{\jp} [1] {\textit{#1}\index{Model parameters!#1}}			%model parameter (jp)
\newcommand{\pp} [1] {\textit{#1}\index{Model parameters!#1}}		 	%namelist parameter (pp)
\newcommand{\ifile} [1] {\textit{#1.nc}\index{Input NetCDF files!#1.nc}}	%input NetCDF files (.nc)
\newcommand{\key} [1] {\textbf{key\_#1}\index{CPP keys!key\_#1}}	%key_cpp (key)
\newcommand{\NEMO} {\textit{NEMO}\xspace}						%NEMO (nemo)

%%%%   Bibliography   .............
\usepackage[nottoc, notlof, notlot]{tocbibind}
\usepackage[square, comma]{natbib}
\bibpunct{[}{]}{,}{a}{}{;}                           %suppress "," after "et al."
\providecommand{\bibfont}{\small}


% ================================================================
% FRONT PAGE
% ================================================================

%\usepackage{pstricks}
\title{
%\psset{unit=1.1in,linewidth=4pt} 	%parameters of the units for pstricks
% \rput(0,2){ \includegraphics[width=1.1\textwidth]{./TexFiles/Figures/logo_ALL.pdf}             } \\
% \vspace{0.1cm}
\vspace{-6.0cm}
%\includegraphics[width=1.1\textwidth]{./TexFiles/Figures/logo_ALL.pdf}\\
\vspace{5.1cm}
\includegraphics[width=0.9\textwidth]{./TexFiles/Figures/NEMO_logo_Black.pdf} \\
\vspace{1.4cm}
\rule{345pt}{1.5pt} \\
\vspace{0.45cm}
210
{\Huge PyNEMO}
211 212 213 214
\rule{345pt}{1.5pt} \\
 }
%{ -- Draft --}   }
\date{\today \\
215
{\small  -- version 0.1.0 --} \\
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
}
%\date{
%January 2012  \\
%{\small  -- version 3.4 --} \\
%~  \\
%\textit{\small Note du P\^ole de mod\'{e}lisation de l'Institut Pierre-Simon Laplace No 27 }\\
%\vspace{0.45cm}
%{ ISSN No 1288-1619.}
%}


\author{
\Large James Harle  \\
 \texttt{\small jdha@noc.ac.uk} \\
{\small National Oceanography Centre, Liverpool, UK}
}

\dominitoc
\makeindex  		%type this first :     makeindex -s NEMO.ist NEMO_book.idx

% ================================================================
%      Include ONLY order
% ================================================================

%\includeonly{./TexFiles/Chapters/Chap_MISC}
%\includeonly{./TexFiles/Chapters/Chap_ZDF}
%\includeonly{./TexFiles/Chapters/Chap_STP,./TexFiles/Chapters/Chap_SBC,./TexFiles/Chapters/Chap_TRA}
%\includeonly{./TexFiles/Chapters/Chap_LBC,./TexFiles/Chapters/Chap_MISC}
%\includeonly{./TexFiles/Chapters/Chap_Model_Basics}
%\includeonly{./TexFiles/Chapters/Annex_A,./TexFiles/Chapters/Annex_B,./TexFiles/Chapters/Annex_C,./TexFiles/Chapters/Annex_D}

% ================================================================
% ================================================================
\begin{document}

\maketitle						% generate the title

\frontmatter

\tableofcontents					% generate a table of contents
%\listoffigures					% generate a list  of figures
%\listoftables					        % generate a list of tables

\mainmatter

% ================================================================
% Abstract - Foreword
% ================================================================

\include{./TexFiles/Chapters/Abstracts_Foreword}

% ================================================================
% INTRODUCTION
% ================================================================

\include{./TexFiles/Chapters/Introduction}

% ================================================================
% CHAPTERS
% ================================================================

\include{./TexFiles/Chapters/Chap_qs}

\include{./TexFiles/Chapters/Chap_Setup}

\include{./TexFiles/Chapters/Chap_examples}

% bit on code style , harmonisation, f-c and python coding conventions

% ================================================================
% INDEX
% ================================================================

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

% ================================================================
% BIBLIOGRAPHY
% ================================================================

%%\bibliographystyle{plainat}
\bibliographystyle{./TexFiles/ametsoc}		% AMS biblio style (JPO)
\bibliography{./TexFiles/Biblio/Biblio}

% ================================================================
\end{document}