New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 7351 for branches/2016/dev_INGV_UKMO_2016/DOC – NEMO

Ignore:
Timestamp:
2016-11-28T17:04:10+01:00 (7 years ago)
Author:
emanuelaclementi
Message:

ticket #1805 step 3: /2016/dev_INGV_UKMO_2016 aligned to the trunk at revision 7161

Location:
branches/2016/dev_INGV_UKMO_2016/DOC
Files:
9 deleted
27 edited
10 copied

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_INGV_UKMO_2016/DOC/NEMO_book.tex

    r5405 r7351  
    44% (C) Xavier Perseguers 2002 - xavier.perseguers@epfl.ch 
    55 
    6 \documentclass[a4paper,11pt]{book} 
    7 %\documentclass[a4paper,11pt,makeidx]{book} <== may need this to generate index 
     6% ================================================================ 
     7% PREAMBLE 
     8% ================================================================ 
    89 
    9 %  makeindex NEMO_book     <== to regenerate the index 
    10 %  bibtex         NEMO_book   <== to generate  the bibliography 
     10\include{TexFiles/Preamble} 
    1111 
    1212% ================================================================ 
    13 % HEADERS DEFINITION 
     13% TOP MATTER 
    1414% ================================================================ 
    1515 
    16 \usepackage[french]{babel} 
    17 %\usepackage{color} 
    18 \usepackage{xcolor} 
    19 %\usepackage{graphics}           % allows insertion of pictures 
    20 \usepackage{graphicx}            % allows insertion of pictures 
    21 \usepackage[capbesideposition={top,center}]{floatrow} % allows captions 
    22 \floatsetup[table]{style=plaintop}                                   % beside pictures 
    23 \usepackage[margin=10pt,font={small},labelsep=colon,labelfont={bf}]{caption} % Gives small font for captions 
    24 \usepackage{enumitem}                          % allows non-bold description items 
    25 \usepackage{longtable}                         % allows multipage tables 
    26 %\usepackage{colortbl}                           % gives coloured panels behind table columns 
    27  
    28 %hyperref 
    29 \usepackage[               % 
    30   pdftitle={NEMO ocean engine},  % 
    31   pdfauthor={Gurvan Madec},      % pdfsubject={The preprint document class 
    32                                        % elsart},% pdfkeywords={diapycnal diffusion,numerical mixing,z-level models},% 
    33   pdfstartview=FitH,          % 
    34   bookmarks=true,          % 
    35   bookmarksopen=true,         % 
    36   breaklinks=true,            % 
    37   colorlinks=true,            % 
    38   linkcolor=blue,anchorcolor=blue,  % 
    39   citecolor=blue,filecolor=blue,    % 
    40  menucolor=blue,                    % 
    41   urlcolor=blue]{hyperref} 
    42 %  usage of exteranl hyperlink :  \href{mailto:my_address@wikibooks.org}{my\_address@wikibooks.org} 
    43 %                                                 \url{http://www.wikibooks.org} 
    44 %                                     or         \href{http://www.wikibooks.org}{wikibooks home} 
    45  
    46  
    47  
    48 %%%% page styles etc................ 
    49 \usepackage{fancyhdr} 
    50 \pagestyle{fancy} 
    51 % with this we ensure that the chapter and section 
    52 % headings are in lowercase. 
    53 \renewcommand{\chaptermark}[1]{\markboth{#1}{}} 
    54 \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} 
    55 \fancyhf{}             % delete current setting for header and footer 
    56 \fancyhead[LE,RO]{\bfseries\thepage} 
    57 \fancyhead[LO]{\bfseries\hspace{-0em}\rightmark} 
    58 \fancyhead[RE]{\bfseries\leftmark} 
    59 \renewcommand{\headrulewidth}{0.5pt} 
    60 \renewcommand{\footrulewidth}{0pt} 
    61 \addtolength{\headheight}{2.6pt}   % make space for the rule 
    62 %\addtolength{\headheight}{1.6pt}   % make space for the rule 
    63 \fancypagestyle{plain}{ 
    64   \fancyhead{}         % get rid of headers on plain pages 
    65   \renewcommand{\headrulewidth}{0pt}  % and the line 
    66 } 
    67  
    68  
    69 %%%%  Section number in Margin....... 
    70 % typeset the number of each section in the left margin, with the start of each instance of 
    71 % sectional heading text aligned with the left hand edge of  the body text. 
    72 \makeatletter 
    73 \def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}} 
    74 \makeatother 
    75  
    76 % Leave blank pages completely empty, w/o header 
    77 \makeatletter 
    78 \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else 
    79   \hbox{} 
    80   \vspace*{\fill} 
    81   \vspace{\fill} 
    82   \thispagestyle{empty} 
    83   \newpage 
    84   \if@twocolumn\hbox{}\newpage\fi\fi\fi} 
    85 \makeatother 
    86  
    87 %%%% define the chapter  style ................ 
    88 \usepackage{minitoc}          %In French : \usepackage[french]{minitoc} 
    89 %\usepackage{mtcoff}          % invalidate the use of minitocs 
    90 \usepackage{fancybox} 
    91  
    92 \makeatletter 
    93 \def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax} 
    94 \def\LignesVerticales{% 
    95   \let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV} 
    96 \def\GrosCarreAvecUnChiffre#1{% 
    97   \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}% 
    98  \rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}% 
    99   \vrule height 0pt width 1cm depth 0pt} 
    100 \def\GrosCarreAvecTroisChiffre#1{% 
    101   \rlap{\vrule height 0.8cm width 1.6cm depth 0.2cm}% 
    102  \rlap{\hbox to 1.5cm{\hss\mbox{\color{white} #1}\hss}}% 
    103   \vrule height 0pt width 1cm depth 0pt} 
    104  
    105 \def\@makechapterhead#1{\hbox{% 
    106    \huge 
    107     \LignesVerticales 
    108     \hspace{-0.5cm}% 
    109     \GrosCarreAvecUnChiffre{\thechapter} 
    110     \hspace{0.2cm}\hbox{#1}% 
    111 %    \GrosCarreAvecTroisChiffre{\thechapter} 
    112 %    \hspace{1cm}\hbox{#1}% 
    113 %}\par\vskip 2cm} 
    114 }\par\vskip 1cm} 
    115 \def\@makeschapterhead#1{\hbox{% 
    116    \huge 
    117     \LignesVerticales 
    118     %\hspace{0.5cm}% 
    119     \hbox{#1}% 
    120 }\par\vskip 2cm} 
    121 \makeatother 
    122  
    123 %\def\thechapter{\Roman{chapter}}      % chapter number to be Roman 
    124  
    125  
    126 %%%%           Mathematics............... 
    127 %\documentclass{amsart} 
    128 \usepackage{xspace}                              % helpd ensure correct spacing after macros 
    129 \usepackage{latexsym} 
    130 \usepackage{amssymb} 
    131 \usepackage{amsmath} 
    132 \allowdisplaybreaks[1]           % allow page breaks in the middle of equations 
    133 \usepackage{./TexFiles/math_abbrev}    % use maths shortcuts 
    134  
    135  
    136 \usepackage{times}                % use times font for text 
    137 %\usepackage{mathtime}                          % font for illustrator to work (belleek fonts ) 
    138 %\usepackage[latin1]{inputenc}                % allows some unicode removed (agn) 
    139  
    140  
    141 %%% essai commande 
    142 \newcommand{\nl} [1] {\texttt{\small {\textcolor{blue}{#1}} } } 
    143 \newcommand{\nlv} [1] {\texttt{\footnotesize#1}\xspace} 
    144 \newcommand{\smnlv} [1] {\texttt{\scriptsize#1}\xspace} 
    145  
    146 %%%% namelist & code display................................ 
    147 \usepackage{alltt}      %%  alltt for namelist 
    148 \usepackage{verbatim}   %%  alltt for namelist 
    149 % namelists 
    150 \newcommand{\namdisplay} [1] { 
    151 \begin{alltt} 
    152 {\tiny \verbatiminput{./TexFiles/Namelist/#1}} 
    153 \end{alltt} 
    154   \vspace{-10pt} 
    155 } 
    156 % code display 
    157 %\newcommand{\codedisplay} [1] { \begin{alltt} {\tiny  {\begin{verbatim} {#1}} \end{verbatim} }  \end{alltt}   } 
    158  
    159  
    160  
    161 %%%% commands for working with text................................ 
    162 % command to "comment out" portions of text ({} argument) or not ({#1} argument) 
    163 \newcommand{\amtcomment}[1]{}    % command to "commented out" portions of text or not (#1 in argument) 
    164 \newcommand{\sgacomment}[1]{}    % command to "commented out" portions of 
    165 \newcommand{\gmcomment}[1]{}     % command to "commented out" portions of 
    166 %                                               % text that span line breaks 
    167 %Red (NR) or Yellow(WARN) 
    168 %\newcommand{\NR} {\colorbox{red}{#1}} 
    169 %\newcommand{\WARN} {{ \colorbox{yellow}{#1}} } 
    170  
    171  
    172  
    173 %%% index commands...................... 
    174 \usepackage{makeidx} 
    175 %\usepackage{showidx}            % show the index entry 
    176  
    177 \newcommand{\mdl} [1] {\textit{#1.F90}\index{Modules!#1}}         %module (mdl) 
    178 \newcommand{\rou} [1] {\textit{#1}\index{Routines!#1}}            %module (routine) 
    179 \newcommand{\hf} [1] {\textit{#1.h90}\index{h90 file!#1}}            %module (h90 files) 
    180 \newcommand{\ngn} [1] {\textit{#1}\index{Namelist Group Name!#1}}    %namelist name (nampar) 
    181 \newcommand{\np} [1] {\textit{#1}\index{Namelist variables!#1}}             %namelist variable 
    182 \newcommand{\jp} [1] {\textit{#1}\index{Model parameters!#1}}        %model parameter (jp) 
    183 \newcommand{\pp} [1] {\textit{#1}\index{Model parameters!#1}}        %namelist parameter (pp) 
    184 \newcommand{\ifile} [1] {\textit{#1.nc}\index{Input NetCDF files!#1.nc}}   %input NetCDF files (.nc) 
    185 \newcommand{\key} [1] {\textbf{key\_#1}\index{CPP keys!key\_#1}}  %key_cpp (key) 
    186 \newcommand{\NEMO} {\textit{NEMO}\xspace}                %NEMO (nemo) 
    187  
    188 %%%%   Bibliography   ............. 
    189 \usepackage[nottoc, notlof, notlot]{tocbibind} 
    190 \usepackage[square, comma]{natbib} 
    191 \bibpunct{[}{]}{,}{a}{}{;}                           %suppress "," after "et al." 
    192 \providecommand{\bibfont}{\small} 
    193  
     16\include{TexFiles/Top_Matter} 
    19417 
    19518% ================================================================ 
    196 % FRONT PAGE 
    197 % ================================================================ 
    198  
    199 %\usepackage{pstricks} 
    200 \title{ 
    201 %\psset{unit=1.1in,linewidth=4pt}   %parameters of the units for pstricks 
    202 % \rput(0,2){ \includegraphics[width=1.1\textwidth]{./TexFiles/Figures/logo_ALL.pdf}             } \\ 
    203 % \vspace{0.1cm} 
    204 \vspace{-6.0cm} 
    205 \includegraphics[width=1.1\textwidth]{./TexFiles/Figures/logo_ALL.pdf}\\ 
    206 \vspace{5.1cm} 
    207 \includegraphics[width=0.9\textwidth]{./TexFiles/Figures/NEMO_logo_Black.pdf} \\ 
    208 \vspace{1.4cm} 
    209 \rule{345pt}{1.5pt} \\ 
    210 \vspace{0.45cm} 
    211 {\Huge NEMO ocean engine} 
    212 \rule{345pt}{1.5pt} \\ 
    213  } 
    214 %{ -- Draft --}   } 
    215 %\date{\today} 
    216 \date{ 
    217 November 2014  \\ 
    218 {\small  -- version 3.6 --} \\ 
    219 ~  \\ 
    220 \textit{\small Note du P\^ole de mod\'{e}lisation de l'Institut Pierre-Simon Laplace No 27 }\\ 
    221 \vspace{0.45cm} 
    222 { ISSN No 1288-1619.} 
    223 } 
    224  
    225  
    226 \author{ 
    227 \Large Gurvan Madec, and the NEMO team  \\ 
    228  \texttt{\small gurvan.madec@locean-ipsl.umpc.fr} \\ 
    229  \texttt{\small nemo\_st@locean-ipsl.umpc.fr} \\ 
    230 %{\small Laboratoire d'Oc\'{e}anographie  et du Climat: Exp\'{e}rimentation et Approches Num\'{e}riques } 
    231 } 
    232  
    233 \dominitoc 
    234 \makeindex        %type this first :     makeindex -s NEMO.ist NEMO_book.idx 
    235  
    236 % ================================================================ 
    237 %      Include ONLY order 
    238 % ================================================================ 
    239  
    240 %\includeonly{./TexFiles/Chapters/Chap_MISC} 
    241 %\includeonly{./TexFiles/Chapters/Chap_ZDF} 
    242 %\includeonly{./TexFiles/Chapters/Chap_STP,./TexFiles/Chapters/Chap_SBC,./TexFiles/Chapters/Chap_TRA} 
    243 %\includeonly{./TexFiles/Chapters/Chap_LBC,./TexFiles/Chapters/Chap_MISC} 
    244 %\includeonly{./TexFiles/Chapters/Chap_Model_Basics} 
    245 %\includeonly{./TexFiles/Chapters/Annex_A,./TexFiles/Chapters/Annex_B,./TexFiles/Chapters/Annex_C,./TexFiles/Chapters/Annex_D} 
    246  
    247 % ================================================================ 
     19% DOCUMENT 
    24820% ================================================================ 
    24921 
     
    26436% ================================================================ 
    26537 
    266 \include{./TexFiles/Chapters/Abstracts_Foreword} 
     38\subfile{TexFiles/Chapters/Abstracts_Foreword} 
    26739 
    26840% ================================================================ 
     
    27042% ================================================================ 
    27143 
    272 \include{./TexFiles/Chapters/Introduction} 
     44\subfile{TexFiles/Chapters/Introduction} 
    27345 
    27446% ================================================================ 
     
    27648% ================================================================ 
    27749 
    278 \include{./TexFiles/Chapters/Chap_Model_Basics} 
     50\subfile{TexFiles/Chapters/Chap_Model_Basics} 
    27951 
    280 \include{./TexFiles/Chapters/Chap_STP}       % Time discretisation (time stepping strategy) 
     52\subfile{TexFiles/Chapters/Chap_STP}         % Time discretisation (time stepping strategy) 
    28153 
    282 \include{./TexFiles/Chapters/Chap_DOM}       % Space discretisation 
     54\subfile{TexFiles/Chapters/Chap_DOM}         % Space discretisation 
    28355 
    284 \include{./TexFiles/Chapters/Chap_TRA}       % Tracer advection/diffusion equation 
     56\subfile{TexFiles/Chapters/Chap_TRA}         % Tracer advection/diffusion equation 
    28557 
    286 \include{./TexFiles/Chapters/Chap_DYN}       % Dynamics : momentum equation 
     58\subfile{TexFiles/Chapters/Chap_DYN}         % Dynamics : momentum equation 
    28759 
    288 \include{./TexFiles/Chapters/Chap_SBC}       % Surface Boundary Conditions 
     60\subfile{TexFiles/Chapters/Chap_SBC}         % Surface Boundary Conditions 
    28961 
    290 \include{./TexFiles/Chapters/Chap_LBC}       % Lateral Boundary Conditions 
     62\subfile{TexFiles/Chapters/Chap_LBC}         % Lateral Boundary Conditions 
    29163 
    292 \include{./TexFiles/Chapters/Chap_LDF}       % Lateral diffusion 
     64\subfile{TexFiles/Chapters/Chap_LDF}         % Lateral diffusion 
    29365 
    294 \include{./TexFiles/Chapters/Chap_ZDF}       % Vertical diffusion 
     66\subfile{TexFiles/Chapters/Chap_ZDF}         % Vertical diffusion 
    29567 
    296 \include{./TexFiles/Chapters/Chap_DIA}       % Outputs and Diagnostics 
     68\subfile{TexFiles/Chapters/Chap_DIA}         % Outputs and Diagnostics 
    29769 
    298 \include{./TexFiles/Chapters/Chap_OBS}          % Observation operator 
     70\subfile{TexFiles/Chapters/Chap_OBS}                    % Observation operator 
    29971 
    300 \include{./TexFiles/Chapters/Chap_ASM}          % Assimilation increments 
     72\subfile{TexFiles/Chapters/Chap_ASM}                    % Assimilation increments 
    30173 
    302 \include{./TexFiles/Chapters/Chap_STO}          % Stochastic param. 
     74\subfile{TexFiles/Chapters/Chap_STO}                    % Stochastic param. 
    30375 
    304 \include{./TexFiles/Chapters/Chap_MISC}         % Miscellaneous topics 
     76\subfile{TexFiles/Chapters/Chap_MISC}        % Miscellaneous topics 
    30577 
    306 \include{./TexFiles/Chapters/Chap_CFG}       % Predefined configurations 
     78\subfile{TexFiles/Chapters/Chap_CFG}         % Predefined configurations 
    30779 
    30880% ================================================================ 
     
    31284\appendix 
    31385 
    314 %\include{./TexFiles/Chapters/Chap_Conservation} 
    315 \include{./TexFiles/Chapters/Annex_A}        % generalised vertical coordinate 
    316 \include{./TexFiles/Chapters/Annex_B}        % diffusive operator 
    317 \include{./TexFiles/Chapters/Annex_C}        % Discrete invariants of the eqs. 
    318 \include{./TexFiles/Chapters/Annex_D}        % Coding rules 
    319 \include{./TexFiles/Chapters/Annex_ISO}                     % Isoneutral diffusion using triads 
    320 %\include{./TexFiles/Chapters/Annex_E}                   % Notes on some on going staff (no included in the DOC) 
    321 %\include{./TexFiles/Chapters/Annex_Fox-Kemper}   % Notes on Fox-Kemper (no included in the DOC) 
    322 %\include{./TexFiles/Chapters/Annex_EVP}           % Notes on EVP (no included in the DOC) 
     86%\subfile{TexFiles/Chapters/Chap_Conservation} 
     87\subfile{TexFiles/Chapters/Annex_A}       % generalised vertical coordinate 
     88\subfile{TexFiles/Chapters/Annex_B}       % diffusive operator 
     89\subfile{TexFiles/Chapters/Annex_C}       % Discrete invariants of the eqs. 
     90\subfile{TexFiles/Chapters/Annex_ISO}                    % Isoneutral diffusion using triads 
     91\subfile{TexFiles/Chapters/Annex_D}       % Coding rules 
     92%\subfile{TexFiles/Chapters/Annex_E}                     % Notes on some on going staff (no included in the DOC) 
     93%\subfile{TexFiles/Chapters/Annex_Fox-Kemper}   % Notes on Fox-Kemper (no included in the DOC) 
     94%\subfile{TexFiles/Chapters/Annex_EVP}          % Notes on EVP (no included in the DOC) 
    32395 
    32496% ================================================================ 
     
    334106 
    335107%%\bibliographystyle{plainat} 
    336 \bibliographystyle{./TexFiles/ametsoc}    % AMS biblio style (JPO) 
    337 \bibliography{./TexFiles/Biblio/Biblio} 
     108\bibliographystyle{TexFiles/Styles/ametsoc}     % AMS biblio style (JPO) 
     109\bibliography{TexFiles/Bibliography/Biblio} 
    338110 
    339111% ================================================================ 
  • branches/2016/dev_INGV_UKMO_2016/DOC/NEMO_coding.conv.tex

    r2738 r7351  
    77\usepackage{framed}  
    88\usepackage{makeidx}  
    9  
     9\graphicspath{{Figures/}} 
    1010 
    1111%%%%%%% 
     
    3131 
    3232\title{  
    33 \includegraphics[width=0.3\textwidth]{./TexFiles/Figures/NEMO_logo_Black.pdf} \\ 
     33\includegraphics[width=0.3\textwidth]{NEMO_logo_Black} \\ 
    3434\vspace{1.0cm} 
    3535\rule{345pt}{1.5pt} \\ 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Abstracts_Foreword.tex

    r3294 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13 
    24% ================================================================ 
     
    1315be a flexible tool for studying the ocean and its interactions with the others components of  
    1416the earth climate system over a wide range of space and time scales.  
    15 Prognostic variables are the three-dimensional velocity field, a linear  
    16 or non-linear sea surface height, the temperature and the salinity. In the horizontal direction,  
    17 the model uses a curvilinear orthogonal grid and in the vertical direction, a full or partial step  
    18 $z$-coordinate, or $s$-coordinate, or a mixture of the two. The distribution of variables is a  
    19 three-dimensional Arakawa C-type grid. Various physical choices are available to describe  
    20 ocean physics, including TKE, GLS and KPP vertical physics. Within NEMO, the ocean is  
    21 interfaced with a sea-ice model (LIM v2 and v3), passive tracer and biogeochemical models (TOP)  
    22 and, via the OASIS coupler, with several atmospheric general circulation models. It also  
    23 support two-way grid embedding via the AGRIF software. 
     17Prognostic variables are the three-dimensional velocity field, a non-linear sea surface height,  
     18the \textit{Conservative} Temperature and the \textit{Absolute} Salinity.  
     19In the horizontal direction, the model uses a curvilinear orthogonal grid and in the vertical direction,  
     20a full or partial step $z$-coordinate, or $s$-coordinate, or a mixture of the two.  
     21The distribution of variables is a three-dimensional Arakawa C-type grid.  
     22Various physical choices are available to describe ocean physics, including TKE, and GLS vertical physics.  
     23Within NEMO, the ocean is interfaced with a sea-ice model (LIM or CICE), passive tracer and  
     24biogeochemical models (TOP) and, via the OASIS coupler, with several atmospheric general circulation models.  
     25It also support two-way grid embedding via the AGRIF software. 
    2426 
    2527% ================================================================ 
    26  \vspace{0.5cm} 
     28% \vspace{0.5cm} 
    2729 
    28 Le moteur oc\'{e}anique de NEMO (Nucleus for European Modelling of the Ocean) est un  
    29 mod\`{e}le aux \'{e}quations primitives de la circulation oc\'{e}anique r\'{e}gionale et globale.  
    30 Il se veut un outil flexible pour \'{e}tudier sur un vaste spectre spatiotemporel l'oc\'{e}an et ses  
    31 interactions avec les autres composantes du syst\`{e}me climatique terrestre.  
    32 Les variables pronostiques sont le champ tridimensionnel de vitesse, une hauteur de la mer  
    33 lin\'{e}aire ou non, la temperature et la salinit\'{e}.  
    34 La distribution des variables se fait sur une grille C d'Arakawa tridimensionnelle utilisant une  
    35 coordonn\'{e}e verticale $z$ \`{a} niveaux entiers ou partiels, ou une coordonn\'{e}e s, ou encore  
    36 une combinaison des deux. Diff\'{e}rents choix sont propos\'{e}s pour d\'{e}crire la physique  
    37 oc\'{e}anique, incluant notamment des physiques verticales TKE, GLS et KPP. A travers l'infrastructure  
    38 NEMO, l'oc\'{e}an est interfac\'{e} avec des mod\`{e}les de glace de mer, de biog\'{e}ochimie  
    39 et de traceurs passifs, et, via le coupleur OASIS, \`{a} plusieurs mod\`{e}les de circulation  
    40 g\'{e}n\'{e}rale atmosph\'{e}rique. Il supporte \'{e}galement l'embo\^{i}tement interactif de  
    41 maillages via le logiciel AGRIF. 
     30%Le moteur oc\'{e}anique de NEMO (Nucleus for European Modelling of the Ocean) est un  
     31%mod\`{e}le aux \'{e}quations primitives de la circulation oc\'{e}anique r\'{e}gionale et globale.  
     32%Il se veut un outil flexible pour \'{e}tudier sur un vaste spectre spatiotemporel l'oc\'{e}an et ses  
     33%interactions avec les autres composantes du syst\`{e}me climatique terrestre.  
     34%Les variables pronostiques sont le champ tridimensionnel de vitesse, une hauteur de la mer  
     35%lin\'{e}aire, la Temp\'{e}rature Conservative et la Salinit\'{e} Absolue.  
     36%La distribution des variables se fait sur une grille C d'Arakawa tridimensionnelle utilisant une  
     37%coordonn\'{e}e verticale $z$ \`{a} niveaux entiers ou partiels, ou une coordonn\'{e}e s, ou encore  
     38%une combinaison des deux. Diff\'{e}rents choix sont propos\'{e}s pour d\'{e}crire la physique  
     39%oc\'{e}anique, incluant notamment des physiques verticales TKE et GLS. A travers l'infrastructure  
     40%NEMO, l'oc\'{e}an est interfac\'{e} avec des mod\`{e}les de glace de mer (LIM ou CICE),  
     41%de biog\'{e}ochimie marine et de traceurs passifs, et, via le coupleur OASIS, \`{a} plusieurs  
     42%mod\`{e}les de circulation g\'{e}n\'{e}rale atmosph\'{e}rique.  
     43%Il supporte \'{e}galement l'embo\^{i}tement interactif de maillages via le logiciel AGRIF. 
    4244}  
    4345 
     
    6971 \vspace{0.5cm} 
    7072 
     73\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Annex_A.tex

    r3294 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13 
    24% ================================================================ 
     
    532534expression of the 3D divergence in the $s-$coordinates established above.  
    533535 
     536\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Annex_B.tex

    r3294 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter Ñ Appendix B : Diffusive Operators 
     
    364366\eqref{Apdx_B_Lap_U} is used in both $z$- and $s$-coordinate systems, that is 
    365367a Laplacian diffusion is applied on momentum along the coordinate directions. 
     368\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Annex_C.tex

    r3294 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter Ñ Appendix C : Discrete Invariants of the Equations 
     
    410412\end{aligned}   } \right. 
    411413\end{equation}  
    412 where the indices $i_p$ and $k_p$ take the following value:  
     414where the indices $i_p$ and $j_p$ take the following value:  
    413415$i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 
    414416and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:  
     
    11031105The discrete formulation of the horizontal diffusion of momentum ensures the  
    11041106conservation of potential vorticity and the horizontal divergence, and the  
    1105 dissipation of the square of these quantities (i.e. enstrophy and the  
     1107dissipation of the square of these quantities ($i.e.$ enstrophy and the  
    11061108variance of the horizontal divergence) as well as the dissipation of the  
    11071109horizontal kinetic energy. In particular, when the eddy coefficients are  
     
    11271129&\int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times  
    11281130   \Bigl[    \nabla_h  \left( A^{\,lm}\;\chi  \right) 
    1129              - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)    \Bigr]\;dv  = 0 
    1130 \end{flalign*} 
     1131           - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)    \Bigr]\;dv   \\  
     1132%\end{flalign*} 
    11311133%%%%%%%%%%  recheck here....  (gm) 
    1132 \begin{flalign*} 
    1133 = \int \limits_D  -\frac{1} {e_3 } \textbf{k} \cdot \nabla \times  
    1134    \Bigl[ \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)  \Bigr]\;dv &&& \\  
    1135 \end{flalign*} 
    1136 \begin{flalign*} 
     1134%\begin{flalign*} 
     1135=& \int \limits_D  -\frac{1} {e_3 } \textbf{k} \cdot \nabla \times  
     1136   \Bigl[ \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)  \Bigr]\;dv \\  
     1137%\end{flalign*} 
     1138%\begin{flalign*} 
    11371139\equiv& \sum\limits_{i,j} 
    11381140   \left\{ 
    1139    \delta_{i+1/2}  
    1140    \left[  
    1141    \frac {e_{2v}} {e_{1v}\,e_{3v}}  \delta_i 
    1142       \left[ A_f^{\,lm} e_{3f} \zeta  \right] 
    1143     \right] 
    1144    + \delta_{j+1/2}  
    1145    \left[  
    1146    \frac {e_{1u}} {e_{2u}\,e_{3u}} \delta_j  
    1147       \left[ A_f^{\,lm} e_{3f} \zeta  \right] 
    1148    \right] 
    1149    \right\}  
    1150    && \\  
     1141     \delta_{i+1/2} \left[  \frac {e_{2v}} {e_{1v}\,e_{3v}}  \delta_i \left[ A_f^{\,lm} e_{3f} \zeta  \right]  \right] 
     1142   + \delta_{j+1/2} \left[  \frac {e_{1u}} {e_{2u}\,e_{3u}}  \delta_j \left[ A_f^{\,lm} e_{3f} \zeta  \right]  \right] 
     1143   \right\}     \\  
    11511144% 
    11521145\intertext{Using \eqref{DOM_di_adj}, it follows:} 
     
    11541147\equiv& \sum\limits_{i,j,k}  
    11551148   -\,\left\{ 
    1156       \frac{e_{2v}} {e_{1v}\,e_{3v}}  \delta_i 
    1157       \left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_i \left[ 1\right] 
    1158    + \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j  
    1159       \left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_j \left[ 1\right] 
     1149      \frac{e_{2v}} {e_{1v}\,e_{3v}}  \delta_i  \left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_i \left[ 1\right] 
     1150    + \frac{e_{1u}} {e_{2u}\,e_{3u}}  \delta_j  \left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_j \left[ 1\right] 
    11601151   \right\} \quad \equiv 0  
    1161    && \\  
     1152    \\  
    11621153\end{flalign*} 
    11631154 
     
    11671158\subsection{Dissipation of Horizontal Kinetic Energy} 
    11681159\label{Apdx_C.3.2} 
    1169  
    11701160 
    11711161The lateral momentum diffusion term dissipates the horizontal kinetic energy: 
     
    12211211\label{Apdx_C.3.3} 
    12221212 
    1223  
    12241213The lateral momentum diffusion term dissipates the enstrophy when the eddy  
    12251214coefficients are horizontally uniform: 
     
    12281217   \left[   \nabla_h \left( A^{\,lm}\;\chi  \right) 
    12291218          - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)   \right]\;dv &&&\\ 
    1230 &= A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times  
     1219&\quad = A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times  
    12311220   \left[    \nabla_h \times \left( \zeta \; \textbf{k} \right)   \right]\;dv &&&\\ 
    1232 &\equiv A^{\,lm} \sum\limits_{i,j,k}  \zeta \;e_{3f}  
     1221&\quad \equiv A^{\,lm} \sum\limits_{i,j,k}  \zeta \;e_{3f}  
    12331222   \left\{     \delta_{i+1/2} \left[  \frac{e_{2v}} {e_{1v}\,e_{3v}} \delta_i \left[ e_{3f} \zeta  \right]   \right] 
    12341223             + \delta_{j+1/2} \left[  \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ e_{3f} \zeta  \right]   \right]      \right\}   &&&\\  
     
    12361225\intertext{Using \eqref{DOM_di_adj}, it follows:} 
    12371226% 
    1238 &\equiv  - A^{\,lm} \sum\limits_{i,j,k}  
     1227&\quad \equiv  - A^{\,lm} \sum\limits_{i,j,k}  
    12391228   \left\{    \left(  \frac{1} {e_{1v}\,e_{3v}}  \delta_i \left[ e_{3f} \zeta  \right]  \right)^2   b_v 
    1240             + \left(  \frac{1} {e_{2u}\,e_{3u}}  \delta_j \left[ e_{3f} \zeta  \right] \right)^2   b_u  \right\}      &&&\\ 
    1241 & \leq \;0       &&&\\  
     1229            + \left(  \frac{1} {e_{2u}\,e_{3u}}  \delta_j \left[ e_{3f} \zeta  \right] \right)^2   b_u  \right\}  \quad \leq \;0    &&&\\ 
    12421230\end{flalign*} 
    12431231 
     
    12501238When the horizontal divergence of the horizontal diffusion of momentum  
    12511239(discrete sense) is taken, the term associated with the vertical curl of the  
    1252 vorticity is zero locally, due to (!!! II.1.8  !!!!!). The resulting term conserves the  
    1253 $\chi$ and dissipates $\chi^2$ when the eddy coefficients are  
    1254 horizontally uniform. 
     1240vorticity is zero locally, due to \eqref{Eq_DOM_div_curl}.  
     1241The resulting term conserves the $\chi$ and dissipates $\chi^2$  
     1242when the eddy coefficients are horizontally uniform. 
    12551243\begin{flalign*} 
    12561244& \int\limits_D  \nabla_h \cdot  
    12571245   \Bigl[     \nabla_h \left( A^{\,lm}\;\chi \right) 
    12581246             - \nabla_h \times \left( A^{\,lm}\;\zeta \;\textbf{k} \right)    \Bigr]  dv 
    1259 = \int\limits_D  \nabla_h \cdot \nabla_h \left( A^{\,lm}\;\chi  \right)   dv   &&&\\ 
     1247= \int\limits_D  \nabla_h \cdot \nabla_h \left( A^{\,lm}\;\chi  \right)   dv   \\ 
    12601248% 
    12611249&\equiv \sum\limits_{i,j,k}  
    12621250   \left\{   \delta_i \left[ A_u^{\,lm} \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} \left[ \chi \right]  \right] 
    1263            + \delta_j \left[ A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2} \left[ \chi \right]  \right]    \right\}    &&&\\  
     1251           + \delta_j \left[ A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2} \left[ \chi \right]  \right]    \right\}    \\  
    12641252% 
    12651253\intertext{Using \eqref{DOM_di_adj}, it follows:} 
     
    12671255&\equiv \sum\limits_{i,j,k}  
    12681256   - \left\{   \frac{e_{2u}\,e_{3u}} {e_{1u}}  A_u^{\,lm} \delta_{i+1/2} \left[ \chi \right] \delta_{i+1/2} \left[ 1 \right]  
    1269              + \frac{e_{1v}\,e_{3v}}  {e_{2v}}  A_v^{\,lm} \delta_{j+1/2} \left[ \chi \right] \delta_{j+1/2} \left[ 1 \right]    \right\}  
    1270    \qquad \equiv 0     &&& \\  
     1257             + \frac{e_{1v}\,e_{3v}} {e_{2v}}  A_v^{\,lm} \delta_{j+1/2} \left[ \chi \right] \delta_{j+1/2} \left[ 1 \right]    \right\}  
     1258   \quad \equiv 0      \\  
    12711259\end{flalign*} 
    12721260 
     
    12811269   \left[    \nabla_h              \left( A^{\,lm}\;\chi                    \right) 
    12821270           - \nabla_h   \times  \left( A^{\,lm}\;\zeta \;\textbf{k} \right)    \right]\;  dv 
    1283  = A^{\,lm}   \int\limits_D \chi \;\nabla_h \cdot \nabla_h \left( \chi \right)\;  dv    &&&\\  
     1271 = A^{\,lm}   \int\limits_D \chi \;\nabla_h \cdot \nabla_h \left( \chi \right)\;  dv    \\  
    12841272% 
    12851273&\equiv A^{\,lm}  \sum\limits_{i,j,k}  \frac{1} {e_{1t}\,e_{2t}\,e_{3t}}  \chi  
     
    12871275      \delta_i  \left[   \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} \left[ \chi \right]   \right] 
    12881276   + \delta_j  \left[   \frac{e_{1v}\,e_{3v}} {e_{2v}}   \delta_{j+1/2} \left[ \chi \right]   \right] 
    1289    \right\} \;   e_{1t}\,e_{2t}\,e_{3t}    &&&\\  
     1277   \right\} \;   e_{1t}\,e_{2t}\,e_{3t}    \\  
    12901278% 
    12911279\intertext{Using \eqref{DOM_di_adj}, it turns out to be:} 
     
    12931281&\equiv - A^{\,lm} \sum\limits_{i,j,k} 
    12941282   \left\{    \left(  \frac{1} {e_{1u}}  \delta_{i+1/2}  \left[ \chi \right]  \right)^2  b_u 
    1295                  + \left(  \frac{1} {e_{2v}}  \delta_{j+1/2}  \left[ \chi \right]  \right)^2  b_v    \right\} \;    &&&\\ 
    1296 % 
    1297 &\leq 0              &&&\\ 
     1283            + \left(  \frac{1} {e_{2v}}  \delta_{j+1/2}  \left[ \chi \right]  \right)^2  b_v    \right\}     
     1284\quad \leq 0             \\ 
    12981285\end{flalign*} 
    12991286 
     
    13031290\section{Conservation Properties on Vertical Momentum Physics} 
    13041291\label{Apdx_C_4} 
    1305  
    13061292 
    13071293As for the lateral momentum physics, the continuous form of the vertical diffusion  
     
    13191305   \left(   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)\; dv    \quad &\leq 0     \\ 
    13201306\end{align*} 
     1307 
    13211308The first property is obvious. The second results from: 
    1322  
    13231309\begin{flalign*} 
    13241310\int\limits_D  
     
    13591345   e_{1f}\,e_{2f}\,e_{3f} \; \equiv 0   && \\ 
    13601346\end{flalign*} 
     1347 
    13611348If the vertical diffusion coefficient is uniform over the whole domain, the  
    13621349enstrophy is dissipated, $i.e.$ 
     
    13661353      \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)   \right)\; dv = 0   &&&\\ 
    13671354\end{flalign*} 
     1355 
    13681356This property is only satisfied in $z$-coordinates: 
    1369  
    13701357\begin{flalign*} 
    13711358\int\limits_D \zeta \, \textbf{k} \cdot \nabla \times  
     
    14771464 
    14781465The numerical schemes used for tracer subgridscale physics are written such  
    1479 that the heat and salt contents are conserved (equations in flux form, second  
    1480 order centered finite differences). Since a flux form is used to compute the  
    1481 temperature and salinity, the quadratic form of these quantities (i.e. their variance)  
    1482 globally tends to diminish. As for the advection term, there is generally no strict  
    1483 conservation of mass, even if in practice the mass is conserved to a very high  
    1484 accuracy.  
     1466that the heat and salt contents are conserved (equations in flux form).  
     1467Since a flux form is used to compute the temperature and salinity,  
     1468the quadratic form of these quantities ($i.e.$ their variance) globally tends to diminish.  
     1469As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear.  
    14851470 
    14861471% ------------------------------------------------------------------------------------------------------------- 
     
    15481533%%%%  end of appendix in gm comment 
    15491534%} 
     1535\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Annex_D.tex

    r3294 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Appendix D Ñ Coding Rules 
     
    120122\hline 
    121123public  \par or  \par module variable&  
    122 \textbf{m n} \par \textit{but not} \par \textbf{nn\_}&  
     124\textbf{m n} \par \textit{but not} \par \textbf{nn\_ np\_}&  
    123125\textbf{a b e f g h o q r} \par \textbf{t} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_}&  
    124126\textbf{l} \par \textit{but not} \par \textbf{lp ld} \par \textbf{ ll ln\_}&  
     
    156158\hline 
    157159parameter&  
    158 \textbf{jp}&  
     160\textbf{jp np\_}&  
    159161\textbf{pp}&  
    160162\textbf{lp}&  
     
    190192%-------------------------------------------------------------------------------------------------------------- 
    191193 
     194N.B.   Parameter here, in not only parameter in the \textsc{Fortran} acceptation, it is also used for code variables  
     195that are read in namelist and should never been modified during a simulation.  
     196It is the case, for example, for the size of a domain (jpi,jpj,jpk). 
     197 
    192198\newpage 
    193199% ================================================================ 
     
    198204 
    199205To be done.... 
     206\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Annex_E.tex

    r3294 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Appendix E : Note on some algorithms 
     
    299301\begin{figure}[!ht] \label{Fig_ISO_triad} 
    300302\begin{center} 
    301 \includegraphics[width=0.70\textwidth]{./TexFiles/Figures/Fig_ISO_triad.pdf} 
     303\includegraphics[width=0.70\textwidth]{Fig_ISO_triad} 
    302304\caption{  \label{Fig_ISO_triad}    
    303305Triads used in the Griffies's like iso-neutral diffision scheme for  
     
    806808tracer is preserved by the discretisation of the skew fluxes. 
    807809 
     810\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Annex_ISO.tex

    r4147 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Iso-neutral diffusion : 
     
    1113\namdisplay{namtra_ldf} 
    1214%--------------------------------------------------------------------------------------------------------- 
    13 If the namelist variable \np{ln\_traldf\_grif} is set true (and 
    14 \key{ldfslp} is set), \NEMO updates both active and passive tracers 
    15 using the Griffies triad representation of iso-neutral diffusion and 
    16 the eddy-induced advective skew (GM) fluxes. Otherwise (by default) the 
    17 filtered version of Cox's original scheme is employed 
    18 (\S\ref{LDF_slp}). In the present implementation of the Griffies 
    19 scheme, the advective skew fluxes are implemented even if 
    20 \key{traldf\_eiv} is not set. 
     15 
     16Two scheme are available to perform the iso-neutral diffusion.  
     17If the namelist logical \np{ln\_traldf\_triad} is set true,  
     18\NEMO updates both active and passive tracers using the Griffies triad representation  
     19of iso-neutral diffusion and the eddy-induced advective skew (GM) fluxes.  
     20If the namelist logical \np{ln\_traldf\_iso} is set true,  
     21the filtered version of Cox's original scheme (the Standard scheme) is employed (\S\ref{LDF_slp}).  
     22In the present implementation of the Griffies scheme,  
     23the advective skew fluxes are implemented even if \np{ln\_traldf\_eiv} is false. 
    2124 
    2225Values of iso-neutral diffusivity and GM coefficient are set as 
    23 described in \S\ref{LDF_coef}. If none of the keys \key{traldf\_cNd}, 
    24 N=1,2,3 is set (the default), spatially constant iso-neutral $A_l$ and 
    25 GM diffusivity $A_e$ are directly set by \np{rn\_aeih\_0} and 
    26 \np{rn\_aeiv\_0}. If 2D-varying coefficients are set with 
    27 \key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal 
    28 scale factor according to \eqref{Eq_title} \footnote{Except in global ORCA 
    29   $0.5^{\circ}$ runs with \key{traldf\_eiv}, where 
    30   $A_l$ is set like $A_e$ but with a minimum vale of 
    31   $100\;\mathrm{m}^2\;\mathrm{s}^{-1}$}. In idealised setups with 
    32 \key{traldf\_c2d}, $A_e$ is reduced similarly, but if \key{traldf\_eiv} 
    33 is set in the global configurations with \key{traldf\_c2d}, a horizontally varying $A_e$ is 
    34 instead set from the Held-Larichev parameterisation\footnote{In this 
    35   case, $A_e$ at low latitudes $|\theta|<20^{\circ}$ is further 
    36   reduced by a factor $|f/f_{20}|$, where $f_{20}$ is the value of $f$ 
    37   at $20^{\circ}$~N} (\mdl{ldfeiv}) and \np{rn\_aeiv\_0} is ignored 
    38 unless it is zero. 
     26described in \S\ref{LDF_coef}. Note that when GM fluxes are used,  
     27the eddy-advective (GM) velocities are output for diagnostic purposes using xIOS,  
     28even though the eddy advection is accomplished by means of the skew fluxes. 
     29 
    3930 
    4031The options specific to the Griffies scheme include: 
    4132\begin{description}[font=\normalfont] 
    42 \item[\np{ln\_traldf\_gdia}] Default value is false. See \S\ref{sec:triad:sfdiag}. If this is set true, time-mean 
    43   eddy-advective (GM) velocities are output for diagnostic purposes, even 
    44   though the eddy advection is accomplished by means of the skew 
    45   fluxes. 
    46 \item[\np{ln\_traldf\_iso}] See \S\ref{sec:triad:taper}. If this is set false (the default), then 
     33\item[\np{ln\_triad\_iso}] See \S\ref{sec:triad:taper}. If this is set false (the default), then 
    4734  `iso-neutral' mixing is accomplished within the surface mixed-layer 
    4835  along slopes linearly decreasing with depth from the value immediately below 
    49   the mixed-layer to zero (flat) at the surface (\S\ref{sec:triad:lintaper}). This is the same 
    50   treatment as used in the default implementation 
    51   \S\ref{LDF_slp_iso}; Fig.~\ref{Fig_eiv_slp}.  Where 
    52   \np{ln\_traldf\_iso} is set true, the vertical skew flux is further 
    53   reduced to ensure no vertical buoyancy flux, giving an almost pure 
     36  the mixed-layer to zero (flat) at the surface (\S\ref{sec:triad:lintaper}).  
     37  This is the same treatment as used in the default implementation \S\ref{LDF_slp_iso}; Fig.~\ref{Fig_eiv_slp}.   
     38  Where \np{ln\_triad\_iso} is set true, the vertical skew flux is further reduced  
     39  to ensure no vertical buoyancy flux, giving an almost pure 
    5440  horizontal diffusive tracer flux within the mixed layer. This is similar to 
    5541  the tapering suggested by \citet{Gerdes1991}. See \S\ref{sec:triad:Gerdes-taper} 
    56 \item[\np{ln\_traldf\_botmix}] See \S\ref{sec:triad:iso_bdry}. If this 
    57   is set false (the default) then the lateral diffusive fluxes 
    58   associated with triads partly masked by topography are neglected. If 
    59   it is set true, however, then these lateral diffusive fluxes are 
    60   applied, giving smoother bottom tracer fields at the cost of 
    61   introducing diapycnal mixing. 
     42\item[\np{ln\_botmix\_triad}] See \S\ref{sec:triad:iso_bdry}.  
     43  If this is set false (the default) then the lateral diffusive fluxes 
     44  associated with triads partly masked by topography are neglected.  
     45  If it is set true, however, then these lateral diffusive fluxes are applied,  
     46  giving smoother bottom tracer fields at the cost of introducing diapycnal mixing. 
     47\item[\np{rn\_sw\_triad}]  blah blah to be added.... 
     48\end{description} 
     49The options shared with the Standard scheme include: 
     50\begin{description}[font=\normalfont] 
     51\item[\np{ln\_traldf\_msc}]   blah blah to be added 
     52\item[\np{rn\_slpmax}]  blah blah to be added 
    6253\end{description} 
    6354\section{Triad formulation of iso-neutral diffusion} 
    6455\label{sec:triad:iso} 
    65 We have implemented into \NEMO a scheme inspired by \citet{Griffies_al_JPO98}, but formulated within the \NEMO 
    66 framework, using scale factors rather than grid-sizes. 
     56We have implemented into \NEMO a scheme inspired by \citet{Griffies_al_JPO98},  
     57but formulated within the \NEMO framework, using scale factors rather than grid-sizes. 
    6758 
    6859\subsection{The iso-neutral diffusion operator} 
     
    8475    \mbox{with}\quad \;\;\Re = 
    8576    \begin{pmatrix} 
    86       1&0&-r_1\mystrut \\ 
    87       0&1&-r_2\mystrut \\ 
    88       -r_1&-r_2&r_1 ^2+r_2 ^2\mystrut 
     77       1   &  0   & -r_1           \mystrut \\ 
     78       0   &  1   & -r_2           \mystrut \\ 
     79      -r_1 & -r_2 &  r_1 ^2+r_2 ^2 \mystrut 
    8980    \end{pmatrix} 
    9081    \quad \text{and} \quad\grad T= 
    9182    \begin{pmatrix} 
    92       \frac{1}{e_1}\pd[T]{i}\mystrut \\ 
    93       \frac{1}{e_2}\pd[T]{j}\mystrut \\ 
    94       \frac{1}{e_3}\pd[T]{k}\mystrut 
     83      \frac{1}{e_1} \pd[T]{i} \mystrut \\ 
     84      \frac{1}{e_2} \pd[T]{j} \mystrut \\ 
     85      \frac{1}{e_3} \pd[T]{k} \mystrut 
    9586    \end{pmatrix}. 
    9687  \end{equation} 
     
    10192%  {-r_1 } \hfill & {-r_2 } \hfill & {r_1 ^2+r_2 ^2} \hfill \\ 
    10293% \end{array} }} \right) 
    103  Here \eqref{Eq_PE_iso_slopes} 
     94 Here \eqref{Eq_PE_iso_slopes}  
    10495\begin{align*} 
    10596  r_1 &=-\frac{e_3 }{e_1 } \left( \frac{\partial \rho }{\partial i} 
     
    200191% the mean vertical gradient at the $u$-point, 
    201192% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    202 \begin{figure}[h] \begin{center} 
    203     \includegraphics[width=1.05\textwidth]{./TexFiles/Figures/Fig_GRIFF_triad_fluxes} 
     193\begin{figure}[tb] \begin{center} 
     194    \includegraphics[width=1.05\textwidth]{Fig_GRIFF_triad_fluxes} 
    204195    \caption{ \label{fig:triad:ISO_triad} 
    205196      (a) Arrangement of triads $S_i$ and tracer gradients to 
     
    256247  \ 
    257248  \frac 
    258   {\left(\alpha / \beta \right)_i^k  \ \delta_{i + i_p}[T^k] - \delta_{i + i_p}[S^k] } 
    259   {\left(\alpha / \beta \right)_i^k  \ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] }. 
    260 \end{equation} 
    261 In calculating the slopes of the local neutral 
    262 surfaces, the expansion coefficients $\alpha$ and $\beta$ are 
    263 evaluated at the anchor points of the triad \footnote{Note that in \eqref{eq:triad:R} we use the ratio $\alpha / \beta$ 
    264 instead of multiplying the temperature derivative by $\alpha$ and the 
    265 salinity derivative by $\beta$. This is more efficient as the ratio 
    266 $\alpha / \beta$ can to be evaluated directly}, while the metrics are 
    267 calculated at the $u$- and $w$-points on the arms. 
     249  { \alpha_i^k  \ \delta_{i+i_p}[T^k] - \beta_i^k \ \delta_{i+i_p}[S^k] } 
     250  { \alpha_i^k  \ \delta_{k+k_p}[T^i] - \beta_i^k \ \delta_{k+k_p}[S^i] }. 
     251\end{equation} 
     252In calculating the slopes of the local neutral surfaces,  
     253the expansion coefficients $\alpha$ and $\beta$ are evaluated at the anchor points of the triad,  
     254while the metrics are calculated at the $u$- and $w$-points on the arms. 
    268255 
    269256% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    270 \begin{figure}[h] \begin{center} 
    271     \includegraphics[width=0.80\textwidth]{./TexFiles/Figures/Fig_GRIFF_qcells} 
     257\begin{figure}[tb] \begin{center} 
     258    \includegraphics[width=0.80\textwidth]{Fig_GRIFF_qcells} 
    272259    \caption{   \label{fig:triad:qcells} 
    273260    Triad notation for quarter cells. $T$-cells are inside 
     
    277264% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    278265 
    279 Each triad $\{_i^k\:_{i_p}^{k_p}\}$ is associated (Fig.~\ref{fig:triad:qcells}) with the quarter 
    280 cell that is the intersection of the $i,k$ $T$-cell, the $i+i_p,k$ 
    281 $u$-cell and the $i,k+k_p$ $w$-cell. Expressing the slopes $s_i$ and 
    282 $s'_i$ in \eqref{eq:triad:i13} and \eqref{eq:triad:i31} in this notation, we have 
    283 e.g.\ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$. Each triad slope $_i^k 
    284 \mathbb{R}_{i_p}^{k_p}$ is used once (as an $s$) to calculate the 
    285 lateral flux along its $u$-arm, at $(i+i_p,k)$, and then again as an 
    286 $s'$ to calculate the vertical flux along its $w$-arm at 
    287 $(i,k+k_p)$. Each vertical area $a_i$ used to calculate the lateral 
    288 flux and horizontal area $a'_i$ used to calculate the vertical flux 
    289 can also be identified as the area across the $u$- and $w$-arms of a 
    290 unique triad, and we notate these areas, similarly to the triad 
    291 slopes, as $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$, 
    292 $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$, where e.g. in \eqref{eq:triad:i13} 
    293 $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$, and in \eqref{eq:triad:i31} 
    294 $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$. 
     266Each triad $\{_i^{k}\:_{i_p}^{k_p}\}$ is associated (Fig.~\ref{fig:triad:qcells}) with the quarter 
     267cell that is the intersection of the $i,k$ $T$-cell, the $i+i_p,k$ $u$-cell and the $i,k+k_p$ $w$-cell.  
     268Expressing the slopes $s_i$ and $s'_i$ in \eqref{eq:triad:i13} and \eqref{eq:triad:i31} in this notation,  
     269we have $e.g.$ \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$.  
     270Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ is used once (as an $s$)  
     271to calculate the lateral flux along its $u$-arm, at $(i+i_p,k)$,  
     272and then again as an $s'$ to calculate the vertical flux along its $w$-arm at $(i,k+k_p)$.  
     273Each vertical area $a_i$ used to calculate the lateral flux and horizontal area $a'_i$ used  
     274to calculate the vertical flux can also be identified as the area across the $u$- and $w$-arms  
     275of a unique triad, and we notate these areas, similarly to the triad slopes,  
     276as $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$, $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$,  
     277where $e.g.$ in \eqref{eq:triad:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$,  
     278and in \eqref{eq:triad:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$. 
    295279 
    296280\subsection{The full triad fluxes} 
     
    667651or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point is 
    668652masked. The associated lateral fluxes (grey-black dashed line) are 
    669 masked if \np{ln\_botmix\_grif}=false, but left unmasked, 
    670 giving bottom mixing, if \np{ln\_botmix\_grif}=true. 
    671  
    672 The default option \np{ln\_botmix\_grif}=false is suitable when the 
     653masked if \np{ln\_botmix\_triad}=false, but left unmasked, 
     654giving bottom mixing, if \np{ln\_botmix\_triad}=true. 
     655 
     656The default option \np{ln\_botmix\_triad}=false is suitable when the 
    673657bbl mixing option is enabled (\key{trabbl}, with \np{nn\_bbl\_ldf}=1), 
    674658or  for simple idealized  problems. For setups with topography without 
    675 bbl mixing, \np{ln\_botmix\_grif}=true may be necessary. 
     659bbl mixing, \np{ln\_botmix\_triad}=true may be necessary. 
    676660% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    677661\begin{figure}[h] \begin{center} 
    678     \includegraphics[width=0.60\textwidth]{./TexFiles/Figures/Fig_GRIFF_bdry_triads} 
     662    \includegraphics[width=0.60\textwidth]{Fig_GRIFF_bdry_triads} 
    679663    \caption{  \label{fig:triad:bdry_triads} 
    680664      (a) Uppermost model layer $k=1$ with $i,1$ and $i+1,1$ tracer 
     
    690674      or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point 
    691675      is masked. The associated lateral fluxes (grey-black dashed 
    692       line) are masked if \np{botmix\_grif}=.false., but left 
    693       unmasked, giving bottom mixing, if \np{botmix\_grif}=.true.} 
     676      line) are masked if \np{botmix\_triad}=.false., but left 
     677      unmasked, giving bottom mixing, if \np{botmix\_triad}=.true.} 
    694678 \end{center} \end{figure} 
    695679% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    849833    different $i_p,k_p$, denoted by different colours, (e.g. the green 
    850834    triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.}} 
    851   {\includegraphics[width=0.60\textwidth]{./TexFiles/Figures/Fig_GRIFF_MLB_triads}} 
     835  {\includegraphics[width=0.60\textwidth]{Fig_GRIFF_MLB_triads}} 
    852836\end{figure} 
    853837% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    931915it to the Eulerian velocity prior to computing the tracer 
    932916advection. This is implemented if \key{traldf\_eiv} is set in the 
    933 default implementation, where \np{ln\_traldf\_grif} is set 
     917default implementation, where \np{ln\_traldf\_triad} is set 
    934918false. This allows us to take advantage of all the advection schemes 
    935919offered for the tracers (see \S\ref{TRA_adv}) and not just a $2^{nd}$ 
     
    938922paramount importance. 
    939923 
    940 However, when \np{ln\_traldf\_grif} is set true, \NEMO instead 
     924However, when \np{ln\_traldf\_triad} is set true, \NEMO instead 
    941925implements eddy induced advection according to the so-called skew form 
    942926\citep{Griffies_JPO98}. It is based on a transformation of the advective fluxes 
     
    11371121and $\triadt{i+1}{k}{R}{-1/2}{1/2}$ are masked when either of the 
    11381122$i,k+1$ or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ 
    1139 $u$-point is masked. The namelist parameter \np{ln\_botmix\_grif} has 
     1123$u$-point is masked. The namelist parameter \np{ln\_botmix\_triad} has 
    11401124no effect on the eddy-induced skew-fluxes. 
    11411125 
     
    11931177\end{split} 
    11941178\end{equation} 
     1179\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_ASM.tex

    r4147 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter Assimilation increments (ASM) 
     
    172174\end{verbatim} 
    173175\end{alltt} 
     176\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_CFG.tex

    r4147 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter � Configurations 
     
    8890%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    8991\begin{figure}[!t]   \begin{center} 
    90 \includegraphics[width=0.98\textwidth]{./TexFiles/Figures/Fig_ORCA_NH_mesh.pdf} 
     92\includegraphics[width=0.98\textwidth]{Fig_ORCA_NH_mesh} 
    9193\caption{  \label{Fig_MISC_ORCA_msh}      
    92 ORCA mesh conception. The departure from an isotropic Mercator grid start poleward of 20\deg N. 
     94ORCA mesh conception. The departure from an isotropic Mercator grid start poleward of 20\degN. 
    9395The two "north pole" are the foci of a series of embedded ellipses (blue curves)  
    9496which are determined analytically and form the i-lines of the ORCA mesh (pseudo latitudes).  
     
    115117%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    116118\begin{figure}[!tbp]  \begin{center} 
    117 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_ORCA_NH_msh05_e1_e2.pdf} 
    118 \includegraphics[width=0.80\textwidth]{./TexFiles/Figures/Fig_ORCA_aniso.pdf} 
     119\includegraphics[width=1.0\textwidth]{Fig_ORCA_NH_msh05_e1_e2} 
     120\includegraphics[width=0.80\textwidth]{Fig_ORCA_aniso} 
    119121\caption {  \label{Fig_MISC_ORCA_e1e2} 
    120122\textit{Top}: Horizontal scale factors ($e_1$, $e_2$) and  
    121123\textit{Bottom}: ratio of anisotropy ($e_1 / e_2$) 
    122 for ORCA 0.5\deg ~mesh. South of 20\deg N a Mercator grid is used ($e_1 = e_2$)  
    123 so that the anisotropy ratio is 1. Poleward of 20\deg N, the two "north pole"  
     124for ORCA 0.5\deg ~mesh. South of 20\degN a Mercator grid is used ($e_1 = e_2$)  
     125so that the anisotropy ratio is 1. Poleward of 20\degN, the two "north pole"  
    124126introduce a weak anisotropy over the ocean areas ($< 1.2$) except in vicinity of Victoria Island  
    125127(Canadian Arctic Archipelago). } 
     
    129131 
    130132The method is applied to Mercator grid ($i.e.$ same zonal and meridional grid spacing) poleward  
    131 of $20\deg$N, so that the Equator is a mesh line, which provides a better numerical solution  
     133of 20\degN, so that the Equator is a mesh line, which provides a better numerical solution  
    132134for equatorial dynamics. The choice of the series of embedded ellipses (position of the foci and  
    133135variation of the ellipses) is a compromise between maintaining  the ratio of mesh anisotropy  
     
    178180The ORCA\_R2 configuration has the following specificity : starting from a 2\deg~ORCA mesh,  
    179181local mesh refinements were applied to the Mediterranean, Red, Black and Caspian Seas,  
    180 so that the resolution is $1\deg \time 1\deg$ there. A local transformation were also applied  
     182so that the resolution is 1\deg \time 1\deg there. A local transformation were also applied  
    181183with in the Tropics in order to refine the meridional resolution up to 0.5\deg at the Equator. 
    182184 
     
    227229 
    228230The domain geometry is a closed rectangular basin on the $\beta$-plane centred  
    229 at $\sim 30\deg$N and rotated by 45\deg, 3180~km long, 2120~km wide  
     231at $\sim$ 30\degN and rotated by 45\deg, 3180~km long, 2120~km wide  
    230232and 4~km deep (Fig.~\ref{Fig_MISC_strait_hand}).  
    231233The domain is bounded by vertical walls and by a flat bottom. The configuration is  
     
    234236The applied forcings vary seasonally in a sinusoidal manner between winter  
    235237and summer extrema \citep{Levy_al_OM10}.  
    236 The wind stress is zonal and its curl changes sign at 22\deg N and 36\deg N.  
     238The wind stress is zonal and its curl changes sign at 22\degN and 36\degN.  
    237239It forces a subpolar gyre in the north, a subtropical gyre in the wider part of the domain  
    238240and a small recirculation gyre in the southern corner.  
     
    261263%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    262264\begin{figure}[!t]   \begin{center} 
    263 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_GYRE.pdf} 
     265\includegraphics[width=1.0\textwidth]{Fig_GYRE} 
    264266\caption{  \label{Fig_GYRE}    
    265267Snapshot of relative vorticity at the surface of the model domain  
     
    311313temperature data. 
    312314 
     315\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_Conservation.tex

    r3294 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13 
    24% ================================================================ 
     
    333335not been implemented. 
    334336 
     337\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_DIA.tex

    • Property svn:keywords set to Id
    r5515 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter I/O & Diagnostics 
    35% ================================================================ 
    4 \chapter{Ouput and Diagnostics (IOM, DIA, TRD, FLO)} 
     6\chapter{Output and Diagnostics (IOM, DIA, TRD, FLO)} 
    57\label{DIA} 
    68\minitoc 
    79 
    810\newpage 
    9 $\ $\newline    % force a new ligne 
     11$\ $\newline    % force a new line 
    1012 
    1113% ================================================================ 
    1214%       Old Model Output  
    1315% ================================================================ 
    14 \section{Old Model Output (default or \key{dimgout})} 
     16\section{Old Model Output (default)} 
    1517\label{DIA_io_old} 
    1618 
     
    3335"\textit{grep -i numout}" in the source code directory. 
    3436 
    35 By default, diagnostic output files are written in NetCDF format but an IEEE binary output format, called DIMG, can be choosen by defining \key{dimgout}.  
    36  
    37 Since version 3.2, when defining \key{iomput}, an I/O server has been added which provides more flexibility in the choice of the fields to be written as well as how the writing work is distributed over the processors in massively parallel computing. The complete description of the use of this I/O server is presented in the next section.  
    38  
    39 By default, if neither \key{iomput} nor \key{dimgout} are defined, NEMO produces NetCDF with the old IOIPSL library which has been kept for compatibility and its easy installation. However, the IOIPSL library is quite inefficient on parallel machines and, since version 3.2, many diagnostic options have been added presuming the use of \key{iomput}. The usefulness of the default IOIPSL-based option is expected to reduce with each new release. If \key{iomput} is not defined, output files and content are defined in the \mdl{diawri} module and contain mean (or instantaneous if \key{diainstant} is defined) values over a regular period of nn\_write time-steps (namelist parameter).  
     37By default, diagnostic output files are written in NetCDF format.  
     38Since version 3.2, when defining \key{iomput}, an I/O server has been added  
     39which provides more flexibility in the choice of the fields to be written  
     40as well as how the writing work is distributed over the processors in massively parallel computing.  
     41A complete description of the use of this I/O server is presented in the next section.  
     42 
     43By default, \key{iomput} is not defined, NEMO produces NetCDF with the old IOIPSL library  
     44which has been kept for compatibility and its easy installation.  
     45However, the IOIPSL library is quite inefficient on parallel machines and, since version 3.2,  
     46many diagnostic options have been added presuming the use of \key{iomput}.  
     47The usefulness of the default IOIPSL-based option is expected to reduce with each new release.  
     48If \key{iomput} is not defined, output files and content are defined in the \mdl{diawri} module  
     49and contain mean (or instantaneous if \key{diainstant} is defined) values over a regular period  
     50of nn\_write time-steps (namelist parameter).  
    4051 
    4152%\gmcomment{                    % start of gmcomment 
     
    4859 
    4960 
    50 Since version 3.2, iomput is the NEMO output interface of choice. It has been designed to be simple to use, flexible and efficient. The two main purposes of iomput are:  
     61Since version 3.2, iomput is the NEMO output interface of choice.  
     62It has been designed to be simple to use, flexible and efficient.  
     63The two main purposes of iomput are:  
    5164\begin{enumerate} 
    52 \item The complete and flexible control of the output files through external XML files adapted by the user from standard templates.  
    53 \item To achieve high performance and scalable output through the optional distribution of all diagnostic output related tasks to dedicated processes.  
     65\item The complete and flexible control of the output files through external XML files  
     66adapted by the user from standard templates.  
     67\item To achieve high performance and scalable output through the optional distribution  
     68of all diagnostic output related tasks to dedicated processes.  
    5469\end{enumerate} 
    55 The first functionality allows the user to specify, without code changes or recompilation, aspects of the diagnostic output stream, such as: 
     70The first functionality allows the user to specify, without code changes or recompilation,  
     71aspects of the diagnostic output stream, such as: 
    5672\begin{itemize} 
    5773\item The choice of output frequencies that can be different for each file (including real months and years). 
    58 \item The choice of file contents; includes complete flexibility over which data are written in which files (the same data can be written in different files).  
    59 \item The possibility to split output files at a choosen frequency. 
     74\item The choice of file contents; includes complete flexibility over which data are written in which files  
     75(the same data can be written in different files).  
     76\item The possibility to split output files at a chosen frequency. 
    6077\item The possibility to extract a vertical or an horizontal subdomain. 
    6178\item The choice of the temporal operation to perform, e.g.: average, accumulate, instantaneous, min, max and once. 
    6279\item Control over metadata via a large XML "database" of possible output fields. 
    6380\end{itemize} 
    64 In addition, iomput allows the user to add the output of any new variable (scalar, 2D or 3D) in the code in a very easy way. All details of iomput functionalities are listed in the following subsections. Examples of the XML files that control the outputs can be found in: 
     81In addition, iomput allows the user to add in the code the output of any new variable (scalar, 2D or 3D)  
     82in a very easy way. All details of iomput functionalities are listed in the following subsections.  
     83Examples of the XML files that control the outputs can be found in: 
    6584\begin{alltt} 
    6685\begin{verbatim} 
     
    7291\end{alltt} 
    7392 
    74 The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes) to collect and write the outputs. With an appropriate choice of N by the user, the bottleneck associated with the writing of the output files can be greatly reduced.  
    75  
    76 In version 3.6, the iom\_put interface depends on an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-1.0}{XIOS-1.0} (use of revision 618 or higher is required). This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to create a single output file and therefore to bypass the rebuilding phase. Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to an HDF5 library that has been correctly compiled (i.e. with the configure option $--$enable-parallel). Note that the files created by iomput through XIOS are incompatible with NetCDF3. All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 
    77  
    78 Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, where N is typically much less than the number of NEMO processors, will reduce the number of output files created. This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors. Note that for smaller configurations, the rebuilding phase can be avoided, even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 
     93The second functionality targets output performance when running in parallel (\key{mpp\_mpi}).  
     94Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes)  
     95to collect and write the outputs. With an appropriate choice of N by the user,  
     96the bottleneck associated with the writing of the output files can be greatly reduced.  
     97 
     98In version 3.6, the iom\_put interface depends on an external code called  
     99\href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-1.0}{XIOS-1.0}  
     100(use of revision 618 or higher is required). This new IO server can take advantage of  
     101the parallel I/O functionality of NetCDF4 to create a single output file and therefore  
     102to bypass the rebuilding phase. Note that writing in parallel into the same NetCDF files  
     103requires that your NetCDF4 library is linked to an HDF5 library that has been correctly compiled  
     104($i.e.$ with the configure option $--$enable-parallel).  
     105Note that the files created by iomput through XIOS are incompatible with NetCDF3.  
     106All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 
     107 
     108Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers,  
     109where N is typically much less than the number of NEMO processors, will reduce the number of output files created.  
     110This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors.  
     111Note that for smaller configurations, the rebuilding phase can be avoided,  
     112even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 
    79113 
    80114\subsection{XIOS: the IO\_SERVER} 
     
    82116\subsubsection{Attached or detached mode?} 
    83117 
    84 Iomput is based on \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS}, the io\_server developed by Yann Meurdesoif from IPSL. The behaviour of the io subsystem is controlled by settings in the external XML files listed above. Key settings in the iodef.xml file are {\tt using\_server} and the {\tt type} tag associated with each defined file. The {\tt using\_server} setting determines whether or not the server will be used in ''attached mode'' (as a library) [{\tt false}] or in ''detached mode'' (as an external executable on N additional, dedicated cpus) [{\tt true}]. The ''attached mode'' is simpler to use but much less efficient for massively parallel applications. The type of each file can be either ''multiple\_file'' or ''one\_file''. 
    85  
    86 In attached mode and if the type of file is ''multiple\_file'', then each NEMO process will also act as an IO server and produce its own set of output files. Superficially, this emulates the standard behaviour in previous versions, However, the subdomain written out by each process does not correspond to the {\tt jpi x jpj x jpk} domain actually computed by the process (although it may if {\tt jpni=1}). Instead each process will have collected and written out a number of complete longitudinal strips. If the ''one\_file'' option is chosen then all processes will collect their longitudinal strips and write (in parallel) to a single output file.  
    87  
    88 In detached mode and if the type of file is ''multiple\_file'', then each stand-alone XIOS process will collect data for a range of complete longitudinal strips and write to its own set of output files. If the ''one\_file'' option is chosen then all XIOS processes will collect their longitudinal strips and write (in parallel) to a single output file. Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job. The following subsection provides a typical example but the syntax will vary in different MPP environments. 
     118Iomput is based on \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS},  
     119the io\_server developed by Yann Meurdesoif from IPSL.  
     120The behaviour of the I/O subsystem is controlled by settings in the external XML files listed above.  
     121Key settings in the iodef.xml file are {\tt using\_server} and the {\tt type} tag associated with each defined file.  
     122The {\tt using\_server} setting determines whether or not the server will be used in \textit{attached mode} (as a library)  
     123[{\tt false}] or in \textit{detached mode} (as an external executable on N additional, dedicated cpus) [{\tt true}].  
     124The \textit{attached mode} is simpler to use but much less efficient for massively parallel applications.  
     125The type of each file can be either ''multiple\_file'' or ''one\_file''. 
     126 
     127In \textit{attached mode} and if the type of file is ''multiple\_file'',  
     128then each NEMO process will also act as an IO server and produce its own set of output files.  
     129Superficially, this emulates the standard behaviour in previous versions.  
     130However, the subdomain written out by each process does not correspond to the {\tt jpi x jpj x jpk}  
     131domain actually computed by the process (although it may if {\tt jpni=1}).  
     132Instead each process will have collected and written out a number of complete longitudinal strips.  
     133If the ''one\_file'' option is chosen then all processes will collect their longitudinal strips  
     134and write (in parallel) to a single output file.  
     135 
     136In \textit{detached mode} and if the type of file is ''multiple\_file'',  
     137then each stand-alone XIOS process will collect data for a range of complete longitudinal strips  
     138and write to its own set of output files. If the ''one\_file'' option is chosen then  
     139all XIOS processes will collect their longitudinal strips and write (in parallel) to a single output file.  
     140Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job.  
     141The following subsection provides a typical example but the syntax will vary in different MPP environments. 
    89142 
    90143\subsubsection{Number of cpu used by XIOS in detached mode} 
    91144 
    92 The number of cores used by the XIOS is specified when launching the model. The number of cores dedicated to XIOS should be from ~1/10 to ~1/50 of the number or cores dedicated to NEMO. Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors but this is a general recommendation and not specific to NEMO. It is difficult to provide precise recommendations because the optimal choice will depend on the particular hardware properties of the target system (parallel filesystem performance, available memory, memory bandwidth etc.) and the volume and frequency of data to be created. Here is an example of 2 cpus for the io\_server and 62 cpu for nemo using mpirun: 
     145The number of cores used by the XIOS is specified when launching the model.  
     146The number of cores dedicated to XIOS should be from ~1/10 to ~1/50 of the number or cores dedicated to NEMO.  
     147Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors  
     148but this is a general recommendation and not specific to NEMO.  
     149It is difficult to provide precise recommendations because the optimal choice will depend on  
     150the particular hardware properties of the target system (parallel filesystem performance, available memory,  
     151memory bandwidth etc.) and the volume and frequency of data to be created.  
     152Here is an example of 2 cpus for the io\_server and 62 cpu for nemo using mpirun: 
    93153 
    94154\texttt{ mpirun -np 62 ./nemo.exe : -np 2 ./xios\_server.exe } 
     
    96156\subsubsection{Control of XIOS: the XIOS context in iodef.xml} 
    97157 
    98 As well as the {\tt using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml. See the XML basics section below for more details on XML syntax and rules. 
     158As well as the {\tt using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml.  
     159See the XML basics section below for more details on XML syntax and rules. 
    99160 
    100161\begin{tabular}{|p{4cm}|p{6.0cm}|p{2.0cm}|} 
     
    106167   \hline 
    107168   buffer\_size &  
    108    buffer size used by XIOS to send data from NEMO to XIOS. Larger is more efficient. Note that needed/used buffer sizes are summarized at the end of the job &  
     169   buffer size used by XIOS to send data from NEMO to XIOS. Larger is more efficient.  
     170   Note that needed/used buffer sizes are summarized at the end of the job &  
    109171   25000000 \\  
    110172   \hline    
     
    136198\subsubsection{Installation} 
    137199 
    138 As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with NEMO. See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance. NEMO will need to link to the compiled XIOS library. The  
    139 \href{http://www.nemo-ocean.eu/Using-NEMO/User-Guides/Basics/XIOS-IO-server-installation-and-use}{XIOS with NEMO} guide provides an example illustration of how this can be achieved. 
     200As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with NEMO.  
     201See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance.  
     202NEMO will need to link to the compiled XIOS library.  
     203The \href{http://www.nemo-ocean.eu/Using-NEMO/User-Guides/Basics/XIOS-IO-server-installation-and-use}{XIOS with NEMO}  
     204guide provides an example illustration of how this can be achieved. 
    140205 
    141206\subsubsection{Add your own outputs} 
    142207 
    143 It is very easy to add your own outputs with iomput. Many standard fields and diagnostics are already prepared (i.e., steps 1 to 3 below have been done) and simply need to be activated by including the required output in a file definition in iodef.xml (step 4). To add new output variables, all 4 of the following steps must be taken. 
     208It is very easy to add your own outputs with iomput.  
     209Many standard fields and diagnostics are already prepared ($i.e.$, steps 1 to 3 below have been done)  
     210and simply need to be activated by including the required output in a file definition in iodef.xml (step 4).  
     211To add new output variables, all 4 of the following steps must be taken. 
    144212\begin{description} 
    145213\item[1.] in NEMO code, add a \\ 
     
    151219to the list of used modules in the upper part of your module.  
    152220 
    153 \item[3.] in the field\_def.xml file, add the definition of your variable using the same identifier you used in the f90 code (see subsequent sections for a details of the XML syntax and rules). For example: 
     221\item[3.] in the field\_def.xml file, add the definition of your variable using the same identifier  
     222you used in the f90 code (see subsequent sections for a details of the XML syntax and rules).  
     223For example: 
    154224\vspace{-20pt} 
    155225\begin{alltt}  {{\scriptsize 
     
    165235\end{verbatim} 
    166236}}\end{alltt}  
    167 Note your definition must be added to the field\_group whose reference grid is consistent with the size of the array passed to iomput. The grid\_ref attribute refers to definitions set in iodef.xml which, in turn, reference grids and axes either defined in the code (iom\_set\_domain\_attr and iom\_set\_axis\_attr in iom.F90) or defined in the domain\_def.xml file. E.g.: 
     237Note your definition must be added to the field\_group whose reference grid is consistent  
     238with the size of the array passed to iomput.  
     239The grid\_ref attribute refers to definitions set in iodef.xml which, in turn, reference grids  
     240and axes either defined in the code (iom\_set\_domain\_attr and iom\_set\_axis\_attr in iom.F90)  
     241or defined in the domain\_def.xml file. $e.g.$: 
    168242\vspace{-20pt} 
    169243\begin{alltt}  {{\scriptsize 
     
    173247}}\end{alltt}  
    174248Note, if your array is computed within the surface module each nn\_fsbc time\_step,  
    175 add the field definition within the field\_group defined with the id ''SBC'': $<$field\_group id=''SBC''...$>$ which has been defined with the correct frequency of operations (iom\_set\_field\_attr in iom.F90) 
     249add the field definition within the field\_group defined with the id ''SBC'': $<$field\_group id=''SBC''...$>$  
     250which has been defined with the correct frequency of operations (iom\_set\_field\_attr in iom.F90) 
    176251 
    177252\item[4.] add your field in one of the output files defined in iodef.xml (again see subsequent sections for syntax and rules)   \\ 
     
    201276\subsubsection{Structure of the xml file used in NEMO} 
    202277 
    203 The XML file used in XIOS is structured by 7 families of tags: context, axis, domain, grid, field, file and variable. Each tag family has hierarchy of three flavors (except for context): 
     278The XML file used in XIOS is structured by 7 families of tags: context, axis, domain, grid, field, file and variable.  
     279Each tag family has hierarchy of three flavors (except for context): 
    204280\\ 
    205281\begin{tabular}{|p{3.0cm}|p{4.5cm}|p{4.5cm}|} 
     
    225301\\ 
    226302 
    227 Each element may have several attributes. Some attributes are mandatory, other are optional but have a default value and other are are completely optional. Id is a special attribute used to identify an element or a group of elements. It must be unique for a kind of element. It is optional, but no reference to the corresponding element can be done if it is not defined. 
    228  
    229 The XML file is split into context tags that are used to isolate IO definition from different codes or different parts of a code. No interference is possible between 2 different contexts. Each context has its own calendar and an associated timestep. In NEMO, we used the following contexts (that can be defined in any order):\\ 
     303Each element may have several attributes.  
     304Some attributes are mandatory, other are optional but have a default value and other are are completely optional.  
     305Id is a special attribute used to identify an element or a group of elements.  
     306It must be unique for a kind of element.  
     307It is optional, but no reference to the corresponding element can be done if it is not defined. 
     308 
     309The XML file is split into context tags that are used to isolate IO definition from different codes  
     310or different parts of a code. No interference is possible between 2 different contexts.  
     311Each context has its own calendar and an associated timestep.  
     312In \NEMO, we used the following contexts (that can be defined in any order):\\ 
    230313\\ 
    231314\begin{tabular}{|p{3.0cm}|p{4.5cm}|p{4.5cm}|} 
     
    271354\\ 
    272355 
    273 \noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts (that can be defined in any order):\\ 
     356\noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts  
     357(that can be defined in any order):\\ 
    274358\\ 
    275359\begin{tabular}{|p{3.0cm}|p{4.5cm}|p{4.5cm}|} 
     
    305389\subsubsection{Nesting XML files} 
    306390 
    307 The XML file can be split in different parts to improve its readability and facilitate its use. The inclusion of XML files into the main XML file can be done through the attribute src: \\ 
     391The XML file can be split in different parts to improve its readability and facilitate its use.  
     392The inclusion of XML files into the main XML file can be done through the attribute src: \\ 
    308393{\scriptsize \verb? <context src="./nemo_def.xml" /> ?}\\ 
    309394  
     
    323408\subsubsection{Use of inheritance} 
    324409 
    325 XML extensively uses the concept of inheritance. XML has a tree based structure with a parent-child oriented relation: all children inherit attributes from parent, but an attribute defined in a child replace the inherited attribute value. Note that the special attribute ''id'' is never inherited.  \\ 
     410XML extensively uses the concept of inheritance.  
     411XML has a tree based structure with a parent-child oriented relation:  
     412all children inherit attributes from parent, but an attribute defined in a child replace the inherited attribute value.  
     413Note that the special attribute ''id'' is never inherited.  \\ 
    326414\\ 
    327415example 1: Direct inheritance. 
     
    362450\subsubsection{Use of Groups} 
    363451 
    364 Groups can be used for 2 purposes. Firstly, the group can be used to define common attributes to be shared by the elements of the group through inheritance. In the following example, we define a group of field that will share a common grid ''grid\_T\_2D''. Note that for the field ''toce'', we overwrite the grid definition inherited from the group by ''grid\_T\_3D''. 
     452Groups can be used for 2 purposes.  
     453Firstly, the group can be used to define common attributes to be shared by the elements of the group through inheritance.  
     454In the following example, we define a group of field that will share a common grid ''grid\_T\_2D''.  
     455Note that for the field ''toce'', we overwrite the grid definition inherited from the group by ''grid\_T\_3D''. 
    365456\vspace{-20pt} 
    366457\begin{alltt}  {{\scriptsize 
     
    375466}}\end{alltt}  
    376467 
    377 Secondly, the group can be used to replace a list of elements. Several examples of groups of fields are proposed at the end of the file {\tt CONFIG/SHARED/field\_def.xml}. For example, a short list of the usual variables related to the U grid: 
     468Secondly, the group can be used to replace a list of elements.  
     469Several examples of groups of fields are proposed at the end of the file {\tt CONFIG/SHARED/field\_def.xml}.  
     470For example, a short list of the usual variables related to the U grid: 
    378471\vspace{-20pt} 
    379472\begin{alltt}  {{\scriptsize 
     
    399492\subsection{Detailed functionalities } 
    400493 
    401 The file {\tt NEMOGCM/CONFIG/ORCA2\_LIM/iodef\_demo.xml} provides several examples of the use of the new functionalities offered by the XML interface of XIOS.  
     494The file {\tt NEMOGCM/CONFIG/ORCA2\_LIM/iodef\_demo.xml} provides several examples of the use  
     495of the new functionalities offered by the XML interface of XIOS.  
    402496 
    403497\subsubsection{Define horizontal subdomains} 
    404 Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of the tag family domain. It must therefore be done in the domain part of the XML file. For example, in {\tt CONFIG/SHARED/domain\_def.xml}, we provide the following example of a definition of a 5 by 5 box with the bottom left corner at point (10,10). 
     498Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of the tag family domain.  
     499It must therefore be done in the domain part of the XML file.  
     500For example, in {\tt CONFIG/SHARED/domain\_def.xml}, we provide the following example of a definition  
     501of a 5 by 5 box with the bottom left corner at point (10,10). 
    405502\vspace{-20pt} 
    406503\begin{alltt}  {{\scriptsize 
     
    419516\end{verbatim} 
    420517}}\end{alltt}  
    421 Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. The Equatorial section, the TAO, RAMA and PIRATA moorings are alredy registered in the code and can therefore be outputted without taking care of their (i,j) position in the grid. These predefined domains can be activated by the use of specific domain\_ref: ''EqT'', ''EqU'' or ''EqW'' for the equatorial sections and the mooring position for TAO, RAMA and PIRATA followed by ''T'' (for example: ''8s137eT'', ''1.5s80.5eT'' ...) 
     518Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain.  
     519The Equatorial section, the TAO, RAMA and PIRATA moorings are alredy registered in the code  
     520and can therefore be outputted without taking care of their (i,j) position in the grid.  
     521These predefined domains can be activated by the use of specific domain\_ref: ''EqT'', ''EqU'' or ''EqW''  
     522for the equatorial sections and the mooring position for TAO, RAMA and PIRATA followed  
     523by ''T'' (for example: ''8s137eT'', ''1.5s80.5eT'' ...) 
    422524\vspace{-20pt} 
    423525\begin{alltt}  {{\scriptsize 
     
    11161218% ------------------------------------------------------------------------------------------------------------- 
    11171219\section[Tracer/Dynamics Trends (TRD)] 
    1118                   {Tracer/Dynamics Trends  (\key{trdtra}, \key{trddyn},    \\  
    1119                                                              \key{trddvor}, \key{trdmld})} 
     1220                  {Tracer/Dynamics Trends  (\ngn{namtrd})} 
    11201221\label{DIA_trd} 
    11211222 
     
    11241225%------------------------------------------------------------------------------------------------------------- 
    11251226 
    1126 When \key{trddyn} and/or \key{trddyn} CPP variables are defined, each  
    1127 trend of the dynamics and/or temperature and salinity time evolution equations  
    1128 is stored in three-dimensional arrays just after their computation ($i.e.$ at the end  
    1129 of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines). Options are defined by 
    1130 \ngn{namtrd} namelist variables. These trends are then  
    1131 used in \mdl{trdmod} (see TRD directory) every \textit{nn\_trd } time-steps. 
    1132  
    1133 What is done depends on the CPP keys defined: 
     1227Each trend of the dynamics and/or temperature and salinity time evolution equations  
     1228can be send to \mdl{trddyn} and/or \mdl{trdtra} modules (see TRD directory) just after their computation  
     1229($i.e.$ at the end of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines).  
     1230This capability is controlled by options offered in \ngn{namtrd} namelist.  
     1231Note that the output are done with xIOS, and therefore the \key{IOM} is required. 
     1232 
     1233What is done depends on the \ngn{namtrd} logical set to \textit{true}: 
    11341234\begin{description} 
    1135 \item[\key{trddyn}, \key{trdtra}] : a check of the basin averaged properties of the momentum  
    1136 and/or tracer equations is performed ;  
    1137 \item[\key{trdvor}] : a vertical summation of the moment tendencies is performed,  
    1138 then the curl is computed to obtain the barotropic vorticity tendencies which are output ; 
    1139 \item[\key{trdmld}] : output of the tracer tendencies averaged vertically   
    1140 either over the mixed layer (\np{nn\_ctls}=0),  
    1141 or       over a fixed number of model levels (\np{nn\_ctls}$>$1 provides the number of level),  
    1142 or       over a spatially varying but temporally fixed number of levels (typically the base  
    1143 of the winter mixed layer) read in \ifile{ctlsurf\_idx} (\np{nn\_ctls}=1) ; 
     1235\item[\np{ln\_glo\_trd}] : at each \np{nn\_trd} time-step a check of the basin averaged properties  
     1236of the momentum and tracer equations is performed. This also includes a check of $T^2$, $S^2$,  
     1237$\tfrac{1}{2} (u^2+v2)$, and potential energy time evolution equations properties ;  
     1238\item[\np{ln\_dyn\_trd}] : each 3D trend of the evolution of the two momentum components is output ;  
     1239\item[\np{ln\_dyn\_mxl}] : each 3D trend of the evolution of the two momentum components averaged  
     1240                           over the mixed layer is output  ;  
     1241\item[\np{ln\_vor\_trd}] : a vertical summation of the moment tendencies is performed,  
     1242                           then the curl is computed to obtain the barotropic vorticity tendencies which are output ; 
     1243\item[\np{ln\_KE\_trd}]  : each 3D trend of the Kinetic Energy equation is output ; 
     1244\item[\np{ln\_tra\_trd}] : each 3D trend of the evolution of temperature and salinity is output ; 
     1245\item[\np{ln\_tra\_mxl}] : each 2D trend of the evolution of temperature and salinity averaged  
     1246                           over the mixed layer is output ; 
    11441247\end{description} 
    1145  
    1146 The units in the output file can be changed using the \np{nn\_ucf} namelist parameter.  
    1147 For example, in case of salinity tendency the units are given by PSU/s/\np{nn\_ucf}. 
    1148 Setting \np{nn\_ucf}=86400 ($i.e.$ the number of second in a day) provides the tendencies in PSU/d. 
    1149  
    1150 When \key{trdmld} is defined, two time averaging procedure are proposed. 
    1151 Setting \np{ln\_trdmld\_instant} to \textit{true}, a simple time averaging is performed,  
    1152 so that the resulting tendency is the contribution to the change of a quantity between  
    1153 the two instantaneous values taken at the extremities of the time averaging period. 
    1154 Setting \np{ln\_trdmld\_instant} to \textit{false}, a double time averaging is performed,  
    1155 so that the resulting tendency is the contribution to the change of a quantity between  
    1156 two \textit{time mean} values. The later option requires the use of an extra file, \ifile{restart\_mld}   
    1157 (\np{ln\_trdmld\_restart}=true), to restart a run. 
    1158  
    11591248 
    11601249Note that the mixed layer tendency diagnostic can also be used on biogeochemical models  
    11611250via the \key{trdtrc} and \key{trdmld\_trc} CPP keys. 
     1251 
     1252\textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested.  
     1253In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl}  
     1254are not working, and none of the option have been tested with variable volume ($i.e.$ \key{vvl} defined). 
     1255 
    11621256 
    11631257% ------------------------------------------------------------------------------------------------------------- 
     
    12801374\label{DIA_diag_harm} 
    12811375 
    1282 A module is available to compute the amplitude and phase for tidal waves.  
    1283 This diagnostic is actived with \key{diaharm}. 
    1284  
    12851376%------------------------------------------namdia_harm---------------------------------------------------- 
    12861377\namdisplay{namdia_harm} 
    12871378%---------------------------------------------------------------------------------------------------------- 
    12881379 
    1289 Concerning the on-line Harmonic analysis, some parameters are available in namelist 
    1290 \ngn{namdia\_harm} : 
    1291  
    1292 - \texttt{nit000\_han} is the first time step used for harmonic analysis 
    1293  
    1294 - \texttt{nitend\_han} is the last time step used for harmonic analysis 
    1295  
    1296 - \texttt{nstep\_han} is the time step frequency for harmonic analysis 
    1297  
    1298 - \texttt{nb\_ana} is the number of harmonics to analyse 
    1299  
    1300 - \texttt{tname} is an array with names of tidal constituents to analyse 
    1301  
    1302 \texttt{nit000\_han} and \texttt{nitend\_han} must be between \texttt{nit000} and \texttt{nitend} of the simulation. 
     1380A module is available to compute the amplitude and phase of tidal waves.  
     1381This on-line Harmonic analysis is actived with \key{diaharm}. 
     1382Some parameters are available in namelist \ngn{namdia\_harm} : 
     1383 
     1384- \np{nit000\_han} is the first time step used for harmonic analysis 
     1385 
     1386- \np{nitend\_han} is the last time step used for harmonic analysis 
     1387 
     1388- \np{nstep\_han} is the time step frequency for harmonic analysis 
     1389 
     1390- \np{nb\_ana} is the number of harmonics to analyse 
     1391 
     1392- \np{tname} is an array with names of tidal constituents to analyse 
     1393 
     1394\np{nit000\_han} and \np{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation. 
    13031395The restart capability is not implemented. 
    13041396 
    1305 The Harmonic analysis solve this equation: 
     1397The Harmonic analysis solve the following equation: 
    13061398\begin{equation} 
    13071399h_{i} - A_{0} + \sum^{nb\_ana}_{j=1}[A_{j}cos(\nu_{j}t_{j}-\phi_{j})] = e_{i} 
     
    13241416\label{DIA_diag_dct} 
    13251417 
    1326 A module is available to compute the transport of volume, heat and salt through sections. This diagnostic 
    1327 is actived with \key{diadct}. 
     1418%------------------------------------------namdct---------------------------------------------------- 
     1419\namdisplay{namdct} 
     1420%------------------------------------------------------------------------------------------------------------- 
     1421 
     1422A module is available to compute the transport of volume, heat and salt through sections.  
     1423This diagnostic is actived with \key{diadct}. 
    13281424 
    13291425Each section is defined by the coordinates of its 2 extremities. The pathways between them are contructed 
     
    13431439and the time scales over which they are averaged, as well as the level of output for debugging: 
    13441440 
    1345 %------------------------------------------namdct---------------------------------------------------- 
    1346 \namdisplay{namdct} 
    1347 %------------------------------------------------------------------------------------------------------------- 
    1348  
    1349 \texttt{nn\_dct}: frequency of instantaneous transports computing 
    1350  
    1351 \texttt{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 
    1352  
    1353 \texttt{nn\_debug}: debugging of the section 
    1354  
    1355 \subsubsection{ To create a binary file containing the pathway of each section } 
    1356  
    1357 In \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT/run}, the file \texttt{ {list\_sections.ascii\_global}} 
     1441\np{nn\_dct}: frequency of instantaneous transports computing 
     1442 
     1443\np{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 
     1444 
     1445\np{nn\_debug}: debugging of the section 
     1446 
     1447\subsubsection{ Creating a binary file containing the pathway of each section } 
     1448 
     1449In \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT/run}, the file \textit{ {list\_sections.ascii\_global}} 
    13581450contains a list of all the sections that are to be computed (this list of sections is based on MERSEA project metrics). 
    13591451 
     
    14671559\texttt{=/0, =/ 1000.}   &  diagonal   & eastward  & westward  & postive: eastward  \\ \hline                 
    14681560\end{tabular} 
    1469  
    1470  
    1471  
    1472 % ------------------------------------------------------------------------------------------------------------- 
    1473 %       Other Diagnostics 
    1474 % ------------------------------------------------------------------------------------------------------------- 
    1475 \section{Other Diagnostics (\key{diahth}, \key{diaar5})} 
    1476 \label{DIA_diag_others} 
    1477  
    1478  
    1479 Aside from the standard model variables, other diagnostics can be computed  
    1480 on-line. The available ready-to-add diagnostics routines can be found in directory DIA.  
    1481 Among the available diagnostics the following ones are obtained when defining  
    1482 the \key{diahth} CPP key:  
    1483  
    1484 - the mixed layer depth (based on a density criterion, \citet{de_Boyer_Montegut_al_JGR04}) (\mdl{diahth}) 
    1485  
    1486 - the turbocline depth (based on a turbulent mixing coefficient criterion) (\mdl{diahth}) 
    1487  
    1488 - the depth of the 20\deg C isotherm (\mdl{diahth}) 
    1489  
    1490 - the depth of the thermocline (maximum of the vertical temperature gradient) (\mdl{diahth}) 
    1491  
    1492 The poleward heat and salt transports, their advective and diffusive component, and  
    1493 the meriodional stream function can be computed on-line in \mdl{diaptr}  
    1494 \np{ln\_diaptr} to true (see the \textit{\ngn{namptr} } namelist below).   
    1495 When \np{ln\_subbas}~=~true, transports and stream function are computed  
    1496 for the Atlantic, Indian, Pacific and Indo-Pacific Oceans (defined north of 30\deg S)  
    1497 as well as for the World Ocean. The sub-basin decomposition requires an input file  
    1498 (\ifile{subbasins}) which contains three 2D mask arrays, the Indo-Pacific mask  
    1499 been deduced from the sum of the Indian and Pacific mask (Fig~\ref{Fig_mask_subasins}).  
    1500  
    1501 %------------------------------------------namptr---------------------------------------------------- 
    1502 \namdisplay{namptr}  
    1503 %------------------------------------------------------------------------------------------------------------- 
    1504 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    1505 \begin{figure}[!t]     \begin{center} 
    1506 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_mask_subasins.pdf} 
    1507 \caption{   \label{Fig_mask_subasins} 
    1508 Decomposition of the World Ocean (here ORCA2) into sub-basin used in to compute 
    1509 the heat and salt transports as well as the meridional stream-function: Atlantic basin (red),  
    1510 Pacific basin (green), Indian basin (bleue), Indo-Pacific basin (bleue+green).  
    1511 Note that semi-enclosed seas (Red, Med and Baltic seas) as well as Hudson Bay  
    1512 are removed from the sub-basins. Note also that the Arctic Ocean has been split  
    1513 into Atlantic and Pacific basins along the North fold line.  } 
    1514 \end{center}   \end{figure}   
    1515 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    1516  
    1517 In addition, a series of diagnostics has been added in the \mdl{diaar5}.  
    1518 They corresponds to outputs that are required for AR5 simulations  
    1519 (see Section \ref{DIA_steric} below for one of them).  
    1520 Activating those outputs requires to define the \key{diaar5} CPP key. 
    1521 \\ 
    1522 \\ 
    1523  
    15241561 
    15251562 
     
    16771714the \key{diaar5} defined to be called. 
    16781715 
     1716 
     1717 
     1718% ------------------------------------------------------------------------------------------------------------- 
     1719%       Other Diagnostics 
     1720% ------------------------------------------------------------------------------------------------------------- 
     1721\section{Other Diagnostics (\key{diahth}, \key{diaar5})} 
     1722\label{DIA_diag_others} 
     1723 
     1724 
     1725Aside from the standard model variables, other diagnostics can be computed on-line.  
     1726The available ready-to-add diagnostics modules can be found in directory DIA.  
     1727 
     1728\subsection{Depth of various quantities (\mdl{diahth})} 
     1729 
     1730Among the available diagnostics the following ones are obtained when defining  
     1731the \key{diahth} CPP key:  
     1732 
     1733- the mixed layer depth (based on a density criterion \citep{de_Boyer_Montegut_al_JGR04}) (\mdl{diahth}) 
     1734 
     1735- the turbocline depth (based on a turbulent mixing coefficient criterion) (\mdl{diahth}) 
     1736 
     1737- the depth of the 20\deg C isotherm (\mdl{diahth}) 
     1738 
     1739- the depth of the thermocline (maximum of the vertical temperature gradient) (\mdl{diahth}) 
     1740 
     1741% ----------------------------------------------------------- 
     1742%     Poleward heat and salt transports 
     1743% ----------------------------------------------------------- 
     1744 
     1745\subsection{Poleward heat and salt transports (\mdl{diaptr})} 
     1746 
     1747%------------------------------------------namptr----------------------------------------- 
     1748\namdisplay{namptr}  
     1749%----------------------------------------------------------------------------------------- 
     1750 
     1751The poleward heat and salt transports, their advective and diffusive component, and  
     1752the meriodional stream function can be computed on-line in \mdl{diaptr}  
     1753\np{ln\_diaptr} to true (see the \textit{\ngn{namptr} } namelist below).   
     1754When \np{ln\_subbas}~=~true, transports and stream function are computed  
     1755for the Atlantic, Indian, Pacific and Indo-Pacific Oceans (defined north of 30\deg S)  
     1756as well as for the World Ocean. The sub-basin decomposition requires an input file  
     1757(\ifile{subbasins}) which contains three 2D mask arrays, the Indo-Pacific mask  
     1758been deduced from the sum of the Indian and Pacific mask (Fig~\ref{Fig_mask_subasins}).  
     1759 
     1760%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     1761\begin{figure}[!t]     \begin{center} 
     1762\includegraphics[width=1.0\textwidth]{Fig_mask_subasins} 
     1763\caption{   \label{Fig_mask_subasins} 
     1764Decomposition of the World Ocean (here ORCA2) into sub-basin used in to compute 
     1765the heat and salt transports as well as the meridional stream-function: Atlantic basin (red),  
     1766Pacific basin (green), Indian basin (bleue), Indo-Pacific basin (bleue+green).  
     1767Note that semi-enclosed seas (Red, Med and Baltic seas) as well as Hudson Bay  
     1768are removed from the sub-basins. Note also that the Arctic Ocean has been split  
     1769into Atlantic and Pacific basins along the North fold line.  } 
     1770\end{center}   \end{figure}   
     1771%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     1772 
     1773 
     1774% ----------------------------------------------------------- 
     1775%       CMIP specific diagnostics  
     1776% ----------------------------------------------------------- 
     1777\subsection{CMIP specific diagnostics (\mdl{diaar5})} 
     1778 
     1779A series of diagnostics has been added in the \mdl{diaar5}.  
     1780They corresponds to outputs that are required for AR5 simulations (CMIP5) 
     1781(see also Section \ref{DIA_steric} for one of them).  
     1782Activating those outputs requires to define the \key{diaar5} CPP key. 
     1783 
     1784 
     1785% ----------------------------------------------------------- 
     1786%       25 hour mean and hourly Surface, Mid and Bed  
     1787% ----------------------------------------------------------- 
     1788\subsection{25 hour mean output for tidal models } 
     1789 
     1790%------------------------------------------nam_dia25h------------------------------------- 
     1791\namdisplay{nam_dia25h} 
     1792%----------------------------------------------------------------------------------------- 
     1793 
     1794A module is available to compute a crudely detided M2 signal by obtaining a 25 hour mean. 
     1795The 25 hour mean is available for daily runs by summing up the 25 hourly instantananeous hourly values from 
     1796midnight at the start of the day to midight at the day end. 
     1797This diagnostic is actived with the logical  $ln\_dia25h$ 
     1798 
     1799 
     1800% ----------------------------------------------------------- 
     1801%     Top Middle and Bed hourly output 
     1802% ----------------------------------------------------------- 
     1803\subsection{Top Middle and Bed hourly output } 
     1804 
     1805%------------------------------------------nam_diatmb----------------------------------------------------- 
     1806\namdisplay{nam_diatmb} 
     1807%---------------------------------------------------------------------------------------------------------- 
     1808 
     1809A module is available to output the surface (top), mid water and bed diagnostics of a set of standard variables.  
     1810This can be a useful diagnostic when hourly or sub-hourly output is required in high resolution tidal outputs. 
     1811The tidal signal is retained but the overall data usage is cut to just three vertical levels. Also the bottom level  
     1812is calculated for each cell. 
     1813This diagnostic is actived with the logical  $ln\_diatmb$ 
     1814 
     1815 
     1816 
     1817% ----------------------------------------------------------- 
     1818%     Courant numbers 
     1819% ----------------------------------------------------------- 
     1820\subsection{Courant numbers} 
     1821Courant numbers provide a theoretical indication of the model's numerical stability. The advective Courant numbers can be calculated according to 
     1822\begin{equation} 
     1823\label{eq:CFL} 
     1824C_u = |u|\frac{\rdt}{e_{1u}}, \quad C_v = |v|\frac{\rdt}{e_{2v}}, \quad C_w = |w|\frac{\rdt}{e_{3w}} 
     1825\end{equation} 
     1826in the zonal, meridional and vertical directions respectively. The vertical component is included although it is not strictly valid as the vertical velocity is calculated from the continuity equation rather than as a prognostic variable. Physically this represents the rate at which information is propogated across a grid cell. Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 
     1827 
     1828The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of where the maximum value occurs. At the end of the model run the maximum value of $C_u$, $C_v$, and $C_w$ for the whole model run is printed along with the coordinates of each. The maximum values from the run are also copied to the ocean.output file.  
     1829 
     1830 
    16791831% ================================================================ 
    16801832 
     
    16901842 
    16911843 
     1844\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_DOM.tex

    r5120 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    2 % Chapter 2 Space and Time Domain (DOM) 
     4% Chapter 2 ——— Space and Time Domain (DOM) 
    35% ================================================================ 
    46\chapter{Space Domain (DOM) } 
     
    4042%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    4143\begin{figure}[!tb]    \begin{center} 
    42 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_cell.pdf} 
     44\includegraphics[width=0.90\textwidth]{Fig_cell} 
    4345\caption{ \label{Fig_cell}     
    4446Arrangement of variables. $t$ indicates scalar points where temperature,  
     
    138140and $f$-points, and its divergence defined at $t$-points: 
    139141\begin{eqnarray}  \label{Eq_DOM_curl} 
    140  \nabla \times {\rm {\bf A}}\equiv & 
     142 \nabla \times {\rm{\bf A}}\equiv & 
    141143      \frac{1}{e_{2v}\,e_{3vw} } \ \left( \delta_{j +1/2} \left[e_{3w}\,a_3 \right] -\delta_{k+1/2} \left[e_{2v} \,a_2 \right] \right)  &\ \mathbf{i} \\  
    142144 +& \frac{1}{e_{2u}\,e_{3uw}} \ \left( \delta_{k+1/2} \left[e_{1u}\,a_1  \right] -\delta_{i +1/2} \left[e_{3w}\,a_3 \right] \right)  &\ \mathbf{j} \\ 
    143145 +& \frac{1}{e_{1f} \,e_{2f}    } \ \left( \delta_{i +1/2} \left[e_{2v}\,a_2  \right] -\delta_{j +1/2} \left[e_{1u}\,a_1 \right] \right)  &\ \mathbf{k} 
    144146 \end{eqnarray} 
    145 \begin{equation} \label{Eq_DOM_div} 
    146 \nabla \cdot \rm{\bf A}=\frac{1}{e_{1t}\,e_{2t}\,e_{3t}}\left( \delta_i \left[e_{2u}\,e_{3u}\,a_1 \right] 
    147                                                                                          +\delta_j \left[e_{1v}\,e_{3v}\,a_2 \right] \right)+\frac{1}{e_{3t} }\delta_k \left[a_3 \right] 
    148 \end{equation} 
    149  
    150 In the special case of a pure $z$-coordinate system, \eqref{Eq_DOM_lap} and  
    151 \eqref{Eq_DOM_div} can be simplified. In this case, the vertical scale factor  
    152 becomes a function of the single variable $k$ and thus does not depend on the  
    153 horizontal location of a grid point. For example \eqref{Eq_DOM_div} reduces to:  
    154 \begin{equation*} 
    155 \nabla \cdot \rm{\bf A}=\frac{1}{e_{1t}\,e_{2t}} \left( \delta_i \left[e_{2u}\,a_1 \right]  
    156                                                                               +\delta_j \left[e_{1v}\, a_2 \right]  \right) 
    157                                                      +\frac{1}{e_{3t}} \delta_k \left[             a_3 \right] 
    158 \end{equation*} 
     147\begin{eqnarray} \label{Eq_DOM_div} 
     148\nabla \cdot \rm{\bf A} \equiv  
     149    \frac{1}{e_{1t}\,e_{2t}\,e_{3t}} \left( \delta_i \left[e_{2u}\,e_{3u}\,a_1 \right] 
     150                                           +\delta_j \left[e_{1v}\,e_{3v}\,a_2 \right] \right)+\frac{1}{e_{3t} }\delta_k \left[a_3 \right] 
     151\end{eqnarray} 
    159152 
    160153The vertical average over the whole water column denoted by an overbar becomes  
     
    183176Let $a$ and $b$ be two fields defined on the mesh, with value zero inside  
    184177continental area. Using integration by parts it can be shown that the differencing  
    185 operators ($\delta_i$, $\delta_j$ and $\delta_k$) are anti-symmetric linear  
    186 operators, and further that the averaging operators $\overline{\,\cdot\,}^{\,i}$,  
     178operators ($\delta_i$, $\delta_j$ and $\delta_k$) are skew-symmetric linear operators,  
     179and further that the averaging operators $\overline{\,\cdot\,}^{\,i}$,  
    187180$\overline{\,\cdot\,}^{\,k}$ and $\overline{\,\cdot\,}^{\,k}$) are symmetric linear  
    188181operators, $i.e.$ 
     
    210203%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    211204\begin{figure}[!tb]  \begin{center} 
    212 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_index_hor.pdf} 
     205\includegraphics[width=0.90\textwidth]{Fig_index_hor} 
    213206\caption{   \label{Fig_index_hor}     
    214207Horizontal integer indexing used in the \textsc{Fortran} code. The dashed area indicates  
     
    260253%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    261254\begin{figure}[!pt]    \begin{center} 
    262 \includegraphics[width=.90\textwidth]{./TexFiles/Figures/Fig_index_vert.pdf} 
     255\includegraphics[width=.90\textwidth]{Fig_index_vert} 
    263256\caption{ \label{Fig_index_vert}      
    264257Vertical integer indexing used in the \textsc{Fortran } code. Note that  
     
    358351%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    359352\begin{figure}[!t]     \begin{center} 
    360 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_zgr_e3.pdf} 
     353\includegraphics[width=0.90\textwidth]{Fig_zgr_e3} 
    361354\caption{ \label{Fig_zgr_e3}     
    362355Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical,  
     
    364357For both grids here,  the same $w$-point depth has been chosen but in (a) the  
    365358$t$-points are set half way between $w$-points while in (b) they are defined from  
    366 an analytical function: $z(k)=5\,(i-1/2)^3 - 45\,(i-1/2)^2 + 140\,(i-1/2) - 150$.  
     359an analytical function: $z(k)=5\,(k-1/2)^3 - 45\,(k-1/2)^2 + 140\,(k-1/2) - 150$.  
    367360Note the resulting difference between the value of the grid-size $\Delta_k$ and  
    368361those of the scale factor $e_k$. } 
     
    425418 
    426419The choice of the grid must be consistent with the boundary conditions specified  
    427 by the parameter \np{jperio} (see {\S\ref{LBC}). 
     420by \np{jperio}, a parameter found in \ngn{namcfg} namelist (see {\S\ref{LBC}). 
    428421 
    429422% ------------------------------------------------------------------------------------------------------------- 
     
    467460%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    468461\begin{figure}[!tb]    \begin{center} 
    469 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_z_zps_s_sps.pdf} 
     462\includegraphics[width=1.0\textwidth]{Fig_z_zps_s_sps} 
    470463\caption{  \label{Fig_z_zps_s_sps}    
    471464The ocean bottom as seen by the model:  
     
    475468(d) hybrid $s-z$ coordinate,  
    476469(e) hybrid $s-z$ coordinate with partial step, and  
    477 (f) same as (e) but with variable volume associated with the non-linear free surface.  
    478 Note that the variable volume option (\key{vvl}) can be used with any of the  
     470(f) same as (e) but in the non-linear free surface (\np{ln\_linssh}=false).  
     471Note that the non-linear free surface can be used with any of the  
    4794725 coordinates (a) to (e).} 
    480473\end{center}   \end{figure} 
    481474%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    482475 
    483 The choice of a vertical coordinate, even if it is made through a namelist parameter,  
     476The choice of a vertical coordinate, even if it is made through \ngn{namzgr} namelist parameters,  
    484477must be done once of all at the beginning of an experiment. It is not intended as an  
    485478option which can be enabled or disabled in the middle of an experiment. Three main  
     
    488481(\np{ln\_zps}~=~true), or generalized, $s$-coordinate (\np{ln\_sco}~=~true).  
    489482Hybridation of the three main coordinates are available: $s-z$ or $s-zps$ coordinate  
    490 (Fig.~\ref{Fig_z_zps_s_sps}d and \ref{Fig_z_zps_s_sps}e). When using the variable  
    491 volume option \key{vvl} ($i.e.$ non-linear free surface), the coordinate follow the  
    492 time-variation of the free surface so that the transformation is time dependent:  
    493 $z(i,j,k,t)$ (Fig.~\ref{Fig_z_zps_s_sps}f). This option can be used with full step  
    494 bathymetry or $s$-coordinate (hybrid and partial step coordinates have not  
    495 yet been tested in NEMO v2.3). If using $z$-coordinate with partial step bathymetry 
    496 (\np{ln\_zps}~=~true), ocean cavity beneath ice shelves can be open (\np{ln\_isfcav}~=~true). 
     483(Fig.~\ref{Fig_z_zps_s_sps}d and \ref{Fig_z_zps_s_sps}e). By default a non-linear free surface is used: 
     484the coordinate follow the time-variation of the free surface so that the transformation is time dependent:  
     485$z(i,j,k,t)$ (Fig.~\ref{Fig_z_zps_s_sps}f). When a linear free surface is assumed (\np{ln\_linssh}=true),  
     486the vertical coordinate are fixed in time, but the seawater can move up and down across the z=0 surface  
     487(in other words, the top of the ocean in not a rigid-lid).  
     488The last choice in terms of vertical coordinate concerns the presence (or not) in the model domain  
     489of ocean cavities beneath ice shelves. Setting \np{ln\_isfcav} to true allows to manage ocean cavities,  
     490otherwise they are filled in. This option is currently only available in $z$- or $zps$-coordinate, 
     491and partial step are also applied at the ocean/ice shelf interface.  
    497492 
    498493Contrary to the horizontal grid, the vertical grid is computed in the code and no  
    499494provision is made for reading it from a file. The only input file is the bathymetry  
    500 (in meters) (\ifile{bathy\_meter})  
     495(in meters) (\ifile{bathy\_meter}).  
    501496\footnote{N.B. in full step $z$-coordinate, a \ifile{bathy\_level} file can replace the  
    502497\ifile{bathy\_meter} file, so that the computation of the number of wet ocean point  
    503498in each water column is by-passed}.  
     499If \np{ln\_isfcav}~=~true, an extra file input file describing the ice shelf draft  
     500(in meters) (\ifile{isf\_draft\_meter}) is needed. 
     501 
    504502After reading the bathymetry, the algorithm for vertical grid definition differs  
    505503between the different options: 
     
    519517%%% 
    520518 
    521 The arrays describing the grid point depths and vertical scale factors  
    522 are three dimensional arrays $(i,j,k)$ even in the case of $z$-coordinate with  
    523 full step bottom topography. In non-linear free surface (\key{vvl}), their knowledge 
    524 is required at \textit{before}, \textit{now} and \textit{after} time step, while they  
    525 do not vary in time in linear free surface case.  
    526 To improve the code readability while providing this flexibility, the vertical coordinate  
    527 and scale factors are defined as functions of  
    528 $(i,j,k)$ with "fs" as prefix (examples: \textit{fse3t\_b, fse3t\_n, fse3t\_a,}  
    529 for the  \textit{before}, \textit{now} and \textit{after} scale factors at $t$-point)  
    530 that can be either three different arrays when \key{vvl} is defined, or a single fixed arrays.  
    531 These functions are defined in the file \hf{domzgr\_substitute} of the DOM directory.  
    532 They are used throughout the code, and replaced by the corresponding arrays at  
    533 the time of pre-processing (CPP capability). 
     519Unless a linear free surface is used (\np{ln\_linssh}=false), the arrays describing  
     520the grid point depths and vertical scale factors are three set of three dimensional arrays $(i,j,k)$  
     521defined at \textit{before}, \textit{now} and \textit{after} time step. The time at which they are 
     522defined is indicated by a suffix:$\_b$, $\_n$, or $\_a$, respectively. They are updated at each model time step 
     523using a fixed reference coordinate system which computer names have a $\_0$ suffix.  
     524When the linear free surface option is used (\np{ln\_linssh}=true), \textit{before}, \textit{now}  
     525and \textit{after} arrays are simply set one for all to their reference counterpart.  
     526 
    534527 
    535528% ------------------------------------------------------------------------------------------------------------- 
     
    540533 
    541534Three options are possible for defining the bathymetry, according to the  
    542 namelist variable \np{nn\_bathy}:  
     535namelist variable \np{nn\_bathy} (found in \ngn{namdom} namelist):  
    543536\begin{description} 
    544537\item[\np{nn\_bathy} = 0] a flat-bottom domain is defined. The total depth $z_w (jpk)$  
     
    548541domain width at the central latitude. This is meant for the "EEL-R5" configuration,  
    549542a periodic or open boundary channel with a seamount.  
    550 \item[\np{nn\_bathy} = 1] read a bathymetry. The \ifile{bathy\_meter} file (Netcdf format)  
    551 provides the ocean depth (positive, in meters) at each grid point of the model grid.  
    552 The bathymetry is usually built by interpolating a standard bathymetry product  
     543\item[\np{nn\_bathy} = 1] read a bathymetry and ice shelf draft (if needed). 
     544 The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) 
     545 at each grid point of the model grid. The bathymetry is usually built by interpolating a standard bathymetry product  
    553546($e.g.$ ETOPO2) onto the horizontal ocean mesh. Defining the bathymetry also  
    554547defines the coastline: where the bathymetry is zero, no model levels are defined  
    555548(all levels are masked). 
     549 
     550The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) 
     551 at each grid point of the model grid. This file is only needed if \np{ln\_isfcav}~=~true.  
     552Defining the ice shelf draft will also define the ice shelf edge and the grounding line position. 
    556553\end{description} 
    557554 
     
    573570%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    574571\begin{figure}[!tb]    \begin{center} 
    575 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_zgr.pdf} 
     572\includegraphics[width=0.90\textwidth]{Fig_zgr} 
    576573\caption{ \label{Fig_zgr}     
    577574Default vertical mesh for ORCA2: 30 ocean levels (L30). Vertical level functions for  
     
    610607(Fig.~\ref{Fig_zgr}). 
    611608 
     609If the ice shelf cavities are opened (\np{ln\_isfcav}=~true~}), the definition of $z_0$ is the same.  
     610However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to: 
     611\begin{equation} \label{DOM_zgr_ana} 
     612\begin{split} 
     613 e_3^T(k) &= z_W (k+1) - z_W (k)   \\ 
     614 e_3^W(k) &= z_T (k)   - z_T (k-1) \\ 
     615\end{split} 
     616\end{equation} 
     617This formulation decrease the self-generated circulation into the ice shelf cavity  
     618(which can, in extreme case, leads to blow up).\\ 
     619 
     620  
    612621The most used vertical grid for ORCA2 has $10~m$ ($500~m)$ resolution in the  
    613622surface (bottom) layers and a depth which varies from 0 at the sea surface to a  
     
    721730usually 10\%, of the default thickness $e_{3t}(jk)$). 
    722731 
    723  \colorbox{yellow}{Add a figure here of pstep especially at last ocean level } 
     732\gmcomment{ \colorbox{yellow}{Add a figure here of pstep especially at last ocean level } } 
    724733 
    725734% ------------------------------------------------------------------------------------------------------------- 
     
    749758depth, since a mixed step-like and bottom-following representation of the  
    750759topography can be used (Fig.~\ref{Fig_z_zps_s_sps}d-e) or an envelop bathymetry can be defined (Fig.~\ref{Fig_z_zps_s_sps}f). 
    751 The namelist parameter \np{rn\_rmax} determines the slope at which the terrain-following coordinate intersects the sea bed and becomes a pseudo z-coordinate. The coordinate can also be hybridised by specifying \np{rn\_sbot\_min} and \np{rn\_sbot\_max} as the minimum and maximum depths at which the terrain-following vertical coordinate is calculated. 
    752  
    753 Options for stretching the coordinate are provided as examples, but care must be taken to ensure that the vertical stretch used is appropriate for the application. 
    754  
    755 The original default NEMO s-coordinate stretching is available if neither of the other options are specified as true (\np{ln\_sco\_SH94}~=~false and \np{ln\_sco\_SF12}~=~false.) This uses a depth independent $\tanh$ function for the stretching \citep{Madec_al_JPO96}: 
     760The namelist parameter \np{rn\_rmax} determines the slope at which the terrain-following coordinate intersects  
     761the sea bed and becomes a pseudo z-coordinate.  
     762The coordinate can also be hybridised by specifying \np{rn\_sbot\_min} and \np{rn\_sbot\_max}  
     763as the minimum and maximum depths at which the terrain-following vertical coordinate is calculated. 
     764 
     765Options for stretching the coordinate are provided as examples, but care must be taken to ensure  
     766that the vertical stretch used is appropriate for the application. 
     767 
     768The original default NEMO s-coordinate stretching is available if neither of the other options  
     769are specified as true (\np{ln\_s\_SH94}~=~false and \np{ln\_s\_SF12}~=~false).  
     770This uses a depth independent $\tanh$ function for the stretching \citep{Madec_al_JPO96}: 
    756771 
    757772\begin{equation} 
     
    760775\end{equation} 
    761776 
    762 where $s_{min}$ is the depth at which the s-coordinate stretching starts and allows a z-coordinate to placed on top of the stretched coordinate, and z is the depth (negative down from the asea surface). 
     777where $s_{min}$ is the depth at which the $s$-coordinate stretching starts and  
     778allows a $z$-coordinate to placed on top of the stretched coordinate,  
     779and $z$ is the depth (negative down from the asea surface). 
    763780 
    764781\begin{equation} 
     
    775792\end{equation} 
    776793 
    777 A stretching function, modified from the commonly used \citet{Song_Haidvogel_JCP94} stretching (\np{ln\_sco\_SH94}~=~true), is also available and is more commonly used for shelf seas modelling: 
     794A stretching function, modified from the commonly used \citet{Song_Haidvogel_JCP94}  
     795stretching (\np{ln\_s\_SH94}~=~true), is also available and is more commonly used for shelf seas modelling: 
    778796 
    779797\begin{equation} 
     
    785803%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    786804\begin{figure}[!ht]    \begin{center} 
    787 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_sco_function.pdf} 
     805\includegraphics[width=1.0\textwidth]{Fig_sco_function} 
    788806\caption{  \label{Fig_sco_function}    
    789807Examples of the stretching function applied to a seamount; from left to right:  
     
    792810%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    793811 
    794 where $H_c$ is the critical depth (\np{rn\_hc}) at which the coordinate transitions from pure $\sigma$ to the stretched coordinate,  and $\theta$ (\np{rn\_theta}) and $b$ (\np{rn\_bb}) are the surface and  
    795 bottom control parameters such that $0\leqslant \theta \leqslant 20$, and  
     812where $H_c$ is the critical depth (\np{rn\_hc}) at which the coordinate transitions from  
     813pure $\sigma$ to the stretched coordinate,  and $\theta$ (\np{rn\_theta}) and $b$ (\np{rn\_bb})  
     814are the surface and bottom control parameters such that $0\leqslant \theta \leqslant 20$, and  
    796815$0\leqslant b\leqslant 1$. $b$ has been designed to allow surface and/or bottom  
    797816increase of the vertical resolution (Fig.~\ref{Fig_sco_function}). 
    798817 
    799 Another example has been provided at version 3.5 (\np{ln\_sco\_SF12}) that allows a fixed surface resolution in an analytical terrain-following stretching \citet{Siddorn_Furner_OM12}. In this case the a stretching function $\gamma$ is defined such that: 
     818Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows  
     819a fixed surface resolution in an analytical terrain-following stretching \citet{Siddorn_Furner_OM12}.  
     820In this case the a stretching function $\gamma$ is defined such that: 
    800821 
    801822\begin{equation} 
     
    815836\end{equation} 
    816837 
    817 This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of the user prescribed stretching parameter $\alpha$ (\np{rn\_alpha}) that stretches towards the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and user prescribed surface (\np{rn\_zs}) and bottom depths. The bottom cell depth in this example is given as a function of water depth: 
     838This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of  
     839the user prescribed stretching parameter $\alpha$ (\np{rn\_alpha}) that stretches towards  
     840the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and user prescribed surface (\np{rn\_zs})  
     841and bottom depths. The bottom cell depth in this example is given as a function of water depth: 
    818842 
    819843\begin{equation} \label{DOM_zb} 
     
    825849%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    826850\begin{figure}[!ht] 
    827    \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/FIG_DOM_compare_coordinates_surface.pdf} 
     851   \includegraphics[width=1.0\textwidth]{FIG_DOM_compare_coordinates_surface} 
    828852        \caption{A comparison of the \citet{Song_Haidvogel_JCP94} $S$-coordinate (solid lines), a 50 level $Z$-coordinate (contoured surfaces) and the \citet{Siddorn_Furner_OM12} $S$-coordinate (dashed lines) in the surface 100m for a idealised bathymetry that goes from 50m to 5500m depth. For clarity every third coordinate surface is shown.} 
    829853    \label{fig_compare_coordinates_surface} 
     
    840864%        z*- or s*-coordinate 
    841865% ------------------------------------------------------------------------------------------------------------- 
    842 \subsection{$z^*$- or $s^*$-coordinate (add \key{vvl}) } 
    843 \label{DOM_zgr_vvl} 
    844  
    845 This option is described in the Report by Levier \textit{et al.} (2007), available on  
    846 the \NEMO web site.  
     866\subsection{$z^*$- or $s^*$-coordinate (\np{ln\_linssh}=false) } 
     867\label{DOM_zgr_star} 
     868 
     869This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site.  
    847870 
    848871%gm% key advantage: minimise the diffusion/dispertion associated with advection in response to high frequency surface disturbances 
     
    860883gives the number of ocean levels ($i.e.$ those that are not masked) at each  
    861884$t$-point. mbathy is computed from the meter bathymetry using the definiton of  
    862 gdept as the number of $t$-points which gdept $\leq$ bathy.  
     885gdept as the number of $t$-points which gdept $\leq$ bathy. 
    863886 
    864887Modifications of the model bathymetry are performed in the \textit{bat\_ctl}  
     
    866889that do not communicate with another ocean point at the same level are eliminated. 
    867890 
    868 From the \textit{mbathy} array, the mask fields are defined as follows: 
     891As for the representation of bathymetry, a 2D integer array, misfdep, is created.  
     892misfdep defines the level of the first wet $t$-point. All the cells between $k=1$ and $misfdep(i,j)-1$ are masked.  
     893By default, misfdep(:,:)=1 and no cells are masked. 
     894 
     895In case of ice shelf cavities, modifications of the model bathymetry and ice shelf draft into  
     896the cavities are performed in the \textit{zgr\_isf} routine. The compatibility between ice shelf draft and bathymetry is checked.  
     897All the locations where the isf cavity is thinnest than \np{rn\_isfhmin} meters are grounded ($i.e.$ masked).  
     898If only one cell on the water column is opened at $t$-, $u$- or $v$-points, the bathymetry or the ice shelf draft is dug to fit this constrain. 
     899If the incompatibility is too strong (need to dig more than 1 cell), the cell is masked.\\  
     900 
     901From the \textit{mbathy} and \textit{misfdep} array, the mask fields are defined as follows: 
    869902\begin{align*} 
    870 tmask(i,j,k) &= \begin{cases}   \; 1&   \text{ if $k\leq mbathy(i,j)$  }    \\ 
    871                                                 \; 0&   \text{ if $k\leq mbathy(i,j)$  }    \end{cases}     \\ 
     903tmask(i,j,k) &= \begin{cases}   \; 0&   \text{ if $k < misfdep(i,j) $ } \\ 
     904                                \; 1&   \text{ if $misfdep(i,j) \leq k\leq mbathy(i,j)$  }    \\ 
     905                                \; 0&   \text{ if $k > mbathy(i,j)$  }    \end{cases}     \\ 
    872906umask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i+1,j,k)   \\ 
    873907vmask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i,j+1,k)   \\ 
    874908fmask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i+1,j,k)   \\ 
    875                    & \ \ \, * tmask(i,j,k) \ * \ tmask(i+1,j,k) 
     909             &    \ \ \, * tmask(i,j,k) \ * \ tmask(i+1,j,k) \\ 
     910wmask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i,j,k-1) \text{ with } wmask(i,j,1) = tmask(i,j,1)  
    876911\end{align*} 
    877912 
    878 Note that \textit{wmask} is not defined as it is exactly equal to \textit{tmask} with  
    879 the numerical indexing used (\S~\ref{DOM_Num_Index}). Moreover, the  
    880 specification of closed lateral boundaries requires that at least the first and last  
     913Note that, without ice shelves cavities, masks at $t-$ and $w-$points are identical with  
     914the numerical indexing used (\S~\ref{DOM_Num_Index}). Nevertheless, $wmask$ are required  
     915with oceean cavities to deal with the top boundary (ice shelf/ocean interface)  
     916exactly in the same way as for the bottom boundary.  
     917 
     918The specification of closed lateral boundaries requires that at least the first and last  
    881919rows and columns of the \textit{mbathy} array are set to zero. In the particular  
    882920case of an east-west cyclical boundary condition, \textit{mbathy} has its last  
     
    884922(and so too the mask arrays) (see \S~\ref{LBC_jperio}). 
    885923 
    886 %%% 
    887 \gmcomment{   \colorbox{yellow}{Add one word on tricky trick !} mbathy in further modified in zdfbfr{\ldots}.  } 
    888 %%% 
    889924 
    890925% ================================================================ 
     
    910945(typical of the tropical ocean), see \rou{istate\_t\_s} subroutine called from \mdl{istate} module. 
    911946\end{description} 
     947\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_DYN.tex

    r5120 r7351  
    1 % ================================================================ 
    2 % Chapter � Ocean Dynamics (DYN) 
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
     3% ================================================================ 
     4% Chapter ——— Ocean Dynamics (DYN) 
    35% ================================================================ 
    46\chapter{Ocean Dynamics (DYN)} 
    57\label{DYN} 
    68\minitoc 
    7  
    8 % add a figure for  dynvor ens, ene latices 
    99 
    1010%\vspace{2.cm} 
     
    296296%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    297297\begin{figure}[!ht]    \begin{center} 
    298 \includegraphics[width=0.70\textwidth]{./TexFiles/Figures/Fig_DYN_een_triad.pdf} 
     298\includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad} 
    299299\caption{ \label{Fig_DYN_een_triad}   
    300300Triads used in the energy and enstrophy conserving scheme (een) for  
     
    303303%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    304304 
    305 Note that a key point in \eqref{Eq_een_e3f} is that the averaging in the \textbf{i}- and  
    306 \textbf{j}- directions uses the masked vertical scale factor but is always divided by  
    307 $4$, not by the sum of the masks at the four $T$-points. This preserves the continuity of  
    308 $e_{3f}$ when one or more of the neighbouring $e_{3t}$ tends to zero and  
    309 extends by continuity the value of $e_{3f}$ into the land areas. This feature is essential for  
    310 the $z$-coordinate with partial steps. 
     305A key point in \eqref{Eq_een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made.  
     306It uses the sum of masked t-point vertical scale factor divided either  
     307by the sum of the four t-point masks (\np{nn\_een\_e3f}~=~1),  
     308or  just by $4$ (\np{nn\_een\_e3f}~=~true). 
     309The latter case preserves the continuity of $e_{3f}$ when one or more of the neighbouring $e_{3t}$  
     310tends to zero and extends by continuity the value of $e_{3f}$ into the land areas.  
     311This case introduces a sub-grid-scale topography at f-points (with a systematic reduction of $e_{3f}$  
     312when a model level intercept the bathymetry) that tends to reinforce the topostrophy of the flow  
     313($i.e.$ the tendency of the flow to follow the isobaths) \citep{Penduff_al_OS07}.  
    311314 
    312315Next, the vorticity triads, $ {^i_j}\mathbb{Q}^{i_p}_{j_p}$ can be defined at a $T$-point as  
     
    374377\end{aligned}         \right. 
    375378\end{equation}  
     379When \np{ln\_dynzad\_zts}~=~\textit{true}, a split-explicit time stepping with 5 sub-timesteps is used  
     380on the vertical advection term. 
     381This option can be useful when the value of the timestep is limited by vertical advection \citep{Lemarie_OM2015}.  
     382Note that in this case, a similar split-explicit time stepping should be used on  
     383vertical advection of tracer to ensure a better stability,  
     384an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \S\ref{TRA_adv_tvd}). 
     385 
    376386 
    377387% ================================================================ 
     
    647657a more accurate calculation of the horizontal pressure gradient than the standard scheme. 
    648658 
     659\subsection{Ice shelf cavity} 
     660\label{DYN_hpg_isf} 
     661Beneath an ice shelf, the total pressure gradient is the sum of the pressure gradient due to the ice shelf load and 
     662 the pressure gradient due to the ocean load. If cavity opened (\np{ln\_isfcav}~=~true) these 2 terms can be 
     663 calculated by setting \np{ln\_dynhpg\_isf}~=~true. No other scheme are working with the ice shelf.\\ 
     664 
     665$\bullet$ The main hypothesis to compute the ice shelf load is that the ice shelf is in an isostatic equilibrium. 
     666 The top pressure is computed integrating from surface to the base of the ice shelf a reference density profile  
     667(prescribed as density of a water at 34.4 PSU and -1.9\degC) and corresponds to the water replaced by the ice shelf.  
     668This top pressure is constant over time. A detailed description of this method is described in \citet{Losch2008}.\\ 
     669 
     670$\bullet$ The ocean load is computed using the expression \eqref{Eq_dynhpg_sco} described in \ref{DYN_hpg_sco}.  
     671 
    649672%-------------------------------------------------------------------------------------------------------------- 
    650673%           Time-scheme 
     
    718741$\ $\newline      %force an empty line 
    719742 
    720 %%% 
    721743Options are defined through the \ngn{namdyn\_spg} namelist variables. 
    722 The surface pressure gradient term is related to the representation of the free surface (\S\ref{PE_hor_pg}). The main distinction is between the fixed volume case (linear free surface) and the variable volume case (nonlinear free surface, \key{vvl} is defined). In the linear free surface case (\S\ref{PE_free_surface}) the vertical scale factors $e_{3}$ are fixed in time, while they are time-dependent in the nonlinear case (\S\ref{PE_free_surface}). With both linear and nonlinear free surface, external gravity waves are allowed in the equations, which imposes a very small time step when an explicit time stepping is used. Two methods are proposed to allow a longer time step for the three-dimensional equations: the filtered free surface, which is a modification of the continuous equations (see \eqref{Eq_PE_flt}), and the split-explicit free surface described below. The extra term introduced in the filtered method is calculated implicitly, so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 
    723  
    724 %%% 
     744The surface pressure gradient term is related to the representation of the free surface (\S\ref{PE_hor_pg}).  
     745The main distinction is between the fixed volume case (linear free surface) and the variable volume case  
     746(nonlinear free surface, \key{vvl} is defined). In the linear free surface case (\S\ref{PE_free_surface})  
     747the vertical scale factors $e_{3}$ are fixed in time, while they are time-dependent in the nonlinear case  
     748(\S\ref{PE_free_surface}).  
     749With both linear and nonlinear free surface, external gravity waves are allowed in the equations,  
     750which imposes a very small time step when an explicit time stepping is used.  
     751Two methods are proposed to allow a longer time step for the three-dimensional equations:  
     752the filtered free surface, which is a modification of the continuous equations (see \eqref{Eq_PE_flt}),  
     753and the split-explicit free surface described below.  
     754The extra term introduced in the filtered method is calculated implicitly,  
     755so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 
    725756 
    726757 
     
    736767implicitly, so that a solver is used to compute it. As a consequence the update of the $next$  
    737768velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 
    738  
    739769 
    740770 
     
    779809$\rdt_e = \rdt / nn\_baro$. This parameter can be optionally defined automatically (\np{ln\_bt\_nn\_auto}=true)  
    780810considering that the stability of the barotropic system is essentially controled by external waves propagation.  
    781 Maximum allowed Courant number is in that case time independent, and easily computed online from the input bathymetry. 
     811Maximum Courant number is in that case time independent, and easily computed online from the input bathymetry. 
     812Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn\_bt\_cmax}. 
    782813 
    783814%%% 
     
    798829%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
    799830\begin{figure}[!t]    \begin{center} 
    800 \includegraphics[width=0.7\textwidth]{./TexFiles/Figures/Fig_DYN_dynspg_ts.pdf} 
     831\includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts} 
    801832\caption{  \label{Fig_DYN_dynspg_ts} 
    802833Schematic of the split-explicit time stepping scheme for the external  
    803834and internal modes. Time increases to the right. In this particular exemple,  
    804 a boxcar averaging window over $nn\_baro$ barotropic time steps is used ($nn\_bt\_filt=1$) and $nn\_baro=5$. 
     835a boxcar averaging window over $nn\_baro$ barotropic time steps is used ($nn\_bt\_flt=1$) and $nn\_baro=5$. 
    805836Internal mode time steps (which are also the model time steps) are denoted  
    806837by $t-\rdt$, $t$ and $t+\rdt$. Variables with $k$ superscript refer to instantaneous barotropic variables,  
     
    808839The former are used to obtain time filtered quantities at $t+\rdt$ while the latter are used to obtain time averaged  
    809840transports to advect tracers. 
    810 a) Forward time integration: \np{ln\_bt\_fw}=true, \np{ln\_bt\_ave}=true.  
    811 b) Centred time integration: \np{ln\_bt\_fw}=false, \np{ln\_bt\_ave}=true.  
    812 c) Forward time integration with no time filtering (POM-like scheme): \np{ln\_bt\_fw}=true, \np{ln\_bt\_ave}=false. } 
     841a) Forward time integration: \np{ln\_bt\_fw}=true,  \np{ln\_bt\_av}=true.  
     842b) Centred time integration: \np{ln\_bt\_fw}=false, \np{ln\_bt\_av}=true.  
     843c) Forward time integration with no time filtering (POM-like scheme): \np{ln\_bt\_fw}=true, \np{ln\_bt\_av}=false. } 
    813844\end{center}    \end{figure} 
    814845%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
     
    816847In the default case (\np{ln\_bt\_fw}=true), the external mode is integrated  
    817848between \textit{now} and  \textit{after} baroclinic time-steps (Fig.~\ref{Fig_DYN_dynspg_ts}a). To avoid aliasing of fast barotropic motions into three dimensional equations, time filtering is eventually applied on barotropic  
    818 quantities (\np{ln\_bt\_ave}=true). In that case, the integration is extended slightly beyond  \textit{after} time step to provide time filtered quantities.  
     849quantities (\np{ln\_bt\_av}=true). In that case, the integration is extended slightly beyond  \textit{after} time step to provide time filtered quantities.  
    819850These are used for the subsequent initialization of the barotropic mode in the following baroclinic step.  
    820851Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme,  
     
    837868%%% 
    838869 
    839 One can eventually choose to feedback instantaneous values by not using any time filter (\np{ln\_bt\_ave}=false).  
     870One can eventually choose to feedback instantaneous values by not using any time filter (\np{ln\_bt\_av}=false).  
    840871In that case, external mode equations are continuous in time, ie they are not re-initialized when starting a new  
    841872sub-stepping sequence. This is the method used so far in the POM model, the stability being maintained by refreshing at (almost)  
     
    9891020At the lateral boundaries either free slip, no slip or partial slip boundary  
    9901021conditions are applied according to the user's choice (see Chap.\ref{LBC}). 
     1022 
     1023\gmcomment{ 
     1024Hyperviscous operators are frequently used in the simulation of turbulent flows to control  
     1025the dissipation of unresolved small scale features.  
     1026Their primary role is to provide strong dissipation at the smallest scale supported by the grid  
     1027while minimizing the impact on the larger scale features.  
     1028Hyperviscous operators are thus designed to be more scale selective than the traditional,  
     1029physically motivated Laplace operator.  
     1030In finite difference methods, the biharmonic operator is frequently the method of choice to achieve  
     1031this scale selective dissipation since its damping time ($i.e.$ its spin down time)  
     1032scale like $\lambda^{-4}$ for disturbances of wavelength $\lambda$  
     1033(so that short waves damped more rapidelly than long ones),  
     1034whereas the Laplace operator damping time scales only like $\lambda^{-2}$. 
     1035} 
    9911036 
    9921037% ================================================================ 
     
    11581203 
    11591204Besides the surface and bottom stresses (see the above section) which are  
    1160 introduced as boundary conditions on the vertical mixing, two other forcings  
    1161 enter the dynamical equations.  
    1162  
    1163 One is the effect of atmospheric pressure on the ocean dynamics. 
    1164 Another forcing term is the tidal potential. 
    1165 Both of which will be introduced into the reference version soon.  
    1166  
    1167 \gmcomment{atmospheric pressure is there!!!!    include its description } 
     1205introduced as boundary conditions on the vertical mixing, three other forcings  
     1206may enter the dynamical equations by affecting the surface pressure gradient.  
     1207 
     1208(1) When \np{ln\_apr\_dyn}~=~true (see \S\ref{SBC_apr}), the atmospheric pressure is taken  
     1209into account when computing the surface pressure gradient. 
     1210 
     1211(2) When \np{ln\_tide\_pot}~=~true and \key{tide} is defined (see \S\ref{SBC_tide}),  
     1212the tidal potential is taken into account when computing the surface pressure gradient. 
     1213 
     1214(3) When \np{nn\_ice\_embd}~=~2 and LIM or CICE is used ($i.e.$ when the sea-ice is embedded in the ocean),  
     1215the snow-ice mass is taken into account when computing the surface pressure gradient. 
     1216 
     1217 
     1218\gmcomment{ missing : the lateral boundary condition !!!   another external forcing 
     1219 } 
    11681220 
    11691221% ================================================================ 
     
    12131265 
    12141266% ================================================================ 
    1215 % Neptune effect  
    1216 % ================================================================ 
    1217 \section  [Neptune effect (\textit{dynnept})] 
    1218                 {Neptune effect (\mdl{dynnept})} 
    1219 \label{DYN_nept} 
    1220  
    1221 The "Neptune effect" (thus named in \citep{HollowayOM86}) is a 
    1222 parameterisation of the potentially large effect of topographic form stress 
    1223 (caused by eddies) in driving the ocean circulation. Originally developed for 
    1224 low-resolution models, in which it was applied via a Laplacian (second-order) 
    1225 diffusion-like term in the momentum equation, it can also be applied in eddy 
    1226 permitting or resolving models, in which a more scale-selective bilaplacian 
    1227 (fourth-order) implementation is preferred. This mechanism has a 
    1228 significant effect on boundary currents (including undercurrents), and the 
    1229 upwelling of deep water near continental shelves. 
    1230  
    1231 The theoretical basis for the method can be found in  
    1232 \citep{HollowayJPO92}, including the explanation of why form stress is not 
    1233 necessarily a drag force, but may actually drive the flow.  
    1234 \citep{HollowayJPO94} demonstrate the effects of the parameterisation in 
    1235 the GFDL-MOM model, at a horizontal resolution of about 1.8 degrees.  
    1236 \citep{HollowayOM08} demonstrate the biharmonic version of the 
    1237 parameterisation in a global run of the POP model, with an average horizontal 
    1238 grid spacing of about 32km. 
    1239  
    1240 The NEMO implementation is a simplified form of that supplied by 
    1241 Greg Holloway, the testing of which was described in \citep{HollowayJGR09}. 
    1242 The major simplification is that a time invariant Neptune velocity 
    1243 field is assumed.  This is computed only once, during start-up, and 
    1244 made available to the rest of the code via a module.  Vertical 
    1245 diffusive terms are also ignored, and the model topography itself 
    1246 is used, rather than a separate topographic dataset as in 
    1247 \citep{HollowayOM08}.  This implementation is only in the iso-level 
    1248 formulation, as is the case anyway for the bilaplacian operator. 
    1249  
    1250 The velocity field is derived from a transport stream function given by: 
    1251  
    1252 \begin{equation} \label{Eq_dynnept_sf} 
    1253 \psi = -fL^2H 
    1254 \end{equation} 
    1255  
    1256 where $L$ is a latitude-dependant length scale given by: 
    1257  
    1258 \begin{equation} \label{Eq_dynnept_ls} 
    1259 L = l_1 + (l_2 -l_1)\left ( {1 + \cos 2\phi \over 2 } \right ) 
    1260 \end{equation} 
    1261  
    1262 where $\phi$ is latitude and $l_1$ and $l_2$ are polar and equatorial length scales respectively. 
    1263 Neptune velocity components, $u^*$, $v^*$ are derived from the stremfunction as: 
    1264  
    1265 \begin{equation} \label{Eq_dynnept_vel} 
    1266 u^* = -{1\over H} {\partial \psi \over \partial y}\ \ \  ,\ \ \ v^* = {1\over H} {\partial \psi \over \partial x} 
    1267 \end{equation} 
    1268  
    1269 \smallskip 
    1270 %----------------------------------------------namdom---------------------------------------------------- 
    1271 \namdisplay{namdyn_nept} 
    1272 %-------------------------------------------------------------------------------------------------------- 
    1273 \smallskip 
    1274  
    1275 The Neptune effect is enabled when \np{ln\_neptsimp}=true (default=false). 
    1276 \np{ln\_smooth\_neptvel} controls whether a scale-selective smoothing is applied 
    1277 to the Neptune effect flow field (default=false) (this smoothing method is as 
    1278 used by Holloway).  \np{rn\_tslse} and \np{rn\_tslsp} are the equatorial and 
    1279 polar values respectively of the length-scale parameter $L$ used in determining 
    1280 the Neptune stream function \eqref{Eq_dynnept_sf} and \eqref{Eq_dynnept_ls}. 
    1281 Values at intermediate latitudes are given by a cosine fit, mimicking the 
    1282 variation of the deformation radius with latitude.  The default values of 12km 
    1283 and 3km are those given in \citep{HollowayJPO94}, appropriate for a coarse 
    1284 resolution model. The finer resolution study of \citep{HollowayOM08} increased 
    1285 the values of L by a factor of $\sqrt 2$ to 17km and 4.2km, thus doubling the 
    1286 stream function for a given topography. 
    1287  
    1288 The simple formulation for ($u^*$, $v^*$) can give unacceptably large velocities 
    1289 in shallow water, and \citep{HollowayOM08} add an offset to the depth in the 
    1290 denominator to control this problem. In this implementation we offer instead (at 
    1291 the suggestion of G. Madec) the option of ramping down the Neptune flow field to 
    1292 zero over a finite depth range. The switch \np{ln\_neptramp} activates this 
    1293 option (default=false), in which case velocities at depths greater than 
    1294 \np{rn\_htrmax} are unaltered, but ramp down linearly with depth to zero at a 
    1295 depth of \np{rn\_htrmin} (and shallower). 
    1296  
    1297 % ================================================================ 
     1267\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_LBC.tex

    r4147 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    2 % Chapter Lateral Boundary Condition (LBC)  
     4% Chapter Lateral Boundary Condition (LBC)  
    35% ================================================================ 
    46\chapter{Lateral Boundary Condition (LBC) } 
     
    5355%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    5456\begin{figure}[!t]     \begin{center} 
    55 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_LBC_uv.pdf} 
     57\includegraphics[width=0.90\textwidth]{Fig_LBC_uv} 
    5658\caption{  \label{Fig_LBC_uv} 
    5759Lateral boundary (thick line) at T-level. The velocity normal to the boundary is set to zero.} 
     
    7678%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    7779\begin{figure}[!p] \begin{center} 
    78 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_LBC_shlat.pdf} 
     80\includegraphics[width=0.90\textwidth]{Fig_LBC_shlat} 
    7981\caption{     \label{Fig_LBC_shlat}  
    8082lateral boundary condition (a) free-slip ($rn\_shlat=0$) ; (b) no-slip ($rn\_shlat=2$)  
     
    127129can be quite shallow. 
    128130 
    129 The alternative numerical implementation of the no-slip boundary conditions for an  
    130 arbitrary coast line of \citet{Shchepetkin1996} is also available through the  
    131 \key{noslip\_accurate} CPP key. It is based on a fourth order evaluation of the shear at the  
    132 coast which, in turn, allows a true second order scheme in the interior of the domain  
    133 ($i.e.$ the numerical boundary scheme simulates the truncation error of the numerical  
    134 scheme used in the interior of the domain). \citet{Shchepetkin1996} found that such a  
    135 technique considerably improves the quality of the numerical solution. In \NEMO, such  
    136 spectacular improvements have not been found in the half-degree global ocean  
    137 (ORCA05), but significant reductions of numerically induced coastal upwellings were  
    138 found in an eddy resolving simulation of the Alboran Sea \citep{Olivier_PhD01}.  
    139 Nevertheless, since a no-slip boundary condition is not recommended in an eddy  
    140 permitting or resolving simulation \citep{Penduff_al_OS07}, the use of this option is also  
    141 not recommended. 
    142  
    143 In practice, the no-slip accurate option changes the way the curl is evaluated at the  
    144 coast (see \mdl{divcur} module), and requires the nature of each coastline grid point  
    145 (convex or concave corners, straight north-south or east-west coast) to be specified.   
    146 This is performed in routine \rou{dom\_msk\_nsa} in the \mdl{domask} module. 
    147131 
    148132% ================================================================ 
     
    195179%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    196180\begin{figure}[!t]     \begin{center} 
    197 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_LBC_jperio.pdf} 
     181\includegraphics[width=1.0\textwidth]{Fig_LBC_jperio} 
    198182\caption{    \label{Fig_LBC_jperio} 
    199183setting of (a) east-west cyclic  (b) symmetric across the equator boundary conditions.} 
     
    204188%        North fold (\textit{jperio = 3 }to $6)$  
    205189% ------------------------------------------------------------------------------------------------------------- 
    206 \subsection{North-fold (\textit{jperio = 3 }to $6)$ } 
     190\subsection{North-fold (\textit{jperio = 3 }to $6$) } 
    207191\label{LBC_north_fold} 
    208192 
    209193The north fold boundary condition has been introduced in order to handle the north  
    210 boundary of a three-polar ORCA grid. Such a grid has two poles in the northern hemisphere.  
    211 \colorbox{yellow}{to be completed...} 
     194boundary of a three-polar ORCA grid. Such a grid has two poles in the northern hemisphere  
     195(Fig.\ref{Fig_MISC_ORCA_msh}, and thus requires a specific treatment illustrated in Fig.\ref{Fig_North_Fold_T}.  
     196Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition. 
    212197 
    213198%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    214199\begin{figure}[!t]    \begin{center} 
    215 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_North_Fold_T.pdf} 
     200\includegraphics[width=0.90\textwidth]{Fig_North_Fold_T} 
    216201\caption{    \label{Fig_North_Fold_T}  
    217202North fold boundary with a $T$-point pivot and cyclic east-west boundary condition  
     
    250235ocean model. Second order finite difference schemes lead to local discrete  
    251236operators that depend at the very most on one neighbouring point. The only  
    252 non-local computations concern the vertical physics (implicit diffusion, 1.5  
     237non-local computations concern the vertical physics (implicit diffusion,  
    253238turbulent closure scheme, ...) (delocalization over the whole water column),  
    254239and the solving of the elliptic equation associated with the surface pressure  
    255240gradient computation (delocalization over the whole horizontal domain).  
    256241Therefore, a pencil strategy is used for the data sub-structuration  
    257 \gmcomment{no idea what this means!} 
    258242: the 3D initial domain is laid out on local processor  
    259243memories following a 2D horizontal topological splitting. Each sub-domain  
     
    264248phase starts: each processor sends to its neighbouring processors the update  
    265249values of the points corresponding to the interior overlapping area to its  
    266 neighbouring sub-domain (i.e. the innermost of the two overlapping rows).  
    267 The communication is done through message passing. Usually the parallel virtual  
    268 language, PVM, is used as it is a standard language available on  nearly  all  
    269 MPP computers. More specific languages (i.e. computer dependant languages)  
    270 can be easily used to speed up the communication, such as SHEM on a T3E  
    271 computer. The data exchanges between processors are required at the very  
     250neighbouring sub-domain ($i.e.$ the innermost of the two overlapping rows).  
     251The communication is done through the Message Passing Interface (MPI).  
     252The data exchanges between processors are required at the very  
    272253place where lateral domain boundary conditions are set in the mono-domain  
    273 computation (\S III.10-c): the lbc\_lnk routine which manages such conditions  
    274 is substituted by mpplnk.F or mpplnk2.F routine when running on an MPP  
    275 computer (\key{mpp\_mpi} defined). It has to be pointed out that when using  
    276 the MPP version of the model, the east-west cyclic boundary condition is done  
    277 implicitly, whilst the south-symmetric boundary condition option is not available. 
     254computation : the \rou{lbc\_lnk} routine (found in \mdl{lbclnk} module)  
     255which manages such conditions is interfaced with routines found in \mdl{lib\_mpp} module  
     256when running on an MPP computer ($i.e.$ when \key{mpp\_mpi} defined).  
     257It has to be pointed out that when using the MPP version of the model,  
     258the east-west cyclic boundary condition is done implicitly,  
     259whilst the south-symmetric boundary condition option is not available. 
    278260 
    279261%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    280262\begin{figure}[!t]    \begin{center} 
    281 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_mpp.pdf} 
     263\includegraphics[width=0.90\textwidth]{Fig_mpp} 
    282264\caption{   \label{Fig_mpp}  
    283265Positioning of a sub-domain when massively parallel processing is used. } 
     
    285267%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    286268 
    287 In the standard version of the OPA model, the splitting is regular and arithmetic. 
    288  the i-axis is divided by \jp{jpni} and the j-axis by \jp{jpnj} for a number of processors  
    289  \jp{jpnij} most often equal to $jpni \times jpnj$ (model parameters set in  
    290  \mdl{par\_oce}). Each processor is independent and without message passing  
    291  or synchronous process  
    292  \gmcomment{how does a synchronous process relate to this?},  
    293  programs run alone and access just its own local memory. For this reason, the  
    294  main model dimensions are now the local dimensions of the subdomain (pencil)  
     269In the standard version of \NEMO, the splitting is regular and arithmetic. 
     270The i-axis is divided by \jp{jpni} and the j-axis by \jp{jpnj} for a number of processors  
     271\jp{jpnij} most often equal to $jpni \times jpnj$ (parameters set in  
     272 \ngn{nammpp} namelist). Each processor is independent and without message passing  
     273 or synchronous process, programs run alone and access just its own local memory.  
     274 For this reason, the main model dimensions are now the local dimensions of the subdomain (pencil)  
    295275 that are named \jp{jpi}, \jp{jpj}, \jp{jpk}. These dimensions include the internal  
    296276 domain and the overlapping rows. The number of rows to exchange (known as  
     
    304284where \jp{jpni}, \jp{jpnj} are the number of processors following the i- and j-axis. 
    305285 
    306 \colorbox{yellow}{Figure IV.3: example of a domain splitting with 9 processors and  
    307 no east-west cyclic boundary conditions.} 
    308  
    309 One also defines variables nldi and nlei which correspond to the internal  
    310 domain bounds, and the variables nimpp and njmpp which are the position  
    311 of the (1,1) grid-point in the global domain. An element of $T_{l}$, a local array  
    312 (subdomain) corresponds to an element of $T_{g}$, a global array  
    313 (whole domain) by the relationship:  
     286One also defines variables nldi and nlei which correspond to the internal domain bounds,  
     287and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain.  
     288An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$,  
     289a global array (whole domain) by the relationship:  
    314290\begin{equation} \label{Eq_lbc_nimpp} 
    315291T_{g} (i+nimpp-1,j+njmpp-1,k) = T_{l} (i,j,k), 
     
    320296nproc. In the standard version, a processor has no more than four neighbouring  
    321297processors named nono (for north), noea (east), noso (south) and nowe (west)  
    322 and two variables, nbondi and nbondj, indicate the relative position of the processor  
    323 \colorbox{yellow}{(see Fig.IV.3)}: 
     298and two variables, nbondi and nbondj, indicate the relative position of the processor : 
    324299\begin{itemize} 
    325300\item       nbondi = -1    an east neighbour, no west processor, 
     
    332307processor on its overlapping row, and sends the data issued from internal  
    333308domain corresponding to the overlapping row of the other processor. 
    334         
    335 \colorbox{yellow}{Figure IV.4: pencil splitting with the additional outer halos } 
    336309 
    337310 
     
    343316global ocean where more than 50 \% of points are land points. For this reason, a  
    344317pre-processing tool can be used to choose the mpp domain decomposition with a  
    345 maximum number of only land points processors, which can then be eliminated.  
    346 (For example, the mpp\_optimiz tools, available from the DRAKKAR web site.)  
     318maximum number of only land points processors, which can then be eliminated (Fig. \ref{Fig_mppini2}) 
     319(For example, the mpp\_optimiz tools, available from the DRAKKAR web site).  
    347320This optimisation is dependent on the specific bathymetry employed. The user  
    348321then chooses optimal parameters \jp{jpni}, \jp{jpnj} and \jp{jpnij} with  
    349322$jpnij < jpni \times jpnj$, leading to the elimination of $jpni \times jpnj - jpnij$  
    350 land processors. When those parameters are specified in module \mdl{par\_oce},  
     323land processors. When those parameters are specified in \ngn{nammpp} namelist,  
    351324the algorithm in the \rou{inimpp2} routine sets each processor's parameters (nbound,  
    352325nono, noea,...) so that the land-only processors are not taken into account.  
    353326 
    354 \colorbox{yellow}{Note that the inimpp2 routine is general so that the original inimpp  
     327\gmcomment{Note that the inimpp2 routine is general so that the original inimpp  
    355328routine should be suppressed from the code.} 
    356329 
    357330When land processors are eliminated, the value corresponding to these locations in  
    358 the model output files is zero. Note that this is a problem for a mesh output file written  
    359 by such a model configuration, because model users often divide by the scale factors  
    360 ($e1t$, $e2t$, etc) and do not expect the grid size to be zero, even on land. It may be  
    361 best not to eliminate land processors when running the model especially to write the  
    362 mesh files as outputs (when \np{nn\_msh} namelist parameter differs from 0). 
    363 %% 
    364 \gmcomment{Steven : dont understand this, no land processor means no output file  
    365 covering this part of globe; its only when files are stitched together into one that you  
    366 can leave a hole} 
    367 %% 
     331the model output files is undefined. Note that this is a problem for the meshmask file  
     332which requires to be defined over the whole domain. Therefore, user should not eliminate  
     333land processors when creating a meshmask file ($i.e.$ when setting a non-zero value to \np{nn\_msh}). 
    368334 
    369335%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    370336\begin{figure}[!ht]     \begin{center} 
    371 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_mppini2.pdf} 
     337\includegraphics[width=0.90\textwidth]{Fig_mppini2} 
    372338\caption {    \label{Fig_mppini2} 
    373339Example of Atlantic domain defined for the CLIPPER projet. Initial grid is  
     
    380346%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    381347 
    382  
    383 % ================================================================ 
    384 % Open Boundary Conditions  
    385 % ================================================================ 
    386 \section{Open Boundary Conditions (\key{obc}) (OBC)} 
    387 \label{LBC_obc} 
    388 %-----------------------------------------nam_obc  ------------------------------------------- 
    389 %-    nobc_dta    =    0     !  = 0 the obc data are equal to the initial state 
    390 %-                           !  = 1 the obc data are read in 'obc   .dta' files 
    391 %-    rn_dpein      =    1.    !  ??? 
    392 %-    rn_dpwin      =    1.    !  ??? 
    393 %-    rn_dpnin      =   30.    !  ??? 
    394 %-    rn_dpsin      =    1.    !  ??? 
    395 %-    rn_dpeob      = 1500.    !  time relaxation (days) for the east  open boundary 
    396 %-    rn_dpwob      =   15.    !    "        "           for the west  open boundary 
    397 %-    rn_dpnob      =  150.    !    "        "           for the north open boundary 
    398 %-    rn_dpsob      =   15.    !    "        "           for the south open boundary 
    399 %-    ln_obc_clim = .true.   !  climatological obc data files (default T) 
    400 %-    ln_vol_cst  = .true.   !  total volume conserved 
    401 \namdisplay{namobc}  
    402  
    403 It is often necessary to implement a model configuration limited to an oceanic  
    404 region or a basin, which communicates with the rest of the global ocean through  
    405 ''open boundaries''. As stated by \citet{Roed1986}, an open boundary is a  
    406 computational border where the aim of the calculations is to allow the perturbations  
    407 generated inside the computational domain to leave it without deterioration of the  
    408 inner model solution. However, an open boundary also has to let information from  
    409 the outer ocean enter the model and should support inflow and outflow conditions.  
    410  
    411 The open boundary package OBC is the first open boundary option developed in  
    412 NEMO (originally in OPA8.2). It allows the user to  
    413 \begin{itemize} 
    414 \item tell the model that a boundary is ''open'' and not closed by a wall, for example  
    415 by modifying the calculation of the divergence of velocity there; 
    416 \item impose values of tracers and velocities at that boundary (values which may  
    417 be taken from a climatology): this is the``fixed OBC'' option.  
    418 \item calculate boundary values by a sophisticated algorithm combining radiation  
    419 and relaxation (``radiative OBC'' option) 
    420 \end{itemize} 
    421  
    422 Options are defined through the \ngn{namobc} namelist variables. 
    423 The package resides in the OBC directory. It is described here in four parts: the  
    424 boundary geometry (parameters to be set in \mdl{obc\_par}), the forcing data at  
    425 the boundaries (module \mdl{obcdta}),  the radiation algorithm involving the  
    426 namelist and module \mdl{obcrad}, and a brief presentation of boundary update  
    427 and restart files. 
    428  
    429 %---------------------------------------------- 
    430 \subsection{Boundary geometry} 
    431 \label{OBC_geom} 
    432 % 
    433 First one has to realize that open boundaries may not necessarily be located  
    434 at the extremities of the computational domain. They may exist in the middle  
    435 of the domain, for example at Gibraltar Straits if one wants to avoid including  
    436 the Mediterranean in an Atlantic domain. This flexibility has been found necessary  
    437 for the CLIPPER project \citep{Treguier_al_JGR01}. Because of the complexity of the  
    438 geometry of ocean basins, it may even be necessary to have more than one  
    439 ''west'' open boundary, more than one ''north'', etc. This is not possible with  
    440 the OBC option: only one open boundary of each kind, west, east, south and  
    441 north is allowed; these names refer to the grid geometry (not to the direction  
    442 of the geographical ''west'', ''east'', etc). 
    443  
    444 The open boundary geometry is set by a series of parameters in the module  
    445 \mdl{obc\_par}. For an eastern open boundary, parameters are \jp{lp\_obc\_east}  
    446 (true if an east open boundary exists), \jp{jpieob} the $i$-index along which  
    447 the eastern open boundary (eob) is located, \jp{jpjed} the $j$-index at which  
    448 it starts, and \jp{jpjef} the $j$-index where it ends (note $d$ is for ''d\'{e}but''  
    449 and $f$ for ''fin'' in French). Similar parameters exist for the west, south and  
    450 north cases (Table~\ref{Tab_obc_param}). 
    451  
    452  
    453 %--------------------------------------------------TABLE-------------------------------------------------- 
    454 \begin{table}[htbp]     \begin{center}    \begin{tabular}{|l|c|c|c|} 
    455 \hline 
    456 Boundary and  & Constant index  & Starting index (d\'{e}but) & Ending index (fin) \\ 
    457 Logical flag  &                 &                            &                     \\ 
    458 \hline 
    459 West          & \jp{jpiwob} $>= 2$         &  \jp{jpjwd}$>= 2$          &  \jp{jpjwf}<= \np{jpjglo}-1 \\ 
    460 lp\_obc\_west & $i$-index of a $u$ point   & $j$ of a $T$ point   &$j$ of a $T$ point \\ 
    461 \hline 
    462 East            & \jp{jpieob}$<=$\np{jpiglo}-2&\jp{jpjed} $>= 2$         & \jp{jpjef}$<=$ \np{jpjglo}-1 \\ 
    463  lp\_obc\_east  & $i$-index of a $u$ point    & $j$ of a $T$ point & $j$ of a $T$ point \\ 
    464 \hline 
    465 South           & \jp{jpjsob} $>= 2$         & \jp{jpisd} $>= 2$          & \jp{jpisf}$<=$\np{jpiglo}-1 \\ 
    466 lp\_obc\_south  & $j$-index of a $v$ point   & $i$ of a $T$ point   & $i$ of a $T$ point \\ 
    467 \hline 
    468 North           & \jp{jpjnob} $<=$ \np{jpjglo}-2& \jp{jpind} $>= 2$        & \jp{jpinf}$<=$\np{jpiglo}-1 \\ 
    469 lp\_obc\_north  & $j$-index of a $v$ point      & $i$  of a $T$ point & $i$ of a $T$ point \\ 
    470 \hline 
    471 \end{tabular}    \end{center} 
    472 \caption{     \label{Tab_obc_param} 
    473 Names of different indices relating to the open boundaries. In the case  
    474 of a completely open ocean domain with four ocean boundaries, the parameters  
    475 take exactly the values indicated.} 
    476 \end{table} 
    477 %------------------------------------------------------------------------------------------------------------ 
    478  
    479 The open boundaries must be along coordinate lines. On the C-grid, the boundary  
    480 itself is along a line of normal velocity points: $v$ points for a zonal open boundary  
    481 (the south or north one), and $u$ points for a meridional open boundary (the west  
    482 or east one). Another constraint is that there still must be a row of masked points  
    483 all around the domain, as if the domain were a closed basin (unless periodic conditions  
    484 are used together with open boundary conditions). Therefore, an open boundary  
    485 cannot be located at the first/last index, namely, 1, \jp{jpiglo} or \jp{jpjglo}. Also,  
    486 the open boundary algorithm involves calculating the normal velocity points situated  
    487 just on the boundary, as well as the tangential velocity and temperature and salinity  
    488 just outside the boundary. This means that for a west/south boundary, normal  
    489 velocities and temperature are calculated at the same index \jp{jpiwob} and  
    490 \jp{jpjsob}, respectively. For an east/north boundary, the normal velocity is  
    491 calculated at index \jp{jpieob} and \jp{jpjnob}, but the ``outside'' temperature is  
    492 at index \jp{jpieob}+1 and \jp{jpjnob}+1. This means that \jp{jpieob}, \jp{jpjnob}  
    493 cannot be bigger than \jp{jpiglo}-2, \jp{jpjglo}-2.  
    494  
    495  
    496 The starting and ending indices are to be thought of as $T$ point indices: in many  
    497 cases they indicate the first land $T$-point, at the extremity of an open boundary  
    498 (the coast line follows the $f$ grid points, see Fig.~\ref{Fig_obc_north} for an example  
    499 of a northern open boundary). All indices are relative to the global domain. In the  
    500 free surface case it is possible to have ``ocean corners'', that is, an open boundary  
    501 starting and ending in the ocean. 
    502  
    503 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    504 \begin{figure}[!t]     \begin{center} 
    505 \includegraphics[width=0.70\textwidth]{./TexFiles/Figures/Fig_obc_north.pdf} 
    506 \caption{    \label{Fig_obc_north} 
    507 Localization of the North open boundary points.} 
    508 \end{center}     \end{figure} 
    509 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    510  
    511 Although not compulsory, it is highly recommended that the bathymetry in the  
    512 vicinity of an open boundary follows the following rule: in the direction perpendicular  
    513 to the open line, the water depth should be constant for 4 grid points. This is in  
    514 order to ensure that the radiation condition, which involves model variables next  
    515 to the boundary, is calculated in a consistent way. On Fig.\ref{Fig_obc_north} we  
    516 indicate by an $=$ symbol, the points which should have the same depth. It means  
    517 that at the 4 points near the boundary, the bathymetry is cylindrical \gmcomment{not sure  
    518 why cylindrical}. The line behind the open $T$-line must be 0 in the bathymetry file  
    519 (as shown on Fig.\ref{Fig_obc_north} for example). 
    520  
    521 %---------------------------------------------- 
    522 \subsection{Boundary data} 
    523 \label{OBC_data} 
    524  
    525 It is necessary to provide information at the boundaries. The simplest case is  
    526 when this information does not change in time and is equal to the initial conditions  
    527 (namelist variable \np{nn\_obcdta}=0). This is the case for the standard configuration  
    528 EEL5 with open boundaries. When (\np{nn\_obcdta}=1), open boundary information  
    529 is read from netcdf files. For convenience the input files are supposed to be similar  
    530 to the ''history'' NEMO output files, for dimension names and variable names.  
    531 Open boundary arrays must be dimensioned according to the parameters of table~ 
    532 \ref{Tab_obc_param}: for example, at the western boundary, arrays have a  
    533 dimension of \jp{jpwf}-\jp{jpwd}+1 in the horizontal and \jp{jpk} in the vertical.  
    534  
    535 When ocean observations are used to generate the boundary data (a hydrographic  
    536 section for example, as in \citet{Treguier_al_JGR01}) it happens often that only the velocity  
    537 normal to the boundary is known, which is the reason why the initial OBC code  
    538 assumes that only $T$, $S$, and the normal velocity ($u$ or $v$) needs to be  
    539 specified. As more and more global model solutions and ocean analysis products  
    540 become available, it will be possible to provide information about all the variables  
    541 (including the tangential velocity) so that the specification of four variables at each  
    542 boundaries will become standard. For the sea surface height, one must distinguish  
    543 between the filtered free surface case and the time-splitting or explicit treatment of  
    544 the free surface. 
    545  In the first case, it is assumed that the user does not wish to represent high  
    546  frequency motions such as tides. The boundary condition is thus one of zero  
    547  normal gradient of sea surface height at the open boundaries, following \citet{Marchesiello2001}.  
    548 No information other than the total velocity needs to be provided at the open  
    549 boundaries in that case. In the other two cases (time splitting or explicit free surface),  
    550 the user must provide barotropic information (sea surface height and barotropic  
    551 velocities) and the use of the Flather algorithm for barotropic variables is  
    552 recommanded. However, this algorithm has not yet been fully tested and bugs  
    553 remain in NEMO v2.3. Users should read the code carefully before using it. Finally,  
    554 in the case of the rigid lid approximation the barotropic streamfunction must be  
    555 provided, as documented in \citet{Treguier_al_JGR01}). This option is no longer  
    556 recommended but remains in NEMO V2.3. 
    557  
    558 One frequently encountered case is when an open boundary domain is constructed  
    559 from a global or larger scale NEMO configuration. Assuming the domain corresponds  
    560 to indices $ib:ie$, $jb:je$ of the global domain, the bathymetry and forcing of the  
    561 small domain can be created by using the following netcdf utility on the global files:  
    562 ncks -F $-d\;x,ib,ie$ $-d\;y,jb,je$ (part of the nco series of utilities,  
    563 see their \href{http://nco.sourceforge.net}{website}).  
    564 The open boundary files can be constructed using ncks  
    565 commands, following table~\ref{Tab_obc_ind}.  
    566  
    567 %--------------------------------------------------TABLE-------------------------------------------------- 
    568 \begin{table}[htbp]     \begin{center}      \begin{tabular}{|l|c|c|c|c|c|} 
    569 \hline 
    570 OBC  & Variable   & file name      & Index  & Start  & end  \\ 
    571 West &  T,S       &   obcwest\_TS.nc &  $ib$+1     &   $jb$+1 &  $je-1$  \\ 
    572      &    U       &   obcwest\_U.nc  &  $ib$+1     &   $jb$+1 &  $je-1$  \\  
    573      &    V       &   obcwest\_V.nc  &  $ib$+1     &   $jb$+1 &  $je-1$  \\        
    574 \hline 
    575 East &  T,S       &   obceast\_TS.nc &  $ie$-1     &   $jb$+1 &  $je-1$  \\ 
    576      &    U       &   obceast\_U.nc  &  $ie$-2     &   $jb$+1 &  $je-1$  \\  
    577      &    V       &   obceast\_V.nc  &  $ie$-1     &   $jb$+1 &  $je-1$  \\        
    578 \hline          
    579 South &  T,S      &   obcsouth\_TS.nc &  $jb$+1     &  $ib$+1 &  $ie-1$  \\ 
    580       &    U      &   obcsouth\_U.nc  &  $jb$+1     &  $ib$+1 &  $ie-1$  \\  
    581       &    V      &   obcsouth\_V.nc  &  $jb$+1     &  $ib$+1 &  $ie-1$  \\     
    582 \hline 
    583 North &  T,S      &   obcnorth\_TS.nc &  $je$-1     &  $ib$+1 &  $ie-1$  \\ 
    584       &    U      &   obcnorth\_U.nc  &  $je$-1     &  $ib$+1 &  $ie-1$  \\  
    585       &    V      &   obcnorth\_V.nc  &  $je$-2     &  $ib$+1 &  $ie-1$  \\   
    586 \hline 
    587 \end{tabular}     \end{center} 
    588 \caption{    \label{Tab_obc_ind} 
    589 Requirements for creating open boundary files from a global configuration,  
    590 appropriate for the subdomain of indices $ib:ie$, $jb:je$. ``Index'' designates the  
    591 $i$ or $j$ index along which the $u$ of $v$ boundary point is situated in the global  
    592 configuration, starting and ending with the $j$ or $i$ indices indicated.  
    593 For example, to generate file obcnorth\_V.nc, use the command ncks  
    594 $-F$ $-d\;y,je-2$  $-d\;x,ib+1,ie-1$ }  
    595 \end{table} 
    596 %----------------------------------------------------------------------------------------------------------- 
    597  
    598 It is assumed that the open boundary files contain the variables for the period of  
    599 the model integration. If the boundary files contain one time frame, the boundary  
    600 data is held fixed in time. If the files contain 12 values, it is assumed that the input  
    601 is a climatology for a repeated annual cycle (corresponding to the case \np{ln\_obc\_clim}  
    602 =true). The case of an arbitrary number of time frames is not yet implemented  
    603 correctly; the user is required to write his own code in the module \mdl{obc\_dta}  
    604 to deal with this situation.  
    605  
    606 \subsection{Radiation algorithm} 
    607 \label{OBC_rad} 
    608  
    609 The art of open boundary management consists in applying a constraint strong  
    610 enough that the inner domain "feels" the rest of the ocean, but weak enough 
    611 that perturbations are allowed to leave the domain with minimum false reflections  
    612 of energy. The constraints are specified separately at each boundary as time  
    613 scales for ''inflow'' and ''outflow'' as defined below. The time scales are set (in days)  
    614 by namelist parameters such as \np{rn\_dpein}, \np{rn\_dpeob} for the eastern open  
    615 boundary for example. When both time scales are zero for a given boundary  
    616 ($e.g.$ for the western boundary, \jp{lp\_obc\_west}=true, \np{rn\_dpwob}=0 and  
    617 \np{rn\_dpwin}=0) this means that the boundary in question is a ''fixed '' boundary  
    618 where the solution is set exactly by the boundary data. This is not recommended,  
    619 except in combination with increased viscosity in a ''sponge'' layer next to the  
    620 boundary in order to avoid spurious reflections.   
    621  
    622  
    623 The radiation\/relaxation \gmcomment{the / doesnt seem to appear in the output}  
    624 algorithm is applied when either relaxation time (for ''inflow'' or ''outflow'') is  
    625 non-zero. It has been developed and tested in the SPEM model and its  
    626 successor ROMS \citep{Barnier1996, Marchesiello2001}, which is an  
    627 $s$-coordinate model on an Arakawa C-grid. Although the algorithm has  
    628 been numerically successful in the CLIPPER Atlantic models, the physics  
    629 do not work as expected \citep{Treguier_al_JGR01}. Users are invited to consider  
    630 open boundary conditions (OBC hereafter) with some scepticism  
    631 \citep{Durran2001, Blayo2005}. 
    632  
    633 The first part of the algorithm calculates a phase velocity to determine  
    634 whether perturbations tend to propagate toward, or away from, the  
    635 boundary. Let us consider a model variable $\phi$.  
    636 The phase velocities ($C_{\phi x}$,$C_{\phi y}$) for the variable $\phi$,  
    637 in the directions normal and tangential to the boundary are 
    638 \begin{equation} \label{Eq_obc_cphi} 
    639 C_{\phi x} = \frac{ -\phi_{t} }{ ( \phi_{x}^{2} + \phi_{y}^{2}) } \phi_{x}  
    640 \;\;\;\;\; \;\;\;  
    641 C_{\phi y} = \frac{ -\phi_{t} }{ ( \phi_{x}^{2} + \phi_{y}^{2}) } \phi_{y}.  
    642 \end{equation} 
    643 Following \citet{Treguier_al_JGR01} and \citet{Marchesiello2001} we retain only  
    644 the normal component of the velocity, $C_{\phi x}$, setting $C_{\phi y} =0$  
    645 (but unlike the original Orlanski radiation algorithm we retain $\phi_{y}$ in  
    646 the expression for $C_{\phi x}$).   
    647  
    648 The discrete form of (\ref{Eq_obc_cphi}), described by \citet{Barnier1998}, 
    649 takes into account the two rows of grid points situated inside the domain  
    650 next to the boundary, and the three previous time steps ($n$, $n-1$, 
    651 and $n-2$). The same equation can then be discretized at the boundary at 
    652 time steps $n-1$, $n$ and $n+1$ \gmcomment{since the original was three time-level}  
    653 in order to extrapolate for the new boundary value $\phi^{n+1}$.  
    654  
    655 In the open boundary algorithm as implemented in NEMO v2.3, the new boundary  
    656 values are updated differently depending on the sign of $C_{\phi x}$. Let us take  
    657 an eastern boundary as an example. The solution for variable $\phi$ at the  
    658 boundary is given by a generalized wave equation with phase velocity $C_{\phi}$,  
    659 with the addition of a relaxation term, as: 
    660 \begin{eqnarray} 
    661 \phi_{t} &  =  & -C_{\phi x} \phi_{x} + \frac{1}{\tau_{o}} (\phi_{c}-\phi)  
    662                         \;\;\; \;\;\; \;\;\; (C_{\phi x} > 0), \label{Eq_obc_rado} \\ 
    663 \phi_{t} &  =  & \frac{1}{\tau_{i}} (\phi_{c}-\phi)  
    664 \;\;\; \;\;\; \;\;\;\;\;\; (C_{\phi x} < 0), \label{Eq_obc_radi} 
    665 \end{eqnarray} 
    666 where $\phi_{c}$ is the estimate of $\phi$ at the boundary, provided as boundary  
    667 data. Note that in (\ref{Eq_obc_rado}), $C_{\phi x}$ is bounded by the ratio  
    668 $\delta x/\delta t$ for stability reasons. When $C_{\phi x}$ is eastward (outward  
    669 propagation), the radiation condition (\ref{Eq_obc_rado}) is used.  
    670 When  $C_{\phi x}$ is westward (inward propagation), (\ref{Eq_obc_radi}) is  
    671 used with a strong relaxation to climatology (usually $\tau_{i}=\np{rn\_dpein}=$1~day). 
    672 Equation (\ref{Eq_obc_radi}) is solved with a Euler time-stepping scheme. As a  
    673 consequence, setting $\tau_{i}$ smaller than, or equal to the time step is equivalent  
    674 to a fixed boundary condition. A time scale of one day is usually a good compromise  
    675 which guarantees that the inflow conditions remain close to climatology while ensuring  
    676 numerical stability.  
    677  
    678 In  the case of a western boundary located in the Eastern Atlantic, \citet{Penduff_al_JGR00}  
    679 have been able to implement the radiation algorithm without any boundary data,  
    680 using persistence from the previous time step instead. This solution has not worked  
    681 in other cases \citep{Treguier_al_JGR01}, so that the use of boundary data is recommended.  
    682 Even in the outflow condition (\ref{Eq_obc_rado}), we have found it desirable to  
    683 maintain a weak relaxation to climatology. The time step is usually chosen so as to  
    684 be larger than typical turbulent scales (of order 1000~days \gmcomment{or maybe seconds?}). 
    685  
    686 The radiation condition is applied to the model variables: temperature, salinity,  
    687 tangential and normal velocities. For normal and tangential velocities, $u$ and $v$,  
    688 radiation is applied with phase velocities calculated from $u$ and $v$ respectively.   
    689 For the radiation of tracers, we use the phase velocity calculated from the tangential  
    690 velocity in order to avoid calculating too many independent radiation velocities and  
    691 because tangential velocities and tracers have the same position along the boundary  
    692 on a C-grid.   
    693  
    694 \subsection{Domain decomposition (\key{mpp\_mpi})} 
    695 \label{OBC_mpp} 
    696 When \key{mpp\_mpi} is active in the code, the computational domain is divided  
    697 into rectangles that are attributed each to a different processor. The open boundary  
    698 code is ``mpp-compatible'' up to a certain point. The radiation algorithm will not  
    699 work if there is an mpp subdomain boundary parallel to the open boundary at the  
    700 index of the boundary, or the grid point after (outside), or three grid points before  
    701 (inside). On the other hand, there is no problem if an mpp subdomain boundary  
    702 cuts the open boundary perpendicularly. These geometrical limitations must be  
    703 checked for by the user (there is no safeguard in the code).   
    704 The general principle for the open boundary mpp code is that loops over the open  
    705 boundaries {not sure what this means} are performed on local indices (nie0,  
    706 nie1, nje0, nje1 for an eastern boundary for instance) that are initialized in module  
    707 \mdl{obc\_ini}. Those indices have relevant values on the processors that contain  
    708 a segment of an open boundary. For processors that do not include an open  
    709 boundary segment, the indices are such that the calculations within the loops are  
    710 not performed. 
    711 \gmcomment{I dont understand most of the last few sentences} 
    712   
    713 Arrays of climatological data that are read from files are seen by all processors  
    714 and have the same dimensions for all (for instance, for the eastern boundary,  
    715 uedta(jpjglo,jpk,2)). On the other hand, the arrays for the calculation of radiation  
    716 are local to each processor (uebnd(jpj,jpk,3,3) for instance).  This allowed the  
    717 CLIPPER model for example, to save on memory where the eastern boundary  
    718 crossed 8 processors so that \jp{jpj} was much smaller than (\jp{jpjef}-\jp{jpjed}+1).  
    719  
    720 \subsection{Volume conservation} 
    721 \label{OBC_vol} 
    722  
    723 It is necessary to control the volume inside a domain when using open boundaries.  
    724 With fixed boundaries, it is enough to ensure that the total inflow/outflow has  
    725 reasonable values (either zero or a value compatible with an observed volume  
    726 balance). When using radiative boundary conditions it is necessary to have a  
    727 volume constraint because each open boundary works independently from the  
    728 others. The methodology used to control this volume is identical to the one  
    729 coded in the ROMS model \citep{Marchesiello2001}. 
    730  
    731  
    732 %---------------------------------------- EXTRAS 
    733 \colorbox{yellow}{Explain obc\_vol{\ldots}} 
    734  
    735 \colorbox{yellow}{OBC algorithm for update, OBC restart, list of routines where obc key appears{\ldots}} 
    736  
    737 \colorbox{yellow}{OBC rigid lid? {\ldots}} 
    738348 
    739349% ==================================================================== 
     
    956566%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    957567\begin{figure}[!t]      \begin{center} 
    958 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_LBC_bdy_geom.pdf} 
     568\includegraphics[width=1.0\textwidth]{Fig_LBC_bdy_geom} 
    959569\caption {      \label{Fig_LBC_bdy_geom} 
    960570Example of geometry of unstructured open boundary} 
     
    997607%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    998608\begin{figure}[!t]     \begin{center} 
    999 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_LBC_nc_header.pdf} 
     609\includegraphics[width=1.0\textwidth]{Fig_LBC_nc_header} 
    1000610\caption {     \label{Fig_LBC_nc_header}  
    1001611Example of the header for a coordinates.bdy.nc file} 
     
    1034644 
    1035645 
     646\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_LDF.tex

    r4147 r7351  
    1  
    2 % ================================================================ 
    3 % Chapter � Lateral Ocean Physics (LDF) 
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
     3 
     4% ================================================================ 
     5% Chapter ———  Lateral Ocean Physics (LDF) 
    46% ================================================================ 
    57\chapter{Lateral Ocean Physics (LDF)} 
     
    1517described in \S\ref{PE_zdf} and their discrete formulation in \S\ref{TRA_ldf}  
    1618and \S\ref{DYN_ldf}). In this section we further discuss each lateral physics option.  
    17 Choosing one lateral physics scheme means for the user defining, (1) the space  
    18 and time variations of the eddy coefficients ; (2) the direction along which the  
    19 lateral diffusive fluxes are evaluated (model level, geopotential or isopycnal  
    20 surfaces); and (3) the type of operator used (harmonic, or biharmonic operators,  
    21 and for tracers only, eddy induced advection on tracers). These three aspects  
    22 of the lateral diffusion are set through namelist parameters and CPP keys  
    23 (see the \textit{\ngn{nam\_traldf}} and \textit{\ngn{nam\_dynldf}} below). Note 
    24 that this chapter describes the default implementation of iso-neutral 
     19Choosing one lateral physics scheme means for the user defining,  
     20(1) the type of operator used (laplacian or bilaplacian operators, or no lateral mixing term) ;  
     21(2) the direction along which the lateral diffusive fluxes are evaluated (model level, geopotential or isopycnal surfaces) ; and  
     22(3) the space and time variations of the eddy coefficients.  
     23These three aspects of the lateral diffusion are set through namelist parameters  
     24(see the \textit{\ngn{nam\_traldf}} and \textit{\ngn{nam\_dynldf}} below).  
     25Note that this chapter describes the standard implementation of iso-neutral 
    2526tracer mixing, and Griffies's implementation, which is used if 
    2627\np{traldf\_grif}=true, is described in Appdx\ref{sec:triad} 
     
    3334 
    3435% ================================================================ 
     36% Direction of lateral Mixing 
     37% ================================================================ 
     38\section  [Direction of Lateral Mixing (\textit{ldfslp})] 
     39      {Direction of Lateral Mixing (\mdl{ldfslp})} 
     40\label{LDF_slp} 
     41 
     42%%% 
     43\gmcomment{  we should emphasize here that the implementation is a rather old one.  
     44Better work can be achieved by using \citet{Griffies_al_JPO98, Griffies_Bk04} iso-neutral scheme. } 
     45 
     46A direction for lateral mixing has to be defined when the desired operator does  
     47not act along the model levels. This occurs when $(a)$ horizontal mixing is  
     48required on tracer or momentum (\np{ln\_traldf\_hor} or \np{ln\_dynldf\_hor})  
     49in $s$- or mixed $s$-$z$- coordinates, and $(b)$ isoneutral mixing is required  
     50whatever the vertical coordinate is. This direction of mixing is defined by its  
     51slopes in the \textbf{i}- and \textbf{j}-directions at the face of the cell of the  
     52quantity to be diffused. For a tracer, this leads to the following four slopes :  
     53$r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \eqref{Eq_tra_ldf_iso}), while  
     54for momentum the slopes are  $r_{1t}$, $r_{1uw}$, $r_{2f}$, $r_{2uw}$ for  
     55$u$ and  $r_{1f}$, $r_{1vw}$, $r_{2t}$, $r_{2vw}$ for $v$.  
     56 
     57%gm% add here afigure of the slope in i-direction 
     58 
     59\subsection{slopes for tracer geopotential mixing in the $s$-coordinate} 
     60 
     61In $s$-coordinates, geopotential mixing ($i.e.$ horizontal mixing) $r_1$ and  
     62$r_2$ are the slopes between the geopotential and computational surfaces.  
     63Their discrete formulation is found by locally solving \eqref{Eq_tra_ldf_iso}  
     64when the diffusive fluxes in the three directions are set to zero and $T$ is  
     65assumed to be horizontally uniform, $i.e.$ a linear function of $z_T$, the  
     66depth of a $T$-point.  
     67%gm { Steven : My version is obviously wrong since I'm left with an arbitrary constant which is the local vertical temperature gradient} 
     68 
     69\begin{equation} \label{Eq_ldfslp_geo} 
     70\begin{aligned} 
     71 r_{1u} &= \frac{e_{3u}}{ \left( e_{1u}\;\overline{\overline{e_{3w}}}^{\,i+1/2,\,k} \right)} 
     72           \;\delta_{i+1/2}[z_t]  
     73      &\approx \frac{1}{e_{1u}}\; \delta_{i+1/2}[z_t] \ \ \ 
     74\\ 
     75 r_{2v} &= \frac{e_{3v}}{\left( e_{2v}\;\overline{\overline{e_{3w}}}^{\,j+1/2,\,k} \right)}  
     76           \;\delta_{j+1/2} [z_t]  
     77      &\approx \frac{1}{e_{2v}}\; \delta_{j+1/2}[z_t] \ \ \ 
     78\\ 
     79 r_{1w} &= \frac{1}{e_{1w}}\;\overline{\overline{\delta_{i+1/2}[z_t]}}^{\,i,\,k+1/2} 
     80      &\approx \frac{1}{e_{1w}}\; \delta_{i+1/2}[z_{uw}]  
     81 \\ 
     82 r_{2w} &= \frac{1}{e_{2w}}\;\overline{\overline{\delta_{j+1/2}[z_t]}}^{\,j,\,k+1/2} 
     83      &\approx \frac{1}{e_{2w}}\; \delta_{j+1/2}[z_{vw}]  
     84 \\ 
     85\end{aligned} 
     86\end{equation} 
     87 
     88%gm%  caution I'm not sure the simplification was a good idea!  
     89 
     90These slopes are computed once in \rou{ldfslp\_init} when \np{ln\_sco}=True,  
     91and either \np{ln\_traldf\_hor}=True or \np{ln\_dynldf\_hor}=True.  
     92 
     93\subsection{Slopes for tracer iso-neutral mixing}\label{LDF_slp_iso} 
     94In iso-neutral mixing  $r_1$ and $r_2$ are the slopes between the iso-neutral  
     95and computational surfaces. Their formulation does not depend on the vertical  
     96coordinate used. Their discrete formulation is found using the fact that the  
     97diffusive fluxes of locally referenced potential density ($i.e.$ $in situ$ density)  
     98vanish. So, substituting $T$ by $\rho$ in \eqref{Eq_tra_ldf_iso} and setting the  
     99diffusive fluxes in the three directions to zero leads to the following definition for  
     100the neutral slopes: 
     101 
     102\begin{equation} \label{Eq_ldfslp_iso} 
     103\begin{split} 
     104 r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac{\delta_{i+1/2}[\rho]} 
     105                        {\overline{\overline{\delta_{k+1/2}[\rho]}}^{\,i+1/2,\,k}} 
     106\\ 
     107 r_{2v} &= \frac{e_{3v}}{e_{2v}}\; \frac{\delta_{j+1/2}\left[\rho \right]} 
     108                        {\overline{\overline{\delta_{k+1/2}[\rho]}}^{\,j+1/2,\,k}} 
     109\\ 
     110 r_{1w} &= \frac{e_{3w}}{e_{1w}}\;  
     111         \frac{\overline{\overline{\delta_{i+1/2}[\rho]}}^{\,i,\,k+1/2}} 
     112             {\delta_{k+1/2}[\rho]} 
     113\\ 
     114 r_{2w} &= \frac{e_{3w}}{e_{2w}}\;  
     115         \frac{\overline{\overline{\delta_{j+1/2}[\rho]}}^{\,j,\,k+1/2}} 
     116             {\delta_{k+1/2}[\rho]} 
     117\\ 
     118\end{split} 
     119\end{equation} 
     120 
     121%gm% rewrite this as the explanation is not very clear !!! 
     122%In practice, \eqref{Eq_ldfslp_iso} is of little help in evaluating the neutral surface slopes. Indeed, for an unsimplified equation of state, the density has a strong dependancy on pressure (here approximated as the depth), therefore applying \eqref{Eq_ldfslp_iso} using the $in situ$ density, $\rho$, computed at T-points leads to a flattening of slopes as the depth increases. This is due to the strong increase of the $in situ$ density with depth.  
     123 
     124%By definition, neutral surfaces are tangent to the local $in situ$ density \citep{McDougall1987}, therefore in \eqref{Eq_ldfslp_iso}, all the derivatives have to be evaluated at the same local pressure (which in decibars is approximated by the depth in meters). 
     125 
     126%In the $z$-coordinate, the derivative of the  \eqref{Eq_ldfslp_iso} numerator is evaluated at the same depth \nocite{as what?} ($T$-level, which is the same as the $u$- and $v$-levels), so  the $in situ$ density can be used for its evaluation.  
     127 
     128As the mixing is performed along neutral surfaces, the gradient of $\rho$ in  
     129\eqref{Eq_ldfslp_iso} has to be evaluated at the same local pressure (which,  
     130in decibars, is approximated by the depth in meters in the model). Therefore  
     131\eqref{Eq_ldfslp_iso} cannot be used as such, but further transformation is  
     132needed depending on the vertical coordinate used: 
     133 
     134\begin{description} 
     135 
     136\item[$z$-coordinate with full step : ] in \eqref{Eq_ldfslp_iso} the densities  
     137appearing in the $i$ and $j$ derivatives  are taken at the same depth, thus  
     138the $in situ$ density can be used. This is not the case for the vertical  
     139derivatives: $\delta_{k+1/2}[\rho]$ is replaced by $-\rho N^2/g$, where $N^2$  
     140is the local Brunt-Vais\"{a}l\"{a} frequency evaluated following  
     141\citet{McDougall1987} (see \S\ref{TRA_bn2}).  
     142 
     143\item[$z$-coordinate with partial step : ] this case is identical to the full step  
     144case except that at partial step level, the \emph{horizontal} density gradient  
     145is evaluated as described in \S\ref{TRA_zpshde}. 
     146 
     147\item[$s$- or hybrid $s$-$z$- coordinate : ] in the current release of \NEMO,  
     148iso-neutral mixing is only employed for $s$-coordinates if the 
     149Griffies scheme is used (\np{traldf\_grif}=true; see Appdx \ref{sec:triad}).  
     150In other words, iso-neutral mixing will only be accurately represented with a  
     151linear equation of state (\np{nn\_eos}=1 or 2). In the case of a "true" equation  
     152of state, the evaluation of $i$ and $j$ derivatives in \eqref{Eq_ldfslp_iso}  
     153will include a pressure dependent part, leading to the wrong evaluation of  
     154the neutral slopes. 
     155 
     156%gm%  
     157Note: The solution for $s$-coordinate passes trough the use of different  
     158(and better) expression for the constraint on iso-neutral fluxes. Following  
     159\citet{Griffies_Bk04}, instead of specifying directly that there is a zero neutral  
     160diffusive flux of locally referenced potential density, we stay in the $T$-$S$  
     161plane and consider the balance between the neutral direction diffusive fluxes  
     162of potential temperature and salinity: 
     163\begin{equation} 
     164\alpha \ \textbf{F}(T) = \beta \ \textbf{F}(S) 
     165\end{equation} 
     166%gm{  where vector F is ....} 
     167 
     168This constraint leads to the following definition for the slopes: 
     169 
     170\begin{equation} \label{Eq_ldfslp_iso2} 
     171\begin{split} 
     172 r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac 
     173      {\alpha_u \;\delta_{i+1/2}[T] - \beta_u \;\delta_{i+1/2}[S]} 
     174      {\alpha_u \;\overline{\overline{\delta_{k+1/2}[T]}}^{\,i+1/2,\,k} 
     175       -\beta_u  \;\overline{\overline{\delta_{k+1/2}[S]}}^{\,i+1/2,\,k} } 
     176\\ 
     177 r_{2v} &= \frac{e_{3v}}{e_{2v}}\; \frac 
     178      {\alpha_v \;\delta_{j+1/2}[T] - \beta_v \;\delta_{j+1/2}[S]} 
     179      {\alpha_v \;\overline{\overline{\delta_{k+1/2}[T]}}^{\,j+1/2,\,k} 
     180       -\beta_v  \;\overline{\overline{\delta_{k+1/2}[S]}}^{\,j+1/2,\,k} } 
     181\\ 
     182 r_{1w} &= \frac{e_{3w}}{e_{1w}}\; \frac 
     183      {\alpha_w \;\overline{\overline{\delta_{i+1/2}[T]}}^{\,i,\,k+1/2} 
     184       -\beta_w  \;\overline{\overline{\delta_{i+1/2}[S]}}^{\,i,\,k+1/2} } 
     185      {\alpha_w \;\delta_{k+1/2}[T] - \beta_w \;\delta_{k+1/2}[S]} 
     186\\ 
     187 r_{2w} &= \frac{e_{3w}}{e_{2w}}\; \frac 
     188      {\alpha_w \;\overline{\overline{\delta_{j+1/2}[T]}}^{\,j,\,k+1/2} 
     189       -\beta_w  \;\overline{\overline{\delta_{j+1/2}[S]}}^{\,j,\,k+1/2} } 
     190      {\alpha_w \;\delta_{k+1/2}[T] - \beta_w \;\delta_{k+1/2}[S]} 
     191\\ 
     192\end{split} 
     193\end{equation} 
     194where $\alpha$ and $\beta$, the thermal expansion and saline contraction  
     195coefficients introduced in \S\ref{TRA_bn2}, have to be evaluated at the three  
     196velocity points. In order to save computation time, they should be approximated  
     197by the mean of their values at $T$-points (for example in the case of $\alpha$:   
     198$\alpha_u=\overline{\alpha_T}^{i+1/2}$,  $\alpha_v=\overline{\alpha_T}^{j+1/2}$  
     199and $\alpha_w=\overline{\alpha_T}^{k+1/2}$). 
     200 
     201Note that such a formulation could be also used in the $z$-coordinate and  
     202$z$-coordinate with partial steps cases. 
     203 
     204\end{description} 
     205 
     206This implementation is a rather old one. It is similar to the one 
     207proposed by Cox [1987], except for the background horizontal 
     208diffusion. Indeed, the Cox implementation of isopycnal diffusion in 
     209GFDL-type models requires a minimum background horizontal diffusion 
     210for numerical stability reasons.  To overcome this problem, several 
     211techniques have been proposed in which the numerical schemes of the 
     212ocean model are modified \citep{Weaver_Eby_JPO97, 
     213  Griffies_al_JPO98}. Griffies's scheme is now available in \NEMO if 
     214\np{traldf\_grif\_iso} is set true; see Appdx \ref{sec:triad}. Here, 
     215another strategy is presented \citep{Lazar_PhD97}: a local 
     216filtering of the iso-neutral slopes (made on 9 grid-points) prevents 
     217the development of grid point noise generated by the iso-neutral 
     218diffusion operator (Fig.~\ref{Fig_LDF_ZDF1}). This allows an 
     219iso-neutral diffusion scheme without additional background horizontal 
     220mixing. This technique can be viewed as a diffusion operator that acts 
     221along large-scale (2~$\Delta$x) \gmcomment{2deltax doesnt seem very 
     222  large scale} iso-neutral surfaces. The diapycnal diffusion required 
     223for numerical stability is thus minimized and its net effect on the 
     224flow is quite small when compared to the effect of an horizontal 
     225background mixing. 
     226 
     227Nevertheless, this iso-neutral operator does not ensure that variance cannot increase,  
     228contrary to the \citet{Griffies_al_JPO98} operator which has that property.  
     229 
     230%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     231\begin{figure}[!ht]      \begin{center} 
     232\includegraphics[width=0.70\textwidth]{Fig_LDF_ZDF1} 
     233\caption {    \label{Fig_LDF_ZDF1} 
     234averaging procedure for isopycnal slope computation.} 
     235\end{center}    \end{figure} 
     236%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     237 
     238%There are three additional questions about the slope calculation.  
     239%First the expression for the rotation tensor has been obtain assuming the "small slope" approximation, so a bound has to be imposed on slopes.  
     240%Second, numerical stability issues also require a bound on slopes.  
     241%Third, the question of boundary condition specified on slopes... 
     242 
     243%from griffies: chapter 13.1.... 
     244 
     245 
     246 
     247% In addition and also for numerical stability reasons \citep{Cox1987, Griffies_Bk04},  
     248% the slopes are bounded by $1/100$ everywhere. This limit is decreasing linearly  
     249% to zero fom $70$ meters depth and the surface (the fact that the eddies "feel" the  
     250% surface motivates this flattening of isopycnals near the surface). 
     251 
     252For numerical stability reasons \citep{Cox1987, Griffies_Bk04}, the slopes must also  
     253be bounded by $1/100$ everywhere. This constraint is applied in a piecewise linear  
     254fashion, increasing from zero at the surface to $1/100$ at $70$ metres and thereafter  
     255decreasing to zero at the bottom of the ocean. (the fact that the eddies "feel" the  
     256surface motivates this flattening of isopycnals near the surface). 
     257 
     258%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     259\begin{figure}[!ht]     \begin{center} 
     260\includegraphics[width=0.70\textwidth]{Fig_eiv_slp} 
     261\caption {     \label{Fig_eiv_slp} 
     262Vertical profile of the slope used for lateral mixing in the mixed layer :  
     263\textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior,  
     264which has to be adjusted at the surface boundary (i.e. it must tend to zero at the  
     265surface since there is no mixing across the air-sea interface: wall boundary  
     266condition). Nevertheless, the profile between the surface zero value and the interior  
     267iso-neutral one is unknown, and especially the value at the base of the mixed layer ;  
     268\textit{(b)} profile of slope using a linear tapering of the slope near the surface and  
     269imposing a maximum slope of 1/100 ; \textit{(c)} profile of slope actually used in  
     270\NEMO: a linear decrease of the slope from zero at the surface to its ocean interior  
     271value computed just below the mixed layer. Note the huge change in the slope at the  
     272base of the mixed layer between  \textit{(b)}  and \textit{(c)}.} 
     273\end{center}   \end{figure} 
     274%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     275 
     276\colorbox{yellow}{add here a discussion about the flattening of the slopes, vs  tapering the coefficient.} 
     277 
     278\subsection{slopes for momentum iso-neutral mixing} 
     279 
     280The iso-neutral diffusion operator on momentum is the same as the one used on  
     281tracers but applied to each component of the velocity separately (see  
     282\eqref{Eq_dyn_ldf_iso} in section~\ref{DYN_ldf_iso}). The slopes between the  
     283surface along which the diffusion operator acts and the surface of computation  
     284($z$- or $s$-surfaces) are defined at $T$-, $f$-, and \textit{uw}- points for the  
     285$u$-component, and $T$-, $f$- and \textit{vw}- points for the $v$-component.  
     286They are computed from the slopes used for tracer diffusion, $i.e.$  
     287\eqref{Eq_ldfslp_geo} and \eqref{Eq_ldfslp_iso} : 
     288 
     289\begin{equation} \label{Eq_ldfslp_dyn} 
     290\begin{aligned} 
     291&r_{1t}\ \ = \overline{r_{1u}}^{\,i}       &&&    r_{1f}\ \ &= \overline{r_{1u}}^{\,i+1/2} \\ 
     292&r_{2f} \ \ = \overline{r_{2v}}^{\,j+1/2} &&&   r_{2t}\ &= \overline{r_{2v}}^{\,j} \\ 
     293&r_{1uw}  = \overline{r_{1w}}^{\,i+1/2} &&\ \ \text{and} \ \ &   r_{1vw}&= \overline{r_{1w}}^{\,j+1/2} \\ 
     294&r_{2uw}= \overline{r_{2w}}^{\,j+1/2} &&&         r_{2vw}&= \overline{r_{2w}}^{\,j+1/2}\\ 
     295\end{aligned} 
     296\end{equation} 
     297 
     298The major issue remaining is in the specification of the boundary conditions.  
     299The same boundary conditions are chosen as those used for lateral  
     300diffusion along model level surfaces, i.e. using the shear computed along  
     301the model levels and with no additional friction at the ocean bottom (see  
     302\S\ref{LBC_coast}). 
     303 
     304 
     305% ================================================================ 
     306% Lateral Mixing Operator 
     307% ================================================================ 
     308\section [Lateral Mixing Operators (\textit{ldftra}, \textit{ldfdyn})]  
     309        {Lateral Mixing Operators (\mdl{traldf}, \mdl{traldf}) } 
     310\label{LDF_op} 
     311 
     312 
     313    
     314% ================================================================ 
    35315% Lateral Mixing Coefficients 
    36316% ================================================================ 
     
    38318        {Lateral Mixing Coefficient (\mdl{ldftra}, \mdl{ldfdyn}) } 
    39319\label{LDF_coef} 
    40  
    41320 
    42321Introducing a space variation in the lateral eddy mixing coefficients changes  
     
    148427values are $0$). However, the technique used to compute the isopycnal  
    149428slopes is intended to get rid of such a background diffusion, since it introduces  
    150 spurious diapycnal diffusion (see {\S\ref{LDF_slp}). 
     429spurious diapycnal diffusion (see \S\ref{LDF_slp}). 
    151430 
    152431(4) when an eddy induced advection term is used (\key{traldf\_eiv}), $A^{eiv}$,  
     
    165444 
    166445% ================================================================ 
    167 % Direction of lateral Mixing 
    168 % ================================================================ 
    169 \section  [Direction of Lateral Mixing (\textit{ldfslp})] 
    170       {Direction of Lateral Mixing (\mdl{ldfslp})} 
    171 \label{LDF_slp} 
    172  
    173 %%% 
    174 \gmcomment{  we should emphasize here that the implementation is a rather old one.  
    175 Better work can be achieved by using \citet{Griffies_al_JPO98, Griffies_Bk04} iso-neutral scheme. } 
    176  
    177 A direction for lateral mixing has to be defined when the desired operator does  
    178 not act along the model levels. This occurs when $(a)$ horizontal mixing is  
    179 required on tracer or momentum (\np{ln\_traldf\_hor} or \np{ln\_dynldf\_hor})  
    180 in $s$- or mixed $s$-$z$- coordinates, and $(b)$ isoneutral mixing is required  
    181 whatever the vertical coordinate is. This direction of mixing is defined by its  
    182 slopes in the \textbf{i}- and \textbf{j}-directions at the face of the cell of the  
    183 quantity to be diffused. For a tracer, this leads to the following four slopes :  
    184 $r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \eqref{Eq_tra_ldf_iso}), while  
    185 for momentum the slopes are  $r_{1t}$, $r_{1uw}$, $r_{2f}$, $r_{2uw}$ for  
    186 $u$ and  $r_{1f}$, $r_{1vw}$, $r_{2t}$, $r_{2vw}$ for $v$.  
    187  
    188 %gm% add here afigure of the slope in i-direction 
    189  
    190 \subsection{slopes for tracer geopotential mixing in the $s$-coordinate} 
    191  
    192 In $s$-coordinates, geopotential mixing ($i.e.$ horizontal mixing) $r_1$ and  
    193 $r_2$ are the slopes between the geopotential and computational surfaces.  
    194 Their discrete formulation is found by locally solving \eqref{Eq_tra_ldf_iso}  
    195 when the diffusive fluxes in the three directions are set to zero and $T$ is  
    196 assumed to be horizontally uniform, $i.e.$ a linear function of $z_T$, the  
    197 depth of a $T$-point.  
    198 %gm { Steven : My version is obviously wrong since I'm left with an arbitrary constant which is the local vertical temperature gradient} 
    199  
    200 \begin{equation} \label{Eq_ldfslp_geo} 
    201 \begin{aligned} 
    202  r_{1u} &= \frac{e_{3u}}{ \left( e_{1u}\;\overline{\overline{e_{3w}}}^{\,i+1/2,\,k} \right)} 
    203            \;\delta_{i+1/2}[z_t]  
    204       &\approx \frac{1}{e_{1u}}\; \delta_{i+1/2}[z_t]  
    205 \\ 
    206  r_{2v} &= \frac{e_{3v}}{\left( e_{2v}\;\overline{\overline{e_{3w}}}^{\,j+1/2,\,k} \right)}  
    207            \;\delta_{j+1/2} [z_t]  
    208       &\approx \frac{1}{e_{2v}}\; \delta_{j+1/2}[z_t]  
    209 \\ 
    210  r_{1w} &= \frac{1}{e_{1w}}\;\overline{\overline{\delta_{i+1/2}[z_t]}}^{\,i,\,k+1/2} 
    211       &\approx \frac{1}{e_{1w}}\; \delta_{i+1/2}[z_{uw}]  
    212  \\ 
    213  r_{2w} &= \frac{1}{e_{2w}}\;\overline{\overline{\delta_{j+1/2}[z_t]}}^{\,j,\,k+1/2} 
    214       &\approx \frac{1}{e_{2w}}\; \delta_{j+1/2}[z_{vw}]  
    215  \\ 
    216 \end{aligned} 
    217 \end{equation} 
    218  
    219 %gm%  caution I'm not sure the simplification was a good idea!  
    220  
    221 These slopes are computed once in \rou{ldfslp\_init} when \np{ln\_sco}=True,  
    222 and either \np{ln\_traldf\_hor}=True or \np{ln\_dynldf\_hor}=True.  
    223  
    224 \subsection{Slopes for tracer iso-neutral mixing}\label{LDF_slp_iso} 
    225 In iso-neutral mixing  $r_1$ and $r_2$ are the slopes between the iso-neutral  
    226 and computational surfaces. Their formulation does not depend on the vertical  
    227 coordinate used. Their discrete formulation is found using the fact that the  
    228 diffusive fluxes of locally referenced potential density ($i.e.$ $in situ$ density)  
    229 vanish. So, substituting $T$ by $\rho$ in \eqref{Eq_tra_ldf_iso} and setting the  
    230 diffusive fluxes in the three directions to zero leads to the following definition for  
    231 the neutral slopes: 
    232  
    233 \begin{equation} \label{Eq_ldfslp_iso} 
    234 \begin{split} 
    235  r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac{\delta_{i+1/2}[\rho]} 
    236                         {\overline{\overline{\delta_{k+1/2}[\rho]}}^{\,i+1/2,\,k}} 
    237 \\ 
    238  r_{2v} &= \frac{e_{3v}}{e_{2v}}\; \frac{\delta_{j+1/2}\left[\rho \right]} 
    239                         {\overline{\overline{\delta_{k+1/2}[\rho]}}^{\,j+1/2,\,k}} 
    240 \\ 
    241  r_{1w} &= \frac{e_{3w}}{e_{1w}}\;  
    242          \frac{\overline{\overline{\delta_{i+1/2}[\rho]}}^{\,i,\,k+1/2}} 
    243              {\delta_{k+1/2}[\rho]} 
    244 \\ 
    245  r_{2w} &= \frac{e_{3w}}{e_{2w}}\;  
    246          \frac{\overline{\overline{\delta_{j+1/2}[\rho]}}^{\,j,\,k+1/2}} 
    247              {\delta_{k+1/2}[\rho]} 
    248 \\ 
    249 \end{split} 
    250 \end{equation} 
    251  
    252 %gm% rewrite this as the explanation is not very clear !!! 
    253 %In practice, \eqref{Eq_ldfslp_iso} is of little help in evaluating the neutral surface slopes. Indeed, for an unsimplified equation of state, the density has a strong dependancy on pressure (here approximated as the depth), therefore applying \eqref{Eq_ldfslp_iso} using the $in situ$ density, $\rho$, computed at T-points leads to a flattening of slopes as the depth increases. This is due to the strong increase of the $in situ$ density with depth.  
    254  
    255 %By definition, neutral surfaces are tangent to the local $in situ$ density \citep{McDougall1987}, therefore in \eqref{Eq_ldfslp_iso}, all the derivatives have to be evaluated at the same local pressure (which in decibars is approximated by the depth in meters). 
    256  
    257 %In the $z$-coordinate, the derivative of the  \eqref{Eq_ldfslp_iso} numerator is evaluated at the same depth \nocite{as what?} ($T$-level, which is the same as the $u$- and $v$-levels), so  the $in situ$ density can be used for its evaluation.  
    258  
    259 As the mixing is performed along neutral surfaces, the gradient of $\rho$ in  
    260 \eqref{Eq_ldfslp_iso} has to be evaluated at the same local pressure (which,  
    261 in decibars, is approximated by the depth in meters in the model). Therefore  
    262 \eqref{Eq_ldfslp_iso} cannot be used as such, but further transformation is  
    263 needed depending on the vertical coordinate used: 
    264  
    265 \begin{description} 
    266  
    267 \item[$z$-coordinate with full step : ] in \eqref{Eq_ldfslp_iso} the densities  
    268 appearing in the $i$ and $j$ derivatives  are taken at the same depth, thus  
    269 the $in situ$ density can be used. This is not the case for the vertical  
    270 derivatives: $\delta_{k+1/2}[\rho]$ is replaced by $-\rho N^2/g$, where $N^2$  
    271 is the local Brunt-Vais\"{a}l\"{a} frequency evaluated following  
    272 \citet{McDougall1987} (see \S\ref{TRA_bn2}).  
    273  
    274 \item[$z$-coordinate with partial step : ] this case is identical to the full step  
    275 case except that at partial step level, the \emph{horizontal} density gradient  
    276 is evaluated as described in \S\ref{TRA_zpshde}. 
    277  
    278 \item[$s$- or hybrid $s$-$z$- coordinate : ] in the current release of \NEMO,  
    279 iso-neutral mixing is only employed for $s$-coordinates if the 
    280 Griffies scheme is used (\np{traldf\_grif}=true; see Appdx \ref{sec:triad}).  
    281 In other words, iso-neutral mixing will only be accurately represented with a  
    282 linear equation of state (\np{nn\_eos}=1 or 2). In the case of a "true" equation  
    283 of state, the evaluation of $i$ and $j$ derivatives in \eqref{Eq_ldfslp_iso}  
    284 will include a pressure dependent part, leading to the wrong evaluation of  
    285 the neutral slopes. 
    286  
    287 %gm%  
    288 Note: The solution for $s$-coordinate passes trough the use of different  
    289 (and better) expression for the constraint on iso-neutral fluxes. Following  
    290 \citet{Griffies_Bk04}, instead of specifying directly that there is a zero neutral  
    291 diffusive flux of locally referenced potential density, we stay in the $T$-$S$  
    292 plane and consider the balance between the neutral direction diffusive fluxes  
    293 of potential temperature and salinity: 
    294 \begin{equation} 
    295 \alpha \ \textbf{F}(T) = \beta \ \textbf{F}(S) 
    296 \end{equation} 
    297 %gm{  where vector F is ....} 
    298  
    299 This constraint leads to the following definition for the slopes: 
    300  
    301 \begin{equation} \label{Eq_ldfslp_iso2} 
    302 \begin{split} 
    303  r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac 
    304       {\alpha_u \;\delta_{i+1/2}[T] - \beta_u \;\delta_{i+1/2}[S]} 
    305       {\alpha_u \;\overline{\overline{\delta_{k+1/2}[T]}}^{\,i+1/2,\,k} 
    306        -\beta_u  \;\overline{\overline{\delta_{k+1/2}[S]}}^{\,i+1/2,\,k} } 
    307 \\ 
    308  r_{2v} &= \frac{e_{3v}}{e_{2v}}\; \frac 
    309       {\alpha_v \;\delta_{j+1/2}[T] - \beta_v \;\delta_{j+1/2}[S]} 
    310       {\alpha_v \;\overline{\overline{\delta_{k+1/2}[T]}}^{\,j+1/2,\,k} 
    311        -\beta_v  \;\overline{\overline{\delta_{k+1/2}[S]}}^{\,j+1/2,\,k} } 
    312 \\ 
    313  r_{1w} &= \frac{e_{3w}}{e_{1w}}\; \frac 
    314       {\alpha_w \;\overline{\overline{\delta_{i+1/2}[T]}}^{\,i,\,k+1/2} 
    315        -\beta_w  \;\overline{\overline{\delta_{i+1/2}[S]}}^{\,i,\,k+1/2} } 
    316       {\alpha_w \;\delta_{k+1/2}[T] - \beta_w \;\delta_{k+1/2}[S]} 
    317 \\ 
    318  r_{2w} &= \frac{e_{3w}}{e_{2w}}\; \frac 
    319       {\alpha_w \;\overline{\overline{\delta_{j+1/2}[T]}}^{\,j,\,k+1/2} 
    320        -\beta_w  \;\overline{\overline{\delta_{j+1/2}[S]}}^{\,j,\,k+1/2} } 
    321       {\alpha_w \;\delta_{k+1/2}[T] - \beta_w \;\delta_{k+1/2}[S]} 
    322 \\ 
    323 \end{split} 
    324 \end{equation} 
    325 where $\alpha$ and $\beta$, the thermal expansion and saline contraction  
    326 coefficients introduced in \S\ref{TRA_bn2}, have to be evaluated at the three  
    327 velocity points. In order to save computation time, they should be approximated  
    328 by the mean of their values at $T$-points (for example in the case of $\alpha$:   
    329 $\alpha_u=\overline{\alpha_T}^{i+1/2}$,  $\alpha_v=\overline{\alpha_T}^{j+1/2}$  
    330 and $\alpha_w=\overline{\alpha_T}^{k+1/2}$). 
    331  
    332 Note that such a formulation could be also used in the $z$-coordinate and  
    333 $z$-coordinate with partial steps cases. 
    334  
    335 \end{description} 
    336  
    337 This implementation is a rather old one. It is similar to the one 
    338 proposed by Cox [1987], except for the background horizontal 
    339 diffusion. Indeed, the Cox implementation of isopycnal diffusion in 
    340 GFDL-type models requires a minimum background horizontal diffusion 
    341 for numerical stability reasons.  To overcome this problem, several 
    342 techniques have been proposed in which the numerical schemes of the 
    343 ocean model are modified \citep{Weaver_Eby_JPO97, 
    344   Griffies_al_JPO98}. Griffies's scheme is now available in \NEMO if 
    345 \np{traldf\_grif\_iso} is set true; see Appdx \ref{sec:triad}. Here, 
    346 another strategy is presented \citep{Lazar_PhD97}: a local 
    347 filtering of the iso-neutral slopes (made on 9 grid-points) prevents 
    348 the development of grid point noise generated by the iso-neutral 
    349 diffusion operator (Fig.~\ref{Fig_LDF_ZDF1}). This allows an 
    350 iso-neutral diffusion scheme without additional background horizontal 
    351 mixing. This technique can be viewed as a diffusion operator that acts 
    352 along large-scale (2~$\Delta$x) \gmcomment{2deltax doesnt seem very 
    353   large scale} iso-neutral surfaces. The diapycnal diffusion required 
    354 for numerical stability is thus minimized and its net effect on the 
    355 flow is quite small when compared to the effect of an horizontal 
    356 background mixing. 
    357  
    358 Nevertheless, this iso-neutral operator does not ensure that variance cannot increase,  
    359 contrary to the \citet{Griffies_al_JPO98} operator which has that property.  
    360  
    361 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    362 \begin{figure}[!ht]      \begin{center} 
    363 \includegraphics[width=0.70\textwidth]{./TexFiles/Figures/Fig_LDF_ZDF1.pdf} 
    364 \caption {    \label{Fig_LDF_ZDF1} 
    365 averaging procedure for isopycnal slope computation.} 
    366 \end{center}    \end{figure} 
    367 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    368  
    369 %There are three additional questions about the slope calculation.  
    370 %First the expression for the rotation tensor has been obtain assuming the "small slope" approximation, so a bound has to be imposed on slopes.  
    371 %Second, numerical stability issues also require a bound on slopes.  
    372 %Third, the question of boundary condition specified on slopes... 
    373  
    374 %from griffies: chapter 13.1.... 
    375  
    376  
    377  
    378 % In addition and also for numerical stability reasons \citep{Cox1987, Griffies_Bk04},  
    379 % the slopes are bounded by $1/100$ everywhere. This limit is decreasing linearly  
    380 % to zero fom $70$ meters depth and the surface (the fact that the eddies "feel" the  
    381 % surface motivates this flattening of isopycnals near the surface). 
    382  
    383 For numerical stability reasons \citep{Cox1987, Griffies_Bk04}, the slopes must also  
    384 be bounded by $1/100$ everywhere. This constraint is applied in a piecewise linear  
    385 fashion, increasing from zero at the surface to $1/100$ at $70$ metres and thereafter  
    386 decreasing to zero at the bottom of the ocean. (the fact that the eddies "feel" the  
    387 surface motivates this flattening of isopycnals near the surface). 
    388  
    389 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    390 \begin{figure}[!ht]     \begin{center} 
    391 \includegraphics[width=0.70\textwidth]{./TexFiles/Figures/Fig_eiv_slp.pdf} 
    392 \caption {     \label{Fig_eiv_slp} 
    393 Vertical profile of the slope used for lateral mixing in the mixed layer :  
    394 \textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior,  
    395 which has to be adjusted at the surface boundary (i.e. it must tend to zero at the  
    396 surface since there is no mixing across the air-sea interface: wall boundary  
    397 condition). Nevertheless, the profile between the surface zero value and the interior  
    398 iso-neutral one is unknown, and especially the value at the base of the mixed layer ;  
    399 \textit{(b)} profile of slope using a linear tapering of the slope near the surface and  
    400 imposing a maximum slope of 1/100 ; \textit{(c)} profile of slope actually used in  
    401 \NEMO: a linear decrease of the slope from zero at the surface to its ocean interior  
    402 value computed just below the mixed layer. Note the huge change in the slope at the  
    403 base of the mixed layer between  \textit{(b)}  and \textit{(c)}.} 
    404 \end{center}   \end{figure} 
    405 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    406  
    407 \colorbox{yellow}{add here a discussion about the flattening of the slopes, vs  tapering the coefficient.} 
    408  
    409 \subsection{slopes for momentum iso-neutral mixing} 
    410  
    411 The iso-neutral diffusion operator on momentum is the same as the one used on  
    412 tracers but applied to each component of the velocity separately (see  
    413 \eqref{Eq_dyn_ldf_iso} in section~\ref{DYN_ldf_iso}). The slopes between the  
    414 surface along which the diffusion operator acts and the surface of computation  
    415 ($z$- or $s$-surfaces) are defined at $T$-, $f$-, and \textit{uw}- points for the  
    416 $u$-component, and $T$-, $f$- and \textit{vw}- points for the $v$-component.  
    417 They are computed from the slopes used for tracer diffusion, $i.e.$  
    418 \eqref{Eq_ldfslp_geo} and \eqref{Eq_ldfslp_iso} : 
    419  
    420 \begin{equation} \label{Eq_ldfslp_dyn} 
    421 \begin{aligned} 
    422 &r_{1t}\ \ = \overline{r_{1u}}^{\,i}       &&&    r_{1f}\ \ &= \overline{r_{1u}}^{\,i+1/2} \\ 
    423 &r_{2f} \ \ = \overline{r_{2v}}^{\,j+1/2} &&&   r_{2t}\ &= \overline{r_{2v}}^{\,j} \\ 
    424 &r_{1uw}  = \overline{r_{1w}}^{\,i+1/2} &&\ \ \text{and} \ \ &   r_{1vw}&= \overline{r_{1w}}^{\,j+1/2} \\ 
    425 &r_{2uw}= \overline{r_{2w}}^{\,j+1/2} &&&         r_{2vw}&= \overline{r_{2w}}^{\,j+1/2}\\ 
    426 \end{aligned} 
    427 \end{equation} 
    428  
    429 The major issue remaining is in the specification of the boundary conditions.  
    430 The same boundary conditions are chosen as those used for lateral  
    431 diffusion along model level surfaces, i.e. using the shear computed along  
    432 the model levels and with no additional friction at the ocean bottom (see  
    433 {\S\ref{LBC_coast}). 
    434  
    435  
    436 % ================================================================ 
    437446% Eddy Induced Mixing 
    438447% ================================================================ 
     
    440449      {Eddy Induced Velocity (\mdl{traadv\_eiv}, \mdl{ldfeiv})} 
    441450\label{LDF_eiv} 
     451 
     452%%gm  from Triad appendix  : to be incorporated.... 
     453\gmcomment{ 
     454Values of iso-neutral diffusivity and GM coefficient are set as 
     455described in \S\ref{LDF_coef}. If none of the keys \key{traldf\_cNd}, 
     456N=1,2,3 is set (the default), spatially constant iso-neutral $A_l$ and 
     457GM diffusivity $A_e$ are directly set by \np{rn\_aeih\_0} and 
     458\np{rn\_aeiv\_0}. If 2D-varying coefficients are set with 
     459\key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal 
     460scale factor according to \eqref{Eq_title} \footnote{Except in global ORCA 
     461  $0.5^{\circ}$ runs with \key{traldf\_eiv}, where 
     462  $A_l$ is set like $A_e$ but with a minimum vale of 
     463  $100\;\mathrm{m}^2\;\mathrm{s}^{-1}$}. In idealised setups with 
     464\key{traldf\_c2d}, $A_e$ is reduced similarly, but if \key{traldf\_eiv} 
     465is set in the global configurations with \key{traldf\_c2d}, a horizontally varying $A_e$ is 
     466instead set from the Held-Larichev parameterisation\footnote{In this 
     467  case, $A_e$ at low latitudes $|\theta|<20^{\circ}$ is further 
     468  reduced by a factor $|f/f_{20}|$, where $f_{20}$ is the value of $f$ 
     469  at $20^{\circ}$~N} (\mdl{ldfeiv}) and \np{rn\_aeiv\_0} is ignored 
     470unless it is zero. 
     471} 
    442472 
    443473When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined),  
     
    471501 
    472502 
    473  
     503\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_MISC.tex

    r5118 r7351  
    1 % ================================================================ 
    2 % Chapter � Miscellaneous Topics 
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
     3% ================================================================ 
     4% Chapter ——— Miscellaneous Topics 
    35% ================================================================ 
    46\chapter{Miscellaneous Topics} 
     
    3436has been made to set them in a generic way. However, examples of how  
    3537they can be set up is given in the ORCA 2\deg and 0.5\deg configurations. For example,  
    36 for details of implementation in ORCA2, search: 
    37 \vspace{-10pt}   
    38 \begin{alltt}   
    39 \tiny     
    40 \begin{verbatim} 
    41 IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) 
    42 \end{verbatim}   
    43 \end{alltt} 
     38for details of implementation in ORCA2, search:  
     39\texttt{ IF( cp\_cfg == "orca" .AND. jp\_cfg == 2 ) } 
    4440 
    4541% ------------------------------------------------------------------------------------------------------------- 
     
    6662%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    6763\begin{figure}[!tbp]     \begin{center} 
    68 \includegraphics[width=0.80\textwidth]{./TexFiles/Figures/Fig_Gibraltar.pdf} 
    69 \includegraphics[width=0.80\textwidth]{./TexFiles/Figures/Fig_Gibraltar2.pdf} 
     64\includegraphics[width=0.80\textwidth]{Fig_Gibraltar} 
     65\includegraphics[width=0.80\textwidth]{Fig_Gibraltar2} 
    7066\caption{   \label{Fig_MISC_strait_hand}  
    71 Example of the Gibraltar strait defined in a $1\deg \times 1\deg$ mesh.  
     67Example of the Gibraltar strait defined in a $1^{\circ} \times 1^{\circ}$ mesh.  
    7268\textit{Top}: using partially open cells. The meridional scale factor at $v$-point  
    7369is reduced on both sides of the strait to account for the real width of the strait  
     
    8076%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    8177 
    82 % ------------------------------------------------------------------------------------------------------------- 
    83 % Cross Land Advection  
    84 % ------------------------------------------------------------------------------------------------------------- 
    85 \subsection{Cross Land Advection (\mdl{tracla})} 
    86 \label{MISC_strait_cla} 
    87 %--------------------------------------------namcla-------------------------------------------------------- 
    88 \namdisplay{namcla}  
    89 %-------------------------------------------------------------------------------------------------------------- 
    90  
    91 \colorbox{yellow}{Add a short description of CLA staff here or in lateral boundary condition chapter?} 
    92 Options are defined through the  \ngn{namcla} namelist variables. 
    93  
    94 %The problem is resolved here by allowing the mixing of tracers and mass/volume between non-adjacent water columns at nominated regions within the model. Momentum is not mixed. The scheme conserves total tracer content, and total volume (the latter in $z*$- or $s*$-coordinate), and maintains compatibility between the tracer and mass/volume budgets.   
    9578 
    9679% ================================================================ 
     
    200183%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    201184\begin{figure}[!ht]    \begin{center} 
    202 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_LBC_zoom.pdf} 
     185\includegraphics[width=0.90\textwidth]{Fig_LBC_zoom} 
    203186\caption{   \label{Fig_LBC_zoom} 
    204187Position of a model domain compared to the data input domain when the zoom functionality is used.} 
    205188\end{center}   \end{figure} 
    206189%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    207  
    208  
    209 % ================================================================ 
    210 % Accelerating the Convergence  
    211 % ================================================================ 
    212 \section{Accelerating the Convergence (\np{nn\_acc} = 1)} 
    213 \label{MISC_acc} 
    214 %--------------------------------------------namdom------------------------------------------------------- 
    215 \namdisplay{namdom}  
    216 %-------------------------------------------------------------------------------------------------------------- 
    217  
    218 Searching an equilibrium state with an global ocean model requires a very long time  
    219 integration period (a few thousand years for a global model). Due to the size of  
    220 the time step required for numerical stability (less than a few hours),  
    221 this usually requires a large elapsed time. In order to overcome this problem,  
    222 \citet{Bryan1984} introduces a technique that is intended to accelerate  
    223 the spin up to equilibrium. It uses a larger time step in  
    224 the tracer evolution equations than in the momentum evolution  
    225 equations. It does not affect the equilibrium solution but modifies the  
    226 trajectory to reach it. 
    227  
    228 Options are defined through the  \ngn{namdom} namelist variables. 
    229 The acceleration of convergence option is used when \np{nn\_acc}=1. In that case,  
    230 $\rdt=rn\_rdt$ is the time step of dynamics while $\widetilde{\rdt}=rdttra$ is the  
    231 tracer time-step. the former is set from the \np{rn\_rdt} namelist parameter while the latter 
    232 is computed using a hyperbolic tangent profile and the following namelist parameters :  
    233 \np{rn\_rdtmin}, \np{rn\_rdtmax} and \np{rn\_rdth}. Those three parameters correspond  
    234 to the surface value the deep ocean value and the depth at which the transition occurs, respectively.  
    235 The set of prognostic equations to solve becomes: 
    236 \begin{equation} \label{Eq_acc} 
    237 \begin{split} 
    238 \frac{\partial \textbf{U}_h }{\partial t}  
    239    &\equiv \frac{\textbf{U}_h ^{t+1}-\textbf{U}_h^{t-1} }{2\rdt} = \ldots \\  
    240 \frac{\partial T}{\partial t} &\equiv \frac{T^{t+1}-T^{t-1}}{2 \widetilde{\rdt}} = \ldots \\  
    241 \frac{\partial S}{\partial t} &\equiv \frac{S^{t+1} -S^{t-1}}{2 \widetilde{\rdt}} = \ldots \\  
    242 \end{split} 
    243 \end{equation} 
    244  
    245 \citet{Bryan1984} has examined the consequences of this distorted physics.  
    246 Free waves have a slower phase speed, their meridional structure is slightly  
    247 modified, and the growth rate of baroclinically unstable waves is reduced  
    248 but with a wider range of instability. This technique is efficient for  
    249 searching for an equilibrium state in coarse resolution models. However its  
    250 application is not suitable for many oceanic problems: it cannot be used for  
    251 transient or time evolving problems (in particular, it is very questionable  
    252 to use this technique when there is a seasonal cycle in the forcing fields),  
    253 and it cannot be used in high-resolution models where baroclinically  
    254 unstable processes are important. Moreover, the vertical variation of  
    255 $\widetilde{ \rdt}$ implies that the heat and salt contents are no longer  
    256 conserved due to the vertical coupling of the ocean level through both  
    257 advection and diffusion. Therefore \np{rn\_rdtmin} = \np{rn\_rdtmax} should be 
    258 a more clever choice. 
    259190 
    260191 
     
    370301the source of differences between mono and multi processor runs. 
    371302 
    372 3- \key{esopa} (to be rename key\_nemo) : which is another option for model  
    373 management. When defined, this key forces the activation of all options and  
    374 CPP keys. For example, all tracer and momentum advection schemes are called!  
    375 Therefore the model results have no physical meaning.  
    376 However, this option forces both the compiler and the model to run through  
    377 all the \textsc{Fortran} lines of the model. This allows the user to check for obvious  
    378 compilation or execution errors with all CPP options, and errors in namelist options. 
    379  
    380 4- last digit comparison (\np{nn\_bit\_cmp}). In an MPP simulation, the computation of  
     303%%gm   to be removed both here and in the code 
     3043- last digit comparison (\np{nn\_bit\_cmp}). In an MPP simulation, the computation of  
    381305a sum over the whole domain is performed as the summation over all processors of  
    382306each of their sums over their interior domains. This double sum never gives exactly  
     
    386310%THIS is to be updated with the mpp_sum_glo  introduced in v3.3 
    387311% nn_bit_cmp  today only check that the nn_cla = 0 (no cross land advection) 
     312%%gm end 
    388313 
    389314$\bullet$  Benchmark (\np{nn\_bench}). This option defines a benchmark run based on  
     
    393318or the physical parameterisations.  
    394319 
    395  
    396 % ================================================================ 
    397 % Elliptic solvers (SOL) 
    398 % ================================================================ 
    399 \section{Elliptic solvers (SOL)} 
    400 \label{MISC_sol} 
    401 %--------------------------------------------namdom------------------------------------------------------- 
    402 \namdisplay{namsol}  
    403 %-------------------------------------------------------------------------------------------------------------- 
    404  
    405 When the filtered sea surface height option is used, the surface pressure gradient is  
    406 computed in \mdl{dynspg\_flt}. The force added in the momentum equation is solved implicitely. 
    407 It is thus solution of an elliptic equation \eqref{Eq_PE_flt} for which two solvers are available:  
    408 a Successive-Over-Relaxation scheme (SOR) and a preconditioned conjugate gradient  
    409 scheme(PCG) \citep{Madec_al_OM88, Madec_PhD90}. The solver is selected trough the 
    410 the value of \np{nn\_solv}   \ngn{namsol} namelist variable.  
    411  
    412 The PCG is a very efficient method for solving elliptic equations on vector computers.  
    413 It is a fast and rather easy method to use; which are attractive features for a large  
    414 number of ocean situations (variable bottom topography, complex coastal geometry,  
    415 variable grid spacing, open or cyclic boundaries, etc ...). It does not require  
    416 a search for an optimal parameter as in the SOR method. However, the SOR has  
    417 been retained because it is a linear solver, which is a very useful property when  
    418 using the adjoint model of \NEMO. 
    419  
    420 At each time step, the time derivative of the sea surface height at time step $t+1$  
    421 (or equivalently the divergence of the \textit{after} barotropic transport) that appears  
    422 in the filtering forced is the solution of the elliptic equation obtained from the horizontal  
    423 divergence of the vertical summation of \eqref{Eq_PE_flt}.  
    424 Introducing the following coefficients: 
    425 \begin{equation}  \label{Eq_sol_matrix} 
    426 \begin{aligned} 
    427 &c_{i,j}^{NS}  &&= {2 \rdt }^2 \; \frac{H_v (i,j) \; e_{1v} (i,j)}{e_{2v}(i,j)}              \\ 
    428 &c_{i,j}^{EW} &&= {2 \rdt }^2 \; \frac{H_u (i,j) \; e_{2u} (i,j)}{e_{1u}(i,j)}            \\ 
    429 &b_{i,j} &&= \delta_i \left[ e_{2u}M_u \right] - \delta_j \left[ e_{1v}M_v \right]\ ,   \\ 
    430 \end{aligned} 
    431 \end{equation} 
    432 the resulting five-point finite difference equation is given by: 
    433 \begin{equation}  \label{Eq_solmat} 
    434 \begin{split} 
    435        c_{i+1,j}^{NS} D_{i+1,j}  + \;  c_{i,j+1}^{EW} D_{i,j+1}    
    436   +   c_{i,j}    ^{NS} D_{i-1,j}   + \;  c_{i,j}    ^{EW} D_{i,j-1}                                          &    \\ 
    437   -    \left(c_{i+1,j}^{NS} + c_{i,j+1}^{EW} + c_{i,j}^{NS} + c_{i,j}^{EW} \right)   D_{i,j}  &=  b_{i,j} 
    438 \end{split} 
    439 \end{equation} 
    440 \eqref{Eq_solmat} is a linear symmetric system of equations. All the elements of  
    441 the corresponding matrix \textbf{A} vanish except those of five diagonals. With  
    442 the natural ordering of the grid points (i.e. from west to east and from  
    443 south to north), the structure of \textbf{A} is block-tridiagonal with  
    444 tridiagonal or diagonal blocks. \textbf{A} is a positive-definite symmetric  
    445 matrix of size $(jpi \cdot jpj)^2$, and \textbf{B}, the right hand side of  
    446 \eqref{Eq_solmat}, is a vector. 
    447  
    448 Note that in the linear free surface case, the depth that appears in \eqref{Eq_sol_matrix} 
    449 does not vary with time, and thus the matrix can be computed once for all. In non-linear free surface  
    450 (\key{vvl} defined) the matrix have to be updated at each time step. 
    451  
    452 % ------------------------------------------------------------------------------------------------------------- 
    453 %       Successive Over Relaxation 
    454 % ------------------------------------------------------------------------------------------------------------- 
    455 \subsection{Successive Over Relaxation (\np{nn\_solv}=2, \mdl{solsor})} 
    456 \label{MISC_solsor} 
    457  
    458 Let us introduce the four cardinal coefficients:  
    459 \begin{align*} 
    460 a_{i,j}^S &= c_{i,j    }^{NS}/d_{i,j}     &\qquad  a_{i,j}^W &= c_{i,j}^{EW}/d_{i,j}       \\ 
    461 a_{i,j}^E &= c_{i,j+1}^{EW}/d_{i,j}    &\qquad   a_{i,j}^N &= c_{i+1,j}^{NS}/d_{i,j}    
    462 \end{align*} 
    463 where $d_{i,j} = c_{i,j}^{NS}+ c_{i+1,j}^{NS} + c_{i,j}^{EW} + c_{i,j+1}^{EW}$  
    464 (i.e. the diagonal of the matrix). \eqref{Eq_solmat} can be rewritten as: 
    465 \begin{equation}  \label{Eq_solmat_p} 
    466 \begin{split} 
    467 a_{i,j}^{N}  D_{i+1,j} +\,a_{i,j}^{E}  D_{i,j+1} +\, a_{i,j}^{S}  D_{i-1,j} +\,a_{i,j}^{W} D_{i,j-1}  -  D_{i,j} = \tilde{b}_{i,j} 
    468 \end{split} 
    469 \end{equation} 
    470 with $\tilde b_{i,j} = b_{i,j}/d_{i,j}$. \eqref{Eq_solmat_p} is the equation actually solved  
    471 with the SOR method. This method used is an iterative one. Its algorithm can be  
    472 summarised as follows (see \citet{Haltiner1980} for a further discussion): 
    473  
    474 initialisation (evaluate a first guess from previous time step computations) 
    475 \begin{equation} 
    476 D_{i,j}^0 = 2 \, D_{i,j}^t - D_{i,j}^{t-1} 
    477 \end{equation} 
    478 iteration $n$, from $n=0$ until convergence, do : 
    479 \begin{equation} \label{Eq_sor_algo} 
    480 \begin{split} 
    481 R_{i,j}^n  = &a_{i,j}^{N} D_{i+1,j}^n       +\,a_{i,j}^{E}  D_{i,j+1} ^n          
    482          +\, a_{i,j}^{S}  D_{i-1,j} ^{n+1}+\,a_{i,j}^{W} D_{i,j-1} ^{n+1} 
    483                  -  D_{i,j}^n - \tilde{b}_{i,j}                                           \\ 
    484 D_{i,j} ^{n+1}  = &D_{i,j} ^{n}   + \omega \;R_{i,j}^n      
    485 \end{split} 
    486 \end{equation} 
    487 where \textit{$\omega $ }satisfies $1\leq \omega \leq 2$. An optimal value exists for  
    488 \textit{$\omega$} which significantly accelerates the convergence, but it has to be  
    489 adjusted empirically for each model domain (except for a uniform grid where an  
    490 analytical expression for \textit{$\omega$} can be found \citep{Richtmyer1967}).  
    491 The value of $\omega$ is set using \np{rn\_sor}, a \textbf{namelist} parameter.  
    492 The convergence test is of the form: 
    493 \begin{equation} 
    494 \delta = \frac{\sum\limits_{i,j}{R_{i,j}^n}{R_{i,j}^n}} 
    495                     {\sum\limits_{i,j}{ \tilde{b}_{i,j}^n}{\tilde{b}_{i,j}^n}} \leq \epsilon 
    496 \end{equation} 
    497 where $\epsilon$ is the absolute precision that is required. It is recommended  
    498 that a value smaller or equal to $10^{-6}$ is used for $\epsilon$ since larger  
    499 values may lead to numerically induced basin scale barotropic oscillations.  
    500 The precision is specified by setting \np{rn\_eps} (\textbf{namelist} parameter).  
    501 In addition, two other tests are used to halt the iterative algorithm. They involve  
    502 the number of iterations and the modulus of the right hand side. If the former  
    503 exceeds a specified value, \np{nn\_max} (\textbf{namelist} parameter),  
    504 or the latter is greater than $10^{15}$, the whole model computation is stopped  
    505 and the last computed time step fields are saved in a abort.nc NetCDF file.  
    506 In both cases, this usually indicates that there is something wrong in the model  
    507 configuration (an error in the mesh, the initial state, the input forcing,  
    508 or the magnitude of the time step or of the mixing coefficients). A typical value of  
    509 $nn\_max$ is a few hundred when $\epsilon = 10^{-6}$, increasing to a few  
    510 thousand when $\epsilon = 10^{-12}$. 
    511 The vectorization of the SOR algorithm is not straightforward. The scheme 
    512 contains two linear recurrences on $i$ and $j$. This inhibits the vectorisation.  
    513 \eqref{Eq_sor_algo} can be been rewritten as: 
    514 \begin{equation}  
    515 \begin{split} 
    516 R_{i,j}^n 
    517 = &a_{i,j}^{N}  D_{i+1,j}^n +\,a_{i,j}^{E}  D_{i,j+1} ^n 
    518  +\,a_{i,j}^{S}  D_{i-1,j} ^{n}+\,_{i,j}^{W} D_{i,j-1} ^{n} -  D_{i,j}^n - \tilde{b}_{i,j}      \\ 
    519 R_{i,j}^n = &R_{i,j}^n - \omega \;a_{i,j}^{S}\; R_{i,j-1}^n                                             \\ 
    520 R_{i,j}^n = &R_{i,j}^n - \omega \;a_{i,j}^{W}\; R_{i-1,j}^n 
    521 \end{split} 
    522 \end{equation} 
    523 This technique slightly increases the number of iteration required to reach the convergence, 
    524 but this is largely compensated by the gain obtained by the suppression of the recurrences. 
    525  
    526 Another technique have been chosen, the so-called red-black SOR. It consist in solving successively  
    527 \eqref{Eq_sor_algo} for odd and even grid points. It also slightly reduced the convergence rate 
    528 but allows the vectorisation. In addition, and this is the reason why it has been chosen, it is able to handle the north fold boundary condition used in ORCA configuration ($i.e.$ tri-polar global ocean mesh). 
    529  
    530 The SOR method is very flexible and can be used under a wide range of conditions,  
    531 including irregular boundaries, interior boundary points, etc. Proofs of convergence, etc.  
    532 may be found in the standard numerical methods texts for partial differential equations. 
    533  
    534 % ------------------------------------------------------------------------------------------------------------- 
    535 %       Preconditioned Conjugate Gradient 
    536 % ------------------------------------------------------------------------------------------------------------- 
    537 \subsection{Preconditioned Conjugate Gradient  (\np{nn\_solv}=1, \mdl{solpcg}) } 
    538 \label{MISC_solpcg} 
    539  
    540 \textbf{A} is a definite positive symmetric matrix, thus solving the linear  
    541 system \eqref{Eq_solmat} is equivalent to the minimisation of a quadratic  
    542 functional: 
    543 \begin{equation*} 
    544 \textbf{Ax} = \textbf{b} \leftrightarrow \textbf{x} =\text{inf}_{y} \,\phi (\textbf{y}) 
    545 \quad , \qquad 
    546 \phi (\textbf{y}) = 1/2 \langle \textbf{Ay},\textbf{y}\rangle - \langle \textbf{b},\textbf{y} \rangle  
    547 \end{equation*} 
    548 where $\langle , \rangle$ is the canonical dot product. The idea of the  
    549 conjugate gradient method is to search for the solution in the following  
    550 iterative way: assuming that $\textbf{x}^n$ has been obtained, $\textbf{x}^{n+1}$  
    551 is found from $\textbf {x}^{n+1}={\textbf {x}}^n+\alpha^n{\textbf {d}}^n$ which satisfies: 
    552 \begin{equation*} 
    553 {\textbf{ x}}^{n+1}=\text{inf} _{{\textbf{ y}}={\textbf{ x}}^n+\alpha^n \,{\textbf{ d}}^n} \,\phi ({\textbf{ y}})\;\;\Leftrightarrow \;\;\frac{d\phi }{d\alpha}=0 
    554 \end{equation*} 
    555 and expressing $\phi (\textbf{y})$ as a function of \textit{$\alpha $}, we obtain the  
    556 value that minimises the functional:  
    557 \begin{equation*} 
    558 \alpha ^n = \langle{ \textbf{r}^n , \textbf{r}^n} \rangle  / \langle {\textbf{ A d}^n, \textbf{d}^n} \rangle 
    559 \end{equation*} 
    560 where $\textbf{r}^n = \textbf{b}-\textbf{A x}^n = \textbf{A} (\textbf{x}-\textbf{x}^n)$  
    561 is the error at rank $n$. The descent vector $\textbf{d}^n$ s chosen to be dependent  
    562 on the error: $\textbf{d}^n = \textbf{r}^n + \beta^n \,\textbf{d}^{n-1}$. $\beta ^n$  
    563 is searched such that the descent vectors form an orthogonal basis for the dot  
    564 product linked to \textbf{A}. Expressing the condition  
    565 $\langle \textbf{A d}^n, \textbf{d}^{n-1} \rangle = 0$ the value of $\beta ^n$ is found: 
    566  $\beta ^n = \langle{ \textbf{r}^n , \textbf{r}^n} \rangle  / \langle {\textbf{r}^{n-1}, \textbf{r}^{n-1}} \rangle$.  
    567  As a result, the errors $ \textbf{r}^n$ form an orthogonal  
    568 base for the canonic dot product while the descent vectors $\textbf{d}^n$ form  
    569 an orthogonal base for the dot product linked to \textbf{A}. The resulting  
    570 algorithm is thus the following one: 
    571  
    572 initialisation : 
    573 \begin{equation*}  
    574 \begin{split} 
    575 \textbf{x}^0 &= D_{i,j}^0   = 2 D_{i,j}^t - D_{i,j}^{t-1}       \quad, \text{the initial guess }     \\ 
    576 \textbf{r}^0 &= \textbf{d}^0 = \textbf{b} - \textbf{A x}^0       \\ 
    577 \gamma_0 &= \langle{ \textbf{r}^0 , \textbf{r}^0} \rangle 
    578 \end{split} 
    579 \end{equation*} 
    580  
    581 iteration $n,$ from $n=0$ until convergence, do : 
    582 \begin{equation}  
    583 \begin{split} 
    584 \text{z}^n& = \textbf{A d}^n \\ 
    585 \alpha_n &= \gamma_n /  \langle{ \textbf{z}^n , \textbf{d}^n} \rangle \\ 
    586 \textbf{x}^{n+1} &= \textbf{x}^n + \alpha_n \,\textbf{d}^n \\ 
    587 \textbf{r}^{n+1} &= \textbf{r}^n - \alpha_n \,\textbf{z}^n \\ 
    588 \gamma_{n+1} &= \langle{ \textbf{r}^{n+1} , \textbf{r}^{n+1}} \rangle \\ 
    589 \beta_{n+1} &= \gamma_{n+1}/\gamma_{n}  \\ 
    590 \textbf{d}^{n+1} &= \textbf{r}^{n+1} + \beta_{n+1}\; \textbf{d}^{n}\\ 
    591 \end{split} 
    592 \end{equation} 
    593  
    594  
    595 The convergence test is: 
    596 \begin{equation} 
    597 \delta = \gamma_{n}\; / \langle{ \textbf{b} , \textbf{b}} \rangle \leq \epsilon 
    598 \end{equation} 
    599 where $\epsilon $ is the absolute precision that is required. As for the SOR algorithm,  
    600 the whole model computation is stopped when the number of iterations, \np{nn\_max}, or  
    601 the modulus of the right hand side of the convergence equation exceeds a  
    602 specified value (see \S\ref{MISC_solsor} for a further discussion). The required  
    603 precision and the maximum number of iterations allowed are specified by setting  
    604 \np{rn\_eps} and \np{nn\_max} (\textbf{namelist} parameters). 
    605  
    606 It can be demonstrated that the above algorithm is optimal, provides the exact  
    607 solution in a number of iterations equal to the size of the matrix, and that  
    608 the convergence rate is faster as the matrix is closer to the identity matrix, 
    609 $i.e.$ its eigenvalues are closer to 1. Therefore, it is more efficient to solve  
    610 a better conditioned system which has the same solution. For that purpose,  
    611 we introduce a preconditioning matrix \textbf{Q} which is an approximation  
    612 of \textbf{A} but much easier to invert than \textbf{A}, and solve the system: 
    613 \begin{equation} \label{Eq_pmat} 
    614 \textbf{Q}^{-1} \textbf{A x} = \textbf{Q}^{-1} \textbf{b} 
    615 \end{equation} 
    616  
    617 The same algorithm can be used to solve \eqref{Eq_pmat} if instead of the  
    618 canonical dot product the following one is used:  
    619 ${\langle{ \textbf{a} , \textbf{b}} \rangle}_Q = \langle{ \textbf{a} , \textbf{Q b}} \rangle$, and  
    620 if $\textbf{\~{b}} = \textbf{Q}^{-1}\;\textbf{b}$ and $\textbf{\~{A}} = \textbf{Q}^{-1}\;\textbf{A}$  
    621 are substituted to \textbf{b} and \textbf{A} \citep{Madec_al_OM88}.  
    622 In \NEMO, \textbf{Q} is chosen as the diagonal of \textbf{ A}, i.e. the simplest form for  
    623 \textbf{Q} so that it can be easily inverted. In this case, the discrete formulation of  
    624 \eqref{Eq_pmat} is in fact given by \eqref{Eq_solmat_p} and thus the matrix and  
    625 right hand side are computed independently from the solver used. 
    626  
    627 % ================================================================ 
    628  
    629  
    630  
    631  
    632  
    633  
    634  
    635  
    636  
    637  
    638  
    639  
     320% ================================================================ 
     321\end{document} 
     322 
     323 
     324 
     325 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_Model_Basics.tex

    r3294 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter 1 Ñ Model Basics 
     
    114116%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    115117\begin{figure}[!ht]   \begin{center} 
    116 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_I_ocean_bc.pdf} 
     118\includegraphics[width=0.90\textwidth]{Fig_I_ocean_bc} 
    117119\caption{    \label{Fig_ocean_bc}  
    118120The ocean is bounded by two surfaces, $z=-H(i,j)$ and $z=\eta(i,j,t)$, where $H$  
     
    247249sufficient to solve a linearized version of (\ref{Eq_PE_ssh}), which still allows  
    248250to take into account freshwater fluxes applied at the ocean surface \citep{Roullet_Madec_JGR00}. 
     251Nevertheless, with the linearization, an exact conservation of heat and salt contents is lost. 
    249252 
    250253The filtering of EGWs in models with a free surface is usually a matter of discretisation  
    251 of the temporal derivatives, using the time splitting method \citep{Killworth_al_JPO91, Zhang_Endoh_JGR92}  
    252 or the implicit scheme \citep{Dukowicz1994}. In \NEMO, we use a slightly different approach  
    253 developed by \citet{Roullet_Madec_JGR00}: the damping of EGWs is ensured by introducing an  
    254 additional force in the momentum equation. \eqref{Eq_PE_dyn} becomes:  
    255 \begin{equation} \label{Eq_PE_flt} 
    256 \frac{\partial {\rm {\bf U}}_h }{\partial t}= {\rm {\bf M}} 
    257 - g \nabla \left( \tilde{\rho} \ \eta \right)  
    258 - g \ T_c \nabla \left( \widetilde{\rho} \ \partial_t \eta \right)  
    259 \end{equation} 
    260 where $T_c$, is a parameter with dimensions of time which characterizes the force,  
    261 $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, and $\rm {\bf M}$  
    262 represents the collected contributions of the Coriolis, hydrostatic pressure gradient,  
    263 non-linear and viscous terms in \eqref{Eq_PE_dyn}. 
    264  
    265 The new force can be interpreted as a diffusion of vertically integrated volume flux divergence.  
    266 The time evolution of $D$ is thus governed by a balance of two terms, $-g$ \textbf{A} $\eta$  
    267 and $g \, T_c \,$ \textbf{A} $D$, associated with a propagative regime and a diffusive regime  
    268 in the temporal spectrum, respectively. In the diffusive regime, the EGWs no longer propagate,  
    269 $i.e.$ they are stationary and damped. The diffusion regime applies to the modes shorter than  
    270 $T_c$. For longer ones, the diffusion term vanishes. Hence, the temporally unresolved EGWs  
    271 can be damped by choosing $T_c > \rdt$. \citet{Roullet_Madec_JGR00} demonstrate that  
    272 (\ref{Eq_PE_flt}) can be integrated with a leap frog scheme except the additional term which  
    273 has to be computed implicitly. This is not surprising since the use of a large time step has a  
    274 necessarily numerical cost. Two gains arise in comparison with the previous formulations.  
    275 Firstly, the damping of EGWs can be quantified through the magnitude of the additional term.  
    276 Secondly, the numerical scheme does not need any tuning. Numerical stability is ensured as  
    277 soon as $T_c > \rdt$. 
    278  
    279 When the variations of free surface elevation are small compared to the thickness of the first  
    280 model layer, the free surface equation (\ref{Eq_PE_ssh}) can be linearized. As emphasized  
    281 by \citet{Roullet_Madec_JGR00} the linearization of (\ref{Eq_PE_ssh}) has consequences on the  
    282 conservation of salt in the model. With the nonlinear free surface equation, the time evolution  
    283 of the total salt content is  
    284 \begin{equation} \label{Eq_PE_salt_content} 
    285     \frac{\partial }{\partial t}\int\limits_{D\eta } {S\;dv}  
    286                         =\int\limits_S {S\;(-\frac{\partial \eta }{\partial t}-D+P-E)\;ds} 
    287 \end{equation} 
    288 where $S$ is the salinity, and the total salt is integrated over the whole ocean volume  
    289 $D_\eta$ bounded by the time-dependent free surface. The right hand side (which is an  
    290 integral over the free surface) vanishes when the nonlinear equation (\ref{Eq_PE_ssh})  
    291 is satisfied, so that the salt is perfectly conserved. When the free surface equation is  
    292 linearized, \citet{Roullet_Madec_JGR00} show that the total salt content integrated in the fixed  
    293 volume $D$ (bounded by the surface $z=0$) is no longer conserved: 
    294 \begin{equation} \label{Eq_PE_salt_content_linear} 
    295          \frac{\partial }{\partial t}\int\limits_D {S\;dv}  
    296                = - \int\limits_S {S\;\frac{\partial \eta }{\partial t}ds}  
    297 \end{equation} 
    298  
    299 The right hand side of (\ref{Eq_PE_salt_content_linear}) is small in equilibrium solutions  
    300 \citep{Roullet_Madec_JGR00}. It can be significant when the freshwater forcing is not balanced and  
    301 the globally averaged free surface is drifting. An increase in sea surface height \textit{$\eta $}  
    302 results in a decrease of the salinity in the fixed volume $D$. Even in that case though,  
    303 the total salt integrated in the variable volume $D_{\eta}$ varies much less, since  
    304 (\ref{Eq_PE_salt_content_linear}) can be rewritten as  
    305 \begin{equation} \label{Eq_PE_salt_content_corrected} 
    306 \frac{\partial }{\partial t}\int\limits_{D\eta } {S\;dv}  
    307 =\frac{\partial}{\partial t} \left[ \;{\int\limits_D {S\;dv} +\int\limits_S {S\eta \;ds} } \right] 
    308 =\int\limits_S {\eta \;\frac{\partial S}{\partial t}ds} 
    309 \end{equation} 
    310  
    311 Although the total salt content is not exactly conserved with the linearized free surface,  
    312 its variations are driven by correlations of the time variation of surface salinity with the  
    313 sea surface height, which is a negligible term. This situation contrasts with the case of  
    314 the rigid lid approximation in which case freshwater forcing is represented by a virtual  
    315 salt flux, leading to a spurious source of salt at the ocean surface  
    316 \citep{Huang_JPO93, Roullet_Madec_JGR00}. 
    317  
    318 \newpage 
    319 $\ $\newline    % force a new ligne 
     254of the temporal derivatives, using a split-explicit method \citep{Killworth_al_JPO91, Zhang_Endoh_JGR92}  
     255or the implicit scheme \citep{Dukowicz1994} or the addition of a filtering force in the momentum equation  
     256\citep{Roullet_Madec_JGR00}. With the present release, \NEMO offers the choice between  
     257an explicit free surface (see \S\ref{DYN_spg_exp}) or a split-explicit scheme strongly  
     258inspired the one proposed by \citet{Shchepetkin_McWilliams_OM05} (see \S\ref{DYN_spg_ts}). 
     259 
     260%\newpage 
     261%$\ $\newline    % force a new line 
    320262 
    321263% ================================================================ 
     
    372314%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    373315\begin{figure}[!tb]   \begin{center} 
    374 \includegraphics[width=0.60\textwidth]{./TexFiles/Figures/Fig_I_earth_referential.pdf} 
     316\includegraphics[width=0.60\textwidth]{Fig_I_earth_referential} 
    375317\caption{   \label{Fig_referential}  
    376318the geographical coordinate system $(\lambda,\varphi,z)$ and the curvilinear  
     
    655597the surface pressure, is given by: 
    656598\begin{equation} \label{Eq_PE_spg} 
    657 p_s = \left\{ \begin{split}  
    658 \rho \,g \,\eta &                                 \qquad  \qquad  \;   \qquad \text{ standard free surface} \\  
    659 \rho \,g \,\eta &+ \rho_o \,\mu \,\frac{\partial \eta }{\partial t}      \qquad \text{ filtered     free surface}     
    660 \end{split}  
    661 \right. 
     599p_s =  \rho \,g \,\eta  
    662600\end{equation} 
    663601with $\eta$ is solution of \eqref{Eq_PE_ssh} 
     
    773711\end{equation} 
    774712 
    775 The equations solved by the ocean model \eqref{Eq_PE} in $s-$coordinate can be written as follows: 
     713The equations solved by the ocean model \eqref{Eq_PE} in $s-$coordinate can be written as follows (see Appendix~\ref{Apdx_A_momentum}): 
    776714 
    777715 \vspace{0.5cm} 
    778 * momentum equation: 
     716$\bullet$ Vector invariant form of the momentum equation : 
    779717\begin{multline} \label{Eq_PE_sco_u} 
    780 \frac{1}{e_3} \frac{\partial \left(  e_3\,u  \right) }{\partial t}= 
     718\frac{\partial  u  }{\partial t}= 
    781719   +   \left( {\zeta +f} \right)\,v                                     
    782720   -   \frac{1}{2\,e_1} \frac{\partial}{\partial i} \left(  u^2+v^2   \right)  
     
    787725\end{multline} 
    788726\begin{multline} \label{Eq_PE_sco_v} 
    789 \frac{1}{e_3} \frac{\partial \left(  e_3\,v  \right) }{\partial t}= 
     727\frac{\partial v }{\partial t}= 
    790728   -   \left( {\zeta +f} \right)\,u    
    791729   -   \frac{1}{2\,e_2 }\frac{\partial }{\partial j}\left(  u^2+v^2  \right)         
     
    795733   +  D_v^{\vect{U}}  +   F_v^{\vect{U}} \quad 
    796734\end{multline} 
     735 
     736 \vspace{0.5cm} 
     737$\bullet$ Vector invariant form of the momentum equation : 
     738\begin{multline} \label{Eq_PE_sco_u} 
     739\frac{1}{e_3} \frac{\partial \left(  e_3\,u  \right) }{\partial t}= 
     740   +   \left( { f + \frac{1}{e_1 \; e_2 } 
     741               \left(    v \frac{\partial e_2}{\partial i} 
     742                  -u \frac{\partial e_1}{\partial j}  \right)}    \right) \, v    \\ 
     743   - \frac{1}{e_1 \; e_2 \; e_3 }   \left(  
     744               \frac{\partial \left( {e_2 \, e_3 \, u\,u} \right)}{\partial i} 
     745      +        \frac{\partial \left( {e_1 \, e_3 \, v\,u} \right)}{\partial j}   \right) 
     746   - \frac{1}{e_3 }\frac{\partial \left( { \omega\,u} \right)}{\partial k}    \\ 
     747   - \frac{1}{e_1} \frac{\partial}{\partial i} \left( \frac{p_s + p_h}{\rho _o}    \right)     
     748   +  g\frac{\rho }{\rho _o}\sigma _1  
     749   +   D_u^{\vect{U}}  +   F_u^{\vect{U}} \quad 
     750\end{multline} 
     751\begin{multline} \label{Eq_PE_sco_v} 
     752\frac{1}{e_3} \frac{\partial \left(  e_3\,v  \right) }{\partial t}= 
     753   -   \left( { f + \frac{1}{e_1 \; e_2} 
     754               \left(    v \frac{\partial e_2}{\partial i} 
     755                  -u \frac{\partial e_1}{\partial j}  \right)}    \right) \, u   \\ 
     756   - \frac{1}{e_1 \; e_2 \; e_3 }   \left(  
     757               \frac{\partial \left( {e_2 \; e_3  \,u\,v} \right)}{\partial i} 
     758      +        \frac{\partial \left( {e_1 \; e_3  \,v\,v} \right)}{\partial j}   \right) 
     759                 - \frac{1}{e_3 } \frac{\partial \left( { \omega\,v} \right)}{\partial k}    \\ 
     760   -   \frac{1}{e_2 }\frac{\partial }{\partial j}\left( \frac{p_s+p_h }{\rho _o}  \right)  
     761    +  g\frac{\rho }{\rho _o }\sigma _2    
     762   +  D_v^{\vect{U}}  +   F_v^{\vect{U}} \quad 
     763\end{multline} 
     764 
    797765where the relative vorticity, \textit{$\zeta $}, the surface pressure gradient, and the hydrostatic  
    798766pressure have the same expressions as in $z$-coordinates although they do not represent  
    799767exactly the same quantities. $\omega$ is provided by the continuity equation  
    800768(see Appendix~\ref{Apdx_A}): 
    801  
    802769\begin{equation} \label{Eq_PE_sco_continuity} 
    803770\frac{\partial e_3}{\partial t} + e_3 \; \chi + \frac{\partial \omega }{\partial s} = 0    
     
    809776 
    810777 \vspace{0.5cm} 
    811 * tracer equations: 
     778$\bullet$ tracer equations: 
    812779\begin{multline} \label{Eq_PE_sco_t} 
    813780\frac{1}{e_3} \frac{\partial \left(  e_3\,T  \right) }{\partial t}= 
     
    842809%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    843810\begin{figure}[!b]    \begin{center} 
    844 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_z_zstar.pdf} 
     811\includegraphics[width=1.0\textwidth]{Fig_z_zstar} 
    845812\caption{   \label{Fig_z_zstar}  
    846813(a) $z$-coordinate in linear free-surface case ;  
     
    1023990\label{PE_zco_tilde} 
    1024991 
    1025 The $\tilde{z}$-coordinate has been developed by \citet{Leclair_Madec_OM10s}. 
    1026 It is not available in the current version of \NEMO. 
     992The $\tilde{z}$-coordinate has been developed by \citet{Leclair_Madec_OM11}. 
     993It is available in \NEMO since the version 3.4. Nevertheless, it is currently not robust enough  
     994to be used in all possible configurations. Its use is therefore not recommended. 
     995 
    1027996 
    1028997\newpage  
     
    11461115 
    11471116All these parameterisations of subgrid scale physics have advantages and  
    1148 drawbacks. There are not all available in \NEMO. In the $z$-coordinate  
    1149 formulation, five options are offered for active tracers (temperature and  
    1150 salinity): second order geopotential operator, second order isoneutral  
    1151 operator, \citet{Gent1990} parameterisation, fourth order  
    1152 geopotential operator, and various slightly diffusive advection schemes.  
    1153 The same options are available for momentum, except  
    1154 \citet{Gent1990} parameterisation which only involves tracers. In the 
    1155 $s$-coordinate formulation, additional options are offered for tracers: second  
    1156 order operator acting along $s-$surfaces, and for momentum: fourth order  
    1157 operator acting along $s-$surfaces (see \S\ref{LDF}). 
    1158  
    1159 \subsubsection{Lateral second order tracer diffusive operator} 
    1160  
    1161 The lateral second order tracer diffusive operator is defined by (see Appendix~\ref{Apdx_B}): 
     1117drawbacks. There are not all available in \NEMO. For active tracers (temperature and  
     1118salinity) the main ones are: Laplacian and bilaplacian operators acting along  
     1119geopotential or iso-neutral surfaces, \citet{Gent1990} parameterisation,  
     1120and various slightly diffusive advection schemes.  
     1121For momentum, the main ones are: Laplacian and bilaplacian operators acting along  
     1122geopotential surfaces, and UBS advection schemes when flux form is chosen for the momentum advection. 
     1123 
     1124\subsubsection{Lateral Laplacian tracer diffusive operator} 
     1125 
     1126The lateral Laplacian tracer diffusive operator is defined by (see Appendix~\ref{Apdx_B}): 
    11621127\begin{equation} \label{Eq_PE_iso_tensor} 
    11631128D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad  
     
    11801145ocean (see Appendix~\ref{Apdx_B}). 
    11811146 
     1147For \textit{iso-level} diffusion, $r_1$ and $r_2 $ are zero. $\Re $ reduces to the identity  
     1148in the horizontal direction, no rotation is applied.  
     1149 
    11821150For \textit{geopotential} diffusion, $r_1$ and $r_2 $ are the slopes between the  
    1183 geopotential and computational surfaces: in $z$-coordinates they are zero  
    1184 ($r_1 = r_2 = 0$) while in $s$-coordinate (including $\textit{z*}$ case) they are  
    1185 equal to $\sigma _1$ and $\sigma _2$, respectively (see \eqref{Eq_PE_sco_slope} ). 
     1151geopotential and computational surfaces: they are equal to $\sigma _1$ and $\sigma _2$,  
     1152respectively (see \eqref{Eq_PE_sco_slope} ). 
    11861153 
    11871154For \textit{isoneutral} diffusion $r_1$ and $r_2$ are the slopes between the isoneutral  
     
    11891156but have similar expressions in $z$- and $s$-coordinates. In $z$-coordinates: 
    11901157\begin{equation} \label{Eq_PE_iso_slopes} 
    1191 r_1 =\frac{e_3 }{e_1 }  \left( {\frac{\partial \rho }{\partial i}} \right) 
    1192                   \left( {\frac{\partial \rho }{\partial k}} \right)^{-1} \ , \quad 
    1193 r_1 =\frac{e_3 }{e_1 }  \left( {\frac{\partial \rho }{\partial i}} \right) 
    1194                   \left( {\frac{\partial \rho }{\partial k}} \right)^{-1}, 
    1195 \end{equation} 
    1196 while in $s$-coordinates $\partial/\partial k$ is replaced by 
    1197 $\partial/\partial s$. 
     1158r_1 =\frac{e_3 }{e_1 }  \left( \pd[\rho]{i} \right) \left( \pd[\rho]{k} \right)^{-1} \, \quad 
     1159r_2 =\frac{e_3 }{e_2 }  \left( \pd[\rho]{j} \right) \left( \pd[\rho]{k} \right)^{-1} \, 
     1160\end{equation} 
     1161while in $s$-coordinates $\pd[]{k}$ is replaced by $\pd[]{s}$. 
    11981162 
    11991163\subsubsection{Eddy induced velocity} 
     
    12121176 w^\ast &=  -\frac{1}{e_1 e_2 }\left[  
    12131177                      \frac{\partial }{\partial i}\left( {A^{eiv}\;e_2\,\tilde{r}_1 } \right) 
    1214                     +\frac{\partial }{\partial j}\left( {A^{eiv}\;e_1\,\tilde{r}_2 } \right)      \right] 
     1178                     +\frac{\partial }{\partial j}\left( {A^{eiv}\;e_1\,\tilde{r}_2 } \right)      \right] 
    12151179   \end{split} 
    12161180\end{equation} 
     
    12211185\begin{align} \label{Eq_PE_slopes_eiv} 
    12221186\tilde{r}_n = \begin{cases} 
    1223    r_n                  &      \text{in $z$-coordinate}    \\ 
     1187   r_n            &      \text{in $z$-coordinate}    \\ 
    12241188   r_n + \sigma_n &      \text{in \textit{z*} and $s$-coordinates}   
    1225                    \end{cases} 
     1189              \end{cases} 
    12261190\quad \text{where } n=1,2 
    12271191\end{align} 
     
    12311195to zero in the vicinity of the boundaries. The latter strategy is used in \NEMO (cf. Chap.~\ref{LDF}). 
    12321196 
    1233 \subsubsection{Lateral fourth order tracer diffusive operator} 
    1234  
    1235 The lateral fourth order tracer diffusive operator is defined by: 
     1197\subsubsection{Lateral bilaplacian tracer diffusive operator} 
     1198 
     1199The lateral bilaplacian tracer diffusive operator is defined by: 
    12361200\begin{equation} \label{Eq_PE_bilapT} 
    1237 D^{lT}=\Delta \left( {A^{lT}\;\Delta T} \right)  
    1238 \qquad \text{where} \  D^{lT}=\Delta \left( {A^{lT}\;\Delta T} \right) 
     1201D^{lT}= - \Delta \left( \;\Delta T \right)  
     1202\qquad \text{where} \;\; \Delta \bullet = \nabla \left( {\sqrt{B^{lT}\,}\;\Re \;\nabla \bullet} \right) 
    12391203 \end{equation} 
    1240  
    1241 It is the second order operator given by \eqref{Eq_PE_iso_tensor} applied twice with  
    1242 the eddy diffusion coefficient correctly placed.  
    1243  
    1244  
    1245 \subsubsection{Lateral second order momentum diffusive operator} 
    1246  
    1247 The second order momentum diffusive operator along $z$- or $s$-surfaces is found by  
     1204It is the Laplacian operator given by \eqref{Eq_PE_iso_tensor} applied twice with  
     1205the harmonic eddy diffusion coefficient set to the square root of the biharmonic one.  
     1206 
     1207 
     1208\subsubsection{Lateral Laplacian momentum diffusive operator} 
     1209 
     1210The Laplacian momentum diffusive operator along $z$- or $s$-surfaces is found by  
    12481211applying \eqref{Eq_PE_lap_vector} to the horizontal velocity vector (see Appendix~\ref{Apdx_B}): 
    12491212\begin{equation} \label{Eq_PE_lapU} 
     
    12621225 
    12631226Such a formulation ensures a complete separation between the vorticity and  
    1264 horizontal divergence fields (see Appendix~\ref{Apdx_C}). Unfortunately, it is not  
    1265 available for geopotential diffusion in $s-$coordinates and for isoneutral  
    1266 diffusion in both $z$- and $s$-coordinates ($i.e.$ when a rotation is required).  
    1267 In these two cases, the $u$ and $v-$fields are considered as independent scalar  
    1268 fields, so that the diffusive operator is given by: 
     1227horizontal divergence fields (see Appendix~\ref{Apdx_C}).  
     1228Unfortunately, it is only available in \textit{iso-level} direction.  
     1229When a rotation is required ($i.e.$ geopotential diffusion in $s-$coordinates  
     1230or isoneutral diffusion in both $z$- and $s$-coordinates), the $u$ and $v-$fields  
     1231are considered as independent scalar fields, so that the diffusive operator is given by: 
    12691232\begin{equation} \label{Eq_PE_lapU_iso} 
    12701233\begin{split} 
    1271  D_u^{l{\rm {\bf U}}} &= \nabla .\left( {\Re \;\nabla u} \right) \\  
    1272  D_v^{l{\rm {\bf U}}} &= \nabla .\left( {\Re \;\nabla v} \right) 
     1234 D_u^{l{\rm {\bf U}}} &= \nabla .\left( {A^{lm} \;\Re \;\nabla u} \right) \\  
     1235 D_v^{l{\rm {\bf U}}} &= \nabla .\left( {A^{lm} \;\Re \;\nabla v} \right) 
    12731236 \end{split} 
    12741237 \end{equation} 
     
    12791242of the Equator in a geographical coordinate system \citep{Lengaigne_al_JGR03}. 
    12801243 
    1281 \subsubsection{lateral fourth order momentum diffusive operator} 
    1282  
    1283 As for tracers, the fourth order momentum diffusive operator along $z$ or $s$-surfaces  
    1284 is a re-entering second order operator \eqref{Eq_PE_lapU} or \eqref{Eq_PE_lapU}  
    1285 with the eddy viscosity coefficient correctly placed: 
    1286  
    1287 geopotential diffusion in $z$-coordinate: 
    1288 \begin{equation} \label{Eq_PE_bilapU} 
    1289 \begin{split} 
    1290 {\rm {\bf D}}^{l{\rm {\bf U}}} &=\nabla _h \left\{ {\;\nabla _h {\rm {\bf  
    1291 .}}\left[ {A^{lm}\,\nabla _h \left( \chi \right)} \right]\;}  
    1292 \right\}\;   \\ 
    1293 &+\nabla _h \times \left\{ {\;{\rm {\bf k}}\cdot \nabla \times  
    1294 \left[ {A^{lm}\,\nabla _h \times \left( {\zeta \;{\rm {\bf k}}} \right)}  
    1295 \right]\;} \right\} 
    1296 \end{split} 
    1297 \end{equation} 
    1298  
    1299 \gmcomment{  change the position of the coefficient, both here and in the code} 
    1300  
    1301 geopotential diffusion in $s$-coordinate: 
    1302 \begin{equation} \label{Eq_bilapU_iso} 
    1303    \left\{   \begin{aligned} 
    1304          D_u^{l{\rm {\bf U}}} =\Delta \left( {A^{lm}\;\Delta u} \right) \\  
    1305          D_v^{l{\rm {\bf U}}} =\Delta \left( {A^{lm}\;\Delta v} \right) 
    1306    \end{aligned}    \right. 
    1307    \quad \text{where} \quad  
    1308    \Delta \left( \bullet \right) = \nabla \cdot \left( \Re \nabla(\bullet) \right)  
    1309 \end{equation} 
    1310  
     1244\subsubsection{lateral bilaplacian momentum diffusive operator} 
     1245 
     1246As for tracers, the bilaplacian order momentum diffusive operator is a  
     1247re-entering Laplacian operator with the harmonic eddy diffusion coefficient  
     1248set to the square root of the biharmonic one. Nevertheless it is currently  
     1249not available in the iso-neutral case. 
     1250 
     1251\end{document} 
     1252 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_Model_Basics_zstar.tex

    r4147 r7351  
    1 % ================================================================ 
    2 % Chapter 1 � Model Basics 
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
     3% ================================================================ 
     4% Chapter 1 ——— Model Basics 
    35% ================================================================ 
    46% ================================================================ 
     
    121123%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
    122124\begin{figure}[!t]   \begin{center} 
    123 \includegraphics[width=0.90\textwidth]{./Figures/Fig_DYN_dynspg_ts.pdf} 
     125\includegraphics[width=0.90\textwidth]{Fig_DYN_dynspg_ts} 
    124126\caption{    \label{Fig_DYN_dynspg_ts} 
    125127Schematic of the split-explicit time stepping scheme for the barotropic and baroclinic modes,  
     
    256258 
    257259 
     260\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_OBS.tex

    r4245 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter observation operator (OBS) 
     
    1820location and nearest model timestep. The resulting data are saved in a ``feedback'' file (or 
    1921files). The code was originally developed for use with the NEMOVAR data assimilation code, but 
    20 can be used for validation or verification of model or any other data assimilation system. 
    21  
    22 The OBS code is called from \mdl{nemogcm.F90} for model initialisation and to calculate the model 
     22can be used for validation or verification of the model or with any other data assimilation system. 
     23 
     24The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model 
    2325equivalent values for observations on the 0th timestep. The code is then called again after 
    24 each timestep from \mdl{step.F90}. To build with the OBS code active \key{diaobs} must be 
    25 set. 
     26each timestep from \mdl{step}. The code is only activated if the namelist logical \np{ln\_diaobs} 
     27is set to true. 
    2628 
    2729For all data types a 2D horizontal  interpolator is needed to interpolate the model fields to 
     
    2931addition to provide model fields at the observation depths. Currently this only works in 
    3032z-level model configurations, but is being developed to work with a generalised vertical 
    31 coordinate system. Temperature data from moored buoys (TAO, TRITON, PIRATA) in the 
    32 ENACT/ENSEMBLES data-base are available as daily averaged quantities. For this type of 
    33 observation the observation operator will compare such observations to the model temperature 
    34 fields averaged over one day. The relevant observation type may be specified in the namelist 
    35 using \np{endailyavtypes}. Otherwise the model value from the nearest timestep to the 
     33coordinate system.  
     34 
     35Some profile observation types (e.g. tropical moored buoys) are made available as daily averaged quantities. 
     36The observation operator code can be set-up to calculated the equivalent daily average model temperature fields 
     37using the \np{nn\_profdavtypes} namelist array. Some SST observations are equivalent to a night-time 
     38average value and the observation operator code can calculate equivalent night-time average model SST fields by 
     39setting the namelist value \np{ln\_sstnight} to true. Otherwise the model value from the nearest timestep to the 
    3640observation time is used. 
    3741 
    3842The code is controlled by the namelist \textit{nam\_obs}. See the following sections for more 
    39 details on setting up the namelist.  
     43details on setting up the namelist. 
    4044 
    4145Section~\ref{OBS_example} introduces a test example of the observation operator code including 
     
    5963 
    6064\begin{enumerate} 
    61 \item Compile NEMO with \key{diaobs} set. 
    62  
    63 \item Download some ENSEMBLES EN3 data from  
    64 \href{http://www.hadobs.org}{http://www.hadobs.org}. Choose observations which are 
     65\item Compile NEMO. 
     66 
     67\item Download some EN4 data from  
     68\href{http://www.metoffice.gov.uk/hadobs}{http://www.metoffice.gov.uk/hadobs}. Choose observations which are 
    6569valid for the period of your test run because the observation operator compares 
    6670the model and observations for a matching date and time.  
    6771 
    68 \item Add the following to the NEMO namelist to run the observation 
    69 operator on this data. Set the \np{enactfiles} namelist variable to the 
    70 observation  file name: 
     72\item Compile the OBSTOOLS code using:  
     73\begin{verbatim} 
     74./maketools -n OBSTOOLS -m [ARCH]. 
     75\end{verbatim} 
     76 
     77\item Convert the EN4 data into feedback format:  
     78\begin{verbatim} 
     79enact2fb.exe profiles_01.nc EN.4.1.1.f.profiles.g10.YYYYMM.nc 
     80\end{verbatim} 
     81 
     82\item Include the following in the NEMO namelist to run the observation 
     83operator on this data: 
    7184\end{enumerate} 
    7285 
     
    7790Options are defined through the  \ngn{namobs} namelist variables. 
    7891The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity 
    79 profile observation operator code. The \np{ln\_ena} switch turns on the reading 
    80 of ENACT/ENSEMBLES type profile data. The filename or array of filenames are 
    81 specified using the \np{enactfiles} variable. The model grid points for a 
     92profile observation operator code. The filename or array of filenames are 
     93specified using the \np{cn\_profbfiles} variable. The model grid points for a 
    8294particular  observation latitude and longitude are found using the grid 
    8395searching part of the code. This can be expensive, particularly for large 
     
    92104A number of utilities are now provided to plot the feedback files, convert and 
    93105recombine the files. These are explained in more detail in section~\ref{OBS_obsutils}. 
     106Utilites to convert other input data formats into the feedback format are also  
     107described in section~\ref{OBS_obsutils}. 
    94108 
    95109\section{Technical details} 
     
    104118%------------------------------------------------------------------------------------------------------------- 
    105119 
    106 This name list uses the "feedback" type observation file input format for 
    107 profile, sea level anomaly and sea surface temperature data. All the 
     120The observation operator code uses the "feedback" observation file format for 
     121all data types. All the 
    108122observation files must be in NetCDF format. Some example headers (produced using 
    109123\mbox{\textit{ncdump~-h}}) for profile 
     
    732746%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    733747\begin{figure}      \begin{center} 
    734 \includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_ASM_obsdist_local} 
     748\includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_local} 
    735749\caption{      \label{fig:obslocal} 
    736750Example of the distribution of observations with the geographical distribution of observational data.}  
     
    759773%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    760774\begin{figure}     \begin{center} 
    761 \includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_ASM_obsdist_global} 
     775\includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_global} 
    762776\caption{      \label{fig:obsglobal} 
    763777Example of the distribution of observations with the round-robin distribution of observational data.} 
     
    13761390%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    13771391\begin{figure}     \begin{center} 
    1378 %\includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_main} 
    1379 \includegraphics[width=9cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_main} 
     1392%\includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_OBS_dataplot_main} 
     1393\includegraphics[width=9cm,angle=-90.]{Fig_OBS_dataplot_main} 
    13801394\caption{      \label{fig:obsdataplotmain} 
    13811395Main window of dataplot.} 
     
    13881402%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    13891403\begin{figure}     \begin{center} 
    1390 %\includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_prof} 
    1391 \includegraphics[width=7cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_prof} 
     1404%\includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_OBS_dataplot_prof} 
     1405\includegraphics[width=7cm,angle=-90.]{Fig_OBS_dataplot_prof} 
    13921406\caption{      \label{fig:obsdataplotprofile} 
    13931407Profile plot from dataplot produced by right clicking on a point in the main window.} 
     
    13981412 
    13991413 
     1414\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_SBC.tex

    r5120 r7351  
    1 % ================================================================ 
    2 % Chapter � Surface Boundary Condition (SBC, ISF, ICB)  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
     3% ================================================================ 
     4% Chapter —— Surface Boundary Condition (SBC, ISF, ICB)  
    35% ================================================================ 
    46\chapter{Surface Boundary Condition (SBC, ISF, ICB) } 
     
    1719   \item the two components of the surface ocean stress $\left( {\tau _u \;,\;\tau _v} \right)$ 
    1820   \item the incoming solar and non solar heat fluxes $\left( {Q_{ns} \;,\;Q_{sr} } \right)$ 
    19    \item the surface freshwater budget $\left( {\textit{emp},\;\textit{emp}_S } \right)$ 
     21   \item the surface freshwater budget $\left( {\textit{emp}} \right)$ 
     22   \item the surface salt flux associated with freezing/melting of seawater $\left( {\textit{sfx}} \right)$ 
    2023\end{itemize} 
    2124plus an optional field: 
     
    2730are controlled by namelist \ngn{namsbc} variables: an analytical formulation (\np{ln\_ana}~=~true),  
    2831a flux formulation (\np{ln\_flx}~=~true), a bulk formulae formulation (CORE  
    29 (\np{ln\_core}~=~true), CLIO (\np{ln\_clio}~=~true) or MFS 
     32(\np{ln\_blk\_core}~=~true), CLIO (\np{ln\_blk\_clio}~=~true) or MFS 
    3033\footnote { Note that MFS bulk formulae compute fluxes only for the ocean component} 
    31 (\np{ln\_mfs}~=~true) bulk formulae) and a coupled  
    32 formulation (exchanges with a atmospheric model via the OASIS coupler)  
    33 (\np{ln\_cpl}~=~true). When used, the atmospheric pressure forces both  
    34 ocean and ice dynamics (\np{ln\_apr\_dyn}~=~true). 
    35 The frequency at which the six or seven fields have to be updated is the \np{nn\_fsbc}  
    36 namelist parameter.  
     34(\np{ln\_blk\_mfs}~=~true) bulk formulae) and a coupled or mixed forced/coupled formulation  
     35(exchanges with a atmospheric model via the OASIS coupler) (\np{ln\_cpl} or \np{ln\_mixcpl}~=~true).  
     36When used ($i.e.$ \np{ln\_apr\_dyn}~=~true), the atmospheric pressure forces both ocean and ice dynamics. 
     37 
     38The frequency at which the forcing fields have to be updated is given by the \np{nn\_fsbc} namelist parameter.  
    3739When the fields are supplied from data files (flux and bulk formulations), the input fields  
    38 need not be supplied on the model grid.  Instead a file of coordinates and weights can  
     40need not be supplied on the model grid. Instead a file of coordinates and weights can  
    3941be supplied which maps the data from the supplied grid to the model points  
    4042(so called "Interpolation on the Fly", see \S\ref{SBC_iof}). 
     
    4244can be masked to avoid spurious results in proximity of the coasts  as large sea-land gradients characterize 
    4345most of the atmospheric variables. 
     46 
    4447In addition, the resulting fields can be further modified using several namelist options.  
    45 These options control  the rotation of vector components supplied relative to an east-north  
    46 coordinate system onto the local grid directions in the model; the addition of a surface  
    47 restoring term to observed SST and/or SSS (\np{ln\_ssr}~=~true); the modification of fluxes  
    48 below ice-covered areas (using observed ice-cover or a sea-ice model)  
    49 (\np{nn\_ice}~=~0,1, 2 or 3); the addition of river runoffs as surface freshwater  
    50 fluxes or lateral inflow (\np{ln\_rnf}~=~true); the addition of isf melting as lateral inflow (parameterisation)  
    51 (\np{nn\_isf}~=~2 or 3 and \np{ln\_isfcav}~=~false) or as surface flux at the land-ice ocean interface 
    52 (\np{nn\_isf}~=~1 or 4 and \np{ln\_isfcav}~=~true);  
    53 the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift (\np{nn\_fwb}~=~0,~1~or~2); the  
    54 transformation of the solar radiation (if provided as daily mean) into a diurnal  
    55 cycle (\np{ln\_dm2dc}~=~true); and a neutral drag coefficient can be read from an external wave  
    56 model (\np{ln\_cdgw}~=~true). The latter option is possible only in case core or mfs bulk formulas are selected. 
     48These options control  
     49\begin{itemize} 
     50\item the rotation of vector components supplied relative to an east-north  
     51coordinate system onto the local grid directions in the model ;  
     52\item the addition of a surface restoring term to observed SST and/or SSS (\np{ln\_ssr}~=~true) ;  
     53\item the modification of fluxes below ice-covered areas (using observed ice-cover or a sea-ice model) (\np{nn\_ice}~=~0,1, 2 or 3) ;  
     54\item the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln\_rnf}~=~true) ;  
     55\item the addition of isf melting as lateral inflow (parameterisation) or as fluxes applied at the land-ice ocean interface (\np{ln\_isf}) ;  
     56\item the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift (\np{nn\_fwb}~=~0,~1~or~2) ;  
     57\item the transformation of the solar radiation (if provided as daily mean) into a diurnal cycle (\np{ln\_dm2dc}~=~true) ;  
     58and a neutral drag coefficient can be read from an external wave model (\np{ln\_cdgw}~=~true).  
     59\end{itemize} 
     60The latter option is possible only in case core or mfs bulk formulas are selected. 
    5761 
    5862In this chapter, we first discuss where the surface boundary condition appears in the 
     
    7377 
    7478The surface ocean stress is the stress exerted by the wind and the sea-ice  
    75 on the ocean. The two components of stress are assumed to be interpolated  
    76 onto the ocean mesh, $i.e.$ resolved onto the model (\textbf{i},\textbf{j}) direction  
    77 at $u$- and $v$-points They are applied as a surface boundary condition of the  
    78 computation of the momentum vertical mixing trend (\mdl{dynzdf} module) : 
    79 \begin{equation} \label{Eq_sbc_dynzdf} 
    80 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1} 
    81     = \frac{1}{\rho _o} \binom{\tau _u}{\tau _v } 
    82 \end{equation} 
    83 where $(\tau _u ,\;\tau _v )=(utau,vtau)$ are the two components of the wind  
    84 stress vector in the $(\textbf{i},\textbf{j})$ coordinate system. 
     79on the ocean. It is applied in \mdl{dynzdf} module as a surface boundary condition of the  
     80computation of the momentum vertical mixing trend (see \eqref{Eq_dynzdf_sbc} in \S\ref{DYN_zdf}). 
     81As such, it has to be provided as a 2D vector interpolated  
     82onto the horizontal velocity ocean mesh, $i.e.$ resolved onto the model  
     83(\textbf{i},\textbf{j}) direction at $u$- and $v$-points. 
    8584 
    8685The surface heat flux is decomposed into two parts, a non solar and a solar heat  
    8786flux, $Q_{ns}$ and $Q_{sr}$, respectively. The former is the non penetrative part  
    88 of the heat flux ($i.e.$ the sum of sensible, latent and long wave heat fluxes).  
    89 It is applied as a surface boundary condition trend of the first level temperature  
    90 time evolution equation (\mdl{trasbc} module).  
    91 \begin{equation} \label{Eq_sbc_trasbc_q} 
    92 \frac{\partial T}{\partial t}\equiv \cdots \;+\;\left. {\frac{Q_{ns} }{\rho  
    93 _o \;C_p \;e_{3t} }} \right|_{k=1} \quad 
    94 \end{equation} 
    95 $Q_{sr}$ is the penetrative part of the heat flux. It is applied as a 3D  
    96 trends of the temperature equation (\mdl{traqsr} module) when \np{ln\_traqsr}=True. 
    97  
    98 \begin{equation} \label{Eq_sbc_traqsr} 
    99 \frac{\partial T}{\partial t}\equiv \cdots \;+\frac{Q_{sr} }{\rho_o C_p \,e_{3t} }\delta _k \left[ {I_w } \right] 
    100 \end{equation} 
    101 where $I_w$ is a non-dimensional function that describes the way the light  
    102 penetrates inside the water column. It is generally a sum of decreasing  
    103 exponentials (see \S\ref{TRA_qsr}). 
    104  
    105 The surface freshwater budget is provided by fields: \textit{emp} and $\textit{emp}_S$ which  
    106 may or may not be identical. Indeed, a surface freshwater flux has two effects:  
    107 it changes the volume of the ocean and it changes the surface concentration of  
    108 salt (and other tracers). Therefore it appears in the sea surface height as a volume  
    109 flux, \textit{emp} (\textit{dynspg\_xxx} modules), and in the salinity time evolution equations  
    110 as a concentration/dilution effect,  
    111 $\textit{emp}_{S}$ (\mdl{trasbc} module).  
    112 \begin{equation} \label{Eq_trasbc_emp} 
    113 \begin{aligned} 
    114 &\frac{\partial \eta }{\partial t}\equiv \cdots \;+\;\textit{emp}\quad  \\  
    115 \\ 
    116  &\frac{\partial S}{\partial t}\equiv \cdots \;+\left. {\frac{\textit{emp}_S \;S}{e_{3t} }} \right|_{k=1} \\  
    117  \end{aligned} 
    118 \end{equation}  
    119  
    120 In the real ocean, $\textit{emp}=\textit{emp}_S$ and the ocean salt content is conserved,  
    121 but it exist several numerical reasons why this equality should be broken.  
    122 For example, when the ocean is coupled to a sea-ice model, the water exchanged between  
    123 ice and ocean is slightly salty (mean sea-ice salinity is $\sim $\textit{4 psu}). In this case,  
    124 $\textit{emp}_{S}$ take into account both concentration/dilution effect associated with  
    125 freezing/melting and the salt flux between ice and ocean, while \textit{emp} is  
    126 only the volume flux. In addition, in the current version of \NEMO, the sea-ice is  
    127 assumed to be above the ocean (the so-called levitating sea-ice). Freezing/melting does  
    128 not change the ocean volume (no impact on \textit{emp}) but it modifies the SSS. 
    129 %gm  \colorbox{yellow}{(see {\S} on LIM sea-ice model)}. 
    130  
    131 Note that SST can also be modified by a freshwater flux. Precipitation (in  
    132 particular solid precipitation) may have a temperature significantly different from  
    133 the SST. Due to the lack of information about the temperature of  
    134 precipitation, we assume it is equal to the SST. Therefore, no  
    135 concentration/dilution term appears in the temperature equation. It has to  
    136 be emphasised that this absence does not mean that there is no heat flux  
    137 associated with precipitation! Precipitation can change the ocean volume and thus the 
    138 ocean heat content. It is therefore associated with a heat flux (not yet   
    139 diagnosed in the model) \citep{Roullet_Madec_JGR00}). 
     87of the heat flux ($i.e.$ the sum of sensible, latent and long wave heat fluxes  
     88plus the heat content of the mass exchange with the atmosphere and sea-ice).  
     89It is applied in \mdl{trasbc} module as a surface boundary condition trend of  
     90the first level temperature time evolution equation (see \eqref{Eq_tra_sbc}  
     91and \eqref{Eq_tra_sbc_lin} in \S\ref{TRA_sbc}).  
     92The latter is the penetrative part of the heat flux. It is applied as a 3D  
     93trends of the temperature equation (\mdl{traqsr} module) when \np{ln\_traqsr}=\textit{true}. 
     94The way the light penetrates inside the water column is generally a sum of decreasing  
     95exponentials (see \S\ref{TRA_qsr}).  
     96 
     97The surface freshwater budget is provided by the \textit{emp} field. 
     98It represents the mass flux exchanged with the atmosphere (evaporation minus precipitation)  
     99and possibly with the sea-ice and ice shelves (freezing minus melting of ice).  
     100It affects both the ocean in two different ways:  
     101$(i)$   it changes the volume of the ocean and therefore appears in the sea surface height  
     102equation as a volume flux, and  
     103$(ii)$  it changes the surface temperature and salinity through the heat and salt contents  
     104of the mass exchanged with the atmosphere, the sea-ice and the ice shelves.  
     105 
    140106 
    141107%\colorbox{yellow}{Miss: } 
     
    157123% 
    158124%Explain here all the namlist namsbc variable{\ldots}. 
     125%  
     126% explain : use or not of surface currents 
    159127% 
    160128%\colorbox{yellow}{End Miss } 
    161129 
    162 The ocean model provides the surface currents, temperature and salinity  
    163 averaged over \np{nf\_sbc} time-step (\ref{Tab_ssm}).The computation of the  
    164 mean is done in \mdl{sbcmod} module. 
     130The ocean model provides, at each time step, to the surface module (\mdl{sbcmod})  
     131the surface currents, temperature and salinity.   
     132These variables are averaged over \np{nn\_fsbc} time-step (\ref{Tab_ssm}),  
     133and it is these averaged fields which are used to computes the surface fluxes  
     134at a frequency of \np{nn\_fsbc} time-step. 
     135 
    165136 
    166137%-------------------------------------------------TABLE--------------------------------------------------- 
     
    175146\caption{  \label{Tab_ssm}    
    176147Ocean variables provided by the ocean to the surface module (SBC).  
    177 The variable are averaged over nf{\_}sbc time step, $i.e.$ the frequency of  
    178 computation of surface fluxes.} 
     148The variable are averaged over nn{\_}fsbc time step,  
     149$i.e.$ the frequency of computation of surface fluxes.} 
    179150\end{center}   \end{table} 
    180151%-------------------------------------------------------------------------------------------------------------- 
     
    459430%-------------------------------------------------------------------------------------------------------------- 
    460431 
    461 In some circumstances it may be useful to avoid calculating the 3D temperature, salinity and velocity fields and simply read them in from  a previous run.   
    462 Options are defined through the  \ngn{namsbc\_sas} namelist variables. 
     432In some circumstances it may be useful to avoid calculating the 3D temperature, salinity and velocity fields  
     433and simply read them in from a previous run or receive them from OASIS.   
    463434For example: 
    464435 
    465 \begin{enumerate} 
    466 \item  Multiple runs of the model are required in code development to see the affect of different algorithms in 
     436\begin{itemize} 
     437\item  Multiple runs of the model are required in code development to see the effect of different algorithms in 
    467438       the bulk formulae. 
    468439\item  The effect of different parameter sets in the ice model is to be examined. 
    469 \end{enumerate} 
     440\item  Development of sea-ice algorithms or parameterizations. 
     441\item  spinup of the iceberg floats 
     442\item  ocean/sea-ice simulation with both media running in parallel (\np{ln\_mixcpl}~=~\textit{true}) 
     443\end{itemize} 
    470444 
    471445The StandAlone Surface scheme provides this utility. 
     446Its options are defined through the \ngn{namsbc\_sas} namelist variables. 
    472447A new copy of the model has to be compiled with a configuration based on ORCA2\_SAS\_LIM. 
    473448However no namelist parameters need be changed from the settings of the previous run (except perhaps nn{\_}date0) 
     
    475450Routines replaced are: 
    476451 
    477 \begin{enumerate} 
    478 \item  \mdl{nemogcm} 
    479  
    480        This routine initialises the rest of the model and repeatedly calls the stp time stepping routine (step.F90) 
     452\begin{itemize} 
     453\item \mdl{nemogcm} : This routine initialises the rest of the model and repeatedly calls the stp time stepping routine (step.F90) 
    481454       Since the ocean state is not calculated all associated initialisations have been removed. 
    482 \item  \mdl{step} 
    483  
    484        The main time stepping routine now only needs to call the sbc routine (and a few utility functions). 
    485 \item  \mdl{sbcmod} 
    486  
    487        This has been cut down and now only calculates surface forcing and the ice model required.  New surface modules 
     455\item  \mdl{step} : The main time stepping routine now only needs to call the sbc routine (and a few utility functions). 
     456\item  \mdl{sbcmod} : This has been cut down and now only calculates surface forcing and the ice model required.  New surface modules 
    488457       that can function when only the surface level of the ocean state is defined can also be added (e.g. icebergs). 
    489 \item  \mdl{daymod} 
    490  
    491        No ocean restarts are read or written (though the ice model restarts are retained), so calls to restart functions 
     458\item  \mdl{daymod} : No ocean restarts are read or written (though the ice model restarts are retained), so calls to restart functions 
    492459       have been removed.  This also means that the calendar cannot be controlled by time in a restart file, so the user 
    493460       must make sure that nn{\_}date0 in the model namelist is correct for his or her purposes. 
    494 \item  \mdl{stpctl} 
    495  
    496        Since there is no free surface solver, references to it have been removed from \rou{stp\_ctl} module. 
    497 \item  \mdl{diawri} 
    498  
    499        All 3D data have been removed from the output.  The surface temperature, salinity and velocity components (which 
     461\item  \mdl{stpctl} : Since there is no free surface solver, references to it have been removed from \rou{stp\_ctl} module. 
     462\item  \mdl{diawri} : All 3D data have been removed from the output.  The surface temperature, salinity and velocity components (which 
    500463       have been read in) are written along with relevant forcing and ice data. 
    501 \end{enumerate} 
     464\end{itemize} 
    502465 
    503466One new routine has been added: 
    504467 
    505 \begin{enumerate} 
    506 \item  \mdl{sbcsas} 
    507        This module initialises the input files needed for reading temperature, salinity and velocity arrays at the surface. 
     468\begin{itemize} 
     469\item  \mdl{sbcsas} : This module initialises the input files needed for reading temperature, salinity and velocity arrays at the surface. 
    508470       These filenames are supplied in namelist namsbc{\_}sas.  Unfortunately because of limitations with the \mdl{iom} module, 
    509471       the full 3D fields from the mean files have to be read in and interpolated in time, before using just the top level. 
    510472       Since fldread is used to read in the data, Interpolation on the Fly may be used to change input data resolution. 
    511 \end{enumerate} 
     473\end{itemize} 
     474 
     475 
     476% Missing the description of the 2 following variables: 
     477%   ln_3d_uve   = .true.    !  specify whether we are supplying a 3D u,v and e3 field 
     478%   ln_read_frq = .false.    !  specify whether we must read frq or not 
     479 
     480 
    512481 
    513482% ================================================================ 
     
    625594or larger than the one of the input atmospheric fields. 
    626595 
     596The \np{sn\_wndi}, \np{sn\_wndj}, \np{sn\_qsr}, \np{sn\_qlw}, \np{sn\_tair}, \np{sn\_humi}, 
     597\np{sn\_prec}, \np{sn\_snow}, \np{sn\_tdif} parameters describe the fields  
     598and the way they have to be used (spatial and temporal interpolations).  
     599 
     600\np{cn\_dir} is the directory of location of bulk files 
     601\np{ln\_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.) 
     602\np{rn\_zqt}: is the height of humidity and temperature measurements (m) 
     603\np{rn\_zu}: is the height of wind measurements (m) 
     604 
     605Three multiplicative factors are availables :  
     606\np{rn\_pfac} and \np{rn\_efac} allows to adjust (if necessary) the global freshwater budget  
     607by increasing/reducing the precipitations (total and snow) and or evaporation, respectively. 
     608The third one,\np{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account  
     609in the calculation of surface wind stress. Its range should be between zero and one,  
     610and it is recommended to set it to 0. 
     611 
    627612% ------------------------------------------------------------------------------------------------------------- 
    628613%        CLIO Bulk formulea 
     
    720705are sent to the atmospheric component. 
    721706 
    722 A generalised coupled interface has been developed. It is currently interfaced with OASIS 3 
    723 (\key{oasis3}) and does not support OASIS 4 
    724 \footnote{The \key{oasis4} exist. It activates portion of the code that are still under development.}.  
     707A generalised coupled interface has been developed.  
     708It is currently interfaced with OASIS-3-MCT (\key{oasis3}).  
    725709It has been successfully used to interface \NEMO to most of the European atmospheric  
    726710GCM (ARPEGE, ECHAM, ECMWF, HadAM, HadGAM, LMDz),  
     
    787771\label{SBC_tide} 
    788772 
    789 A module is available to use the tidal potential forcing and is activated with with \key{tide}. 
    790  
    791  
    792 %------------------------------------------nam_tide---------------------------------------------------- 
     773%------------------------------------------nam_tide--------------------------------------- 
    793774\namdisplay{nam_tide} 
    794 %------------------------------------------------------------------------------------------------------------- 
    795  
    796 Concerning the tidal potential, some parameters are available in namelist \ngn{nam\_tide}: 
     775%----------------------------------------------------------------------------------------- 
     776 
     777A module is available to compute the tidal potential and use it in the momentum equation. 
     778This option is activated when \key{tide} is defined. 
     779 
     780Some parameters are available in namelist \ngn{nam\_tide}: 
    797781 
    798782- \np{ln\_tide\_pot} activate the tidal potential forcing 
     
    801785 
    802786- \np{clname} is the name of constituent 
    803  
    804787 
    805788The tide is generated by the forces of gravity ot the Earth-Moon and Earth-Sun sytem; 
     
    958941\namdisplay{namsbc_isf} 
    959942%-------------------------------------------------------------------------------------------------------- 
    960 Namelist variable in \ngn{namsbc}, \np{nn\_isf},  control the kind of ice shelf representation used.  
     943Namelist variable in \ngn{namsbc}, \np{nn\_isf}, controls the ice shelf representation used.  
    961944\begin{description} 
    962945\item[\np{nn\_isf}~=~1] 
    963 The ice shelf cavity is represented. The fwf and heat flux are computed.  
    964 Full description, sensitivity and validation in preparation.  
     946The ice shelf cavity is represented (\np{ln\_isfcav}~=~true needed). The fwf and heat flux are computed.  
     947Two different bulk formula are available: 
     948   \begin{description} 
     949   \item[\np{nn\_isfblk}~=~1] 
     950   The bulk formula used to compute the melt is based the one described in \citet{Hunter2006}. 
     951        This formulation is based on a balance between the upward ocean heat flux and the latent heat flux at the ice shelf base. 
     952 
     953   \item[\np{nn\_isfblk}~=~2]  
     954   The bulk formula used to compute the melt is based the one described in \citet{Jenkins1991}. 
     955        This formulation is based on a 3 equations formulation (a heat flux budget, a salt flux budget 
     956         and a linearised freezing point temperature equation). 
     957   \end{description} 
     958 
     959For this 2 bulk formulations, there are 3 different ways to compute the exchange coeficient: 
     960   \begin{description} 
     961        \item[\np{nn\_gammablk~=~0~}] 
     962   The salt and heat exchange coefficients are constant and defined by \np{rn\_gammas0} and \np{rn\_gammat0} 
     963 
     964   \item[\np{nn\_gammablk~=~1~}] 
     965   The salt and heat exchange coefficients are velocity dependent and defined as $\np{rn\_gammas0} \times u_{*}$ and $\np{rn\_gammat0} \times u_{*}$ 
     966        where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters). 
     967        See \citet{Jenkins2010} for all the details on this formulation. 
     968    
     969   \item[\np{nn\_gammablk~=~2~}] 
     970   The salt and heat exchange coefficients are velocity and stability dependent and defined as  
     971        $\gamma_{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}}$ 
     972        where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters),  
     973        $\Gamma_{Turb}$ the contribution of the ocean stability and  
     974        $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion. 
     975        See \citet{Holland1999} for all the details on this formulation. 
     976        \end{description} 
    965977 
    966978\item[\np{nn\_isf}~=~2] 
     
    968980The fwf is distributed along the ice shelf edge between the depth of the average grounding line (GL) 
    969981(\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}) as in (\np{nn\_isf}~=~3).  
    970 Furthermore the fwf is computed using the \citet{Beckmann2003} parameterisation of isf melting.  
     982Furthermore the fwf and heat flux are computed using the \citet{Beckmann2003} parameterisation of isf melting.  
    971983The effective melting length (\np{sn\_Leff\_isf}) is read from a file. 
    972984 
    973985\item[\np{nn\_isf}~=~3] 
    974986A simple parameterisation of isf is used. The ice shelf cavity is not represented.  
    975 The fwf (\np{sn\_rnfisf}) is distributed along the ice shelf edge between the depth of the average grounding line (GL) 
    976 (\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}). 
    977 Full description, sensitivity and validation in preparation. 
     987The fwf (\np{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between the depth of the average grounding line (GL) 
     988(\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}).  
     989The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 
    978990 
    979991\item[\np{nn\_isf}~=~4] 
    980 The ice shelf cavity is represented. However, the fwf (\np{sn\_fwfisf}) and heat flux (\np{sn\_qisf}) are  
    981 not computed but specified from file.  
     992The ice shelf cavity is opened (\np{ln\_isfcav}~=~true needed). However, the fwf is not computed but specified from file \np{sn\_fwfisf}).  
     993The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.\\ 
    982994\end{description} 
    983995 
    984 \np{nn\_isf}~=~1 and \np{nn\_isf}~=~2 compute a melt rate based on the water masse properties, ocean velocities and depth. 
    985  This flux is thus highly dependent of the model resolution (horizontal and vertical), realism of the water masse onto the shelf ... 
    986  
    987 \np{nn\_isf}~=~3 and \np{nn\_isf}~=~4 read the melt rate and heat flux from a file. You have total control of the fwf scenario. 
    988  
    989  This can be usefull if the water masses on the shelf are not realistic or the resolution (horizontal/vertical) are too  
    990 coarse to have realistic melting or for sensitivity studies where you want to control your input.  
    991 Full description, sensitivity and validation in preparation.  
    992  
    993 There is 2 ways to apply the fwf to NEMO. The first possibility (\np{ln\_divisf}~=~false) applied the fwf 
    994  and heat flux directly on the salinity and temperature tendancy. The second possibility (\np{ln\_divisf}~=~true) 
    995  apply the fwf as for the runoff fwf (see \S\ref{SBC_rnf}). The mass/volume addition due to the ice shelf melting is, 
    996  at each relevant depth level, added to the horizontal divergence (\textit{hdivn}) in the subroutine \rou{sbc\_isf\_div}  
    997 (called from \mdl{divcur}).  
     996 
     997$\bullet$ \np{nn\_isf}~=~1 and \np{nn\_isf}~=~2 compute a melt rate based on the water mass properties, ocean velocities and depth. 
     998 This flux is thus highly dependent of the model resolution (horizontal and vertical), realism of the water masses onto the shelf ...\\ 
     999 
     1000 
     1001$\bullet$ \np{nn\_isf}~=~3 and \np{nn\_isf}~=~4 read the melt rate from a file. You have total control of the fwf forcing. 
     1002This can be usefull if the water masses on the shelf are not realistic or the resolution (horizontal/vertical) are too  
     1003coarse to have realistic melting or for studies where you need to control your heat and fw input.\\  
     1004 
     1005A namelist parameters control over how many meters the heat and fw fluxes are spread.  
     1006\np{rn\_hisf\_tbl}] is the top boundary layer thickness as defined in \citet{Losch2008}.  
     1007This parameter is only used if \np{nn\_isf}~=~1 or \np{nn\_isf}~=~4 
     1008 
     1009If \np{rn\_hisf\_tbl} = 0., the fluxes are put in the top level whatever is its tickness.  
     1010 
     1011If \np{rn\_hisf\_tbl} $>$ 0., the fluxes are spread over the first \np{rn\_hisf\_tbl} m (ie over one or several cells).\\ 
     1012 
     1013The ice shelf melt is implemented as a volume flux with in the same way as for the runoff. 
     1014The fw addition due to the ice shelf melting is, at each relevant depth level, added to the horizontal divergence  
     1015(\textit{hdivn}) in the subroutine \rou{sbc\_isf\_div}, called from \mdl{divcur}.  
     1016See the runoff section \ref{SBC_rnf} for all the details about the divergence correction.  
     1017 
     1018 
     1019\section{ Ice sheet coupling} 
     1020\label{SBC_iscpl} 
     1021%------------------------------------------namsbc_iscpl---------------------------------------------------- 
     1022\namdisplay{namsbc_iscpl} 
     1023%-------------------------------------------------------------------------------------------------------- 
     1024Ice sheet/ocean coupling is done through file exchange at the restart step. NEMO, at each restart step,  
     1025read the bathymetry and ice shelf draft variable in a netcdf file.  
     1026If \np{ln\_iscpl = ~true}, the isf draft is assume to be different at each restart step  
     1027with potentially some new wet/dry cells due to the ice sheet dynamics/thermodynamics. 
     1028The wetting and drying scheme applied on the restart is very simple and described below for the 6 different cases: 
     1029\begin{description} 
     1030\item[Thin a cell down:] 
     1031   T/S/ssh are unchanged and U/V in the top cell are corrected to keep the barotropic transport (bt) constant ($bt_b=bt_n$). 
     1032\item[Enlarge  a cell:] 
     1033   See case "Thin a cell down" 
     1034\item[Dry a cell:] 
     1035   mask, T/S, U/V and ssh are set to 0. Furthermore, U/V into the water column are modified to satisfy ($bt_b=bt_n$). 
     1036\item[Wet a cell:]  
     1037   mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$ and U/V set to 0. If no neighbours along i,j and k, T/S/U/V and mask are set to 0. 
     1038\item[Dry a column:] 
     1039   mask, T/S, U/V are set to 0 everywhere in the column and ssh set to 0. 
     1040\item[Wet a column:] 
     1041   set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0. If no neighbour, T/S/U/V and mask set to 0. 
     1042\end{description} 
     1043The extrapolation is call \np{nn\_drown} times. It means that if the grounding line retreat by more than \np{nn\_drown} cells between 2 coupling steps, 
     1044 the code will be unable to fill all the new wet cells properly. The default number is set up for the MISOMIP idealised experiments.\\ 
     1045This coupling procedure is able to take into account grounding line and calving front migration. However, it is a non-conservative processe.  
     1046This could lead to a trend in heat/salt content and volume. In order to remove the trend and keep the conservation level as close to 0 as possible, 
     1047 a simple conservation scheme is available with \np{ln\_hsb = ~true}. The heat/salt/vol. gain/loss is diagnose, as well as the location.  
     1048Based on what is done on sbcrnf to prescribed a source of heat/salt/vol., the heat/salt/vol. gain/loss is removed/added, 
     1049 over a period of \np{rn\_fiscpl} time step, into the system.  
     1050So after \np{rn\_fiscpl} time step, all the heat/salt/vol. gain/loss due to extrapolation process is canceled.\\ 
     1051 
     1052As the before and now fields are not compatible (modification of the geometry), the restart time step is prescribed to be an euler time step instead of a leap frog and $fields_b = fields_n$. 
    9981053% 
    9991054% ================================================================ 
    10001055%        Handling of icebergs 
    10011056% ================================================================ 
    1002 \section{ Handling of icebergs (ICB) } 
     1057\section{Handling of icebergs (ICB)} 
    10031058\label{ICB_icebergs} 
    10041059%------------------------------------------namberg---------------------------------------------------- 
     
    10061061%------------------------------------------------------------------------------------------------------------- 
    10071062 
    1008 Icebergs are modelled as lagrangian particles in NEMO. 
    1009 Their physical behaviour is controlled by equations as described in  \citet{Martin_Adcroft_OM10} ). 
    1010 (Note that the authors kindly provided a copy of their code to act as a basis for implementation in NEMO.) 
    1011 Icebergs are initially spawned into one of ten classes which have specific mass and thickness as described in the \ngn{namberg} namelist:  
     1063Icebergs are modelled as lagrangian particles in NEMO \citep{Marsh_GMD2015}. 
     1064Their physical behaviour is controlled by equations as described in \citet{Martin_Adcroft_OM10} ). 
     1065(Note that the authors kindly provided a copy of their code to act as a basis for implementation in NEMO). 
     1066Icebergs are initially spawned into one of ten classes which have specific mass and thickness as described  
     1067in the \ngn{namberg} namelist:  
    10121068\np{rn\_initial\_mass} and \np{rn\_initial\_thickness}. 
    10131069Each class has an associated scaling (\np{rn\_mass\_scaling}), which is an integer representing how many icebergs  
     
    10791135%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    10801136\begin{figure}[!t]    \begin{center} 
    1081 \includegraphics[width=0.8\textwidth]{./TexFiles/Figures/Fig_SBC_diurnal.pdf} 
     1137\includegraphics[width=0.8\textwidth]{Fig_SBC_diurnal} 
    10821138\caption{ \label{Fig_SBC_diurnal}     
    10831139Example of recontruction of the diurnal cycle variation of short wave flux   
     
    11121168%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    11131169\begin{figure}[!t]  \begin{center} 
    1114 \includegraphics[width=0.7\textwidth]{./TexFiles/Figures/Fig_SBC_dcy.pdf} 
     1170\includegraphics[width=0.7\textwidth]{Fig_SBC_dcy} 
    11151171\caption{ \label{Fig_SBC_dcy}    
    11161172Example of recontruction of the diurnal cycle variation of short wave flux   
     
    11931249The presence at the sea surface of an ice covered area modifies all the fluxes  
    11941250transmitted to the ocean. There are several way to handle sea-ice in the system  
    1195 depending on the value of the \np{nn{\_}ice} namelist parameter 
     1251depending on the value of the \np{nn\_ice} namelist parameter found in \ngn{namsbc} namelist 
    11961252\begin{description} 
    11971253\item[nn{\_}ice = 0]  there will never be sea-ice in the computational domain.  
     
    12681324% ------------------------------------------------------------------------------------------------------------- 
    12691325\subsection   [Neutral drag coefficient from external wave model (\textit{sbcwave})] 
    1270                         {Neutral drag coefficient from external wave model (\mdl{sbcwave})} 
     1326              {Neutral drag coefficient from external wave model (\mdl{sbcwave})} 
    12711327\label{SBC_wave} 
    12721328%------------------------------------------namwave---------------------------------------------------- 
    12731329\namdisplay{namsbc_wave} 
    12741330%------------------------------------------------------------------------------------------------------------- 
    1275 \begin{description} 
    1276  
    1277 \item [??] In order to read a neutral drag coeff, from an external data source (i.e. a wave model), the  
    1278 logical variable \np{ln\_cdgw} 
    1279  in $namsbc$ namelist must be defined ${.true.}$.  
     1331 
     1332In order to read a neutral drag coeff, from an external data source ($i.e.$ a wave model), the  
     1333logical variable \np{ln\_cdgw} in \ngn{namsbc} namelist must be set to \textit{true}.  
    12801334The \mdl{sbcwave} module containing the routine \np{sbc\_wave} reads the 
    12811335namelist \ngn{namsbc\_wave} (for external data names, locations, frequency, interpolation and all  
    12821336the miscellanous options allowed by Input Data generic Interface see \S\ref{SBC_input})  
    1283 and a 2D field of neutral drag coefficient. Then using the routine  
    1284 TURB\_CORE\_1Z or TURB\_CORE\_2Z, and starting from the neutral drag coefficent provided, the drag coefficient is computed according  
    1285 to stable/unstable conditions of the air-sea interface following \citet{Large_Yeager_Rep04}. 
    1286  
    1287 \end{description} 
     1337and a 2D field of neutral drag coefficient.  
     1338Then using the routine TURB\_CORE\_1Z or TURB\_CORE\_2Z, and starting from the neutral drag coefficent provided,  
     1339the drag coefficient is computed according to stable/unstable conditions of the air-sea interface following \citet{Large_Yeager_Rep04}. 
     1340 
    12881341 
    12891342% Griffies doc: 
    1290 % When running ocean-ice simulations, we are not explicitly representing land processes, such as rivers, catchment areas, snow accumulation, etc. However, to reduce model drift, it is important to balance the hydrological cycle in ocean-ice models. We thus need to prescribe some form of global normalization to the precipitation minus evaporation plus river runoff. The result of the normalization should be a global integrated zero net water input to the ocean-ice system over a chosen time scale.  
    1291 %How often the normalization is done is a matter of choice. In mom4p1, we choose to do so at each model time step, so that there is always a zero net input of water to the ocean-ice system. Others choose to normalize over an annual cycle, in which case the net imbalance over an annual cycle is used to alter the subsequent year�s water budget in an attempt to damp the annual water imbalance. Note that the annual budget approach may be inappropriate with interannually varying precipitation forcing.  
    1292 %When running ocean-ice coupled models, it is incorrect to include the water transport between the ocean and ice models when aiming to balance the hydrological cycle. The reason is that it is the sum of the water in the ocean plus ice that should be balanced when running ocean-ice models, not the water in any one sub-component. As an extreme example to illustrate the issue, consider an ocean-ice model with zero initial sea ice. As the ocean-ice model spins up, there should be a net accumulation of water in the growing sea ice, and thus a net loss of water from the ocean. The total water contained in the ocean plus ice system is constant, but there is an exchange of water between the subcomponents. This exchange should not be part of the normalization used to balance the hydrological cycle in ocean-ice models.  
    1293  
    1294  
     1343% When running ocean-ice simulations, we are not explicitly representing land processes,  
     1344% such as rivers, catchment areas, snow accumulation, etc. However, to reduce model drift,  
     1345% it is important to balance the hydrological cycle in ocean-ice models.  
     1346% We thus need to prescribe some form of global normalization to the precipitation minus evaporation plus river runoff.  
     1347% The result of the normalization should be a global integrated zero net water input to the ocean-ice system over  
     1348% a chosen time scale.  
     1349%How often the normalization is done is a matter of choice. In mom4p1, we choose to do so at each model time step,  
     1350% so that there is always a zero net input of water to the ocean-ice system.  
     1351% Others choose to normalize over an annual cycle, in which case the net imbalance over an annual cycle is used  
     1352% to alter the subsequent year�s water budget in an attempt to damp the annual water imbalance.  
     1353% Note that the annual budget approach may be inappropriate with interannually varying precipitation forcing.  
     1354% When running ocean-ice coupled models, it is incorrect to include the water transport between the ocean  
     1355% and ice models when aiming to balance the hydrological cycle.  
     1356% The reason is that it is the sum of the water in the ocean plus ice that should be balanced when running ocean-ice models,  
     1357% not the water in any one sub-component. As an extreme example to illustrate the issue,  
     1358% consider an ocean-ice model with zero initial sea ice. As the ocean-ice model spins up,  
     1359% there should be a net accumulation of water in the growing sea ice, and thus a net loss of water from the ocean.  
     1360% The total water contained in the ocean plus ice system is constant, but there is an exchange of water between  
     1361% the subcomponents. This exchange should not be part of the normalization used to balance the hydrological cycle  
     1362% in ocean-ice models.  
     1363 
     1364 
     1365\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_STO.tex

    r5404 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter stochastic parametrization of EOS (STO) 
     
    57\label{STO} 
    68 
     9Authors: P.-A. Bouttier 
     10 
    711\minitoc 
    812 
     13\newpage 
    914 
    10 \newpage 
    11 $\ $\newline    % force a new line 
     15 
     16The stochastic parametrization module aims to explicitly simulate uncertainties in the model.  
     17More particularly, \cite{Brankart_OM2013} has shown that,  
     18because of the nonlinearity of the seawater equation of state, unresolved scales represent  
     19a major source of uncertainties in the computation of the large scale horizontal density gradient  
     20(from T/S large scale fields), and that the impact of these uncertainties can be simulated  
     21by random processes representing unresolved T/S fluctuations. 
     22 
     23The stochastic formulation of the equation of state can be written as: 
     24\begin{equation} 
     25 \label{eq:eos_sto} 
     26  \rho = \frac{1}{2} \sum_{i=1}^m\{ \rho[T+\Delta T_i,S+\Delta S_i,p_o(z)] + \rho[T-\Delta T_i,S-\Delta S_i,p_o(z)] \} 
     27\end{equation} 
     28where $p_o(z)$ is the reference pressure depending on the depth and,  
     29$\Delta T_i$ and $\Delta S_i$ are a set of T/S perturbations defined as the scalar product  
     30of the respective local T/S gradients with random walks $\mathbf{\xi}$: 
     31\begin{equation} 
     32 \label{eq:sto_pert} 
     33 \Delta T_i = \mathbf{\xi}_i \cdot \nabla T \qquad \hbox{and} \qquad \Delta S_i = \mathbf{\xi}_i \cdot \nabla S 
     34\end{equation} 
     35$\mathbf{\xi}_i$ are produced by a first-order autoregressive processes (AR-1) with  
     36a parametrized decorrelation time scale, and horizontal and vertical standard deviations $\sigma_s$.  
     37$\mathbf{\xi}$ are uncorrelated over the horizontal and fully correlated along the vertical. 
     38 
     39 
     40\section{Stochastic processes} 
     41\label{STO_the_details} 
     42 
     43The starting point of our implementation of stochastic parameterizations 
     44in NEMO is to observe that many existing parameterizations are based 
     45on autoregressive processes, which are used as a basic source of randomness 
     46to transform a deterministic model into a probabilistic model. 
     47A generic approach is thus to add one single new module in NEMO, 
     48generating processes with appropriate statistics 
     49to simulate each kind of uncertainty in the model 
     50(see \cite{Brankart_al_GMD2015} for more details). 
     51 
     52In practice, at every model grid point, independent Gaussian autoregressive 
     53processes~$\xi^{(i)},\,i=1,\ldots,m$ are first generated 
     54using the same basic equation: 
     55 
     56\begin{equation} 
     57\label{eq:autoreg} 
     58\xi^{(i)}_{k+1} = a^{(i)} \xi^{(i)}_k + b^{(i)} w^{(i)} + c^{(i)} 
     59\end{equation} 
     60 
     61\noindent 
     62where $k$ is the index of the model timestep; and 
     63$a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are parameters defining 
     64the mean ($\mu^{(i)}$) standard deviation ($\sigma^{(i)}$) 
     65and correlation timescale ($\tau^{(i)}$) of each process: 
     66 
     67\begin{itemize} 
     68\item for order~1 processes, $w^{(i)}$ is a Gaussian white noise, 
     69with zero mean and standard deviation equal to~1, and the parameters 
     70$a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by: 
     71 
     72\begin{equation} 
     73\label{eq:ord1} 
     74\left\{ 
     75\begin{array}{l} 
     76a^{(i)} = \varphi \\ 
     77b^{(i)} = \sigma^{(i)} \sqrt{ 1 - \varphi^2 }  
     78 \qquad\qquad\mbox{with}\qquad\qquad 
     79\varphi = \exp \left( - 1 / \tau^{(i)} \right) \\ 
     80c^{(i)} = \mu^{(i)} \left( 1 - \varphi \right) \\ 
     81\end{array} 
     82\right. 
     83\end{equation} 
     84 
     85\item for order~$n>1$ processes, $w^{(i)}$ is an order~$n-1$ autoregressive process, 
     86with zero mean, standard deviation equal to~$\sigma^{(i)}$; correlation timescale 
     87equal to~$\tau^{(i)}$; and the parameters $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by: 
     88 
     89\begin{equation} 
     90\label{eq:ord2} 
     91\left\{ 
     92\begin{array}{l} 
     93a^{(i)} = \varphi \\ 
     94b^{(i)} = \frac{n-1}{2(4n-3)} \sqrt{ 1 - \varphi^2 }  
     95 \qquad\qquad\mbox{with}\qquad\qquad 
     96\varphi = \exp \left( - 1 / \tau^{(i)} \right) \\ 
     97c^{(i)} = \mu^{(i)} \left( 1 - \varphi \right) \\ 
     98\end{array} 
     99\right. 
     100\end{equation} 
     101 
     102\end{itemize} 
     103 
     104\noindent 
     105In this way, higher order processes can be easily generated recursively using  
     106the same piece of code implementing Eq.~(\ref{eq:autoreg}),  
     107and using succesively processes from order $0$ to~$n-1$ as~$w^{(i)}$. 
     108The parameters in Eq.~(\ref{eq:ord2}) are computed so that this recursive application 
     109of Eq.~(\ref{eq:autoreg}) leads to processes with the required standard deviation 
     110and correlation timescale, with the additional condition that 
     111the $n-1$ first derivatives of the autocorrelation function 
     112are equal to zero at~$t=0$, so that the resulting processes 
     113become smoother and smoother as $n$ is increased. 
     114 
     115Overall, this method provides quite a simple and generic way of generating  
     116a wide class of stochastic processes.  
     117However, this also means that new model parameters are needed to specify each of  
     118these stochastic processes. As in any parameterization of lacking physics,  
     119a very important issues then to tune these new parameters using either first principles,  
     120model simulations, or real-world observations. 
     121 
     122\section{Implementation details} 
     123\label{STO_thech_details} 
     124 
     125%---------------------------------------namsbc-------------------------------------------------- 
     126\namdisplay{namsto} 
     127%-------------------------------------------------------------------------------------------------------------- 
     128 
     129The computer code implementing stochastic parametrisations can be found in the STO directory. 
     130It involves three modules :  
     131\begin{description} 
     132\item[\mdl{stopar}] : define the Stochastic parameters and their time evolution. 
     133\item[\mdl{storng}] : a random number generator based on (and includes) the 64-bit KISS  
     134                      (Keep It Simple Stupid) random number generator distributed by George Marsaglia  
     135                      (see \href{https://groups.google.com/forum/#!searchin/comp.lang.fortran/64-bit$20KISS$20RNGs}{here}) 
     136\item[\mdl{stopts}] : stochastic parametrisation associated with the non-linearity of the equation of seawater,  
     137 implementing Eq~\ref{eq:sto_pert} and specific piece of code in the equation of state implementing Eq~\ref{eq:eos_sto}. 
     138\end{description} 
     139 
     140The \mdl{stopar} module has 3 public routines to be called by the model (in our case, NEMO): 
     141 
     142The first routine (\rou{sto\_par}) is a direct implementation of Eq.~(\ref{eq:autoreg}), 
     143applied at each model grid point (in 2D or 3D),  
     144and called at each model time step ($k$) to update 
     145every autoregressive process ($i=1,\ldots,m$). 
     146This routine also includes a filtering operator, applied to $w^{(i)}$, 
     147to introduce a spatial correlation between the stochastic processes. 
     148 
     149The second routine (\rou{sto\_par\_init}) is an initialization routine mainly dedicated 
     150to the computation of parameters $a^{(i)}, b^{(i)}, c^{(i)}$ 
     151for each autoregressive process, as a function of the statistical properties 
     152required by the model user (mean, standard deviation, time correlation, 
     153order of the process,\ldots).  
     154 
     155Parameters for the processes can be specified through the following \ngn{namsto} namelist parameters: 
     156\begin{description} 
     157   \item[\np{nn\_sto\_eos}]   : number of independent random walks  
     158   \item[\np{rn\_eos\_stdxy}] : random walk horz. standard deviation (in grid points) 
     159   \item[\np{rn\_eos\_stdz}]  : random walk vert. standard deviation (in grid points) 
     160   \item[\np{rn\_eos\_tcor}]  : random walk time correlation (in timesteps) 
     161   \item[\np{nn\_eos\_ord}]   : order of autoregressive processes 
     162   \item[\np{nn\_eos\_flt}]   : passes of Laplacian filter 
     163   \item[\np{rn\_eos\_lim}]   : limitation factor (default = 3.0) 
     164\end{description} 
     165This routine also includes the initialization (seeding) of the random number generator. 
     166 
     167The third routine (\rou{sto\_rst\_write}) writes a restart file (which suffix name is  
     168given by \np{cn\_storst\_out} namelist parameter) containing the current value of  
     169all autoregressive processes to allow restarting a simulation from where it has been interrupted. 
     170This file also contains the current state of the random number generator. 
     171When \np{ln\_rststo} is set to \textit{true}), the restart file (which suffix name is  
     172given by \np{cn\_storst\_in} namelist parameter) is read by the initialization routine  
     173(\rou{sto\_par\_init}). The simulation will continue exactly as if it was not interrupted 
     174only  when \np{ln\_rstseed} is set to \textit{true}, $i.e.$ when the state of  
     175the random number generator is read in the restart file. 
     176 
     177 
     178\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_STP.tex

    r4147 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13 
    24% ================================================================ 
    3 % Chapter 2 Time Domain (step.F90) 
     5% Chapter 2 ——— Time Domain (step.F90) 
    46% ================================================================ 
    57\chapter{Time Domain (STP) } 
     
    2123 
    2224Having defined the continuous equations in Chap.~\ref{PE}, we need now to choose  
    23 a time discretization. In the present chapter, we provide a general description of the \NEMO  
     25a time discretization, a key feature of an ocean model as it exerts a strong influence   
     26on the structure of the computer code ($i.e.$ on its flowchart).  
     27In the present chapter, we provide a general description of the \NEMO  
    2428time stepping strategy and the consequences for the order in which the equations are 
    2529solved. 
     
    158162\end{equation}  
    159163 
     164%%gm 
     165%%gm   UPDATE the next paragraphs with time varying thickness ... 
     166%%gm 
     167 
    160168This scheme is rather time consuming since it requires a matrix inversion,  
    161169but it becomes attractive since a value of 3 or more is needed for N in 
     
    188196 
    189197% ------------------------------------------------------------------------------------------------------------- 
    190 %        Hydrostatic Pressure gradient 
    191 % ------------------------------------------------------------------------------------------------------------- 
    192 \section{Hydrostatic Pressure Gradient --- semi-implicit scheme} 
    193 \label{STP_hpg_imp} 
     198%        Surface Pressure gradient 
     199% ------------------------------------------------------------------------------------------------------------- 
     200\section{Surface Pressure Gradient} 
     201\label{STP_spg_ts} 
     202 
     203===>>>>  TO BE written....  :-) 
    194204 
    195205%\gmcomment{  
    196206%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    197207\begin{figure}[!t]     \begin{center} 
    198 \includegraphics[width=0.7\textwidth]{./TexFiles/Figures/Fig_TimeStepping_flowchart.pdf} 
     208\includegraphics[width=0.7\textwidth]{Fig_TimeStepping_flowchart} 
    199209\caption{   \label{Fig_TimeStep_flowchart} 
    200210Sketch of the leapfrog time stepping sequence in \NEMO from \citet{Leclair_Madec_OM09}.  
     
    209219%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    210220%} 
    211  
    212 The range of stability of the Leap-Frog scheme can be extended by a factor of two 
    213 by introducing a semi-implicit computation of the hydrostatic pressure gradient term 
    214 \citep{Brown_Campana_MWR78}. Instead of evaluating the pressure at $t$, a linear  
    215 combination of values at $t-\rdt$, $t$ and $t+\rdt$ is used (see \S~\ref{DYN_hpg_imp}).   
    216 This technique, controlled by the \np{nn\_dynhpg\_rst} namelist parameter, does not  
    217 introduce a significant additional computational cost when tracers and thus density  
    218 is time stepped before the dynamics. This time step ordering is used in \NEMO  
    219 (Fig.\ref{Fig_TimeStep_flowchart}). 
    220  
    221  
    222 This technique, used in several GCMs (\NEMO, POP or MOM for instance),  
    223 makes the Leap-Frog scheme as efficient  
    224 \footnote{The efficiency is defined as the maximum allowed Courant number of the time  
    225 stepping scheme divided by the number of computations of the right-hand side per time step.}  
    226 as the Forward-Backward scheme used in MOM \citep{Griffies_al_OS05} and more  
    227 efficient than the LF-AM3 scheme (leapfrog time stepping combined with a third order 
    228 Adams-Moulthon interpolation for the predictor phase) used in ROMS  
    229 \citep{Shchepetkin_McWilliams_OM05}.  
    230  
    231 In fact, this technique is efficient when the physical phenomenon that  
    232 limits the time-step is internal gravity waves (IGWs). Indeed, it is  
    233 equivalent to applying a time filter to the pressure gradient to eliminate high  
    234 frequency IGWs. Obviously, the doubling of the time-step is achievable only  
    235 if no other factors control the time-step, such as the stability limits associated  
    236 with advection, diffusion or Coriolis terms. For example, it is inefficient in low resolution 
    237 global ocean configurations, since inertial oscillations in the vicinity of the North Pole  
    238 are the limiting factor for the time step. It is also often inefficient in very high  
    239 resolution configurations where strong currents and small grid cells exert  
    240 the strongest constraint on the time step. 
    241221 
    242222% ------------------------------------------------------------------------------------------------------------- 
     
    288268%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    289269\begin{figure}[!t]     \begin{center} 
    290 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_MLF_forcing.pdf} 
     270\includegraphics[width=0.90\textwidth]{Fig_MLF_forcing} 
    291271\caption{   \label{Fig_MLF_forcing} 
    292272Illustration of forcing integration methods.  
     
    424404} 
    425405%% 
     406\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_TRA.tex

    r5102 r7351  
    1 % ================================================================ 
    2 % Chapter 1 � Ocean Tracers (TRA) 
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
     3% ================================================================ 
     4% Chapter 1 ——— Ocean Tracers (TRA) 
    35% ================================================================ 
    46\chapter{Ocean Tracers (TRA)} 
     
    3638(BBL) parametrisation, and an internal damping (DMP) term. The terms QSR,  
    3739BBC, BBL and DMP are optional. The external forcings and parameterisations  
    38 require complex inputs and complex calculations (e.g. bulk formulae, estimation  
     40require complex inputs and complex calculations ($e.g.$ bulk formulae, estimation  
    3941of mixing coefficients) that are carried out in the SBC, LDF and ZDF modules and  
    4042described in chapters \S\ref{SBC}, \S\ref{LDF} and  \S\ref{ZDF}, respectively.  
    41 Note that \mdl{tranpc}, the non-penetrative convection module,  although  
    42 (temporarily) located in the NEMO/OPA/TRA directory, is described with the  
    43 model vertical physics (ZDF). 
    44 %%% 
    45 \gmcomment{change the position of eosbn2 in the reference code} 
    46 %%% 
     43Note that \mdl{tranpc}, the non-penetrative convection module, although  
     44located in the NEMO/OPA/TRA directory as it directly modifies the tracer fields,  
     45is described with the model vertical physics (ZDF) together with other available  
     46parameterization of convection. 
    4747 
    4848In the present chapter we also describe the diagnostic equations used to compute  
    49 the sea-water properties (density, Brunt-Vais\"{a}l\"{a} frequency, specific heat and  
     49the sea-water properties (density, Brunt-V\"{a}is\"{a}l\"{a} frequency, specific heat and  
    5050freezing point with associated modules \mdl{eosbn2} and \mdl{phycst}). 
    5151 
    52 The different options available to the user are managed by namelist logicals or  
    53 CPP keys. For each equation term \textit{ttt}, the namelist logicals are \textit{ln\_trattt\_xxx},  
     52The different options available to the user are managed by namelist logicals or CPP keys.  
     53For each equation term  \textit{TTT}, the namelist logicals are \textit{ln\_traTTT\_xxx},  
    5454where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme.  
    55 The CPP key (when it exists) is \textbf{key\_trattt}. The equivalent code can be  
    56 found in the \textit{trattt} or \textit{trattt\_xxx} module, in the NEMO/OPA/TRA directory. 
    57  
    58 The user has the option of extracting each tendency term on the rhs of the tracer  
    59 equation for output (\key{trdtra} is defined), as described in Chap.~\ref{MISC}. 
     55The CPP key (when it exists) is \textbf{key\_traTTT}. The equivalent code can be  
     56found in the \textit{traTTT} or \textit{traTTT\_xxx} module, in the NEMO/OPA/TRA directory. 
     57 
     58The user has the option of extracting each tendency term on the RHS of the tracer  
     59equation for output (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}~=~true), as described in Chap.~\ref{DIA}. 
    6060 
    6161$\ $\newline    % force a new ligne 
     
    7070%------------------------------------------------------------------------------------------------------------- 
    7171 
    72 The advection tendency of a tracer in flux form is the divergence of the advective  
    73 fluxes. Its discrete expression is given by : 
     72When considered ($i.e.$ when \np{ln\_traadv\_NONE} is not set to \textit{true}),  
     73the advection tendency of a tracer is expressed in flux form,  
     74$i.e.$ as the divergence of the advective fluxes. Its discrete expression is given by : 
    7475\begin{equation} \label{Eq_tra_adv} 
    7576ADV_\tau =-\frac{1}{b_t} \left(  
     
    8283implicitly requires the use of the continuity equation. Indeed, it is obtained 
    8384by using the following equality : $\nabla \cdot \left( \vect{U}\,T \right)=\vect{U} \cdot \nabla T$  
    84 which results from the use of the continuity equation, $\nabla \cdot \vect{U}=0$ or  
    85 $ \partial _t e_3 + e_3\;\nabla \cdot \vect{U}=0$ in constant volume or variable volume case, respectively.  
     85which results from the use of the continuity equation,  $\partial _t e_3 + e_3\;\nabla \cdot \vect{U}=0$  
     86(which reduces to $\nabla \cdot \vect{U}=0$ in linear free surface, $i.e.$ \np{ln\_linssh}=true).  
    8687Therefore it is of paramount importance to design the discrete analogue of the  
    8788advection tendency so that it is consistent with the continuity equation in order to  
    8889enforce the conservation properties of the continuous equations. In other words,  
    89 by replacing $\tau$ by the number 1 in (\ref{Eq_tra_adv}) we recover the discrete form of  
     90by setting $\tau = 1$ in (\ref{Eq_tra_adv}) we recover the discrete form of  
    9091the continuity equation which is used to calculate the vertical velocity. 
    9192%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    9293\begin{figure}[!t]    \begin{center} 
    93 \includegraphics[width=0.9\textwidth]{./TexFiles/Figures/Fig_adv_scheme.pdf} 
     94\includegraphics[width=0.9\textwidth]{Fig_adv_scheme} 
    9495\caption{   \label{Fig_adv_scheme}  
    9596Schematic representation of some ways used to evaluate the tracer value  
     
    113114boundary condition depends on the type of sea surface chosen:  
    114115\begin{description} 
    115 \item [linear free surface:] the first level thickness is constant in time:  
     116\item [linear free surface:] (\np{ln\_linssh}=true) the first level thickness is constant in time:  
    116117the vertical boundary condition is applied at the fixed surface $z=0$  
    117118rather than on the moving surface $z=\eta$. There is a non-zero advective  
     
    119120$\left. {\tau _w } \right|_{k=1/2} =T_{k=1} $, $i.e.$  
    120121the product of surface velocity (at $z=0$) by the first level tracer value. 
    121 \item [non-linear free surface:] (\key{vvl} is defined)  
     122\item [non-linear free surface:] (\np{ln\_linssh}=false)  
    122123convergence/divergence in the first ocean level moves the free surface  
    123124up/down. There is no tracer advection through it so that the advective  
     
    125126\end{description} 
    126127In all cases, this boundary condition retains local conservation of tracer.  
    127 Global conservation is obtained in both rigid-lid and non-linear free surface  
    128 cases, but not in the linear free surface case. Nevertheless, in the latter 
    129 case, it is achieved to a good approximation since the non-conservative  
     128Global conservation is obtained in non-linear free surface case,  
     129but \textit{not} in the linear free surface case. Nevertheless, in the latter case,  
     130it is achieved to a good approximation since the non-conservative  
    130131term is the product of the time derivative of the tracer and the free surface  
    131 height, two quantities that are not correlated (see \S\ref{PE_free_surface},  
    132 and also \citet{Roullet_Madec_JGR00,Griffies_al_MWR01,Campin2004}). 
     132height, two quantities that are not correlated \citep{Roullet_Madec_JGR00,Griffies_al_MWR01,Campin2004}. 
    133133 
    134134The velocity field that appears in (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_zco})  
    135 is the centred (\textit{now}) \textit{eulerian} ocean velocity (see Chap.~\ref{DYN}).  
    136 When eddy induced velocity (\textit{eiv}) parameterisation is used it is the \textit{now}  
    137 \textit{effective} velocity ($i.e.$ the sum of the eulerian and eiv velocities) which is used. 
    138  
    139 The choice of an advection scheme is made in the \textit{\ngn{nam\_traadv}} namelist, by  
    140 setting to \textit{true} one and only one of the logicals \textit{ln\_traadv\_xxx}. The  
    141 corresponding code can be found in the \textit{traadv\_xxx.F90} module, where  
    142 \textit{xxx} is a 3 or 4 letter acronym corresponding to each scheme. Details  
    143 of the advection schemes are given below. The choice of an advection scheme  
     135is the centred (\textit{now}) \textit{effective} ocean velocity, $i.e.$ the \textit{eulerian} velocity 
     136(see Chap.~\ref{DYN}) plus the eddy induced velocity (\textit{eiv})  
     137and/or the mixed layer eddy induced velocity (\textit{eiv}) 
     138when those parameterisations are used (see Chap.~\ref{LDF}). 
     139 
     140Several tracer advection scheme are proposed, namely  
     141a $2^{nd}$ or $4^{th}$ order centred schemes (CEN),  
     142a $2^{nd}$ or $4^{th}$ order Flux Corrected Transport scheme (FCT), 
     143a Monotone Upstream Scheme for Conservative Laws scheme (MUSCL), 
     144a $3^{rd}$ Upstream Biased Scheme (UBS, also often called UP3), and 
     145a Quadratic Upstream Interpolation for Convective Kinematics with  
     146Estimated Streaming Terms scheme (QUICKEST). 
     147The choice is made in the \textit{\ngn{namtra\_adv}} namelist, by  
     148setting to \textit{true} one of the logicals \textit{ln\_traadv\_xxx}.  
     149The corresponding code can be found in the \textit{traadv\_xxx.F90} module,  
     150where \textit{xxx} is a 3 or 4 letter acronym corresponding to each scheme.  
     151By default ($i.e.$ in the reference namelist, \ngn{namelist\_ref}), all the logicals  
     152are set to \textit{false}. If the user does not select an advection scheme  
     153in the configuration namelist (\ngn{namelist\_cfg}), the tracers will \textit{not} be advected ! 
     154 
     155Details of the advection schemes are given below. The choosing an advection scheme  
    144156is a complex matter which depends on the model physics, model resolution,  
    145 type of tracer, as well as the issue of numerical cost.  
    146  
    147 Note that  
    148 (1) cen2, cen4 and TVD schemes require an explicit diffusion  
    149 operator while the other schemes are diffusive enough so that they do not  
    150 require additional diffusion ;  
    151 (2) cen2, cen4, MUSCL2, and UBS are not \textit{positive} schemes 
     157type of tracer, as well as the issue of numerical cost. In particular, we note that 
     158(1) CEN and FCT schemes require an explicit diffusion operator  
     159while the other schemes are diffusive enough so that they do not necessarily need additional diffusion ;  
     160(2) CEN and UBS are not \textit{positive} schemes 
    152161\footnote{negative values can appear in an initially strictly positive tracer field  
    153162which is advected} 
     
    163172 
    164173% ------------------------------------------------------------------------------------------------------------- 
     174%        2nd and 4th order centred schemes 
     175% ------------------------------------------------------------------------------------------------------------- 
     176\subsection [Centred schemes (CEN) (\np{ln\_traadv\_cen})] 
     177            {Centred schemes (CEN) (\np{ln\_traadv\_cen}=true)} 
     178\label{TRA_adv_cen} 
     179 
    165180%        2nd order centred scheme   
    166 % ------------------------------------------------------------------------------------------------------------- 
    167 \subsection   [$2^{nd}$ order centred scheme (cen2) (\np{ln\_traadv\_cen2})] 
    168          {$2^{nd}$ order centred scheme (cen2) (\np{ln\_traadv\_cen2}=true)} 
    169 \label{TRA_adv_cen2} 
    170  
    171 In the centred second order formulation, the tracer at velocity points is  
    172 evaluated as the mean of the two neighbouring $T$-point values.  
     181 
     182The centred advection scheme (CEN) is used when \np{ln\_traadv\_cen}~=~\textit{true}.  
     183Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level)  
     184and vertical direction by setting \np{nn\_cen\_h} and \np{nn\_cen\_v} to $2$ or $4$.  
     185CEN implementation can be found in the \mdl{traadv\_cen} module. 
     186 
     187In the $2^{nd}$ order centred formulation (CEN2), the tracer at velocity points  
     188is evaluated as the mean of the two neighbouring $T$-point values.  
    173189For example, in the $i$-direction : 
    174190\begin{equation} \label{Eq_tra_adv_cen2} 
     
    176192\end{equation} 
    177193 
    178 The scheme is non diffusive ($i.e.$ it conserves the tracer variance, $\tau^2)$  
     194CEN2 is non diffusive ($i.e.$ it conserves the tracer variance, $\tau^2)$  
    179195but dispersive ($i.e.$ it may create false extrema). It is therefore notoriously  
    180196noisy and must be used in conjunction with an explicit diffusion operator to  
    181197produce a sensible solution. The associated time-stepping is performed using  
    182198a leapfrog scheme in conjunction with an Asselin time-filter, so $T$ in  
    183 (\ref{Eq_tra_adv_cen2}) is the \textit{now} tracer value. The centered second  
    184 order advection is computed in the \mdl{traadv\_cen2} module. In this module, 
    185 it is advantageous to combine the \textit{cen2} scheme with an upstream scheme 
    186 in specific areas which require a strong diffusion in order to avoid the generation  
    187 of false extrema. These areas are the vicinity of large river mouths, some straits  
    188 with coarse resolution, and the vicinity of ice cover area ($i.e.$ when the ocean  
    189 temperature is close to the freezing point). 
    190 This combined scheme has been included for specific grid points in the ORCA2  
    191 and ORCA4 configurations only. This is an obsolescent feature as the recommended  
    192 advection scheme for the ORCA configuration is TVD (see  \S\ref{TRA_adv_tvd}). 
    193  
    194 Note that using the cen2 scheme, the overall tracer advection is of second  
     199(\ref{Eq_tra_adv_cen2}) is the \textit{now} tracer value.  
     200 
     201Note that using the CEN2, the overall tracer advection is of second  
    195202order accuracy since both (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_cen2})  
    196 have this order of accuracy. \gmcomment{Note also that ... blah, blah} 
    197  
    198 % ------------------------------------------------------------------------------------------------------------- 
     203have this order of accuracy. 
     204 
    199205%        4nd order centred scheme   
    200 % ------------------------------------------------------------------------------------------------------------- 
    201 \subsection   [$4^{nd}$ order centred scheme (cen4) (\np{ln\_traadv\_cen4})] 
    202            {$4^{nd}$ order centred scheme (cen4) (\np{ln\_traadv\_cen4}=true)} 
    203 \label{TRA_adv_cen4} 
    204  
    205 In the $4^{th}$ order formulation (to be implemented), tracer values are  
    206 evaluated at velocity points as a $4^{th}$ order interpolation, and thus depend on  
    207 the four neighbouring $T$-points. For example, in the $i$-direction: 
     206 
     207In the $4^{th}$ order formulation (CEN4), tracer values are evaluated at u- and v-points as  
     208a $4^{th}$ order interpolation, and thus depend on the four neighbouring $T$-points.  
     209For example, in the $i$-direction: 
    208210\begin{equation} \label{Eq_tra_adv_cen4} 
    209211\tau _u^{cen4}  
    210212=\overline{   T - \frac{1}{6}\,\delta _i \left[ \delta_{i+1/2}[T] \,\right]   }^{\,i+1/2} 
    211213\end{equation} 
    212  
    213 Strictly speaking, the cen4 scheme is not a $4^{th}$ order advection scheme  
     214In the vertical direction (\np{nn\_cen\_v}=$4$), a $4^{th}$ COMPACT interpolation  
     215has been prefered \citep{Demange_PhD2014}. 
     216In the COMPACT scheme, both the field and its derivative are interpolated,  
     217which leads, after a matrix inversion, spectral characteristics  
     218similar to schemes of higher order \citep{Lele_JCP1992}. 
     219  
     220 
     221Strictly speaking, the CEN4 scheme is not a $4^{th}$ order advection scheme  
    214222but a $4^{th}$ order evaluation of advective fluxes, since the divergence of  
    215 advective fluxes \eqref{Eq_tra_adv} is kept at $2^{nd}$ order. The phrase ``$4^{th}$  
    216 order scheme'' used in oceanographic literature is usually associated  
    217 with the scheme presented here. Introducing a \textit{true} $4^{th}$ order advection  
    218 scheme is feasible but, for consistency reasons, it requires changes in the  
    219 discretisation of the tracer advection together with changes in both the  
    220 continuity equation and the momentum advection terms.   
     223advective fluxes \eqref{Eq_tra_adv} is kept at $2^{nd}$ order.  
     224The expression \textit{$4^{th}$ order scheme} used in oceanographic literature  
     225is usually associated with the scheme presented here.  
     226Introducing a \textit{true} $4^{th}$ order advection scheme is feasible but,  
     227for consistency reasons, it requires changes in the discretisation of the tracer  
     228advection together with changes in the continuity equation,  
     229and the momentum advection and pressure terms.   
    221230 
    222231A direct consequence of the pseudo-fourth order nature of the scheme is that  
    223 it is not non-diffusive, i.e. the global variance of a tracer is not preserved using  
    224 \textit{cen4}. Furthermore, it must be used in conjunction with an explicit  
    225 diffusion operator to produce a sensible solution. The time-stepping is also  
    226 performed using a leapfrog scheme in conjunction with an Asselin time-filter,  
    227 so $T$ in (\ref{Eq_tra_adv_cen4}) is the \textit{now} tracer. 
    228  
    229 At a $T$-grid cell adjacent to a boundary (coastline, bottom and surface), an  
    230 additional hypothesis must be made to evaluate $\tau _u^{cen4}$. This  
    231 hypothesis usually reduces the order of the scheme. Here we choose to set  
    232 the gradient of $T$ across the boundary to zero. Alternative conditions can be  
    233 specified, such as a reduction to a second order scheme for these near boundary  
    234 grid points. 
    235  
    236 % ------------------------------------------------------------------------------------------------------------- 
    237 %        TVD scheme   
    238 % ------------------------------------------------------------------------------------------------------------- 
    239 \subsection   [Total Variance Dissipation scheme (TVD) (\np{ln\_traadv\_tvd})] 
    240          {Total Variance Dissipation scheme (TVD) (\np{ln\_traadv\_tvd}=true)} 
     232it is not non-diffusive, $i.e.$ the global variance of a tracer is not preserved using CEN4.  
     233Furthermore, it must be used in conjunction with an explicit diffusion operator  
     234to produce a sensible solution.  
     235As in CEN2 case, the time-stepping is performed using a leapfrog scheme in conjunction  
     236with an Asselin time-filter, so $T$ in (\ref{Eq_tra_adv_cen4}) is the \textit{now} tracer. 
     237 
     238At a $T$-grid cell adjacent to a boundary (coastline, bottom and surface),  
     239an additional hypothesis must be made to evaluate $\tau _u^{cen4}$.  
     240This hypothesis usually reduces the order of the scheme.  
     241Here we choose to set the gradient of $T$ across the boundary to zero.  
     242Alternative conditions can be specified, such as a reduction to a second order scheme  
     243for these near boundary grid points. 
     244 
     245% ------------------------------------------------------------------------------------------------------------- 
     246%        FCT scheme   
     247% ------------------------------------------------------------------------------------------------------------- 
     248\subsection   [Flux Corrected Transport schemes (FCT) (\np{ln\_traadv\_fct})] 
     249         {Flux Corrected Transport schemes (FCT) (\np{ln\_traadv\_fct}=true)} 
    241250\label{TRA_adv_tvd} 
    242251 
    243 In the Total Variance Dissipation (TVD) formulation, the tracer at velocity  
    244 points is evaluated using a combination of an upstream and a centred scheme.  
    245 For example, in the $i$-direction : 
    246 \begin{equation} \label{Eq_tra_adv_tvd} 
     252The Flux Corrected Transport schemes (FCT) is used when \np{ln\_traadv\_fct}~=~\textit{true}.  
     253Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level)  
     254and vertical direction by setting \np{nn\_fct\_h} and \np{nn\_fct\_v} to $2$ or $4$. 
     255FCT implementation can be found in the \mdl{traadv\_fct} module. 
     256 
     257In FCT formulation, the tracer at velocity points is evaluated using a combination of  
     258an upstream and a centred scheme. For example, in the $i$-direction : 
     259\begin{equation} \label{Eq_tra_adv_fct} 
    247260\begin{split} 
    248261\tau _u^{ups}&= \begin{cases} 
     
    251264              \end{cases}     \\ 
    252265\\ 
    253 \tau _u^{tvd}&=\tau _u^{ups} +c_u \;\left( {\tau _u^{cen2} -\tau _u^{ups} } \right) 
     266\tau _u^{fct}&=\tau _u^{ups} +c_u \;\left( {\tau _u^{cen} -\tau _u^{ups} } \right) 
    254267\end{split} 
    255268\end{equation} 
    256269where $c_u$ is a flux limiter function taking values between 0 and 1.  
     270The FCT order is the one of the centred scheme used ($i.e.$ it depends on the setting of 
     271\np{nn\_fct\_h} and \np{nn\_fct\_v}. 
    257272There exist many ways to define $c_u$, each corresponding to a different  
    258 total variance decreasing scheme. The one chosen in \NEMO is described in  
    259 \citet{Zalesak_JCP79}. $c_u$ only departs from $1$ when the advective term  
    260 produces a local extremum in the tracer field. The resulting scheme is quite  
    261 expensive but \emph{positive}. It can be used on both active and passive tracers.  
    262 This scheme is tested and compared with MUSCL and the MPDATA scheme in  
    263 \citet{Levy_al_GRL01}; note that in this paper it is referred to as "FCT" (Flux corrected  
    264 transport) rather than TVD. The TVD scheme is implemented in the \mdl{traadv\_tvd} module. 
    265  
    266 For stability reasons (see \S\ref{STP}), 
    267 $\tau _u^{cen2}$ is evaluated  in (\ref{Eq_tra_adv_tvd}) using the \textit{now} tracer while $\tau _u^{ups}$  
    268 is evaluated using the \textit{before} tracer. In other words, the advective part of  
    269 the scheme is time stepped with a leap-frog scheme while a forward scheme is  
    270 used for the diffusive part.  
     273FCT scheme. The one chosen in \NEMO is described in \citet{Zalesak_JCP79}.  
     274$c_u$ only departs from $1$ when the advective term produces a local extremum in the tracer field.  
     275The resulting scheme is quite expensive but \emph{positive}.  
     276It can be used on both active and passive tracers.  
     277A comparison of FCT-2 with MUSCL and a MPDATA scheme can be found in \citet{Levy_al_GRL01}.  
     278 
     279An additional option has been added controlled by \np{nn\_fct\_zts}. By setting this integer to  
     280a value larger than zero, a $2^{nd}$ order FCT scheme is used on both horizontal and vertical direction,  
     281but on the latter, a split-explicit time stepping is used, with a number of sub-timestep equals 
     282to \np{nn\_fct\_zts}. This option can be useful when the size of the timestep is limited  
     283by vertical advection \citep{Lemarie_OM2015}. Note that in this case, a similar split-explicit  
     284time stepping should be used on vertical advection of momentum to insure a better stability 
     285(see \S\ref{DYN_zad}). 
     286 
     287For stability reasons (see \S\ref{STP}), $\tau _u^{cen}$ is evaluated in (\ref{Eq_tra_adv_fct})  
     288using the \textit{now} tracer while $\tau _u^{ups}$ is evaluated using the \textit{before} tracer. In other words,  
     289the advective part of the scheme is time stepped with a leap-frog scheme  
     290while a forward scheme is used for the diffusive part.  
    271291 
    272292% ------------------------------------------------------------------------------------------------------------- 
    273293%        MUSCL scheme   
    274294% ------------------------------------------------------------------------------------------------------------- 
    275 \subsection[MUSCL scheme  (\np{ln\_traadv\_muscl})] 
    276    {Monotone Upstream Scheme for Conservative Laws (MUSCL) (\np{ln\_traadv\_muscl}=T)} 
    277 \label{TRA_adv_muscl} 
    278  
    279 The Monotone Upstream Scheme for Conservative Laws (MUSCL) has been  
    280 implemented by \citet{Levy_al_GRL01}. In its formulation, the tracer at velocity points  
     295\subsection[MUSCL scheme  (\np{ln\_traadv\_mus})] 
     296   {Monotone Upstream Scheme for Conservative Laws (MUSCL) (\np{ln\_traadv\_mus}=T)} 
     297\label{TRA_adv_mus} 
     298 
     299The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln\_traadv\_mus}~=~\textit{true}.  
     300MUSCL implementation can be found in the \mdl{traadv\_mus} module. 
     301 
     302MUSCL has been first implemented in \NEMO by \citet{Levy_al_GRL01}. In its formulation, the tracer at velocity points  
    281303is evaluated assuming a linear tracer variation between two $T$-points  
    282304(Fig.\ref{Fig_adv_scheme}). For example, in the $i$-direction : 
    283 \begin{equation} \label{Eq_tra_adv_muscl} 
     305\begin{equation} \label{Eq_tra_adv_mus} 
    284306   \tau _u^{mus} = \left\{      \begin{aligned} 
    285307         &\tau _i  &+ \frac{1}{2} \;\left( 1-\frac{u_{i+1/2} \;\rdt}{e_{1u}} \right) 
     
    296318 
    297319For an ocean grid point adjacent to land and where the ocean velocity is  
    298 directed toward land, two choices are available: an upstream flux  
    299 (\np{ln\_traadv\_muscl}=true) or a second order flux  
    300 (\np{ln\_traadv\_muscl2}=true). Note that the latter choice does not ensure  
    301 the \textit{positive} character of the scheme. Only the former can be used  
    302 on both active and passive tracers. The two MUSCL schemes are implemented  
    303 in the \mdl{traadv\_tvd} and \mdl{traadv\_tvd2} modules. 
     320directed toward land, an upstream flux is used. This choice ensure  
     321the \textit{positive} character of the scheme.  
     322In addition, fluxes round a grid-point where a runoff is applied can optionally be  
     323computed using upstream fluxes (\np{ln\_mus\_ups}~=~\textit{true}). 
    304324 
    305325% ------------------------------------------------------------------------------------------------------------- 
     
    310330\label{TRA_adv_ubs} 
    311331 
    312 The UBS advection scheme is an upstream-biased third order scheme based on  
    313 an upstream-biased parabolic interpolation. It is also known as the Cell  
    314 Averaged QUICK scheme (Quadratic Upstream Interpolation for Convective  
    315 Kinematics). For example, in the $i$-direction : 
     332The Upstream-Biased Scheme (UBS) is used when \np{ln\_traadv\_ubs}~=~\textit{true}.  
     333UBS implementation can be found in the \mdl{traadv\_mus} module. 
     334 
     335The UBS scheme, often called UP3, is also known as the Cell Averaged QUICK scheme  
     336(Quadratic Upstream Interpolation for Convective Kinematics). It is an upstream-biased  
     337third order scheme based on an upstream-biased parabolic interpolation.   
     338For example, in the $i$-direction : 
    316339\begin{equation} \label{Eq_tra_adv_ubs} 
    317340   \tau _u^{ubs} =\overline T ^{i+1/2}-\;\frac{1}{6} \left\{       
     
    324347 
    325348This results in a dissipatively dominant (i.e. hyper-diffusive) truncation  
    326 error \citep{Shchepetkin_McWilliams_OM05}. The overall performance of the advection  
    327 scheme is similar to that reported in \cite{Farrow1995}.  
     349error \citep{Shchepetkin_McWilliams_OM05}. The overall performance of 
     350 the advection scheme is similar to that reported in \cite{Farrow1995}.  
    328351It is a relatively good compromise between accuracy and smoothness.  
    329 It is not a \emph{positive} scheme, meaning that false extrema are permitted,  
     352Nevertheless the scheme is not \emph{positive}, meaning that false extrema are permitted,  
    330353but the amplitude of such are significantly reduced over the centred second  
    331 order method. Nevertheless it is not recommended that it should be applied  
    332 to a passive tracer that requires positivity.  
     354or fourth order method. therefore it is not recommended that it should be  
     355applied to a passive tracer that requires positivity.  
    333356 
    334357The intrinsic diffusion of UBS makes its use risky in the vertical direction  
    335 where the control of artificial diapycnal fluxes is of paramount importance.  
    336 Therefore the vertical flux is evaluated using the TVD scheme when  
    337 \np{ln\_traadv\_ubs}=true. 
     358where the control of artificial diapycnal fluxes is of paramount importance \citep{Shchepetkin_McWilliams_OM05, Demange_PhD2014}.  
     359Therefore the vertical flux is evaluated using either a $2^nd$ order FCT scheme  
     360or a $4^th$ order COMPACT scheme (\np{nn\_cen\_v}=2 or 4). 
    338361 
    339362For stability reasons  (see \S\ref{STP}), 
    340 the first term  in \eqref{Eq_tra_adv_ubs} (which corresponds to a second order centred scheme)  
    341 is evaluated using the \textit{now} tracer (centred in time) while the  
    342 second term (which is the diffusive part of the scheme), is  
     363the first term  in \eqref{Eq_tra_adv_ubs} (which corresponds to a second order  
     364centred scheme) is evaluated using the \textit{now} tracer (centred in time)  
     365while the second term (which is the diffusive part of the scheme), is  
    343366evaluated using the \textit{before} tracer (forward in time).  
    344367This choice is discussed by \citet{Webb_al_JAOT98} in the context of the  
     
    350373substitution in the \mdl{traadv\_ubs} module and obtain a QUICK scheme. 
    351374 
    352 Four different options are possible for the vertical  
    353 component used in the UBS scheme. $\tau _w^{ubs}$ can be evaluated  
    354 using either \textit{(a)} a centred $2^{nd}$ order scheme, or  \textit{(b)}  
    355 a TVD scheme, or  \textit{(c)} an interpolation based on conservative  
    356 parabolic splines following the \citet{Shchepetkin_McWilliams_OM05}  
    357 implementation of UBS in ROMS, or  \textit{(d)} a UBS. The $3^{rd}$ case  
    358 has dispersion properties similar to an eighth-order accurate conventional scheme. 
    359 The current reference version uses method b) 
    360  
    361 Note that : 
    362  
    363 (1) When a high vertical resolution $O(1m)$ is used, the model stability can  
    364 be controlled by vertical advection (not vertical diffusion which is usually  
    365 solved using an implicit scheme). Computer time can be saved by using a  
    366 time-splitting technique on vertical advection. Such a technique has been  
    367 implemented and validated in ORCA05 with 301 levels. It is not available  
    368 in the current reference version.  
    369  
    370 (2) It is straightforward to rewrite \eqref{Eq_tra_adv_ubs} as follows: 
     375Note that it is straightforward to rewrite \eqref{Eq_tra_adv_ubs} as follows: 
    371376\begin{equation} \label{Eq_traadv_ubs2} 
    372377\tau _u^{ubs} = \tau _u^{cen4} + \frac{1}{12} \left\{   
     
    390395Thirdly, the diffusion term is in fact a biharmonic operator with an eddy  
    391396coefficient which is simply proportional to the velocity: 
    392  $A_u^{lm}= - \frac{1}{12}\,{e_{1u}}^3\,|u|$. Note that NEMO v3.4 still uses  
    393  \eqref{Eq_tra_adv_ubs}, not \eqref{Eq_traadv_ubs2}. 
    394  %%% 
    395  \gmcomment{the change in UBS scheme has to be done} 
    396  %%% 
     397 $A_u^{lm}= \frac{1}{12}\,{e_{1u}}^3\,|u|$. Note the current version of NEMO uses  
     398the computationally more efficient formulation \eqref{Eq_tra_adv_ubs}. 
    397399 
    398400% ------------------------------------------------------------------------------------------------------------- 
     
    405407The Quadratic Upstream Interpolation for Convective Kinematics with  
    406408Estimated Streaming Terms (QUICKEST) scheme proposed by \citet{Leonard1979}  
    407 is the third order Godunov scheme. It is associated with the ULTIMATE QUICKEST  
     409is used when \np{ln\_traadv\_qck}~=~\textit{true}.  
     410QUICKEST implementation can be found in the \mdl{traadv\_qck} module. 
     411 
     412QUICKEST is the third order Godunov scheme which is associated with the ULTIMATE QUICKEST  
    408413limiter \citep{Leonard1991}. It has been implemented in NEMO by G. Reffray  
    409414(MERCATOR-ocean) and can be found in the \mdl{traadv\_qck} module. 
     
    413418direction where the control of artificial diapycnal fluxes is of paramount importance.  
    414419Therefore the vertical flux is evaluated using the CEN2 scheme.  
    415 This no longer guarantees the positivity of the scheme. The use of TVD in the vertical  
    416 direction (as for the UBS case) should be implemented to restore this property. 
    417  
    418  
    419 % ------------------------------------------------------------------------------------------------------------- 
    420 %        PPM scheme   
    421 % ------------------------------------------------------------------------------------------------------------- 
    422 \subsection   [Piecewise Parabolic Method (PPM) (\np{ln\_traadv\_ppm})] 
    423          {Piecewise Parabolic Method (PPM) (\np{ln\_traadv\_ppm}=true)} 
    424 \label{TRA_adv_ppm} 
    425  
    426 The Piecewise Parabolic Method (PPM) proposed by Colella and Woodward (1984)  
    427 \sgacomment{reference?} 
    428 is based on a quadradic piecewise construction. Like the QCK scheme, it is associated  
    429 with the ULTIMATE QUICKEST limiter \citep{Leonard1991}. It has been implemented  
    430 in \NEMO by G. Reffray (MERCATOR-ocean) but is not yet offered in the reference  
    431 version 3.3. 
     420This no longer guarantees the positivity of the scheme.  
     421The use of FCT in the vertical direction (as for the UBS case) should be implemented  
     422to restore this property. 
     423 
     424%%%gmcomment   :  Cross term are missing in the current implementation.... 
     425 
    432426 
    433427% ================================================================ 
     
    441435%------------------------------------------------------------------------------------------------------------- 
    442436  
    443 Options are defined through the  \ngn{namtra\_ldf} namelist variables. 
    444 The options available for lateral diffusion are a laplacian (rotated or not)  
    445 or a biharmonic operator, the latter being more scale-selective (more  
    446 diffusive at small scales). The specification of eddy diffusivity  
    447 coefficients (either constant or variable in space and time) as well as the  
    448 computation of the slope along which the operators act, are performed in the  
    449 \mdl{ldftra} and \mdl{ldfslp} modules, respectively. This is described in Chap.~\ref{LDF}.  
     437Options are defined through the \ngn{namtra\_ldf} namelist variables. 
     438They are regrouped in four items, allowing to specify  
     439$(i)$   the type of operator used (none, laplacian, bilaplacian),  
     440$(ii)$  the direction along which the operator acts (iso-level, horizontal, iso-neutral),  
     441$(iii)$ some specific options related to the rotated operators ($i.e.$ non-iso-level operator), and  
     442$(iv)$  the specification of eddy diffusivity coefficient (either constant or variable in space and time). 
     443Item $(iv)$ will be described in Chap.\ref{LDF} . 
     444The direction along which the operators act is defined through the slope between this direction and the iso-level surfaces. 
     445The slope is computed in the \mdl{ldfslp} module and will also be described in Chap.~\ref{LDF}.  
     446 
    450447The lateral diffusion of tracers is evaluated using a forward scheme,  
    451448$i.e.$ the tracers appearing in its expression are the \textit{before} tracers in time,  
    452 except for the pure vertical component that appears when a rotation tensor  
    453 is used. This latter term is solved implicitly together with the  
    454 vertical diffusion term (see \S\ref{STP}). 
    455  
    456 % ------------------------------------------------------------------------------------------------------------- 
    457 %        Iso-level laplacian operator 
    458 % ------------------------------------------------------------------------------------------------------------- 
    459 \subsection   [Iso-level laplacian operator (lap) (\np{ln\_traldf\_lap})] 
    460          {Iso-level laplacian operator (lap) (\np{ln\_traldf\_lap}=true) } 
    461 \label{TRA_ldf_lap} 
    462  
    463 A laplacian diffusion operator ($i.e.$ a harmonic operator) acting along the model  
    464 surfaces is given by:  
     449except for the pure vertical component that appears when a rotation tensor is used.  
     450This latter component is solved implicitly together with the vertical diffusion term (see \S\ref{STP}).  
     451When \np{ln\_traldf\_msc}~=~\textit{true}, a Method of Stabilizing Correction is used in which  
     452the pure vertical component is split into an explicit and an implicit part \citep{Lemarie_OM2012}. 
     453 
     454% ------------------------------------------------------------------------------------------------------------- 
     455%        Type of operator 
     456% ------------------------------------------------------------------------------------------------------------- 
     457\subsection   [Type of operator (\np{ln\_traldf\_NONE}, \np{ln\_traldf\_lap}, \np{ln\_traldf\_blp})] 
     458              {Type of operator (\np{ln\_traldf\_NONE}, \np{ln\_traldf\_lap}, or \np{ln\_traldf\_blp} = true) }  
     459\label{TRA_ldf_op} 
     460 
     461Three operator options are proposed and, one and only one of them must be selected: 
     462\begin{description} 
     463\item [\np{ln\_traldf\_NONE}] = true : no operator selected, the lateral diffusive tendency will not be  
     464applied to the tracer equation. This option can be used when the selected advection scheme  
     465is diffusive enough (MUSCL scheme for example). 
     466\item [ \np{ln\_traldf\_lap}] = true : a laplacian operator is selected. This harmonic operator  
     467takes the following expression:  $\mathpzc{L}(T)=\nabla \cdot A_{ht}\;\nabla T $,  
     468where the gradient operates along the selected direction (see \S\ref{TRA_ldf_dir}), 
     469and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see Chap.~\ref{LDF}). 
     470\item [\np{ln\_traldf\_blp}] = true : a bilaplacian operator is selected. This biharmonic operator  
     471takes the following expression:   
     472$\mathpzc{B}=- \mathpzc{L}\left(\mathpzc{L}(T) \right) = -\nabla \cdot b\nabla \left( {\nabla \cdot b\nabla T} \right)$  
     473where the gradient operats along the selected direction, 
     474and $b^2=B_{ht}$ is the eddy diffusivity coefficient expressed in $m^4/s$  (see Chap.~\ref{LDF}). 
     475In the code, the bilaplacian operator is obtained by calling the laplacian twice. 
     476\end{description} 
     477 
     478Both laplacian and bilaplacian operators ensure the total tracer variance decrease.  
     479Their primary role is to provide strong dissipation at the smallest scale supported  
     480by the grid while minimizing the impact on the larger scale features.  
     481The main difference between the two operators is the scale selectiveness.  
     482The bilaplacian damping time ($i.e.$ its spin down time) scales like $\lambda^{-4}$  
     483for disturbances of wavelength $\lambda$ (so that short waves damped more rapidelly than long ones),  
     484whereas the laplacian damping time scales only like $\lambda^{-2}$. 
     485 
     486 
     487% ------------------------------------------------------------------------------------------------------------- 
     488%        Direction of action 
     489% ------------------------------------------------------------------------------------------------------------- 
     490\subsection   [Direction of action (\np{ln\_traldf\_lev}, \np{ln\_traldf\_hor}, \np{ln\_traldf\_iso}, \np{ln\_traldf\_triad})] 
     491              {Direction of action (\np{ln\_traldf\_lev}, \textit{...\_hor}, \textit{...\_iso}, or \textit{...\_triad} = true) }  
     492\label{TRA_ldf_dir} 
     493 
     494The choice of a direction of action determines the form of operator used.  
     495The operator is a simple (re-entrant) laplacian acting in the (\textbf{i},\textbf{j}) plane  
     496when iso-level option is used (\np{ln\_traldf\_lev}~=~\textit{true}) 
     497or when a horizontal ($i.e.$ geopotential) operator is demanded in \textit{z}-coordinate  
     498(\np{ln\_traldf\_hor} and \np{ln\_zco} equal \textit{true}).  
     499The associated code can be found in the \mdl{traldf\_lap\_blp} module. 
     500The operator is a rotated (re-entrant) laplacian when the direction along which it acts  
     501does not coincide with the iso-level surfaces,  
     502that is when standard or triad iso-neutral option is used (\np{ln\_traldf\_iso} or  
     503 \np{ln\_traldf\_triad} equals \textit{true}, see \mdl{traldf\_iso} or \mdl{traldf\_triad} module, resp.),  
     504or when a horizontal ($i.e.$ geopotential) operator is demanded in \textit{s}-coordinate  
     505(\np{ln\_traldf\_hor} and \np{ln\_sco} equal \textit{true}) 
     506\footnote{In this case, the standard iso-neutral operator will be automatically selected}.  
     507In that case, a rotation is applied to the gradient(s) that appears in the operator  
     508so that diffusive fluxes acts on the three spatial direction. 
     509 
     510The resulting discret form of the three operators (one iso-level and two rotated one)  
     511is given in the next two sub-sections.  
     512 
     513 
     514% ------------------------------------------------------------------------------------------------------------- 
     515%       iso-level operator 
     516% ------------------------------------------------------------------------------------------------------------- 
     517\subsection   [Iso-level (bi-)laplacian operator ( \np{ln\_traldf\_iso})] 
     518         {Iso-level (bi-)laplacian operator ( \np{ln\_traldf\_iso}) } 
     519\label{TRA_ldf_lev} 
     520 
     521The laplacian diffusion operator acting along the model (\textit{i,j})-surfaces is given by:  
    465522\begin{equation} \label{Eq_tra_ldf_lap} 
    466 D_T^{lT} =\frac{1}{b_tT} \left( \; 
     523D_t^{lT} =\frac{1}{b_t} \left( \; 
    467524   \delta _{i}\left[ A_u^{lT} \; \frac{e_{2u}\,e_{3u}}{e_{1u}} \;\delta _{i+1/2} [T] \right]  
    468525+ \delta _{j}\left[ A_v^{lT} \;  \frac{e_{1v}\,e_{3v}}{e_{2v}} \;\delta _{j+1/2} [T] \right]  \;\right) 
    469526\end{equation} 
    470 where  $b_t$=$e_{1t}\,e_{2t}\,e_{3t}$  is the volume of $T$-cells.  
    471 It is implemented in the \mdl{traadv\_lap} module. 
    472  
    473 This lateral operator is computed in \mdl{traldf\_lap}. It is a \emph{horizontal}  
    474 operator ($i.e.$ acting along geopotential surfaces) in the $z$-coordinate with  
    475 or without partial steps, but is simply an iso-level operator in the $s$-coordinate.  
    476 It is thus used when, in addition to \np{ln\_traldf\_lap}=true, we have  
    477 \np{ln\_traldf\_level}=true or \np{ln\_traldf\_hor}=\np{ln\_zco}=true.  
     527where  $b_t$=$e_{1t}\,e_{2t}\,e_{3t}$  is the volume of $T$-cells  
     528and where zero diffusive fluxes is assumed across solid boundaries,  
     529first (and third in bilaplacian case) horizontal tracer derivative are masked.  
     530It is implemented in the \rou{traldf\_lap} subroutine found in the \mdl{traldf\_lap} module.  
     531The module also contains \rou{traldf\_blp}, the subroutine calling twice \rou{traldf\_lap}  
     532in order to compute the iso-level bilaplacian operator.  
     533 
     534It is a \emph{horizontal} operator ($i.e.$ acting along geopotential surfaces) in the $z$-coordinate  
     535with or without partial steps, but is simply an iso-level operator in the $s$-coordinate.  
     536It is thus used when, in addition to \np{ln\_traldf\_lap} or \np{ln\_traldf\_blp}~=~\textit{true},  
     537we have \np{ln\_traldf\_lev}~=~\textit{true} or \np{ln\_traldf\_hor}~=~\np{ln\_zco}~=~\textit{true}.  
    478538In both cases, it significantly contributes to diapycnal mixing.  
    479 It is therefore not recommended. 
     539It is therefore never recommended, even when using it in the bilaplacian case. 
    480540 
    481541Note that in the partial step $z$-coordinate (\np{ln\_zps}=true), tracers in horizontally  
     
    485545described in \S\ref{TRA_zpshde}. 
    486546 
    487 % ------------------------------------------------------------------------------------------------------------- 
    488 %        Rotated laplacian operator 
    489 % ------------------------------------------------------------------------------------------------------------- 
    490 \subsection   [Rotated laplacian operator (iso) (\np{ln\_traldf\_lap})] 
    491          {Rotated laplacian operator (iso) (\np{ln\_traldf\_lap}=true)} 
     547 
     548% ------------------------------------------------------------------------------------------------------------- 
     549%         Rotated laplacian operator 
     550% ------------------------------------------------------------------------------------------------------------- 
     551\subsection   [Standard and triad rotated (bi-)laplacian operator (\mdl{traldf\_iso}, \mdl{traldf\_triad})] 
     552               {Standard and triad (bi-)laplacian operator (\mdl{traldf\_iso}, \mdl{traldf\_triad}))} 
     553\label{TRA_ldf_iso_triad} 
     554 
     555%&&    Standard rotated (bi-)laplacian operator 
     556%&& ---------------------------------------------- 
     557\subsubsection   [Standard rotated (bi-)laplacian operator (\mdl{traldf\_iso})] 
     558                 {Standard rotated (bi-)laplacian operator (\mdl{traldf\_iso})} 
    492559\label{TRA_ldf_iso} 
    493  
    494 If the Griffies trad scheme is not employed 
    495 (\np{ln\_traldf\_grif}=true; see App.\ref{sec:triad}) the general form of the second order lateral tracer subgrid scale physics  
    496 (\ref{Eq_PE_zdf}) takes the following semi-discrete space form in $z$- and  
    497 $s$-coordinates: 
     560The general form of the second order lateral tracer subgrid scale physics  
     561(\ref{Eq_PE_zdf}) takes the following semi-discrete space form in $z$- and $s$-coordinates: 
    498562\begin{equation} \label{Eq_tra_ldf_iso} 
    499563\begin{split} 
     
    537601of the tracer variance. Nevertheless the treatment performed on the slopes  
    538602(see \S\ref{LDF}) allows the model to run safely without any additional  
    539 background horizontal diffusion \citep{Guilyardi_al_CD01}. An alternative scheme  
    540 developed by \cite{Griffies_al_JPO98} which ensures tracer variance decreases  
     603background horizontal diffusion \citep{Guilyardi_al_CD01}.  
     604 
     605Note that in the partial step $z$-coordinate (\np{ln\_zps}=true), the horizontal derivatives  
     606at the bottom level in \eqref{Eq_tra_ldf_iso} require a specific treatment.  
     607They are calculated in module zpshde, described in \S\ref{TRA_zpshde}. 
     608 
     609%&&     Triad rotated (bi-)laplacian operator 
     610%&&  ------------------------------------------- 
     611\subsubsection   [Triad rotated (bi-)laplacian operator (\np{ln\_traldf\_triad})] 
     612                 {Triad rotated (bi-)laplacian operator (\np{ln\_traldf\_triad})} 
     613\label{TRA_ldf_triad} 
     614 
     615If the Griffies triad scheme is employed (\np{ln\_traldf\_triad}=true ; see App.\ref{sec:triad})  
     616 
     617An alternative scheme developed by \cite{Griffies_al_JPO98} which ensures tracer variance decreases  
    541618is also available in \NEMO (\np{ln\_traldf\_grif}=true). A complete description of  
    542619the algorithm is given in App.\ref{sec:triad}. 
    543  
    544 Note that in the partial step $z$-coordinate (\np{ln\_zps}=true), the horizontal  
    545 derivatives at the bottom level in \eqref{Eq_tra_ldf_iso} require a specific  
    546 treatment. They are calculated in module zpshde, described in \S\ref{TRA_zpshde}. 
    547  
    548 % ------------------------------------------------------------------------------------------------------------- 
    549 %        Iso-level bilaplacian operator 
    550 % ------------------------------------------------------------------------------------------------------------- 
    551 \subsection   [Iso-level bilaplacian operator (bilap) (\np{ln\_traldf\_bilap})] 
    552          {Iso-level bilaplacian operator (bilap) (\np{ln\_traldf\_bilap}=true)} 
    553 \label{TRA_ldf_bilap} 
    554620 
    555621The lateral fourth order bilaplacian operator on tracers is obtained by  
    556622applying (\ref{Eq_tra_ldf_lap}) twice. The operator requires an additional assumption  
    557623on boundary conditions: both first and third derivative terms normal to the  
    558 coast are set to zero. It is used when, in addition to \np{ln\_traldf\_bilap}=true,  
    559 we have \np{ln\_traldf\_level}=true, or both \np{ln\_traldf\_hor}=true and  
    560 \np{ln\_zco}=false. In both cases, it can contribute diapycnal mixing,  
    561 although less than in the laplacian case. It is therefore not recommended. 
    562  
    563 Note that in the code, the bilaplacian routine does not call the laplacian  
    564 routine twice but is rather a separate routine that can be found in the 
    565 \mdl{traldf\_bilap} module. This is due to the fact that we introduce the  
    566 eddy diffusivity coefficient, A, in the operator as:  
    567 $\nabla \cdot \nabla \left( {A\nabla \cdot \nabla T} \right)$,  
    568 instead of  
    569 $-\nabla \cdot a\nabla \left( {\nabla \cdot a\nabla T} \right)$  
    570 where $a=\sqrt{|A|}$ and $A<0$. This was a mistake: both formulations  
    571 ensure the total variance decrease, but the former requires a larger  
    572 number of code-lines. 
    573  
    574 % ------------------------------------------------------------------------------------------------------------- 
    575 %        Rotated bilaplacian operator 
    576 % ------------------------------------------------------------------------------------------------------------- 
    577 \subsection   [Rotated bilaplacian operator (bilapg) (\np{ln\_traldf\_bilap})] 
    578          {Rotated bilaplacian operator (bilapg) (\np{ln\_traldf\_bilap}=true)} 
    579 \label{TRA_ldf_bilapg} 
     624coast are set to zero. 
    580625 
    581626The lateral fourth order operator formulation on tracers is obtained by  
    582627applying (\ref{Eq_tra_ldf_iso}) twice. It requires an additional assumption  
    583628on boundary conditions: first and third derivative terms normal to the  
    584 coast, normal to the bottom and normal to the surface are set to zero. It can be found in the 
    585 \mdl{traldf\_bilapg}. 
    586  
    587 It is used when, in addition to \np{ln\_traldf\_bilap}=true, we have  
    588 \np{ln\_traldf\_iso}= .true, or both \np{ln\_traldf\_hor}=true and \np{ln\_zco}=true.  
    589 This rotated bilaplacian operator has never been seriously  
    590 tested. There are no guarantees that it is either free of bugs or correctly formulated.  
    591 Moreover, the stability range of such an operator will be probably quite  
    592 narrow, requiring a significantly smaller time-step than the one used with an 
    593 unrotated operator. 
     629coast, normal to the bottom and normal to the surface are set to zero.  
     630 
     631%&&    Option for the rotated operators 
     632%&& ---------------------------------------------- 
     633\subsubsection   [Option for the rotated operators] 
     634                 {Option for the rotated operators} 
     635\label{TRA_ldf_options} 
     636 
     637\np{ln\_traldf\_msc} = Method of Stabilizing Correction (both operators) 
     638 
     639\np{rn\_slpmax} = slope limit (both operators) 
     640 
     641\np{ln\_triad\_iso} = pure horizontal mixing in ML (triad only) 
     642 
     643\np{rn\_sw\_triad} =1 switching triad ; =0 all 4 triads used (triad only)  
     644 
     645\np{ln\_botmix\_triad} = lateral mixing on bottom (triad only) 
    594646 
    595647% ================================================================ 
     
    603655%-------------------------------------------------------------------------------------------------------------- 
    604656 
    605 Options are defined through the  \ngn{namzdf} namelist variables. 
     657Options are defined through the \ngn{namzdf} namelist variables. 
    606658The formulation of the vertical subgrid scale tracer physics is the same  
    607659for all the vertical coordinates, and is based on a laplacian operator.  
     
    661713the thickness of the top model layer.  
    662714 
    663 Due to interactions and mass exchange of water ($F_{mass}$) with other Earth system components ($i.e.$ atmosphere, sea-ice, land), 
    664 the change in the heat and salt content of the surface layer of the ocean is due both  
    665 to the heat and salt fluxes crossing the sea surface (not linked with $F_{mass}$) 
    666  and to the heat and salt content of the mass exchange. 
    667 \sgacomment{ the following does not apply to the release to which this documentation is  
    668 attached and so should not be included .... 
    669 In a forthcoming release, these two parts, computed in the surface module (SBC), will be included directly 
    670 in $Q_{ns}$, the surface heat flux and $F_{salt}$, the surface salt flux. 
    671 The specification of these fluxes is further detailed in the SBC chapter (see \S\ref{SBC}).  
    672 This change will provide a forcing formulation which is the same for any tracer (including temperature and salinity). 
    673   
    674 In the current version, the situation is a little bit more complicated. } 
     715Due to interactions and mass exchange of water ($F_{mass}$) with other Earth system components  
     716($i.e.$ atmosphere, sea-ice, land), the change in the heat and salt content of the surface layer  
     717of the ocean is due both to the heat and salt fluxes crossing the sea surface (not linked with $F_{mass}$)  
     718and to the heat and salt content of the mass exchange. They are both included directly in $Q_{ns}$,  
     719the surface heat flux, and $F_{salt}$, the surface salt flux (see \S\ref{SBC} for further details). 
     720By doing this, the forcing formulation is the same for any tracer (including temperature and salinity). 
    675721 
    676722The surface module (\mdl{sbcmod}, see \S\ref{SBC}) provides the following  
     
    679725$\bullet$ $Q_{ns}$, the non-solar part of the net surface heat flux that crosses the sea surface  
    680726(i.e. the difference between the total surface heat flux and the fraction of the short wave flux that  
    681 penetrates into the water column, see \S\ref{TRA_qsr}) 
    682  
    683 $\bullet$ \textit{emp}, the mass flux exchanged with the atmosphere (evaporation minus precipitation) 
    684  
    685 $\bullet$ $\textit{emp}_S$, an equivalent mass flux taking into account the effect of ice-ocean mass exchange 
    686  
    687 $\bullet$ \textit{rnf}, the mass flux associated with runoff (see \S\ref{SBC_rnf} for further detail of how it acts on temperature and salinity tendencies) 
    688  
    689 The $\textit{emp}_S$ field is not simply the budget of evaporation-precipitation+freezing-melting because  
    690 the sea-ice is not currently embedded in the ocean but levitates above it. There is no mass 
    691 exchanged between the sea-ice and the ocean. Instead we only take into account the salt 
    692 flux associated with the non-zero salinity of sea-ice, and the concentration/dilution effect 
    693 due to the freezing/melting (F/M) process. These two parts of the forcing are then converted into  
    694 an equivalent mass flux given by $\textit{emp}_S - \textit{emp}$. As a result of this mess,  
    695 the surface boundary condition on temperature and salinity is applied as follows: 
    696  
    697 In the nonlinear free surface case (\key{vvl} is defined): 
     727penetrates into the water column, see \S\ref{TRA_qsr}) plus the heat content associated with  
     728of the mass exchange with the atmosphere and lands. 
     729 
     730$\bullet$ $\textit{sfx}$, the salt flux resulting from ice-ocean mass exchange (freezing, melting, ridging...) 
     731 
     732$\bullet$ \textit{emp}, the mass flux exchanged with the atmosphere (evaporation minus precipitation)  
     733 and possibly with the sea-ice and ice-shelves. 
     734 
     735$\bullet$ \textit{rnf}, the mass flux associated with runoff  
     736(see \S\ref{SBC_rnf} for further detail of how it acts on temperature and salinity tendencies) 
     737 
     738$\bullet$ \textit{fwfisf}, the mass flux associated with ice shelf melt,  
     739(see \S\ref{SBC_isf} for further details on how the ice shelf melt is computed and applied). 
     740 
     741The surface boundary condition on temperature and salinity is applied as follows: 
    698742\begin{equation} \label{Eq_tra_sbc} 
     743\begin{aligned} 
     744 &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} }  &\overline{ Q_{ns}       }^t  & \\  
     745& F^S =\frac{ 1 }{\rho _o  \,      \left. e_{3t} \right|_{k=1} }  &\overline{ \textit{sfx} }^t   & \\    
     746 \end{aligned} 
     747\end{equation}  
     748where $\overline{x }^t$ means that $x$ is averaged over two consecutive time steps  
     749($t-\rdt/2$ and $t+\rdt/2$). Such time averaging prevents the  
     750divergence of odd and even time step (see \S\ref{STP}). 
     751 
     752In the linear free surface case (\np{ln\_linssh}~=~\textit{true}),  
     753an additional term has to be added on both temperature and salinity.  
     754On temperature, this term remove the heat content associated with mass exchange 
     755that has been added to $Q_{ns}$. On salinity, this term mimics the concentration/dilution effect that 
     756would have resulted from a change in the volume of the first level. 
     757The resulting surface boundary condition is applied as follows: 
     758\begin{equation} \label{Eq_tra_sbc_lin} 
    699759\begin{aligned} 
    700760 &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} }    
     
    702762% 
    703763& F^S =\frac{ 1 }{\rho _o \,\left. e_{3t} \right|_{k=1} }  
    704            &\overline{ \left( (\textit{emp}_S - \textit{emp})\;\left. S \right|_{k=1}  \right) }^t   & \\    
     764           &\overline{ \left( \;\textit{sfx} - \textit{emp} \;\left. S \right|_{k=1}  \right) }^t   & \\    
    705765 \end{aligned} 
    706766\end{equation}  
    707  
    708 In the linear free surface case (\key{vvl} not defined): 
    709 \begin{equation} \label{Eq_tra_sbc_lin} 
    710 \begin{aligned} 
    711  &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} }  &\overline{ Q_{ns} }^t  & \\  
    712 % 
    713 & F^S =\frac{ 1 }{\rho _o \,\left. e_{3t} \right|_{k=1} }  
    714            &\overline{ \left( \textit{emp}_S\;\left. S \right|_{k=1}  \right) }^t   & \\    
    715  \end{aligned} 
    716 \end{equation}  
    717 where $\overline{x }^t$ means that $x$ is averaged over two consecutive time steps  
    718 ($t-\rdt/2$ and $t+\rdt/2$). Such time averaging prevents the  
    719 divergence of odd and even time step (see \S\ref{STP}). 
    720  
    721 The two set of equations, \eqref{Eq_tra_sbc} and \eqref{Eq_tra_sbc_lin}, are obtained  
    722 by assuming that the temperature of precipitation and evaporation are equal to 
    723 the ocean surface temperature and that their salinity is zero. Therefore, the heat content 
    724 of the \textit{emp} budget must be added to the temperature equation in the variable volume case,  
    725 while it does not appear in the constant volume case. Similarly, the \textit{emp} budget affects  
    726 the ocean surface salinity in the constant volume case (through the concentration dilution effect) 
    727 while it does not appears explicitly in the variable volume case since salinity change will be 
    728 induced by volume change. In both constant and variable volume cases, surface salinity  
    729 will change with ice-ocean salt flux and F/M flux (both contained in $\textit{emp}_S - \textit{emp}$) without mass exchanges. 
    730  
    731 Note that the concentration/dilution effect due to F/M is computed using 
    732 a constant ice salinity as well as a constant ocean salinity.  
    733 This approximation suppresses the correlation between \textit{SSS}  
    734 and F/M flux, allowing the ice-ocean salt exchanges to be conservative. 
    735 Indeed, if this approximation is not made, even if the F/M budget is zero  
    736 on average over the whole ocean domain and over the seasonal cycle,  
    737 the associated salt flux is not zero, since sea-surface salinity and F/M flux are  
    738 intrinsically correlated (high \textit{SSS} are found where freezing is  
    739 strong whilst low \textit{SSS} is usually associated with high melting areas). 
    740  
    741 Even using this approximation, an exact conservation of heat and salt content  
    742 is only achieved in the variable volume case. In the constant volume case,  
    743 there is a small imbalance associated with the product $(\partial_t\eta - \textit{emp}) * \textit{SSS}$. 
    744 Nevertheless, the salt content variation is quite small and will not induce 
    745 a long term drift as there is no physical reason for $(\partial_t\eta - \textit{emp})$  
    746 and \textit{SSS} to be correlated \citep{Roullet_Madec_JGR00}.  
    747 Note that, while quite small, the imbalance in the constant volume case is larger  
     767Note that an exact conservation of heat and salt content is only achieved with non-linear free surface.  
     768In the linear free surface case, there is a small imbalance. The imbalance is larger  
    748769than the imbalance associated with the Asselin time filter \citep{Leclair_Madec_OM09}.  
    749 This is the reason why the modified filter is not applied in the constant volume case. 
     770This is the reason why the modified filter is not applied in the linear free surface case (see \S\ref{STP}). 
    750771 
    751772% ------------------------------------------------------------------------------------------------------------- 
     
    821842($i.e.$ the inverses of the extinction length scales) are tabulated over 61 nonuniform  
    822843chlorophyll classes ranging from 0.01 to 10 g.Chl/L (see the routine \rou{trc\_oce\_rgb}  
    823 in \mdl{trc\_oce} module). Three types of chlorophyll can be chosen in the RGB formulation: 
    824 (1) a constant 0.05 g.Chl/L value everywhere (\np{nn\_chdta}=0) ; (2) an observed  
    825 time varying chlorophyll (\np{nn\_chdta}=1) ; (3) simulated time varying chlorophyll 
    826 by TOP biogeochemical model (\np{ln\_qsr\_bio}=true). In the latter case, the RGB  
    827 formulation is used to calculate both the phytoplankton light limitation in PISCES  
    828 or LOBSTER and the oceanic heating rate.  
    829  
     844in \mdl{trc\_oce} module). Four types of chlorophyll can be chosen in the RGB formulation: 
     845\begin{description}  
     846\item[\np{nn\_chdta}=0]  
     847a constant 0.05 g.Chl/L value everywhere ;  
     848\item[\np{nn\_chdta}=1]   
     849an observed time varying chlorophyll deduced from satellite surface ocean color measurement  
     850spread uniformly in the vertical direction ;  
     851\item[\np{nn\_chdta}=2]   
     852same as previous case except that a vertical profile of chlorophyl is used.  
     853Following \cite{Morel_Berthon_LO89}, the profile is computed from the local surface chlorophyll value ; 
     854\item[\np{ln\_qsr\_bio}=true]   
     855simulated time varying chlorophyll by TOP biogeochemical model.  
     856In this case, the RGB formulation is used to calculate both the phytoplankton  
     857light limitation in PISCES or LOBSTER and the oceanic heating rate.  
     858\end{description}  
    830859The trend in \eqref{Eq_tra_qsr} associated with the penetration of the solar radiation  
    831860is added to the temperature trend, and the surface heat flux is modified in routine \mdl{traqsr}.  
     
    842871%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    843872\begin{figure}[!t]     \begin{center} 
    844 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_TRA_Irradiance.pdf} 
     873\includegraphics[width=1.0\textwidth]{Fig_TRA_Irradiance} 
    845874\caption{    \label{Fig_traqsr_irradiance} 
    846875Penetration profile of the downward solar irradiance calculated by four models.  
     
    859888\label{TRA_bbc} 
    860889%--------------------------------------------nambbc-------------------------------------------------------- 
    861 \namdisplay{namtra_bbc} 
     890\namdisplay{nambbc} 
    862891%-------------------------------------------------------------------------------------------------------------- 
    863892%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    864893\begin{figure}[!t]     \begin{center} 
    865 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_TRA_geoth.pdf} 
     894\includegraphics[width=1.0\textwidth]{Fig_TRA_geoth} 
    866895\caption{   \label{Fig_geothermal} 
    867896Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{Emile-Geay_Madec_OS09}. 
     
    9731002%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    9741003\begin{figure}[!t]   \begin{center} 
    975 \includegraphics[width=0.7\textwidth]{./TexFiles/Figures/Fig_BBL_adv.pdf} 
     1004\includegraphics[width=0.7\textwidth]{Fig_BBL_adv} 
    9761005\caption{   \label{Fig_bbl}   
    9771006Advective/diffusive Bottom Boundary Layer. The BBL parameterisation is  
     
    11031132\subsection[DMP\_TOOLS]{Generating resto.nc using DMP\_TOOLS} 
    11041133 
    1105 DMP\_TOOLS can be used to generate a netcdf file containing the restoration coefficient $\gamma$. Note that in order to maintain bit comparison with previous NEMO versions DMP\_TOOLS must be compiled and run on the same machine as the NEMO model. A mesh\_mask.nc file for the model configuration is required as an input. This can be generated by carrying out a short model run with the namelist parameter \np{nn\_msh} set to 1. The namelist parameter \np{ln\_tradmp} will also need to be set to .false. for this to work. The \nl{nam\_dmp\_create} namelist in the DMP\_TOOLS directory is used to specify options for the restoration coefficient. 
     1134DMP\_TOOLS can be used to generate a netcdf file containing the restoration coefficient $\gamma$.  
     1135Note that in order to maintain bit comparison with previous NEMO versions DMP\_TOOLS must be compiled  
     1136and run on the same machine as the NEMO model. A mesh\_mask.nc file for the model configuration is required as an input.  
     1137This can be generated by carrying out a short model run with the namelist parameter \np{nn\_msh} set to 1.  
     1138The namelist parameter \np{ln\_tradmp} will also need to be set to .false. for this to work.  
     1139The \nl{nam\_dmp\_create} namelist in the DMP\_TOOLS directory is used to specify options for the restoration coefficient. 
    11061140 
    11071141%--------------------------------------------nam_dmp_create------------------------------------------------- 
    1108 \namdisplay{nam_dmp_create} 
     1142\namtools{namelist_dmp} 
    11091143%------------------------------------------------------------------------------------------------------- 
    11101144 
    11111145\np{cp\_cfg}, \np{cp\_cpz}, \np{jp\_cfg} and \np{jperio} specify the model configuration being used and should be the same as specified in \nl{namcfg}. The variable \nl{lzoom} is used to specify that the damping is being used as in case \textit{a} above to provide boundary conditions to a zoom configuration. In the case of the arctic or antarctic zoom configurations this includes some specific treatment. Otherwise damping is applied to the 6 grid points along the ocean boundaries. The open boundaries are specified by the variables \np{lzoom\_n}, \np{lzoom\_e}, \np{lzoom\_s}, \np{lzoom\_w} in the \nl{nam\_zoom\_dmp} name list. 
    11121146 
    1113 The remaining switch namelist variables determine the spatial variation of the restoration coefficient in non-zoom configurations. \np{ln\_full\_field} specifies that newtonian damping should be applied to the whole model domain. \np{ln\_med\_red\_seas} specifies grid specific restoration coefficients in the Mediterranean Sea for the ORCA4, ORCA2 and ORCA05 configurations. If \np{ln\_old\_31\_lev\_code} is set then the depth variation of the coeffients will be specified as a function of the model number. This option is included to allow backwards compatability of the ORCA2 reference configurations with previous model versions. \np{ln\_coast} specifies that the restoration coefficient should be reduced near to coastlines. This option only has an effect if \np{ln\_full\_field} is true. \np{ln\_zero\_top\_layer} specifies that the restoration coefficient should be zero in the surface layer. Finally \np{ln\_custom} specifies that the custom module will be called. This module is contained in the file custom.F90 and can be edited by users. For example damping could be applied in a specific region. 
    1114  
    1115 The restoration coefficient can be set to zero in equatorial regions by specifying a positive value of \np{nn\_hdmp}. Equatorward of this latitude the restoration coefficient will be zero with a smooth transition to the full values of a 10$^{\circ}$ latitud band. This is often used because of the short adjustment time scale in the equatorial region \citep{Reverdin1991, Fujio1991, Marti_PhD92}. The time scale associated with the damping depends on the depth as a hyperbolic tangent, with \np{rn\_surf} as surface value, \np{rn\_bot} as bottom value and a transition depth of \np{rn\_dep}.   
     1147The remaining switch namelist variables determine the spatial variation of the restoration coefficient in non-zoom configurations.  
     1148\np{ln\_full\_field} specifies that newtonian damping should be applied to the whole model domain.  
     1149\np{ln\_med\_red\_seas} specifies grid specific restoration coefficients in the Mediterranean Sea  
     1150for the ORCA4, ORCA2 and ORCA05 configurations.  
     1151If \np{ln\_old\_31\_lev\_code} is set then the depth variation of the coeffients will be specified as  
     1152a function of the model number. This option is included to allow backwards compatability of the ORCA2 reference  
     1153configurations with previous model versions.  
     1154\np{ln\_coast} specifies that the restoration coefficient should be reduced near to coastlines.  
     1155This option only has an effect if \np{ln\_full\_field} is true.  
     1156\np{ln\_zero\_top\_layer} specifies that the restoration coefficient should be zero in the surface layer.  
     1157Finally \np{ln\_custom} specifies that the custom module will be called.  
     1158This module is contained in the file custom.F90 and can be edited by users. For example damping could be applied in a specific region. 
     1159 
     1160The restoration coefficient can be set to zero in equatorial regions by specifying a positive value of \np{nn\_hdmp}.  
     1161Equatorward of this latitude the restoration coefficient will be zero with a smooth transition to  
     1162the full values of a 10\deg latitud band.  
     1163This is often used because of the short adjustment time scale in the equatorial region  
     1164\citep{Reverdin1991, Fujio1991, Marti_PhD92}. The time scale associated with the damping depends on the depth as a  
     1165hyperbolic tangent, with \np{rn\_surf} as surface value, \np{rn\_bot} as bottom value and a transition depth of \np{rn\_dep}.   
    11161166 
    11171167% ================================================================ 
     
    11671217%        Equation of State 
    11681218% ------------------------------------------------------------------------------------------------------------- 
    1169 \subsection{Equation of State (\np{nn\_eos} = 0, 1 or 2)} 
     1219\subsection{Equation Of Seawater (\np{nn\_eos} = -1, 0, or 1)} 
    11701220\label{TRA_eos} 
    11711221 
    1172 It is necessary to know the equation of state for the ocean very accurately  
    1173 to determine stability properties (especially the Brunt-Vais\"{a}l\"{a} frequency),  
    1174 particularly in the deep ocean. The ocean seawater volumic mass, $\rho$,  
    1175 abusively called density, is a non linear empirical function of \textit{in situ}  
    1176 temperature, salinity and pressure. The reference equation of state is that  
    1177 defined by the Joint Panel on Oceanographic Tables and Standards  
    1178 \citep{UNESCO1983}. It was the standard equation of state used in early  
    1179 releases of OPA. However, even though this computation is fully vectorised,  
    1180 it is quite time consuming ($15$ to $20${\%} of the total CPU time) since  
    1181 it requires the prior computation of the \textit{in situ} temperature from the  
    1182 model \textit{potential} temperature using the \citep{Bryden1973} polynomial  
    1183 for adiabatic lapse rate and a $4^th$ order Runge-Kutta integration scheme.  
    1184 Since OPA6, we have used the \citet{JackMcD1995} equation of state for  
    1185 seawater instead. It allows the computation of the \textit{in situ} ocean density  
    1186 directly as a function of \textit{potential} temperature relative to the surface  
    1187 (an \NEMO variable), the practical salinity (another \NEMO variable) and the  
    1188 pressure (assuming no pressure variation along geopotential surfaces, $i.e.$  
    1189 the pressure in decibars is approximated by the depth in meters).  
    1190 Both the \citet{UNESCO1983} and \citet{JackMcD1995} equations of state  
    1191 have exactly the same except that the values of the various coefficients have  
    1192 been adjusted by \citet{JackMcD1995} in order to directly use the \textit{potential}  
    1193 temperature instead of the \textit{in situ} one. This reduces the CPU time of the  
    1194 \textit{in situ} density computation to about $3${\%} of the total CPU time,  
    1195 while maintaining a quite accurate equation of state. 
    1196  
    1197 In the computer code, a \textit{true} density anomaly, $d_a= \rho / \rho_o - 1$,  
    1198 is computed, with $\rho_o$ a reference volumic mass. Called \textit{rau0}  
    1199 in the code, $\rho_o$ is defined in \mdl{phycst}, and a value of $1,035~Kg/m^3$.  
     1222The Equation Of Seawater (EOS) is an empirical nonlinear thermodynamic relationship  
     1223linking seawater density, $\rho$, to a number of state variables,  
     1224most typically temperature, salinity and pressure.  
     1225Because density gradients control the pressure gradient force through the hydrostatic balance,  
     1226the equation of state provides a fundamental bridge between the distribution of active tracers  
     1227and the fluid dynamics. Nonlinearities of the EOS are of major importance, in particular  
     1228influencing the circulation through determination of the static stability below the mixed layer,  
     1229thus controlling rates of exchange between the atmosphere  and the ocean interior \citep{Roquet_JPO2015}.  
     1230Therefore an accurate EOS based on either the 1980 equation of state (EOS-80, \cite{UNESCO1983})  
     1231or TEOS-10 \citep{TEOS10} standards should be used anytime a simulation of the real  
     1232ocean circulation is attempted \citep{Roquet_JPO2015}.  
     1233The use of TEOS-10 is highly recommended because  
     1234\textit{(i)} it is the new official EOS,  
     1235\textit{(ii)} it is more accurate, being based on an updated database of laboratory measurements, and  
     1236\textit{(iii)} it uses Conservative Temperature and Absolute Salinity (instead of potential temperature  
     1237and practical salinity for EOS-980, both variables being more suitable for use as model variables  
     1238\citep{TEOS10, Graham_McDougall_JPO13}.  
     1239EOS-80 is an obsolescent feature of the NEMO system, kept only for backward compatibility. 
     1240For process studies, it is often convenient to use an approximation of the EOS. To that purposed,  
     1241a simplified EOS (S-EOS) inspired by \citet{Vallis06} is also available. 
     1242 
     1243In the computer code, a density anomaly, $d_a= \rho / \rho_o - 1$,  
     1244is computed, with $\rho_o$ a reference density. Called \textit{rau0}  
     1245in the code, $\rho_o$ is set in \mdl{phycst} to a value of $1,026~Kg/m^3$.  
    12001246This is a sensible choice for the reference density used in a Boussinesq ocean  
    12011247climate model, as, with the exception of only a small percentage of the ocean,  
    1202 density in the World Ocean varies by no more than 2$\%$ from $1,035~kg/m^3$  
    1203 \citep{Gill1982}. 
    1204  
    1205 Options are defined through the  \ngn{nameos} namelist variables. 
    1206 The default option (namelist parameter \np{nn\_eos}=0) is the \citet{JackMcD1995}  
    1207 equation of state. Its use is highly recommended. However, for process studies,  
    1208 it is often convenient to use a linear approximation of the density. 
     1248density in the World Ocean varies by no more than 2$\%$ from that value \citep{Gill1982}. 
     1249 
     1250Options are defined through the  \ngn{nameos} namelist variables, and in particular \np{nn\_eos}  
     1251which controls the EOS used (=-1 for TEOS10 ; =0 for EOS-80 ; =1 for S-EOS). 
     1252\begin{description} 
     1253 
     1254\item[\np{nn\_eos}$=-1$] the polyTEOS10-bsq equation of seawater \citep{Roquet_OM2015} is used.   
     1255The accuracy of this approximation is comparable to the TEOS-10 rational function approximation,  
     1256but it is optimized for a boussinesq fluid and the polynomial expressions have simpler  
     1257and more computationally efficient expressions for their derived quantities  
     1258which make them more adapted for use in ocean models.  
     1259Note that a slightly higher precision polynomial form is now used replacement of the TEOS-10  
     1260rational function approximation for hydrographic data analysis  \citep{TEOS10}.  
     1261A key point is that conservative state variables are used:  
     1262Absolute Salinity (unit: g/kg, notation: $S_A$) and Conservative Temperature (unit: \degC, notation: $\Theta$). 
     1263The pressure in decibars is approximated by the depth in meters.  
     1264With TEOS10, the specific heat capacity of sea water, $C_p$, is a constant. It is set to  
     1265$C_p=3991.86795711963~J\,Kg^{-1}\,^{\circ}K^{-1}$, according to \citet{TEOS10}. 
     1266 
     1267Choosing polyTEOS10-bsq implies that the state variables used by the model are  
     1268$\Theta$ and $S_A$. In particular, the initial state deined by the user have to be given as  
     1269\textit{Conservative} Temperature and \textit{Absolute} Salinity.  
     1270In addition, setting \np{ln\_useCT} to \textit{true} convert the Conservative SST to potential SST  
     1271prior to either computing the air-sea and ice-sea fluxes (forced mode)  
     1272or sending the SST field to the atmosphere (coupled mode). 
     1273 
     1274\item[\np{nn\_eos}$=0$] the polyEOS80-bsq equation of seawater is used. 
     1275It takes the same polynomial form as the polyTEOS10, but the coefficients have been optimized  
     1276to accurately fit EOS80 (Roquet, personal comm.). The state variables used in both the EOS80  
     1277and the ocean model are:  
     1278the Practical Salinity ((unit: psu, notation: $S_p$)) and Potential Temperature (unit: $^{\circ}C$, notation: $\theta$). 
     1279The pressure in decibars is approximated by the depth in meters.   
     1280With thsi EOS, the specific heat capacity of sea water, $C_p$, is a function of temperature,  
     1281salinity and pressure \citep{UNESCO1983}. Nevertheless, a severe assumption is made in order to  
     1282have a heat content ($C_p T_p$) which is conserved by the model: $C_p$ is set to a constant  
     1283value, the TEOS10 value.  
     1284  
     1285\item[\np{nn\_eos}$=1$] a simplified EOS (S-EOS) inspired by \citet{Vallis06} is chosen,  
     1286the coefficients of which has been optimized to fit the behavior of TEOS10 (Roquet, personal comm.)  
     1287(see also \citet{Roquet_JPO2015}). It provides a simplistic linear representation of both  
     1288cabbeling and thermobaricity effects which is enough for a proper treatment of the EOS  
     1289in theoretical studies \citep{Roquet_JPO2015}. 
    12091290With such an equation of state there is no longer a distinction between  
    1210 \textit{in situ} and \textit{potential} density and both cabbeling and thermobaric 
    1211 effects are removed. 
    1212 Two linear formulations are available: a function of $T$ only (\np{nn\_eos}=1)  
    1213 and a function of both $T$ and $S$ (\np{nn\_eos}=2): 
    1214 \begin{equation} \label{Eq_tra_eos_linear} 
     1291\textit{conservative} and \textit{potential} temperature, as well as between \textit{absolute}  
     1292and \textit{practical} salinity. 
     1293S-EOS takes the following expression: 
     1294\begin{equation} \label{Eq_tra_S-EOS} 
    12151295\begin{split} 
    1216   d_a(T)       &=  \rho (T)      /  \rho_o   - 1     =  \  0.0285         -  \alpha   \;T     \\  
    1217   d_a(T,S)    &=  \rho (T,S)   /  \rho_o   - 1     =  \  \beta \; S       -  \alpha   \;T     
     1296  d_a(T,S,z)  =  ( & - a_0 \; ( 1 + 0.5 \; \lambda_1 \; T_a + \mu_1 \; z ) * T_a  \\ 
     1297                                & + b_0 \; ( 1 - 0.5 \; \lambda_2 \; S_a - \mu_2 \; z ) * S_a  \\ 
     1298                                & - \nu \; T_a \; S_a \;  ) \; / \; \rho_o                     \\ 
     1299  with \ \  T_a = T-10  \; ;  & \;  S_a = S-35  \; ;\;  \rho_o = 1026~Kg/m^3 
    12181300\end{split} 
    12191301\end{equation}  
    1220 where $\alpha$ and $\beta$ are the thermal and haline expansion  
    1221 coefficients, and $\rho_o$, the reference volumic mass, $rau0$.  
    1222 ($\alpha$ and $\beta$ can be modified through the \np{rn\_alpha} and  
    1223 \np{rn\_beta} namelist variables). Note that when $d_a$ is a function  
    1224 of $T$ only (\np{nn\_eos}=1), the salinity is a passive tracer and can be  
    1225 used as such. 
    1226  
    1227 % ------------------------------------------------------------------------------------------------------------- 
    1228 %        Brunt-Vais\"{a}l\"{a} Frequency 
    1229 % ------------------------------------------------------------------------------------------------------------- 
    1230 \subsection{Brunt-Vais\"{a}l\"{a} Frequency (\np{nn\_eos} = 0, 1 or 2)} 
     1302where the computer name of the coefficients as well as their standard value are given in \ref{Tab_SEOS}. 
     1303In fact, when choosing S-EOS, various approximation of EOS can be specified simply by changing  
     1304the associated coefficients.  
     1305Setting to zero the two thermobaric coefficients ($\mu_1$, $\mu_2$) remove thermobaric effect from S-EOS. 
     1306setting to zero the three cabbeling coefficients ($\lambda_1$, $\lambda_2$, $\nu$) remove cabbeling effect from S-EOS. 
     1307Keeping non-zero value to $a_0$ and $b_0$ provide a linear EOS function of T and S. 
     1308 
     1309\end{description} 
     1310 
     1311 
     1312%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     1313\begin{table}[!tb] 
     1314\begin{center} \begin{tabular}{|p{26pt}|p{72pt}|p{56pt}|p{136pt}|} 
     1315\hline 
     1316coeff.   & computer name   & S-EOS     &  description                      \\ \hline 
     1317$a_0$       & \np{rn\_a0}     & 1.6550 $10^{-1}$ &  linear thermal expansion coeff.    \\ \hline 
     1318$b_0$       & \np{rn\_b0}     & 7.6554 $10^{-1}$ &  linear haline  expansion coeff.    \\ \hline 
     1319$\lambda_1$ & \np{rn\_lambda1}& 5.9520 $10^{-2}$ &  cabbeling coeff. in $T^2$          \\ \hline 
     1320$\lambda_2$ & \np{rn\_lambda2}& 5.4914 $10^{-4}$ &  cabbeling coeff. in $S^2$       \\ \hline 
     1321$\nu$       & \np{rn\_nu}     & 2.4341 $10^{-3}$ &  cabbeling coeff. in $T \, S$       \\ \hline 
     1322$\mu_1$     & \np{rn\_mu1}    & 1.4970 $10^{-4}$ &  thermobaric coeff. in T         \\ \hline 
     1323$\mu_2$     & \np{rn\_mu2}    & 1.1090 $10^{-5}$ &  thermobaric coeff. in S            \\ \hline 
     1324\end{tabular} 
     1325\caption{ \label{Tab_SEOS} 
     1326Standard value of S-EOS coefficients. } 
     1327\end{center} 
     1328\end{table} 
     1329%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     1330 
     1331 
     1332% ------------------------------------------------------------------------------------------------------------- 
     1333%        Brunt-V\"{a}is\"{a}l\"{a} Frequency 
     1334% ------------------------------------------------------------------------------------------------------------- 
     1335\subsection{Brunt-V\"{a}is\"{a}l\"{a} Frequency (\np{nn\_eos} = 0, 1 or 2)} 
    12311336\label{TRA_bn2} 
    12321337 
    1233 An accurate computation of the ocean stability (i.e. of $N$, the brunt-Vais\"{a}l\"{a} 
    1234  frequency) is of paramount importance as it is used in several ocean  
    1235  parameterisations (namely TKE, KPP, Richardson number dependent  
    1236  vertical diffusion, enhanced vertical diffusion, non-penetrative convection,  
    1237  iso-neutral diffusion). In particular, one must be aware that $N^2$ has to  
    1238  be computed with an \textit{in situ} reference. The expression for $N^2$  
    1239  depends on the type of equation of state used (\np{nn\_eos} namelist parameter). 
    1240  
    1241 For \np{nn\_eos}=0 (\citet{JackMcD1995} equation of state), the \citet{McDougall1987}  
    1242 polynomial expression is used (with the pressure in decibar approximated by  
    1243 the depth in meters):  
     1338An accurate computation of the ocean stability (i.e. of $N$, the brunt-V\"{a}is\"{a}l\"{a} 
     1339 frequency) is of paramount importance as determine the ocean stratification and  
     1340 is used in several ocean parameterisations (namely TKE, GLS, Richardson number dependent  
     1341 vertical diffusion, enhanced vertical diffusion, non-penetrative convection, tidal mixing  
     1342 parameterisation, iso-neutral diffusion). In particular, $N^2$ has to be computed at the local pressure  
     1343 (pressure in decibar being approximated by the depth in meters). The expression for $N^2$  
     1344 is given by:  
    12441345\begin{equation} \label{Eq_tra_bn2} 
    1245 N^2 = \frac{g}{e_{3w}} \; \beta   \  
    1246       \left(  \alpha / \beta \ \delta_{k+1/2}[T]     - \delta_{k+1/2}[S]   \right)  
    1247 \end{equation}  
    1248 where $\alpha$ and $\beta$ are the thermal and haline expansion coefficients.  
    1249 They are a function of  $\overline{T}^{\,k+1/2},\widetilde{S}=\overline{S}^{\,k+1/2} - 35.$,  
    1250 and  $z_w$, with $T$ the \textit{potential} temperature and $\widetilde{S}$ a salinity anomaly.  
    1251 Note that both $\alpha$ and $\beta$ depend on \textit{potential}  
    1252 temperature and salinity which are averaged at $w$-points prior  
    1253 to the computation instead of being computed at $T$-points and  
    1254 then averaged to $w$-points. 
    1255  
    1256 When a linear equation of state is used (\np{nn\_eos}=1 or 2,  
    1257 \eqref{Eq_tra_bn2} reduces to: 
    1258 \begin{equation} \label{Eq_tra_bn2_linear} 
    12591346N^2 = \frac{g}{e_{3w}} \left(   \beta \;\delta_{k+1/2}[S] - \alpha \;\delta_{k+1/2}[T]   \right) 
    12601347\end{equation}  
    1261 where $\alpha$ and $\beta $ are the constant coefficients used to  
    1262 defined the linear equation of state \eqref{Eq_tra_eos_linear}. 
    1263  
    1264 % ------------------------------------------------------------------------------------------------------------- 
    1265 %        Specific Heat 
    1266 % ------------------------------------------------------------------------------------------------------------- 
    1267 \subsection    [Specific Heat (\textit{phycst})] 
    1268          {Specific Heat (\mdl{phycst})} 
    1269 \label{TRA_adv_ldf} 
    1270  
    1271 The specific heat of sea water, $C_p$, is a function of temperature, salinity  
    1272 and pressure \citep{UNESCO1983}. It is only used in the model to convert  
    1273 surface heat fluxes into surface temperature increase and so the pressure  
    1274 dependence is neglected. The dependence on $T$ and $S$ is weak.  
    1275 For example, with $S=35~psu$, $C_p$ increases from $3989$ to $4002$  
    1276 when $T$ varies from -2~\degres C to 31~\degres C. Therefore, $C_p$ has  
    1277 been chosen as a constant: $C_p=4.10^3~J\,Kg^{-1}\,\degres K^{-1}$.  
    1278 Its value is set in \mdl{phycst} module.  
    1279  
     1348where $(T,S) = (\Theta, S_A)$ for TEOS10, $= (\theta, S_p)$ for TEOS-80, or $=(T,S)$ for S-EOS,  
     1349and, $\alpha$ and $\beta$ are the thermal and haline expansion coefficients.  
     1350The coefficients are a polynomial function of temperature, salinity and depth which expression  
     1351depends on the chosen EOS. They are computed through \textit{eos\_rab}, a \textsc{Fortran}  
     1352function that can be found in \mdl{eosbn2}. 
    12801353 
    12811354% ------------------------------------------------------------------------------------------------------------- 
     
    12981371sea water ($i.e.$ referenced to the surface $p=0$), thus the pressure dependent  
    12991372terms in \eqref{Eq_tra_eos_fzp} (last term) have been dropped. The freezing 
    1300 point is computed through \textit{tfreez}, a \textsc{Fortran} function that can be found  
     1373point is computed through \textit{eos\_fzp}, a \textsc{Fortran} function that can be found  
    13011374in \mdl{eosbn2}.   
     1375 
     1376 
     1377% ------------------------------------------------------------------------------------------------------------- 
     1378%        Potential Energy      
     1379% ------------------------------------------------------------------------------------------------------------- 
     1380%\subsection{Potential Energy anomalies} 
     1381%\label{TRA_bn2} 
     1382 
     1383%    =====>>>>> TO BE written 
     1384% 
     1385 
    13021386 
    13031387% ================================================================ 
     
    13081392\label{TRA_zpshde} 
    13091393 
    1310 \gmcomment{STEVEN: to be consistent with earlier discussion of differencing and averaging operators, I've changed "derivative" to "difference" and "mean" to "average"} 
    1311  
    1312 With partial bottom cells (\np{ln\_zps}=true), in general, tracers in horizontally  
    1313 adjacent cells live at different depths. Horizontal gradients of tracers are needed  
    1314 for horizontal diffusion (\mdl{traldf} module) and for the hydrostatic pressure  
    1315 gradient (\mdl{dynhpg} module) to be active.  
    1316 \gmcomment{STEVEN from gm : question: not sure of  what -to be active- means} 
     1394\gmcomment{STEVEN: to be consistent with earlier discussion of differencing and averaging operators,  
     1395                   I've changed "derivative" to "difference" and "mean" to "average"} 
     1396 
     1397With partial cells (\np{ln\_zps}=true) at bottom and top (\np{ln\_isfcav}=true), in general,  
     1398tracers in horizontally adjacent cells live at different depths.  
     1399Horizontal gradients of tracers are needed for horizontal diffusion (\mdl{traldf} module)  
     1400and the hydrostatic pressure gradient calculations (\mdl{dynhpg} module).  
     1401The partial cell properties at the top (\np{ln\_isfcav}=true) are computed in the same way as for the bottom.  
     1402So, only the bottom interpolation is explained below. 
     1403 
    13171404Before taking horizontal gradients between the tracers next to the bottom, a linear  
    13181405interpolation in the vertical is used to approximate the deeper tracer as if it actually  
     
    13231410%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    13241411\begin{figure}[!p]    \begin{center} 
    1325 \includegraphics[width=0.9\textwidth]{./TexFiles/Figures/Partial_step_scheme.pdf} 
     1412\includegraphics[width=0.9\textwidth]{Partial_step_scheme} 
    13261413\caption{   \label{Fig_Partial_step_scheme}  
    13271414Discretisation of the horizontal difference and average of tracers in the $z$-partial  
     
    13901477\gmcomment{gm :   this last remark has to be done} 
    13911478%%% 
     1479\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Chap_ZDF.tex

    r5120 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter  Vertical Ocean Physics (ZDF) 
     
    3436coefficients can be assumed to be either constant, or a function of the local  
    3537Richardson number, or computed from a turbulent closure model (either  
    36 TKE or KPP formulation). The computation of these coefficients is initialized  
     38TKE or GLS formulation). The computation of these coefficients is initialized  
    3739in the \mdl{zdfini} module and performed in the \mdl{zdfric}, \mdl{zdftke} or  
    38 \mdl{zdfkpp} modules. The trends due to the vertical momentum and tracer  
     40\mdl{zdfgls} modules. The trends due to the vertical momentum and tracer  
    3941diffusion, including the surface forcing, are computed and added to the  
    4042general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively.  
     
    234236%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    235237\begin{figure}[!t] \begin{center} 
    236 \includegraphics[width=1.00\textwidth]{./TexFiles/Figures/Fig_mixing_length.pdf} 
     238\includegraphics[width=1.00\textwidth]{Fig_mixing_length} 
    237239\caption{ \label{Fig_mixing_length}  
    238240Illustration of the mixing length computation. } 
     
    262264\end{equation} 
    263265 
    264 At the ocean surface, a non zero length scale is set through the  \np{rn\_lmin0} namelist  
     266At the ocean surface, a non zero length scale is set through the  \np{rn\_mxl0} namelist  
    265267parameter. Usually the surface scale is given by $l_o = \kappa \,z_o$  
    266268where $\kappa = 0.4$ is von Karman's constant and $z_o$ the roughness  
    267269parameter of the surface. Assuming $z_o=0.1$~m \citep{Craig_Banner_JPO94}  
    268 leads to a 0.04~m, the default value of \np{rn\_lsurf}. In the ocean interior  
     270leads to a 0.04~m, the default value of \np{rn\_mxl0}. In the ocean interior  
    269271a minimum length scale is set to recover the molecular viscosity when $\bar{e}$  
    270272reach its minimum value ($1.10^{-6}= C_k\, l_{min} \,\sqrt{\bar{e}_{min}}$ ). 
     
    295297As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$,  
    296298with $e_{bb}$ the \np{rn\_ebb} namelist parameter, setting \np{rn\_ebb}~=~67.83 corresponds  
    297 to $\alpha_{CB} = 100$. further setting  \np{ln\_lsurf} to true applies \eqref{ZDF_Lsbc}  
    298 as surface boundary condition on length scale, with $\beta$ hard coded to the Stacet's value. 
     299to $\alpha_{CB} = 100$. Further setting  \np{ln\_mxl0} to true applies \eqref{ZDF_Lsbc}  
     300as surface boundary condition on length scale, with $\beta$ hard coded to the Stacey's value. 
    299301Note that a minimal threshold of \np{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters)  
    300302is applied on surface $\bar{e}$ value. 
     
    355357%--------------------------------------------------------------% 
    356358 
    357 To be add here a description of "penetration of TKE" and the associated namelist parameters 
    358  \np{nn\_etau}, \np{rn\_efr} and \np{nn\_htau}. 
     359Vertical mixing parameterizations commonly used in ocean general circulation models  
     360tend to produce mixed-layer depths that are too shallow during summer months and windy conditions. 
     361This bias is particularly acute over the Southern Ocean.  
     362To overcome this systematic bias, an ad hoc parameterization is introduced into the TKE scheme  \cite{Rodgers_2014}.  
     363The parameterization is an empirical one, $i.e.$ not derived from theoretical considerations,  
     364but rather is meant to account for observed processes that affect the density structure of  
     365the ocean’s planetary boundary layer that are not explicitly captured by default in the TKE scheme  
     366($i.e.$ near-inertial oscillations and ocean swells and waves). 
     367 
     368When using this parameterization ($i.e.$ when \np{nn\_etau}~=~1), the TKE input to the ocean ($S$)  
     369imposed by the winds in the form of near-inertial oscillations, swell and waves is parameterized  
     370by \eqref{ZDF_Esbc} the standard TKE surface boundary condition, plus a depth depend one given by: 
     371\begin{equation}  \label{ZDF_Ehtau} 
     372S = (1-f_i) \; f_r \; e_s \; e^{-z / h_\tau}  
     373\end{equation} 
     374where  
     375$z$ is the depth,   
     376$e_s$ is TKE surface boundary condition,  
     377$f_r$ is the fraction of the surface TKE that penetrate in the ocean,  
     378$h_\tau$ is a vertical mixing length scale that controls exponential shape of the penetration,  
     379and $f_i$ is the ice concentration (no penetration if $f_i=1$, that is if the ocean is entirely  
     380covered by sea-ice). 
     381The value of $f_r$, usually a few percents, is specified through \np{rn\_efr} namelist parameter.  
     382The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn\_etau}~=~0)  
     383or a latitude dependent value (varying from 0.5~m at the Equator to a maximum value of 30~m  
     384at high latitudes (\np{nn\_etau}~=~1).  
     385 
     386Note that two other option existe, \np{nn\_etau}~=~2, or 3. They correspond to applying  
     387\eqref{ZDF_Ehtau} only at the base of the mixed layer, or to using the high frequency part  
     388of the stress to evaluate the fraction of TKE that penetrate the ocean.  
     389Those two options are obsolescent features introduced for test purposes. 
     390They will be removed in the next release.  
     391 
     392 
    359393 
    360394% from Burchard et al OM 2008 :  
    361 % the most critical process not reproduced by statistical turbulence models is the activity of internal waves and their interaction with turbulence. After the Reynolds decomposition, internal waves are in principle included in the RANS equations, but later partially excluded by the hydrostatic assumption and the model resolution. Thus far, the representation of internal wave mixing in ocean models has been relatively crude (e.g. Mellor, 1989; Large et al., 1994; Meier, 2001; Axell, 2002; St. Laurent and Garrett, 2002). 
     395% the most critical process not reproduced by statistical turbulence models is the activity of  
     396% internal waves and their interaction with turbulence. After the Reynolds decomposition,  
     397% internal waves are in principle included in the RANS equations, but later partially  
     398% excluded by the hydrostatic assumption and the model resolution.  
     399% Thus far, the representation of internal wave mixing in ocean models has been relatively crude  
     400% (e.g. Mellor, 1989; Large et al., 1994; Meier, 2001; Axell, 2002; St. Laurent and Garrett, 2002). 
    362401 
    363402 
     
    371410%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    372411\begin{figure}[!t]   \begin{center} 
    373 \includegraphics[width=1.00\textwidth]{./TexFiles/Figures/Fig_ZDF_TKE_time_scheme.pdf} 
     412\includegraphics[width=1.00\textwidth]{Fig_ZDF_TKE_time_scheme} 
    374413\caption{ \label{Fig_TKE_time_scheme}  
    375414Illustration of the TKE time integration and its links to the momentum and tracer time integration. } 
     
    550589value near physical boundaries (logarithmic boundary layer law). $C_{\mu}$ and $C_{\mu'}$  
    551590are calculated from stability function proposed by \citet{Galperin_al_JAS88}, or by \citet{Kantha_Clayson_1994}  
    552 or one of the two functions suggested by \citet{Canuto_2001}  (\np{nn\_stab\_func} = 0, 1, 2 or 3, resp.}).  
     591or one of the two functions suggested by \citet{Canuto_2001}  (\np{nn\_stab\_func} = 0, 1, 2 or 3, resp.).  
    553592The value of $C_{0\mu}$ depends of the choice of the stability function. 
    554593 
     
    573612Examples of performance of the 4 turbulent closure scheme can be found in \citet{Warner_al_OM05}. 
    574613 
    575 % ------------------------------------------------------------------------------------------------------------- 
    576 %        K Profile Parametrisation (KPP)  
    577 % ------------------------------------------------------------------------------------------------------------- 
    578 \subsection{K Profile Parametrisation (KPP) (\key{zdfkpp}) } 
    579 \label{ZDF_kpp} 
    580  
    581 %--------------------------------------------namkpp-------------------------------------------------------- 
    582 \namdisplay{namzdf_kpp} 
    583 %-------------------------------------------------------------------------------------------------------------- 
    584  
    585 The KKP scheme has been implemented by J. Chanut ... 
    586 Options are defined through the  \ngn{namzdf\_kpp} namelist variables. 
    587  
    588 \colorbox{yellow}{Add a description of KPP here.} 
    589  
    590614 
    591615% ================================================================ 
     
    621645%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    622646\begin{figure}[!htb]    \begin{center} 
    623 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_npc.pdf} 
     647\includegraphics[width=0.90\textwidth]{Fig_npc} 
    624648\caption{  \label{Fig_npc}  
    625649Example of an unstable density profile treated by the non penetrative  
     
    636660 
    637661Options are defined through the  \ngn{namzdf} namelist variables. 
    638 The non-penetrative convective adjustment is used when \np{ln\_zdfnpc}=true.  
     662The non-penetrative convective adjustment is used when \np{ln\_zdfnpc}~=~\textit{true}.  
    639663It is applied at each \np{nn\_npc} time step and mixes downwards instantaneously  
    640664the statically unstable portion of the water column, but only until the density  
     
    644668(Fig. \ref{Fig_npc}): starting from the top of the ocean, the first instability is  
    645669found. Assume in the following that the instability is located between levels  
    646 $k$ and $k+1$. The potential temperature and salinity in the two levels are  
     670$k$ and $k+1$. The temperature and salinity in the two levels are  
    647671vertically mixed, conserving the heat and salt contents of the water column.  
    648672The new density is then computed by a linear approximation. If the new  
     
    664688\citep{Madec_al_JPO91, Madec_al_DAO91, Madec_Crepon_Bk91}. 
    665689 
    666 Note that in the current implementation of this algorithm presents several  
    667 limitations. First, potential density referenced to the sea surface is used to  
    668 check whether the density profile is stable or not. This is a strong  
    669 simplification which leads to large errors for realistic ocean simulations.  
    670 Indeed, many water masses of the world ocean, especially Antarctic Bottom 
    671 Water, are unstable when represented in surface-referenced potential density.  
    672 The scheme will erroneously mix them up. Second, the mixing of potential  
    673 density is assumed to be linear. This assures the convergence of the algorithm  
    674 even when the equation of state is non-linear. Small static instabilities can thus  
    675 persist due to cabbeling: they will be treated at the next time step.  
    676 Third, temperature and salinity, and thus density, are mixed, but the  
    677 corresponding velocity fields remain unchanged. When using a Richardson  
    678 Number dependent eddy viscosity, the mixing of momentum is done through  
    679 the vertical diffusion: after a static adjustment, the Richardson Number is zero  
    680 and thus the eddy viscosity coefficient is at a maximum. When this convective  
    681 adjustment algorithm is used with constant vertical eddy viscosity, spurious  
    682 solutions can occur since the vertical momentum diffusion remains small even  
    683 after a static adjustment. In that case, we recommend the addition of momentum  
    684 mixing in a manner that mimics the mixing in temperature and salinity  
    685 \citep{Speich_PhD92, Speich_al_JPO96}. 
     690The current implementation has been modified in order to deal with any non linear  
     691equation of seawater (L. Brodeau, personnal communication).  
     692Two main differences have been introduced compared to the original algorithm:  
     693$(i)$ the stability is now checked using the Brunt-V\"{a}is\"{a}l\"{a} frequency  
     694(not the the difference in potential density) ;  
     695$(ii)$ when two levels are found unstable, their thermal and haline expansion coefficients  
     696are vertically mixed in the same way their temperature and salinity has been mixed. 
     697These two modifications allow the algorithm to perform properly and accurately  
     698with TEOS10 or EOS-80 without having to recompute the expansion coefficients at each  
     699mixing iteration. 
    686700 
    687701% ------------------------------------------------------------------------------------------------------------- 
     
    689703% ------------------------------------------------------------------------------------------------------------- 
    690704\subsection   [Enhanced Vertical Diffusion (\np{ln\_zdfevd})] 
    691          {Enhanced Vertical Diffusion (\np{ln\_zdfevd}=true)} 
     705              {Enhanced Vertical Diffusion (\np{ln\_zdfevd}=true)} 
    692706\label{ZDF_evd} 
    693707 
     
    787801%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    788802\begin{figure}[!t]   \begin{center} 
    789 \includegraphics[width=0.99\textwidth]{./TexFiles/Figures/Fig_zdfddm.pdf} 
     803\includegraphics[width=0.99\textwidth]{Fig_zdfddm} 
    790804\caption{  \label{Fig_zdfddm} 
    791805From \citet{Merryfield1999} : (a) Diapycnal diffusivities $A_f^{vT}$  
     
    830844% Bottom Friction 
    831845% ================================================================ 
    832 \section  [Bottom and top Friction (\textit{zdfbfr})]   {Bottom Friction (\mdl{zdfbfr} module)} 
     846\section  [Bottom and Top Friction (\textit{zdfbfr})]   {Bottom and Top Friction (\mdl{zdfbfr} module)} 
    833847\label{ZDF_bfr} 
    834848 
     
    838852 
    839853Options to define the top and bottom friction are defined through the  \ngn{nambfr} namelist variables. 
    840 The top friction is activated only if the ice shelf cavities are opened (\np{ln\_isfcav}~=~true). 
    841 As the friction processes at the top and bottom are the represented similarly, only the bottom friction is described in detail. 
     854The bottom friction represents the friction generated by the bathymetry.  
     855The top friction represents the friction generated by the ice shelf/ocean interface.  
     856As the friction processes at the top and bottom are treated in similar way,  
     857only the bottom friction is described in detail below. 
     858 
    842859 
    843860Both the surface momentum flux (wind stress) and the bottom momentum  
     
    912929$H = 4000$~m, the resulting friction coefficient is $r = 4\;10^{-4}$~m\;s$^{-1}$.  
    913930This is the default value used in \NEMO. It corresponds to a decay time scale  
    914 of 115~days. It can be changed by specifying \np{rn\_bfric1} (namelist parameter). 
     931of 115~days. It can be changed by specifying \np{rn\_bfri1} (namelist parameter). 
    915932 
    916933For the linear friction case the coefficients defined in the general  
     
    922939\end{split} 
    923940\end{equation} 
    924 When \np{nn\_botfr}=1, the value of $r$ used is \np{rn\_bfric1}.  
     941When \np{nn\_botfr}=1, the value of $r$ used is \np{rn\_bfri1}.  
    925942Setting \np{nn\_botfr}=0 is equivalent to setting $r=0$ and leads to a free-slip  
    926943bottom boundary condition. These values are assigned in \mdl{zdfbfr}.  
     
    929946in the \ifile{bfr\_coef} input NetCDF file. The mask values should vary from 0 to 1.  
    930947Locations with a non-zero mask value will have the friction coefficient increased  
    931 by $mask\_value$*\np{rn\_bfrien}*\np{rn\_bfric1}. 
     948by $mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri1}. 
    932949 
    933950% ------------------------------------------------------------------------------------------------------------- 
     
    949966$e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{Killworth1992}  
    950967uses $C_D = 1.4\;10^{-3}$ and $e_b =2.5\;\;10^{-3}$m$^2$\;s$^{-2}$.  
    951 The CME choices have been set as default values (\np{rn\_bfric2} and \np{rn\_bfeb2}  
     968The CME choices have been set as default values (\np{rn\_bfri2} and \np{rn\_bfeb2}  
    952969namelist parameters). 
    953970 
     
    964981\end{equation} 
    965982 
    966 The coefficients that control the strength of the non-linear bottom friction are  
    967 initialised as namelist parameters: $C_D$= \np{rn\_bfri2}, and $e_b$ =\np{rn\_bfeb2}.  
    968 Note for applications which treat tides explicitly a low or even zero value of  
    969 \np{rn\_bfeb2} is recommended. From v3.2 onwards a local enhancement of $C_D$  
    970 is possible via an externally defined 2D mask array (\np{ln\_bfr2d}=true).  
    971 See previous section for details. 
     983The coefficients that control the strength of the non-linear bottom friction are 
     984initialised as namelist parameters: $C_D$= \np{rn\_bfri2}, and $e_b$ =\np{rn\_bfeb2}. 
     985Note for applications which treat tides explicitly a low or even zero value of 
     986\np{rn\_bfeb2} is recommended. From v3.2 onwards a local enhancement of $C_D$ is possible 
     987via an externally defined 2D mask array (\np{ln\_bfr2d}=true).  This works in the same way 
     988as for the linear bottom friction case with non-zero masked locations increased by 
     989$mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri2}. 
     990 
     991% ------------------------------------------------------------------------------------------------------------- 
     992%       Bottom Friction Log-layer 
     993% ------------------------------------------------------------------------------------------------------------- 
     994\subsection{Log-layer Bottom Friction enhancement (\np{nn\_botfr} = 2, \np{ln\_loglayer} = .true.)} 
     995\label{ZDF_bfr_loglayer} 
     996 
     997In the non-linear bottom friction case, the drag coefficient, $C_D$, can be optionally 
     998enhanced using a "law of the wall" scaling. If  \np{ln\_loglayer} = .true., $C_D$ is no 
     999longer constant but is related to the thickness of the last wet layer in each column by: 
     1000 
     1001\begin{equation} 
     1002C_D = \left ( {\kappa \over {\rm log}\left ( 0.5e_{3t}/rn\_bfrz0 \right ) } \right )^2 
     1003\end{equation} 
     1004 
     1005\noindent where $\kappa$ is the von-Karman constant and \np{rn\_bfrz0} is a roughness 
     1006length provided via the namelist. 
     1007 
     1008For stability, the drag coefficient is bounded such that it is kept greater or equal to 
     1009the base \np{rn\_bfri2} value and it is not allowed to exceed the value of an additional 
     1010namelist parameter: \np{rn\_bfri2\_max}, i.e.: 
     1011 
     1012\begin{equation} 
     1013rn\_bfri2 \leq C_D \leq rn\_bfri2\_max 
     1014\end{equation} 
     1015 
     1016\noindent Note also that a log-layer enhancement can also be applied to the top boundary 
     1017friction if under ice-shelf cavities are in use (\np{ln\_isfcav}=.true.).  In this case, the 
     1018relevant namelist parameters are \np{rn\_tfrz0}, \np{rn\_tfri2} 
     1019and \np{rn\_tfri2\_max}. 
    9721020 
    9731021% ------------------------------------------------------------------------------------------------------------- 
     
    10831131baroclinic and barotropic components which is appropriate when using either the 
    10841132explicit or filtered surface pressure gradient algorithms (\key{dynspg\_exp} or  
    1085 {\key{dynspg\_flt}). Extra attention is required, however, when using  
     1133\key{dynspg\_flt}). Extra attention is required, however, when using  
    10861134split-explicit time stepping (\key{dynspg\_ts}). In this case the free surface  
    10871135equation is solved with a small time step \np{rn\_rdt}/\np{nn\_baro}, while the three  
     
    11981246%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    11991247\begin{figure}[!t]   \begin{center} 
    1200 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_ZDF_M2_K1_tmx.pdf} 
     1248\includegraphics[width=0.90\textwidth]{Fig_ZDF_M2_K1_tmx} 
    12011249\caption{  \label{Fig_ZDF_M2_K1_tmx}  
    12021250(a) M2 and (b) K1 internal wave drag energy from \citet{Carrere_Lyard_GRL03} ($W/m^2$). } 
     
    12531301 
    12541302% ================================================================ 
     1303% Internal wave-driven mixing 
     1304% ================================================================ 
     1305\section{Internal wave-driven mixing (\key{zdftmx\_new})} 
     1306\label{ZDF_tmx_new} 
     1307 
     1308%--------------------------------------------namzdf_tmx_new------------------------------------------ 
     1309\namdisplay{namzdf_tmx_new} 
     1310%-------------------------------------------------------------------------------------------------------------- 
     1311 
     1312The parameterization of mixing induced by breaking internal waves is a generalization  
     1313of the approach originally proposed by \citet{St_Laurent_al_GRL02}.  
     1314A three-dimensional field of internal wave energy dissipation $\epsilon(x,y,z)$ is first constructed,  
     1315and the resulting diffusivity is obtained as  
     1316\begin{equation} \label{Eq_Kwave} 
     1317A^{vT}_{wave} =  R_f \,\frac{ \epsilon }{ \rho \, N^2 } 
     1318\end{equation} 
     1319where $R_f$ is the mixing efficiency and $\epsilon$ is a specified three dimensional distribution  
     1320of the energy available for mixing. If the \np{ln\_mevar} namelist parameter is set to false,  
     1321the mixing efficiency is taken as constant and equal to 1/6 \citep{Osborn_JPO80}.  
     1322In the opposite (recommended) case, $R_f$ is instead a function of the turbulence intensity parameter  
     1323$Re_b = \frac{ \epsilon}{\nu \, N^2}$, with $\nu$ the molecular viscosity of seawater,  
     1324following the model of \cite{Bouffard_Boegman_DAO2013}  
     1325and the implementation of \cite{de_lavergne_JPO2016_efficiency}. 
     1326Note that $A^{vT}_{wave}$ is bounded by $10^{-2}\,m^2/s$, a limit that is often reached when the mixing efficiency is constant. 
     1327 
     1328In addition to the mixing efficiency, the ratio of salt to heat diffusivities can chosen to vary  
     1329as a function of $Re_b$ by setting the \np{ln\_tsdiff} parameter to true, a recommended choice).  
     1330This parameterization of differential mixing, due to \cite{Jackson_Rehmann_JPO2014},  
     1331is implemented as in \cite{de_lavergne_JPO2016_efficiency}. 
     1332 
     1333The three-dimensional distribution of the energy available for mixing, $\epsilon(i,j,k)$, is constructed  
     1334from three static maps of column-integrated internal wave energy dissipation, $E_{cri}(i,j)$,  
     1335$E_{pyc}(i,j)$, and $E_{bot}(i,j)$, combined to three corresponding vertical structures  
     1336(de Lavergne et al., in prep): 
     1337\begin{align*} 
     1338F_{cri}(i,j,k) &\propto e^{-h_{ab} / h_{cri} }\\ 
     1339F_{pyc}(i,j,k) &\propto N^{n\_p}\\ 
     1340F_{bot}(i,j,k) &\propto N^2 \, e^{- h_{wkb} / h_{bot} } 
     1341\end{align*}  
     1342In the above formula, $h_{ab}$ denotes the height above bottom,  
     1343$h_{wkb}$ denotes the WKB-stretched height above bottom, defined by 
     1344\begin{equation*} 
     1345h_{wkb} = H \, \frac{ \int_{-H}^{z} N \, dz' } { \int_{-H}^{\eta} N \, dz'  } \; , 
     1346\end{equation*} 
     1347The $n_p$ parameter (given by \np{nn\_zpyc} in \ngn{namzdf\_tmx\_new} namelist)  controls the stratification-dependence of the pycnocline-intensified dissipation.  
     1348It can take values of 1 (recommended) or 2. 
     1349Finally, the vertical structures $F_{cri}$ and $F_{bot}$ require the specification of  
     1350the decay scales $h_{cri}(i,j)$ and $h_{bot}(i,j)$, which are defined by two additional input maps.  
     1351$h_{cri}$ is related to the large-scale topography of the ocean (etopo2)  
     1352and $h_{bot}$ is a function of the energy flux $E_{bot}$, the characteristic horizontal scale of  
     1353the abyssal hill topography \citep{Goff_JGR2010} and the latitude. 
     1354 
     1355% ================================================================ 
     1356 
     1357 
     1358 
     1359\end{document} 
  • branches/2016/dev_INGV_UKMO_2016/DOC/TexFiles/Chapters/Introduction.tex

    r4661 r7351  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13 
    24% ================================================================ 
     
    2426release 8.2, described in \citet{Madec1998}. This model has been used for a wide  
    2527range of applications, both regional or global, as a forced ocean model and as a  
    26 model coupled with the atmosphere. A complete list of references is found on the  
    27 \NEMO web site.  
     28model coupled with the sea-ice and/or the atmosphere.   
    2829 
    2930This manual is organised in as follows. Chapter~\ref{PE} presents the model basics,  
    3031$i.e.$ the equations and their assumptions, the vertical coordinates used, and the  
    3132subgrid scale physics. This part deals with the continuous equations of the model  
    32 (primitive equations, with potential temperature, salinity and an equation of state).  
     33(primitive equations, with temperature, salinity and an equation of seawater).  
    3334The equations are written in a curvilinear coordinate system, with a choice of vertical  
    34 coordinates ($z$ or $s$, with the rescaled height coordinate formulation \textit{z*}, or  
    35 \textit{s*}). Momentum equations are formulated in the vector invariant form or in the  
    36 flux form. Dimensional units in the meter, kilogram, second (MKS) international system  
     35coordinates ($z$, $s$, \textit{z*}, \textit{s*}, $\tilde{z}$, $\tilde{s}$, and a mixture of them).  
     36Momentum equations are formulated in vector invariant or flux form.  
     37Dimensional units in the meter, kilogram, second (MKS) international system  
    3738are used throughout. 
    3839 
     
    7980space and time variable coefficient \citet{Treguier1997}. The model has vertical harmonic  
    8081viscosity and diffusion with a space and time variable coefficient, with options to compute  
    81 the coefficients with \citet{Blanke1993}, \citet{Large_al_RG94}, \citet{Pacanowski_Philander_JPO81},  
     82the coefficients with \citet{Blanke1993}, \citet{Pacanowski_Philander_JPO81},  
    8283or \citet{Umlauf_Burchard_JMS03} mixing schemes. 
    8384 \vspace{1cm} 
    8485  
    85   
     86%%gm    To be put somewhere else .... 
     87 
    8688\noindent CPP keys and namelists are used for inputs to the code.  \newline 
    8789 
     
    112114 \vspace{1cm} 
    113115 
     116%%gm  end 
    114117 
    115118Model outputs management and specific online diagnostics are described in chapters~\ref{DIA}. 
     
    249252 
    250253 
     254 \vspace{1cm} 
     255$\bullet$ The main modifications from NEMO/OPA v3.4 and  v3.6 are :\\ 
     256\begin{enumerate} 
     257\item ... ;  
     258\end{enumerate} 
     259 
     260 
     261 \vspace{1cm} 
     262$\bullet$ The main modifications from NEMO/OPA v3.6 and  v4.0 are :\\ 
     263\begin{enumerate} 
     264\item ... ;  
     265 
     266 
     267\end{enumerate} 
     268 
     269 
     270\end{document} 
Note: See TracChangeset for help on using the changeset viewer.