%% Global custom commands: \newcommand{<name>}[<args>][<first argument value>]{<code>}
%% ==============================================================================

%% NEMO and Fortran in small capitals
\newcommand{\NEMO}{\textsc{nemo}}
\newcommand{\fortran}{\textsc{Fortran}}
\newcommand{\fninety}{\textsc{Fortran 90}}

%% Common aliases
\renewcommand{\deg}[1][]{\ensuremath{^{\circ}#1}}
\newcommand{\zstar }{\ensuremath{z^\star}}
\newcommand{\sstar }{\ensuremath{s^\star}}
\newcommand{\ztilde}{\ensuremath{\tilde z}}
\newcommand{\stilde}{\ensuremath{\tilde s}}
\newcommand{\ie}{\ensuremath{i.e.}}
\newcommand{\eg}{\ensuremath{e.g.}}

%% Inline maths
\newcommand{\fractext}[2]{\textstyle \frac{#1}{#2}}
\newcommand{\rdt}{\Delta t}

%% Text env. for Gurvan
\newcommand{\gmcomment}[1]{}

%% Index entries (italic font for files, preformat for code)
\newcommand{\hf}[1]{\textit{#1.h90}            \index{h90 files!#1}}
\newcommand{\ifile}[1]{\textit{#1.nc}          \index{Input NetCDF files!#1.nc}}
\newcommand{\jp}[1]{\texttt{#1}                \index{Model parameters!#1}}
\newcommand{\key}[1]{\texttt{\textbf{key\_#1}} \index{CPP keys!key\_#1}}
\newcommand{\mdl}[1]{\textit{#1.F90}           \index{Modules!#1}}
\newcommand{\ngn}[1]{\texttt{#1}               \index{Namelist Group Names!#1}}
\newcommand{\np}[1]{\texttt{#1}                \index{Namelist parameters!#1}}
\newcommand{\rou}[1]{\texttt{#1}               \index{Routines!#1}}

%% Maths
\newcommand{\lt}{\left}
\newcommand{\rt}{\right}
\newcommand{\vect}[1]{\ensuremath{\mathbf{#1}}}
\newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}}

%% Namelists inclusion
\newcommand{\nlst}[1]{\forfile{../../../namelists/#1}}
