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 7341 – NEMO

Changeset 7341


Ignore:
Timestamp:
2016-11-25T16:49:05+01:00 (6 years ago)
Author:
acc
Message:

Ticket #1802. Merged in trunk changes from 6393:6998 and resolved single conflicit in cfg.txt

Location:
branches/2016/dev_NOC_2016
Files:
13 deleted
123 edited
9 copied

Legend:

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

    r6289 r7341  
    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 \DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it} 
    136  
    137 \usepackage{times}                % use times font for text 
    138 %\usepackage{mathtime}                          % font for illustrator to work (belleek fonts ) 
    139 %\usepackage[latin1]{inputenc}                % allows some unicode removed (agn) 
    140  
    141  
    142 %%% essai commande 
    143 \newcommand{\nl} [1] {\texttt{\small {\textcolor{blue}{#1}} } } 
    144 \newcommand{\nlv} [1] {\texttt{\footnotesize#1}\xspace} 
    145 \newcommand{\smnlv} [1] {\texttt{\scriptsize#1}\xspace} 
    146  
    147 %%%% namelist & code display................................ 
    148 \usepackage{alltt}      %%  alltt for namelist 
    149 \usepackage{verbatim}   %%  alltt for namelist 
    150 % namelists 
    151 \newcommand{\namdisplay} [1] { 
    152 \begin{alltt} 
    153 {\tiny \verbatiminput{./TexFiles/Namelist/#1}} 
    154 \end{alltt} 
    155   \vspace{-10pt} 
    156 } 
    157 % namelist_tools 
    158 \newcommand{\namtools} [1] { 
    159 \begin{alltt} 
    160 {\tiny \verbatiminput{./TexFiles/Namelist_tools/#1}} 
    161 \end{alltt} 
    162   \vspace{-10pt} 
    163 } 
    164 % code display 
    165 %\newcommand{\codedisplay} [1] { \begin{alltt} {\tiny  {\begin{verbatim} {#1}} \end{verbatim} }  \end{alltt}   } 
    166  
    167  
    168  
    169 %%%% commands for working with text................................ 
    170 % command to "comment out" portions of text ({} argument) or not ({#1} argument) 
    171 \newcommand{\amtcomment}[1]{}    % command to "commented out" portions of text or not (#1 in argument) 
    172 \newcommand{\sgacomment}[1]{}    % command to "commented out" portions of 
    173 \newcommand{\gmcomment}[1]{}     % command to "commented out" portions of 
    174 %                                               % text that span line breaks 
    175 %Red (NR) or Yellow(WARN) 
    176 %\newcommand{\NR} {\colorbox{red}{#1}} 
    177 %\newcommand{\WARN} {{ \colorbox{yellow}{#1}} } 
    178  
    179  
    180  
    181 %%% index commands...................... 
    182 \usepackage{makeidx} 
    183 %\usepackage{showidx}            % show the index entry 
    184  
    185 \newcommand{\mdl} [1] {\textit{#1.F90}\index{Modules!#1}}         %module (mdl) 
    186 \newcommand{\rou} [1] {\textit{#1}\index{Routines!#1}}            %module (routine) 
    187 \newcommand{\hf} [1] {\textit{#1.h90}\index{h90 file!#1}}            %module (h90 files) 
    188 \newcommand{\ngn} [1] {\textit{#1}\index{Namelist Group Name!#1}}    %namelist name (nampar) 
    189 \newcommand{\np} [1] {\textit{#1}\index{Namelist variables!#1}}             %namelist variable 
    190 \newcommand{\jp} [1] {\textit{#1}\index{Model parameters!#1}}        %model parameter (jp) 
    191 \newcommand{\pp} [1] {\textit{#1}\index{Model parameters!#1}}        %namelist parameter (pp) 
    192 \newcommand{\ifile} [1] {\textit{#1.nc}\index{Input NetCDF files!#1.nc}}   %input NetCDF files (.nc) 
    193 \newcommand{\key} [1] {\textbf{key\_#1}\index{CPP keys!key\_#1}}  %key_cpp (key) 
    194 \newcommand{\NEMO} {\textit{NEMO}\xspace}                %NEMO (nemo) 
    195  
    196 %%%%   Bibliography   ............. 
    197 \usepackage[nottoc, notlof, notlot]{tocbibind} 
    198 \usepackage[square, comma]{natbib} 
    199 \bibpunct{[}{]}{,}{a}{}{;}                           %suppress "," after "et al." 
    200 \providecommand{\bibfont}{\small} 
    201  
     16\include{TexFiles/Top_Matter} 
    20217 
    20318% ================================================================ 
    204 % FRONT PAGE 
    205 % ================================================================ 
    206  
    207 %\usepackage{pstricks} 
    208 \title{ 
    209 %\psset{unit=1.1in,linewidth=4pt}   %parameters of the units for pstricks 
    210 % \rput(0,2){ \includegraphics[width=1.1\textwidth]{./TexFiles/Figures/logo_ALL.pdf}             } \\ 
    211 % \vspace{0.1cm} 
    212 \vspace{-6.0cm} 
    213 \includegraphics[width=1.1\textwidth]{./TexFiles/Figures/logo_ALL.pdf}\\ 
    214 \vspace{5.1cm} 
    215 \includegraphics[width=0.9\textwidth]{./TexFiles/Figures/NEMO_logo_Black.pdf} \\ 
    216 \vspace{1.4cm} 
    217 \rule{345pt}{1.5pt} \\ 
    218 \vspace{0.45cm} 
    219 {\Huge NEMO ocean engine} 
    220 \rule{345pt}{1.5pt} \\ 
    221  } 
    222 %{ -- Draft --}   } 
    223 %\date{\today} 
    224 \date{ 
    225 January 2016  \\ 
    226 {\small  -- draft of version 4.0 --} \\ 
    227 ~  \\ 
    228 \textit{\small Note du P\^ole de mod\'{e}lisation de l'Institut Pierre-Simon Laplace No 27 }\\ 
    229 \vspace{0.45cm} 
    230 { ISSN No 1288-1619.} 
    231 } 
    232  
    233  
    234 \author{ 
    235 \Large Gurvan Madec, and the NEMO team  \\ 
    236  \texttt{\small gurvan.madec@locean-ipsl.umpc.fr} \\ 
    237  \texttt{\small nemo\_st@locean-ipsl.umpc.fr} \\ 
    238 %{\small Laboratoire d'Oc\'{e}anographie  et du Climat: Exp\'{e}rimentation et Approches Num\'{e}riques } 
    239 } 
    240  
    241 \dominitoc 
    242 \makeindex        %type this first :     makeindex -s NEMO.ist NEMO_book.idx 
    243  
    244 % ================================================================ 
    245 %      Include ONLY order 
    246 % ================================================================ 
    247  
    248 %\includeonly{./TexFiles/Chapters/Chap_MISC} 
    249 %\includeonly{./TexFiles/Chapters/Chap_ZDF} 
    250 %\includeonly{./TexFiles/Chapters/Chap_STP,./TexFiles/Chapters/Chap_SBC,./TexFiles/Chapters/Chap_TRA} 
    251 %\includeonly{./TexFiles/Chapters/Chap_LBC,./TexFiles/Chapters/Chap_MISC} 
    252 %\includeonly{./TexFiles/Chapters/Chap_Model_Basics} 
    253 %\includeonly{./TexFiles/Chapters/Annex_A,./TexFiles/Chapters/Annex_B,./TexFiles/Chapters/Annex_C,./TexFiles/Chapters/Annex_D} 
    254  
    255 % ================================================================ 
     19% DOCUMENT 
    25620% ================================================================ 
    25721 
     
    27236% ================================================================ 
    27337 
    274 \include{./TexFiles/Chapters/Abstracts_Foreword} 
     38\subfile{TexFiles/Chapters/Abstracts_Foreword} 
    27539 
    27640% ================================================================ 
     
    27842% ================================================================ 
    27943 
    280 \include{./TexFiles/Chapters/Introduction} 
     44\subfile{TexFiles/Chapters/Introduction} 
    28145 
    28246% ================================================================ 
     
    28448% ================================================================ 
    28549 
    286 \include{./TexFiles/Chapters/Chap_Model_Basics} 
     50\subfile{TexFiles/Chapters/Chap_Model_Basics} 
    28751 
    288 \include{./TexFiles/Chapters/Chap_STP}       % Time discretisation (time stepping strategy) 
     52\subfile{TexFiles/Chapters/Chap_STP}         % Time discretisation (time stepping strategy) 
    28953 
    290 \include{./TexFiles/Chapters/Chap_DOM}       % Space discretisation 
     54\subfile{TexFiles/Chapters/Chap_DOM}         % Space discretisation 
    29155 
    292 \include{./TexFiles/Chapters/Chap_TRA}       % Tracer advection/diffusion equation 
     56\subfile{TexFiles/Chapters/Chap_TRA}         % Tracer advection/diffusion equation 
    29357 
    294 \include{./TexFiles/Chapters/Chap_DYN}       % Dynamics : momentum equation 
     58\subfile{TexFiles/Chapters/Chap_DYN}         % Dynamics : momentum equation 
    29559 
    296 \include{./TexFiles/Chapters/Chap_SBC}       % Surface Boundary Conditions 
     60\subfile{TexFiles/Chapters/Chap_SBC}         % Surface Boundary Conditions 
    29761 
    298 \include{./TexFiles/Chapters/Chap_LBC}       % Lateral Boundary Conditions 
     62\subfile{TexFiles/Chapters/Chap_LBC}         % Lateral Boundary Conditions 
    29963 
    300 \include{./TexFiles/Chapters/Chap_LDF}       % Lateral diffusion 
     64\subfile{TexFiles/Chapters/Chap_LDF}         % Lateral diffusion 
    30165 
    302 \include{./TexFiles/Chapters/Chap_ZDF}       % Vertical diffusion 
     66\subfile{TexFiles/Chapters/Chap_ZDF}         % Vertical diffusion 
    30367 
    304 \include{./TexFiles/Chapters/Chap_DIA}       % Outputs and Diagnostics 
     68\subfile{TexFiles/Chapters/Chap_DIA}         % Outputs and Diagnostics 
    30569 
    306 \include{./TexFiles/Chapters/Chap_OBS}          % Observation operator 
     70\subfile{TexFiles/Chapters/Chap_OBS}                    % Observation operator 
    30771 
    308 \include{./TexFiles/Chapters/Chap_ASM}          % Assimilation increments 
     72\subfile{TexFiles/Chapters/Chap_ASM}                    % Assimilation increments 
    30973 
    310 \include{./TexFiles/Chapters/Chap_STO}          % Stochastic param. 
     74\subfile{TexFiles/Chapters/Chap_STO}                    % Stochastic param. 
    31175 
    312 \include{./TexFiles/Chapters/Chap_DIU}          % Diurnal SST models. 
     76\subfile{TexFiles/Chapters/Chap_MISC}        % Miscellaneous topics 
    31377 
    314 \include{./TexFiles/Chapters/Chap_MISC}         % Miscellaneous topics 
    315  
    316 \include{./TexFiles/Chapters/Chap_CFG}       % Predefined configurations 
     78\subfile{TexFiles/Chapters/Chap_CFG}         % Predefined configurations 
    31779 
    31880% ================================================================ 
     
    32284\appendix 
    32385 
    324 %\include{./TexFiles/Chapters/Chap_Conservation} 
    325 \include{./TexFiles/Chapters/Annex_A}        % generalised vertical coordinate 
    326 \include{./TexFiles/Chapters/Annex_B}        % diffusive operator 
    327 \include{./TexFiles/Chapters/Annex_C}        % Discrete invariants of the eqs. 
    328 \include{./TexFiles/Chapters/Annex_ISO}                     % Isoneutral diffusion using triads 
    329 \include{./TexFiles/Chapters/Annex_D}        % Coding rules 
    330 %\include{./TexFiles/Chapters/Annex_E}                   % Notes on some on going staff (no included in the DOC) 
    331 %\include{./TexFiles/Chapters/Annex_Fox-Kemper}   % Notes on Fox-Kemper (no included in the DOC) 
    332 %\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) 
    33395 
    33496% ================================================================ 
     
    344106 
    345107%%\bibliographystyle{plainat} 
    346 \bibliographystyle{./TexFiles/ametsoc}    % AMS biblio style (JPO) 
    347 \bibliography{./TexFiles/Biblio/Biblio} 
     108\bibliographystyle{TexFiles/Styles/ametsoc}     % AMS biblio style (JPO) 
     109\bibliography{TexFiles/Bibliography/Biblio} 
    348110 
    349111% ================================================================ 
  • branches/2016/dev_NOC_2016/DOC/NEMO_coding.conv.tex

    r2738 r7341  
    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_NOC_2016/DOC/TexFiles/Chapters/Abstracts_Foreword.tex

    r6289 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13 
    24% ================================================================ 
     
    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, la Temp\'{e}erature Conservative et la Salinit\'{e} Absolue.  
    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 et GLS. A travers l'infrastructure  
    38 NEMO, l'oc\'{e}an est interfac\'{e} avec des mod\`{e}les de glace de mer (LIM ou CICE),  
    39 de biog\'{e}ochimie marine et de traceurs passifs, et, via le coupleur OASIS, \`{a} plusieurs  
    40 mod\`{e}les de circulation g\'{e}n\'{e}rale atmosph\'{e}rique.  
    41 Il supporte \'{e}galement l'embo\^{i}tement interactif de 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_NOC_2016/DOC/TexFiles/Chapters/Annex_A.tex

    r3294 r7341  
     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_NOC_2016/DOC/TexFiles/Chapters/Annex_B.tex

    r3294 r7341  
     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_NOC_2016/DOC/TexFiles/Chapters/Annex_C.tex

    r6289 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter Ñ Appendix C : Discrete Invariants of the Equations 
     
    15311533%%%%  end of appendix in gm comment 
    15321534%} 
     1535\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Annex_D.tex

    r6289 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Appendix D Ñ Coding Rules 
     
    202204 
    203205To be done.... 
     206\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Annex_E.tex

    r3294 r7341  
     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_NOC_2016/DOC/TexFiles/Chapters/Annex_ISO.tex

    r6289 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Iso-neutral diffusion : 
     
    190192% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    191193\begin{figure}[tb] \begin{center} 
    192     \includegraphics[width=1.05\textwidth]{./TexFiles/Figures/Fig_GRIFF_triad_fluxes} 
     194    \includegraphics[width=1.05\textwidth]{Fig_GRIFF_triad_fluxes} 
    193195    \caption{ \label{fig:triad:ISO_triad} 
    194196      (a) Arrangement of triads $S_i$ and tracer gradients to 
     
    254256% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    255257\begin{figure}[tb] \begin{center} 
    256     \includegraphics[width=0.80\textwidth]{./TexFiles/Figures/Fig_GRIFF_qcells} 
     258    \includegraphics[width=0.80\textwidth]{Fig_GRIFF_qcells} 
    257259    \caption{   \label{fig:triad:qcells} 
    258260    Triad notation for quarter cells. $T$-cells are inside 
     
    658660% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    659661\begin{figure}[h] \begin{center} 
    660     \includegraphics[width=0.60\textwidth]{./TexFiles/Figures/Fig_GRIFF_bdry_triads} 
     662    \includegraphics[width=0.60\textwidth]{Fig_GRIFF_bdry_triads} 
    661663    \caption{  \label{fig:triad:bdry_triads} 
    662664      (a) Uppermost model layer $k=1$ with $i,1$ and $i+1,1$ tracer 
     
    831833    different $i_p,k_p$, denoted by different colours, (e.g. the green 
    832834    triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.}} 
    833   {\includegraphics[width=0.60\textwidth]{./TexFiles/Figures/Fig_GRIFF_MLB_triads}} 
     835  {\includegraphics[width=0.60\textwidth]{Fig_GRIFF_MLB_triads}} 
    834836\end{figure} 
    835837% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    11751177\end{split} 
    11761178\end{equation} 
     1179\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_ASM.tex

    r4147 r7341  
     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_NOC_2016/DOC/TexFiles/Chapters/Chap_CFG.tex

    r4147 r7341  
     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_NOC_2016/DOC/TexFiles/Chapters/Chap_Conservation.tex

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

    r6289 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter I/O & Diagnostics 
     
    14091411 
    14101412% ------------------------------------------------------------------------------------------------------------- 
    1411 %       25 hour mean and hourly Surface, Mid and Bed  
    1412 % ------------------------------------------------------------------------------------------------------------- 
    1413 \section{25 hour mean output for tidal models } 
    1414  
    1415 A module is available to compute a crudely detided M2 signal by obtaining a 25 hour mean. 
    1416 The 25 hour mean is available for daily runs by summing up the 25 hourly instantananeous hourly values from 
    1417 midnight at the start of the day to midight at the day end. 
    1418 This diagnostic is actived with the logical  $ln\_dia25h$ 
    1419  
    1420 %------------------------------------------nam_dia25h------------------------------------------------------ 
    1421 \namdisplay{nam_dia25h} 
    1422 %---------------------------------------------------------------------------------------------------------- 
    1423  
    1424 \section{Top Middle and Bed hourly output } 
    1425  
    1426 A module is available to output the surface (top), mid water and bed diagnostics of a set of standard variables.  
    1427 This can be a useful diagnostic when hourly or sub-hourly output is required in high resolution tidal outputs. 
    1428 The tidal signal is retained but the overall data usage is cut to just three vertical levels. Also the bottom level  
    1429 is calculated for each cell. 
    1430 This diagnostic is actived with the logical  $ln\_diatmb$ 
    1431  
    1432 %------------------------------------------nam_diatmb----------------------------------------------------- 
    1433 \namdisplay{nam_diatmb} 
    1434 %---------------------------------------------------------------------------------------------------------- 
    1435  
    1436 % ------------------------------------------------------------------------------------------------------------- 
    14371413%       Sections transports 
    14381414% ------------------------------------------------------------------------------------------------------------- 
     
    14401416\label{DIA_diag_dct} 
    14411417 
     1418%------------------------------------------namdct---------------------------------------------------- 
     1419\namdisplay{namdct} 
     1420%------------------------------------------------------------------------------------------------------------- 
     1421 
    14421422A module is available to compute the transport of volume, heat and salt through sections.  
    14431423This diagnostic is actived with \key{diadct}. 
     
    14591439and the time scales over which they are averaged, as well as the level of output for debugging: 
    14601440 
    1461 %------------------------------------------namdct---------------------------------------------------- 
    1462 \namdisplay{namdct} 
    1463 %------------------------------------------------------------------------------------------------------------- 
    1464  
    14651441\np{nn\_dct}: frequency of instantaneous transports computing 
    14661442 
     
    14691445\np{nn\_debug}: debugging of the section 
    14701446 
    1471 \subsubsection{ To create a binary file containing the pathway of each section } 
    1472  
    1473 In \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT/run}, the file \texttt{ {list\_sections.ascii\_global}} 
     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}} 
    14741450contains a list of all the sections that are to be computed (this list of sections is based on MERSEA project metrics). 
    14751451 
     
    15831559\texttt{=/0, =/ 1000.}   &  diagonal   & eastward  & westward  & postive: eastward  \\ \hline                 
    15841560\end{tabular} 
    1585  
    1586  
    1587  
    1588 % ------------------------------------------------------------------------------------------------------------- 
    1589 %       Other Diagnostics 
    1590 % ------------------------------------------------------------------------------------------------------------- 
    1591 \section{Other Diagnostics (\key{diahth}, \key{diaar5})} 
    1592 \label{DIA_diag_others} 
    1593  
    1594  
    1595 Aside from the standard model variables, other diagnostics can be computed  
    1596 on-line. The available ready-to-add diagnostics routines can be found in directory DIA.  
    1597 Among the available diagnostics the following ones are obtained when defining  
    1598 the \key{diahth} CPP key:  
    1599  
    1600 - the mixed layer depth (based on a density criterion \citep{de_Boyer_Montegut_al_JGR04}) (\mdl{diahth}) 
    1601  
    1602 - the turbocline depth (based on a turbulent mixing coefficient criterion) (\mdl{diahth}) 
    1603  
    1604 - the depth of the 20\deg C isotherm (\mdl{diahth}) 
    1605  
    1606 - the depth of the thermocline (maximum of the vertical temperature gradient) (\mdl{diahth}) 
    1607  
    1608 The poleward heat and salt transports, their advective and diffusive component, and  
    1609 the meriodional stream function can be computed on-line in \mdl{diaptr}  
    1610 \np{ln\_diaptr} to true (see the \textit{\ngn{namptr} } namelist below).   
    1611 When \np{ln\_subbas}~=~true, transports and stream function are computed  
    1612 for the Atlantic, Indian, Pacific and Indo-Pacific Oceans (defined north of 30\deg S)  
    1613 as well as for the World Ocean. The sub-basin decomposition requires an input file  
    1614 (\ifile{subbasins}) which contains three 2D mask arrays, the Indo-Pacific mask  
    1615 been deduced from the sum of the Indian and Pacific mask (Fig~\ref{Fig_mask_subasins}).  
    1616  
    1617 %------------------------------------------namptr---------------------------------------------------- 
    1618 \namdisplay{namptr}  
    1619 %------------------------------------------------------------------------------------------------------------- 
    1620 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    1621 \begin{figure}[!t]     \begin{center} 
    1622 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_mask_subasins.pdf} 
    1623 \caption{   \label{Fig_mask_subasins} 
    1624 Decomposition of the World Ocean (here ORCA2) into sub-basin used in to compute 
    1625 the heat and salt transports as well as the meridional stream-function: Atlantic basin (red),  
    1626 Pacific basin (green), Indian basin (bleue), Indo-Pacific basin (bleue+green).  
    1627 Note that semi-enclosed seas (Red, Med and Baltic seas) as well as Hudson Bay  
    1628 are removed from the sub-basins. Note also that the Arctic Ocean has been split  
    1629 into Atlantic and Pacific basins along the North fold line.  } 
    1630 \end{center}   \end{figure}   
    1631 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    1632  
    1633 In addition, a series of diagnostics has been added in the \mdl{diaar5}.  
    1634 They corresponds to outputs that are required for AR5 simulations  
    1635 (see Section \ref{DIA_steric} below for one of them).  
    1636 Activating those outputs requires to define the \key{diaar5} CPP key. 
    1637 \\ 
    1638 \\ 
    1639  
    1640 \section{Courant numbers} 
    1641 Courant numbers provide a theoretical indication of the model's numerical stability. The advective Courant numbers can be calculated according to 
    1642 \begin{equation} 
    1643 \label{eq:CFL} 
    1644 C_u = |u|\frac{\rdt}{e_{1u}}, \quad C_v = |v|\frac{\rdt}{e_{2v}}, \quad C_w = |w|\frac{\rdt}{e_{3w}} 
    1645 \end{equation} 
    1646 in 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. 
    1647  
    1648 The 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.  
    16491561 
    16501562 
     
    18021714the \key{diaar5} defined to be called. 
    18031715 
     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 
    18041831% ================================================================ 
    18051832 
     
    18151842 
    18161843 
     1844\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_DIU.tex

    r6289 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Diurnal SST models (DIU) 
     
    162164\end{equation} 
    163165 
    164  
     166\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_DOM.tex

    r6320 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter 2 ——— Space and Time 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,  
     
    201203%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    202204\begin{figure}[!tb]  \begin{center} 
    203 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_index_hor.pdf} 
     205\includegraphics[width=0.90\textwidth]{Fig_index_hor} 
    204206\caption{   \label{Fig_index_hor}     
    205207Horizontal integer indexing used in the \textsc{Fortran} code. The dashed area indicates  
     
    251253%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    252254\begin{figure}[!pt]    \begin{center} 
    253 \includegraphics[width=.90\textwidth]{./TexFiles/Figures/Fig_index_vert.pdf} 
     255\includegraphics[width=.90\textwidth]{Fig_index_vert} 
    254256\caption{ \label{Fig_index_vert}      
    255257Vertical integer indexing used in the \textsc{Fortran } code. Note that  
     
    349351%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    350352\begin{figure}[!t]     \begin{center} 
    351 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_zgr_e3.pdf} 
     353\includegraphics[width=0.90\textwidth]{Fig_zgr_e3} 
    352354\caption{ \label{Fig_zgr_e3}     
    353355Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical,  
     
    458460%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    459461\begin{figure}[!tb]    \begin{center} 
    460 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_z_zps_s_sps.pdf} 
     462\includegraphics[width=1.0\textwidth]{Fig_z_zps_s_sps} 
    461463\caption{  \label{Fig_z_zps_s_sps}    
    462464The ocean bottom as seen by the model:  
     
    486488The last choice in terms of vertical coordinate concerns the presence (or not) in the model domain  
    487489of ocean cavities beneath ice shelves. Setting \np{ln\_isfcav} to true allows to manage ocean cavities,  
    488 otherwise they are filled in. 
     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.  
    489492 
    490493Contrary to the horizontal grid, the vertical grid is computed in the code and no  
     
    567570%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    568571\begin{figure}[!tb]    \begin{center} 
    569 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_zgr.pdf} 
     572\includegraphics[width=0.90\textwidth]{Fig_zgr} 
    570573\caption{ \label{Fig_zgr}     
    571574Default vertical mesh for ORCA2: 30 ocean levels (L30). Vertical level functions for  
     
    772775\end{equation} 
    773776 
    774 where $s_{min}$ is the depth at which the s-coordinate stretching starts and  
    775 allows a z-coordinate to placed on top of the stretched coordinate,  
    776 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). 
    777780 
    778781\begin{equation} 
     
    800803%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    801804\begin{figure}[!ht]    \begin{center} 
    802 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_sco_function.pdf} 
     805\includegraphics[width=1.0\textwidth]{Fig_sco_function} 
    803806\caption{  \label{Fig_sco_function}    
    804807Examples of the stretching function applied to a seamount; from left to right:  
     
    846849%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    847850\begin{figure}[!ht] 
    848    \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/FIG_DOM_compare_coordinates_surface.pdf} 
     851   \includegraphics[width=1.0\textwidth]{FIG_DOM_compare_coordinates_surface} 
    849852        \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.} 
    850853    \label{fig_compare_coordinates_surface} 
     
    886889that do not communicate with another ocean point at the same level are eliminated. 
    887890 
    888 In case of ice shelf cavities, as for the representation of bathymetry, a 2D integer array, misfdep, is created.  
    889 misfdep defines the level of the first wet $t$-point (ie below the ice-shelf/ocean interface). All the cells between $k=1$ and $misfdep(i,j)-1$ are masked.  
    890 By default, $misfdep(:,:)=1$ and no cells are masked. 
    891 Modifications of the model bathymetry and ice shelf draft into  
     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  
    892896the cavities are performed in the \textit{zgr\_isf} routine. The compatibility between ice shelf draft and bathymetry is checked.  
    893897All the locations where the isf cavity is thinnest than \np{rn\_isfhmin} meters are grounded ($i.e.$ masked).  
     
    903907vmask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i,j+1,k)   \\ 
    904908fmask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i+1,j,k)   \\ 
    905                    & \ \ \, * tmask(i,j,k) \ * \ tmask(i+1,j,k) \\ 
     909             &    \ \ \, * tmask(i,j,k) \ * \ tmask(i+1,j,k) \\ 
    906910wmask(i,j,k) &=         \; tmask(i,j,k) \ * \ tmask(i,j,k-1) \text{ with } wmask(i,j,1) = tmask(i,j,1)  
    907911\end{align*} 
    908912 
    909 Note, wmask is now defined. It allows, in case of ice shelves,  
    910 to deal with the top boundary (ice shelf/ocean interface) exactly in the same way as for the bottom boundary.  
     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.  
    911917 
    912918The specification of closed lateral boundaries requires that at least the first and last  
     
    916922(and so too the mask arrays) (see \S~\ref{LBC_jperio}). 
    917923 
    918 %%% 
    919 \gmcomment{   \colorbox{yellow}{Add one word on tricky trick !} mbathy in further modified in zdfbfr{\ldots}.  } 
    920 %%% 
    921924 
    922925% ================================================================ 
     
    942945(typical of the tropical ocean), see \rou{istate\_t\_s} subroutine called from \mdl{istate} module. 
    943946\end{description} 
     947\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_DYN.tex

    r6320 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter ——— Ocean Dynamics (DYN) 
     
    294296%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    295297\begin{figure}[!ht]    \begin{center} 
    296 \includegraphics[width=0.70\textwidth]{./TexFiles/Figures/Fig_DYN_een_triad.pdf} 
     298\includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad} 
    297299\caption{ \label{Fig_DYN_een_triad}   
    298300Triads used in the energy and enstrophy conserving scheme (een) for  
     
    663665$\bullet$ The main hypothesis to compute the ice shelf load is that the ice shelf is in an isostatic equilibrium. 
    664666 The top pressure is computed integrating from surface to the base of the ice shelf a reference density profile  
    665 (prescribed as density of a water at 34.4 PSU and -1.9$\degres C$) and corresponds to the water replaced by the ice shelf.  
     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.  
    666668This top pressure is constant over time. A detailed description of this method is described in \citet{Losch2008}.\\ 
    667669 
     
    827829%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
    828830\begin{figure}[!t]    \begin{center} 
    829 \includegraphics[width=0.7\textwidth]{./TexFiles/Figures/Fig_DYN_dynspg_ts.pdf} 
     831\includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts} 
    830832\caption{  \label{Fig_DYN_dynspg_ts} 
    831833Schematic of the split-explicit time stepping scheme for the external  
     
    12631265 
    12641266% ================================================================ 
     1267\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_LBC.tex

    r6289 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% 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$)  
     
    177179%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    178180\begin{figure}[!t]     \begin{center} 
    179 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_LBC_jperio.pdf} 
     181\includegraphics[width=1.0\textwidth]{Fig_LBC_jperio} 
    180182\caption{    \label{Fig_LBC_jperio} 
    181183setting of (a) east-west cyclic  (b) symmetric across the equator boundary conditions.} 
     
    196198%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    197199\begin{figure}[!t]    \begin{center} 
    198 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_North_Fold_T.pdf} 
     200\includegraphics[width=0.90\textwidth]{Fig_North_Fold_T} 
    199201\caption{    \label{Fig_North_Fold_T}  
    200202North fold boundary with a $T$-point pivot and cyclic east-west boundary condition  
     
    259261%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    260262\begin{figure}[!t]    \begin{center} 
    261 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_mpp.pdf} 
     263\includegraphics[width=0.90\textwidth]{Fig_mpp} 
    262264\caption{   \label{Fig_mpp}  
    263265Positioning of a sub-domain when massively parallel processing is used. } 
     
    333335%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    334336\begin{figure}[!ht]     \begin{center} 
    335 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_mppini2.pdf} 
     337\includegraphics[width=0.90\textwidth]{Fig_mppini2} 
    336338\caption {    \label{Fig_mppini2} 
    337339Example of Atlantic domain defined for the CLIPPER projet. Initial grid is  
     
    564566%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    565567\begin{figure}[!t]      \begin{center} 
    566 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_LBC_bdy_geom.pdf} 
     568\includegraphics[width=1.0\textwidth]{Fig_LBC_bdy_geom} 
    567569\caption {      \label{Fig_LBC_bdy_geom} 
    568570Example of geometry of unstructured open boundary} 
     
    605607%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    606608\begin{figure}[!t]     \begin{center} 
    607 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_LBC_nc_header.pdf} 
     609\includegraphics[width=1.0\textwidth]{Fig_LBC_nc_header} 
    608610\caption {     \label{Fig_LBC_nc_header}  
    609611Example of the header for a coordinates.bdy.nc file} 
     
    642644 
    643645 
     646\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_LDF.tex

    r6289 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13 
    24% ================================================================ 
     
    228230%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    229231\begin{figure}[!ht]      \begin{center} 
    230 \includegraphics[width=0.70\textwidth]{./TexFiles/Figures/Fig_LDF_ZDF1.pdf} 
     232\includegraphics[width=0.70\textwidth]{Fig_LDF_ZDF1} 
    231233\caption {    \label{Fig_LDF_ZDF1} 
    232234averaging procedure for isopycnal slope computation.} 
     
    256258%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    257259\begin{figure}[!ht]     \begin{center} 
    258 \includegraphics[width=0.70\textwidth]{./TexFiles/Figures/Fig_eiv_slp.pdf} 
     260\includegraphics[width=0.70\textwidth]{Fig_eiv_slp} 
    259261\caption {     \label{Fig_eiv_slp} 
    260262Vertical profile of the slope used for lateral mixing in the mixed layer :  
     
    298300diffusion along model level surfaces, i.e. using the shear computed along  
    299301the model levels and with no additional friction at the ocean bottom (see  
    300 {\S\ref{LBC_coast}). 
     302\S\ref{LBC_coast}). 
    301303 
    302304 
     
    425427values are $0$). However, the technique used to compute the isopycnal  
    426428slopes is intended to get rid of such a background diffusion, since it introduces  
    427 spurious diapycnal diffusion (see {\S\ref{LDF_slp}). 
     429spurious diapycnal diffusion (see \S\ref{LDF_slp}). 
    428430 
    429431(4) when an eddy induced advection term is used (\key{traldf\_eiv}), $A^{eiv}$,  
     
    499501 
    500502 
    501  
     503\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_MISC.tex

    r6289 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter ——— Miscellaneous Topics 
     
    6062%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    6163\begin{figure}[!tbp]     \begin{center} 
    62 \includegraphics[width=0.80\textwidth]{./TexFiles/Figures/Fig_Gibraltar.pdf} 
    63 \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} 
    6466\caption{   \label{Fig_MISC_strait_hand}  
    65 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.  
    6668\textit{Top}: using partially open cells. The meridional scale factor at $v$-point  
    6769is reduced on both sides of the strait to account for the real width of the strait  
     
    181183%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    182184\begin{figure}[!ht]    \begin{center} 
    183 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_LBC_zoom.pdf} 
     185\includegraphics[width=0.90\textwidth]{Fig_LBC_zoom} 
    184186\caption{   \label{Fig_LBC_zoom} 
    185187Position of a model domain compared to the data input domain when the zoom functionality is used.} 
     
    317319 
    318320% ================================================================ 
    319  
    320  
    321  
    322  
    323  
     321\end{document} 
     322 
     323 
     324 
     325 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_Model_Basics.tex

    r6289 r7341  
     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$  
     
    312314%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    313315\begin{figure}[!tb]   \begin{center} 
    314 \includegraphics[width=0.60\textwidth]{./TexFiles/Figures/Fig_I_earth_referential.pdf} 
     316\includegraphics[width=0.60\textwidth]{Fig_I_earth_referential} 
    315317\caption{   \label{Fig_referential}  
    316318the geographical coordinate system $(\lambda,\varphi,z)$ and the curvilinear  
     
    807809%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    808810\begin{figure}[!b]    \begin{center} 
    809 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_z_zstar.pdf} 
     811\includegraphics[width=1.0\textwidth]{Fig_z_zstar} 
    810812\caption{   \label{Fig_z_zstar}  
    811813(a) $z$-coordinate in linear free-surface case ;  
     
    12471249not available in the iso-neutral case. 
    12481250 
     1251\end{document} 
     1252 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_Model_Basics_zstar.tex

    r6140 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter 1 ——— Model Basics 
     
    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_NOC_2016/DOC/TexFiles/Chapters/Chap_OBS.tex

    r6140 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter observation operator (OBS) 
     
    744746%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    745747\begin{figure}      \begin{center} 
    746 \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} 
    747749\caption{      \label{fig:obslocal} 
    748750Example of the distribution of observations with the geographical distribution of observational data.}  
     
    771773%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    772774\begin{figure}     \begin{center} 
    773 \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} 
    774776\caption{      \label{fig:obsglobal} 
    775777Example of the distribution of observations with the round-robin distribution of observational data.} 
     
    13881390%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    13891391\begin{figure}     \begin{center} 
    1390 %\includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_main} 
    1391 \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} 
    13921394\caption{      \label{fig:obsdataplotmain} 
    13931395Main window of dataplot.} 
     
    14001402%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    14011403\begin{figure}     \begin{center} 
    1402 %\includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_prof} 
    1403 \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} 
    14041406\caption{      \label{fig:obsdataplotprofile} 
    14051407Profile plot from dataplot produced by right clicking on a point in the main window.} 
     
    14101412 
    14111413 
     1414\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_SBC.tex

    r6320 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter —— Surface Boundary Condition (SBC, ISF, ICB)  
     
    128130The ocean model provides, at each time step, to the surface module (\mdl{sbcmod})  
    129131the surface currents, temperature and salinity.   
    130 These variables are averaged over \np{nf\_sbc} time-step (\ref{Tab_ssm}),  
     132These variables are averaged over \np{nn\_fsbc} time-step (\ref{Tab_ssm}),  
    131133and it is these averaged fields which are used to computes the surface fluxes  
    132 at a frequency of \np{nf\_sbc} time-step. 
     134at a frequency of \np{nn\_fsbc} time-step. 
    133135 
    134136 
     
    144146\caption{  \label{Tab_ssm}    
    145147Ocean variables provided by the ocean to the surface module (SBC).  
    146 The variable are averaged over nf{\_}sbc time step, $i.e.$ the frequency of  
    147 computation of surface fluxes.} 
     148The variable are averaged over nn{\_}fsbc time step,  
     149$i.e.$ the frequency of computation of surface fluxes.} 
    148150\end{center}   \end{table} 
    149151%-------------------------------------------------------------------------------------------------------------- 
     
    592594or larger than the one of the input atmospheric fields. 
    593595 
     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 
    594612% ------------------------------------------------------------------------------------------------------------- 
    595613%        CLIO Bulk formulea 
     
    926944\begin{description} 
    927945\item[\np{nn\_isf}~=~1] 
    928 The ice shelf cavity is represented (\np{ln\_isfcav}~=~true needed). The fwf and heat flux are computed. Two different bulk formula are available: 
     946The ice shelf cavity is represented (\np{ln\_isfcav}~=~true needed). The fwf and heat flux are computed.  
     947Two different bulk formula are available: 
    929948   \begin{description} 
    930949   \item[\np{nn\_isfblk}~=~1] 
     
    9881007This parameter is only used if \np{nn\_isf}~=~1 or \np{nn\_isf}~=~4 
    9891008 
    990 If \np{rn\_hisf\_tbl} = 0.0, the fluxes are put in the top level whatever is its tickness.  
    991  
    992 If \np{rn\_hisf\_tbl} $>$ 0.0, the fluxes are spread over the first \np{rn\_hisf\_tbl} m (ie over one or several cells).\\ 
     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).\\ 
    9931012 
    9941013The ice shelf melt is implemented as a volume flux with in the same way as for the runoff. 
     
    11161135%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    11171136\begin{figure}[!t]    \begin{center} 
    1118 \includegraphics[width=0.8\textwidth]{./TexFiles/Figures/Fig_SBC_diurnal.pdf} 
     1137\includegraphics[width=0.8\textwidth]{Fig_SBC_diurnal} 
    11191138\caption{ \label{Fig_SBC_diurnal}     
    11201139Example of recontruction of the diurnal cycle variation of short wave flux   
     
    11491168%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    11501169\begin{figure}[!t]  \begin{center} 
    1151 \includegraphics[width=0.7\textwidth]{./TexFiles/Figures/Fig_SBC_dcy.pdf} 
     1170\includegraphics[width=0.7\textwidth]{Fig_SBC_dcy} 
    11521171\caption{ \label{Fig_SBC_dcy}    
    11531172Example of recontruction of the diurnal cycle variation of short wave flux   
     
    13441363 
    13451364 
     1365\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_STO.tex

    r6289 r7341  
     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 
    12125%---------------------------------------namsbc-------------------------------------------------- 
    13126\namdisplay{namsto} 
    14127%-------------------------------------------------------------------------------------------------------------- 
    15 $\ $\newline    % force a new ligne 
     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. 
    16176 
    17177 
    18 See \cite{Brankart_OM2013} and \cite{Brankart_al_GMD2015} papers for a description of the parameterization. 
     178\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_STP.tex

    r6140 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13 
    24% ================================================================ 
     
    204206%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    205207\begin{figure}[!t]     \begin{center} 
    206 \includegraphics[width=0.7\textwidth]{./TexFiles/Figures/Fig_TimeStepping_flowchart.pdf} 
     208\includegraphics[width=0.7\textwidth]{Fig_TimeStepping_flowchart} 
    207209\caption{   \label{Fig_TimeStep_flowchart} 
    208210Sketch of the leapfrog time stepping sequence in \NEMO from \citet{Leclair_Madec_OM09}.  
     
    266268%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    267269\begin{figure}[!t]     \begin{center} 
    268 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_MLF_forcing.pdf} 
     270\includegraphics[width=0.90\textwidth]{Fig_MLF_forcing} 
    269271\caption{   \label{Fig_MLF_forcing} 
    270272Illustration of forcing integration methods.  
     
    402404} 
    403405%% 
     406\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_TRA.tex

    r6320 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter 1 ——— Ocean Tracers (TRA) 
     
    9092%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    9193\begin{figure}[!t]    \begin{center} 
    92 \includegraphics[width=0.9\textwidth]{./TexFiles/Figures/Fig_adv_scheme.pdf} 
     94\includegraphics[width=0.9\textwidth]{Fig_adv_scheme} 
    9395\caption{   \label{Fig_adv_scheme}  
    9496Schematic representation of some ways used to evaluate the tracer value  
     
    734736(see \S\ref{SBC_rnf} for further detail of how it acts on temperature and salinity tendencies) 
    735737 
    736 $\bullet$ \textit{fwfisf}, the mass flux associated with ice shelf melt, (see \S\ref{SBC_isf} for further details  
    737 on how the ice shelf melt is computed and applied). 
     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). 
    738740 
    739741The surface boundary condition on temperature and salinity is applied as follows: 
     
    840842($i.e.$ the inverses of the extinction length scales) are tabulated over 61 nonuniform  
    841843chlorophyll classes ranging from 0.01 to 10 g.Chl/L (see the routine \rou{trc\_oce\_rgb}  
    842 in \mdl{trc\_oce} module). Three types of chlorophyll can be chosen in the RGB formulation: 
    843 (1) a constant 0.05 g.Chl/L value everywhere (\np{nn\_chdta}=0) ; (2) an observed  
    844 time varying chlorophyll (\np{nn\_chdta}=1) ; (3) simulated time varying chlorophyll 
    845 by TOP biogeochemical model (\np{ln\_qsr\_bio}=true). In the latter case, the RGB  
    846 formulation is used to calculate both the phytoplankton light limitation in PISCES  
    847 or LOBSTER and the oceanic heating rate.  
    848  
     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}  
    849859The trend in \eqref{Eq_tra_qsr} associated with the penetration of the solar radiation  
    850860is added to the temperature trend, and the surface heat flux is modified in routine \mdl{traqsr}.  
     
    861871%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    862872\begin{figure}[!t]     \begin{center} 
    863 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_TRA_Irradiance.pdf} 
     873\includegraphics[width=1.0\textwidth]{Fig_TRA_Irradiance} 
    864874\caption{    \label{Fig_traqsr_irradiance} 
    865875Penetration profile of the downward solar irradiance calculated by four models.  
     
    882892%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    883893\begin{figure}[!t]     \begin{center} 
    884 \includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_TRA_geoth.pdf} 
     894\includegraphics[width=1.0\textwidth]{Fig_TRA_geoth} 
    885895\caption{   \label{Fig_geothermal} 
    886896Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{Emile-Geay_Madec_OS09}. 
     
    9921002%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    9931003\begin{figure}[!t]   \begin{center} 
    994 \includegraphics[width=0.7\textwidth]{./TexFiles/Figures/Fig_BBL_adv.pdf} 
     1004\includegraphics[width=0.7\textwidth]{Fig_BBL_adv} 
    9951005\caption{   \label{Fig_bbl}   
    9961006Advective/diffusive Bottom Boundary Layer. The BBL parameterisation is  
     
    11501160The restoration coefficient can be set to zero in equatorial regions by specifying a positive value of \np{nn\_hdmp}.  
    11511161Equatorward of this latitude the restoration coefficient will be zero with a smooth transition to  
    1152 the full values of a 10$^{\circ}$ latitud band.  
     1162the full values of a 10\deg latitud band.  
    11531163This is often used because of the short adjustment time scale in the equatorial region  
    11541164\citep{Reverdin1991, Fujio1991, Marti_PhD92}. The time scale associated with the damping depends on the depth as a  
     
    12501260rational function approximation for hydrographic data analysis  \citep{TEOS10}.  
    12511261A key point is that conservative state variables are used:  
    1252 Absolute Salinity (unit: g/kg, notation: $S_A$) and Conservative Temperature (unit: $\degres C$, notation: $\Theta$). 
     1262Absolute Salinity (unit: g/kg, notation: $S_A$) and Conservative Temperature (unit: \degC, notation: $\Theta$). 
    12531263The pressure in decibars is approximated by the depth in meters.  
    12541264With TEOS10, the specific heat capacity of sea water, $C_p$, is a constant. It is set to  
    1255 $C_p=3991.86795711963~J\,Kg^{-1}\,\degres K^{-1}$, according to \citet{TEOS10}. 
     1265$C_p=3991.86795711963~J\,Kg^{-1}\,^{\circ}K^{-1}$, according to \citet{TEOS10}. 
    12561266 
    12571267Choosing polyTEOS10-bsq implies that the state variables used by the model are  
     
    12661276to accurately fit EOS80 (Roquet, personal comm.). The state variables used in both the EOS80  
    12671277and the ocean model are:  
    1268 the Practical Salinity ((unit: psu, notation: $S_p$)) and Potential Temperature (unit: $\degres C$, notation: $\theta$). 
     1278the Practical Salinity ((unit: psu, notation: $S_p$)) and Potential Temperature (unit: $^{\circ}C$, notation: $\theta$). 
    12691279The pressure in decibars is approximated by the depth in meters.   
    12701280With thsi EOS, the specific heat capacity of sea water, $C_p$, is a function of temperature,  
     
    13851395                   I've changed "derivative" to "difference" and "mean" to "average"} 
    13861396 
    1387 With partial cells (\np{ln\_zps}=true) at bottom and top (\np{ln\_isfcav}=true), in general, tracers in horizontally  
    1388 adjacent cells live at different depths. Horizontal gradients of tracers are needed  
    1389 for horizontal diffusion (\mdl{traldf} module) and for the hydrostatic pressure  
    1390 gradient (\mdl{dynhpg} module) to be active. The partial cell properties  
    1391 at the top (\np{ln\_isfcav}=true) are computed in the same way as for the bottom. So, only the bottom interpolation is shown. 
    1392 \gmcomment{STEVEN from gm : question: not sure of  what -to be active- means} 
     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. 
    13931403 
    13941404Before taking horizontal gradients between the tracers next to the bottom, a linear  
     
    14001410%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    14011411\begin{figure}[!p]    \begin{center} 
    1402 \includegraphics[width=0.9\textwidth]{./TexFiles/Figures/Partial_step_scheme.pdf} 
     1412\includegraphics[width=0.9\textwidth]{Partial_step_scheme} 
    14031413\caption{   \label{Fig_Partial_step_scheme}  
    14041414Discretisation of the horizontal difference and average of tracers in the $z$-partial  
     
    14671477\gmcomment{gm :   this last remark has to be done} 
    14681478%%% 
     1479\end{document} 
  • branches/2016/dev_NOC_2016/DOC/TexFiles/Chapters/Chap_ZDF.tex

    r6320 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13% ================================================================ 
    24% Chapter  Vertical Ocean Physics (ZDF) 
     
    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. 
     
    408410%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    409411\begin{figure}[!t]   \begin{center} 
    410 \includegraphics[width=1.00\textwidth]{./TexFiles/Figures/Fig_ZDF_TKE_time_scheme.pdf} 
     412\includegraphics[width=1.00\textwidth]{Fig_ZDF_TKE_time_scheme} 
    411413\caption{ \label{Fig_TKE_time_scheme}  
    412414Illustration of the TKE time integration and its links to the momentum and tracer time integration. } 
     
    587589value near physical boundaries (logarithmic boundary layer law). $C_{\mu}$ and $C_{\mu'}$  
    588590are calculated from stability function proposed by \citet{Galperin_al_JAS88}, or by \citet{Kantha_Clayson_1994}  
    589 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.).  
    590592The value of $C_{0\mu}$ depends of the choice of the stability function. 
    591593 
     
    643645%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    644646\begin{figure}[!htb]    \begin{center} 
    645 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_npc.pdf} 
     647\includegraphics[width=0.90\textwidth]{Fig_npc} 
    646648\caption{  \label{Fig_npc}  
    647649Example of an unstable density profile treated by the non penetrative  
     
    799801%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    800802\begin{figure}[!t]   \begin{center} 
    801 \includegraphics[width=0.99\textwidth]{./TexFiles/Figures/Fig_zdfddm.pdf} 
     803\includegraphics[width=0.99\textwidth]{Fig_zdfddm} 
    802804\caption{  \label{Fig_zdfddm} 
    803805From \citet{Merryfield1999} : (a) Diapycnal diffusivities $A_f^{vT}$  
     
    852854The bottom friction represents the friction generated by the bathymetry.  
    853855The top friction represents the friction generated by the ice shelf/ocean interface.  
    854 As the friction processes at the top and bottom are represented similarly, only the bottom friction is described in detail below.\\ 
     856As the friction processes at the top and bottom are treated in similar way,  
     857only the bottom friction is described in detail below. 
    855858 
    856859 
     
    926929$H = 4000$~m, the resulting friction coefficient is $r = 4\;10^{-4}$~m\;s$^{-1}$.  
    927930This is the default value used in \NEMO. It corresponds to a decay time scale  
    928 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). 
    929932 
    930933For the linear friction case the coefficients defined in the general  
     
    936939\end{split} 
    937940\end{equation} 
    938 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}.  
    939942Setting \np{nn\_botfr}=0 is equivalent to setting $r=0$ and leads to a free-slip  
    940943bottom boundary condition. These values are assigned in \mdl{zdfbfr}.  
     
    943946in the \ifile{bfr\_coef} input NetCDF file. The mask values should vary from 0 to 1.  
    944947Locations with a non-zero mask value will have the friction coefficient increased  
    945 by $mask\_value$*\np{rn\_bfrien}*\np{rn\_bfric1}. 
     948by $mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri1}. 
    946949 
    947950% ------------------------------------------------------------------------------------------------------------- 
     
    963966$e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{Killworth1992}  
    964967uses $C_D = 1.4\;10^{-3}$ and $e_b =2.5\;\;10^{-3}$m$^2$\;s$^{-2}$.  
    965 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}  
    966969namelist parameters). 
    967970 
     
    978981\end{equation} 
    979982 
    980 The coefficients that control the strength of the non-linear bottom friction are  
    981 initialised as namelist parameters: $C_D$= \np{rn\_bfri2}, and $e_b$ =\np{rn\_bfeb2}.  
    982 Note for applications which treat tides explicitly a low or even zero value of  
    983 \np{rn\_bfeb2} is recommended. From v3.2 onwards a local enhancement of $C_D$  
    984 is possible via an externally defined 2D mask array (\np{ln\_bfr2d}=true).  
    985 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}. 
    9861020 
    9871021% ------------------------------------------------------------------------------------------------------------- 
     
    10971131baroclinic and barotropic components which is appropriate when using either the 
    10981132explicit or filtered surface pressure gradient algorithms (\key{dynspg\_exp} or  
    1099 {\key{dynspg\_flt}). Extra attention is required, however, when using  
     1133\key{dynspg\_flt}). Extra attention is required, however, when using  
    11001134split-explicit time stepping (\key{dynspg\_ts}). In this case the free surface  
    11011135equation is solved with a small time step \np{rn\_rdt}/\np{nn\_baro}, while the three  
     
    12121246%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    12131247\begin{figure}[!t]   \begin{center} 
    1214 \includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_ZDF_M2_K1_tmx.pdf} 
     1248\includegraphics[width=0.90\textwidth]{Fig_ZDF_M2_K1_tmx} 
    12151249\caption{  \label{Fig_ZDF_M2_K1_tmx}  
    12161250(a) M2 and (b) K1 internal wave drag energy from \citet{Carrere_Lyard_GRL03} ($W/m^2$). } 
     
    12671301 
    12681302% ================================================================ 
     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_NOC_2016/DOC/TexFiles/Chapters/Introduction.tex

    r6289 r7341  
     1\documentclass[NEMO_book]{subfiles} 
     2\begin{document} 
    13 
    24% ================================================================ 
     
    261263\begin{enumerate} 
    262264\item ... ;  
    263 \end{enumerate} 
    264  
    265  
     265 
     266 
     267\end{enumerate} 
     268 
     269 
     270\end{document} 
  • branches/2016/dev_NOC_2016/NEMOGCM/ARCH/CMCC/arch-ifort_athena_xios.fcm

    r6140 r7341  
    3434 
    3535# required modules 
    36 # module load  INTEL/intel_xe_2013 NETCDF/netcdf-4.3_parallel_shared NETCDF/parallel-netcdf-1.3.1 HDF5/hdf5-1.8.11_parallel_shared 
     36# module load  INTEL/intel_xe_2013 NETCDF/netcdf-4.3_parallel NETCDF/parallel-netcdf-1.7.0 HDF5/hdf5-1.8.11_parallel 
    3737 
    38 # Environment variables set by user. Others should automatically define when loading modules. 
     38# NETCDF and PNETCDF should be set automatically when loading modules. 
     39# The following environment variables must be set by the user. 
    3940#export XIOS=/users/home/models/nemo/xios 
    40 #export HDF5=/users/home/opt/hdf5/hdf5-1.8.11_parallel_shared 
    41 #export NETCDF=/users/home/opt/netcdf/netcdf-4.3_parallel_shared 
     41#export HDF5=/users/home/opt/hdf5/hdf5-1.8.11_parallel 
    4242 
    43 %NCDF_INC            -I${NETCDF}/include  
    44 %NCDF_LIB            -L${NETCDF}/lib -lnetcdff -lnetcdf 
     43%NCDF_INC            -I${NETCDF}/include -I${PNETCDF}/include 
     44%NCDF_LIB            -L${NETCDF}/lib -lnetcdff -lnetcdf -L${PNETCDF}/lib -lpnetcdf 
    4545%HDF5_INC            -I${HDF5}/include 
    4646%HDF5_LIB            -L${HDF5}/lib -lhdf5_hl -lhdf5 
     
    4949%CPP                 cpp 
    5050%FC                  mpiifort 
    51 %FCFLAGS             -r8 -O3 -xHost -fp-model source -traceback ${CFLAGS}  
     51%FCFLAGS             -r8 -O3 -xHost -fp-model source -traceback 
    5252%FFLAGS              %FCFLAGS 
    5353%LD                  mpiifort 
    5454%FPPFLAGS            -P -C -traditional 
    55 %LDFLAGS             -lstdc++ -lz -lgpfs -lcurl  ${LDFLAGS} 
     55%LDFLAGS             -lstdc++ -lz -lgpfs -lcurl 
    5656%AR                  ar  
    5757%ARFLAGS             -r 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg

    r6140 r7341  
    257257&nameos        !   ocean physical parameters 
    258258!----------------------------------------------------------------------- 
     259   ln_teos10   = .true.         !  = Use TEOS-10 equation of state 
    259260/ 
    260261!----------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg

    r6140 r7341  
    205205&nameos        !   ocean physical parameters 
    206206!----------------------------------------------------------------------- 
    207    nn_eos      =  0      !  type of equation of state and Brunt-Vaisala frequency 
    208                                  !  =-1, TEOS-10 
    209                                  !  = 0, EOS-80 
    210                                  !  = 1, S-EOS   (simplified eos) 
    211    ln_useCT    = .false. ! use of Conservative Temp. ==> surface CT converted in Pot. Temp. in sbcssm 
     207   ln_eos80    = .true.         !  = Use EOS80 equation of state 
    212208/ 
    213209!----------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg

    r6140 r7341  
    187187&nameos        !   ocean physical parameters 
    188188!----------------------------------------------------------------------- 
    189    nn_eos      =  0       !  type of equation of state and Brunt-Vaisala frequency 
    190                                  !  =-1, TEOS-10  
    191                                  !  = 0, EOS-80  
    192                                  !  = 1, S-EOS   (simplified eos) 
    193    ln_useCT    = .false.  ! use of Conservative Temp. ==> surface CT converted in Pot. Temp. in sbcssm 
     189   ln_eos80    = .true.         !  = Use EOS80 equation of state 
    194190   !                             ! 
    195191   !                      ! S-EOS coefficients : 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg

    r6140 r7341  
    190190&nameos        !   ocean physical parameters 
    191191!----------------------------------------------------------------------- 
    192    nn_eos      =  0       !  type of equation of state and Brunt-Vaisala frequency 
    193                                  !  =-1, TEOS-10 
    194                                  !  = 0, EOS-80 
    195                                  !  = 1, S-EOS   (simplified eos) 
    196    ln_useCT    = .false.  ! use of Conservative Temp. ==> surface CT converted in Pot. Temp. in sbcssm 
     192   ln_eos80    = .true.         !  = Use EOS80 equation of state 
    197193   !                             ! 
    198194   !                      ! S-EOS coefficients : 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg

    r6140 r7341  
    109109&nameos        !   ocean physical parameters 
    110110!----------------------------------------------------------------------- 
    111    nn_eos      =  0       !  type of equation of state and Brunt-Vaisala frequency 
    112                                  !  =-1, TEOS-10 
    113                                  !  = 0, EOS-80 
    114                                  !  = 1, S-EOS   (simplified eos) 
    115    ln_useCT    = .false.  ! use of Conservative Temp. ==> surface CT converted in Pot. Temp. in sbcssm 
     111   ln_eos80    = .true.         !  = Use EOS80 equation of state 
    116112   !                             ! 
    117113   !                      ! S-EOS coefficients : 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg

    r6140 r7341  
    183183&nameos        !   ocean physical parameters 
    184184!----------------------------------------------------------------------- 
    185    nn_eos      =   0       !  type of equation of state and Brunt-Vaisala frequency 
     185   ln_eos80    = .true.         !  = Use EOS80 equation of state 
    186186/ 
    187187!----------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg

    r6140 r7341  
    132132&nameos        !   ocean physical parameters 
    133133!----------------------------------------------------------------------- 
     134   ln_teos10    = .true.         !  = Use TEOS-10 equation of state 
    134135/ 
    135136!----------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg

    r6140 r7341  
    110110&nameos        !   ocean physical parameters 
    111111!----------------------------------------------------------------------- 
     112   ln_teos10    = .true.         !  = Use TEOS-10 equation of state 
    112113/ 
    113114!----------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg

    r6140 r7341  
    109109&nameos        !   ocean physical parameters 
    110110!----------------------------------------------------------------------- 
     111   ln_teos10    = .true.         !  = Use TEOS-10 equation of state 
    111112/ 
    112113!----------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg

    r6140 r7341  
    169169&nameos        !   ocean physical parameters 
    170170!----------------------------------------------------------------------- 
     171   ln_teos10    = .true.         !  = Use TEOS-10 equation of state 
    171172/ 
    172173!----------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg

    r6140 r7341  
    106106&nameos        !   ocean physical parameters 
    107107!----------------------------------------------------------------------- 
     108   ln_teos10    = .true.         !  = Use TEOS-10 equation of state 
    108109/ 
    109110!----------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg

    r6140 r7341  
    8585&nameos        !   ocean physical parameters 
    8686!----------------------------------------------------------------------- 
     87   ln_teos10    = .true.         !  = Use TEOS-10 equation of state 
    8788/ 
    8889!---------------------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg

    r6140 r7341  
    8787&nameos        !   ocean physical parameters 
    8888!----------------------------------------------------------------------- 
     89   ln_teos10    = .true.         !  = Use TEOS-10 equation of state 
    8990/ 
    9091!----------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/SHARED/field_def.xml

    r7339 r7341  
    183183         <field id="empmr"        long_name="Net Upward Water Flux"                standard_name="water_flux_out_of_sea_ice_and_sea_water"                              unit="kg/m2/s"   /> 
    184184         <field id="empbmr"       long_name="Net Upward Water Flux at pre. tstep"  standard_name="water_flux_out_of_sea_ice_and_sea_water"                              unit="kg/m2/s"   /> 
     185         <field id="emp_oce"      long_name="Evap minus Precip over ocean"         standard_name="evap_minus_precip_over_sea_water"                                     unit="kg/m2/s"   /> 
     186         <field id="emp_ice"      long_name="Evap minus Precip over ice"           standard_name="evap_minus_precip_over_sea_ice"                                       unit="kg/m2/s"   /> 
    185187         <field id="saltflx"      long_name="Downward salt flux"                                                                                                        unit="1e-3/m2/s" /> 
    186188         <field id="fmmflx"       long_name="Water flux due to freezing/melting"                                                                                        unit="kg/m2/s"   /> 
     
    275277         <field id="emp_x_sst"    long_name="Concentration/Dilution term on SST"                                                                                              unit="kg*degC/m2/s" /> 
    276278         <field id="emp_x_sss"    long_name="Concentration/Dilution term on SSS"                                                                                              unit="kg*1e-3/m2/s" />         
     279         <field id="rnf_x_sst"    long_name="Runoff term on SST"                                                                                                              unit="kg*degC/m2/s" /> 
     280         <field id="rnf_x_sss"    long_name="Runoff term on SSS"                                                                                                              unit="kg*1e-3/m2/s" /> 
    277281        
    278282         <field id="iceconc"      long_name="ice concentration"                                            standard_name="sea_ice_area_fraction"                              unit="%"            /> 
     
    289293         <field id="micesalt"     long_name="Mean ice salinity"                                                                                                               unit="1e-3"         /> 
    290294         <field id="miceage"      long_name="Mean ice age"                                                                                                                    unit="years"        /> 
     295         <field id="alb_ice"      long_name="Mean albedo over sea ice"                                                                                                        unit=""             /> 
     296         <field id="albedo"       long_name="Mean albedo over sea ice and ocean"                                                                                              unit=""             /> 
    291297 
    292298         <field id="iceage_cat"   long_name="Ice age for categories"                                       unit="days"   axis_ref="ncatice" /> 
     
    326332         <field id="sfxsni"       long_name="salt flux from snow-ice formation"                            unit="1e-3*kg/m2/day" /> 
    327333         <field id="sfxopw"       long_name="salt flux from open water ice formation"                      unit="1e-3*kg/m2/day" /> 
     334         <field id="sfxsub"       long_name="salt flux from sublimation"                                   unit="1e-3*kg/m2/day" /> 
    328335         <field id="sfx"          long_name="salt flux total"                                              unit="1e-3*kg/m2/day" /> 
    329336 
     
    339346         <field id="vfxsub"       long_name="snw sublimation"                                              unit="m/day"   /> 
    340347         <field id="vfxspr"       long_name="snw precipitation on ice"                                     unit="m/day"   /> 
     348         <field id="vfxthin"      long_name="daily thermo ice prod. for thin ice(<20cm) + open water"      unit="m/day"   /> 
    341349 
    342350         <field id="afxtot"       long_name="area tendency (total)"                                        unit="day-1"   /> 
     
    563571         <field id="ibgsfxbom"    long_name="global mean salt flux (thermo)"                         unit="1e-3*m/day" /> 
    564572         <field id="ibgsfxsum"    long_name="global mean salt flux (thermo)"                         unit="1e-3*m/day" /> 
     573         <field id="ibgsfxsub"    long_name="global mean salt flux (thermo)"                         unit="1e-3*m/day" /> 
    565574 
    566575         <field id="ibghfxdhc"    long_name="Heat content variation in snow and ice"                 unit="W"          /> 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/SHARED/namelist_ice_lim3_ref

    r5429 r7341  
    2121   cn_icerst_outdir = "."          !  directory in which to write output ice restarts 
    2222   ln_limdyn     = .true.          !  ice dynamics (T) or thermodynamics only (F) 
    23    rn_amax       = 0.999           !  maximum tolerated ice concentration  
     23   rn_amax_n     = 0.999           !  maximum tolerated ice concentration NH 
     24   rn_amax_s     = 0.999           !  maximum tolerated ice concentration SH 
    2425   ln_limdiahsb  = .false.         !  check the heat and salt budgets (T) or not (F) 
    2526   ln_limdiaout  = .true.          !  output the heat and salt budgets (T) or not (F) 
     
    8586   rn_hnewice  = 0.1               !  thickness for new ice formation in open water (m) 
    8687   ln_frazil   = .false.           !  use frazil ice collection thickness as a function of wind (T) or not (F) 
    87    rn_maxfrazb = 0.0               !  maximum fraction of frazil ice collecting at the ice base 
     88   rn_maxfrazb = 1.0               !  maximum fraction of frazil ice collecting at the ice base 
    8889   rn_vfrazb   = 0.417             !  thresold drift speed for frazil ice collecting at the ice bottom (m/s) 
    8990   rn_Cfrazb   = 5.0               !  squeezing coefficient for frazil ice collecting at the ice bottom 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/SHARED/namelist_pisces_ref

    r5385 r7341  
    6666   qdfelim    =  7.E-6    ! Optimal quota of diatoms 
    6767   caco3r     =  0.3      ! mean rain ratio 
     68   oxymin    =  1.E-6     ! Half-saturation constant for anoxia 
    6869/ 
    6970!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
     
    162163   xsiremlab =  0.03      ! fast remineralization rate of Si 
    163164   xsilab    =  0.5       ! Fraction of labile biogenic silica 
    164    oxymin    =  1.E-6     ! Half-saturation constant for anoxia 
    165165/ 
    166166!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/SHARED/namelist_ref

    r6386 r7341  
    33!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    44!! NEMO/OPA  :  1 - run manager      (namrun) 
    5 !! namelists    2 - Domain           (namcfg, namzgr, namzgr_sco, namdom, namtsd) 
     5!! namelists    2 - Domain           (namcfg, namzgr, namzgr_sco, namdom, namtsd, namcrs, namc1d, namc1d_uvd) 
    66!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core, namsbc_sas 
    77!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf, 
     
    5959!!====================================================================== 
    6060!!   namcfg       parameters of the configuration 
    61 !!   namzgr       vertical coordinate 
     61!!   namzgr       vertical coordinate                                   (default: NO selection) 
    6262!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate 
    6363!!   namdom       space and time domain (bathymetry, mesh, timestep) 
     64!!   namwad       Wetting and drying                                    (default F) 
     65!!   namtsd       data: temperature & salinity 
    6466!!   namcrs       coarsened grid (for outputs and/or TOP)               ("key_crs") 
    6567!!   namc1d       1D configuration options                              ("key_c1d") 
     68!!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    6669!!   namc1d_uvd   1D data (currents)                                    ("key_c1d") 
    67 !!   namc1d_dyndmp 1D newtonian damping applied on currents             ("key_c1d") 
    68 !!   namtsd       data: temperature & salinity 
    6970!!====================================================================== 
    7071! 
     
    101102/ 
    102103!----------------------------------------------------------------------- 
    103 &namzgr_sco    !   s-coordinate or hybrid z-s-coordinate 
     104&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate                (default F) 
    104105!----------------------------------------------------------------------- 
    105106   ln_s_sh94   = .false.    !  Song & Haidvogel 1994 hybrid S-sigma   (T)| 
     
    165166/ 
    166167!----------------------------------------------------------------------- 
     168&namwad        !   Wetting and drying                                   (default F) 
     169!----------------------------------------------------------------------- 
     170   ln_wd       = .false.   !  T/F activation of wetting and drying 
     171   rn_wdmin1   =  0.1      !  Minimum wet depth on dried cells 
     172   rn_wdmin2   =  0.01     !  Tolerance of min wet depth on dried cells 
     173   rn_wdld     =  20.0     !  Land elevation below which wetting/drying is allowed 
     174   nn_wdit     =  10       !  Max iterations for W/D limiter 
     175/ 
     176!----------------------------------------------------------------------- 
     177&namtsd        !   data : Temperature  & Salinity 
     178!----------------------------------------------------------------------- 
     179!              !  file name                 ! frequency (hours) ! variable ! time interp.!  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     180!              !                            !  (if <0  months)  !   name   !  (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
     181   sn_tem = 'data_1m_potential_temperature_nomask',     -1      ,'votemper',   .true.    , .true. , 'yearly'  ,    ''    ,    ''    ,    '' 
     182   sn_sal = 'data_1m_salinity_nomask'             ,     -1      ,'vosaline',   .true.    , .true. , 'yearly'  ,    ''    ,    ''    ,    '' 
     183   ! 
     184   cn_dir      = './'      !  root directory for the location of the runoff files 
     185   ln_tsd_init = .true.    !  Initialisation of ocean T & S with T & S input data (T) or not (F) 
     186   ln_tsd_tradmp = .true.  !  damping of ocean T & S toward T & S input data (T) or not (F) 
     187/ 
     188!----------------------------------------------------------------------- 
    167189&namcrs        !   coarsened grid (for outputs and/or TOP)              ("key_crs") 
    168190!----------------------------------------------------------------------- 
     
    202224   ln_uvd_init   = .false. !  Initialisation of ocean U & V with U & V input data (T) or not (F) 
    203225   ln_uvd_dyndmp = .false. !  damping of ocean U & V toward U & V input data (T) or not (F) 
    204 / 
    205 !----------------------------------------------------------------------- 
    206 &namtsd    !   data : Temperature  & Salinity 
    207 !----------------------------------------------------------------------- 
    208 !          !  file name                            ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    209 !          !                                       !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
    210    sn_tem  = 'data_1m_potential_temperature_nomask',         -1        ,'votemper' ,    .true.    , .true. , 'yearly'   , ''       ,   ''    ,    '' 
    211    sn_sal  = 'data_1m_salinity_nomask'             ,         -1        ,'vosaline' ,    .true.    , .true. , 'yearly'   , ''       ,   ''    ,    '' 
    212    ! 
    213    cn_dir        = './'     !  root directory for the location of the runoff files 
    214    ln_tsd_init   = .true.   !  Initialisation of ocean T & S with T &S input data (T) or not (F) 
    215    ln_tsd_tradmp = .true.   !  damping of ocean T & S toward T &S input data (T) or not (F) 
    216226/ 
    217227 
     
    278288   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr ) 
    279289   ln_isf      = .false.   !  ice shelf                                 (T   => fill namsbc_isf) 
    280    ln_wave = .false.       !  coupling with surface wave                (T => fill namsbc_wave) 
    281    nn_lsm  = 0             !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) , 
     290   ln_wave     = .false.   !  coupling with surface wave                (T => fill namsbc_wave) 
     291   nn_lsm      = 0         !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) , 
    282292                           !  =1:n number of iterations of land/sea mask application for input fields (fill land/sea mask filename field) 
    283293/ 
     
    382392   sn_rcv_co2    =   'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
    383393! 
    384    nn_cplmodel   =     1     !  Maximum number of models to/from which NEMO is potentialy sending/receiving data 
    385    ln_usecplmask = .false.   !  use a coupling mask file to merge data received from several models 
    386                              !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel) 
     394   nn_cplmodel   =     1   !  Maximum number of models to/from which NEMO is potentialy sending/receiving data 
     395   ln_usecplmask = .false. !  use a coupling mask file to merge data received from several models 
     396   !                       !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel) 
    387397/ 
    388398!----------------------------------------------------------------------- 
    389399&namsbc_sas    !   analytical surface boundary condition 
    390400!----------------------------------------------------------------------- 
    391 !              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    392 !              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
    393    sn_usp      = 'sas_grid_U' ,    120           , 'vozocrtx' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
    394    sn_vsp      = 'sas_grid_V' ,    120           , 'vomecrty' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
    395    sn_tem      = 'sas_grid_T' ,    120           , 'sosstsst' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
    396    sn_sal      = 'sas_grid_T' ,    120           , 'sosaline' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
    397    sn_ssh      = 'sas_grid_T' ,    120           , 'sossheig' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
    398    sn_e3t      = 'sas_grid_T' ,    120           , 'e3t_m'    ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
    399    sn_frq      = 'sas_grid_T' ,    120           , 'frq_m'    ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
     401!              !  file name  ! frequency (hours) ! variable  ! time interp.!  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     402!              !             !  (if <0  months)  !   name    !  (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
     403   sn_usp      = 'sas_grid_U',     120           , 'vozocrtx',   .true.    , .true. , 'yearly'  ,    ''    ,    ''    ,    '' 
     404   sn_vsp      = 'sas_grid_V',     120           , 'vomecrty',   .true.    , .true. , 'yearly'  ,    ''    ,    ''    ,    '' 
     405   sn_tem      = 'sas_grid_T',     120           , 'sosstsst',   .true.    , .true. , 'yearly'  ,    ''    ,    ''    ,    '' 
     406   sn_sal      = 'sas_grid_T',     120           , 'sosaline',   .true.    , .true. , 'yearly'  ,    ''    ,    ''    ,    '' 
     407   sn_ssh      = 'sas_grid_T',     120           , 'sossheig',   .true.    , .true. , 'yearly'  ,    ''    ,    ''    ,    '' 
     408   sn_e3t      = 'sas_grid_T',     120           , 'e3t_m'   ,   .true.    , .true. , 'yearly'  ,    ''    ,    ''    ,    '' 
     409   sn_frq      = 'sas_grid_T',     120           , 'frq_m'   ,   .true.    , .true. , 'yearly'  ,    ''    ,    ''    ,    '' 
    400410 
    401411   ln_3d_uve   = .true.    !  specify whether we are supplying a 3D u,v and e3 field 
    402    ln_read_frq = .false.    !  specify whether we must read frq or not 
     412   ln_read_frq = .false.   !  specify whether we must read frq or not 
    403413   cn_dir      = './'      !  root directory for the location of the bulk files are 
    404414/ 
     
    431441   sn_dep_rnf  = 'runoffs'            ,         0         , 'rodepth' ,   .false.    , .true. , 'yearly'  , ''       , ''       , '' 
    432442 
    433    cn_dir       = './'      !  root directory for the location of the runoff files 
    434    ln_rnf_mouth = .true.    !  specific treatment at rivers mouths 
    435    rn_hrnf      =  15.e0    !  depth over which enhanced vertical mixing is used 
    436    rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
    437    rn_rfact     =   1.e0    !  multiplicative factor for runoff 
    438    ln_rnf_depth = .false.   !  read in depth information for runoff 
    439    ln_rnf_tem   = .false.   !  read in temperature information for runoff 
    440    ln_rnf_sal   = .false.   !  read in salinity information for runoff 
    441    ln_rnf_depth_ini = .false.  ! compute depth at initialisation from runoff file 
    442    rn_rnf_max   = 5.735e-4  !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true ) 
    443    rn_dep_max   = 150.      !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true ) 
    444    nn_rnf_depth_file = 0    !  create (=1) a runoff depth file or not (=0) 
     443   cn_dir      = './'      !  root directory for the location of the runoff files 
     444   ln_rnf_mouth= .true.    !  specific treatment at rivers mouths 
     445      rn_hrnf     =  15.e0    !  depth over which enhanced vertical mixing is used    (ln_rnf_mouth=T) 
     446      rn_avt_rnf  =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] (ln_rnf_mouth=T) 
     447   rn_rfact    =   1.e0    !  multiplicative factor for runoff 
     448   ln_rnf_depth= .false.   !  read in depth information for runoff 
     449   ln_rnf_tem  = .false.   !  read in temperature information for runoff 
     450   ln_rnf_sal  = .false.   !  read in salinity information for runoff 
     451   ln_rnf_depth_ini = .false. ! compute depth at initialisation from runoff file 
     452      rn_rnf_max  = 5.735e-4  !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true ) 
     453      rn_dep_max  = 150.      !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true ) 
     454      nn_rnf_depth_file = 0   !  create (=1) a runoff depth file or not (=0) 
    445455/ 
    446456!----------------------------------------------------------------------- 
    447457&namsbc_isf    !  Top boundary layer (ISF)                              (nn_isf >0) 
    448458!----------------------------------------------------------------------- 
    449 !              ! file name ! frequency (hours) ! variable ! time interp. !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    450 !              !           !  (if <0  months)  !   name   !  (logical)   !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
     459!              ! file name ! frequency (hours) ! variable ! time interp.!  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     460!              !           !  (if <0  months)  !   name   !  (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
    451461! nn_isf == 4 
    452    sn_fwfisf   = 'rnfisf'  ,         -12       ,'sowflisf',   .false.    , .true.  , 'yearly'  ,  ''      ,   ''     , '' 
     462   sn_fwfisf   = 'rnfisf'  ,         -12       ,'sowflisf',   .false.   , .true. , 'yearly'  ,    ''    ,   ''     ,    '' 
    453463! nn_isf == 3 
    454    sn_rnfisf   = 'rnfisf'  ,         -12       ,'sofwfisf',   .false.    , .true.  , 'yearly'  ,  ''      ,   ''     , '' 
     464   sn_rnfisf   = 'rnfisf'  ,         -12       ,'sofwfisf',   .false.   , .true. , 'yearly'  ,    ''    ,   ''     ,    '' 
    455465! nn_isf == 2 and 3 
    456    sn_depmax_isf='rnfisf'  ,         -12       ,'sozisfmax',  .false.    , .true.  , 'yearly'  ,  ''      ,   ''     , '' 
    457    sn_depmin_isf='rnfisf'  ,         -12       ,'sozisfmin',  .false.    , .true.  , 'yearly'  ,  ''      ,   ''     , '' 
     466   sn_depmax_isf='rnfisf'  ,         -12       ,'sozisfmax',  .false.   , .true. , 'yearly'  ,    ''    ,   ''     ,    '' 
     467   sn_depmin_isf='rnfisf'  ,         -12       ,'sozisfmin',  .false.   , .true. , 'yearly'  ,    ''    ,   ''     ,    '' 
    458468! nn_isf == 2 
    459    sn_Leff_isf = 'rnfisf'  ,         -12       ,'Leff'    ,   .false.    , .true.  , 'yearly'  ,  ''      ,   ''     , '' 
     469   sn_Leff_isf = 'rnfisf'  ,         -12       ,'Leff'    ,   .false.   , .true. , 'yearly'  ,    ''    ,   ''     ,    '' 
    460470! 
    461471! for all case 
     
    465475                           !  option 1 and 4 need ln_isfcav = .true. (domzgr) 
    466476! only for nn_isf = 1 or 2 
    467    rn_gammat0  = 1.e-4    ! gammat coefficient used in blk formula 
    468    rn_gammas0  = 1.e-4    ! gammas coefficient used in blk formula 
     477   rn_gammat0  = 1.e-4     ! gammat coefficient used in blk formula 
     478   rn_gammas0  = 1.e-4     ! gammas coefficient used in blk formula 
    469479! only for nn_isf = 1 or 4 
    470480   rn_hisf_tbl =  30.      ! thickness of the top boundary layer    (Losh et al. 2008) 
    471                           ! 0 => thickness of the tbl = thickness of the first wet cell 
     481   !                       ! 0 => thickness of the tbl = thickness of the first wet cell 
    472482! only for nn_isf = 1 
    473    nn_isfblk   = 1        ! 1 ISOMIP  like: 2 equations formulation (Hunter et al., 2006) 
    474                           ! 2 ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015) 
    475    nn_gammablk = 1        ! 0 = cst Gammat (= gammat/s) 
    476                           ! 1 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010) 
    477                           ! 2 = velocity and stability dependent Gamma    (Holland et al. 1999) 
     483   nn_isfblk   = 1         ! 1 ISOMIP  like: 2 equations formulation (Hunter et al., 2006) 
     484   !                       ! 2 ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015) 
     485   nn_gammablk = 1         ! 0 = cst Gammat (= gammat/s) 
     486   !                       ! 1 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010) 
     487   !                       ! 2 = velocity and stability dependent Gamma    (Holland et al. 1999) 
    478488/ 
    479489!----------------------------------------------------------------------- 
    480490&namsbc_iscpl  !   land ice / ocean coupling option                      
    481491!----------------------------------------------------------------------- 
    482    nn_drown  = 10       ! number of iteration of the extrapolation loop (fill the new wet cells) 
    483    ln_hsb    = .false.  ! activate conservation module (conservation exact after a time of rn_fiscpl) 
    484    nn_fiscpl = 43800    ! (number of time step) conservation period (maybe should be fix to the coupling frequencey of restart frequency) 
     492   nn_drown    = 10        ! number of iteration of the extrapolation loop (fill the new wet cells) 
     493   ln_hsb      = .false.   ! activate conservation module (conservation exact after a time of rn_fiscpl) 
     494   nn_fiscpl   = 43800     ! (number of time step) conservation period (maybe should be fix to the coupling frequencey of restart frequency) 
    485495/ 
    486496!----------------------------------------------------------------------- 
    487497&namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk 
    488498!----------------------------------------------------------------------- 
    489 !              !  file name ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    490 !              !            !  (if <0  months)  !   name    !  (logical)   !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
    491    sn_apr      = 'patm'     ,         -1        ,'somslpre',    .true.     , .true. , 'yearly'  ,  ''      ,   ''     , '' 
    492  
    493    cn_dir      = './'       !  root directory for the location of the bulk files 
    494    rn_pref     = 101000.    !  reference atmospheric pressure   [N/m2]/ 
    495    ln_ref_apr  = .false.    !  ref. pressure: global mean Patm (T) or a constant (F) 
    496    ln_apr_obc  = .false.    !  inverse barometer added to OBC ssh data 
     499!              ! file name ! frequency (hours) ! variable ! time interp.!  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     500!              !           !  (if <0  months)  !   name   !  (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
     501   sn_apr      = 'patm'    ,         -1        ,'somslpre',   .true.    , .true. , 'yearly'  ,    ''    ,    ''    ,      '' 
     502 
     503   cn_dir      = './'      !  root directory for the location of the bulk files 
     504   rn_pref     = 101000.   !  reference atmospheric pressure   [N/m2]/ 
     505   ln_ref_apr  = .false.   !  ref. pressure: global mean Patm (T) or a constant (F) 
     506   ln_apr_obc  = .false.   !  inverse barometer added to OBC ssh data 
    497507/ 
    498508!----------------------------------------------------------------------- 
    499509&namsbc_ssr    !   surface boundary condition : sea surface restoring   (ln_ssr=T) 
    500510!----------------------------------------------------------------------- 
    501 !              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    502 !              !             !  (if <0  months)  !   name    !   (logical) !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
    503    sn_sst      = 'sst_data'  ,        24         ,  'sst'    ,    .false.   , .false., 'yearly'  , ''       , ''       , '' 
    504    sn_sss      = 'sss_data'  ,        -1         ,  'sss'    ,    .true.    , .true. , 'yearly'  , ''       , ''       , '' 
     511!              ! file name ! frequency (hours) ! variable ! time interp.!  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     512!              !           !  (if <0  months)  !   name   !   (logical) !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
     513   sn_sst      = 'sst_data',        24         ,  'sst'   ,    .false.  , .false., 'yearly'  ,    ''    ,    ''    ,    '' 
     514   sn_sss      = 'sss_data',        -1         ,  'sss'   ,    .true.   , .true. , 'yearly'  ,    ''    ,    ''    ,    '' 
    505515 
    506516   cn_dir      = './'      !  root directory for the location of the runoff files 
     
    510520   rn_dqdt     =   -40.    !  magnitude of the retroaction on temperature   [W/m2/K] 
    511521   rn_deds     =  -166.67  !  magnitude of the damping on salinity   [mm/day] 
    512    ln_sssr_bnd =   .true.  !  flag to bound erp term (associated with nn_sssr=2) 
     522   ln_sssr_bnd =  .true.   !  flag to bound erp term (associated with nn_sssr=2) 
    513523   rn_sssr_bnd =   4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day] 
    514524/ 
     
    516526&namsbc_alb    !   albedo parameters 
    517527!----------------------------------------------------------------------- 
    518    rn_cloud    =    0.06   !  cloud correction to snow and ice albedo 
    519    rn_albice   =    0.53   !  albedo of melting ice in the arctic and antarctic 
    520    rn_alphd    =    0.80   !  coefficients for linear interpolation used to 
    521    rn_alphc    =    0.65   !  compute albedo between two extremes values 
    522    rn_alphdi   =    0.72   !  (Pyane, 1972) 
     528   nn_ice_alb  =    0      !  parameterization of ice/snow albedo 
     529                           !     0: Shine & Henderson-Sellers (JGR 1985) 
     530                           !     1: "home made" based on Brandt et al. (J. Climate 2005) 
     531                           !                         and Grenfell & Perovich (JGR 2004) 
     532   rn_albice   =  0.53     !  albedo of bare puddled ice (values from 0.49 to 0.58) 
     533                           !     0.53 (default) => if nn_ice_alb=0 
     534                           !     0.50 (default) => if nn_ice_alb=1 
    523535/ 
    524536!----------------------------------------------------------------------- 
    525537&namsbc_wave   ! External fields from wave model                        (ln_wave=T) 
    526538!----------------------------------------------------------------------- 
    527 !              !  file name  ! frequency (hours) ! variable    ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    528 !              !             !  (if <0  months)  !   name      !  (logical)   !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
    529    sn_cdg      =  'cdg_wave' ,        1          , 'drag_coeff',     .true.   , .false., 'daily'   ,  ''      , ''       , '' 
    530    sn_usd      =  'sdw_wave' ,        1          , 'u_sd2d'    ,     .true.   , .false., 'daily'   ,  ''      , ''       , '' 
    531    sn_vsd      =  'sdw_wave' ,        1          , 'v_sd2d'    ,     .true.   , .false., 'daily'   ,  ''      , ''       , '' 
    532    sn_wn       =  'sdw_wave' ,        1          , 'wave_num'  ,     .true.   , .false., 'daily'   ,  ''      , ''       , '' 
     539!              ! file name ! frequency (hours) ! variable    ! time interp.!  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     540!              !           !  (if <0  months)  !   name      !  (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
     541   sn_cdg      = 'cdg_wave',        1          , 'drag_coeff',   .true.    , .false., 'daily'   ,    ''      , ''       , '' 
     542   sn_usd      = 'sdw_wave',        1          , 'u_sd2d'    ,   .true.    , .false., 'daily'   ,    ''      , ''       , '' 
     543   sn_vsd      = 'sdw_wave',        1          , 'v_sd2d'    ,   .true.    , .false., 'daily'   ,    ''      , ''       , '' 
     544   sn_wn       = 'sdw_wave',        1          , 'wave_num'  ,   .true.    , .false., 'daily'   ,    ''      , ''       , '' 
    533545! 
    534546   cn_dir_cdg  = './'      !  root directory for the location of drag coefficient files 
    535    ln_cdgw = .false.       !  Neutral drag coefficient read from wave model 
    536    ln_sdw  = .false.       !  Computation of 3D stokes drift                
     547   ln_cdgw     = .false.   !  Neutral drag coefficient read from wave model 
     548   ln_sdw      = .false.   !  Computation of 3D stokes drift                
    537549/ 
    538550!----------------------------------------------------------------------- 
     
    564576      rn_speed_limit           = 0.                   ! CFL speed limit for a berg 
    565577 
    566 !            ! file name ! frequency (hours) !   variable   ! time interp. !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    567 !            !           !  (if <0  months)  !     name     !   (logical)  !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      ! 
    568       sn_icb =  'calving',       -1          , 'calvingmask',  .true.      , .true.  , 'yearly'  , ''       , ''       , '' 
     578!            ! file name ! frequency (hours) !   variable   ! time interp.!  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     579!            !           !  (if <0  months)  !     name     !  (logical)  !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      ! 
     580      sn_icb =  'calving',       -1          , 'calvingmask',   .true.    , .true.  , 'yearly'  ,    ''    ,    ''    ,    '' 
    569581 
    570582      cn_dir = './' 
     
    575587!!====================================================================== 
    576588!!   namlbc        lateral momentum boundary condition 
    577 !!   namobc        open boundaries parameters                           ("key_obc") 
    578589!!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif") 
     590!!   nam_tide      Tidal forcing  
    579591!!   nambdy        Unstructured open boundaries                         ("key_bdy") 
    580 !!   namtide       Tidal forcing at open boundaries                     ("key_bdy_tides") 
     592!!   nambdy_dta    Unstructured open boundaries - external data         ("key_bdy") 
     593!!   nambdy_tide   tidal forcing at open boundaries                     ("key_bdy_tides") 
    581594!!====================================================================== 
    582595! 
     
    600613&nam_tide      !   tide parameters                                      ("key_tide") 
    601614!----------------------------------------------------------------------- 
    602    ln_tide_pot   = .true.   !  use tidal potential forcing 
    603    ln_tide_ramp  = .false.  ! 
    604    rdttideramp   =    0.    ! 
    605    clname(1)     = 'DUMMY'  !  name of constituent - all tidal components must be set in namelist_cfg 
     615   ln_tide_pot = .true.    !  use tidal potential forcing 
     616   ln_tide_ramp= .false.   ! 
     617   rdttideramp =    0.     ! 
     618   clname(1)   = 'DUMMY'   !  name of constituent - all tidal components must be set in namelist_cfg 
    606619/ 
    607620!----------------------------------------------------------------------- 
     
    642655&nambdy_dta    !  open boundaries - external data                       ("key_bdy") 
    643656!----------------------------------------------------------------------- 
    644 !              !  file name      ! frequency (hours) ! variable  ! time interp. !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    645 !              !                 !  (if <0  months)  !   name    !  (logical)   !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      ! 
    646    bn_ssh =     'amm12_bdyT_u2d' ,         24        , 'sossheig',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    647    bn_u2d =     'amm12_bdyU_u2d' ,         24        , 'vobtcrtx',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    648    bn_v2d =     'amm12_bdyV_u2d' ,         24        , 'vobtcrty',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    649    bn_u3d  =    'amm12_bdyU_u3d' ,         24        , 'vozocrtx',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    650    bn_v3d  =    'amm12_bdyV_u3d' ,         24        , 'vomecrty',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    651    bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    652    bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
     657!              !  file name      ! frequency (hours) ! variable  ! time interp.!  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     658!              !                 !  (if <0  months)  !   name    !  (logical)  !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      ! 
     659   bn_ssh      = 'amm12_bdyT_u2d',         24        , 'sossheig',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     660   bn_u2d      = 'amm12_bdyU_u2d',         24        , 'vobtcrtx',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     661   bn_v2d      = 'amm12_bdyV_u2d',         24        , 'vobtcrty',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     662   bn_u3d      = 'amm12_bdyU_u3d',         24        , 'vozocrtx',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     663   bn_v3d      = 'amm12_bdyV_u3d',         24        , 'vomecrty',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     664   bn_tem      = 'amm12_bdyT_tra',         24        , 'votemper',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     665   bn_sal      = 'amm12_bdyT_tra',         24        , 'vosaline',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
    653666! for lim2 
    654 !   bn_frld  =   'amm12_bdyT_ice' ,         24        , 'ileadfra',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    655 !   bn_hicif =   'amm12_bdyT_ice' ,         24        , 'iicethic',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    656 !   bn_hsnif =   'amm12_bdyT_ice' ,         24        , 'isnowthi',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
     667!   bn_frld    = 'amm12_bdyT_ice',         24        , 'ileadfra',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     668!   bn_hicif   = 'amm12_bdyT_ice',         24        , 'iicethic',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     669!   bn_hsnif   = 'amm12_bdyT_ice',         24        , 'isnowthi',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
    657670! for lim3 
    658 !   bn_a_i  =    'amm12_bdyT_ice' ,         24        , 'ileadfra',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    659 !   bn_ht_i =    'amm12_bdyT_ice' ,         24        , 'iicethic',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    660 !   bn_ht_s =    'amm12_bdyT_ice' ,         24        , 'isnowthi',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , '' 
    661  
    662    cn_dir      =    'bdydta/'  !  root directory for the location of the bulk files 
    663    ln_full_vel = .false.         
    664 / 
    665 !----------------------------------------------------------------------- 
    666 &nambdy_tide     ! tidal forcing at open boundaries 
     671!   bn_a_i     = 'amm12_bdyT_ice',         24        , 'ileadfra',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     672!   bn_ht_i    = 'amm12_bdyT_ice',         24        , 'iicethic',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     673!   bn_ht_s    = 'amm12_bdyT_ice',         24        , 'isnowthi',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,    '' 
     674 
     675   cn_dir      = 'bdydta/' !  root directory for the location of the bulk files 
     676   ln_full_vel = .false.    
     677/ 
     678!----------------------------------------------------------------------- 
     679&nambdy_tide   ! tidal forcing at open boundaries 
    667680!----------------------------------------------------------------------- 
    668681   filtide          = 'bdydta/amm12_bdytide_'   !  file name root of tidal forcing files 
     
    670683   ln_bdytide_conj  = .false.                   !  
    671684/ 
     685 
    672686!!====================================================================== 
    673687!!                 ***  Bottom boundary condition  *** 
     
    685699   rn_bfri1    =    4.e-4  !  bottom drag coefficient (linear case) 
    686700   rn_bfri2    =    1.e-3  !  bottom drag coefficient (non linear case). Minimum coeft if ln_loglayer=T 
    687    rn_bfri2_max =   1.e-1  !  max. bottom drag coefficient (non linear case and ln_loglayer=T) 
     701   rn_bfri2_max=    1.e-1  !  max. bottom drag coefficient (non linear case and ln_loglayer=T) 
    688702   rn_bfeb2    =    2.5e-3 !  bottom turbulent kinetic energy background  (m2/s2) 
    689703   rn_bfrz0    =    3.e-3  !  bottom roughness [m] if ln_loglayer=T 
     
    692706   rn_tfri1    =    4.e-4  !  top drag coefficient (linear case) 
    693707   rn_tfri2    =    2.5e-3 !  top drag coefficient (non linear case). Minimum coeft if ln_loglayer=T 
    694    rn_tfri2_max =   1.e-1  !  max. top drag coefficient (non linear case and ln_loglayer=T) 
     708   rn_tfri2_max=    1.e-1  !  max. top drag coefficient (non linear case and ln_loglayer=T) 
    695709   rn_tfeb2    =    0.0    !  top turbulent kinetic energy background  (m2/s2) 
    696710   rn_tfrz0    =    3.e-3  !  top roughness [m] if ln_loglayer=T 
    697711   ln_tfr2d    = .false.   !  horizontal variation of the top friction coef (read a 2D mask file ) 
    698    rn_tfrien   =    50.    !  local multiplying factor of tfr (ln_tfr2d=T) 
     712   rn_tfrien   =   50.     !  local multiplying factor of tfr (ln_tfr2d=T) 
    699713 
    700714   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true) 
     
    718732&nambbl        !   bottom boundary layer scheme                         ("key_trabbl") 
    719733!----------------------------------------------------------------------- 
    720    nn_bbl_ldf  =  1      !  diffusive bbl (=1)   or not (=0) 
    721    nn_bbl_adv  =  0      !  advective bbl (=1/2) or not (=0) 
    722    rn_ahtbbl   =  1000.  !  lateral mixing coefficient in the bbl  [m2/s] 
    723    rn_gambbl   =  10.    !  advective bbl coefficient                 [s] 
     734   nn_bbl_ldf  =  1        !  diffusive bbl (=1)   or not (=0) 
     735   nn_bbl_adv  =  0        !  advective bbl (=1/2) or not (=0) 
     736   rn_ahtbbl   =  1000.    !  lateral mixing coefficient in the bbl  [m2/s] 
     737   rn_gambbl   =  10.      !  advective bbl coefficient                 [s] 
    724738/ 
    725739 
     
    738752&nameos        !   ocean physical parameters 
    739753!----------------------------------------------------------------------- 
    740    nn_eos      =  -1     !  type of equation of state and Brunt-Vaisala frequency 
    741                                  !  =-1, TEOS-10 
    742                                  !  = 0, EOS-80 
    743                                  !  = 1, S-EOS   (simplified eos) 
    744    ln_useCT    = .true.  ! use of Conservative Temp. ==> surface CT converted in Pot. Temp. in sbcssm 
     754   ln_teos10   = .false.         !  = Use TEOS-10 equation of state 
     755   ln_eos80    = .false.         !  = Use EOS80 equation of state 
     756   ln_seos     = .false.         !  = Use simplified equation of state (S-EOS) 
    745757                                 ! 
    746    !                     ! S-EOS coefficients : 
    747                                  !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
     758   !                     ! S-EOS coefficients (ln_seos=T): 
     759   !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 
    748760   rn_a0       =  1.6550e-1      !  thermal expension coefficient (nn_eos= 1) 
    749761   rn_b0       =  7.6554e-1      !  saline  expension coefficient (nn_eos= 1) 
     
    757769&namtra_adv    !   advection scheme for tracer                          (default: NO advection) 
    758770!----------------------------------------------------------------------- 
    759    ln_traadv_cen =  .false. !  2nd order centered scheme 
    760       nn_cen_h   =  4               !  =2/4, horizontal 2nd order CEN / 4th order CEN 
    761       nn_cen_v   =  4               !  =2/4, vertical   2nd order CEN / 4th order COMPACT 
    762    ln_traadv_fct =  .false. !  FCT scheme 
    763       nn_fct_h   =  2               !  =2/4, horizontal 2nd / 4th order  
    764       nn_fct_v   =  2               !  =2/4, vertical   2nd / COMPACT 4th order  
    765       nn_fct_zts =  0               !  >=1,  2nd order FCT scheme with vertical sub-timestepping 
    766       !                             !        (number of sub-timestep = nn_fct_zts) 
    767    ln_traadv_mus =  .false. !  MUSCL scheme 
    768       ln_mus_ups =  .false.         !  use upstream scheme near river mouths 
    769    ln_traadv_ubs =  .false. !  UBS scheme 
    770       nn_ubs_v   =  2               !  =2  , vertical 2nd order FCT / COMPACT 4th order 
    771    ln_traadv_qck =  .false. !  QUICKEST scheme 
     771   ln_traadv_cen = .false. !  2nd order centered scheme 
     772      nn_cen_h   =  4            !  =2/4, horizontal 2nd order CEN / 4th order CEN 
     773      nn_cen_v   =  4            !  =2/4, vertical   2nd order CEN / 4th order COMPACT 
     774   ln_traadv_fct = .false. !  FCT scheme 
     775      nn_fct_h   =  2            !  =2/4, horizontal 2nd / 4th order  
     776      nn_fct_v   =  2            !  =2/4, vertical   2nd / COMPACT 4th order  
     777      nn_fct_zts =  0            !  >=1,  2nd order FCT scheme with vertical sub-timestepping 
     778      !                          !        (number of sub-timestep = nn_fct_zts) 
     779   ln_traadv_mus = .false. !  MUSCL scheme 
     780      ln_mus_ups = .false.       !  use upstream scheme near river mouths 
     781   ln_traadv_ubs = .false. !  UBS scheme 
     782      nn_ubs_v   =  2            !  =2  , vertical 2nd order FCT / COMPACT 4th order 
     783   ln_traadv_qck = .false. !  QUICKEST scheme 
    772784/ 
    773785!----------------------------------------------------------------------- 
    774786&namtra_adv_mle !   mixed layer eddy parametrisation (Fox-Kemper param) (default: NO) 
    775787!----------------------------------------------------------------------- 
    776    ln_mle    = .false.      ! (T) use the Mixed Layer Eddy (MLE) parameterisation 
    777    rn_ce     = 0.06        ! magnitude of the MLE (typical value: 0.06 to 0.08) 
    778    nn_mle    = 1           ! MLE type: =0 standard Fox-Kemper ; =1 new formulation 
    779    rn_lf     = 5.e+3       ! typical scale of mixed layer front (meters)                      (case rn_mle=0) 
    780    rn_time   = 172800.     ! time scale for mixing momentum across the mixed layer (seconds)  (case rn_mle=0) 
    781    rn_lat    = 20.         ! reference latitude (degrees) of MLE coef.                        (case rn_mle=1) 
    782    nn_mld_uv = 0           ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max) 
    783    nn_conv   = 0           ! =1 no MLE in case of convection ; =0 always MLE 
    784    rn_rho_c_mle  = 0.01    ! delta rho criterion used to calculate MLD for FK 
     788   ln_mle      = .false.   ! (T) use the Mixed Layer Eddy (MLE) parameterisation 
     789   rn_ce       = 0.06      ! magnitude of the MLE (typical value: 0.06 to 0.08) 
     790   nn_mle      = 1         ! MLE type: =0 standard Fox-Kemper ; =1 new formulation 
     791   rn_lf       = 5.e+3     ! typical scale of mixed layer front (meters)                      (case rn_mle=0) 
     792   rn_time     = 172800.   ! time scale for mixing momentum across the mixed layer (seconds)  (case rn_mle=0) 
     793   rn_lat      = 20.       ! reference latitude (degrees) of MLE coef.                        (case rn_mle=1) 
     794   nn_mld_uv   = 0         ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max) 
     795   nn_conv     = 0         ! =1 no MLE in case of convection ; =0 always MLE 
     796   rn_rho_c_mle= 0.01      ! delta rho criterion used to calculate MLD for FK 
    785797/ 
    786798!----------------------------------------------------------------------- 
     
    791803   ln_traldf_lap   =  .false.  !    laplacian operator 
    792804   ln_traldf_blp   =  .false.  !  bilaplacian operator 
     805   ! 
    793806   !                       !  Direction of action: 
    794807   ln_traldf_lev   =  .false.  !  iso-level 
     
    866879   ln_vvl_layer  = .false.          !  full layer vertical coordinate 
    867880   ln_vvl_ztilde_as_zstar = .false. !  ztilde vertical coordinate emulating zstar 
    868    ln_vvl_zstar_at_eqtor = .false. !  ztilde near the equator 
     881   ln_vvl_zstar_at_eqtor  = .false. !  ztilde near the equator 
    869882   rn_ahe3       = 0.0e0            !  thickness diffusion coefficient 
    870883   rn_rst_e3t    = 30.e0            !  ztilde to zstar restoration timescale [days] 
     
    874887/ 
    875888!----------------------------------------------------------------------- 
    876 &namdyn_vor    !   option of physics/algorithm                          (default: NO) 
     889&namdyn_vor    !   Vorticity / Coriolis scheme                          (default: NO) 
    877890!----------------------------------------------------------------------- 
    878891   ln_dynvor_ene = .false. !  enstrophy conserving scheme 
     
    957970   nn_havtb    =    0      !  horizontal shape for avtb (=1) or not (=0) 
    958971   ln_zdfevd   = .true.    !  enhanced vertical diffusion (evd) (T) or not (F) 
    959    nn_evdm     =    0      ! evd apply on tracer (=0) or on tracer and momentum (=1) 
    960    rn_avevd    =  100.     !  evd mixing coefficient [m2/s] 
     972      nn_evdm     =    0        ! evd apply on tracer (=0) or on tracer and momentum (=1) 
     973      rn_avevd    =  100.       !  evd mixing coefficient [m2/s] 
    961974   ln_zdfnpc   = .false.   !  Non-Penetrative Convective algorithm (T) or not (F) 
    962    nn_npc      =    1            ! frequency of application of npc 
    963    nn_npcp     =  365            ! npc control print frequency 
     975      nn_npc      =    1        ! frequency of application of npc 
     976      nn_npcp     =  365        ! npc control print frequency 
    964977   ln_zdfexp   = .false.   !  time-stepping: split-explicit (T) or implicit (F) time stepping 
    965    nn_zdfexp   =    3            ! number of sub-timestep for ln_zdfexp=T 
     978      nn_zdfexp   =    3        ! number of sub-timestep for ln_zdfexp=T 
    966979/ 
    967980!----------------------------------------------------------------------- 
    968981&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" ) 
    969982!----------------------------------------------------------------------- 
    970    rn_avmri    = 100.e-4   !  maximum value of the vertical viscosity 
    971    rn_alp      =   5.      !  coefficient of the parameterization 
    972    nn_ric      =   2       !  coefficient of the parameterization 
    973    rn_ekmfc    =   0.7     !  Factor in the Ekman depth Equation 
    974    rn_mldmin   =   1.0     !  minimum allowable mixed-layer depth estimate (m) 
    975    rn_mldmax   =1000.0     !  maximum allowable mixed-layer depth estimate (m) 
    976    rn_wtmix    =  10.0     !  vertical eddy viscosity coeff [m2/s] in the mixed-layer 
    977    rn_wvmix    =  10.0     !  vertical eddy diffusion coeff [m2/s] in the mixed-layer 
    978    ln_mldw     = .true.    !  Flag to use or not the mixed layer depth param. 
     983   rn_avmri    =  100.e-4  !  maximum value of the vertical viscosity 
     984   rn_alp      =    5.     !  coefficient of the parameterization 
     985   nn_ric      =    2      !  coefficient of the parameterization 
     986   rn_ekmfc    =    0.7    !  Factor in the Ekman depth Equation 
     987   rn_mldmin   =    1.0    !  minimum allowable mixed-layer depth estimate (m) 
     988   rn_mldmax   = 1000.0    !  maximum allowable mixed-layer depth estimate (m) 
     989   rn_wtmix    =   10.0    !  vertical eddy viscosity coeff [m2/s] in the mixed-layer 
     990   rn_wvmix    =   10.0    !  vertical eddy diffusion coeff [m2/s] in the mixed-layer 
     991   ln_mldw     =  .true.   !  Flag to use or not the mixed layer depth param. 
    979992/ 
    980993!----------------------------------------------------------------------- 
     
    9961009   ln_lc       = .true.    !  Langmuir cell parameterisation (Axell 2002) 
    9971010   rn_lc       =   0.15    !  coef. associated to Langmuir cells 
    998    nn_etau     =   1       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves 
     1011   nn_etau     =   1       !  penetration of tke below the mixed layer (ML) due to near intertial waves 
    9991012                           !        = 0 no penetration 
    10001013                           !        = 1 add a tke source below the ML 
    10011014                           !        = 2 add a tke source just at the base of the ML 
    1002                            !        = 3 as = 1 applied on HF part of the stress    ("key_oasis3") 
     1015                           !        = 3 as = 1 applied on HF part of the stress           (ln_cpl=T) 
    10031016   rn_efr      =   0.05    !  fraction of surface tke value which penetrates below the ML (nn_etau=1 or 2) 
    10041017   nn_htau     =   1       !  type of exponential decrease of tke penetration below the ML 
     
    10071020/ 
    10081021!----------------------------------------------------------------------- 
    1009 &namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls") 
     1022&namzdf_gls    !   GLS vertical diffusion                               ("key_zdfgls") 
    10101023!----------------------------------------------------------------------- 
    10111024   rn_emin       = 1.e-7   !  minimum value of e   [m2/s2] 
     
    10401053   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency 
    10411054/ 
     1055!----------------------------------------------------------------------- 
     1056&namzdf_tmx_new !   internal wave-driven mixing parameterization        ("key_zdftmx_new" & "key_zdfddm") 
     1057!----------------------------------------------------------------------- 
     1058   nn_zpyc     = 1         !  pycnocline-intensified dissipation scales as N (=1) or N^2 (=2) 
     1059   ln_mevar    = .true.    !  variable (T) or constant (F) mixing efficiency 
     1060   ln_tsdiff   = .true.    !  account for differential T/S mixing (T) or not (F) 
     1061/ 
     1062 
    10421063 
    10431064!!====================================================================== 
     
    10771098/ 
    10781099!----------------------------------------------------------------------- 
    1079 &namsto       ! Stochastic parametrization of EOS                       (default: NO) 
    1080 !----------------------------------------------------------------------- 
    1081    ln_sto_eos   = .false.  ! stochastic equation of state 
    1082    nn_sto_eos   = 1        ! number of independent random walks 
    1083    rn_eos_stdxy = 1.4      ! random walk horz. standard deviation (in grid points) 
    1084    rn_eos_stdz  = 0.7      ! random walk vert. standard deviation (in grid points) 
    1085    rn_eos_tcor  = 1440.    ! random walk time correlation (in timesteps) 
    1086    nn_eos_ord   = 1        ! order of autoregressive processes 
    1087    nn_eos_flt   = 0        ! passes of Laplacian filter 
    1088    rn_eos_lim   = 2.0      ! limitation factor (default = 3.0) 
    1089    ln_rststo    = .false.  ! start from mean parameter (F) or from restart file (T) 
    1090    ln_rstseed = .true.           ! read seed of RNG from restart file 
     1100&namsto        ! Stochastic parametrization of EOS                      (default: NO) 
     1101!----------------------------------------------------------------------- 
     1102   ln_sto_eos  = .false.   ! stochastic equation of state 
     1103   nn_sto_eos  = 1         ! number of independent random walks 
     1104   rn_eos_stdxy= 1.4       ! random walk horz. standard deviation (in grid points) 
     1105   rn_eos_stdz = 0.7       ! random walk vert. standard deviation (in grid points) 
     1106   rn_eos_tcor = 1440.     ! random walk time correlation (in timesteps) 
     1107   nn_eos_ord  = 1         ! order of autoregressive processes 
     1108   nn_eos_flt  = 0         ! passes of Laplacian filter 
     1109   rn_eos_lim  = 2.0       ! limitation factor (default = 3.0) 
     1110   ln_rststo   = .false.   ! start from mean parameter (F) or from restart file (T) 
     1111   ln_rstseed  = .true.    ! read seed of RNG from restart file 
    10911112   cn_storst_in  = "restart_sto" !  suffix of stochastic parameter restart file (input) 
    10921113   cn_storst_out = "restart_sto" !  suffix of stochastic parameter restart file (output) 
     
    10961117!!                  ***  Diagnostics namelists  *** 
    10971118!!====================================================================== 
    1098 !!   namtrd       dynamics and/or tracer trends 
    1099 !!   namptr       Poleward Transport Diagnostics 
    1100 !!   namhsb       Heat and salt budgets 
     1119!!   namtrd       dynamics and/or tracer trends                         (default F) 
     1120!!   namptr       Poleward Transport Diagnostics                        (default F) 
     1121!!   namhsb       Heat and salt budgets                                 (default F) 
     1122!!   namdiu       Cool skin and warm layer models                       (default F) 
    11011123!!   namflo       float parameters                                      ("key_float") 
    1102 !!   nam_diaharm  Harmonic analysis of tidal constituents               ('key_diaharm') 
    1103 !!   namdct       transports through some sections 
     1124!!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
     1125!!   namdct       transports through some sections                      ("key_diadct") 
     1126!!   nam_diatmb   Top Middle Bottom Output                              (default F) 
     1127!!   nam_dia25h   25h Mean Output                                       (default F) 
    11041128!!   namnc4       netcdf4 chunking and compression settings             ("key_netcdf4") 
    11051129!!====================================================================== 
    11061130! 
    11071131!----------------------------------------------------------------------- 
    1108 &namtrd        !   diagnostics on dynamics and/or tracer trends         (default F) 
    1109 !              !   and/or mixed-layer trends and/or barotropic vorticity 
     1132&namtrd        !   trend diagnostics                                    (default F) 
    11101133!----------------------------------------------------------------------- 
    11111134   ln_glo_trd  = .false.   ! (T) global domain averaged diag for T, T^2, KE, and PE 
     
    11271150!!gm 
    11281151!----------------------------------------------------------------------- 
    1129 &namptr       !   Poleward Transport Diagnostic                         (default F) 
    1130 !----------------------------------------------------------------------- 
    1131    ln_diaptr  = .false.    !  Poleward heat and salt transport (T) or not (F) 
    1132    ln_subbas  = .false.     !  Atlantic/Pacific/Indian basins computation (T) or not 
    1133 / 
    1134 !----------------------------------------------------------------------- 
    1135 &namhsb       !  Heat and salt budgets                                  (default F) 
    1136 !----------------------------------------------------------------------- 
    1137    ln_diahsb  = .false.    !  check the heat and salt budgets (T) or not (F) 
    1138 / 
    1139 !----------------------------------------------------------------------- 
    1140 &namflo       !   float parameters                                      ("key_float") 
    1141 !----------------------------------------------------------------------- 
    1142    jpnfl         = 1          !  total number of floats during the run 
    1143    jpnnewflo     = 0          !  number of floats for the restart 
    1144    ln_rstflo     = .false.    !  float restart (T) or not (F) 
    1145    nn_writefl    =      75    !  frequency of writing in float output file 
    1146    nn_stockfl    =    5475    !  frequency of creation of the float restart file 
    1147    ln_argo       = .false.    !  Argo type floats (stay at the surface each 10 days) 
    1148    ln_flork4     = .false.    !  trajectories computed with a 4th order Runge-Kutta (T) 
    1149                               !  or computed with Blanke' scheme (F) 
    1150    ln_ariane     = .true.     !  Input with Ariane tool convention(T) 
    1151    ln_flo_ascii  = .true.     !  Output with Ariane tool netcdf convention(F) or ascii file (T) 
    1152 / 
    1153 !----------------------------------------------------------------------- 
    1154 &nam_diaharm   !   Harmonic analysis of tidal constituents              ('key_diaharm') 
     1152&namptr        !   Poleward Transport Diagnostic                         (default F) 
     1153!----------------------------------------------------------------------- 
     1154   ln_diaptr   = .false.   !  Poleward heat and salt transport (T) or not (F) 
     1155   ln_subbas   = .false.   !  Atlantic/Pacific/Indian basins computation (T) or not 
     1156/ 
     1157!----------------------------------------------------------------------- 
     1158&namhsb        !  Heat and salt budgets                                  (default F) 
     1159!----------------------------------------------------------------------- 
     1160   ln_diahsb   = .false.   !  check the heat and salt budgets (T) or not (F) 
     1161/ 
     1162!----------------------------------------------------------------------- 
     1163&namdiu        !   Cool skin and warm layer models                       (default F) 
     1164!----------------------------------------------------------------------- 
     1165   ln_diurnal      = .false.   !  
     1166   ln_diurnal_only = .false.   ! 
     1167/ 
     1168!----------------------------------------------------------------------- 
     1169&namflo        !   float parameters                                      ("key_float") 
     1170!----------------------------------------------------------------------- 
     1171   jpnfl       = 1         !  total number of floats during the run 
     1172   jpnnewflo   = 0         !  number of floats for the restart 
     1173   ln_rstflo   = .false.   !  float restart (T) or not (F) 
     1174   nn_writefl  =      75   !  frequency of writing in float output file 
     1175   nn_stockfl  =    5475   !  frequency of creation of the float restart file 
     1176   ln_argo     = .false.   !  Argo type floats (stay at the surface each 10 days) 
     1177   ln_flork4   = .false.   !  trajectories computed with a 4th order Runge-Kutta (T) 
     1178   !                       !  or computed with Blanke' scheme (F) 
     1179   ln_ariane   = .true.    !  Input with Ariane tool convention(T) 
     1180   ln_flo_ascii= .true.    !  Output with Ariane tool netcdf convention(F) or ascii file (T) 
     1181/ 
     1182!----------------------------------------------------------------------- 
     1183&nam_diaharm   !   Harmonic analysis of tidal constituents               ("key_diaharm") 
    11551184!----------------------------------------------------------------------- 
    11561185    nit000_han = 1         ! First time step used for harmonic analysis 
     
    11611190/ 
    11621191!----------------------------------------------------------------------- 
    1163 &namdct        ! transports through some sections 
    1164 !----------------------------------------------------------------------- 
    1165     nn_dct      = 15       !  time step frequency for transports computing 
    1166     nn_dctwri   = 15       !  time step frequency for transports writing 
    1167     nn_secdebug = 112      !      0 : no section to debug 
    1168                            !     -1 : debug all section 
    1169                            !  0 < n : debug section number n 
    1170 / 
    1171 !----------------------------------------------------------------------- 
    1172 &namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4") 
     1192&namdct        ! transports through some sections                        ("key_diadct") 
     1193!----------------------------------------------------------------------- 
     1194    nn_dct     = 15        !  time step frequency for transports computing 
     1195    nn_dctwri  = 15        !  time step frequency for transports writing 
     1196    nn_secdebug= 112       !      0 : no section to debug 
     1197    !                      !     -1 : debug all section 
     1198    !                      !  0 < n : debug section number n 
     1199/ 
     1200!----------------------------------------------------------------------- 
     1201&nam_diatmb    !  Top Middle Bottom Output                               (default F) 
     1202!----------------------------------------------------------------------- 
     1203   ln_diatmb   = .false.   !  Choose Top Middle and Bottom output or not 
     1204/ 
     1205!----------------------------------------------------------------------- 
     1206&nam_dia25h    !  25h Mean Output                                        (default F) 
     1207!----------------------------------------------------------------------- 
     1208   ln_dia25h   = .false.   ! Choose 25h mean output or not 
     1209/ 
     1210!----------------------------------------------------------------------- 
     1211&namnc4        !   netcdf4 chunking and compression settings             ("key_netcdf4") 
    11731212!----------------------------------------------------------------------- 
    11741213   nn_nchunks_i=   4       !  number of chunks in i-dimension 
    11751214   nn_nchunks_j=   4       !  number of chunks in j-dimension 
    11761215   nn_nchunks_k=   31      !  number of chunks in k-dimension 
    1177                            !  setting nn_nchunks_k = jpk will give a chunk size of 1 in the vertical which 
    1178                            !  is optimal for postprocessing which works exclusively with horizontal slabs 
     1216   !                       !  setting nn_nchunks_k = jpk will give a chunk size of 1 in the vertical which 
     1217   !                       !  is optimal for postprocessing which works exclusively with horizontal slabs 
    11791218   ln_nc4zip   = .true.    !  (T) use netcdf4 chunking and compression 
    1180                            !  (F) ignore chunking information and produce netcdf3-compatible files 
     1219   !                       !  (F) ignore chunking information and produce netcdf3-compatible files 
    11811220/ 
    11821221 
     
    11891228! 
    11901229!----------------------------------------------------------------------- 
    1191 &namobs       !  observation usage switch 
    1192 !----------------------------------------------------------------------- 
    1193    ln_diaobs  = .false.             ! Logical switch for the observation operator 
    1194    ln_t3d     = .false.             ! Logical switch for T profile observations 
    1195    ln_s3d     = .false.             ! Logical switch for S profile observations 
    1196    ln_sla     = .false.             ! Logical switch for SLA observations 
    1197    ln_sst     = .false.             ! Logical switch for SST observations 
    1198    ln_sic     = .false.             ! Logical switch for Sea Ice observations 
    1199    ln_vel3d   = .false.             ! Logical switch for velocity observations 
    1200    ln_altbias = .false.             ! Logical switch for altimeter bias correction 
    1201    ln_nea     = .false.             ! Logical switch for rejection of observations near land 
    1202    ln_grid_global = .true.          ! Logical switch for global distribution of observations 
    1203    ln_grid_search_lookup = .false.  ! Logical switch for obs grid search w/lookup table 
    1204    ln_ignmis  = .true.              ! Logical switch for ignoring missing files 
    1205    ln_s_at_t  = .false.             ! Logical switch for computing model S at T obs if not there 
    1206    ln_sstnight = .false.            ! Logical switch for calculating night-time average for SST obs 
     1230&namobs        !  observation usage switch 
     1231!----------------------------------------------------------------------- 
     1232   ln_diaobs   = .false.             ! Logical switch for the observation operator 
     1233   ln_t3d      = .false.             ! Logical switch for T profile observations 
     1234   ln_s3d      = .false.             ! Logical switch for S profile observations 
     1235   ln_sla      = .false.             ! Logical switch for SLA observations 
     1236   ln_sst      = .false.             ! Logical switch for SST observations 
     1237   ln_sic      = .false.             ! Logical switch for Sea Ice observations 
     1238   ln_vel3d    = .false.             ! Logical switch for velocity observations 
     1239   ln_altbias  = .false.             ! Logical switch for altimeter bias correction 
     1240   ln_nea      = .false.             ! Logical switch for rejection of observations near land 
     1241   ln_grid_global = .true.           ! Logical switch for global distribution of observations 
     1242   ln_grid_search_lookup = .false.   ! Logical switch for obs grid search w/lookup table 
     1243   ln_ignmis   = .true.              ! Logical switch for ignoring missing files 
     1244   ln_s_at_t   = .false.             ! Logical switch for computing model S at T obs if not there 
     1245   ln_sstnight = .false.             ! Logical switch for calculating night-time average for SST obs 
    12071246! All of the *files* variables below are arrays. Use namelist_cfg to add more files 
    1208    cn_profbfiles = 'profiles_01.nc'    ! Profile feedback input observation file names 
    1209    cn_slafbfiles = 'sla_01.nc'         ! SLA feedback input observation file names 
    1210    cn_sstfbfiles = 'sst_01.nc'         ! SST feedback input observation file names 
    1211    cn_sicfbfiles = 'sic_01.nc'         ! SIC feedback input observation file names 
    1212    cn_velfbfiles = 'vel_01.nc'         ! Velocity feedback input observation file names 
    1213    cn_altbiasfile = 'altbias.nc'       ! Altimeter bias input file name 
    1214    cn_gridsearchfile = 'gridsearch.nc' ! Grid search file name 
    1215    rn_gridsearchres = 0.5              ! Grid search resolution 
    1216    rn_dobsini = 00010101.000000        ! Initial date in window YYYYMMDD.HHMMSS 
    1217    rn_dobsend = 00010102.000000        ! Final date in window YYYYMMDD.HHMMSS 
    1218    nn_1dint = 0                        ! Type of vertical interpolation method 
    1219    nn_2dint = 0                        ! Type of horizontal interpolation method 
    1220    nn_msshc = 0                        ! MSSH correction scheme 
    1221    rn_mdtcorr = 1.61                   ! MDT  correction 
    1222    rn_mdtcutoff = 65.0                 ! MDT cutoff for computed correction 
    1223    nn_profdavtypes = -1                ! Profile daily average types - array 
    1224    ln_sstbias = .false.  
    1225    cn_sstbias_files = 'sstbias.nc' 
    1226 / 
    1227 !----------------------------------------------------------------------- 
    1228 &nam_asminc   !   assimilation increments                               ('key_asminc') 
    1229 !----------------------------------------------------------------------- 
    1230     ln_bkgwri = .false.    !  Logical switch for writing out background state 
    1231     ln_trainc = .false.    !  Logical switch for applying tracer increments 
    1232     ln_dyninc = .false.    !  Logical switch for applying velocity increments 
    1233     ln_sshinc = .false.    !  Logical switch for applying SSH increments 
    1234     ln_asmdin = .false.    !  Logical switch for Direct Initialization (DI) 
    1235     ln_asmiau = .false.    !  Logical switch for Incremental Analysis Updating (IAU) 
    1236     nitbkg    = 0          !  Timestep of background in [0,nitend-nit000-1] 
    1237     nitdin    = 0          !  Timestep of background for DI in [0,nitend-nit000-1] 
    1238     nitiaustr = 1          !  Timestep of start of IAU interval in [0,nitend-nit000-1] 
    1239     nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    1240     niaufn    = 0          !  Type of IAU weighting function 
    1241     ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    1242     salfixmin = -9999      !  Minimum salinity after applying the increments 
    1243     nn_divdmp = 0          !  Number of iterations of divergence damping operator 
    1244 / 
    1245 !----------------------------------------------------------------------- 
    1246 &namdiu !   Cool skin and warm layer models 
    1247 !----------------------------------------------------------------------- 
    1248    ln_diurnal      = .false.   !  
    1249    ln_diurnal_only = .false.   ! 
    1250 / 
    1251 !----------------------------------------------------------------------- 
    1252 &nam_diatmb  !  Top Middle Bottom Output 
    1253 !----------------------------------------------------------------------- 
    1254    ln_diatmb  = .false.    !  Choose Top Middle and Bottom output or not 
    1255 / 
    1256 !----------------------------------------------------------------------- 
    1257 &namwad  !   Wetting and drying 
    1258 !----------------------------------------------------------------------- 
    1259    ln_wd             = .false.  ! T/F activation of wetting and drying 
    1260    rn_wdmin1         =  0.1     ! Minimum wet depth on dried cells 
    1261    rn_wdmin2         =  0.01    ! Tolerance of min wet depth on dried cells 
    1262    rn_wdld           =  20.0    ! Land elevation below which wetting/drying is allowed 
    1263    nn_wdit           =  10      ! Max iterations for W/D limiter 
    1264 / 
    1265 !----------------------------------------------------------------------- 
    1266 &nam_dia25h  !  25h Mean Output 
    1267 !----------------------------------------------------------------------- 
    1268    ln_dia25h  = .false.    ! Choose 25h mean output or not 
    1269 / 
     1247   cn_profbfiles = 'profiles_01.nc'  ! Profile feedback input observation file names 
     1248   cn_slafbfiles = 'sla_01.nc'       ! SLA feedback input observation file names 
     1249   cn_sstfbfiles = 'sst_01.nc'       ! SST feedback input observation file names 
     1250   cn_sicfbfiles = 'sic_01.nc'       ! SIC feedback input observation file names 
     1251   cn_velfbfiles = 'vel_01.nc'       ! Velocity feedback input observation file names 
     1252   cn_altbiasfile = 'altbias.nc'     ! Altimeter bias input file name 
     1253   cn_gridsearchfile='gridsearch.nc' ! Grid search file name 
     1254   rn_gridsearchres = 0.5            ! Grid search resolution 
     1255   rn_dobsini  = 00010101.000000     ! Initial date in window YYYYMMDD.HHMMSS 
     1256   rn_dobsend  = 00010102.000000     ! Final date in window YYYYMMDD.HHMMSS 
     1257   nn_1dint    = 0                   ! Type of vertical interpolation method 
     1258   nn_2dint    = 0                   ! Type of horizontal interpolation method 
     1259   nn_msshc    = 0                   ! MSSH correction scheme 
     1260   rn_mdtcorr  = 1.61                ! MDT  correction 
     1261   rn_mdtcutoff = 65.0               ! MDT cutoff for computed correction 
     1262   nn_profdavtypes = -1              ! Profile daily average types - array 
     1263   ln_sstbias  = .false.             ! 
     1264   cn_sstbias_files = 'sstbias.nc'   ! 
     1265/ 
     1266!----------------------------------------------------------------------- 
     1267&nam_asminc    !   assimilation increments                              ('key_asminc') 
     1268!----------------------------------------------------------------------- 
     1269    ln_bkgwri  = .false.   !  Logical switch for writing out background state 
     1270    ln_trainc  = .false.   !  Logical switch for applying tracer increments 
     1271    ln_dyninc  = .false.   !  Logical switch for applying velocity increments 
     1272    ln_sshinc  = .false.   !  Logical switch for applying SSH increments 
     1273    ln_asmdin  = .false.   !  Logical switch for Direct Initialization (DI) 
     1274    ln_asmiau  = .false.   !  Logical switch for Incremental Analysis Updating (IAU) 
     1275    nitbkg     = 0         !  Timestep of background in [0,nitend-nit000-1] 
     1276    nitdin     = 0         !  Timestep of background for DI in [0,nitend-nit000-1] 
     1277    nitiaustr  = 1         !  Timestep of start of IAU interval in [0,nitend-nit000-1] 
     1278    nitiaufin  = 15        !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
     1279    niaufn     = 0         !  Type of IAU weighting function 
     1280    ln_salfix  = .false.   !  Logical switch for ensuring that the sa > salfixmin 
     1281    salfixmin  = -9999     !  Minimum salinity after applying the increments 
     1282    nn_divdmp  = 0         !  Number of iterations of divergence damping operator 
     1283/ 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/SHARED/namelist_top_ref

    r6140 r7341  
    6868   rn_ahtrc_0      = 2000.       !  lateral eddy diffusivity   (lap. operator) [m2/s] 
    6969   rn_bhtrc_0      = 1.e+12      !  lateral eddy diffusivity (bilap. operator) [m4/s] 
     70   ! 
     71   rn_fact_lap      =     1.     !     enhanced zonal eddy diffusivity 
    7072/ 
    7173!----------------------------------------------------------------------- 
  • branches/2016/dev_NOC_2016/NEMOGCM/CONFIG/cfg.txt

    r7339 r7341  
    66GYRE_BFM OPA_SRC TOP_SRC 
    77AMM12 OPA_SRC 
    8 ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 
    98ORCA2_LIM3 OPA_SRC LIM_SRC_3 NST_SRC 
    109ORCA2_LIM OPA_SRC LIM_SRC_2 NST_SRC 
    1110ORCA2_OFF_PISCES OPA_SRC OFF_SRC TOP_SRC 
    1211GYRE OPA_SRC 
     12ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 
    1313WAD_TEST_CASES OPA_SRC 
  • branches/2016/dev_NOC_2016/NEMOGCM/NEMO/LIM_SRC_3/ice.F90

    r5341 r7341  
    234234   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   u_oce, v_oce   !: surface ocean velocity used in ice dynamics 
    235235   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ahiu , ahiv    !: hor. diffusivity coeff. at U- and V-points [m2/s] 
    236    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   pahu , pahv    !: ice hor. eddy diffusivity coef. at U- and V-points 
    237236   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ust2s, hicol   !: friction velocity, ice collection thickness accreted in leads 
    238237   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   strp1, strp2   !: strength at previous time steps 
     
    253252   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fhld        !: heat flux from the lead used for bottom melting 
    254253 
    255    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_snw    !: snow-ocean mass exchange over 1 time step [kg/m2] 
    256    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_spr    !: snow precipitation on ice over 1 time step [kg/m2] 
    257    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_sub    !: snow sublimation over 1 time step [kg/m2] 
    258  
    259    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_ice    !: ice-ocean mass exchange over 1 time step [kg/m2] 
    260    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_sni    !: snow ice growth component of wfx_ice [kg/m2] 
    261    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_opw    !: lateral ice growth component of wfx_ice [kg/m2] 
    262    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_bog    !: bottom ice growth component of wfx_ice [kg/m2] 
    263    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_dyn    !: dynamical ice growth component of wfx_ice [kg/m2] 
    264    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_bom    !: bottom melt component of wfx_ice [kg/m2] 
    265    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_sum    !: surface melt component of wfx_ice [kg/m2] 
    266    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_res    !: residual component of wfx_ice [kg/m2] 
    267  
    268    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   afx_tot     !: ice concentration tendency (total) [s-1] 
     254   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_snw    !: snow-ocean mass exchange   [kg.m-2.s-1] 
     255   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_spr    !: snow precipitation on ice  [kg.m-2.s-1] 
     256   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_sub    !: snow/ice sublimation       [kg.m-2.s-1] 
     257 
     258   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_ice    !: ice-ocean mass exchange                   [kg.m-2.s-1] 
     259   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_sni    !: snow ice growth component of wfx_ice      [kg.m-2.s-1] 
     260   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_opw    !: lateral ice growth component of wfx_ice   [kg.m-2.s-1] 
     261   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_bog    !: bottom ice growth component of wfx_ice    [kg.m-2.s-1] 
     262   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_dyn    !: dynamical ice growth component of wfx_ice [kg.m-2.s-1] 
     263   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_bom    !: bottom melt component of wfx_ice          [kg.m-2.s-1] 
     264   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_sum    !: surface melt component of wfx_ice         [kg.m-2.s-1] 
     265   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_res    !: residual component of wfx_ice             [kg.m-2.s-1] 
     266 
     267   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   afx_tot     !: ice concentration tendency (total)          [s-1] 
    269268   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   afx_thd     !: ice concentration tendency (thermodynamics) [s-1] 
    270    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   afx_dyn     !: ice concentration tendency (dynamics) [s-1] 
     269   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   afx_dyn     !: ice concentration tendency (dynamics)       [s-1] 
    271270 
    272271   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_bog     !: salt flux due to ice growth/melt                      [PSU/m2/s] 
     
    279278   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_res     !: residual salt flux due to correction of ice thickness [PSU/m2/s] 
    280279 
    281    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_bog     !: total heat flux causing bottom ice growth  
    282    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_bom     !: total heat flux causing bottom ice melt  
    283    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_sum     !: total heat flux causing surface ice melt  
    284    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_opw     !: total heat flux causing open water ice formation 
    285    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_dif     !: total heat flux causing Temp change in the ice  
    286    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_snw     !: heat flux for snow melt  
    287    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_err     !: heat flux error after heat diffusion  
    288    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_err_dif !: heat flux remaining due to change in non-solar flux 
    289    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_err_rem !: heat flux error after heat remapping  
    290    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_in      !: heat flux available for thermo transformations  
    291    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_out     !: heat flux remaining at the end of thermo transformations  
    292  
     280   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_sub     !: salt flux due to ice sublimation 
     281 
     282   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_bog     !: total heat flux causing bottom ice growth        [W.m-2] 
     283   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_bom     !: total heat flux causing bottom ice melt          [W.m-2] 
     284   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_sum     !: total heat flux causing surface ice melt         [W.m-2] 
     285   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_opw     !: total heat flux causing open water ice formation [W.m-2] 
     286   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_dif     !: total heat flux causing Temp change in the ice   [W.m-2] 
     287   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_snw     !: heat flux for snow melt                          [W.m-2] 
     288   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_err     !: heat flux error after heat diffusion             [W.m-2] 
     289   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_err_dif !: heat flux remaining due to change in non-solar flux [W.m-2] 
     290   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_err_rem !: heat flux error after heat remapping             [W.m-2] 
     291   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_in      !: heat flux available for thermo transformations   [W.m-2] 
     292   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_out     !: heat flux remaining at the end of thermo transformations  [W.m-2] 
     293   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_err_sub !: mass flux error after sublimation [kg.m-2.s-1] 
     294    
    293295   ! heat flux associated with ice-atmosphere mass exchange 
    294    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_sub     !: heat flux for sublimation  
    295    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_spr     !: heat flux of the snow precipitation  
     296   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_sub     !: heat flux for sublimation  [W.m-2] 
     297   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_spr     !: heat flux of the snow precipitation  [W.m-2] 
    296298 
    297299   ! heat flux associated with ice-ocean mass exchange 
    298    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_thd     !: ice-ocean heat flux from thermo processes (limthd_dh)  
    299    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_dyn     !: ice-ocean heat flux from mecanical processes (limitd_me)  
    300    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_res     !: residual heat flux due to correction of ice thickness 
    301  
    302    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ftr_ice   !: transmitted solar radiation under ice 
     300   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_thd     !: ice-ocean heat flux from thermo processes (limthd_dh)  [W.m-2] 
     301   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_dyn     !: ice-ocean heat flux from mecanical processes (limitd_me)  [W.m-2] 
     302   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_res     !: residual heat flux due to correction of ice thickness [W.m-2] 
     303 
     304   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ftr_ice   !: transmitted solar radiation under ice    
     305   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   pahu3D , pahv3D 
     306   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   rn_amax_2d  !: maximum ice concentration 2d array 
    303307 
    304308   !!-------------------------------------------------------------------------- 
     
    369373   !!-------------------------------------------------------------------------- 
    370374   !                                                  !!: ** Namelist namicerun read in sbc_lim_init ** 
    371    INTEGER          , PUBLIC ::   jpl             !: number of ice  categories  
    372    INTEGER          , PUBLIC ::   nlay_i          !: number of ice  layers  
    373    INTEGER          , PUBLIC ::   nlay_s          !: number of snow layers  
    374    CHARACTER(len=32), PUBLIC ::   cn_icerst_in    !: suffix of ice restart name (input) 
     375   INTEGER           , PUBLIC ::   jpl             !: number of ice  categories  
     376   INTEGER           , PUBLIC ::   nlay_i          !: number of ice  layers  
     377   INTEGER           , PUBLIC ::   nlay_s          !: number of snow layers  
     378   CHARACTER(len=32) , PUBLIC ::   cn_icerst_in    !: suffix of ice restart name (input) 
    375379   CHARACTER(len=256), PUBLIC ::   cn_icerst_indir !: ice restart input directory 
    376    CHARACTER(len=32), PUBLIC ::   cn_icerst_out   !: suffix of ice restart name (output) 
     380   CHARACTER(len=32) , PUBLIC ::   cn_icerst_out   !: suffix of ice restart name (output) 
    377381   CHARACTER(len=256), PUBLIC ::   cn_icerst_outdir!: ice restart output directory 
    378    LOGICAL          , PUBLIC ::   ln_limdyn       !: flag for ice dynamics (T) or not (F) 
    379    LOGICAL          , PUBLIC ::   ln_icectl       !: flag for sea-ice points output (T) or not (F) 
    380    REAL(wp)         , PUBLIC ::   rn_amax         !: maximum ice concentration 
    381    INTEGER          , PUBLIC ::   iiceprt         !: debug i-point 
    382    INTEGER          , PUBLIC ::   jiceprt         !: debug j-point 
     382   LOGICAL           , PUBLIC ::   ln_limdyn       !: flag for ice dynamics (T) or not (F) 
     383   LOGICAL           , PUBLIC ::   ln_icectl       !: flag for sea-ice points output (T) or not (F) 
     384   REAL(wp)          , PUBLIC ::   rn_amax_n       !: maximum ice concentration Northern hemisphere 
     385   REAL(wp)          , PUBLIC ::   rn_amax_s       !: maximum ice concentration Southern hemisphere 
     386   INTEGER           , PUBLIC ::   iiceprt         !: debug i-point 
     387   INTEGER           , PUBLIC ::   jiceprt         !: debug j-point 
    383388   ! 
    384389   !!-------------------------------------------------------------------------- 
     
    424429      ALLOCATE( u_oce    (jpi,jpj) , v_oce    (jpi,jpj) ,                           & 
    425430         &      ahiu     (jpi,jpj) , ahiv     (jpi,jpj) ,                           & 
    426          &      pahu     (jpi,jpj) , pahv     (jpi,jpj) ,                           & 
    427431         &      ust2s    (jpi,jpj) , hicol    (jpi,jpj) ,                           & 
    428432         &      strp1    (jpi,jpj) , strp2    (jpi,jpj) , strength  (jpi,jpj) ,     & 
     
    437441         &      wfx_res(jpi,jpj) , wfx_sni(jpi,jpj) , wfx_opw(jpi,jpj) , wfx_spr(jpi,jpj) ,     & 
    438442         &      afx_tot(jpi,jpj) , afx_thd(jpi,jpj),  afx_dyn(jpi,jpj) ,                        & 
    439          &      fhtur  (jpi,jpj) , ftr_ice(jpi,jpj,jpl), qlead  (jpi,jpj) ,                     & 
    440          &      sfx_res(jpi,jpj) , sfx_bri(jpi,jpj) , sfx_dyn(jpi,jpj) ,                        & 
     443         &      fhtur  (jpi,jpj) , ftr_ice(jpi,jpj,jpl), pahu3D(jpi,jpj,jpl+1), pahv3D(jpi,jpj,jpl+1),            & 
     444         &      rn_amax_2d (jpi,jpj) , qlead  (jpi,jpj) ,                                                         & 
     445         &      sfx_res(jpi,jpj) , sfx_bri(jpi,jpj) , sfx_dyn(jpi,jpj) , sfx_sub(jpi,jpj),                        & 
    441446         &      sfx_bog(jpi,jpj) , sfx_bom(jpi,jpj) , sfx_sum(jpi,jpj) , sfx_sni(jpi,jpj) , sfx_opw(jpi,jpj) ,    & 
    442447         &      hfx_res(jpi,jpj) , hfx_snw(jpi,jpj) , hfx_sub(jpi,jpj) , hfx_err(jpi,jpj) ,     &  
    443          &      hfx_err_dif(jpi,jpj) , hfx_err_rem(jpi,jpj) ,                                   & 
     448         &      hfx_err_dif(jpi,jpj) , hfx_err_rem(jpi,jpj) , wfx_err_sub(jpi,jpj) ,       & 
    444449         &      hfx_in (jpi,jpj) , hfx_out(jpi,jpj) , fhld(jpi,jpj) ,                           & 
    445450         &      hfx_sum(jpi,jpj) , hfx_bom(jpi,jpj) , hfx_bog(jpi,jpj) , hfx_dif(jpi,jpj) , hfx_opw(jpi,jpj) ,    & 
     
    508513   !!====================================================================== 
    509514END MODULE ice 
     515 
  • branches/2016/dev_NOC_2016/NEMOGCM/NEMO/LIM_SRC_3/limcons.F90

    r5836 r7341  
    2424   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    2525   USE sbc_oce , ONLY : sfx  ! Surface boundary condition: ocean fields 
    26  
     26   USE sbc_ice , ONLY : qevap_ice 
     27    
    2728   IMPLICIT NONE 
    2829   PRIVATE 
     
    184185         ! salt flux 
    185186         zfs_b  = glob_sum(  ( sfx_bri(:,:) + sfx_bog(:,:) + sfx_bom(:,:) + sfx_sum(:,:) + sfx_sni(:,:) +  & 
    186             &                  sfx_opw(:,:) + sfx_res(:,:) + sfx_dyn(:,:)                                  & 
     187            &                  sfx_opw(:,:) + sfx_res(:,:) + sfx_dyn(:,:) + sfx_sub(:,:)                   & 
    187188            &                ) *  e1e2t(:,:) * tmask(:,:,1) * zconv ) 
    188189 
     
    209210         ! salt flux 
    210211         zfs  = glob_sum(  ( sfx_bri(:,:) + sfx_bog(:,:) + sfx_bom(:,:) + sfx_sum(:,:) + sfx_sni(:,:) +  & 
    211             &                sfx_opw(:,:) + sfx_res(:,:) + sfx_dyn(:,:)                                  &  
     212            &                sfx_opw(:,:) + sfx_res(:,:) + sfx_dyn(:,:) + sfx_sub(:,:)                   &  
    212213            &              ) * e1e2t(:,:) * tmask(:,:,1) * zconv ) - zfs_b 
    213214 
     
    256257            ENDIF 
    257258            IF (     zvmin   < -epsi10 ) WRITE(numout,*) 'violation v_i<0  [m]          (',cd_routine,') = ',zvmin 
    258             IF (     zamax   > rn_amax+epsi10 .AND. cd_routine /= 'limtrp' .AND. cd_routine /= 'limitd_me' ) THEN 
     259            IF (     zamax   > MAX( rn_amax_n, rn_amax_s ) + epsi10 .AND. & 
     260               &                         cd_routine /= 'limtrp' .AND. cd_routine /= 'limitd_me' ) THEN 
    259261                                         WRITE(numout,*) 'violation a_i>amax            (',cd_routine,') = ',zamax 
    260262            ENDIF 
     
    286288#if ! defined key_bdy 
    287289      ! heat flux 
    288       zhfx  = glob_sum( ( hfx_in - hfx_out - diag_heat - diag_trp_ei - diag_trp_es - hfx_sub ) * e1e2t * tmask(:,:,1) * zconv )  
     290      zhfx  = glob_sum( ( hfx_in - hfx_out - diag_heat - diag_trp_ei - diag_trp_es - SUM( qevap_ice * a_i_b, dim=3 ) )  & 
     291         &              * e1e2t * tmask(:,:,1) * zconv )  
    289292      ! salt flux 
    290293      zsfx  = glob_sum( ( sfx + diag_smvi ) * e1e2t * tmask(:,:,1) * zconv ) * rday 
  • branches/2016/dev_NOC_2016/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90

    r5836 r7341  
    5656      real(wp)   ::   zbg_ivo, zbg_svo, zbg_are, zbg_sal ,zbg_tem ,zbg_ihc ,zbg_shc 
    5757      real(wp)   ::   zbg_sfx, zbg_sfx_bri, zbg_sfx_bog, zbg_sfx_bom, zbg_sfx_sum, zbg_sfx_sni,   & 
    58       &               zbg_sfx_opw, zbg_sfx_res, zbg_sfx_dyn  
     58      &               zbg_sfx_opw, zbg_sfx_res, zbg_sfx_dyn, zbg_sfx_sub  
    5959      real(wp)   ::   zbg_vfx, zbg_vfx_bog, zbg_vfx_opw, zbg_vfx_sni, zbg_vfx_dyn 
    6060      real(wp)   ::   zbg_vfx_bom, zbg_vfx_sum, zbg_vfx_res, zbg_vfx_spr, zbg_vfx_snw, zbg_vfx_sub   
     
    111111      zbg_sfx_bom = ztmp * glob_sum( sfx_bom(:,:) * e1e2t(:,:) * tmask(:,:,1) ) 
    112112      zbg_sfx_sum = ztmp * glob_sum( sfx_sum(:,:) * e1e2t(:,:) * tmask(:,:,1) ) 
     113      zbg_sfx_sub = ztmp * glob_sum( sfx_sub(:,:) * e1e2t(:,:) * tmask(:,:,1) ) 
    113114 
    114115      ! Heat budget 
    115       zbg_ihc      = glob_sum( et_i(:,:) * e1e2t(:,:) ) * 1.e-20 ! ice heat content  [1.e20 J] 
    116       zbg_shc      = glob_sum( et_s(:,:) * e1e2t(:,:) ) * 1.e-20 ! snow heat content [1.e20 J] 
     116      zbg_ihc      = glob_sum( et_i(:,:) * e1e2t(:,:) * 1.e-20 ) ! ice heat content  [1.e20 J] 
     117      zbg_shc      = glob_sum( et_s(:,:) * e1e2t(:,:) * 1.e-20 ) ! snow heat content [1.e20 J] 
    117118      zbg_hfx_dhc  = glob_sum( diag_heat(:,:) * e1e2t(:,:) * tmask(:,:,1) ) ! [in W] 
    118119      zbg_hfx_spr  = glob_sum( hfx_spr(:,:) * e1e2t(:,:) * tmask(:,:,1) ) ! [in W] 
     
    189190      CALL iom_put( 'ibgsfxbom' , zbg_sfx_bom                              )   ! salt flux bottom melt       - 
    190191      CALL iom_put( 'ibgsfxsum' , zbg_sfx_sum                              )   ! salt flux surface melt      - 
     192      CALL iom_put( 'ibgsfxsub' , zbg_sfx_sub                              )   ! salt flux sublimation      - 
    191193 
    192194      CALL iom_put( 'ibghfxdhc' , zbg_hfx_dhc                              )   ! Heat content variation in snow and ice [W] 
  • branches/2016/dev_NOC_2016/NEMOGCM/NEMO/LIM_SRC_3/limhdf.F90

    r5836 r7341  
    77   !!             -   !  2001-05 (G. Madec, R. Hordoir) opa norm 
    88   !!            1.0  !  2002-08 (C. Ethe)  F90, free form 
     9   !!            3.0  !  2015-08 (O. Tintó and M. Castrillo)  added lim_hdf (multiple) 
    910   !!---------------------------------------------------------------------- 
    1011#if defined key_lim3 
     
    2728   PRIVATE 
    2829 
    29    PUBLIC   lim_hdf         ! called by lim_trp 
     30   PUBLIC   lim_hdf ! called by lim_trp 
    3031   PUBLIC   lim_hdf_init    ! called by sbc_lim_init 
    3132 
     
    4344CONTAINS 
    4445 
    45    SUBROUTINE lim_hdf( ptab ) 
     46   SUBROUTINE lim_hdf( ptab , ihdf_vars , jpl , nlay_i ) 
    4647      !!------------------------------------------------------------------- 
    4748      !!                  ***  ROUTINE lim_hdf  *** 
     
    5455      !! ** Action  :    update ptab with the diffusive contribution 
    5556      !!------------------------------------------------------------------- 
    56       REAL(wp), DIMENSION(jpi,jpj), INTENT( inout ) ::   ptab    ! Field on which the diffusion is applied 
    57       ! 
    58       INTEGER                           ::  ji, jj                    ! dummy loop indices 
     57      INTEGER                           :: jpl, nlay_i, isize, ihdf_vars 
     58      REAL(wp),  DIMENSION(:,:,:), INTENT( inout ),TARGET ::   ptab    ! Field on which the diffusion is applied 
     59      ! 
     60      INTEGER                           ::  ji, jj, jk, jl , jm               ! dummy loop indices 
    5961      INTEGER                           ::  iter, ierr           ! local integers 
    60       REAL(wp)                          ::  zrlxint, zconv     ! local scalars 
    61       REAL(wp), POINTER, DIMENSION(:,:) ::  zrlx, zflu, zflv, zdiv0, zdiv, ztab0 
     62      REAL(wp)                          ::  zrlxint     ! local scalars 
     63      REAL(wp), POINTER , DIMENSION ( : )        :: zconv     ! local scalars 
     64      REAL(wp), POINTER , DIMENSION(:,:,:) ::  zrlx,zdiv0, ztab0 
     65      REAL(wp), POINTER , DIMENSION(:,:) ::  zflu, zflv, zdiv 
    6266      CHARACTER(lc)                     ::  charout                   ! local character 
    6367      REAL(wp), PARAMETER               ::  zrelax = 0.5_wp           ! relaxation constant for iterative procedure 
     
    6569      INTEGER , PARAMETER               ::  its    = 100              ! Maximum number of iteration 
    6670      !!------------------------------------------------------------------- 
     71      TYPE(arrayptr)   , ALLOCATABLE, DIMENSION(:) ::   pt2d_array, zrlx_array 
     72      CHARACTER(len=1) , ALLOCATABLE, DIMENSION(:) ::   type_array ! define the nature of ptab array grid-points 
     73      !                                                            ! = T , U , V , F , W and I points 
     74      REAL(wp)        , ALLOCATABLE, DIMENSION(:)  ::   psgn_array    ! =-1 the sign change across the north fold boundary 
     75 
     76     !!---------------------------------------------------------------------  
     77 
     78      !                       !==  Initialisation  ==! 
     79      ! +1 open water diffusion 
     80      isize = jpl*(ihdf_vars+nlay_i)+1 
     81      ALLOCATE( zconv (isize) ) 
     82      ALLOCATE( pt2d_array(isize) , zrlx_array(isize) ) 
     83      ALLOCATE( type_array(isize) ) 
     84      ALLOCATE( psgn_array(isize) ) 
    6785       
    68       CALL wrk_alloc( jpi, jpj, zrlx, zflu, zflv, zdiv0, zdiv, ztab0 ) 
    69  
    70       !                       !==  Initialisation  ==! 
     86      CALL wrk_alloc( jpi, jpj, isize, zrlx, zdiv0, ztab0 ) 
     87      CALL wrk_alloc( jpi, jpj, zflu, zflv, zdiv ) 
     88 
     89      DO jk= 1 , isize 
     90         pt2d_array(jk)%pt2d=>ptab(:,:,jk) 
     91         zrlx_array(jk)%pt2d=>zrlx(:,:,jk) 
     92         type_array(jk)='T' 
     93         psgn_array(jk)=1. 
     94      END DO 
     95 
    7196      ! 
    7297      IF( linit ) THEN              ! Metric coefficient (compute at the first call and saved in efact) 
     
    7499         IF( lk_mpp    )   CALL mpp_sum( ierr ) 
    75100         IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'lim_hdf : unable to allocate arrays' ) 
    76          DO jj = 2, jpjm1   
     101         DO jj = 2, jpjm1 
    77102            DO ji = fs_2 , fs_jpim1   ! vector opt. 
    78103               efact(ji,jj) = ( e2u(ji,jj) + e2u(ji-1,jj) + e1v(ji,jj) + e1v(ji,jj-1) ) * r1_e1e2t(ji,jj) 
     
    83108      !                             ! Time integration parameters 
    84109      ! 
    85       ztab0(:, : ) = ptab(:,:)      ! Arrays initialization 
    86       zdiv0(:, 1 ) = 0._wp 
    87       zdiv0(:,jpj) = 0._wp 
    88       zflu (jpi,:) = 0._wp    
    89       zflv (jpi,:) = 0._wp 
    90       zdiv0(1,  :) = 0._wp 
    91       zdiv0(jpi,:) = 0._wp 
     110      zflu (jpi,: ) = 0._wp 
     111      zflv (jpi,: ) = 0._wp 
     112 
     113      DO jk=1 , isize 
     114         ztab0(:, : , jk ) = ptab(:,:,jk)      ! Arrays initialization 
     115         zdiv0(:, 1 , jk ) = 0._wp 
     116         zdiv0(:,jpj, jk ) = 0._wp 
     117         zdiv0(1,  :, jk ) = 0._wp 
     118         zdiv0(jpi,:, jk ) = 0._wp 
     119      END DO 
    92120 
    93121      zconv = 1._wp           !==  horizontal diffusion using a Crant-Nicholson scheme  ==! 
    94122      iter  = 0 
    95123      ! 
    96       DO WHILE( zconv > ( 2._wp * 1.e-04 ) .AND. iter <= its )   ! Sub-time step loop 
     124      DO WHILE( MAXVAL(zconv(:)) > ( 2._wp * 1.e-04 ) .AND. iter <= its )   ! Sub-time step loop 
    97125         ! 
    98126         iter = iter + 1                                 ! incrementation of the sub-time step number 
    99127         ! 
     128         DO jk = 1 , isize 
     129            jl = (jk-1) /( ihdf_vars+nlay_i)+1 
     130            IF (zconv(jk) > ( 2._wp * 1.e-04 )) THEN 
     131               DO jj = 1, jpjm1                                ! diffusive fluxes in U- and V- direction 
     132                  DO ji = 1 , fs_jpim1   ! vector opt. 
     133                     zflu(ji,jj) = pahu3D(ji,jj,jl) * e2u(ji,jj) * r1_e1u(ji,jj) * ( ptab(ji+1,jj,jk) - ptab(ji,jj,jk) ) 
     134                     zflv(ji,jj) = pahv3D(ji,jj,jl) * e1v(ji,jj) * r1_e2v(ji,jj) * ( ptab(ji,jj+1,jk) - ptab(ji,jj,jk) ) 
     135                  END DO 
     136               END DO 
     137               ! 
     138               DO jj= 2, jpjm1                                 ! diffusive trend : divergence of the fluxes 
     139                  DO ji = fs_2 , fs_jpim1   ! vector opt.  
     140                     zdiv(ji,jj) = ( zflu(ji,jj) - zflu(ji-1,jj) + zflv(ji,jj) - zflv(ji,jj-1) ) * r1_e1e2t(ji,jj) 
     141                  END DO 
     142               END DO 
     143               ! 
     144               IF( iter == 1 )   zdiv0(:,:,jk) = zdiv(:,:)        ! save the 1st evaluation of the diffusive trend in zdiv0 
     145               ! 
     146               DO jj = 2, jpjm1                                ! iterative evaluation 
     147                  DO ji = fs_2 , fs_jpim1   ! vector opt. 
     148                     zrlxint = (   ztab0(ji,jj,jk)    & 
     149                        &       +  rdt_ice * (           zalfa   * ( zdiv(ji,jj) + efact(ji,jj) * ptab(ji,jj,jk) )   & 
     150                        &                      + ( 1.0 - zalfa ) *   zdiv0(ji,jj,jk) )                               & 
     151                        &      ) / ( 1.0 + zalfa * rdt_ice * efact(ji,jj) ) 
     152                     zrlx(ji,jj,jk) = ptab(ji,jj,jk) + zrelax * ( zrlxint - ptab(ji,jj,jk) ) 
     153                  END DO 
     154               END DO 
     155            END IF 
     156 
     157         END DO 
     158 
     159         CALL lbc_lnk_multi( zrlx_array, type_array , psgn_array , isize ) ! Multiple interchange of all the variables 
     160         ! 
     161         IF ( MOD( iter-1 , nn_convfrq ) == 0 )  THEN   !Convergence test every nn_convfrq iterations (perf. optimization )  
     162            DO jk=1,isize 
     163               zconv(jk) = 0._wp                                   ! convergence test 
     164               DO jj = 2, jpjm1 
     165                  DO ji = fs_2, fs_jpim1 
     166                     zconv(jk) = MAX( zconv(jk), ABS( zrlx(ji,jj,jk) - ptab(ji,jj,jk) )  ) 
     167                  END DO 
     168               END DO 
     169            END DO 
     170            IF( lk_mpp ) CALL mpp_max_multiple( zconv , isize )            ! max over the global domain for all the variables 
     171         ENDIF 
     172         ! 
     173         DO jk=1,isize 
     174            ptab(:,:,jk) = zrlx(:,:,jk) 
     175         END DO 
     176         ! 
     177      END DO                                       ! end of sub-time step loop 
     178 
     179     ! ----------------------- 
     180      !!! final step (clem) !!! 
     181      DO jk = 1, isize 
     182         jl = (jk-1) /( ihdf_vars+nlay_i)+1 
    100183         DO jj = 1, jpjm1                                ! diffusive fluxes in U- and V- direction 
    101184            DO ji = 1 , fs_jpim1   ! vector opt. 
    102                zflu(ji,jj) = pahu(ji,jj) * e2u(ji,jj) * r1_e1u(ji,jj) * ( ptab(ji+1,jj) - ptab(ji,jj) ) 
    103                zflv(ji,jj) = pahv(ji,jj) * e1v(ji,jj) * r1_e2v(ji,jj) * ( ptab(ji,jj+1) - ptab(ji,jj) ) 
     185               zflu(ji,jj) = pahu3D(ji,jj,jl) * e2u(ji,jj) * r1_e1u(ji,jj) * ( ptab(ji+1,jj,jk) - ptab(ji,jj,jk) ) 
     186               zflv(ji,jj) = pahv3D(ji,jj,jl) * e1v(ji,jj) * r1_e2v(ji,jj) * ( ptab(ji,jj+1,jk) - ptab(ji,jj,jk) ) 
    104187            END DO 
    105188         END DO 
     
    108191            DO ji = fs_2 , fs_jpim1   ! vector opt.  
    109192               zdiv(ji,jj) = ( zflu(ji,jj) - zflu(ji-1,jj) + zflv(ji,jj) - zflv(ji,jj-1) ) * r1_e1e2t(ji,jj) 
    110             END DO 
    111          END DO 
    112          ! 
    113          IF( iter == 1 )   zdiv0(:,:) = zdiv(:,:)        ! save the 1st evaluation of the diffusive trend in zdiv0 
    114          ! 
    115          DO jj = 2, jpjm1                                ! iterative evaluation 
    116             DO ji = fs_2 , fs_jpim1   ! vector opt. 
    117                zrlxint = (   ztab0(ji,jj)    & 
    118                   &       +  rdt_ice * (           zalfa   * ( zdiv(ji,jj) + efact(ji,jj) * ptab(ji,jj) )   & 
    119                   &                      + ( 1.0 - zalfa ) *   zdiv0(ji,jj) )                               &  
    120                   &      ) / ( 1.0 + zalfa * rdt_ice * efact(ji,jj) ) 
    121                zrlx(ji,jj) = ptab(ji,jj) + zrelax * ( zrlxint - ptab(ji,jj) ) 
    122             END DO 
    123          END DO 
    124          CALL lbc_lnk( zrlx, 'T', 1. )                   ! lateral boundary condition 
    125          ! 
    126          IF ( MOD( iter, nn_convfrq ) == 0 )  THEN    ! convergence test every nn_convfrq iterations (perf. optimization) 
    127             zconv = 0._wp 
    128             DO jj = 2, jpjm1 
    129                DO ji = fs_2, fs_jpim1 
    130                   zconv = MAX( zconv, ABS( zrlx(ji,jj) - ptab(ji,jj) )  ) 
    131                END DO 
    132             END DO 
    133             IF( lk_mpp )   CALL mpp_max( zconv )      ! max over the global domain 
    134          ENDIF 
    135          ! 
    136          ptab(:,:) = zrlx(:,:) 
    137          ! 
    138       END DO                                       ! end of sub-time step loop 
    139  
    140       ! ----------------------- 
    141       !!! final step (clem) !!! 
    142       DO jj = 1, jpjm1                                ! diffusive fluxes in U- and V- direction 
    143          DO ji = 1 , fs_jpim1   ! vector opt. 
    144             zflu(ji,jj) = pahu(ji,jj) * e2u(ji,jj) * r1_e1u(ji,jj) * ( ptab(ji+1,jj) - ptab(ji,jj) ) 
    145             zflv(ji,jj) = pahv(ji,jj) * e1v(ji,jj) * r1_e2v(ji,jj) * ( ptab(ji,jj+1) - ptab(ji,jj) ) 
     193               ptab(ji,jj,jk) = ztab0(ji,jj,jk) + 0.5 * ( zdiv(ji,jj) + zdiv0(ji,jj,jk) ) 
     194            END DO 
    146195         END DO 
    147196      END DO 
    148       ! 
    149       DO jj= 2, jpjm1                                 ! diffusive trend : divergence of the fluxes 
    150          DO ji = fs_2 , fs_jpim1   ! vector opt.  
    151             zdiv(ji,jj) = ( zflu(ji,jj) - zflu(ji-1,jj) + zflv(ji,jj) - zflv(ji,jj-1) ) * r1_e1e2t(ji,jj) 
    152             ptab(ji,jj) = ztab0(ji,jj) + 0.5 * ( zdiv(ji,jj) + zdiv0(ji,jj) ) 
    153          END DO 
    154       END DO 
    155       CALL lbc_lnk( ptab, 'T', 1. )                   ! lateral boundary condition 
     197 
     198      CALL lbc_lnk_multi( pt2d_array, type_array , psgn_array , isize ) ! Multiple interchange of all the variables 
     199 
    156200      !!! final step (clem) !!! 
    157201      ! ----------------------- 
    158202 
    159203      IF(ln_ctl)   THEN 
    160          zrlx(:,:) = ptab(:,:) - ztab0(:,:) 
    161          WRITE(charout,FMT="(' lim_hdf  : zconv =',D23.16, ' iter =',I4,2X)") zconv, iter 
    162          CALL prt_ctl( tab2d_1=zrlx, clinfo1=charout ) 
    163       ENDIF 
    164       ! 
    165       CALL wrk_dealloc( jpi, jpj, zrlx, zflu, zflv, zdiv0, zdiv, ztab0 ) 
     204         DO jk = 1 , isize 
     205            zrlx(:,:,jk) = ptab(:,:,jk) - ztab0(:,:,jk) 
     206            WRITE(charout,FMT="(' lim_hdf  : zconv =',D23.16, ' iter =',I4,2X)") zconv, iter 
     207            CALL prt_ctl( tab2d_1=zrlx(:,:,jk), clinfo1=charout ) 
     208         END DO 
     209      ENDIF 
     210      ! 
     211      CALL wrk_dealloc( jpi, jpj, isize, zrlx, zdiv0, ztab0 ) 
     212      CALL wrk_dealloc( jpi, jpj, zflu, zflv, zdiv ) 
     213 
     214      DEALLOCATE( zconv ) 
     215      DEALLOCATE( pt2d_array , zrlx_array ) 
     216      DEALLOCATE( type_array ) 
     217      DEALLOCATE( psgn_array ) 
    166218      ! 
    167219   END SUBROUTINE lim_hdf 
     220 
    168221 
    169222    
     
    179232      !!------------------------------------------------------------------- 
    180233      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    181       NAMELIST/namicehdf/ nn_convfrq 
     234      NAMELIST/namicehdf/ nn_convfrq  
    182235      !!------------------------------------------------------------------- 
    183236      ! 
     
    212265   !!====================================================================== 
    213266END MODULE limhdf 
     267 
  • branches/2016/dev_NOC_2016/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90

    r6140 r7341  
    2424   USE par_oce          ! ocean parameters 
    2525   USE dom_ice          ! sea-ice domain 
     26   USE limvar           ! lim_var_salprof 
    2627   USE in_out_manager   ! I/O manager 
    2728   USE lib_mpp          ! MPP library 
     
    277278                           ztest_1 = 1 
    278279                        ELSE  
    279                           !this write is useful 
    280                           IF(lwp)  WRITE(numout,*) ' * TEST1 AREA NOT CONSERVED *** zA_cons = ', zA_cons,' zat_i_ini = ',zat_i_ini(ji,jj)  
    281280                          ztest_1 = 0 
    282281                        ENDIF 
     
    289288                           ztest_2 = 1 
    290289                        ELSE 
    291                            !this write is useful 
    292                            IF(lwp)  WRITE(numout,*) ' * TEST2 VOLUME NOT CONSERVED *** zV_cons = ', zV_cons, & 
    293                                                     ' zvt_i_ini = ', zvt_i_ini(ji,jj) 
    294290                           ztest_2 = 0 
    295291                        ENDIF 
     
    299295                           ztest_3 = 1 
    300296                        ELSE 
    301                            ! this write is useful 
    302                            IF(lwp) WRITE(numout,*) ' * TEST 3 THICKNESS OF THE LAST CATEGORY OUT OF BOUNDS *** zh_i_ini(ji,jj,i_fill) = ', & 
    303                            zh_i_ini(ji,jj,i_fill), ' hi_max(jpl-1) = ', hi_max(i_fill-1) 
    304                            IF(lwp) WRITE(numout,*) ' ji,jj,i_fill ',ji,jj,i_fill 
    305                            IF(lwp) WRITE(numout,*) 'zht_i_ini ',zht_i_ini(ji,jj) 
    306297                           ztest_3 = 0 
    307298                        ENDIF 
     
    311302                        DO jl = 1, jpl 
    312303                           IF ( za_i_ini(ji,jj,jl) .LT. 0._wp ) THEN  
    313                               ! this write is useful 
    314                               IF(lwp) WRITE(numout,*) ' * TEST 4 POSITIVITY NOT OK FOR CAT ', jl, ' WITH A = ', za_i_ini(ji,jj,jl) 
    315304                              ztest_4 = 0 
    316305                           ENDIF 
     
    379368         END DO 
    380369 
     370         ! for constant salinity in time 
     371         IF( nn_icesal == 1 .OR. nn_icesal == 3 )  THEN 
     372            CALL lim_var_salprof 
     373            smv_i = sm_i * v_i 
     374         ENDIF 
     375          
    381376         ! Snow temperature and heat content 
    382377         DO jk = 1, nlay_s 
  • branches/2016/dev_NOC_2016/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90

    r5836 r7341  
    4545   REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::   asum     ! sum of total ice and open water area 
    4646   REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::   aksum    ! ratio of area removed to area ridged 
    47    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   athorn   ! participation function; fraction of ridging/ 
    48    !                                                     ! closing associated w/ category n 
     47   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   athorn   ! participation function; fraction of ridging/closing associated w/ category n 
    4948   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   hrmin    ! minimum ridge thickness 
    5049   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   hrmax    ! maximum ridge thickness 
    5150   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   hraft    ! thickness of rafted ice 
    52    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   krdg     ! mean ridge thickness/thickness of ridging ice  
     51   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   krdg     ! thickness of ridging ice / mean ridge thickness 
    5352   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   aridge   ! participating ice ridging 
    5453   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   araft    ! participating ice rafting 
    5554 
    5655   REAL(wp), PARAMETER ::   krdgmin = 1.1_wp    ! min ridge thickness multiplier 
    57    REAL(wp), PARAMETER ::   kraft   = 2.0_wp    ! rafting multipliyer 
    58    REAL(wp), PARAMETER ::   kamax   = 1.0_wp    ! max of ice area authorized (clem: scheme is not stable if kamax <= 0.99) 
     56   REAL(wp), PARAMETER ::   kraft   = 0.5_wp    ! rafting multipliyer 
    5957 
    6058   REAL(wp) ::   Cp                             !  
    6159   ! 
    62    !----------------------------------------------------------------------- 
    63    ! Ridging diagnostic arrays for history files 
    64    !----------------------------------------------------------------------- 
    65    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   dardg1dt   ! rate of fractional area loss by ridging ice (1/s) 
    66    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   dardg2dt   ! rate of fractional area gain by new ridges (1/s) 
    67    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   dvirdgdt   ! rate of ice volume ridged (m/s) 
    68    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   opening    ! rate of opening due to divergence/shear (1/s) 
    6960   ! 
    7061   !!---------------------------------------------------------------------- 
     
    8374         &      asum (jpi,jpj)     , athorn(jpi,jpj,0:jpl)                    ,     & 
    8475         &      aksum(jpi,jpj)                                                ,     & 
    85          ! 
    8676         &      hrmin(jpi,jpj,jpl) , hraft(jpi,jpj,jpl) , aridge(jpi,jpj,jpl) ,     & 
    87          &      hrmax(jpi,jpj,jpl) , krdg (jpi,jpj,jpl) , araft (jpi,jpj,jpl) ,     & 
    88          ! 
    89          !* Ridging diagnostic arrays for history files 
    90          &      dardg1dt(jpi,jpj)  , dardg2dt(jpi,jpj)                        ,     &  
    91          &      dvirdgdt(jpi,jpj)  , opening(jpi,jpj)                         , STAT=lim_itd_me_alloc ) 
     77         &      hrmax(jpi,jpj,jpl) , krdg (jpi,jpj,jpl) , araft (jpi,jpj,jpl) , STAT=lim_itd_me_alloc ) 
    9278         ! 
    9379      IF( lim_itd_me_alloc /= 0 )   CALL ctl_warn( 'lim_itd_me_alloc: failed to allocate arrays' ) 
     
    132118      REAL(wp), POINTER, DIMENSION(:,:)   ::   opning          ! rate of opening due to divergence/shear 
    133119      REAL(wp), POINTER, DIMENSION(:,:)   ::   closing_gross   ! rate at which area removed, not counting area of new ridges 
    134       REAL(wp), POINTER, DIMENSION(:,:)   ::   msnow_mlt       ! mass of snow added to ocean (kg m-2) 
    135       REAL(wp), POINTER, DIMENSION(:,:)   ::   esnow_mlt       ! energy needed to melt snow in ocean (J m-2) 
    136       REAL(wp), POINTER, DIMENSION(:,:)   ::   vt_i_init, vt_i_final  !  ice volume summed over categories 
    137120      ! 
    138121      INTEGER, PARAMETER ::   nitermax = 20     
     
    142125      IF( nn_timing == 1 )  CALL timing_start('limitd_me') 
    143126 
    144       CALL wrk_alloc( jpi,jpj, closing_net, divu_adv, opning, closing_gross, msnow_mlt, esnow_mlt, vt_i_init, vt_i_final ) 
     127      CALL wrk_alloc( jpi,jpj, closing_net, divu_adv, opning, closing_gross ) 
    145128 
    146129      IF(ln_ctl) THEN 
     
    154137      IF( ln_limdiahsb ) CALL lim_cons_hsm(0, 'limitd_me', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 
    155138 
    156       CALL lim_var_zapsmall 
    157       CALL lim_var_glo2eqv            ! equivalent variables, requested for rafting 
    158  
    159139      !-----------------------------------------------------------------------------! 
    160140      ! 1) Thickness categories boundaries, ice / o.w. concentrations, init_ons 
     
    164144      CALL lim_itd_me_ridgeprep                                    ! prepare ridging 
    165145      ! 
    166       IF( con_i)   CALL lim_column_sum( jpl, v_i, vt_i_init )      ! conservation check 
    167146 
    168147      DO jj = 1, jpj                                     ! Initialize arrays. 
    169148         DO ji = 1, jpi 
    170             msnow_mlt(ji,jj) = 0._wp 
    171             esnow_mlt(ji,jj) = 0._wp 
    172             dardg1dt (ji,jj) = 0._wp 
    173             dardg2dt (ji,jj) = 0._wp 
    174             dvirdgdt (ji,jj) = 0._wp 
    175             opening  (ji,jj) = 0._wp 
    176149 
    177150            !-----------------------------------------------------------------------------! 
     
    204177            ! If divu_adv < 0, make sure the closing rate is large enough 
    205178            ! to give asum = 1.0 after ridging. 
    206  
    207             divu_adv(ji,jj) = ( kamax - asum(ji,jj) ) * r1_rdtice  ! asum found in ridgeprep 
     179             
     180            divu_adv(ji,jj) = ( 1._wp - asum(ji,jj) ) * r1_rdtice  ! asum found in ridgeprep 
    208181 
    209182            IF( divu_adv(ji,jj) < 0._wp )   closing_net(ji,jj) = MAX( closing_net(ji,jj), -divu_adv(ji,jj) ) 
     
    224197      DO WHILE ( iterate_ridging > 0 .AND. niter < nitermax ) 
    225198 
     199         ! 3.2 closing_gross 
     200         !-----------------------------------------------------------------------------! 
     201         ! Based on the ITD of ridging and ridged ice, convert the net 
     202         !  closing rate to a gross closing rate.   
     203         ! NOTE: 0 < aksum <= 1 
     204         closing_gross(:,:) = closing_net(:,:) / aksum(:,:) 
     205 
     206         ! correction to closing rate and opening if closing rate is excessive 
     207         !--------------------------------------------------------------------- 
     208         ! Reduce the closing rate if more than 100% of the open water  
     209         ! would be removed.  Reduce the opening rate proportionately. 
    226210         DO jj = 1, jpj 
    227211            DO ji = 1, jpi 
    228  
    229                ! 3.2 closing_gross 
    230                !-----------------------------------------------------------------------------! 
    231                ! Based on the ITD of ridging and ridged ice, convert the net 
    232                !  closing rate to a gross closing rate.   
    233                ! NOTE: 0 < aksum <= 1 
    234                closing_gross(ji,jj) = closing_net(ji,jj) / aksum(ji,jj) 
    235  
    236                ! correction to closing rate and opening if closing rate is excessive 
    237                !--------------------------------------------------------------------- 
    238                ! Reduce the closing rate if more than 100% of the open water  
    239                ! would be removed.  Reduce the opening rate proportionately. 
    240                za   = athorn(ji,jj,0) * closing_gross(ji,jj) * rdt_ice 
    241                IF( za > epsi20 ) THEN 
    242                   zfac = MIN( 1._wp, ato_i(ji,jj) / za ) 
    243                   closing_gross(ji,jj) = closing_gross(ji,jj) * zfac 
    244                   opning       (ji,jj) = opning       (ji,jj) * zfac 
     212               za   = ( opning(ji,jj) - athorn(ji,jj,0) * closing_gross(ji,jj) ) * rdt_ice 
     213               IF( za < 0._wp .AND. za > - ato_i(ji,jj) ) THEN  ! would lead to negative ato_i 
     214                  zfac = - ato_i(ji,jj) / za 
     215                  opning(ji,jj) = athorn(ji,jj,0) * closing_gross(ji,jj) - ato_i(ji,jj) * r1_rdtice  
     216               ELSEIF( za > 0._wp .AND. za > ( asum(ji,jj) - ato_i(ji,jj) ) ) THEN  ! would lead to ato_i > asum 
     217                  zfac = ( asum(ji,jj) - ato_i(ji,jj) ) / za 
     218                  opning(ji,jj) = athorn(ji,jj,0) * closing_gross(ji,jj) + ( asum(ji,jj) - ato_i(ji,jj) ) * r1_rdtice  
    245219               ENDIF 
    246  
    247220            END DO 
    248221         END DO 
     
    256229               DO ji = 1, jpi 
    257230                  za = athorn(ji,jj,jl) * closing_gross(ji,jj) * rdt_ice 
    258                   IF( za  >  epsi20 ) THEN 
    259                      zfac = MIN( 1._wp, a_i(ji,jj,jl) / za ) 
     231                  IF( za  >  a_i(ji,jj,jl) ) THEN 
     232                     zfac = a_i(ji,jj,jl) / za 
    260233                     closing_gross(ji,jj) = closing_gross(ji,jj) * zfac 
    261                      opning       (ji,jj) = opning       (ji,jj) * zfac 
    262234                  ENDIF 
    263235               END DO 
     
    268240         !-----------------------------------------------------------------------------! 
    269241 
    270          CALL lim_itd_me_ridgeshift( opning, closing_gross, msnow_mlt, esnow_mlt ) 
    271  
     242         CALL lim_itd_me_ridgeshift( opning, closing_gross ) 
     243 
     244          
    272245         ! 3.4 Compute total area of ice plus open water after ridging. 
    273246         !-----------------------------------------------------------------------------! 
    274247         ! This is in general not equal to one because of divergence during transport 
    275          asum(:,:) = ato_i(:,:) 
    276          DO jl = 1, jpl 
    277             asum(:,:) = asum(:,:) + a_i(:,:,jl) 
    278          END DO 
     248         asum(:,:) = ato_i(:,:) + SUM( a_i, dim=3 ) 
    279249 
    280250         ! 3.5 Do we keep on iterating ??? 
     
    284254 
    285255         iterate_ridging = 0 
    286  
    287256         DO jj = 1, jpj 
    288257            DO ji = 1, jpi 
    289                IF (ABS(asum(ji,jj) - kamax ) < epsi10) THEN 
     258               IF( ABS( asum(ji,jj) - 1._wp ) < epsi10 ) THEN 
    290259                  closing_net(ji,jj) = 0._wp 
    291260                  opning     (ji,jj) = 0._wp 
    292261               ELSE 
    293262                  iterate_ridging    = 1 
    294                   divu_adv   (ji,jj) = ( kamax - asum(ji,jj) ) * r1_rdtice 
     263                  divu_adv   (ji,jj) = ( 1._wp - asum(ji,jj) ) * r1_rdtice 
    295264                  closing_net(ji,jj) = MAX( 0._wp, -divu_adv(ji,jj) ) 
    296265                  opning     (ji,jj) = MAX( 0._wp,  divu_adv(ji,jj) ) 
     
    309278 
    310279         IF( iterate_ridging == 1 ) THEN 
     280            CALL lim_itd_me_ridgeprep 
    311281            IF( niter  >  nitermax ) THEN 
    312282               WRITE(numout,*) ' ALERTE : non-converging ridging scheme ' 
    313283               WRITE(numout,*) ' niter, iterate_ridging ', niter, iterate_ridging 
    314284            ENDIF 
    315             CALL lim_itd_me_ridgeprep 
    316285         ENDIF 
    317286 
    318287      END DO !! on the do while over iter 
    319  
    320       !-----------------------------------------------------------------------------! 
    321       ! 4) Ridging diagnostics 
    322       !-----------------------------------------------------------------------------! 
    323       ! Convert ridging rate diagnostics to correct units. 
    324       ! Update fresh water and heat fluxes due to snow melt. 
    325       DO jj = 1, jpj 
    326          DO ji = 1, jpi 
    327  
    328             dardg1dt(ji,jj) = dardg1dt(ji,jj) * r1_rdtice 
    329             dardg2dt(ji,jj) = dardg2dt(ji,jj) * r1_rdtice 
    330             dvirdgdt(ji,jj) = dvirdgdt(ji,jj) * r1_rdtice 
    331             opening (ji,jj) = opening (ji,jj) * r1_rdtice 
    332  
    333             !-----------------------------------------------------------------------------! 
    334             ! 5) Heat, salt and freshwater fluxes 
    335             !-----------------------------------------------------------------------------! 
    336             wfx_snw(ji,jj) = wfx_snw(ji,jj) + msnow_mlt(ji,jj) * r1_rdtice     ! fresh water source for ocean 
    337             hfx_dyn(ji,jj) = hfx_dyn(ji,jj) + esnow_mlt(ji,jj) * r1_rdtice     ! heat sink for ocean (<0, W.m-2) 
    338  
    339          END DO 
    340       END DO 
    341  
    342       ! Check if there is a ridging error 
    343       IF( lwp ) THEN 
    344          DO jj = 1, jpj 
    345             DO ji = 1, jpi 
    346                IF( ABS( asum(ji,jj) - kamax)  >  epsi10 ) THEN   ! there is a bug 
    347                   WRITE(numout,*) ' ' 
    348                   WRITE(numout,*) ' ALERTE : Ridging error: total area = ', asum(ji,jj) 
    349                   WRITE(numout,*) ' limitd_me ' 
    350                   WRITE(numout,*) ' POINT : ', ji, jj 
    351                   WRITE(numout,*) ' jpl, a_i, athorn ' 
    352                   WRITE(numout,*) 0, ato_i(ji,jj), athorn(ji,jj,0) 
    353                   DO jl = 1, jpl 
    354                      WRITE(numout,*) jl, a_i(ji,jj,jl), athorn(ji,jj,jl) 
    355                   END DO 
    356                ENDIF 
    357             END DO 
    358          END DO 
    359       END IF 
    360  
    361       ! Conservation check 
    362       IF ( con_i ) THEN 
    363          CALL lim_column_sum (jpl,   v_i, vt_i_final) 
    364          fieldid = ' v_i : limitd_me ' 
    365          CALL lim_cons_check (vt_i_init, vt_i_final, 1.0e-6, fieldid)  
    366       ENDIF 
    367288 
    368289      CALL lim_var_agg( 1 )  
     
    377298         CALL prt_ctl_info(' - Cell values : ') 
    378299         CALL prt_ctl_info('   ~~~~~~~~~~~~~ ') 
    379          CALL prt_ctl(tab2d_1=e1e2t, clinfo1=' lim_itd_me  : cell area :') 
     300         CALL prt_ctl(tab2d_1=e1e2t , clinfo1=' lim_itd_me  : cell area :') 
    380301         CALL prt_ctl(tab2d_1=at_i , clinfo1=' lim_itd_me  : at_i      :') 
    381302         CALL prt_ctl(tab2d_1=vt_i , clinfo1=' lim_itd_me  : vt_i      :') 
     
    410331      ENDIF  ! ln_limdyn=.true. 
    411332      ! 
    412       CALL wrk_dealloc( jpi, jpj, closing_net, divu_adv, opning, closing_gross, msnow_mlt, esnow_mlt, vt_i_init, vt_i_final ) 
     333      CALL wrk_dealloc( jpi, jpj, closing_net, divu_adv, opning, closing_gross ) 
    413334      ! 
    414335      IF( nn_timing == 1 )  CALL timing_stop('limitd_me') 
    415336   END SUBROUTINE lim_itd_me 
    416337 
     338   SUBROUTINE lim_itd_me_ridgeprep 
     339      !!---------------------------------------------------------------------! 
     340      !!                ***  ROUTINE lim_itd_me_ridgeprep *** 
     341      !! 
     342      !! ** Purpose :   preparation for ridging and strength calculations 
     343      !! 
     344      !! ** Method  :   Compute the thickness distribution of the ice and open water  
     345      !!              participating in ridging and of the resulting ridges. 
     346      !!---------------------------------------------------------------------! 
     347      INTEGER ::   ji,jj, jl    ! dummy loop indices 
     348      REAL(wp) ::   Gstari, astari, hrmean, zdummy   ! local scalar 
     349      REAL(wp), POINTER, DIMENSION(:,:,:) ::   Gsum      ! Gsum(n) = sum of areas in categories 0 to n 
     350      !------------------------------------------------------------------------------! 
     351 
     352      CALL wrk_alloc( jpi,jpj,jpl+2, Gsum, kkstart = -1 ) 
     353 
     354      Gstari     = 1.0/rn_gstar     
     355      astari     = 1.0/rn_astar     
     356      aksum(:,:)    = 0.0 
     357      athorn(:,:,:) = 0.0 
     358      aridge(:,:,:) = 0.0 
     359      araft (:,:,:) = 0.0 
     360 
     361      ! Zero out categories with very small areas 
     362      CALL lim_var_zapsmall 
     363 
     364      ! Ice thickness needed for rafting 
     365      DO jl = 1, jpl 
     366         DO jj = 1, jpj 
     367            DO ji = 1, jpi 
     368               rswitch = MAX( 0._wp , SIGN( 1._wp, a_i(ji,jj,jl) - epsi20 ) ) 
     369               ht_i(ji,jj,jl) = v_i (ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi20 ) * rswitch 
     370            END DO 
     371         END DO 
     372      END DO 
     373 
     374      !------------------------------------------------------------------------------! 
     375      ! 1) Participation function  
     376      !------------------------------------------------------------------------------! 
     377 
     378      ! Compute total area of ice plus open water. 
     379      ! This is in general not equal to one because of divergence during transport 
     380      asum(:,:) = ato_i(:,:) + SUM( a_i, dim=3 ) 
     381 
     382      ! Compute cumulative thickness distribution function 
     383      ! Compute the cumulative thickness distribution function Gsum, 
     384      ! where Gsum(n) is the fractional area in categories 0 to n. 
     385      ! initial value (in h = 0) equals open water area 
     386      Gsum(:,:,-1) = 0._wp 
     387      Gsum(:,:,0 ) = ato_i(:,:) 
     388      ! for each value of h, you have to add ice concentration then 
     389      DO jl = 1, jpl 
     390         Gsum(:,:,jl) = Gsum(:,:,jl-1) + a_i(:,:,jl) 
     391      END DO 
     392 
     393      ! Normalize the cumulative distribution to 1 
     394      DO jl = 0, jpl 
     395         Gsum(:,:,jl) = Gsum(:,:,jl) / asum(:,:) 
     396      END DO 
     397 
     398      ! 1.3 Compute participation function a(h) = b(h).g(h) (athorn) 
     399      !-------------------------------------------------------------------------------------------------- 
     400      ! Compute the participation function athorn; this is analogous to 
     401      ! a(h) = b(h)g(h) as defined in Thorndike et al. (1975). 
     402      ! area lost from category n due to ridging/closing 
     403      ! athorn(n)   = total area lost due to ridging/closing 
     404      ! assume b(h) = (2/Gstar) * (1 - G(h)/Gstar).  
     405      ! 
     406      ! The expressions for athorn are found by integrating b(h)g(h) between 
     407      ! the category boundaries. 
     408      ! athorn is always >= 0 and SUM(athorn(0:jpl))=1 
     409      !----------------------------------------------------------------- 
     410 
     411      IF( nn_partfun == 0 ) THEN       !--- Linear formulation (Thorndike et al., 1975) 
     412         DO jl = 0, jpl     
     413            DO jj = 1, jpj  
     414               DO ji = 1, jpi 
     415                  IF    ( Gsum(ji,jj,jl)   < rn_gstar ) THEN 
     416                     athorn(ji,jj,jl) = Gstari * ( Gsum(ji,jj,jl) - Gsum(ji,jj,jl-1) ) * & 
     417                        &                        ( 2._wp - ( Gsum(ji,jj,jl-1) + Gsum(ji,jj,jl) ) * Gstari ) 
     418                  ELSEIF( Gsum(ji,jj,jl-1) < rn_gstar ) THEN 
     419                     athorn(ji,jj,jl) = Gstari * ( rn_gstar       - Gsum(ji,jj,jl-1) ) *  & 
     420                        &                        ( 2._wp - ( Gsum(ji,jj,jl-1) + rn_gstar       ) * Gstari ) 
     421                  ELSE 
     422                     athorn(ji,jj,jl) = 0._wp 
     423                  ENDIF 
     424               END DO 
     425            END DO 
     426         END DO 
     427 
     428      ELSE                             !--- Exponential, more stable formulation (Lipscomb et al, 2007) 
     429         !                         
     430         zdummy = 1._wp / ( 1._wp - EXP(-astari) )        ! precompute exponential terms using Gsum as a work array 
     431         DO jl = -1, jpl 
     432            Gsum(:,:,jl) = EXP( -Gsum(:,:,jl) * astari ) * zdummy 
     433         END DO 
     434         DO jl = 0, jpl 
     435             athorn(:,:,jl) = Gsum(:,:,jl-1) - Gsum(:,:,jl) 
     436         END DO 
     437         ! 
     438      ENDIF 
     439 
     440      IF( ln_rafting ) THEN      ! Ridging and rafting ice participation functions 
     441         ! 
     442         DO jl = 1, jpl 
     443            DO jj = 1, jpj  
     444               DO ji = 1, jpi 
     445                  zdummy           = TANH ( rn_craft * ( ht_i(ji,jj,jl) - rn_hraft ) ) 
     446                  aridge(ji,jj,jl) = ( 1._wp + zdummy ) * 0.5_wp * athorn(ji,jj,jl) 
     447                  araft (ji,jj,jl) = ( 1._wp - zdummy ) * 0.5_wp * athorn(ji,jj,jl) 
     448               END DO 
     449            END DO 
     450         END DO 
     451 
     452      ELSE 
     453         ! 
     454         DO jl = 1, jpl 
     455            aridge(:,:,jl) = athorn(:,:,jl) 
     456         END DO 
     457         ! 
     458      ENDIF 
     459 
     460      !----------------------------------------------------------------- 
     461      ! 2) Transfer function 
     462      !----------------------------------------------------------------- 
     463      ! Compute max and min ridged ice thickness for each ridging category. 
     464      ! Assume ridged ice is uniformly distributed between hrmin and hrmax. 
     465      !  
     466      ! This parameterization is a modified version of Hibler (1980). 
     467      ! The mean ridging thickness, hrmean, is proportional to hi^(0.5) 
     468      !  and for very thick ridging ice must be >= krdgmin*hi 
     469      ! 
     470      ! The minimum ridging thickness, hrmin, is equal to 2*hi  
     471      !  (i.e., rafting) and for very thick ridging ice is 
     472      !  constrained by hrmin <= (hrmean + hi)/2. 
     473      !  
     474      ! The maximum ridging thickness, hrmax, is determined by 
     475      !  hrmean and hrmin. 
     476      ! 
     477      ! These modifications have the effect of reducing the ice strength 
     478      ! (relative to the Hibler formulation) when very thick ice is 
     479      ! ridging. 
     480      ! 
     481      ! aksum = net area removed/ total area removed 
     482      ! where total area removed = area of ice that ridges 
     483      !         net area removed = total area removed - area of new ridges 
     484      !----------------------------------------------------------------- 
     485 
     486      aksum(:,:) = athorn(:,:,0) 
     487      ! Transfer function 
     488      DO jl = 1, jpl !all categories have a specific transfer function 
     489         DO jj = 1, jpj 
     490            DO ji = 1, jpi 
     491                
     492               IF( athorn(ji,jj,jl) > 0._wp ) THEN 
     493                  hrmean          = MAX( SQRT( rn_hstar * ht_i(ji,jj,jl) ), ht_i(ji,jj,jl) * krdgmin ) 
     494                  hrmin(ji,jj,jl) = MIN( 2._wp * ht_i(ji,jj,jl), 0.5_wp * ( hrmean + ht_i(ji,jj,jl) ) ) 
     495                  hrmax(ji,jj,jl) = 2._wp * hrmean - hrmin(ji,jj,jl) 
     496                  hraft(ji,jj,jl) = ht_i(ji,jj,jl) / kraft 
     497                  krdg(ji,jj,jl)  = ht_i(ji,jj,jl) / MAX( hrmean, epsi20 ) 
     498 
     499                  ! Normalization factor : aksum, ensures mass conservation 
     500                  aksum(ji,jj) = aksum(ji,jj) + aridge(ji,jj,jl) * ( 1._wp - krdg(ji,jj,jl) )    & 
     501                     &                        + araft (ji,jj,jl) * ( 1._wp - kraft          ) 
     502 
     503               ELSE 
     504                  hrmin(ji,jj,jl)  = 0._wp  
     505                  hrmax(ji,jj,jl)  = 0._wp  
     506                  hraft(ji,jj,jl)  = 0._wp  
     507                  krdg (ji,jj,jl)  = 1._wp 
     508               ENDIF 
     509 
     510            END DO 
     511         END DO 
     512      END DO 
     513      ! 
     514      CALL wrk_dealloc( jpi,jpj,jpl+2, Gsum, kkstart = -1 ) 
     515      ! 
     516   END SUBROUTINE lim_itd_me_ridgeprep 
     517 
     518 
     519   SUBROUTINE lim_itd_me_ridgeshift( opning, closing_gross ) 
     520      !!---------------------------------------------------------------------- 
     521      !!                ***  ROUTINE lim_itd_me_icestrength *** 
     522      !! 
     523      !! ** Purpose :   shift ridging ice among thickness categories of ice thickness 
     524      !! 
     525      !! ** Method  :   Remove area, volume, and energy from each ridging category 
     526      !!              and add to thicker ice categories. 
     527      !!---------------------------------------------------------------------- 
     528      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) ::   opning         ! rate of opening due to divergence/shear 
     529      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) ::   closing_gross  ! rate at which area removed, excluding area of new ridges 
     530      ! 
     531      CHARACTER (len=80) ::   fieldid   ! field identifier 
     532      ! 
     533      INTEGER ::   ji, jj, jl, jl1, jl2, jk   ! dummy loop indices 
     534      INTEGER ::   ij                ! horizontal index, combines i and j loops 
     535      INTEGER ::   icells            ! number of cells with a_i > puny 
     536      REAL(wp) ::   hL, hR, farea    ! left and right limits of integration 
     537 
     538      INTEGER , POINTER, DIMENSION(:) ::   indxi, indxj   ! compressed indices 
     539      REAL(wp), POINTER, DIMENSION(:) ::   zswitch, fvol   ! new ridge volume going to n2 
     540 
     541      REAL(wp), POINTER, DIMENSION(:) ::   afrac            ! fraction of category area ridged  
     542      REAL(wp), POINTER, DIMENSION(:) ::   ardg1 , ardg2    ! area of ice ridged & new ridges 
     543      REAL(wp), POINTER, DIMENSION(:) ::   vsrdg , esrdg    ! snow volume & energy of ridging ice 
     544      REAL(wp), POINTER, DIMENSION(:) ::   dhr   , dhr2     ! hrmax - hrmin  &  hrmax^2 - hrmin^2 
     545 
     546      REAL(wp), POINTER, DIMENSION(:) ::   vrdg1   ! volume of ice ridged 
     547      REAL(wp), POINTER, DIMENSION(:) ::   vrdg2   ! volume of new ridges 
     548      REAL(wp), POINTER, DIMENSION(:) ::   vsw     ! volume of seawater trapped into ridges 
     549      REAL(wp), POINTER, DIMENSION(:) ::   srdg1   ! sal*volume of ice ridged 
     550      REAL(wp), POINTER, DIMENSION(:) ::   srdg2   ! sal*volume of new ridges 
     551      REAL(wp), POINTER, DIMENSION(:) ::   smsw    ! sal*volume of water trapped into ridges 
     552      REAL(wp), POINTER, DIMENSION(:) ::   oirdg1, oirdg2   ! ice age of ice ridged 
     553 
     554      REAL(wp), POINTER, DIMENSION(:) ::   afrft            ! fraction of category area rafted 
     555      REAL(wp), POINTER, DIMENSION(:) ::   arft1 , arft2    ! area of ice rafted and new rafted zone 
     556      REAL(wp), POINTER, DIMENSION(:) ::   virft , vsrft    ! ice & snow volume of rafting ice 
     557      REAL(wp), POINTER, DIMENSION(:) ::   esrft , smrft    ! snow energy & salinity of rafting ice 
     558      REAL(wp), POINTER, DIMENSION(:) ::   oirft1, oirft2   ! ice age of ice rafted 
     559 
     560      REAL(wp), POINTER, DIMENSION(:,:) ::   eirft      ! ice energy of rafting ice 
     561      REAL(wp), POINTER, DIMENSION(:,:) ::   erdg1      ! enth*volume of ice ridged 
     562      REAL(wp), POINTER, DIMENSION(:,:) ::   erdg2      ! enth*volume of new ridges 
     563      REAL(wp), POINTER, DIMENSION(:,:) ::   ersw       ! enth of water trapped into ridges 
     564      !!---------------------------------------------------------------------- 
     565 
     566      CALL wrk_alloc( jpij,        indxi, indxj ) 
     567      CALL wrk_alloc( jpij,        zswitch, fvol ) 
     568      CALL wrk_alloc( jpij,        afrac, ardg1, ardg2, vsrdg, esrdg, dhr, dhr2 ) 
     569      CALL wrk_alloc( jpij,        vrdg1, vrdg2, vsw  , srdg1, srdg2, smsw, oirdg1, oirdg2 ) 
     570      CALL wrk_alloc( jpij,        afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 ) 
     571      CALL wrk_alloc( jpij,nlay_i, eirft, erdg1, erdg2, ersw ) 
     572 
     573      !------------------------------------------------------------------------------- 
     574      ! 1) Compute change in open water area due to closing and opening. 
     575      !------------------------------------------------------------------------------- 
     576      DO jj = 1, jpj 
     577         DO ji = 1, jpi 
     578            ato_i(ji,jj) = MAX( 0._wp, ato_i(ji,jj) +  & 
     579               &                     ( opning(ji,jj) - athorn(ji,jj,0) * closing_gross(ji,jj) ) * rdt_ice ) 
     580         END DO 
     581      END DO 
     582 
     583      !----------------------------------------------------------------- 
     584      ! 3) Pump everything from ice which is being ridged / rafted 
     585      !----------------------------------------------------------------- 
     586      ! Compute the area, volume, and energy of ice ridging in each 
     587      ! category, along with the area of the resulting ridge. 
     588 
     589      DO jl1 = 1, jpl !jl1 describes the ridging category 
     590 
     591         !------------------------------------------------ 
     592         ! 3.1) Identify grid cells with nonzero ridging 
     593         !------------------------------------------------ 
     594         icells = 0 
     595         DO jj = 1, jpj 
     596            DO ji = 1, jpi 
     597               IF( athorn(ji,jj,jl1) > 0._wp .AND. closing_gross(ji,jj) > 0._wp ) THEN 
     598                  icells = icells + 1 
     599                  indxi(icells) = ji 
     600                  indxj(icells) = jj 
     601               ENDIF 
     602            END DO 
     603         END DO 
     604 
     605         DO ij = 1, icells 
     606            ji = indxi(ij) ; jj = indxj(ij) 
     607 
     608            !-------------------------------------------------------------------- 
     609            ! 3.2) Compute area of ridging ice (ardg1) and of new ridge (ardg2) 
     610            !-------------------------------------------------------------------- 
     611            ardg1(ij) = aridge(ji,jj,jl1) * closing_gross(ji,jj) * rdt_ice 
     612            arft1(ij) = araft (ji,jj,jl1) * closing_gross(ji,jj) * rdt_ice 
     613 
     614            !--------------------------------------------------------------- 
     615            ! 3.3) Compute ridging /rafting fractions, make sure afrac <=1  
     616            !--------------------------------------------------------------- 
     617            afrac(ij) = ardg1(ij) / a_i(ji,jj,jl1) !ridging 
     618            afrft(ij) = arft1(ij) / a_i(ji,jj,jl1) !rafting 
     619            ardg2(ij) = ardg1(ij) * krdg(ji,jj,jl1) 
     620            arft2(ij) = arft1(ij) * kraft 
     621 
     622            !-------------------------------------------------------------------------- 
     623            ! 3.4) Subtract area, volume, and energy from ridging  
     624            !     / rafting category n1. 
     625            !-------------------------------------------------------------------------- 
     626            vrdg1(ij) = v_i(ji,jj,jl1) * afrac(ij) 
     627            vrdg2(ij) = vrdg1(ij) * ( 1. + rn_por_rdg ) 
     628            vsw  (ij) = vrdg1(ij) * rn_por_rdg 
     629 
     630            vsrdg (ij) = v_s  (ji,jj,  jl1) * afrac(ij) 
     631            esrdg (ij) = e_s  (ji,jj,1,jl1) * afrac(ij) 
     632            srdg1 (ij) = smv_i(ji,jj,  jl1) * afrac(ij) 
     633            oirdg1(ij) = oa_i (ji,jj,  jl1) * afrac(ij) 
     634            oirdg2(ij) = oa_i (ji,jj,  jl1) * afrac(ij) * krdg(ji,jj,jl1)  
     635 
     636            ! rafting volumes, heat contents ... 
     637            virft (ij) = v_i  (ji,jj,  jl1) * afrft(ij) 
     638            vsrft (ij) = v_s  (ji,jj,  jl1) * afrft(ij) 
     639            esrft (ij) = e_s  (ji,jj,1,jl1) * afrft(ij) 
     640            smrft (ij) = smv_i(ji,jj,  jl1) * afrft(ij)  
     641            oirft1(ij) = oa_i (ji,jj,  jl1) * afrft(ij)  
     642            oirft2(ij) = oa_i (ji,jj,  jl1) * afrft(ij) * kraft  
     643 
     644            !----------------------------------------------------------------- 
     645            ! 3.5) Compute properties of new ridges 
     646            !----------------------------------------------------------------- 
     647            smsw(ij)  = vsw(ij) * sss_m(ji,jj)                   ! salt content of seawater frozen in voids 
     648            srdg2(ij) = srdg1(ij) + smsw(ij)                     ! salt content of new ridge 
     649             
     650            sfx_dyn(ji,jj) = sfx_dyn(ji,jj) - smsw(ij) * rhoic * r1_rdtice 
     651            wfx_dyn(ji,jj) = wfx_dyn(ji,jj) - vsw (ij) * rhoic * r1_rdtice   ! increase in ice volume due to seawater frozen in voids 
     652 
     653            ! virtual salt flux to keep salinity constant 
     654            IF( nn_icesal == 1 .OR. nn_icesal == 3 )  THEN 
     655               srdg2(ij)      = srdg2(ij) - vsw(ij) * ( sss_m(ji,jj) - sm_i(ji,jj,jl1) )           ! ridge salinity = sm_i 
     656               sfx_bri(ji,jj) = sfx_bri(ji,jj) + sss_m(ji,jj)    * vsw(ij) * rhoic * r1_rdtice  &  ! put back sss_m into the ocean 
     657                  &                            - sm_i(ji,jj,jl1) * vsw(ij) * rhoic * r1_rdtice     ! and get  sm_i  from the ocean  
     658            ENDIF 
     659             
     660            !------------------------------------------             
     661            ! 3.7 Put the snow somewhere in the ocean 
     662            !------------------------------------------             
     663            !  Place part of the snow lost by ridging into the ocean.  
     664            !  Note that esrdg > 0; the ocean must cool to melt snow. 
     665            !  If the ocean temp = Tf already, new ice must grow. 
     666            !  During the next time step, thermo_rates will determine whether 
     667            !  the ocean cools or new ice grows. 
     668            wfx_snw(ji,jj) = wfx_snw(ji,jj) + ( rhosn * vsrdg(ij) * ( 1._wp - rn_fsnowrdg )   &  
     669               &                              + rhosn * vsrft(ij) * ( 1._wp - rn_fsnowrft ) ) * r1_rdtice  ! fresh water source for ocean 
     670 
     671            hfx_dyn(ji,jj) = hfx_dyn(ji,jj) + ( - esrdg(ij) * ( 1._wp - rn_fsnowrdg )         &  
     672               &                                - esrft(ij) * ( 1._wp - rn_fsnowrft ) ) * r1_rdtice        ! heat sink for ocean (<0, W.m-2) 
     673 
     674            !----------------------------------------------------------------- 
     675            ! 3.8 Compute quantities used to apportion ice among categories 
     676            ! in