Changeset 11799 for NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc
- Timestamp:
- 2019-10-25T16:27:34+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc
- Files:
-
- 29 deleted
- 72 edited
- 41 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc
-
Property
svn:externals
set to
^/utils/badges badges
^/utils/logos logos
-
Property
svn:externals
set to
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex
- Property svn:ignore deleted
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/.svnignore
r11187 r11799 8 8 *.ilg 9 9 *.ind 10 *.lof 11 *.log 12 *.lot 10 *.lo* 13 11 *.maf 14 12 *.mtc* … … 16 14 *.pdf 17 15 *.toc 16 *.xdv 18 17 _minted-* -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO
-
Property
svn:externals
set to
^/utils/figures/NEMO figures
-
Property
svn:externals
set to
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/build
- Property svn:ignore
-
old new 14 14 *.pdf 15 15 *.toc 16 *.xdv 16 17 _minted-*
-
- Property svn:ignore
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/main/appendices.tex
r11330 r11799 1 1 2 \subfile{../subfiles/a nnex_A} %%Generalised vertical coordinate3 \subfile{../subfiles/a nnex_B} %% Diffusive operator4 \subfile{../subfiles/a nnex_C} %%Discrete invariants of the eqs.5 \subfile{../subfiles/a nnex_iso} %%Isoneutral diffusion using triads6 \subfile{../subfiles/a nnex_DOMAINcfg} %%Brief notes on DOMAINcfg2 \subfile{../subfiles/apdx_s_coord} %% A. Generalised vertical coordinate 3 \subfile{../subfiles/apdx_diff_opers} %% B. Diffusive operators 4 \subfile{../subfiles/apdx_invariants} %% C. Discrete invariants of the eqs. 5 \subfile{../subfiles/apdx_triads} %% D. Isoneutral diffusion using triads 6 \subfile{../subfiles/apdx_DOMAINcfg} %% E. Brief notes on DOMAINcfg 7 7 8 8 %% Not included … … 10 10 %\subfile{../subfiles/chap_DIU} 11 11 %\subfile{../subfiles/chap_conservation} 12 %\subfile{../subfiles/annex_E} %% Notes on some on going staff 13 12 %\subfile{../subfiles/apdx_algos} %% Notes on some on going staff -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/main/bibliography.bib
r11336 r11799 1614 1614 } 1615 1615 1616 @article{ kraus.turner_tellus67, 1617 author = {Kraus, E.B. and Turner, J.}, 1618 journal = {Tellus}, 1619 pages = {98--106}, 1620 title = {A one dimensional model of the seasonal thermocline {II}. {T}he general theory and its consequences}, 1621 volume = {19}, 1622 year = {1967} 1623 } 1624 1625 @article{ large.ea_RG97, 1626 author = "Large, W. G. and McWilliams, J. C. and Doney, S. C.", 1627 doi = "10.1029/94RG01872", 1628 journal = "Reviews of Geophysics", 1629 number = {4}, 1630 pages = {363--403}, 1631 publisher = {AGU}, 1632 title = "Oceanic vertical mixing: {A} review and a model with a nonlocal boundary layer parameterization", 1633 year = "1994" 1634 } 1635 1616 1636 @techreport{ large.yeager_rpt04, 1617 1637 title = "Diurnal to decadal global forcing for ocean and sea-ice … … 2184 2204 } 2185 2205 2206 @article{mcwilliams.ea_JFM97, 2207 author = {McWilliams, James C. and Sullivan, Peter P. and Moeng, Chin-Hoh}, 2208 doi = {10.1017/S0022112096004375}, 2209 journal = {Journal of Fluid Mechanics}, 2210 pages = {1--30}, 2211 title = {Langmuir turbulence in the ocean}, 2212 volume = {334}, 2213 year = {1997}, 2214 } 2186 2215 @article{ mellor.blumberg_JPO04, 2187 2216 title = "Wave Breaking and Ocean Surface Layer Thermal Response", -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/main/chapters.tex
r11170 r11799 1 \subfile{../subfiles/introduction} %% Introduction 2 \subfile{../subfiles/chap_model_basics} 3 \subfile{../subfiles/chap_time_domain} %% Time discretisation (time stepping strategy) 4 \subfile{../subfiles/chap_DOM} %% Space discretisation 5 \subfile{../subfiles/chap_TRA} %% Tracer advection/diffusion equation 6 \subfile{../subfiles/chap_DYN} %% Dynamics : momentum equation 7 \subfile{../subfiles/chap_SBC} %% Surface Boundary Conditions 8 \subfile{../subfiles/chap_LBC} %% Lateral Boundary Conditions 9 \subfile{../subfiles/chap_LDF} %% Lateral diffusion 10 \subfile{../subfiles/chap_ZDF} %% Vertical diffusion 11 \subfile{../subfiles/chap_DIA} %% Outputs and Diagnostics 12 \subfile{../subfiles/chap_OBS} %% Observation operator 13 \subfile{../subfiles/chap_ASM} %% Assimilation increments 14 \subfile{../subfiles/chap_STO} %% Stochastic param. 15 \subfile{../subfiles/chap_misc} %% Miscellaneous topics 16 \subfile{../subfiles/chap_CONFIG} %% Predefined configurations 1 \subfile{../subfiles/chap_model_basics} %% 1. 2 \subfile{../subfiles/chap_time_domain} %% 2. Time discretisation (time stepping strategy) 3 \subfile{../subfiles/chap_DOM} %% 3. Space discretisation 4 \subfile{../subfiles/chap_TRA} %% 4. Tracer advection/diffusion equation 5 \subfile{../subfiles/chap_DYN} %% 5. Dynamics : momentum equation 6 \subfile{../subfiles/chap_SBC} %% 6. Surface Boundary Conditions 7 \subfile{../subfiles/chap_LBC} %% 7. Lateral Boundary Conditions 8 \subfile{../subfiles/chap_LDF} %% 8. Lateral diffusion 9 \subfile{../subfiles/chap_ZDF} %% 9. Vertical diffusion 10 \subfile{../subfiles/chap_DIA} %% 10. Outputs and Diagnostics 11 \subfile{../subfiles/chap_OBS} %% 11. Observation operator 12 \subfile{../subfiles/chap_ASM} %% 12. Assimilation increments 13 \subfile{../subfiles/chap_STO} %% 13. Stochastic param. 14 \subfile{../subfiles/chap_misc} %% 14. Miscellaneous topics 15 \subfile{../subfiles/chap_cfgs} %% 15. Predefined configurations 16 17 %% Not included 18 %\subfile{../subfiles/chap_model_basics_zstar} 19 %\subfile{../subfiles/chap_DIU} 20 %\subfile{../subfiles/chap_conservation} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles
- Property svn:ignore
-
old new 1 *.aux 2 *.bbl 3 *.blg 4 *.dvi 5 *.fdb* 6 *.fls 7 *.idx 1 *.ind 8 2 *.ilg 9 *.ind10 *.log11 *.maf12 *.mtc*13 *.out14 *.pdf15 *.toc16 _minted-*
-
- Property svn:ignore
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_ASM.tex
r11435 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter Assimilation increments (ASM) 6 % ================================================================ 4 7 5 \chapter{Apply Assimilation Increments (ASM)} 8 6 \label{chap:ASM} 9 7 8 % {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates} \\ 9 % {\em 3.4} & {\em D. J. Lea, M. Martin, K. Mogensen, A. Weaver} & {\em Initial version} \\ 10 11 \thispagestyle{plain} 12 10 13 \chaptertoc 11 14 12 \vfill 13 \begin{figure}[b] 14 \subsubsection*{Changes record} 15 \begin{tabular}{l||l|m{0.65\linewidth}} 16 Release & Author & Modifications \\ 17 {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates} \\ 18 {\em 3.4} & {\em D. J. Lea, M. Martin, K. Mogensen, A. Weaver} & {\em Initial version} \\ 19 \end{tabular} 20 \end{figure} 15 \paragraph{Changes record} ~\\ 21 16 22 \newpage 17 {\footnotesize 18 \begin{tabularx}{\textwidth}{l||X|X} 19 Release & Author(s) & Modifications \\ 20 \hline 21 {\em 4.0} & {\em ...} & {\em ...} \\ 22 {\em 3.6} & {\em ...} & {\em ...} \\ 23 {\em 3.4} & {\em ...} & {\em ...} \\ 24 {\em <=3.4} & {\em ...} & {\em ...} 25 \end{tabularx} 26 } 27 28 \clearpage 23 29 24 30 The ASM code adds the functionality to apply increments to the model variables: temperature, salinity, … … 26 32 These are read into the model from a NetCDF file which may be produced by separate data assimilation code. 27 33 The code can also output model background fields which are used as an input to data assimilation code. 28 This is all controlled by the namelist \nam{ \_asminc}.34 This is all controlled by the namelist \nam{_asminc}{\_asminc}. 29 35 There is a brief description of all the namelist options provided. 30 36 To build the ASM code \key{asminc} must be set. 31 37 32 %=============================================================== 33 38 %% ================================================================================================= 34 39 \section{Direct initialization} 35 40 \label{sec:ASM_DI} … … 37 42 Direct initialization (DI) refers to the instantaneous correction of the model background state using 38 43 the analysis increment. 39 DI is used when \np{ln \_asmdin} is set to true.44 DI is used when \np{ln_asmdin}{ln\_asmdin} is set to true. 40 45 46 %% ================================================================================================= 41 47 \section{Incremental analysis updates} 42 48 \label{sec:ASM_IAU} … … 47 53 This technique is referred to as Incremental Analysis Updates (IAU) \citep{bloom.takacs.ea_MWR96}. 48 54 IAU is a common technique used with 3D assimilation methods such as 3D-Var or OI. 49 IAU is used when \np{ln \_asmiau} is set to true.55 IAU is used when \np{ln_asmiau}{ln\_asmiau} is set to true. 50 56 51 57 With IAU, the model state trajectory ${\mathbf x}$ in the assimilation window ($t_{0} \leq t_{i} \leq t_{N}$) … … 53 59 additional tendency terms to the prognostic equations: 54 60 \begin{align*} 55 % \label{eq: wa_traj_iau}61 % \label{eq:ASM_wa_traj_iau} 56 62 {\mathbf x}^{a}(t_{i}) = M(t_{i}, t_{0})[{\mathbf x}^{b}(t_{0})] \; + \; F_{i} \delta \tilde{\mathbf x}^{a} 57 63 \end{align*} … … 64 70 Typically the increments are spread evenly over the full window. 65 71 In addition, two different weighting functions have been implemented. 66 The first function (namelist option \np{niaufn} =0) employs constant weights,72 The first function (namelist option \np{niaufn}{niaufn}=0) employs constant weights, 67 73 \begin{align} 68 \label{eq: F1_i}74 \label{eq:ASM_F1_i} 69 75 F^{(1)}_{i} 70 76 =\left\{ … … 77 83 \end{align} 78 84 where $M = m-n$. 79 The second function (namelist option \np{niaufn} =1) employs peaked hat-like weights in order to give maximum weight in the centre of the sub-window,85 The second function (namelist option \np{niaufn}{niaufn}=1) employs peaked hat-like weights in order to give maximum weight in the centre of the sub-window, 80 86 with the weighting reduced linearly to a small value at the window end-points: 81 87 \begin{align} 82 \label{eq: F2_i}88 \label{eq:ASM_F2_i} 83 89 F^{(2)}_{i} 84 90 =\left\{ … … 92 98 \end{align} 93 99 where $\alpha^{-1} = \sum_{i=1}^{M/2} 2i$ and $M$ is assumed to be even. 94 The weights described by \autoref{eq: F2_i} provide a smoother transition of the analysis trajectory from95 one assimilation cycle to the next than that described by \autoref{eq: F1_i}.100 The weights described by \autoref{eq:ASM_F2_i} provide a smoother transition of the analysis trajectory from 101 one assimilation cycle to the next than that described by \autoref{eq:ASM_F1_i}. 96 102 97 %========================================================================== 98 % Divergence damping description %%% 103 %% ================================================================================================= 99 104 \section{Divergence damping initialisation} 100 105 \label{sec:ASM_div_dmp} … … 106 111 107 112 \begin{equation} 108 \label{eq: asm_dmp}113 \label{eq:ASM_dmp} 109 114 \left\{ 110 115 \begin{aligned} … … 120 125 121 126 \[ 122 % \label{eq: asm_div}127 % \label{eq:ASM_div} 123 128 \chi^{n-1}_I = \frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 124 129 \left( {\delta_i \left[ {e_{2u}\,e_{3u}\,u^{n-1}_I} \right] … … 126 131 \] 127 132 128 By the application of \autoref{eq: asm_dmp} the divergence is filtered in each iteration,133 By the application of \autoref{eq:ASM_dmp} the divergence is filtered in each iteration, 129 134 and the vorticity is left unchanged. 130 135 In the presence of coastal boundaries with zero velocity increments perpendicular to the coast … … 134 139 \citep{talagrand_JAS72, dobricic.pinardi.ea_OS07}. 135 140 Diffusion coefficients are defined as $A_D = \alpha e_{1t} e_{2t}$, where $\alpha = 0.2$. 136 The divergence damping is activated by assigning to \np{nn \_divdmp} in the \nam{\_asminc} namelist141 The divergence damping is activated by assigning to \np{nn_divdmp}{nn\_divdmp} in the \nam{_asminc}{\_asminc} namelist 137 142 a value greater than zero. 138 143 This specifies the number of iterations of the divergence damping. Setting a value of the order of 100 will result in a significant reduction in the vertical velocity induced by the increments. 139 144 140 141 %========================================================================== 142 145 %% ================================================================================================= 143 146 \section{Implementation details} 144 147 \label{sec:ASM_details} 145 148 146 Here we show an example \nam{ \_asminc} namelist and the header of an example assimilation increments file on149 Here we show an example \nam{_asminc}{\_asminc} namelist and the header of an example assimilation increments file on 147 150 the ORCA2 grid. 148 151 149 %------------------------------------------nam_asminc----------------------------------------------------- 150 % 151 \nlst{nam_asminc} 152 %------------------------------------------------------------------------------------------------------------- 152 \begin{listing} 153 \nlst{nam_asminc} 154 \caption{\forcode{&nam_asminc}} 155 \label{lst:nam_asminc} 156 \end{listing} 153 157 154 158 The header of an assimilation increments file produced using the NetCDF tool … … 190 194 \end{clines} 191 195 192 \biblio 193 194 \pindex 196 \onlyinsubfile{\input{../../global/epilogue}} 195 197 196 198 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_DIA.tex
r11435 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter I/O & Diagnostics 6 % ================================================================ 4 7 5 \chapter{Output and Diagnostics (IOM, DIA, TRD, FLO)} 8 6 \label{chap:DIA} 9 7 8 % {\em 4.0} & {\em Mirek Andrejczuk, Massimiliano Drudi} & {\em } \\ 9 % {\em } & {\em Dorotea Iovino, Nicolas Martin} & {\em } \\ 10 % {\em 3.6} & {\em Gurvan Madec, Sebastien Masson } & {\em } \\ 11 % {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em } \\ 12 % {\em } & {\em Christian Ethe, Sebastien Masson } & {\em } \\ 13 14 \thispagestyle{plain} 15 10 16 \chaptertoc 11 17 12 \vfill 13 \begin{figure}[b] 14 \subsubsection*{Changes record} 15 \begin{tabular}{l||l|m{0.65\linewidth}} 16 Release & Author & Modifications \\ 17 {\em 4.0} & {\em Mirek Andrejczuk, Massimiliano Drudi} & {\em } \\ 18 {\em } & {\em Dorotea Iovino, Nicolas Martin} & {\em } \\ 19 {\em 3.6} & {\em Gurvan Madec, Sebastien Masson } & {\em } \\ 20 {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em } \\ 21 {\em } & {\em Christian Ethe, Sebastien Masson } & {\em } \\ 22 \end{tabular} 23 \end{figure} 24 25 \newpage 26 27 % ================================================================ 28 % Old Model Output 29 % ================================================================ 18 \paragraph{Changes record} ~\\ 19 20 {\footnotesize 21 \begin{tabularx}{\textwidth}{l||X|X} 22 Release & Author(s) & Modifications \\ 23 \hline 24 {\em 4.0} & {\em ...} & {\em ...} \\ 25 {\em 3.6} & {\em ...} & {\em ...} \\ 26 {\em 3.4} & {\em ...} & {\em ...} \\ 27 {\em <=3.4} & {\em ...} & {\em ...} 28 \end{tabularx} 29 } 30 31 \clearpage 32 33 %% ================================================================================================= 30 34 \section{Model output} 31 35 \label{sec:DIA_io_old} … … 53 57 %\gmcomment{ % start of gmcomment 54 58 55 % ================================================================ 56 % Diagnostics 57 % ================================================================ 59 %% ================================================================================================= 58 60 \section{Standard model output (IOM)} 59 61 \label{sec:DIA_iom} … … 64 66 65 67 \begin{enumerate} 66 \item 67 The complete and flexible control of the output files through external XML files adapted by 68 \item The complete and flexible control of the output files through external XML files adapted by 68 69 the user from standard templates. 69 \item 70 To achieve high performance and scalable output through the optional distribution of 70 \item To achieve high performance and scalable output through the optional distribution of 71 71 all diagnostic output related tasks to dedicated processes. 72 72 \end{enumerate} … … 76 76 77 77 \begin{itemize} 78 \item 79 The choice of output frequencies that can be different for each file (including real months and years). 80 \item 81 The choice of file contents; includes complete flexibility over which data are written in which files 78 \item The choice of output frequencies that can be different for each file (including real months and years). 79 \item The choice of file contents; includes complete flexibility over which data are written in which files 82 80 (the same data can be written in different files). 83 \item 84 The possibility to split output files at a chosen frequency. 85 \item 86 The possibility to extract a vertical or an horizontal subdomain. 87 \item 88 The choice of the temporal operation to perform, \eg: average, accumulate, instantaneous, min, max and once. 89 \item 90 Control over metadata via a large XML "database" of possible output fields. 81 \item The possibility to split output files at a chosen frequency. 82 \item The possibility to extract a vertical or an horizontal subdomain. 83 \item The choice of the temporal operation to perform, \eg: average, accumulate, instantaneous, min, max and once. 84 \item Control over metadata via a large XML "database" of possible output fields. 91 85 \end{itemize} 92 86 … … 122 116 even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 123 117 118 %% ================================================================================================= 124 119 \subsection{XIOS: Reading and writing restart file} 125 120 126 121 XIOS may be used to read single file restart produced by \NEMO. Currently only the variables written to 127 file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np {ln\_xios\_read}\forcode{ = .true.}122 file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np[=.true. ]{ln_xios_read}{ln\_xios\_read} 128 123 in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default \NEMO 129 124 functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read … … 140 135 dimension \forcode{z} defined in restart file must be renamed to \forcode{nav_lev}.\\ 141 136 142 XIOS can also be used to write \NEMO\ restart. A namelist parameter \np{nn \_wxios} is used to determine the137 XIOS can also be used to write \NEMO\ restart. A namelist parameter \np{nn_wxios}{nn\_wxios} is used to determine the 143 138 type of restart \NEMO\ will write. If it is set to 0, default \NEMO\ functionality will be used - each 144 139 processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file; 145 for \np {nn\_wxios}\forcode{ = 2} the restart will be written by XIOS into multiple files, one for each XIOS server.146 Note, however, that \textbf{\NEMO\ will not read restart generated by XIOS when \np {nn\_wxios}\forcode{ = 2}}. The restart will140 for \np[=2]{nn_wxios}{nn\_wxios} the restart will be written by XIOS into multiple files, one for each XIOS server. 141 Note, however, that \textbf{\NEMO\ will not read restart generated by XIOS when \np[=2]{nn_wxios}{nn\_wxios}}. The restart will 147 142 have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by \NEMO\ only, 148 143 and may be useful when there is a need to change number of processors used to run simulation. 149 144 150 145 If an additional variable must be written to a restart file, the following steps are needed: 151 \begin{ description}152 \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and146 \begin{enumerate} 147 \item Add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and 153 148 define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} - 154 149 1D variable, \forcode{grid_scalar} - scalar), 155 \item[step 2:] add variable to the list of fields written by restart. This can be done either in subroutine150 \item Add variable to the list of fields written by restart. This can be done either in subroutine 156 151 \rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable 157 152 as an argument. This convention follows approach for writing restart using iom, where variables are 158 153 written either by \rou{rst\_write} or by calling \rou{iom\_rstput} from individual routines. 159 \end{description} 160 154 \end{enumerate} 161 155 162 156 An older versions of XIOS do not support reading functionality. It's recommended to use at least XIOS2@1451. 163 157 164 158 %% ================================================================================================= 165 159 \subsection{XIOS: XML Inputs-Outputs Server} 166 160 161 %% ================================================================================================= 167 162 \subsubsection{Attached or detached mode?} 168 163 … … 174 169 \xmlline|<variable id="using_server" type="bool"></variable>| 175 170 176 The {\ttfamily using\_server} setting determines whether or not the server will be used in \textit{attached mode} 177 (as a library) [{\ttfamily> false <}] or in \textit{detached mode} 178 (as an external executable on N additional, dedicated cpus) [{\ttfamily > true <}]. 179 The \textit{attached mode} is simpler to use but much less efficient for massively parallel applications. 171 The \texttt{using\_server} setting determines whether or not the server will be used in 172 \textit{attached mode} 173 (as a library) [\texttt{> false <}] or in \textit{detached mode} 174 (as an external executable on N additional, dedicated cpus) [\texttt{ > true <}]. 175 The \textit{attached mode} is simpler to use but much less efficient for 176 massively parallel applications. 180 177 The type of each file can be either ''multiple\_file'' or ''one\_file''. 181 178 … … 197 194 The following subsection provides a typical example but the syntax will vary in different MPP environments. 198 195 196 %% ================================================================================================= 199 197 \subsubsection{Number of cpu used by XIOS in detached mode} 200 198 … … 211 209 \cmd|mpirun -np 62 ./nemo.exe : -np 2 ./xios_server.exe| 212 210 211 %% ================================================================================================= 213 212 \subsubsection{Control of XIOS: the context in iodef.xml} 214 213 … … 218 217 219 218 \begin{table} 220 \scriptsize221 219 \begin{tabularx}{\textwidth}{|lXl|} 222 220 \hline … … 257 255 \end{table} 258 256 257 %% ================================================================================================= 259 258 \subsection{Practical issues} 260 259 260 %% ================================================================================================= 261 261 \subsubsection{Installation} 262 262 … … 267 267 {Extract and install XIOS} guide provides an example illustration of how this can be achieved. 268 268 269 %% ================================================================================================= 269 270 \subsubsection{Add your own outputs} 270 271 … … 275 276 276 277 \begin{enumerate} 277 \item[1.] 278 in \NEMO\ code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 279 \item[2.] 280 If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in 278 \item in \NEMO\ code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 279 \item If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in 281 280 the upper part of your module. 282 \item[3.] 283 in the field\_def.xml file, add the definition of your variable using the same identifier you used in the f90 code 281 \item in the field\_def.xml file, add the definition of your variable using the same identifier you used in the f90 code 284 282 (see subsequent sections for a details of the XML syntax and rules). 285 283 For example: 286 287 284 \begin{xmllines} 288 285 <field_definition> … … 293 290 </field_definition> 294 291 \end{xmllines} 295 296 292 Note your definition must be added to the field\_group whose reference grid is consistent with the size of 297 293 the array passed to iomput. … … 300 296 (iom\_set\_domain\_attr and iom\_set\_axis\_attr in \mdl{iom}) or defined in the domain\_def.xml file. 301 297 \eg: 302 303 298 \begin{xmllines} 304 299 <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/> 305 300 \end{xmllines} 306 307 Note, if your array is computed within the surface module each \np{nn\_fsbc} time\_step, 301 Note, if your array is computed within the surface module each \np{nn_fsbc}{nn\_fsbc} time\_step, 308 302 add the field definition within the field\_group defined with the id "SBC": 309 303 \xmlcode{<field_group id="SBC" ...>} which has been defined with the correct frequency of operations 310 304 (iom\_set\_field\_attr in \mdl{iom}) 311 \item[4.] 312 add your field in one of the output files defined in iodef.xml 305 \item add your field in one of the output files defined in iodef.xml 313 306 (again see subsequent sections for syntax and rules) 314 315 307 \begin{xmllines} 316 308 <file id="file1" .../> … … 320 312 </file> 321 313 \end{xmllines} 322 323 314 \end{enumerate} 324 315 316 %% ================================================================================================= 325 317 \subsection{XML fundamentals} 326 318 319 %% ================================================================================================= 327 320 \subsubsection{ XML basic rules} 328 321 … … 334 327 See \href{http://www.xmlnews.org/docs/xml-basics.html}{here} for more details. 335 328 329 %% ================================================================================================= 336 330 \subsubsection{Structure of the XML file used in \NEMO} 337 331 … … 341 335 342 336 \begin{table} 343 \scriptsize344 337 \begin{tabular*}{\textwidth}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 345 338 \hline … … 373 366 374 367 \begin{table} 375 \scriptsize376 368 \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 377 369 \hline … … 398 390 399 391 \begin{table} 400 \scriptsize401 392 \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 402 393 \hline … … 418 409 419 410 \begin{table} 420 \scriptsize421 411 \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 422 412 \hline … … 443 433 \end{table} 444 434 435 %% ================================================================================================= 445 436 \subsubsection{Nesting XML files} 446 437 … … 459 450 \end{xmllines} 460 451 452 %% ================================================================================================= 461 453 \subsubsection{Use of inheritance} 462 454 … … 499 491 Inherit (and overwrite, if needed) the attributes of a tag you are refering to. 500 492 493 %% ================================================================================================= 501 494 \subsubsection{Use of groups} 502 495 … … 540 533 \end{xmllines} 541 534 535 %% ================================================================================================= 542 536 \subsection{Detailed functionalities} 543 537 … … 545 539 the new functionalities offered by the XML interface of XIOS. 546 540 541 %% ================================================================================================= 547 542 \subsubsection{Define horizontal subdomains} 548 543 … … 586 581 We are therefore advising to use the ''one\_file'' type in this case. 587 582 583 %% ================================================================================================= 588 584 \subsubsection{Define vertical zooms} 589 585 … … 609 605 \end{xmllines} 610 606 607 %% ================================================================================================= 611 608 \subsubsection{Control of the output file names} 612 609 … … 634 631 635 632 \begin{table} 636 \scriptsize637 633 \begin{tabularx}{\textwidth}{|lX|} 638 634 \hline … … 682 678 \noindent will give the following file name radical: \ifile{myfile\_ORCA2\_19891231\_freq1d} 683 679 680 %% ================================================================================================= 684 681 \subsubsection{Other controls of the XML attributes from \NEMO} 685 682 … … 695 692 696 693 \begin{table} 697 \scriptsize 698 \begin{tabularx}{\textwidth}{|X|c|c|c|} 694 \begin{tabular}{|l|c|c|} 699 695 \hline 700 696 tag ids affected by automatic definition of some of their attributes & 701 697 name attribute & 702 attribute value \\698 attribute value \\ 703 699 \hline 704 700 \hline 705 701 field\_definition & 706 702 freq\_op & 707 \np{rn \_rdt}\\703 \np{rn_rdt}{rn\_rdt} \\ 708 704 \hline 709 705 SBC & 710 706 freq\_op & 711 \np{rn \_rdt} $\times$ \np{nn\_fsbc}\\707 \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_fsbc}{nn\_fsbc} \\ 712 708 \hline 713 709 ptrc\_T & 714 710 freq\_op & 715 \np{rn \_rdt} $\times$ \np{nn\_dttrc}\\711 \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_dttrc}{nn\_dttrc} \\ 716 712 \hline 717 713 diad\_T & 718 714 freq\_op & 719 \np{rn \_rdt} $\times$ \np{nn\_dttrc}\\715 \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_dttrc}{nn\_dttrc} \\ 720 716 \hline 721 717 EqT, EqU, EqW & 722 718 jbegin, ni, & 723 according to the grid \\724 &719 according to the grid \\ 720 & 725 721 name\_suffix & 726 \\722 \\ 727 723 \hline 728 724 TAO, RAMA and PIRATA moorings & 729 725 zoom\_ibegin, zoom\_jbegin, & 730 according to the grid \\731 &726 according to the grid \\ 727 & 732 728 name\_suffix & 733 \\734 \hline 735 \end{tabular x}729 \\ 730 \hline 731 \end{tabular} 736 732 \end{table} 737 733 734 %% ================================================================================================= 738 735 \subsubsection{Advanced use of XIOS functionalities} 739 736 737 %% ================================================================================================= 740 738 \subsection{XML reference tables} 741 \label{subsec: IOM_xmlref}739 \label{subsec:DIA_IOM_xmlref} 742 740 743 741 \begin{enumerate} 744 \item 745 Simple computation: directly define the computation when refering to the variable in the file definition. 742 \item Simple computation: directly define the computation when refering to the variable in the file definition. 746 743 747 744 \begin{xmllines} … … 751 748 \end{xmllines} 752 749 753 \item 754 Simple computation: define a new variable and use it in the file definition. 750 \item Simple computation: define a new variable and use it in the file definition. 755 751 756 752 in field\_definition: … … 769 765 sst2 won't be evaluated. 770 766 771 \item 772 Change of variable precision: 767 \item Change of variable precision: 773 768 774 769 \begin{xmllines} … … 783 778 Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem. 784 779 785 \item 786 add user defined attributes: 780 \item add user defined attributes: 787 781 788 782 \begin{xmllines} … … 799 793 \end{xmllines} 800 794 801 \item 802 use of the ``@'' function: example 1, weighted temporal average 795 \item use of the ``@'' function: example 1, weighted temporal average 803 796 804 797 - define a new variable in field\_definition … … 828 821 Note that in this case, freq\_op must be equal to the file output\_freq. 829 822 830 \item 831 use of the ``@'' function: example 2, monthly SSH standard deviation 823 \item use of the ``@'' function: example 2, monthly SSH standard deviation 832 824 833 825 - define a new variable in field\_definition … … 859 851 Note that in this case, freq\_op must be equal to the file output\_freq. 860 852 861 \item 862 use of the ``@'' function: example 3, monthly average of SST diurnal cycle 853 \item use of the ``@'' function: example 3, monthly average of SST diurnal cycle 863 854 864 855 - define 2 new variables in field\_definition … … 891 882 field\_ref="sst" means that attributes not explicitely defined, are inherited from sst field. 892 883 884 %% ================================================================================================= 893 885 \subsubsection{Tag list per family} 894 886 895 887 \begin{table} 896 \scriptsize897 888 \begin{tabularx}{\textwidth}{|l|X|X|l|X|} 898 889 \hline … … 917 908 \hline 918 909 \end{tabularx} 919 \caption{ Context tags}910 \caption{XIOS: context tags} 920 911 \end{table} 921 912 922 913 \begin{table} 923 \scriptsize924 914 \begin{tabularx}{\textwidth}{|l|X|X|X|l|} 925 915 \hline … … 952 942 \hline 953 943 \end{tabularx} 954 \caption{ Field tags ("\ttfamily{field\_*}")}944 \caption{XIOS: field tags ("\texttt{field\_*}")} 955 945 \end{table} 956 946 957 947 \begin{table} 958 \scriptsize959 948 \begin{tabularx}{\textwidth}{|l|X|X|X|l|} 960 949 \hline … … 988 977 \hline 989 978 \end{tabularx} 990 \caption{ File tags ("\ttfamily{file\_*}")}979 \caption{XIOS: file tags ("\texttt{file\_*}")} 991 980 \end{table} 992 981 993 982 \begin{table} 994 \scriptsize995 983 \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 996 984 \hline … … 1021 1009 \hline 1022 1010 \end{tabularx} 1023 \caption{ Axis tags ("\ttfamily{axis\_*}")}1011 \caption{XIOS: axis tags ("\texttt{axis\_*}")} 1024 1012 \end{table} 1025 1013 1026 1014 \begin{table} 1027 \scriptsize1028 1015 \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 1029 1016 \hline … … 1054 1041 \hline 1055 1042 \end{tabularx} 1056 \caption{ Domain tags ("\ttfamily{domain\_*)}"}1043 \caption{XIOS: domain tags ("\texttt{domain\_*)}"} 1057 1044 \end{table} 1058 1045 1059 1046 \begin{table} 1060 \scriptsize1061 1047 \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 1062 1048 \hline … … 1087 1073 \hline 1088 1074 \end{tabularx} 1089 \caption{ Grid tags ("\ttfamily{grid\_*}")}1075 \caption{XIOS: grid tags ("\texttt{grid\_*}")} 1090 1076 \end{table} 1091 1077 1078 %% ================================================================================================= 1092 1079 \subsubsection{Attributes list per family} 1093 1080 1094 1081 \begin{table} 1095 \scriptsize1096 1082 \begin{tabularx}{\textwidth}{|l|X|l|l|} 1097 1083 \hline … … 1128 1114 \hline 1129 1115 \end{tabularx} 1130 \caption{ Reference attributes ("\ttfamily{*\_ref}")}1116 \caption{XIOS: reference attributes ("\texttt{*\_ref}")} 1131 1117 \end{table} 1132 1118 1133 1119 \begin{table} 1134 \scriptsize1135 1120 \begin{tabularx}{\textwidth}{|l|X|l|l|} 1136 1121 \hline … … 1164 1149 \hline 1165 1150 \end{tabularx} 1166 \caption{ Domain attributes ("\ttfamily{zoom\_*}")}1151 \caption{XIOS: domain attributes ("\texttt{zoom\_*}")} 1167 1152 \end{table} 1168 1153 1169 1154 \begin{table} 1170 \scriptsize1171 1155 \begin{tabularx}{\textwidth}{|l|X|l|l|} 1172 1156 \hline … … 1219 1203 \hline 1220 1204 \end{tabularx} 1221 \caption{ File attributes}1205 \caption{XIOS: file attributes} 1222 1206 \end{table} 1223 1207 1224 1208 \begin{table} 1225 \scriptsize1226 1209 \begin{tabularx}{\textwidth}{|l|X|l|l|} 1227 1210 \hline … … 1268 1251 \hline 1269 1252 \end{tabularx} 1270 \caption{ Field attributes}1253 \caption{XIOS: field attributes} 1271 1254 \end{table} 1272 1255 1273 1256 \begin{table} 1274 \scriptsize1275 1257 \begin{tabularx}{\textwidth}{|l|X|X|X|} 1276 1258 \hline … … 1327 1309 \hline 1328 1310 \end{tabularx} 1329 \caption{ Miscellaneous attributes}1311 \caption{XIOS: miscellaneous attributes} 1330 1312 \end{table} 1331 1313 1314 %% ================================================================================================= 1332 1315 \subsection{CF metadata standard compliance} 1333 1316 … … 1336 1319 the CF metadata standard. 1337 1320 Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of 1338 section \autoref{subsec: IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard.1321 section \autoref{subsec:DIA_IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 1339 1322 1340 1323 Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by 1341 the namelist parameter \np{ln \_cfmeta} in the \nam{run} namelist.1324 the namelist parameter \np{ln_cfmeta}{ln\_cfmeta} in the \nam{run}{run} namelist. 1342 1325 This must be set to true if these metadata are to be included in the output files. 1343 1326 1344 1345 % ================================================================ 1346 % NetCDF4 support 1347 % ================================================================ 1348 \section[NetCDF4 support (\texttt{\textbf{key\_netcdf4}})] 1349 {NetCDF4 support (\protect\key{netcdf4})} 1327 %% ================================================================================================= 1328 \section[NetCDF4 support (\texttt{\textbf{key\_netcdf4}})]{NetCDF4 support (\protect\key{netcdf4})} 1350 1329 \label{sec:DIA_nc4} 1351 1330 … … 1362 1341 most analysis codes can be relinked simply with the new libraries and will then read both NetCDF3 and NetCDF4 files. 1363 1342 \NEMO\ executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 1364 setting the \np{ln\_nc4zip} logical to false in the \nam{nc4} namelist: 1365 1366 %------------------------------------------namnc4---------------------------------------------------- 1367 1368 \nlst{namnc4} 1369 %------------------------------------------------------------------------------------------------------------- 1343 setting the \np{ln_nc4zip}{ln\_nc4zip} logical to false in the \nam{nc4}{nc4} namelist: 1344 1345 \begin{listing} 1346 \nlst{namnc4} 1347 \caption{\forcode{&namnc4}} 1348 \label{lst:namnc4} 1349 \end{listing} 1370 1350 1371 1351 If \key{netcdf4} has not been defined, these namelist parameters are not read. 1372 In this case, \np{ln \_nc4zip} is set false and dummy routines for a few NetCDF4-specific functions are defined.1352 In this case, \np{ln_nc4zip}{ln\_nc4zip} is set false and dummy routines for a few NetCDF4-specific functions are defined. 1373 1353 These functions will not be used but need to be included so that compilation is possible with NetCDF3 libraries. 1374 1354 … … 1404 1384 \end{forlines} 1405 1385 1406 \noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\t tfamily46x38x1} respectively in1407 the mono-processor case (\ie\ global domain of {\small\t tfamily182x149x31}).1386 \noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\texttt 46x38x1} respectively in 1387 the mono-processor case (\ie\ global domain of {\small\texttt 182x149x31}). 1408 1388 An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in 1409 table \autoref{tab: NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with1389 table \autoref{tab:DIA_NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with 1410 1390 a 4x2 mpi partitioning. 1411 1391 Note the variation in the compression ratio achieved which reflects chiefly the dry to wet volume ratio of 1412 1392 each processing region. 1413 1393 1414 %------------------------------------------TABLE----------------------------------------------------1415 1394 \begin{table} 1416 \scriptsize1417 1395 \centering 1418 1396 \begin{tabular}{lrrr} … … 1446 1424 ORCA2\_2d\_grid\_W\_0007.nc & 4416 & 1368 & 70\% \\ 1447 1425 \end{tabular} 1448 \caption{ 1449 \protect\label{tab:NC4} 1450 Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression 1451 } 1426 \caption{Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression} 1427 \label{tab:DIA_NC4} 1452 1428 \end{table} 1453 %----------------------------------------------------------------------------------------------------1454 1429 1455 1430 When \key{iomput} is activated with \key{netcdf4} chunking and compression parameters for fields produced via 1456 \rou{iom\_put} calls are set via an equivalent and identically named namelist to \nam{nc4} in1431 \rou{iom\_put} calls are set via an equivalent and identically named namelist to \nam{nc4}{nc4} in 1457 1432 \textit{xmlio\_server.def}. 1458 Typically this namelist serves the mean files whilst the \nam{nc4} in the main namelist file continues to1433 Typically this namelist serves the mean files whilst the \nam{nc4}{nc4} in the main namelist file continues to 1459 1434 serve the restart files. 1460 1435 This duplication is unfortunate but appropriate since, if using io\_servers, the domain sizes of … … 1462 1437 the invidual processing regions and different chunking choices may be desired. 1463 1438 1464 % ------------------------------------------------------------------------------------------------------------- 1465 % Tracer/Dynamics Trends 1466 % ------------------------------------------------------------------------------------------------------------- 1467 \section[Tracer/Dynamics trends (\texttt{namtrd})] 1468 {Tracer/Dynamics trends (\protect\nam{trd})} 1439 %% ================================================================================================= 1440 \section[Tracer/Dynamics trends (\forcode{&namtrd})]{Tracer/Dynamics trends (\protect\nam{trd}{trd})} 1469 1441 \label{sec:DIA_trd} 1470 1442 1471 %------------------------------------------namtrd---------------------------------------------------- 1472 1473 \nlst{namtrd} 1474 %------------------------------------------------------------------------------------------------------------- 1443 \begin{listing} 1444 \nlst{namtrd} 1445 \caption{\forcode{&namtrd}} 1446 \label{lst:namtrd} 1447 \end{listing} 1475 1448 1476 1449 Each trend of the dynamics and/or temperature and salinity time evolution equations can be send to 1477 1450 \mdl{trddyn} and/or \mdl{trdtra} modules (see TRD directory) just after their computation 1478 1451 (\ie\ at the end of each \textit{dyn....F90} and/or \textit{tra....F90} routines). 1479 This capability is controlled by options offered in \nam{trd} namelist.1452 This capability is controlled by options offered in \nam{trd}{trd} namelist. 1480 1453 Note that the output are done with XIOS, and therefore the \key{iomput} is required. 1481 1454 1482 What is done depends on the \nam{trd} logical set to \forcode{.true.}:1455 What is done depends on the \nam{trd}{trd} logical set to \forcode{.true.}: 1483 1456 1484 1457 \begin{description} 1485 \item[\np{ln\_glo\_trd}]: 1486 at each \np{nn\_trd} time-step a check of the basin averaged properties of 1458 \item [{\np{ln_glo_trd}{ln\_glo\_trd}}]: at each \np{nn_trd}{nn\_trd} time-step a check of the basin averaged properties of 1487 1459 the momentum and tracer equations is performed. 1488 1460 This also includes a check of $T^2$, $S^2$, $\tfrac{1}{2} (u^2+v2)$, 1489 1461 and potential energy time evolution equations properties; 1490 \item[\np{ln\_dyn\_trd}]: 1491 each 3D trend of the evolution of the two momentum components is output; 1492 \item[\np{ln\_dyn\_mxl}]: 1493 each 3D trend of the evolution of the two momentum components averaged over the mixed layer is output; 1494 \item[\np{ln\_vor\_trd}]: 1495 a vertical summation of the moment tendencies is performed, 1462 \item [{\np{ln_dyn_trd}{ln\_dyn\_trd}}]: each 3D trend of the evolution of the two momentum components is output; 1463 \item [{\np{ln_dyn_mxl}{ln\_dyn\_mxl}}]: each 3D trend of the evolution of the two momentum components averaged over the mixed layer is output; 1464 \item [{\np{ln_vor_trd}{ln\_vor\_trd}}]: a vertical summation of the moment tendencies is performed, 1496 1465 then the curl is computed to obtain the barotropic vorticity tendencies which are output; 1497 \item[\np{ln\_KE\_trd}] : 1498 each 3D trend of the Kinetic Energy equation is output; 1499 \item[\np{ln\_tra\_trd}]: 1500 each 3D trend of the evolution of temperature and salinity is output; 1501 \item[\np{ln\_tra\_mxl}]: 1502 each 2D trend of the evolution of temperature and salinity averaged over the mixed layer is output; 1466 \item [{\np{ln_KE_trd}{ln\_KE\_trd}}] : each 3D trend of the Kinetic Energy equation is output; 1467 \item [{\np{ln_tra_trd}{ln\_tra\_trd}}]: each 3D trend of the evolution of temperature and salinity is output; 1468 \item [{\np{ln_tra_mxl}{ln\_tra\_mxl}}]: each 2D trend of the evolution of temperature and salinity averaged over the mixed layer is output; 1503 1469 \end{description} 1504 1470 … … 1507 1473 1508 1474 \textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested. 1509 In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl} are not working, 1510 and none of the options have been tested with variable volume (\ie\ \np{ln\_linssh}\forcode{ = .true.}). 1511 1512 % ------------------------------------------------------------------------------------------------------------- 1513 % On-line Floats trajectories 1514 % ------------------------------------------------------------------------------------------------------------- 1515 \section[FLO: On-Line Floats trajectories (\texttt{\textbf{key\_floats}})] 1516 {FLO: On-Line Floats trajectories (\protect\key{floats})} 1517 \label{sec:FLO} 1518 %--------------------------------------------namflo------------------------------------------------------- 1519 1520 \nlst{namflo} 1521 %-------------------------------------------------------------------------------------------------------------- 1475 In particular, options associated with \np{ln_dyn_mxl}{ln\_dyn\_mxl}, \np{ln_vor_trd}{ln\_vor\_trd}, and \np{ln_tra_mxl}{ln\_tra\_mxl} are not working, 1476 and none of the options have been tested with variable volume (\ie\ \np[=.true.]{ln_linssh}{ln\_linssh}). 1477 1478 %% ================================================================================================= 1479 \section[FLO: On-Line Floats trajectories (\texttt{\textbf{key\_floats}})]{FLO: On-Line Floats trajectories (\protect\key{floats})} 1480 \label{sec:DIA_FLO} 1481 1482 \begin{listing} 1483 \nlst{namflo} 1484 \caption{\forcode{&namflo}} 1485 \label{lst:namflo} 1486 \end{listing} 1522 1487 1523 1488 The on-line computation of floats advected either by the three dimensional velocity field or constraint to 1524 1489 remain at a given depth ($w = 0$ in the computation) have been introduced in the system during the CLIPPER project. 1525 Options are defined by \nam{flo} namelist variables.1490 Options are defined by \nam{flo}{flo} namelist variables. 1526 1491 The algorithm used is based either on the work of \cite{blanke.raynaud_JPO97} (default option), 1527 or on a $4^th$ Runge-Hutta algorithm (\np {ln\_flork4}\forcode{ = .true.}).1492 or on a $4^th$ Runge-Hutta algorithm (\np[=.true.]{ln_flork4}{ln\_flork4}). 1528 1493 Note that the \cite{blanke.raynaud_JPO97} algorithm have the advantage of providing trajectories which 1529 1494 are consistent with the numeric of the code, so that the trajectories never intercept the bathymetry. 1530 1495 1496 %% ================================================================================================= 1531 1497 \subsubsection{Input data: initial coordinates} 1532 1498 1533 1499 Initial coordinates can be given with Ariane Tools convention 1534 (IJK coordinates, (\np {ln\_ariane}\forcode{ = .true.}) ) or with longitude and latitude.1500 (IJK coordinates, (\np[=.true.]{ln_ariane}{ln\_ariane}) ) or with longitude and latitude. 1535 1501 1536 1502 In case of Ariane convention, input filename is \textit{init\_float\_ariane}. 1537 1503 Its format is: \\ 1538 { \scriptsize\texttt{I J K nisobfl itrash}}1504 { \texttt{I J K nisobfl itrash}} 1539 1505 1540 1506 \noindent with: … … 1548 1514 \noindent Example: \\ 1549 1515 \noindent 1550 { \scriptsize1516 { 1551 1517 \texttt{ 1552 1518 100.00000 90.00000 -1.50000 1.00000 0.00000 \\ … … 1559 1525 In the other case (longitude and latitude), input filename is init\_float. 1560 1526 Its format is: \\ 1561 { \scriptsize\texttt{Long Lat depth nisobfl ngrpfl itrash}}1527 { \texttt{Long Lat depth nisobfl ngrpfl itrash}} 1562 1528 1563 1529 \noindent with: … … 1573 1539 \noindent Example: \\ 1574 1540 \noindent 1575 { \scriptsize1541 { 1576 1542 \texttt{ 1577 1543 20.0 0.0 0.0 0 1 1 \\ … … 1582 1548 } \\ 1583 1549 1584 \np{jpnfl} is the total number of floats during the run. 1585 When initial positions are read in a restart file (\np{ln\_rstflo}\forcode{ = .true.} ), 1586 \np{jpnflnewflo} can be added in the initialization file. 1587 1550 \np{jpnfl}{jpnfl} is the total number of floats during the run. 1551 When initial positions are read in a restart file (\np[=.true.]{ln_rstflo}{ln\_rstflo} ), 1552 \np{jpnflnewflo}{jpnflnewflo} can be added in the initialization file. 1553 1554 %% ================================================================================================= 1588 1555 \subsubsection{Output data} 1589 1556 1590 \np{nn \_writefl} is the frequency of writing in float output file and \np{nn\_stockfl} is the frequency of1557 \np{nn_writefl}{nn\_writefl} is the frequency of writing in float output file and \np{nn_stockfl}{nn\_stockfl} is the frequency of 1591 1558 creation of the float restart file. 1592 1559 1593 Output data can be written in ascii files (\np {ln\_flo\_ascii}\forcode{ = .true.}).1560 Output data can be written in ascii files (\np[=.true.]{ln_flo_ascii}{ln\_flo\_ascii}). 1594 1561 In that case, output filename is trajec\_float. 1595 1562 1596 Another possiblity of writing format is Netcdf (\np {ln\_flo\_ascii}\forcode{ = .false.}) with1563 Another possiblity of writing format is Netcdf (\np[=.false.]{ln_flo_ascii}{ln\_flo\_ascii}) with 1597 1564 \key{iomput} and outputs selected in iodef.xml. 1598 1565 Here it is an example of specification to put in files description section: … … 1612 1579 \end{xmllines} 1613 1580 1614 1615 % ------------------------------------------------------------------------------------------------------------- 1616 % Harmonic analysis of tidal constituents 1617 % ------------------------------------------------------------------------------------------------------------- 1618 \section[Harmonic analysis of tidal constituents (\texttt{\textbf{key\_diaharm}})] 1619 {Harmonic analysis of tidal constituents (\protect\key{diaharm})} 1581 %% ================================================================================================= 1582 \section[Harmonic analysis of tidal constituents (\texttt{\textbf{key\_diaharm}})]{Harmonic analysis of tidal constituents (\protect\key{diaharm})} 1620 1583 \label{sec:DIA_diag_harm} 1621 1584 1622 %------------------------------------------nam_diaharm---------------------------------------------------- 1623 % 1624 \nlst{nam_diaharm} 1625 %---------------------------------------------------------------------------------------------------------- 1585 \begin{listing} 1586 \nlst{nam_diaharm} 1587 \caption{\forcode{&nam_diaharm}} 1588 \label{lst:nam_diaharm} 1589 \end{listing} 1626 1590 1627 1591 A module is available to compute the amplitude and phase of tidal waves. 1628 1592 This on-line Harmonic analysis is actived with \key{diaharm}. 1629 1593 1630 Some parameters are available in namelist \nam{ \_diaharm}:1631 1632 - \np{nit000 \_han} is the first time step used for harmonic analysis1633 1634 - \np{nitend \_han} is the last time step used for harmonic analysis1635 1636 - \np{nstep \_han} is the time step frequency for harmonic analysis1637 1638 % - \np{nb \_ana} is the number of harmonics to analyse1639 1640 - \np{tname} is an array with names of tidal constituents to analyse1641 1642 \np{nit000 \_han} and \np{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation.1594 Some parameters are available in namelist \nam{_diaharm}{\_diaharm}: 1595 1596 - \np{nit000_han}{nit000\_han} is the first time step used for harmonic analysis 1597 1598 - \np{nitend_han}{nitend\_han} is the last time step used for harmonic analysis 1599 1600 - \np{nstep_han}{nstep\_han} is the time step frequency for harmonic analysis 1601 1602 % - \np{nb_ana}{nb\_ana} is the number of harmonics to analyse 1603 1604 - \np{tname}{tname} is an array with names of tidal constituents to analyse 1605 1606 \np{nit000_han}{nit000\_han} and \np{nitend_han}{nitend\_han} must be between \np{nit000}{nit000} and \np{nitend}{nitend} of the simulation. 1643 1607 The restart capability is not implemented. 1644 1608 … … 1661 1625 We obtain in output $C_{j}$ and $S_{j}$ for each tidal wave. 1662 1626 1663 % ------------------------------------------------------------------------------------------------------------- 1664 % Sections transports 1665 % ------------------------------------------------------------------------------------------------------------- 1666 \section[Transports across sections (\texttt{\textbf{key\_diadct}})] 1667 {Transports across sections (\protect\key{diadct})} 1627 %% ================================================================================================= 1628 \section[Transports across sections (\texttt{\textbf{key\_diadct}})]{Transports across sections (\protect\key{diadct})} 1668 1629 \label{sec:DIA_diag_dct} 1669 1630 1670 %------------------------------------------namdct---------------------------------------------------- 1671 1672 \nlst{namdct} 1673 %------------------------------------------------------------------------------------------------------------- 1631 \begin{listing} 1632 \nlst{nam_diadct} 1633 \caption{\forcode{&nam_diadct}} 1634 \label{lst:nam_diadct} 1635 \end{listing} 1674 1636 1675 1637 A module is available to compute the transport of volume, heat and salt through sections. … … 1689 1651 - \texttt{salt\_transport} for salt transports (unit: $10^{9}Kg s^{-1}$) \\ 1690 1652 1691 Namelist variables in \nam{ dct} control how frequently the flows are summed and the time scales over which1653 Namelist variables in \nam{_diadct}{\_diadct} control how frequently the flows are summed and the time scales over which 1692 1654 they are averaged, as well as the level of output for debugging: 1693 \np{nn\_dct} : frequency of instantaneous transports computing 1694 \np{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 1695 \np{nn\_debug} : debugging of the section 1696 1655 \np{nn_dct}{nn\_dct} : frequency of instantaneous transports computing 1656 \np{nn_dctwri}{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 1657 \np{nn_debug}{nn\_debug} : debugging of the section 1658 1659 %% ================================================================================================= 1697 1660 \subsubsection{Creating a binary file containing the pathway of each section} 1698 1661 … … 1704 1667 1705 1668 Each section is defined by: \\ 1706 \noindent { \scriptsize\texttt{long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name}} \\1669 \noindent { \texttt{long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name}} \\ 1707 1670 with: 1708 1671 … … 1721 1684 1722 1685 \noindent If nclass $\neq$ 0, the next lines contain the class type and the nclass bounds: \\ 1723 { \scriptsize1686 { 1724 1687 \texttt{ 1725 1688 long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name \\ … … 1754 1717 and the ATL\_Cuba\_Florida with 4 temperature clases (5 class bounds), are shown: \\ 1755 1718 \noindent 1756 { \scriptsize1719 { 1757 1720 \texttt{ 1758 1721 -68. -54.5 -60. -64.7 00 okstrpond noice ACC\_Drake\_Passage \\ … … 1766 1729 } 1767 1730 1731 %% ================================================================================================= 1768 1732 \subsubsection{To read the output files} 1769 1733 1770 1734 The output format is: \\ 1771 { \scriptsize1735 { 1772 1736 \texttt{ 1773 1737 date, time-step number, section number, \\ … … 1791 1755 1792 1756 \begin{table} 1793 \scriptsize1794 1757 \begin{tabular}{|l|l|l|l|l|} 1795 1758 \hline … … 1805 1768 \end{table} 1806 1769 1807 % ================================================================ 1808 % Steric effect in sea surface height 1809 % ================================================================ 1770 %% ================================================================================================= 1810 1771 \section{Diagnosing the steric effect in sea surface height} 1811 1772 \label{sec:DIA_steric} 1812 1813 1773 1814 1774 Changes in steric sea level are caused when changes in the density of the water column imply an expansion or … … 1847 1807 \mathcal{V} &= \mathcal{A} \;\bar{\eta} 1848 1808 \end{split} 1849 \label{eq: MV_nBq}1809 \label{eq:DIA_MV_nBq} 1850 1810 \end{equation} 1851 1811 … … 1855 1815 \frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) 1856 1816 = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface} 1857 \label{eq: Co_nBq}1817 \label{eq:DIA_Co_nBq} 1858 1818 \end{equation} 1859 1819 … … 1864 1824 \begin{equation} 1865 1825 \partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}} 1866 \label{eq: Mass_nBq}1826 \label{eq:DIA_Mass_nBq} 1867 1827 \end{equation} 1868 1828 1869 1829 where $\overline{\textit{emp}} = \int_S \textit{emp}\,ds$ is the net mass flux through the ocean surface. 1870 Bringing \autoref{eq: Mass_nBq} and the time derivative of \autoref{eq:MV_nBq} together leads to1830 Bringing \autoref{eq:DIA_Mass_nBq} and the time derivative of \autoref{eq:DIA_MV_nBq} together leads to 1871 1831 the evolution equation of the mean sea level 1872 1832 … … 1874 1834 \partial_t \bar{\eta} = \frac{\overline{\textit{emp}}}{ \bar{\rho}} 1875 1835 - \frac{\mathcal{V}}{\mathcal{A}} \;\frac{\partial_t \bar{\rho} }{\bar{\rho}} 1876 \label{eq: ssh_nBq}1836 \label{eq:DIA_ssh_nBq} 1877 1837 \end{equation} 1878 1838 1879 The first term in equation \autoref{eq: ssh_nBq} alters sea level by adding or subtracting mass from the ocean.1839 The first term in equation \autoref{eq:DIA_ssh_nBq} alters sea level by adding or subtracting mass from the ocean. 1880 1840 The second term arises from temporal changes in the global mean density; \ie\ from steric effects. 1881 1841 1882 1842 In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ appears multiplied by 1883 1843 the gravity (\ie\ in the hydrostatic balance of the primitive Equations). 1884 In particular, the mass conservation equation, \autoref{eq: Co_nBq}, degenerates into the incompressibility equation:1844 In particular, the mass conservation equation, \autoref{eq:DIA_Co_nBq}, degenerates into the incompressibility equation: 1885 1845 1886 1846 \[ 1887 1847 \frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) = \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface} 1888 % \label{eq: Co_Bq}1848 % \label{eq:DIA_Co_Bq} 1889 1849 \] 1890 1850 … … 1893 1853 \[ 1894 1854 \partial_t \mathcal{V} = \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o} 1895 % \label{eq: V_Bq}1855 % \label{eq:DIA_V_Bq} 1896 1856 \] 1897 1857 … … 1912 1872 \begin{equation} 1913 1873 \mathcal{M}_o = \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A} 1914 \label{eq: M_Bq}1874 \label{eq:DIA_M_Bq} 1915 1875 \end{equation} 1916 1876 … … 1919 1879 Introducing the total density anomaly, $\mathcal{D}= \int_D d_a \,dv$, 1920 1880 where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO\ (cf. \autoref{subsec:TRA_eos}) 1921 in \autoref{eq: M_Bq} leads to a very simple form for the steric height:1881 in \autoref{eq:DIA_M_Bq} leads to a very simple form for the steric height: 1922 1882 1923 1883 \begin{equation} 1924 1884 \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D} 1925 \label{eq: steric_Bq}1885 \label{eq:DIA_steric_Bq} 1926 1886 \end{equation} 1927 1887 … … 1943 1903 (wetting and drying of grid point is not allowed). 1944 1904 1945 Third, the discretisation of \autoref{eq: steric_Bq} depends on the type of free surface which is considered.1946 In the non linear free surface case, \ie\ \np {ln\_linssh}\forcode{ = .true.}, it is given by1905 Third, the discretisation of \autoref{eq:DIA_steric_Bq} depends on the type of free surface which is considered. 1906 In the non linear free surface case, \ie\ \np[=.true.]{ln_linssh}{ln\_linssh}, it is given by 1947 1907 1948 1908 \[ 1949 1909 \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t} e_{2t} e_{3t} }{ \sum_{i,\,j,\,k} e_{1t} e_{2t} e_{3t} } 1950 % \label{eq: discrete_steric_Bq_nfs}1910 % \label{eq:DIA_discrete_steric_Bq_nfs} 1951 1911 \] 1952 1912 … … 1958 1918 \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} d_a\; e_{1t}e_{2t} \eta } 1959 1919 { \sum_{i,\,j,\,k} e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} e_{1t}e_{2t} \eta } 1960 % \label{eq: discrete_steric_Bq_fs}1920 % \label{eq:DIA_discrete_steric_Bq_fs} 1961 1921 \] 1962 1922 … … 1978 1938 \[ 1979 1939 \eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv 1980 % \label{eq: thermosteric_Bq}1940 % \label{eq:DIA_thermosteric_Bq} 1981 1941 \] 1982 1942 … … 1985 1945 Both steric and thermosteric sea level are computed in \mdl{diaar5}. 1986 1946 1987 % ------------------------------------------------------------------------------------------------------------- 1988 % Other Diagnostics 1989 % ------------------------------------------------------------------------------------------------------------- 1990 \section[Other diagnostics] 1991 {Other diagnostics} 1947 %% ================================================================================================= 1948 \section{Other diagnostics} 1992 1949 \label{sec:DIA_diag_others} 1993 1950 … … 1995 1952 The available ready-to-add diagnostics modules can be found in directory DIA. 1996 1953 1997 \subsection[Depth of various quantities (\textit{diahth.F90})] 1998 {Depth of various quantities (\protect\mdl{diahth})}1954 %% ================================================================================================= 1955 \subsection[Depth of various quantities (\textit{diahth.F90})]{Depth of various quantities (\protect\mdl{diahth})} 1999 1956 2000 1957 Among the available diagnostics the following ones are obtained when defining the \key{diahth} CPP key: … … 2008 1965 - the depth of the thermocline (maximum of the vertical temperature gradient) (\mdl{diahth}) 2009 1966 2010 2011 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>2012 1967 \begin{figure}[!t] 2013 \begin{center} 2014 \includegraphics[width=\textwidth]{Fig_mask_subasins} 2015 \caption{ 2016 \protect\label{fig:mask_subasins} 2017 Decomposition of the World Ocean (here ORCA2) into sub-basin used in to 2018 compute the heat and salt transports as well as the meridional stream-function: 2019 Atlantic basin (red), Pacific basin (green), Indian basin (bleue), Indo-Pacific basin (bleue+green). 2020 Note that semi-enclosed seas (Red, Med and Baltic seas) as well as Hudson Bay are removed from the sub-basins. 2021 Note also that the Arctic Ocean has been split into Atlantic and Pacific basins along the North fold line. 2022 } 2023 \end{center} 1968 \centering 1969 \includegraphics[width=0.66\textwidth]{Fig_mask_subasins} 1970 \caption[Decomposition of the World Ocean to compute transports as well as 1971 the meridional stream-function]{ 1972 Decomposition of the World Ocean (here ORCA2) into sub-basin used in to 1973 compute the heat and salt transports as well as the meridional stream-function: 1974 Atlantic basin (red), Pacific basin (green), 1975 Indian basin (blue), Indo-Pacific basin (blue+green). 1976 Note that semi-enclosed seas (Red, Med and Baltic seas) as well as 1977 Hudson Bay are removed from the sub-basins. 1978 Note also that the Arctic Ocean has been split into Atlantic and 1979 Pacific basins along the North fold line. 1980 } 1981 \label{fig:DIA_mask_subasins} 2024 1982 \end{figure} 2025 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2026 2027 % ----------------------------------------------------------- 2028 % CMIP specific diagnostics 2029 % ----------------------------------------------------------- 2030 \subsection[CMIP specific diagnostics (\textit{diaar5.F90}, \textit{diaptr.F90})] 2031 {CMIP specific diagnostics (\protect\mdl{diaar5})} 1983 1984 %% ================================================================================================= 1985 \subsection[CMIP specific diagnostics (\textit{diaar5.F90}, \textit{diaptr.F90})]{CMIP specific diagnostics (\protect\mdl{diaar5})} 2032 1986 2033 1987 A series of diagnostics has been added in the \mdl{diaar5} and \mdl{diaptr}. … … 2039 1993 sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 2040 1994 2041 In \mdl{diaptr} when \np {ln\_diaptr}\forcode{ = .true.}2042 (see the \nam{ptr} namelist below) can be computed on-line the poleward heat and salt transports,1995 In \mdl{diaptr} when \np[=.true.]{ln_diaptr}{ln\_diaptr} 1996 (see the \nam{ptr}{ptr} namelist below) can be computed on-line the poleward heat and salt transports, 2043 1997 their advective and diffusive component, and the meriodional stream function . 2044 When \np {ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian,1998 When \np[=.true.]{ln_subbas}{ln\_subbas}, transports and stream function are computed for the Atlantic, Indian, 2045 1999 Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean. 2046 2000 The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays, 2047 the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:mask_subasins}). 2048 2049 %------------------------------------------namptr----------------------------------------- 2050 2051 \nlst{namptr} 2052 %----------------------------------------------------------------------------------------- 2053 2054 % ----------------------------------------------------------- 2055 % 25 hour mean and hourly Surface, Mid and Bed 2056 % ----------------------------------------------------------- 2001 the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:DIA_mask_subasins}). 2002 2003 \begin{listing} 2004 \nlst{namptr} 2005 \caption{\forcode{&namptr}} 2006 \label{lst:namptr} 2007 \end{listing} 2008 2009 %% ================================================================================================= 2057 2010 \subsection{25 hour mean output for tidal models} 2058 2011 2059 %------------------------------------------nam_dia25h------------------------------------- 2060 2061 \nlst{nam_dia25h} 2062 %----------------------------------------------------------------------------------------- 2012 \begin{listing} 2013 \nlst{nam_dia25h} 2014 \caption{\forcode{&nam_dia25h}} 2015 \label{lst:nam_dia25h} 2016 \end{listing} 2063 2017 2064 2018 A module is available to compute a crudely detided M2 signal by obtaining a 25 hour mean. … … 2067 2021 This diagnostic is actived with the logical $ln\_dia25h$. 2068 2022 2069 % ----------------------------------------------------------- 2070 % Top Middle and Bed hourly output 2071 % ----------------------------------------------------------- 2023 %% ================================================================================================= 2072 2024 \subsection{Top middle and bed hourly output} 2073 2025 2074 %------------------------------------------nam_diatmb----------------------------------------------------- 2075 2076 \nlst{nam_diatmb} 2077 %---------------------------------------------------------------------------------------------------------- 2026 \begin{listing} 2027 \nlst{nam_diatmb} 2028 \caption{\forcode{&nam_diatmb}} 2029 \label{lst:nam_diatmb} 2030 \end{listing} 2078 2031 2079 2032 A module is available to output the surface (top), mid water and bed diagnostics of a set of standard variables. … … 2083 2036 This diagnostic is actived with the logical $ln\_diatmb$. 2084 2037 2085 % ----------------------------------------------------------- 2086 % Courant numbers 2087 % ----------------------------------------------------------- 2038 %% ================================================================================================= 2088 2039 \subsection{Courant numbers} 2089 2040 … … 2093 2044 \[ 2094 2045 C_u = |u|\frac{\rdt}{e_{1u}}, \quad C_v = |v|\frac{\rdt}{e_{2v}}, \quad C_w = |w|\frac{\rdt}{e_{3w}} 2095 % \label{eq: CFL}2046 % \label{eq:DIA_CFL} 2096 2047 \] 2097 2048 … … 2102 2053 Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 2103 2054 2104 The variables can be activated by setting the \np{nn \_diacfl} namelist parameter to 1 in the \nam{ctl} namelist.2055 The variables can be activated by setting the \np{nn_diacfl}{nn\_diacfl} namelist parameter to 1 in the \nam{ctl}{ctl} namelist. 2105 2056 The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. 2106 2057 In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of … … 2110 2061 The maximum values from the run are also copied to the ocean.output file. 2111 2062 2112 % ================================================================ 2113 2114 \biblio 2115 2116 \pindex 2063 \onlyinsubfile{\input{../../global/epilogue}} 2117 2064 2118 2065 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_DIU.tex
r11435 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Diurnal SST models (DIU) 6 % Edited by James While 7 % ================================================================ 4 8 5 \chapter{Diurnal SST Models (DIU)} 9 6 \label{chap:DIU} 10 7 8 \thispagestyle{plain} 9 11 10 \chaptertoc 12 11 12 \paragraph{Changes record} ~\\ 13 13 14 \newpage 15 $\ $\newline % force a new line 14 {\footnotesize 15 \begin{tabularx}{\textwidth}{l||X|X} 16 Release & Author(s) & Modifications \\ 17 \hline 18 {\em 4.0} & {\em ...} & {\em ...} \\ 19 {\em 3.6} & {\em ...} & {\em ...} \\ 20 {\em 3.4} & {\em ...} & {\em ...} \\ 21 {\em <=3.4} & {\em ...} & {\em ...} 22 \end{tabularx} 23 } 24 25 \clearpage 16 26 17 27 Code to produce an estimate of the diurnal warming and cooling of the sea surface skin … … 19 29 The skin temperature can be split into three parts: 20 30 \begin{itemize} 21 \item 22 A foundation SST which is free from diurnal warming. 23 \item 24 A warm layer, typically ~3\,m thick, 31 \item A foundation SST which is free from diurnal warming. 32 \item A warm layer, typically ~3\,m thick, 25 33 where heating from solar radiation can cause a warm stably stratified layer during the daytime 26 \item 27 A cool skin, a thin layer, approximately ~1\, mm thick, 34 \item A cool skin, a thin layer, approximately ~1\, mm thick, 28 35 where long wave cooling is dominant and cools the immediate ocean surface. 29 36 \end{itemize} … … 36 43 both must be added to a foundation SST to obtain the true skin temperature. 37 44 38 Both the cool skin and warm layer models are controlled through the namelist \nam{diu} :45 Both the cool skin and warm layer models are controlled through the namelist \nam{diu}{diu}: 39 46 40 \nlst{namdiu} 47 \begin{listing} 48 \nlst{namdiu} 49 \caption{\forcode{&namdiu}} 50 \label{lst:namdiu} 51 \end{listing} 52 41 53 This namelist contains only two variables: 42 54 \begin{description} 43 \item[\np{ln\_diurnal}] 44 A logical switch for turning on/off both the cool skin and warm layer. 45 \item[\np{ln\_diurnal\_only}] 46 A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of \NEMO. 47 \np{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln\_diurnal} is \forcode{.false.}. 55 \item [{\np{ln_diurnal}{ln\_diurnal}}] A logical switch for turning on/off both the cool skin and warm layer. 56 \item [{\np{ln_diurnal_only}{ln\_diurnal\_only}}] A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of \NEMO. 57 \np{ln_diurnal_only}{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln_diurnal}{ln\_diurnal} is \forcode{.false.}. 48 58 \end{description} 49 59 … … 55 65 The cool skin model, which is determined purely by the instantaneous fluxes, has no initialisation variable. 56 66 57 % ===============================================================67 %% ================================================================================================= 58 68 \section{Warm layer model} 59 \label{sec:warm_layer_sec} 60 %=============================================================== 69 \label{sec:DIU_warm_layer_sec} 61 70 62 71 The warm layer is calculated using the model of \citet{takaya.bidlot.ea_JGR10} (TAKAYA10 model hereafter). … … 65 74 \frac{\partial{\Delta T_{\mathrm{wl}}}}{\partial{t}}&=&\frac{Q(\nu+1)}{D_T\rho_w c_p 66 75 \nu}-\frac{(\nu+1)ku^*_{w}f(L_a)\Delta T}{D_T\Phi\!\left(\frac{D_T}{L}\right)} \mbox{,} 67 \label{eq: ecmwf1} \\68 L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{eq: ecmwf2}76 \label{eq:DIU_ecmwf1} \\ 77 L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{eq:DIU_ecmwf2} 69 78 \end{align} 70 79 where $\Delta T_{\mathrm{wl}}$ is the temperature difference between the top of the warm layer and the depth $D_T=3$\,m at which there is assumed to be no diurnal signal. 71 In equation (\autoref{eq: ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion coefficient of water,80 In equation (\autoref{eq:DIU_ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion coefficient of water, 72 81 $\kappa=0.4$ is von K\'{a}rm\'{a}n's constant, $c_p$ is the heat capacity at constant pressure of sea water, 73 82 $\rho_w$ is the water density, and $L$ is the Monin-Obukhov length. … … 79 88 the relationship $u^*_{w} = u_{10}\sqrt{\frac{C_d\rho_a}{\rho_w}}$, where $C_d$ is the drag coefficient, 80 89 and $\rho_a$ is the density of air. 81 The symbol $Q$ in equation (\autoref{eq: ecmwf1}) is the instantaneous total thermal energy flux into90 The symbol $Q$ in equation (\autoref{eq:DIU_ecmwf1}) is the instantaneous total thermal energy flux into 82 91 the diurnal layer, \ie 83 92 \[ 84 93 Q = Q_{\mathrm{sol}} + Q_{\mathrm{lw}} + Q_{\mathrm{h}}\mbox{,} 85 % \label{eq: e_flux_eqn}94 % \label{eq:DIU_e_flux_eqn} 86 95 \] 87 96 where $Q_{\mathrm{h}}$ is the sensible and latent heat flux, $Q_{\mathrm{lw}}$ is the long wave flux, 88 97 and $Q_{\mathrm{sol}}$ is the solar flux absorbed within the diurnal warm layer. 89 98 For $Q_{\mathrm{sol}}$ the 9 term representation of \citet{gentemann.minnett.ea_JGR09} is used. 90 In equation \autoref{eq: ecmwf1} the function $f(L_a)=\max(1,L_a^{\frac{2}{3}})$,99 In equation \autoref{eq:DIU_ecmwf1} the function $f(L_a)=\max(1,L_a^{\frac{2}{3}})$, 91 100 where $L_a=0.3$\footnote{ 92 101 This is a global average value, more accurately $L_a$ could be computed as $L_a=(u^*_{w}/u_s)^{\frac{1}{2}}$, … … 99 108 4\zeta^2}{1+3\zeta+0.25\zeta^2} &(\zeta \ge 0) \\ 100 109 (1 - 16\zeta)^{-\frac{1}{2}} & (\zeta < 0) \mbox{,} 101 \end{array} \right. \label{eq: stab_func_eqn}110 \end{array} \right. \label{eq:DIU_stab_func_eqn} 102 111 \end{equation} 103 where $\zeta=\frac{D_T}{L}$. It is clear that the first derivative of (\autoref{eq: stab_func_eqn}),104 and thus of (\autoref{eq: ecmwf1}), is discontinuous at $\zeta=0$ (\ie\ $Q\rightarrow0$ in105 equation (\autoref{eq: ecmwf2})).112 where $\zeta=\frac{D_T}{L}$. It is clear that the first derivative of (\autoref{eq:DIU_stab_func_eqn}), 113 and thus of (\autoref{eq:DIU_ecmwf1}), is discontinuous at $\zeta=0$ (\ie\ $Q\rightarrow0$ in 114 equation (\autoref{eq:DIU_ecmwf2})). 106 115 107 The two terms on the right hand side of (\autoref{eq: ecmwf1}) represent different processes.116 The two terms on the right hand side of (\autoref{eq:DIU_ecmwf1}) represent different processes. 108 117 The first term is simply the diabatic heating or cooling of the diurnal warm layer due to 109 118 thermal energy fluxes into and out of the layer. … … 111 120 In practice the second term acts as a relaxation on the temperature. 112 121 113 %=============================================================== 114 122 %% ================================================================================================= 115 123 \section{Cool skin model} 116 \label{sec:cool_skin_sec} 117 118 %=============================================================== 124 \label{sec:DIU_cool_skin_sec} 119 125 120 126 The cool skin is modelled using the framework of \citet{saunders_JAS67} who used a formulation of the near surface temperature difference based upon the heat flux and the friction velocity $u^*_{w}$. 121 127 As the cool skin is so thin (~1\,mm) we ignore the solar flux component to the heat flux and the Saunders equation for the cool skin temperature difference $\Delta T_{\mathrm{cs}}$ becomes 122 128 \[ 123 % \label{eq: sunders_eqn}129 % \label{eq:DIU_sunders_eqn} 124 130 \Delta T_{\mathrm{cs}}=\frac{Q_{\mathrm{ns}}\delta}{k_t} \mbox{,} 125 131 \] … … 128 134 $\delta$ is the thickness of the skin layer and is given by 129 135 \begin{equation} 130 \label{eq: sunders_thick_eqn}136 \label{eq:DIU_sunders_thick_eqn} 131 137 \delta=\frac{\lambda \mu}{u^*_{w}} \mbox{,} 132 138 \end{equation} … … 134 140 \citet{saunders_JAS67} suggested varied between 5 and 10. 135 141 136 The value of $\lambda$ used in equation (\autoref{eq: sunders_thick_eqn}) is that of \citet{artale.iudicone.ea_JGR02},142 The value of $\lambda$ used in equation (\autoref{eq:DIU_sunders_thick_eqn}) is that of \citet{artale.iudicone.ea_JGR02}, 137 143 which is shown in \citet{tu.tsuang_GRL05} to outperform a number of other parametrisations at 138 144 both low and high wind speeds. 139 145 Specifically, 140 146 \[ 141 % \label{eq: artale_lambda_eqn}147 % \label{eq:DIU_artale_lambda_eqn} 142 148 \lambda = \frac{ 8.64\times10^4 u^*_{w} k_t }{ \rho c_p h \mu \gamma }\mbox{,} 143 149 \] … … 145 151 $\gamma$ is a dimensionless function of wind speed $u$: 146 152 \[ 147 % \label{eq: artale_gamma_eqn}153 % \label{eq:DIU_artale_gamma_eqn} 148 154 \gamma = 149 155 \begin{cases} … … 154 160 \] 155 161 156 \biblio 157 158 \pindex 162 \onlyinsubfile{\input{../../global/epilogue}} 159 163 160 164 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_DOM.tex
r11435 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter 2 ——— Space and Time Domain (DOM) 6 % ================================================================ 4 7 5 \chapter{Space Domain (DOM)} 8 6 \label{chap:DOM} 9 7 10 %\chaptertoc 11 12 % Missing things: 13 % - istate: description of the initial state ==> this has to be put elsewhere.. 14 % perhaps in MISC ? By the way the initialisation of T S and dynamics 15 % should be put outside of DOM routine (better with TRC staff and off-line 16 % tracers) 17 % -geo2ocean: how to switch from geographic to mesh coordinate 18 % - domclo: closed sea and lakes.... management of closea sea area : specific to global configuration, both forced and coupled 19 20 \vfill 21 22 \begin{table}[b] 23 \footnotesize 24 \caption*{Changes record} 25 \begin{tabularx}{\textwidth}{l||X|X} 26 Release & Author(s) & Modifications \\ 27 \hline 28 {\em 4.0} & {\em Simon M\"{u}ller \& Andrew Coward} & 29 {\em 30 Compatibility changes Major simplification has moved many of the options to external domain configuration tools. 31 (see \autoref{apdx:DOMAINcfg}) 32 } \\ 33 {\em 3.x} & {\em Rachid Benshila, Gurvan Madec \& S\'{e}bastien Masson} & 34 {\em First version} \\ 8 % Missing things 9 % - istate: description of the initial state ==> this has to be put elsewhere.. 10 % perhaps in MISC ? By the way the initialisation of T S and dynamics 11 % should be put outside of DOM routine (better with TRC staff and off-line 12 % tracers) 13 % - geo2ocean: how to switch from geographic to mesh coordinate 14 % - domclo: closed sea and lakes.... 15 % management of closea sea area: specific to global cfg, both forced and coupled 16 17 \thispagestyle{plain} 18 19 \chaptertoc 20 21 \paragraph{Changes record} ~\\ 22 23 {\footnotesize 24 \begin{tabularx}{0.8\textwidth}{l||X|X} 25 Release & 26 Author(s) & 27 Modifications \\ 28 \hline 29 {\em 4.0 } & 30 {\em Simon M\"{u}ller \& Andrew Coward \newline \newline 31 Simona Flavoni and Tim Graham } & 32 {\em Compatibility changes: many options moved to external domain configuration tools 33 (see \autoref{apdx:DOMCFG}). \newline 34 Updates } \\ 35 {\em 3.6 } & 36 {\em Rachid Benshila, Christian \'{E}th\'{e}, Pierre Mathiot and Gurvan Madec } & 37 {\em Updates } \\ 38 {\em $\leq$ 3.4 } & 39 {\em Gurvan Madec and S\'{e}bastien Masson } & 40 {\em First version } 35 41 \end{tabularx} 36 \end{table} 37 38 \newpage 39 40 Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretisation \autoref{chap:STP}, 42 } 43 44 \clearpage 45 46 Having defined the continuous equations in \autoref{chap:MB} and 47 chosen a time discretisation \autoref{chap:TD}, 41 48 we need to choose a grid for spatial discretisation and related numerical algorithms. 42 49 In the present chapter, we provide a general description of the staggered grid used in \NEMO, 43 50 and other relevant information about the DOM (DOMain) source code modules. 44 51 45 % ================================================================ 46 % Fundamentals of the Discretisation 47 % ================================================================ 52 %% ================================================================================================= 48 53 \section{Fundamentals of the discretisation} 49 54 \label{sec:DOM_basics} 50 55 51 % ------------------------------------------------------------------------------------------------------------- 52 % Arrangement of Variables 53 % ------------------------------------------------------------------------------------------------------------- 56 %% ================================================================================================= 54 57 \subsection{Arrangement of variables} 55 58 \label{subsec:DOM_cell} 56 59 57 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 58 \begin{figure}[!tb] 59 \begin{center} 60 \includegraphics[width=\textwidth]{Fig_cell} 61 \caption{ 62 \protect\label{fig:cell} 63 Arrangement of variables. 64 $t$ indicates scalar points where temperature, salinity, density, pressure and 65 horizontal divergence are defined. 66 $(u,v,w)$ indicates vector points, and $f$ indicates vorticity points where both relative and 67 planetary vorticities are defined. 68 } 69 \end{center} 60 \begin{figure} 61 \centering 62 \includegraphics[width=0.33\textwidth]{Fig_cell} 63 \caption[Arrangement of variables in the unit cell of space domain]{ 64 Arrangement of variables in the unit cell of space domain. 65 $t$ indicates scalar points where 66 temperature, salinity, density, pressure and horizontal divergence are defined. 67 $(u,v,w)$ indicates vector points, and $f$ indicates vorticity points where 68 both relative and planetary vorticities are defined.} 69 \label{fig:DOM_cell} 70 70 \end{figure} 71 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 72 73 The numerical techniques used to solve the Primitive Equations in this model are based on the traditional, 74 centred second-order finite difference approximation. 71 72 The numerical techniques used to solve the Primitive Equations in this model are based on 73 the traditional, centred second-order finite difference approximation. 75 74 Special attention has been given to the homogeneity of the solution in the three spatial directions. 76 75 The arrangement of variables is the same in all directions. 77 It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with vector points $(u, v, w)$ defined in 78 the centre of each face of the cells (\autoref{fig:cell}). 79 This is the generalisation to three dimensions of the well-known ``C'' grid in Arakawa's classification 80 \citep{mesinger.arakawa_bk76}. 81 The relative and planetary vorticity, $\zeta$ and $f$, are defined in the centre of each vertical edge and 82 the barotropic stream function $\psi$ is defined at horizontal points overlying the $\zeta$ and $f$-points. 83 84 The ocean mesh (\ie\ the position of all the scalar and vector points) is defined by the transformation that 85 gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 86 The grid-points are located at integer or integer and a half value of $(i,j,k)$ as indicated on \autoref{tab:cell}. 87 In all the following, subscripts $u$, $v$, $w$, $f$, $uw$, $vw$ or $fw$ indicate the position of 88 the grid-point where the scale factors are defined. 89 Each scale factor is defined as the local analytical value provided by \autoref{eq:scale_factors}. 76 It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with 77 vector points $(u, v, w)$ defined in the centre of each face of the cells (\autoref{fig:DOM_cell}). 78 This is the generalisation to three dimensions of the well-known ``C'' grid in 79 Arakawa's classification \citep{mesinger.arakawa_bk76}. 80 The relative and planetary vorticity, $\zeta$ and $f$, are defined in the centre of each 81 vertical edge and the barotropic stream function $\psi$ is defined at horizontal points overlying 82 the $\zeta$ and $f$-points. 83 84 The ocean mesh (\ie\ the position of all the scalar and vector points) is defined by 85 the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 86 The grid-points are located at integer or integer and a half value of $(i,j,k)$ as indicated on 87 \autoref{tab:DOM_cell}. 88 In all the following, 89 subscripts $u$, $v$, $w$, $f$, $uw$, $vw$ or $fw$ indicate the position of the grid-point where 90 the scale factors are defined. 91 Each scale factor is defined as the local analytical value provided by \autoref{eq:MB_scale_factors}. 90 92 As a result, the mesh on which partial derivatives $\pd[]{\lambda}$, $\pd[]{\varphi}$ and 91 93 $\pd[]{z}$ are evaluated is a uniform mesh with a grid size of unity. 92 Discrete partial derivatives are formulated by the traditional, centred second order finite difference approximation 93 while the scale factors are chosen equal to their local analytical value. 94 Discrete partial derivatives are formulated by 95 the traditional, centred second order finite difference approximation while 96 the scale factors are chosen equal to their local analytical value. 94 97 An important point here is that the partial derivative of the scale factors must be evaluated by 95 98 centred finite difference approximation, not from their analytical expression. 96 This preserves the symmetry of the discrete set of equations and therefore satisfies many of97 the continuous properties (see \autoref{apdx:C}).99 This preserves the symmetry of the discrete set of equations and 100 therefore satisfies many of the continuous properties (see \autoref{apdx:INVARIANTS}). 98 101 A similar, related remark can be made about the domain size: 99 when needed, an area, volume, or the total ocean depth must be evaluated as the product or sum of the relevant scale factors 100 (see \autoref{eq:DOM_bar} in the next section). 101 102 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 103 \begin{table}[!tb] 104 \begin{center} 105 \begin{tabular}{|p{46pt}|p{56pt}|p{56pt}|p{56pt}|} 106 \hline 107 t & $i $ & $j $ & $k $ \\ 108 \hline 109 u & $i + 1/2$ & $j $ & $k $ \\ 110 \hline 111 v & $i $ & $j + 1/2$ & $k $ \\ 112 \hline 113 w & $i $ & $j $ & $k + 1/2$ \\ 114 \hline 115 f & $i + 1/2$ & $j + 1/2$ & $k $ \\ 116 \hline 117 uw & $i + 1/2$ & $j $ & $k + 1/2$ \\ 118 \hline 119 vw & $i $ & $j + 1/2$ & $k + 1/2$ \\ 120 \hline 121 fw & $i + 1/2$ & $j + 1/2$ & $k + 1/2$ \\ 122 \hline 123 \end{tabular} 124 \caption{ 125 \protect\label{tab:cell} 126 Location of grid-points as a function of integer or integer and a half value of the column, line or level. 127 This indexing is only used for the writing of the semi -discrete equations. 128 In the code, the indexing uses integer values only and is positive downwards in the vertical with $k=1$ at the surface. 129 (see \autoref{subsec:DOM_Num_Index}) 130 } 131 \end{center} 102 when needed, an area, volume, or the total ocean depth must be evaluated as 103 the product or sum of the relevant scale factors (see \autoref{eq:DOM_bar} in the next section). 104 105 \begin{table} 106 \centering 107 \begin{tabular}{|l|l|l|l|} 108 \hline 109 t & $i $ & $j $ & $k $ \\ 110 \hline 111 u & $i + 1/2$ & $j $ & $k $ \\ 112 \hline 113 v & $i $ & $j + 1/2$ & $k $ \\ 114 \hline 115 w & $i $ & $j $ & $k + 1/2$ \\ 116 \hline 117 f & $i + 1/2$ & $j + 1/2$ & $k $ \\ 118 \hline 119 uw & $i + 1/2$ & $j $ & $k + 1/2$ \\ 120 \hline 121 vw & $i $ & $j + 1/2$ & $k + 1/2$ \\ 122 \hline 123 fw & $i + 1/2$ & $j + 1/2$ & $k + 1/2$ \\ 124 \hline 125 \end{tabular} 126 \caption[Location of grid-points]{ 127 Location of grid-points as a function of integer or 128 integer and a half value of the column, line or level. 129 This indexing is only used for the writing of the semi-discrete equations. 130 In the code, the indexing uses integer values only and 131 is positive downwards in the vertical with $k=1$ at the surface. 132 (see \autoref{subsec:DOM_Num_Index})} 133 \label{tab:DOM_cell} 132 134 \end{table} 133 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>134 135 135 136 Note that the definition of the scale factors … … 143 144 firstly, there is no ambiguity in the scale factors appearing in the discrete equations, 144 145 since they are first introduced in the continuous equations; 145 secondly, analytical transformations encourage good practice by the definition of smoothly varying grids 146 (rather than allowing the user to set arbitrary jumps in thickness between adjacent layers) \citep{treguier.dukowicz.ea_JGR96}. 147 An example of the effect of such a choice is shown in \autoref{fig:zgr_e3}. 148 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 149 \begin{figure}[!t] 150 \begin{center} 151 \includegraphics[width=\textwidth]{Fig_zgr_e3} 152 \caption{ 153 \protect\label{fig:zgr_e3} 154 Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, 155 and (b) analytically derived grid-point position and scale factors. 156 For both grids here, the same $w$-point depth has been chosen but 157 in (a) the $t$-points are set half way between $w$-points while 158 in (b) they are defined from an analytical function: 159 $z(k) = 5 \, (k - 1/2)^3 - 45 \, (k - 1/2)^2 + 140 \, (k - 1/2) - 150$. 160 Note the resulting difference between the value of the grid-size $\Delta_k$ and 161 those of the scale factor $e_k$. 162 } 163 \end{center} 146 secondly, analytical transformations encourage good practice by 147 the definition of smoothly varying grids 148 (rather than allowing the user to set arbitrary jumps in thickness between adjacent layers) 149 \citep{treguier.dukowicz.ea_JGR96}. 150 An example of the effect of such a choice is shown in \autoref{fig:DOM_zgr_e3}. 151 \begin{figure} 152 \centering 153 \includegraphics[width=0.5\textwidth]{Fig_zgr_e3} 154 \caption[Comparison of grid-point position, vertical grid-size and scale factors]{ 155 Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, 156 and (b) analytically derived grid-point position and scale factors. 157 For both grids here, the same $w$-point depth has been chosen but 158 in (a) the $t$-points are set half way between $w$-points while 159 in (b) they are defined from an analytical function: 160 $z(k) = 5 \, (k - 1/2)^3 - 45 \, (k - 1/2)^2 + 140 \, (k - 1/2) - 150$. 161 Note the resulting difference between the value of the grid-size $\Delta_k$ and 162 those of the scale factor $e_k$.} 163 \label{fig:DOM_zgr_e3} 164 164 \end{figure} 165 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 166 167 % ------------------------------------------------------------------------------------------------------------- 168 % Vector Invariant Formulation 169 % ------------------------------------------------------------------------------------------------------------- 165 166 %% ================================================================================================= 170 167 \subsection{Discrete operators} 171 168 \label{subsec:DOM_operators} 172 169 173 Given the values of a variable $q$ at adjacent points, the differencing and averaging operators at174 the midpoint between them are:170 Given the values of a variable $q$ at adjacent points, 171 the differencing and averaging operators at the midpoint between them are: 175 172 \begin{alignat*}{2} 176 % \label{eq: di_mi}173 % \label{eq:DOM_di_mi} 177 174 \delta_i [q] &= & &q (i + 1/2) - q (i - 1/2) \\ 178 175 \overline q^{\, i} &= &\big\{ &q (i + 1/2) + q (i - 1/2) \big\} / 2 … … 180 177 181 178 Similar operators are defined with respect to $i + 1/2$, $j$, $j + 1/2$, $k$, and $k + 1/2$. 182 Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at a $t$-point has 183 its three components defined at $u$-, $v$- and $w$-points while its Laplacian is defined at the $t$-point. 179 Following \autoref{eq:MB_grad} and \autoref{eq:MB_lap}, 180 the gradient of a variable $q$ defined at a $t$-point has 181 its three components defined at $u$-, $v$- and $w$-points while 182 its Laplacian is defined at the $t$-point. 184 183 These operators have the following discrete forms in the curvilinear $s$-coordinates system: 185 \ [184 \begin{gather*} 186 185 % \label{eq:DOM_grad} 187 186 \nabla q \equiv \frac{1}{e_{1u}} \delta_{i + 1/2} [q] \; \, \vect i 188 187 + \frac{1}{e_{2v}} \delta_{j + 1/2} [q] \; \, \vect j 189 + \frac{1}{e_{3w}} \delta_{k + 1/2} [q] \; \, \vect k 190 \] 191 \begin{multline*} 188 + \frac{1}{e_{3w}} \delta_{k + 1/2} [q] \; \, \vect k \\ 192 189 % \label{eq:DOM_lap} 193 190 \Delta q \equiv \frac{1}{e_{1t} \, e_{2t} \, e_{3t}} 194 191 \; \lt[ \delta_i \lt( \frac{e_{2u} \, e_{3u}}{e_{1u}} \; \delta_{i + 1/2} [q] \rt) 195 + \delta_j \lt( \frac{e_{1v} \, e_{3v}}{e_{2v}} \; \delta_{j + 1/2} [q] \rt) \; \rt] \\192 + \delta_j \lt( \frac{e_{1v} \, e_{3v}}{e_{2v}} \; \delta_{j + 1/2} [q] \rt) \; \rt] 196 193 + \frac{1}{e_{3t}} 197 194 \delta_k \lt[ \frac{1 }{e_{3w}} \; \delta_{k + 1/2} [q] \rt] 198 \end{multline*} 199 200 Following \autoref{eq:PE_curl} and \autoref{eq:PE_div}, a vector $\vect A = (a_1,a_2,a_3)$ defined at 201 vector points $(u,v,w)$ has its three curl components defined at $vw$-, $uw$, and $f$-points, and 195 \end{gather*} 196 197 Following \autoref{eq:MB_curl} and \autoref{eq:MB_div}, 198 a vector $\vect A = (a_1,a_2,a_3)$ defined at vector points $(u,v,w)$ has 199 its three curl components defined at $vw$-, $uw$, and $f$-points, and 202 200 its divergence defined at $t$-points: 203 \begin{multline }201 \begin{multline*} 204 202 % \label{eq:DOM_curl} 205 203 \nabla \times \vect A \equiv \frac{1}{e_{2v} \, e_{3vw}} … … 212 210 \Big[ \delta_{i + 1/2} (e_{2v} \, a_2) 213 211 - \delta_{j + 1/2} (e_{1u} \, a_1) \Big] \vect k 214 \end{multline }215 \ begin{equation}212 \end{multline*} 213 \[ 216 214 % \label{eq:DOM_div} 217 215 \nabla \cdot \vect A \equiv \frac{1}{e_{1t} \, e_{2t} \, e_{3t}} 218 216 \Big[ \delta_i (e_{2u} \, e_{3u} \, a_1) + \delta_j (e_{1v} \, e_{3v} \, a_2) \Big] 219 217 + \frac{1}{e_{3t}} \delta_k (a_3) 220 \ end{equation}221 222 The vertical average over the whole water column is denoted by an overbar and is for223 a masked field $q$ (\ie\ a quantity that is equal to zero inside solid areas):218 \] 219 220 The vertical average over the whole water column is denoted by an overbar and 221 is for a masked field $q$ (\ie\ a quantity that is equal to zero inside solid areas): 224 222 \begin{equation} 225 223 \label{eq:DOM_bar} … … 227 225 \end{equation} 228 226 where $H_q$ is the ocean depth, which is the masked sum of the vertical scale factors at $q$ points, 229 $k^b$ and $k^o$ are the bottom and surface $k$-indices, and the symbol $\sum \limits_k$ refers to a summation over 230 all grid points of the same type in the direction indicated by the subscript (here $k$). 227 $k^b$ and $k^o$ are the bottom and surface $k$-indices, 228 and the symbol $\sum \limits_k$ refers to a summation over all grid points of the same type in 229 the direction indicated by the subscript (here $k$). 231 230 232 231 In continuous form, the following properties are satisfied: … … 238 237 \end{gather} 239 238 240 It is straightforward to demonstrate that these properties are verified locally in discrete form as soon as241 the scalar $q$ is taken at $t$-points and the vector $\vect A$ has its components defined at239 It is straightforward to demonstrate that these properties are verified locally in discrete form as 240 soon as the scalar $q$ is taken at $t$-points and the vector $\vect A$ has its components defined at 242 241 vector points $(u,v,w)$. 243 242 244 243 Let $a$ and $b$ be two fields defined on the mesh, with a value of zero inside continental areas. 245 It can be shown that the differencing operators ($\delta_i$, $\delta_j$ and $\delta_k$) 246 are skew-symmetric linear operators, and further that the averaging operators $\overline{\cdots}^{\, i}$, 247 $\overline{\cdots}^{\, j}$ and $\overline{\cdots}^{\, k}$) are symmetric linear operators, \ie 248 \begin{alignat}{4} 244 It can be shown that the differencing operators ($\delta_i$, $\delta_j$ and 245 $\delta_k$) are skew-symmetric linear operators, 246 and further that the averaging operators ($\overline{\cdots}^{\, i}$, $\overline{\cdots}^{\, j}$ and 247 $\overline{\cdots}^{\, k}$) are symmetric linear operators, \ie 248 \begin{alignat}{5} 249 249 \label{eq:DOM_di_adj} 250 250 &\sum \limits_i a_i \; \delta_i [b] &\equiv &- &&\sum \limits_i \delta _{ i + 1/2} [a] &b_{i + 1/2} \\ … … 253 253 \end{alignat} 254 254 255 In other words, the adjoint of the differencing and averaging operators are $\delta_i^* = \delta_{i + 1/2}$ and 255 In other words, 256 the adjoint of the differencing and averaging operators are $\delta_i^* = \delta_{i + 1/2}$ and 256 257 $(\overline{\cdots}^{\, i})^* = \overline{\cdots}^{\, i + 1/2}$, respectively. 257 These two properties will be used extensively in the \autoref{apdx: C} to258 These two properties will be used extensively in the \autoref{apdx:INVARIANTS} to 258 259 demonstrate integral conservative properties of the discrete formulation chosen. 259 260 260 % ------------------------------------------------------------------------------------------------------------- 261 % Numerical Indexing 262 % ------------------------------------------------------------------------------------------------------------- 261 %% ================================================================================================= 263 262 \subsection{Numerical indexing} 264 263 \label{subsec:DOM_Num_Index} 265 264 266 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 267 \begin{figure}[!tb] 268 \begin{center} 269 \includegraphics[width=\textwidth]{Fig_index_hor} 270 \caption{ 271 \protect\label{fig:index_hor} 272 Horizontal integer indexing used in the \fortran code. 273 The dashed area indicates the cell in which variables contained in arrays have the same $i$- and $j$-indices 274 } 275 \end{center} 265 \begin{figure} 266 \centering 267 \includegraphics[width=0.33\textwidth]{Fig_index_hor} 268 \caption[Horizontal integer indexing]{ 269 Horizontal integer indexing used in the \fortran\ code. 270 The dashed area indicates the cell in which 271 variables contained in arrays have the same $i$- and $j$-indices} 272 \label{fig:DOM_index_hor} 276 273 \end{figure} 277 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 278 279 The array representation used in the \fortran code requires an integer indexing. 280 However, the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is associated with the use of 281 integer values for $t$-points only whileall the other points involve integer and a half values.274 275 The array representation used in the \fortran\ code requires an integer indexing. 276 However, the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is associated with 277 the use of integer values for $t$-points only while 278 all the other points involve integer and a half values. 282 279 Therefore, a specific integer indexing has been defined for points other than $t$-points 283 280 (\ie\ velocity and vorticity grid-points). 284 Furthermore, the direction of the vertical indexing has been reversed and the surface level set at $k = 1$. 285 286 % ----------------------------------- 287 % Horizontal Indexing 288 % ----------------------------------- 281 Furthermore, the direction of the vertical indexing has been reversed and 282 the surface level set at $k = 1$. 283 284 %% ================================================================================================= 289 285 \subsubsection{Horizontal indexing} 290 286 \label{subsec:DOM_Num_Index_hor} 291 287 292 The indexing in the horizontal plane has been chosen as shown in \autoref{fig: index_hor}.288 The indexing in the horizontal plane has been chosen as shown in \autoref{fig:DOM_index_hor}. 293 289 For an increasing $i$ index ($j$ index), 294 290 the $t$-point and the eastward $u$-point (northward $v$-point) have the same index 295 (see the dashed area in \autoref{fig: index_hor}).291 (see the dashed area in \autoref{fig:DOM_index_hor}). 296 292 A $t$-point and its nearest north-east $f$-point have the same $i$-and $j$-indices. 297 293 298 % ----------------------------------- 299 % Vertical indexing 300 % ----------------------------------- 294 %% ================================================================================================= 301 295 \subsubsection{Vertical indexing} 302 296 \label{subsec:DOM_Num_Index_vertical} 303 297 304 In the vertical, the chosen indexing requires special attention since the direction of the $k$-axis in305 the \fortran code is the reverse of that used in the semi -discrete equations and306 given in \autoref{subsec:DOM_cell}.307 The sea surface corresponds to the $w$-level $k = 1$, which is the same index as the $t$-level just below308 (\autoref{fig:index_vert}).298 In the vertical, the chosen indexing requires special attention since 299 the direction of the $k$-axis in the \fortran\ code is the reverse of 300 that used in the semi-discrete equations and given in \autoref{subsec:DOM_cell}. 301 The sea surface corresponds to the $w$-level $k = 1$, 302 which is the same index as the $t$-level just below (\autoref{fig:DOM_index_vert}). 309 303 The last $w$-level ($k = jpk$) either corresponds to or is below the ocean floor while 310 the last $t$-level is always outside the ocean domain (\autoref{fig: index_vert}).304 the last $t$-level is always outside the ocean domain (\autoref{fig:DOM_index_vert}). 311 305 Note that a $w$-point and the directly underlaying $t$-point have a common $k$ index 312 306 (\ie\ $t$-points and their nearest $w$-point neighbour in negative index direction), 313 in contrast to the indexing on the horizontal plane where the $t$-point has the same index as 314 the nearest velocity points in the positive direction of the respective horizontal axis index 315 (compare the dashed area in \autoref{fig:index_hor} and \autoref{fig:index_vert}). 307 in contrast to the indexing on the horizontal plane where 308 the $t$-point has the same index as the nearest velocity points in 309 the positive direction of the respective horizontal axis index 310 (compare the dashed area in \autoref{fig:DOM_index_hor} and \autoref{fig:DOM_index_vert}). 316 311 Since the scale factors are chosen to be strictly positive, 317 a \textit{minus sign} is included in the \fortran implementations of312 a \textit{minus sign} is included in the \fortran\ implementations of 318 313 \textit{all the vertical derivatives} of the discrete equations given in this manual in order to 319 314 accommodate the opposing vertical index directions in implementation and documentation. 320 315 321 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 322 \begin{figure}[!pt] 323 \begin{center} 324 \includegraphics[width=\textwidth]{Fig_index_vert} 325 \caption{ 326 \protect\label{fig:index_vert} 327 Vertical integer indexing used in the \fortran code. 328 Note that the $k$-axis is oriented downward. 329 The dashed area indicates the cell in which variables contained in arrays have a common $k$-index. 330 } 331 \end{center} 316 \begin{figure} 317 \centering 318 \includegraphics[width=0.33\textwidth]{Fig_index_vert} 319 \caption[Vertical integer indexing]{ 320 Vertical integer indexing used in the \fortran\ code. 321 Note that the $k$-axis is oriented downward. 322 The dashed area indicates the cell in which 323 variables contained in arrays have a common $k$-index.} 324 \label{fig:DOM_index_vert} 332 325 \end{figure} 333 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 334 335 % ------------------------------------------------------------------------------------------------------------- 336 % Domain configuration 337 % ------------------------------------------------------------------------------------------------------------- 326 327 %% ================================================================================================= 338 328 \section{Spatial domain configuration} 339 329 \label{subsec:DOM_config} 340 330 341 \nlst{namcfg}342 343 331 Two typical methods are available to specify the spatial domain configuration; 344 they can be selected using parameter \np{ln\_read\_cfg} parameter in namelist \nam{cfg}. 345 346 If \np{ln\_read\_cfg} is set to \forcode{.true.}, 347 the domain-specific parameters and fields are read from a netCDF input file, 348 whose name (without its .nc suffix) can be specified as the value of the \np{cn\_domcfg} parameter in namelist \nam{cfg}. 349 350 If \np{ln\_read\_cfg} is set to \forcode{.false.}, 332 they can be selected using parameter \np{ln_read_cfg}{ln\_read\_cfg} parameter in 333 namelist \nam{cfg}{cfg}. 334 335 If \np{ln_read_cfg}{ln\_read\_cfg} is set to \forcode{.true.}, 336 the domain-specific parameters and fields are read from a NetCDF input file, 337 whose name (without its .nc suffix) can be specified as 338 the value of the \np{cn_domcfg}{cn\_domcfg} parameter in namelist \nam{cfg}{cfg}. 339 340 If \np{ln_read_cfg}{ln\_read\_cfg} is set to \forcode{.false.}, 351 341 the domain-specific parameters and fields can be provided (\eg\ analytically computed) by 352 342 subroutines \mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}. 353 343 These subroutines can be supplied in the \path{MY_SRC} directory of the configuration, 354 and default versions that configure the spatial domain for the GYRE reference configuration are present in355 the \path{./src/OCE/USR} directory.344 and default versions that configure the spatial domain for the GYRE reference configuration are 345 present in the \path{./src/OCE/USR} directory. 356 346 357 347 In version 4.0 there are no longer any options for reading complex bathymetries and … … 360 350 to run similar models with and without partial bottom boxes and/or sigma-coordinates, 361 351 supporting such choices leads to overly complex code. 362 Worse still is the difficulty of ensuring the model configurations intended to be identical are indeed so when 363 the model domain itself can be altered by runtime selections. 364 The code previously used to perform vertical discretisation has been incorporated into an external tool 365 (\path{./tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMAINcfg}. 366 367 The next subsections summarise the parameter and fields related to the configuration of the whole model domain. 368 These represent the minimum information that must be provided either via the \np{cn\_domcfg} file or set by code 369 inserted into user-supplied versions of the \texttt{usrdef\_*} subroutines. 352 Worse still is the difficulty of ensuring the model configurations intended to be identical are 353 indeed so when the model domain itself can be altered by runtime selections. 354 The code previously used to perform vertical discretisation has been incorporated into 355 an external tool (\path{./tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMCFG}. 356 357 The next subsections summarise the parameter and fields related to 358 the configuration of the whole model domain. 359 These represent the minimum information that must be provided either via 360 the \np{cn_domcfg}{cn\_domcfg} file or 361 set by code inserted into user-supplied versions of the \texttt{usrdef\_*} subroutines. 370 362 The requirements are presented in three sections: 371 363 the domain size (\autoref{subsec:DOM_size}), the horizontal mesh (\autoref{subsec:DOM_hgr}), 372 364 and the vertical grid (\autoref{subsec:DOM_zgr}). 373 365 374 % ----------------------------------- 375 % Domain Size 376 % ----------------------------------- 366 %% ================================================================================================= 377 367 \subsection{Domain size} 378 368 \label{subsec:DOM_size} 379 369 380 The total size of the computational domain is set by the parameters \jp{jpiglo}, \jp{jpjglo} and \jp{jpkglo} for381 the $i$, $j$ and $k$ directions, respectively.382 Note, that the variables \texttt{jpi} and \texttt{jpj} refer to the size of each processor subdomain when383 the code is run in parallel using domain decomposition (\key{mpp\_mpi} defined,384 see \autoref{sec:LBC_mpp}).385 386 The name of the configuration is set through parameter \np{cn \_cfg},387 and the nominal resolution through parameter \np{nn \_cfg}370 The total size of the computational domain is set by the parameters \jp{jpiglo}, \jp{jpjglo} and 371 \jp{jpkglo} for the $i$, $j$ and $k$ directions, respectively. 372 Note, that the variables \texttt{jpi} and \texttt{jpj} refer to 373 the size of each processor subdomain when the code is run in parallel using domain decomposition 374 (\key{mpp\_mpi} defined, see \autoref{sec:LBC_mpp}). 375 376 The name of the configuration is set through parameter \np{cn_cfg}{cn\_cfg}, 377 and the nominal resolution through parameter \np{nn_cfg}{nn\_cfg} 388 378 (unless in the input file both of variables \texttt{ORCA} and \texttt{ORCA\_index} are present, 389 in which case \np{cn \_cfg} and \np{nn\_cfg} are set from these values accordingly).379 in which case \np{cn_cfg}{cn\_cfg} and \np{nn_cfg}{nn\_cfg} are set from these values accordingly). 390 380 391 381 The global lateral boundary condition type is selected from 8 options using parameter \jp{jperio}. 392 See \autoref{sec:LBC_jperio} for details on the available options and the corresponding values for \jp{jperio}. 393 394 % ================================================================ 395 % Domain: Horizontal Grid (mesh) 396 % ================================================================ 397 \subsection{Horizontal grid mesh (\protect\mdl{domhgr})} 382 See \autoref{sec:LBC_jperio} for details on the available options and 383 the corresponding values for \jp{jperio}. 384 385 %% ================================================================================================= 386 \subsection[Horizontal grid mesh (\textit{domhgr.F90}]{Horizontal grid mesh (\protect\mdl{domhgr})} 398 387 \label{subsec:DOM_hgr} 399 388 400 % ================================================================ 401 % Domain: List of hgr-related fields needed 402 % ================================================================ 389 %% ================================================================================================= 403 390 \subsubsection{Required fields} 404 391 \label{sec:DOM_hgr_fields} 405 392 406 The explicit specification of a range of mesh-related fields are required for the definition of a configuration. 393 The explicit specification of a range of mesh-related fields are required for 394 the definition of a configuration. 407 395 These include: 408 396 409 397 \begin{clines} 410 int jpiglo, jpjglo, jpkglo /* global domain sizes*/411 int jperio /* lateral global domain b.c.*/412 double glamt, glamu, glamv, glamf /* geographic longitude (t,u,v and f points respectively)*/413 double gphit, gphiu, gphiv, gphif /* geographic latitude*/414 double e1t, e1u, e1v, e1f /* horizontal scale factors*/415 double e2t, e2u, e2v, e2f /* horizontal scale factors*/398 int jpiglo, jpjglo, jpkglo /* global domain sizes */ 399 int jperio /* lateral global domain b.c. */ 400 double glamt, glamu, glamv, glamf /* geographic longitude (t,u,v and f points respectively) */ 401 double gphit, gphiu, gphiv, gphif /* geographic latitude */ 402 double e1t, e1u, e1v, e1f /* horizontal scale factors */ 403 double e2t, e2u, e2v, e2f /* horizontal scale factors */ 416 404 \end{clines} 417 405 418 406 The values of the geographic longitude and latitude arrays at indices $i,j$ correspond to 419 407 the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$, 420 evaluated at the values as specified in \autoref{tab: cell} for the respective grid-point position.408 evaluated at the values as specified in \autoref{tab:DOM_cell} for the respective grid-point position. 421 409 The calculation of the values of the horizontal scale factor arrays in general additionally involves 422 410 partial derivatives of $\lambda$ and $\varphi$ with respect to $i$ and $j$, 423 411 evaluated for the same arguments as $\lambda$ and $\varphi$. 424 412 413 %% ================================================================================================= 425 414 \subsubsection{Optional fields} 426 415 427 416 \begin{clines} 428 /* Optional:*/429 int ORCA, ORCA_index /* configuration name, configuration resolution*/430 double e1e2u, e1e2v /* U and V surfaces (if grid size reduction in some straits)*/431 double ff_f, ff_t /* Coriolis parameter (if not on the sphere)*/417 /* Optional: */ 418 int ORCA, ORCA_index /* configuration name, configuration resolution */ 419 double e1e2u, e1e2v /* U and V surfaces (if grid size reduction in some straits) */ 420 double ff_f, ff_t /* Coriolis parameter (if not on the sphere) */ 432 421 \end{clines} 433 422 … … 436 425 This is particularly useful for locations such as Gibraltar or Indonesian Throughflow pinch-points 437 426 (see \autoref{sec:MISC_strait} for illustrated examples). 438 The key is to reduce the faces of $T$-cell (\ie\ change the value of the horizontal scale factors at $u$- or $v$-point) but 427 The key is to reduce the faces of $T$-cell 428 (\ie\ change the value of the horizontal scale factors at $u$- or $v$-point) but 439 429 not the volume of the cells. 440 430 Doing otherwise can lead to numerical instability issues. 441 431 In normal operation the surface areas are computed from $e1u * e2u$ and $e1v * e2v$ but 442 432 in cases where a gridsize reduction is required, 443 the unaltered surface areas at $u$ and $v$ grid points (\texttt{e1e2u} and \texttt{e1e2v}, respectively) must be read or 444 pre-computed in \mdl{usrdef\_hgr}. 445 If these arrays are present in the \np{cn\_domcfg} file they are read and the internal computation is suppressed. 446 Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{e1e2u} and \texttt{e1e2v} should set 447 the surface-area computation flag: 433 the unaltered surface areas at $u$ and $v$ grid points 434 (\texttt{e1e2u} and \texttt{e1e2v}, respectively) must be read or pre-computed in \mdl{usrdef\_hgr}. 435 If these arrays are present in the \np{cn_domcfg}{cn\_domcfg} file they are read and 436 the internal computation is suppressed. 437 Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{e1e2u} and \texttt{e1e2v} should 438 set the surface-area computation flag: 448 439 \texttt{ie1e2u\_v} to a non-zero value to suppress their re-computation. 449 440 450 441 \smallskip 451 442 Similar logic applies to the other optional fields: 452 \texttt{ff\_f} and \texttt{ff\_t} which can be used to provide the Coriolis parameter at F- and T-points respectively if 453 the mesh is not on a sphere. 454 If present these fields will be read and used and the normal calculation ($2 * \Omega * \sin(\varphi)$) suppressed. 455 Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{ff\_f} and \texttt{ff\_t} should set 456 the Coriolis computation flag: 443 \texttt{ff\_f} and \texttt{ff\_t} which can be used to 444 provide the Coriolis parameter at F- and T-points respectively if the mesh is not on a sphere. 445 If present these fields will be read and used and 446 the normal calculation ($2 * \Omega * \sin(\varphi)$) suppressed. 447 Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{ff\_f} and \texttt{ff\_t} should 448 set the Coriolis computation flag: 457 449 \texttt{iff} to a non-zero value to suppress their re-computation. 458 450 459 Note that longitudes, latitudes, and scale factors at $w$ points are exactly equal to those of $t$ points, 460 thus no specific arrays are defined at $w$ points. 461 462 463 % ================================================================ 464 % Domain: Vertical Grid (domzgr) 465 % ================================================================ 466 \subsection[Vertical grid (\textit{domzgr.F90})] 467 {Vertical grid (\protect\mdl{domzgr})} 451 Note that longitudes, latitudes, and scale factors at $w$ points are exactly equal to 452 those of $t$ points, thus no specific arrays are defined at $w$ points. 453 454 %% ================================================================================================= 455 \subsection[Vertical grid (\textit{domzgr.F90})]{Vertical grid (\protect\mdl{domzgr})} 468 456 \label{subsec:DOM_zgr} 469 %-----------------------------------------namdom------------------------------------------- 470 \nlst{namdom} 471 %------------------------------------------------------------------------------------------------------------- 457 458 \begin{listing} 459 \nlst{namdom} 460 \caption{\forcode{&namdom}} 461 \label{lst:namdom} 462 \end{listing} 472 463 473 464 In the vertical, the model mesh is determined by four things: 474 465 \begin{enumerate} 475 \item the bathymetry given in meters; 476 \item the number of levels of the model (\jp{jpk}); 477 \item the analytical transformation $z(i,j,k)$ and the vertical scale factors (derivatives of the transformation); and 478 \item the masking system, \ie\ the number of wet model levels at each 479 $(i,j)$ location of the horizontal grid. 466 \item the bathymetry given in meters; 467 \item the number of levels of the model (\jp{jpk}); 468 \item the analytical transformation $z(i,j,k)$ and the vertical scale factors 469 (derivatives of the transformation); and 470 \item the masking system, 471 \ie\ the number of wet model levels at each $(i,j)$ location of the horizontal grid. 480 472 \end{enumerate} 481 473 482 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 483 \begin{figure}[!tb] 484 \ begin{center}485 \includegraphics[width=\textwidth]{Fig_z_zps_s_sps}486 \caption{487 \protect\label{fig:z_zps_s_sps}488 The ocean bottom as seen by the model:489 (a) $z$-coordinate with full step,490 (b) $z$-coordinate with partial step,491 (c) $s$-coordinate: terrain following representation,492 (d) hybrid $s-z$ coordinate,493 (e) hybrid $s-z$ coordinate with partial step, and494 ( f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}\forcode{ = .false.}).495 Note that the non-linear free surface can be used with any of the 5 coordinates (a) to (e).496 497 \ end{center}474 \begin{figure} 475 \centering 476 \includegraphics[width=0.5\textwidth]{Fig_z_zps_s_sps} 477 \caption[Ocean bottom regarding coordinate systems ($z$, $s$ and hybrid $s-z$)]{ 478 The ocean bottom as seen by the model: 479 \begin{enumerate*}[label=(\textit{\alph*})] 480 \item $z$-coordinate with full step, 481 \item $z$-coordinate with partial step, 482 \item $s$-coordinate: terrain following representation, 483 \item hybrid $s-z$ coordinate, 484 \item hybrid $s-z$ coordinate with partial step, and 485 \item same as (e) but in the non-linear free surface 486 (\protect\np[=.false.]{ln_linssh}{ln\_linssh}). 487 \end{enumerate*} 488 Note that the non-linear free surface can be used with any of the 5 coordinates (a) to (e).} 489 \label{fig:DOM_z_zps_s_sps} 498 490 \end{figure} 499 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>500 491 501 492 The choice of a vertical coordinate is made when setting up the configuration; 502 493 it is not intended to be an option which can be changed in the middle of an experiment. 503 494 The one exception to this statement being the choice of linear or non-linear free surface. 504 In v4.0 the linear free surface option is implemented as a special case of the non-linear free surface. 495 In v4.0 the linear free surface option is implemented as 496 a special case of the non-linear free surface. 505 497 This is computationally wasteful since it uses the structures for time-varying 3D metrics 506 498 for fields that (in the linear free surface case) are fixed. 507 However, the linear free-surface is rarely used and implementing it this way means 508 a single configuration file can support both options. 509 510 By default a non-linear free surface is used (\np{ln\_linssh} set to \forcode{ = .false.} in \nam{dom}): 511 the coordinate follow the time-variation of the free surface so that the transformation is time dependent: 512 $z(i,j,k,t)$ (\eg\ \autoref{fig:z_zps_s_sps}f). 513 When a linear free surface is assumed (\np{ln\_linssh} set to \forcode{ = .true.} in \nam{dom}), 514 the vertical coordinates are fixed in time, but the seawater can move up and down across the $z_0$ surface 499 However, the linear free-surface is rarely used and 500 implementing it this way means a single configuration file can support both options. 501 502 By default a non-linear free surface is used 503 (\np{ln_linssh}{ln\_linssh} set to \forcode{=.false.} in \nam{dom}{dom}): 504 the coordinate follow the time-variation of the free surface so that 505 the transformation is time dependent: $z(i,j,k,t)$ (\eg\ \autoref{fig:DOM_z_zps_s_sps}f). 506 When a linear free surface is assumed 507 (\np{ln_linssh}{ln\_linssh} set to \forcode{=.true.} in \nam{dom}{dom}), 508 the vertical coordinates are fixed in time, but 509 the seawater can move up and down across the $z_0$ surface 515 510 (in other words, the top of the ocean in not a rigid lid). 516 511 517 512 Note that settings: 518 \np{ln\_zco}, \np{ln\_zps}, \np{ln\_sco} and \np{ln\_isfcav} mentioned in the following sections 519 appear to be namelist options but they are no longer truly namelist options for \NEMO. 513 \np{ln_zco}{ln\_zco}, \np{ln_zps}{ln\_zps}, \np{ln_sco}{ln\_sco} and \np{ln_isfcav}{ln\_isfcav} 514 mentioned in the following sections appear to be namelist options but 515 they are no longer truly namelist options for \NEMO. 520 516 Their value is written to and read from the domain configuration file and 521 517 they should be treated as fixed parameters for a particular configuration. 522 They are namelist options for the \texttt{DOMAINcfg} tool that can be used to build the configuration file and523 serve both to provide a record of the choices made whilst building the configuration and 524 to trigger appropriate code blocks within \NEMO.525 These values should not be altered in the \np{cn \_domcfg} file.518 They are namelist options for the \texttt{DOMAINcfg} tool that can be used to 519 build the configuration file and serve both to provide a record of the choices made whilst 520 building the configuration and to trigger appropriate code blocks within \NEMO. 521 These values should not be altered in the \np{cn_domcfg}{cn\_domcfg} file. 526 522 527 523 \medskip 528 The decision on these choices must be made when the \np{cn \_domcfg} file is constructed.529 Three main choices are offered (\autoref{fig: z_zps_s_sps}a-c):524 The decision on these choices must be made when the \np{cn_domcfg}{cn\_domcfg} file is constructed. 525 Three main choices are offered (\autoref{fig:DOM_z_zps_s_sps}a-c): 530 526 531 527 \begin{itemize} 532 \item $z$-coordinate with full step bathymetry (\np {ln\_zco}\forcode{ = .true.}),533 \item $z$-coordinate with partial step ($zps$) bathymetry (\np {ln\_zps}\forcode{ = .true.}),534 \item Generalized, $s$-coordinate (\np {ln\_sco}\forcode{ = .true.}).528 \item $z$-coordinate with full step bathymetry (\np[=.true.]{ln_zco}{ln\_zco}), 529 \item $z$-coordinate with partial step ($zps$) bathymetry (\np[=.true.]{ln_zps}{ln\_zps}), 530 \item Generalized, $s$-coordinate (\np[=.true.]{ln_sco}{ln\_sco}). 535 531 \end{itemize} 536 532 537 533 Additionally, hybrid combinations of the three main coordinates are available: 538 $s-z$ or $s-zps$ coordinate (\autoref{fig: z_zps_s_sps}d and \autoref{fig:z_zps_s_sps}e).534 $s-z$ or $s-zps$ coordinate (\autoref{fig:DOM_z_zps_s_sps}d and \autoref{fig:DOM_z_zps_s_sps}e). 539 535 540 536 A further choice related to vertical coordinate concerns 541 537 the presence (or not) of ocean cavities beneath ice shelves within the model domain. 542 A setting of \np{ln\_isfcav} as \forcode{.true.} indicates that the domain contains ocean cavities, 538 A setting of \np{ln_isfcav}{ln\_isfcav} as \forcode{.true.} indicates that 539 the domain contains ocean cavities, 543 540 otherwise the top, wet layer of the ocean will always be at the ocean surface. 544 541 This option is currently only available for $z$- or $zps$-coordinates. 545 542 In the latter case, partial steps are also applied at the ocean/ice shelf interface. 546 543 547 Within the model, the arrays describing the grid point depths and vertical scale factors are three set of 548 three dimensional arrays $(i,j,k)$ defined at \textit{before}, \textit{now} and \textit{after} time step. 544 Within the model, 545 the arrays describing the grid point depths and vertical scale factors are 546 three set of three dimensional arrays $(i,j,k)$ defined at 547 \textit{before}, \textit{now} and \textit{after} time step. 549 548 The time at which they are defined is indicated by a suffix: $\_b$, $\_n$, or $\_a$, respectively. 550 549 They are updated at each model time step. 551 550 The initial fixed reference coordinate system is held in variable names with a $\_0$ suffix. 552 When the linear free surface option is used (\np {ln\_linssh}\forcode{ = .true.}),551 When the linear free surface option is used (\np[=.true.]{ln_linssh}{ln\_linssh}), 553 552 \textit{before}, \textit{now} and \textit{after} arrays are initially set to 554 553 their reference counterpart and remain fixed. 555 554 555 %% ================================================================================================= 556 556 \subsubsection{Required fields} 557 557 \label{sec:DOM_zgr_fields} … … 572 572 \end{clines} 573 573 574 This set of vertical metrics is sufficient to describe the initial depth and thickness of every gridcell in575 the model regardless of the choice of vertical coordinate.574 This set of vertical metrics is sufficient to describe the initial depth and thickness of 575 every gridcell in the model regardless of the choice of vertical coordinate. 576 576 With constant z-levels, e3 metrics will be uniform across each horizontal level. 577 577 In the partial step case each e3 at the \jp{bottom\_level} … … 579 579 may vary from its horizontal neighbours. 580 580 And, in s-coordinates, variations can occur throughout the water column. 581 With the non-linear free-surface, all the coordinates behave more like the s-coordinate in 582 thatvariations occur throughout the water column with displacements related to the sea surface height.581 With the non-linear free-surface, all the coordinates behave more like the s-coordinate in that 582 variations occur throughout the water column with displacements related to the sea surface height. 583 583 These variations are typically much smaller than those arising from bottom fitted coordinates. 584 584 The values for vertical metrics supplied in the domain configuration file can be considered as 585 585 those arising from a flat sea surface with zero elevation. 586 586 587 The \jp{bottom\_level} and \jp{top\_level} 2D arrays define the \jp{bottom\_level} and top wet levels in each grid column. 587 The \jp{bottom\_level} and \jp{top\_level} 2D arrays define 588 the \jp{bottom\_level} and top wet levels in each grid column. 588 589 Without ice cavities, \jp{top\_level} is essentially a land mask (0 on land; 1 everywhere else). 589 590 With ice cavities, \jp{top\_level} determines the first wet point below the overlying ice shelf. 590 591 591 592 % ------------------------------------------------------------------------------------------------------------- 593 % level bathymetry and mask 594 % ------------------------------------------------------------------------------------------------------------- 592 %% ================================================================================================= 595 593 \subsubsection{Level bathymetry and mask} 596 594 \label{subsec:DOM_msk} 597 595 598 599 596 From \jp{top\_level} and \jp{bottom\_level} fields, the mask fields are defined as follows: 600 \begin{alignat*}{2} 601 tmask(i,j,k) &= & & 602 \begin{cases} 603 0 &\text{if $ k < top\_level(i,j)$} \\ 604 1 &\text{if $bottom\_level(i,j) \leq k \leq top\_level(i,j)$} \\ 605 0 &\text{if $ k > bottom\_level(i,j)$} 606 \end{cases} 607 \\ 608 umask(i,j,k) &= & &tmask(i,j,k) * tmask(i + 1,j, k) \\ 609 vmask(i,j,k) &= & &tmask(i,j,k) * tmask(i ,j + 1,k) \\ 610 fmask(i,j,k) &= & &tmask(i,j,k) * tmask(i + 1,j, k) \\ 611 & &* &tmask(i,j,k) * tmask(i + 1,j, k) \\ 612 wmask(i,j,k) &= & &tmask(i,j,k) * tmask(i ,j,k - 1) \\ 613 \text{with~} wmask(i,j,1) &= & &tmask(i,j,1) 614 \end{alignat*} 597 \begin{align*} 598 tmask(i,j,k) &= 599 \begin{cases} 600 0 &\text{if $ k < top\_level(i,j)$} \\ 601 1 &\text{if $ bottom\_level(i,j) \leq k \leq top\_level(i,j)$} \\ 602 0 &\text{if $k > bottom\_level(i,j) $} 603 \end{cases} \\ 604 umask(i,j,k) &= tmask(i,j,k) * tmask(i + 1,j, k) \\ 605 vmask(i,j,k) &= tmask(i,j,k) * tmask(i ,j + 1,k) \\ 606 fmask(i,j,k) &= tmask(i,j,k) * tmask(i + 1,j, k) * tmask(i,j,k) * tmask(i + 1,j, k) \\ 607 wmask(i,j,k) &= tmask(i,j,k) * tmask(i ,j,k - 1) \\ 608 \text{with~} wmask(i,j,1) &= tmask(i,j,1) 609 \end{align*} 615 610 616 611 Note that, without ice shelves cavities, 617 masks at $t-$ and $w-$points are identical with the numerical indexing used (\autoref{subsec:DOM_Num_Index}). 618 Nevertheless, $wmask$ are required with ocean cavities to deal with the top boundary (ice shelf/ocean interface) 612 masks at $t-$ and $w-$points are identical with the numerical indexing used 613 (\autoref{subsec:DOM_Num_Index}). 614 Nevertheless, 615 $wmask$ are required with ocean cavities to deal with the top boundary (ice shelf/ocean interface) 619 616 exactly in the same way as for the bottom boundary. 620 617 … … 625 622 %% (see \autoref{fig:LBC_jperio}). 626 623 627 628 %-------------------------------------------------------------------------------------------------629 624 % Closed seas 630 %------------------------------------------------------------------------------------------------- 631 \subsection{Closed seas} \label{subsec:DOM_closea} 632 633 When a global ocean is coupled to an atmospheric model it is better to represent all large water bodies 634 (\eg\ Great Lakes, Caspian sea \dots) even if the model resolution does not allow their communication with 635 the rest of the ocean. 625 %% ================================================================================================= 626 \subsection{Closed seas} 627 \label{subsec:DOM_closea} 628 629 When a global ocean is coupled to an atmospheric model it is better to 630 represent all large water bodies (\eg\ Great Lakes, Caspian sea, \dots) even if 631 the model resolution does not allow their communication with the rest of the ocean. 636 632 This is unnecessary when the ocean is forced by fixed atmospheric conditions, 637 633 so these seas can be removed from the ocean domain. 638 The user has the option to set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}) and 639 to optionally decide on the fate of any freshwater imbalance over the area. 640 The options are explained in \autoref{sec:MISC_closea} but it should be noted here that 641 a successful use of these options requires appropriate mask fields to be present in the domain configuration file. 634 The user has the option to 635 set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}) and to 636 optionally decide on the fate of any freshwater imbalance over the area. 637 The options are explained in \autoref{sec:MISC_closea} but 638 it should be noted here that a successful use of these options requires 639 appropriate mask fields to be present in the domain configuration file. 642 640 Among the possibilities are: 643 641 644 642 \begin{clines} 645 int closea_mask /* non-zero values in closed sea areas for optional masking*/646 int closea_mask_rnf /* non-zero values in closed sea areas with runoff locations (precip only)*/647 int closea_mask_emp /* non-zero values in closed sea areas with runoff locations (total emp)*/643 int closea_mask /* non-zero values in closed sea areas for optional masking */ 644 int closea_mask_rnf /* non-zero values in closed sea areas with runoff locations (precip only) */ 645 int closea_mask_emp /* non-zero values in closed sea areas with runoff locations (total emp) */ 648 646 \end{clines} 649 647 650 % ------------------------------------------------------------------------------------------------------------- 651 % Grid files 652 % ------------------------------------------------------------------------------------------------------------- 648 %% ================================================================================================= 653 649 \subsection{Output grid files} 654 650 \label{subsec:DOM_meshmask} 655 651 656 \nlst{namcfg}657 658 652 Most of the arrays relating to a particular ocean model configuration discussed in this chapter 659 (grid-point position, scale factors) 660 can be saved in a file if 661 namelist parameter \np{ln\_write\_cfg} (namelist \nam{cfg}) is set to\forcode{.true.};662 the output filename is set through parameter \np{cn \_domcfg\_out}.653 (grid-point position, scale factors) can be saved in a file if 654 namelist parameter \np{ln_write_cfg}{ln\_write\_cfg} (namelist \nam{cfg}{cfg}) is set to 655 \forcode{.true.}; 656 the output filename is set through parameter \np{cn_domcfg_out}{cn\_domcfg\_out}. 663 657 This is only really useful if 664 658 the fields are computed in subroutines \mdl{usrdef\_hgr} or \mdl{usrdef\_zgr} and 665 659 checking or confirmation is required. 666 660 667 \nlst{namdom}668 669 661 Alternatively, all the arrays relating to a particular ocean model configuration 670 (grid-point position, scale factors, depths and masks) 671 can be saved in a file called \texttt{mesh\_mask} if 672 namelist parameter \np{ln\_meshmask} (namelist \nam{dom}) is set to \forcode{.true.}. 662 (grid-point position, scale factors, depths and masks) can be saved in 663 a file called \texttt{mesh\_mask} if 664 namelist parameter \np{ln_meshmask}{ln\_meshmask} (namelist \nam{dom}{dom}) is set to 665 \forcode{.true.}. 673 666 This file contains additional fields that can be useful for post-processing applications. 674 667 675 % 676 % Domain: Initial State (dtatsd & istate) 677 % ================================================================ 678 \section[Initial state (\textit{istate.F90} and \textit{dtatsd.F90})] 679 {Initial state (\protect\mdl{istate} and \protect\mdl{dtatsd})}680 \label{sec:DTA_tsd}681 %-----------------------------------------namtsd------------------------------------------- 682 \nlst{namtsd}683 %------------------------------------------------------------------------------------------ 684 685 Basic initial state options are defined in \nam{tsd} .668 %% ================================================================================================= 669 \section[Initial state (\textit{istate.F90} and \textit{dtatsd.F90})]{Initial state (\protect\mdl{istate} and \protect\mdl{dtatsd})} 670 \label{sec:DOM_DTA_tsd} 671 672 \begin{listing} 673 \nlst{namtsd} 674 \caption{\forcode{&namtsd}} 675 \label{lst:namtsd} 676 \end{listing} 677 678 Basic initial state options are defined in \nam{tsd}{tsd}. 686 679 By default, the ocean starts from rest (the velocity field is set to zero) and 687 the initialization of temperature and salinity fields is controlled through the \np{ln \_tsd\_init} namelist parameter.680 the initialization of temperature and salinity fields is controlled through the \np{ln_tsd_init}{ln\_tsd\_init} namelist parameter. 688 681 689 682 \begin{description} 690 \item[\np{ln\_tsd\_init}\forcode{= .true.}] 691 Use T and S input files that can be given on the model grid itself or on their native input data grids. 692 In the latter case, the data will be interpolated on-the-fly both in the horizontal and the vertical to the model grid 683 \item [{\np[=.true.]{ln_tsd_init}{ln\_tsd\_init}}] Use T and S input files that can be given on 684 the model grid itself or on their native input data grids. 685 In the latter case, 686 the data will be interpolated on-the-fly both in the horizontal and the vertical to the model grid 693 687 (see \autoref{subsec:SBC_iof}). 694 The information relating to the input files are specified in the \np{sn\_tem} and \np{sn\_sal} structures. 688 The information relating to the input files are specified in 689 the \np{sn_tem}{sn\_tem} and \np{sn_sal}{sn\_sal} structures. 695 690 The computation is done in the \mdl{dtatsd} module. 696 \item [\np{ln\_tsd\_init}\forcode{= .false.}]697 Initial values for T and S are set viaa user supplied \rou{usr\_def\_istate} routine contained in \mdl{userdef\_istate}.691 \item [{\np[=.false.]{ln_tsd_init}{ln\_tsd\_init}}] Initial values for T and S are set via 692 a user supplied \rou{usr\_def\_istate} routine contained in \mdl{userdef\_istate}. 698 693 The default version sets horizontally uniform T and profiles as used in the GYRE configuration 699 (see \autoref{sec:CFG _gyre}).694 (see \autoref{sec:CFGS_gyre}). 700 695 \end{description} 701 696 702 \biblio 703 704 \pindex 697 \onlyinsubfile{\input{../../global/epilogue}} 705 698 706 699 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_DYN.tex
r11435 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter ——— Ocean Dynamics (DYN) 6 % ================================================================ 4 7 5 \chapter{Ocean Dynamics (DYN)} 8 6 \label{chap:DYN} 9 7 8 \thispagestyle{plain} 9 10 10 \chaptertoc 11 12 \paragraph{Changes record} ~\\ 13 14 {\footnotesize 15 \begin{tabularx}{\textwidth}{l||X|X} 16 Release & Author(s) & Modifications \\ 17 \hline 18 {\em 4.0} & {\em ...} & {\em ...} \\ 19 {\em 3.6} & {\em ...} & {\em ...} \\ 20 {\em 3.4} & {\em ...} & {\em ...} \\ 21 {\em <=3.4} & {\em ...} & {\em ...} 22 \end{tabularx} 23 } 24 25 \clearpage 11 26 12 27 Using the representation described in \autoref{chap:DOM}, … … 52 67 Furthermore, the tendency terms associated with the 2D barotropic vorticity balance (when \texttt{trdvor?} is defined) 53 68 can be derived from the 3D terms. 54 %%%55 69 \gmcomment{STEVEN: not quite sure I've got the sense of the last sentence. does 56 70 MISC correspond to "extracting tendency terms" or "vorticity balance"?} 57 71 58 % ================================================================ 59 % Sea Surface Height evolution & Diagnostics variables 60 % ================================================================ 72 %% ================================================================================================= 61 73 \section{Sea surface height and diagnostic variables ($\eta$, $\zeta$, $\chi$, $w$)} 62 74 \label{sec:DYN_divcur_wzv} 63 75 64 %-------------------------------------------------------------------------------------------------------------- 65 % Horizontal divergence and relative vorticity 66 %-------------------------------------------------------------------------------------------------------------- 67 \subsection[Horizontal divergence and relative vorticity (\textit{divcur.F90})] 68 {Horizontal divergence and relative vorticity (\protect\mdl{divcur})} 76 %% ================================================================================================= 77 \subsection[Horizontal divergence and relative vorticity (\textit{divcur.F90})]{Horizontal divergence and relative vorticity (\protect\mdl{divcur})} 69 78 \label{subsec:DYN_divcur} 70 79 71 80 The vorticity is defined at an $f$-point (\ie\ corner point) as follows: 72 81 \begin{equation} 73 \label{eq: divcur_cur}82 \label{eq:DYN_divcur_cur} 74 83 \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta_{i+1/2} \left[ {e_{2v}\;v} \right] 75 84 -\delta_{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right) … … 79 88 It is given by: 80 89 \[ 81 % \label{eq: divcur_div}90 % \label{eq:DYN_divcur_div} 82 91 \chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 83 92 \left( {\delta_i \left[ {e_{2u}\,e_{3u}\,u} \right] … … 99 108 the nonlinear advection and of the vertical velocity respectively. 100 109 101 %-------------------------------------------------------------------------------------------------------------- 102 % Sea Surface Height evolution 103 %-------------------------------------------------------------------------------------------------------------- 104 \subsection[Horizontal divergence and relative vorticity (\textit{sshwzv.F90})] 105 {Horizontal divergence and relative vorticity (\protect\mdl{sshwzv})} 110 %% ================================================================================================= 111 \subsection[Horizontal divergence and relative vorticity (\textit{sshwzv.F90})]{Horizontal divergence and relative vorticity (\protect\mdl{sshwzv})} 106 112 \label{subsec:DYN_sshwzv} 107 113 108 114 The sea surface height is given by: 109 115 \begin{equation} 110 \label{eq: dynspg_ssh}116 \label{eq:DYN_spg_ssh} 111 117 \begin{aligned} 112 118 \frac{\partial \eta }{\partial t} … … 123 129 \textit{emp} can be written as the evaporation minus precipitation, minus the river runoff. 124 130 The sea-surface height is evaluated using exactly the same time stepping scheme as 125 the tracer equation \autoref{eq: tra_nxt}:131 the tracer equation \autoref{eq:TRA_nxt}: 126 132 a leapfrog scheme in combination with an Asselin time filter, 127 \ie\ the velocity appearing in \autoref{eq: dynspg_ssh} is centred in time (\textit{now} velocity).133 \ie\ the velocity appearing in \autoref{eq:DYN_spg_ssh} is centred in time (\textit{now} velocity). 128 134 This is of paramount importance. 129 135 Replacing $T$ by the number $1$ in the tracer equation and summing over the water column must lead to … … 134 140 taking into account the change of the thickness of the levels: 135 141 \begin{equation} 136 \label{eq: wzv}142 \label{eq:DYN_wzv} 137 143 \left\{ 138 144 \begin{aligned} … … 148 154 re-orientated downward. 149 155 \gmcomment{not sure of this... to be modified with the change in emp setting} 150 In the case of a linear free surface, the time derivative in \autoref{eq: wzv} disappears.156 In the case of a linear free surface, the time derivative in \autoref{eq:DYN_wzv} disappears. 151 157 The upper boundary condition applies at a fixed level $z=0$. 152 158 The top vertical velocity is thus equal to the divergence of the barotropic transport 153 (\ie\ the first term in the right-hand-side of \autoref{eq: dynspg_ssh}).159 (\ie\ the first term in the right-hand-side of \autoref{eq:DYN_spg_ssh}). 154 160 155 161 Note also that whereas the vertical velocity has the same discrete expression in $z$- and $s$-coordinates, 156 162 its physical meaning is not the same: 157 163 in the second case, $w$ is the velocity normal to the $s$-surfaces. 158 Note also that the $k$-axis is re-orientated downwards in the \fortran code compared to159 the indexing used in the semi-discrete equations such as \autoref{eq: wzv}164 Note also that the $k$-axis is re-orientated downwards in the \fortran\ code compared to 165 the indexing used in the semi-discrete equations such as \autoref{eq:DYN_wzv} 160 166 (see \autoref{subsec:DOM_Num_Index_vertical}). 161 167 162 163 % ================================================================ 164 % Coriolis and Advection terms: vector invariant form 165 % ================================================================ 168 %% ================================================================================================= 166 169 \section{Coriolis and advection: vector invariant form} 167 170 \label{sec:DYN_adv_cor_vect} 168 %-----------------------------------------nam_dynadv---------------------------------------------------- 169 170 \nlst{namdyn_adv} 171 %------------------------------------------------------------------------------------------------------------- 171 172 \begin{listing} 173 \nlst{namdyn_adv} 174 \caption{\forcode{&namdyn_adv}} 175 \label{lst:namdyn_adv} 176 \end{listing} 172 177 173 178 The vector invariant form of the momentum equations is the one most often used in 174 179 applications of the \NEMO\ ocean model. 175 180 The flux form option (see next section) has been present since version $2$. 176 Options are defined through the \nam{dyn \_adv} namelist variables Coriolis and181 Options are defined through the \nam{dyn_adv}{dyn\_adv} namelist variables Coriolis and 177 182 momentum advection terms are evaluated using a leapfrog scheme, 178 183 \ie\ the velocity appearing in these expressions is centred in time (\textit{now} velocity). … … 180 185 \autoref{chap:LBC}. 181 186 182 % ------------------------------------------------------------------------------------------------------------- 183 % Vorticity term 184 % ------------------------------------------------------------------------------------------------------------- 185 \subsection[Vorticity term (\textit{dynvor.F90})] 186 {Vorticity term (\protect\mdl{dynvor})} 187 %% ================================================================================================= 188 \subsection[Vorticity term (\textit{dynvor.F90})]{Vorticity term (\protect\mdl{dynvor})} 187 189 \label{subsec:DYN_vor} 188 %------------------------------------------nam_dynvor---------------------------------------------------- 189 190 \nlst{namdyn_vor} 191 %------------------------------------------------------------------------------------------------------------- 192 193 Options are defined through the \nam{dyn\_vor} namelist variables. 194 Four discretisations of the vorticity term (\texttt{ln\_dynvor\_xxx}\forcode{ = .true.}) are available: 190 191 \begin{listing} 192 \nlst{namdyn_vor} 193 \caption{\forcode{&namdyn_vor}} 194 \label{lst:namdyn_vor} 195 \end{listing} 196 197 Options are defined through the \nam{dyn_vor}{dyn\_vor} namelist variables. 198 Four discretisations of the vorticity term (\texttt{ln\_dynvor\_xxx}\forcode{=.true.}) are available: 195 199 conserving potential enstrophy of horizontally non-divergent flow (ENS scheme); 196 200 conserving horizontal kinetic energy (ENE scheme); … … 198 202 horizontal kinetic energy for the planetary vorticity term (MIX scheme); 199 203 or conserving both the potential enstrophy of horizontally non-divergent flow and horizontal kinetic energy 200 (EEN scheme) (see \autoref{subsec: C_vorEEN}).204 (EEN scheme) (see \autoref{subsec:INVARIANTS_vorEEN}). 201 205 In the case of ENS, ENE or MIX schemes the land sea mask may be slightly modified to ensure the consistency of 202 vorticity term with analytical equations (\np {ln\_dynvor\_con}\forcode{ = .true.}).206 vorticity term with analytical equations (\np[=.true.]{ln_dynvor_con}{ln\_dynvor\_con}). 203 207 The vorticity terms are all computed in dedicated routines that can be found in the \mdl{dynvor} module. 204 208 205 %-------------------------------------------------------------206 209 % enstrophy conserving scheme 207 %------------------------------------------------------------- 208 \subsubsection[Enstrophy conserving scheme (\forcode{ln_dynvor_ens = .true.})] 209 {Enstrophy conserving scheme (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 210 %% ================================================================================================= 211 \subsubsection[Enstrophy conserving scheme (\forcode{ln_dynvor_ens})]{Enstrophy conserving scheme (\protect\np{ln_dynvor_ens}{ln\_dynvor\_ens})} 210 212 \label{subsec:DYN_vor_ens} 211 213 … … 216 218 It is given by: 217 219 \begin{equation} 218 \label{eq: dynvor_ens}220 \label{eq:DYN_vor_ens} 219 221 \left\{ 220 222 \begin{aligned} … … 227 229 \end{equation} 228 230 229 %-------------------------------------------------------------230 231 % energy conserving scheme 231 %------------------------------------------------------------- 232 \subsubsection[Energy conserving scheme (\forcode{ln_dynvor_ene = .true.})] 233 {Energy conserving scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 232 %% ================================================================================================= 233 \subsubsection[Energy conserving scheme (\forcode{ln_dynvor_ene})]{Energy conserving scheme (\protect\np{ln_dynvor_ene}{ln\_dynvor\_ene})} 234 234 \label{subsec:DYN_vor_ene} 235 235 … … 237 237 It is given by: 238 238 \begin{equation} 239 \label{eq: dynvor_ene}239 \label{eq:DYN_vor_ene} 240 240 \left\{ 241 241 \begin{aligned} … … 248 248 \end{equation} 249 249 250 %-------------------------------------------------------------251 250 % mix energy/enstrophy conserving scheme 252 %------------------------------------------------------------- 253 \subsubsection[Mixed energy/enstrophy conserving scheme (\forcode{ln_dynvor_mix = .true.})] 254 {Mixed energy/enstrophy conserving scheme (\protect\np{ln\_dynvor\_mix}\forcode{ = .true.})} 251 %% ================================================================================================= 252 \subsubsection[Mixed energy/enstrophy conserving scheme (\forcode{ln_dynvor_mix})]{Mixed energy/enstrophy conserving scheme (\protect\np{ln_dynvor_mix}{ln\_dynvor\_mix})} 255 253 \label{subsec:DYN_vor_mix} 256 254 257 255 For the mixed energy/enstrophy conserving scheme (MIX scheme), a mixture of the two previous schemes is used. 258 It consists of the ENS scheme (\autoref{eq: dynvor_ens}) for the relative vorticity term,259 and of the ENE scheme (\autoref{eq: dynvor_ene}) applied to the planetary vorticity term.260 \[ 261 % \label{eq: dynvor_mix}256 It consists of the ENS scheme (\autoref{eq:DYN_vor_ens}) for the relative vorticity term, 257 and of the ENE scheme (\autoref{eq:DYN_vor_ene}) applied to the planetary vorticity term. 258 \[ 259 % \label{eq:DYN_vor_mix} 262 260 \left\{ { 263 261 \begin{aligned} … … 274 272 \] 275 273 276 %-------------------------------------------------------------277 274 % energy and enstrophy conserving scheme 278 %------------------------------------------------------------- 279 \subsubsection[Energy and enstrophy conserving scheme (\forcode{ln_dynvor_een = .true.})] 280 {Energy and enstrophy conserving scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 275 %% ================================================================================================= 276 \subsubsection[Energy and enstrophy conserving scheme (\forcode{ln_dynvor_een})]{Energy and enstrophy conserving scheme (\protect\np{ln_dynvor_een}{ln\_dynvor\_een})} 281 277 \label{subsec:DYN_vor_een} 282 278 … … 297 293 The idea is to get rid of the double averaging by considering triad combinations of vorticity. 298 294 It is noteworthy that this solution is conceptually quite similar to the one proposed by 299 \citep{griffies.gnanadesikan.ea_JPO98} for the discretization of the iso-neutral diffusion operator (see \autoref{apdx: C}).295 \citep{griffies.gnanadesikan.ea_JPO98} for the discretization of the iso-neutral diffusion operator (see \autoref{apdx:INVARIANTS}). 300 296 301 297 The \citet{arakawa.hsu_MWR90} vorticity advection scheme for a single layer is modified … … 303 299 First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point: 304 300 \[ 305 % \label{eq: pot_vor}301 % \label{eq:DYN_pot_vor} 306 302 q = \frac{\zeta +f} {e_{3f} } 307 303 \] 308 where the relative vorticity is defined by (\autoref{eq: divcur_cur}),304 where the relative vorticity is defined by (\autoref{eq:DYN_divcur_cur}), 309 305 the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is: 310 306 \begin{equation} 311 \label{eq: een_e3f}307 \label{eq:DYN_een_e3f} 312 308 e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2} 313 309 \end{equation} 314 310 315 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>316 311 \begin{figure}[!ht] 317 \begin{center} 318 \includegraphics[width=\textwidth]{Fig_DYN_een_triad} 319 \caption{ 320 \protect\label{fig:DYN_een_triad} 321 Triads used in the energy and enstrophy conserving scheme (een) for 322 $u$-component (upper panel) and $v$-component (lower panel). 323 } 324 \end{center} 312 \centering 313 \includegraphics[width=0.66\textwidth]{Fig_DYN_een_triad} 314 \caption[Triads used in the energy and enstrophy conserving scheme (EEN)]{ 315 Triads used in the energy and enstrophy conserving scheme (EEN) for 316 $u$-component (upper panel) and $v$-component (lower panel).} 317 \label{fig:DYN_een_triad} 325 318 \end{figure} 326 % >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 327 328 A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 319 320 A key point in \autoref{eq:DYN_een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 329 321 It uses the sum of masked t-point vertical scale factor divided either by the sum of the four t-point masks 330 (\np {nn\_een\_e3f}\forcode{ = 1}), or just by $4$ (\np{nn\_een\_e3f}\forcode{ = .true.}).322 (\np[=1]{nn_een_e3f}{nn\_een\_e3f}), or just by $4$ (\np[=.true.]{nn_een_e3f}{nn\_een\_e3f}). 331 323 The latter case preserves the continuity of $e_{3f}$ when one or more of the neighbouring $e_{3t}$ tends to zero and 332 324 extends by continuity the value of $e_{3f}$ into the land areas. … … 340 332 (\autoref{fig:DYN_een_triad}): 341 333 \begin{equation} 342 \label{eq: Q_triads}334 \label{eq:DYN_Q_triads} 343 335 _i^j \mathbb{Q}^{i_p}_{j_p} 344 336 = \frac{1}{12} \ \left( q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p} \right) … … 348 340 Finally, the vorticity terms are represented as: 349 341 \begin{equation} 350 \label{eq: dynvor_een}342 \label{eq:DYN_vor_een} 351 343 \left\{ { 352 344 \begin{aligned} … … 361 353 This EEN scheme in fact combines the conservation properties of the ENS and ENE schemes. 362 354 It conserves both total energy and potential enstrophy in the limit of horizontally nondivergent flow 363 (\ie\ $\chi$=$0$) (see \autoref{subsec: C_vorEEN}).355 (\ie\ $\chi$=$0$) (see \autoref{subsec:INVARIANTS_vorEEN}). 364 356 Applied to a realistic ocean configuration, it has been shown that it leads to a significant reduction of 365 357 the noise in the vertical velocity field \citep{le-sommer.penduff.ea_OM09}. … … 368 360 leading to a larger topostrophy of the flow \citep{barnier.madec.ea_OD06, penduff.le-sommer.ea_OS07}. 369 361 370 %-------------------------------------------------------------------------------------------------------------- 371 % Kinetic Energy Gradient term 372 %-------------------------------------------------------------------------------------------------------------- 373 \subsection[Kinetic energy gradient term (\textit{dynkeg.F90})] 374 {Kinetic energy gradient term (\protect\mdl{dynkeg})} 362 %% ================================================================================================= 363 \subsection[Kinetic energy gradient term (\textit{dynkeg.F90})]{Kinetic energy gradient term (\protect\mdl{dynkeg})} 375 364 \label{subsec:DYN_keg} 376 365 377 As demonstrated in \autoref{apdx: C},366 As demonstrated in \autoref{apdx:INVARIANTS}, 378 367 there is a single discrete formulation of the kinetic energy gradient term that, 379 368 together with the formulation chosen for the vertical advection (see below), 380 369 conserves the total kinetic energy: 381 370 \[ 382 % \label{eq: dynkeg}371 % \label{eq:DYN_keg} 383 372 \left\{ 384 373 \begin{aligned} … … 389 378 \] 390 379 391 %-------------------------------------------------------------------------------------------------------------- 392 % Vertical advection term 393 %-------------------------------------------------------------------------------------------------------------- 394 \subsection[Vertical advection term (\textit{dynzad.F90})] 395 {Vertical advection term (\protect\mdl{dynzad})} 380 %% ================================================================================================= 381 \subsection[Vertical advection term (\textit{dynzad.F90})]{Vertical advection term (\protect\mdl{dynzad})} 396 382 \label{subsec:DYN_zad} 397 383 … … 400 386 conserves the total kinetic energy. 401 387 Indeed, the change of KE due to the vertical advection is exactly balanced by 402 the change of KE due to the gradient of KE (see \autoref{apdx: C}).403 \[ 404 % \label{eq: dynzad}388 the change of KE due to the gradient of KE (see \autoref{apdx:INVARIANTS}). 389 \[ 390 % \label{eq:DYN_zad} 405 391 \left\{ 406 392 \begin{aligned} … … 410 396 \right. 411 397 \] 412 When \np {ln\_dynzad\_zts}\forcode{ = .true.},398 When \np[=.true.]{ln_dynzad_zts}{ln\_dynzad\_zts}, 413 399 a split-explicit time stepping with 5 sub-timesteps is used on the vertical advection term. 414 400 This option can be useful when the value of the timestep is limited by vertical advection \citep{lemarie.debreu.ea_OM15}. 415 401 Note that in this case, 416 402 a similar split-explicit time stepping should be used on vertical advection of tracer to ensure a better stability, 417 an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}). 418 419 420 % ================================================================ 421 % Coriolis and Advection : flux form 422 % ================================================================ 403 an option which is only available with a TVD scheme (see \np{ln_traadv_tvd_zts}{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}). 404 405 %% ================================================================================================= 423 406 \section{Coriolis and advection: flux form} 424 407 \label{sec:DYN_adv_cor_flux} 425 %------------------------------------------nam_dynadv---------------------------------------------------- 426 427 \nlst{namdyn_adv} 428 %------------------------------------------------------------------------------------------------------------- 429 430 Options are defined through the \nam{dyn\_adv} namelist variables. 408 409 Options are defined through the \nam{dyn_adv}{dyn\_adv} namelist variables. 431 410 In the flux form (as in the vector invariant form), 432 411 the Coriolis and momentum advection terms are evaluated using a leapfrog scheme, … … 435 414 no slip or partial slip boundary conditions are applied following \autoref{chap:LBC}. 436 415 437 438 %-------------------------------------------------------------------------------------------------------------- 439 % Coriolis plus curvature metric terms 440 %-------------------------------------------------------------------------------------------------------------- 441 \subsection[Coriolis plus curvature metric terms (\textit{dynvor.F90})] 442 {Coriolis plus curvature metric terms (\protect\mdl{dynvor})} 416 %% ================================================================================================= 417 \subsection[Coriolis plus curvature metric terms (\textit{dynvor.F90})]{Coriolis plus curvature metric terms (\protect\mdl{dynvor})} 443 418 \label{subsec:DYN_cor_flux} 444 419 … … 447 422 It is given by: 448 423 \begin{multline*} 449 % \label{eq: dyncor_metric}424 % \label{eq:DYN_cor_metric} 450 425 f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i} - u\frac{\partial e_1 }{\partial j}} \right) \\ 451 426 \equiv f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta_{i+1/2} \left[ {e_{2u} } \right] … … 453 428 \end{multline*} 454 429 455 Any of the (\autoref{eq: dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) schemes can be used to430 Any of the (\autoref{eq:DYN_vor_ens}), (\autoref{eq:DYN_vor_ene}) and (\autoref{eq:DYN_vor_een}) schemes can be used to 456 431 compute the product of the Coriolis parameter and the vorticity. 457 However, the energy-conserving scheme (\autoref{eq: dynvor_een}) has exclusively been used to date.432 However, the energy-conserving scheme (\autoref{eq:DYN_vor_een}) has exclusively been used to date. 458 433 This term is evaluated using a leapfrog scheme, \ie\ the velocity is centred in time (\textit{now} velocity). 459 434 460 %-------------------------------------------------------------------------------------------------------------- 461 % Flux form Advection term 462 %-------------------------------------------------------------------------------------------------------------- 463 \subsection[Flux form advection term (\textit{dynadv.F90})] 464 {Flux form advection term (\protect\mdl{dynadv})} 435 %% ================================================================================================= 436 \subsection[Flux form advection term (\textit{dynadv.F90})]{Flux form advection term (\protect\mdl{dynadv})} 465 437 \label{subsec:DYN_adv_flux} 466 438 467 439 The discrete expression of the advection term is given by: 468 440 \[ 469 % \label{eq: dynadv}441 % \label{eq:DYN_adv} 470 442 \left\{ 471 443 \begin{aligned} … … 487 459 or a $3^{rd}$ order upstream biased scheme, UBS. 488 460 The latter is described in \citet{shchepetkin.mcwilliams_OM05}. 489 The schemes are selected using the namelist logicals \np{ln \_dynadv\_cen2} and \np{ln\_dynadv\_ubs}.461 The schemes are selected using the namelist logicals \np{ln_dynadv_cen2}{ln\_dynadv\_cen2} and \np{ln_dynadv_ubs}{ln\_dynadv\_ubs}. 490 462 In flux form, the schemes differ by the choice of a space and time interpolation to define the value of 491 463 $u$ and $v$ at the centre of each face of $u$- and $v$-cells, \ie\ at the $T$-, $f$-, 492 464 and $uw$-points for $u$ and at the $f$-, $T$- and $vw$-points for $v$. 493 465 494 %-------------------------------------------------------------495 466 % 2nd order centred scheme 496 %------------------------------------------------------------- 497 \subsubsection[CEN2: $2^{nd}$ order centred scheme (\forcode{ln_dynadv_cen2 = .true.})] 498 {CEN2: $2^{nd}$ order centred scheme (\protect\np{ln\_dynadv\_cen2}\forcode{ = .true.})} 467 %% ================================================================================================= 468 \subsubsection[CEN2: $2^{nd}$ order centred scheme (\forcode{ln_dynadv_cen2})]{CEN2: $2^{nd}$ order centred scheme (\protect\np{ln_dynadv_cen2}{ln\_dynadv\_cen2})} 499 469 \label{subsec:DYN_adv_cen2} 500 470 501 471 In the centered $2^{nd}$ order formulation, the velocity is evaluated as the mean of the two neighbouring points: 502 472 \begin{equation} 503 \label{eq: dynadv_cen2}473 \label{eq:DYN_adv_cen2} 504 474 \left\{ 505 475 \begin{aligned} … … 516 486 so $u$ and $v$ are the \emph{now} velocities. 517 487 518 %-------------------------------------------------------------519 488 % UBS scheme 520 %------------------------------------------------------------- 521 \subsubsection[UBS: Upstream Biased Scheme (\forcode{ln_dynadv_ubs = .true.})] 522 {UBS: Upstream Biased Scheme (\protect\np{ln\_dynadv\_ubs}\forcode{ = .true.})} 489 %% ================================================================================================= 490 \subsubsection[UBS: Upstream Biased Scheme (\forcode{ln_dynadv_ubs})]{UBS: Upstream Biased Scheme (\protect\np{ln_dynadv_ubs}{ln\_dynadv\_ubs})} 523 491 \label{subsec:DYN_adv_ubs} 524 492 … … 527 495 For example, the evaluation of $u_T^{ubs} $ is done as follows: 528 496 \begin{equation} 529 \label{eq: dynadv_ubs}497 \label{eq:DYN_adv_ubs} 530 498 u_T^{ubs} =\overline u ^i-\;\frac{1}{6} 531 499 \begin{cases} … … 542 510 But the amplitudes of the false extrema are significantly reduced over those in the centred second order method. 543 511 As the scheme already includes a diffusion component, it can be used without explicit lateral diffusion on momentum 544 (\ie\ \np {ln\_dynldf\_lap}\forcode{ = }\np{ln\_dynldf\_bilap}\forcode{ = .false.}),512 (\ie\ \np[=]{ln_dynldf_lap}{ln\_dynldf\_lap}\np[=.false.]{ln_dynldf_bilap}{ln\_dynldf\_bilap}), 545 513 and it is recommended to do so. 546 514 547 515 The UBS scheme is not used in all directions. 548 516 In the vertical, the centred $2^{nd}$ order evaluation of the advection is preferred, \ie\ $u_{uw}^{ubs}$ and 549 $u_{vw}^{ubs}$ in \autoref{eq: dynadv_cen2} are used.517 $u_{vw}^{ubs}$ in \autoref{eq:DYN_adv_cen2} are used. 550 518 UBS is diffusive and is associated with vertical mixing of momentum. \gmcomment{ gm pursue the 551 519 sentence:Since vertical mixing of momentum is a source term of the TKE equation... } 552 520 553 For stability reasons, the first term in (\autoref{eq: dynadv_ubs}),521 For stability reasons, the first term in (\autoref{eq:DYN_adv_ubs}), 554 522 which corresponds to a second order centred scheme, is evaluated using the \textit{now} velocity (centred in time), 555 523 while the second term, which is the diffusion part of the scheme, … … 559 527 Note that the UBS and QUICK (Quadratic Upstream Interpolation for Convective Kinematics) schemes only differ by 560 528 one coefficient. 561 Replacing $1/6$ by $1/8$ in (\autoref{eq: dynadv_ubs}) leads to the QUICK advection scheme \citep{webb.de-cuevas.ea_JAOT98}.529 Replacing $1/6$ by $1/8$ in (\autoref{eq:DYN_adv_ubs}) leads to the QUICK advection scheme \citep{webb.de-cuevas.ea_JAOT98}. 562 530 This option is not available through a namelist parameter, since the $1/6$ coefficient is hard coded. 563 531 Nevertheless it is quite easy to make the substitution in the \mdl{dynadv\_ubs} module and obtain a QUICK scheme. … … 566 534 there is also the possibility of using a $4^{th}$ order evaluation of the advective velocity as in ROMS. 567 535 This is an error and should be suppressed soon. 568 %%%569 536 \gmcomment{action : this have to be done} 570 %%% 571 572 % ================================================================ 573 % Hydrostatic pressure gradient term 574 % ================================================================ 575 \section[Hydrostatic pressure gradient (\textit{dynhpg.F90})] 576 {Hydrostatic pressure gradient (\protect\mdl{dynhpg})} 537 538 %% ================================================================================================= 539 \section[Hydrostatic pressure gradient (\textit{dynhpg.F90})]{Hydrostatic pressure gradient (\protect\mdl{dynhpg})} 577 540 \label{sec:DYN_hpg} 578 %------------------------------------------nam_dynhpg--------------------------------------------------- 579 580 \nlst{namdyn_hpg} 581 %------------------------------------------------------------------------------------------------------------- 582 583 Options are defined through the \nam{dyn\_hpg} namelist variables. 541 542 \begin{listing} 543 \nlst{namdyn_hpg} 544 \caption{\forcode{&namdyn_hpg}} 545 \label{lst:namdyn_hpg} 546 \end{listing} 547 548 Options are defined through the \nam{dyn_hpg}{dyn\_hpg} namelist variables. 584 549 The key distinction between the different algorithms used for 585 550 the hydrostatic pressure gradient is the vertical coordinate used, … … 593 558 At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied. 594 559 595 %-------------------------------------------------------------------------------------------------------------- 596 % z-coordinate with full step 597 %-------------------------------------------------------------------------------------------------------------- 598 \subsection[Full step $Z$-coordinate (\forcode{ln_dynhpg_zco = .true.})] 599 {Full step $Z$-coordinate (\protect\np{ln\_dynhpg\_zco}\forcode{ = .true.})} 560 %% ================================================================================================= 561 \subsection[Full step $Z$-coordinate (\forcode{ln_dynhpg_zco})]{Full step $Z$-coordinate (\protect\np{ln_dynhpg_zco}{ln\_dynhpg\_zco})} 600 562 \label{subsec:DYN_hpg_zco} 601 563 … … 607 569 for $k=km$ (surface layer, $jk=1$ in the code) 608 570 \begin{equation} 609 \label{eq: dynhpg_zco_surf}571 \label{eq:DYN_hpg_zco_surf} 610 572 \left\{ 611 573 \begin{aligned} … … 620 582 for $1<k<km$ (interior layer) 621 583 \begin{equation} 622 \label{eq: dynhpg_zco}584 \label{eq:DYN_hpg_zco} 623 585 \left\{ 624 586 \begin{aligned} … … 633 595 \end{equation} 634 596 635 Note that the $1/2$ factor in (\autoref{eq: dynhpg_zco_surf}) is adequate because of the definition of $e_{3w}$ as597 Note that the $1/2$ factor in (\autoref{eq:DYN_hpg_zco_surf}) is adequate because of the definition of $e_{3w}$ as 636 598 the vertical derivative of the scale factor at the surface level ($z=0$). 637 599 Note also that in case of variable volume level (\texttt{vvl?} defined), 638 the surface pressure gradient is included in \autoref{eq:dynhpg_zco_surf} and 639 \autoref{eq:dynhpg_zco} through the space and time variations of the vertical scale factor $e_{3w}$. 640 641 %-------------------------------------------------------------------------------------------------------------- 642 % z-coordinate with partial step 643 %-------------------------------------------------------------------------------------------------------------- 644 \subsection[Partial step $Z$-coordinate (\forcode{ln_dynhpg_zps = .true.})] 645 {Partial step $Z$-coordinate (\protect\np{ln\_dynhpg\_zps}\forcode{ = .true.})} 600 the surface pressure gradient is included in \autoref{eq:DYN_hpg_zco_surf} and 601 \autoref{eq:DYN_hpg_zco} through the space and time variations of the vertical scale factor $e_{3w}$. 602 603 %% ================================================================================================= 604 \subsection[Partial step $Z$-coordinate (\forcode{ln_dynhpg_zps})]{Partial step $Z$-coordinate (\protect\np{ln_dynhpg_zps}{ln\_dynhpg\_zps})} 646 605 \label{subsec:DYN_hpg_zps} 647 606 … … 661 620 module \mdl{zpsdhe} located in the TRA directory and described in \autoref{sec:TRA_zpshde}. 662 621 663 %-------------------------------------------------------------------------------------------------------------- 664 % s- and s-z-coordinates 665 %-------------------------------------------------------------------------------------------------------------- 622 %% ================================================================================================= 666 623 \subsection{$S$- and $Z$-$S$-coordinates} 667 624 \label{subsec:DYN_hpg_sco} … … 672 629 density Jacobian with cubic polynomial method is currently disabled whilst known bugs are under investigation. 673 630 674 $\bullet$ Traditional coding (see for example \citet{madec.delecluse.ea_JPO96}: (\np {ln\_dynhpg\_sco}\forcode{ = .true.})675 \begin{equation} 676 \label{eq: dynhpg_sco}631 $\bullet$ Traditional coding (see for example \citet{madec.delecluse.ea_JPO96}: (\np[=.true.]{ln_dynhpg_sco}{ln\_dynhpg\_sco}) 632 \begin{equation} 633 \label{eq:DYN_hpg_sco} 677 634 \left\{ 678 635 \begin{aligned} … … 686 643 687 644 Where the first term is the pressure gradient along coordinates, 688 computed as in \autoref{eq: dynhpg_zco_surf} - \autoref{eq:dynhpg_zco},645 computed as in \autoref{eq:DYN_hpg_zco_surf} - \autoref{eq:DYN_hpg_zco}, 689 646 and $z_T$ is the depth of the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point 690 647 ($e_{3w}$). 691 648 692 $\bullet$ Traditional coding with adaptation for ice shelf cavities (\np {ln\_dynhpg\_isf}\forcode{ = .true.}).693 This scheme need the activation of ice shelf cavities (\np {ln\_isfcav}\forcode{ = .true.}).694 695 $\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np {ln\_dynhpg\_prj}\forcode{ = .true.})649 $\bullet$ Traditional coding with adaptation for ice shelf cavities (\np[=.true.]{ln_dynhpg_isf}{ln\_dynhpg\_isf}). 650 This scheme need the activation of ice shelf cavities (\np[=.true.]{ln_isfcav}{ln\_isfcav}). 651 652 $\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np[=.true.]{ln_dynhpg_prj}{ln\_dynhpg\_prj}) 696 653 697 654 $\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{shchepetkin.mcwilliams_OM05} 698 (\np {ln\_dynhpg\_djc}\forcode{ = .true.}) (currently disabled; under development)699 700 Note that expression \autoref{eq: dynhpg_sco} is commonly used when the variable volume formulation is activated655 (\np[=.true.]{ln_dynhpg_djc}{ln\_dynhpg\_djc}) (currently disabled; under development) 656 657 Note that expression \autoref{eq:DYN_hpg_sco} is commonly used when the variable volume formulation is activated 701 658 (\texttt{vvl?}) because in that case, even with a flat bottom, 702 659 the coordinate surfaces are not horizontal but follow the free surface \citep{levier.treguier.ea_rpt07}. 703 The pressure jacobian scheme (\np {ln\_dynhpg\_prj}\forcode{ = .true.}) is available as704 an improved option to \np {ln\_dynhpg\_sco}\forcode{ = .true.} when \texttt{vvl?} is active.660 The pressure jacobian scheme (\np[=.true.]{ln_dynhpg_prj}{ln\_dynhpg\_prj}) is available as 661 an improved option to \np[=.true.]{ln_dynhpg_sco}{ln\_dynhpg\_sco} when \texttt{vvl?} is active. 705 662 The pressure Jacobian scheme uses a constrained cubic spline to 706 663 reconstruct the density profile across the water column. … … 710 667 This method can provide a more accurate calculation of the horizontal pressure gradient than the standard scheme. 711 668 669 %% ================================================================================================= 712 670 \subsection{Ice shelf cavity} 713 671 \label{subsec:DYN_hpg_isf} 672 714 673 Beneath an ice shelf, the total pressure gradient is the sum of the pressure gradient due to the ice shelf load and 715 the pressure gradient due to the ocean load (\np {ln\_dynhpg\_isf}\forcode{ = .true.}).\\674 the pressure gradient due to the ocean load (\np[=.true.]{ln_dynhpg_isf}{ln\_dynhpg\_isf}).\\ 716 675 717 676 The main hypothesis to compute the ice shelf load is that the ice shelf is in an isostatic equilibrium. … … 722 681 A detailed description of this method is described in \citet{losch_JGR08}.\\ 723 682 724 The pressure gradient due to ocean load is computed using the expression \autoref{eq: dynhpg_sco} described in683 The pressure gradient due to ocean load is computed using the expression \autoref{eq:DYN_hpg_sco} described in 725 684 \autoref{subsec:DYN_hpg_sco}. 726 685 727 %-------------------------------------------------------------------------------------------------------------- 728 % Time-scheme 729 %-------------------------------------------------------------------------------------------------------------- 730 \subsection[Time-scheme (\forcode{ln_dynhpg_imp = .{true,false}.})] 731 {Time-scheme (\protect\np{ln\_dynhpg\_imp}\forcode{ = .\{true,false\}}.)} 686 %% ================================================================================================= 687 \subsection[Time-scheme (\forcode{ln_dynhpg_imp})]{Time-scheme (\protect\np{ln_dynhpg_imp}{ln\_dynhpg\_imp})} 732 688 \label{subsec:DYN_hpg_imp} 733 689 … … 745 701 rather than at the central time level $t$ only, as in the standard leapfrog scheme. 746 702 747 $\bullet$ leapfrog scheme (\np {ln\_dynhpg\_imp}\forcode{ = .true.}):748 749 \begin{equation} 750 \label{eq: dynhpg_lf}703 $\bullet$ leapfrog scheme (\np[=.true.]{ln_dynhpg_imp}{ln\_dynhpg\_imp}): 704 705 \begin{equation} 706 \label{eq:DYN_hpg_lf} 751 707 \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 752 708 -\frac{1}{\rho_o \,e_{1u} }\delta_{i+1/2} \left[ {p_h^t } \right] 753 709 \end{equation} 754 710 755 $\bullet$ semi-implicit scheme (\np {ln\_dynhpg\_imp}\forcode{ = .true.}):756 \begin{equation} 757 \label{eq: dynhpg_imp}711 $\bullet$ semi-implicit scheme (\np[=.true.]{ln_dynhpg_imp}{ln\_dynhpg\_imp}): 712 \begin{equation} 713 \label{eq:DYN_hpg_imp} 758 714 \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 759 715 -\frac{1}{4\,\rho_o \,e_{1u} } \delta_{i+1/2} \left[ p_h^{t+\rdt} +2\,p_h^t +p_h^{t-\rdt} \right] 760 716 \end{equation} 761 717 762 The semi-implicit time scheme \autoref{eq: dynhpg_imp} is made possible without718 The semi-implicit time scheme \autoref{eq:DYN_hpg_imp} is made possible without 763 719 significant additional computation since the density can be updated to time level $t+\rdt$ before 764 720 computing the horizontal hydrostatic pressure gradient. 765 721 It can be easily shown that the stability limit associated with the hydrostatic pressure gradient doubles using 766 \autoref{eq: dynhpg_imp} compared to that using the standard leapfrog scheme \autoref{eq:dynhpg_lf}.767 Note that \autoref{eq: dynhpg_imp} is equivalent to applying a time filter to the pressure gradient to722 \autoref{eq:DYN_hpg_imp} compared to that using the standard leapfrog scheme \autoref{eq:DYN_hpg_lf}. 723 Note that \autoref{eq:DYN_hpg_imp} is equivalent to applying a time filter to the pressure gradient to 768 724 eliminate high frequency IGWs. 769 Obviously, when using \autoref{eq: dynhpg_imp},725 Obviously, when using \autoref{eq:DYN_hpg_imp}, 770 726 the doubling of the time-step is achievable only if no other factors control the time-step, 771 727 such as the stability limits associated with advection or diffusion. 772 728 773 In practice, the semi-implicit scheme is used when \np {ln\_dynhpg\_imp}\forcode{ = .true.}.729 In practice, the semi-implicit scheme is used when \np[=.true.]{ln_dynhpg_imp}{ln\_dynhpg\_imp}. 774 730 In this case, we choose to apply the time filter to temperature and salinity used in the equation of state, 775 731 instead of applying it to the hydrostatic pressure or to the density, … … 777 733 The density used to compute the hydrostatic pressure gradient (whatever the formulation) is evaluated as follows: 778 734 \[ 779 % \label{eq: rho_flt}735 % \label{eq:DYN_rho_flt} 780 736 \rho^t = \rho( \widetilde{T},\widetilde {S},z_t) 781 737 \quad \text{with} \quad … … 785 741 Note that in the semi-implicit case, it is necessary to save the filtered density, 786 742 an extra three-dimensional field, in the restart file to restart the model with exact reproducibility. 787 This option is controlled by \np{nn\_dynhpg\_rst}, a namelist parameter. 788 789 % ================================================================ 790 % Surface Pressure Gradient 791 % ================================================================ 792 \section[Surface pressure gradient (\textit{dynspg.F90})] 793 {Surface pressure gradient (\protect\mdl{dynspg})} 743 This option is controlled by \np{nn_dynhpg_rst}{nn\_dynhpg\_rst}, a namelist parameter. 744 745 %% ================================================================================================= 746 \section[Surface pressure gradient (\textit{dynspg.F90})]{Surface pressure gradient (\protect\mdl{dynspg})} 794 747 \label{sec:DYN_spg} 795 %-----------------------------------------nam_dynspg---------------------------------------------------- 796 797 \nlst{namdyn_spg} 798 %------------------------------------------------------------------------------------------------------------ 799 800 Options are defined through the \nam{dyn\_spg} namelist variables. 801 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). 748 749 \begin{listing} 750 \nlst{namdyn_spg} 751 \caption{\forcode{&namdyn_spg}} 752 \label{lst:namdyn_spg} 753 \end{listing} 754 755 Options are defined through the \nam{dyn_spg}{dyn\_spg} namelist variables. 756 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:MB_hor_pg}). 802 757 The main distinction is between the fixed volume case (linear free surface) and 803 758 the variable volume case (nonlinear free surface, \texttt{vvl?} is defined). 804 In the linear free surface case (\autoref{subsec: PE_free_surface})759 In the linear free surface case (\autoref{subsec:MB_free_surface}) 805 760 the vertical scale factors $e_{3}$ are fixed in time, 806 while they are time-dependent in the nonlinear case (\autoref{subsec: PE_free_surface}).761 while they are time-dependent in the nonlinear case (\autoref{subsec:MB_free_surface}). 807 762 With both linear and nonlinear free surface, external gravity waves are allowed in the equations, 808 763 which imposes a very small time step when an explicit time stepping is used. 809 764 Two methods are proposed to allow a longer time step for the three-dimensional equations: 810 the filtered free surface, which is a modification of the continuous equations (see \autoref{eq: PE_flt?}),765 the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:MB_flt?}), 811 766 and the split-explicit free surface described below. 812 767 The extra term introduced in the filtered method is calculated implicitly, 813 768 so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 814 769 815 816 770 The form of the surface pressure gradient term depends on how the user wants to 817 handle the fast external gravity waves that are a solution of the analytical equation (\autoref{sec: PE_hor_pg}).771 handle the fast external gravity waves that are a solution of the analytical equation (\autoref{sec:MB_hor_pg}). 818 772 Three formulations are available, all controlled by a CPP key (ln\_dynspg\_xxx): 819 773 an explicit formulation which requires a small time step; … … 825 779 As a consequence the update of the $next$ velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 826 780 827 828 %-------------------------------------------------------------------------------------------------------------- 829 % Explicit free surface formulation 830 %-------------------------------------------------------------------------------------------------------------- 831 \subsection[Explicit free surface (\texttt{ln\_dynspg\_exp}\forcode{ = .true.})] 832 {Explicit free surface (\protect\np{ln\_dynspg\_exp}\forcode{ = .true.})} 781 %% ================================================================================================= 782 \subsection[Explicit free surface (\forcode{ln_dynspg_exp})]{Explicit free surface (\protect\np{ln_dynspg_exp}{ln\_dynspg\_exp})} 833 783 \label{subsec:DYN_spg_exp} 834 784 835 In the explicit free surface formulation (\np{ln \_dynspg\_exp} set to true),785 In the explicit free surface formulation (\np{ln_dynspg_exp}{ln\_dynspg\_exp} set to true), 836 786 the model time step is chosen to be small enough to resolve the external gravity waves 837 787 (typically a few tens of seconds). … … 839 789 is thus simply given by : 840 790 \begin{equation} 841 \label{eq: dynspg_exp}791 \label{eq:DYN_spg_exp} 842 792 \left\{ 843 793 \begin{aligned} … … 853 803 Thus, nothing is done in the \mdl{dynspg\_exp} module. 854 804 855 %-------------------------------------------------------------------------------------------------------------- 856 % Split-explict free surface formulation 857 %-------------------------------------------------------------------------------------------------------------- 858 \subsection[Split-explicit free surface (\texttt{ln\_dynspg\_ts}\forcode{ = .true.})] 859 {Split-explicit free surface (\protect\np{ln\_dynspg\_ts}\forcode{ = .true.})} 805 %% ================================================================================================= 806 \subsection[Split-explicit free surface (\forcode{ln_dynspg_ts})]{Split-explicit free surface (\protect\np{ln_dynspg_ts}{ln\_dynspg\_ts})} 860 807 \label{subsec:DYN_spg_ts} 861 %------------------------------------------namsplit-----------------------------------------------------------862 %863 808 %\nlst{namsplit} 864 %------------------------------------------------------------------------------------------------------------- 865 866 The split-explicit free surface formulation used in \NEMO\ (\np{ln\_dynspg\_ts} set to true), 809 810 The split-explicit free surface formulation used in \NEMO\ (\np{ln_dynspg_ts}{ln\_dynspg\_ts} set to true), 867 811 also called the time-splitting formulation, follows the one proposed by \citet{shchepetkin.mcwilliams_OM05}. 868 812 The general idea is to solve the free surface equation and the associated barotropic velocity equations with 869 813 a smaller time step than $\rdt$, the time step used for the three dimensional prognostic variables 870 (\autoref{fig:DYN_ dynspg_ts}).814 (\autoref{fig:DYN_spg_ts}). 871 815 The size of the small time step, $\rdt_e$ (the external mode or barotropic time step) is provided through 872 the \np{nn \_baro} namelist parameter as: $\rdt_e = \rdt / nn\_baro$.873 This parameter can be optionally defined automatically (\np {ln\_bt\_nn\_auto}\forcode{ = .true.}) considering that816 the \np{nn_baro}{nn\_baro} namelist parameter as: $\rdt_e = \rdt / nn\_baro$. 817 This parameter can be optionally defined automatically (\np[=.true.]{ln_bt_nn_auto}{ln\_bt\_nn\_auto}) considering that 874 818 the stability of the barotropic system is essentially controled by external waves propagation. 875 819 Maximum Courant number is in that case time independent, and easily computed online from the input bathymetry. 876 Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn\_bt\_cmax}. 877 878 %%% 820 Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn_bt_cmax}{rn\_bt\_cmax}. 821 879 822 The barotropic mode solves the following equations: 880 823 % \begin{subequations} 881 % \label{eq: BT}882 \begin{equation} 883 \label{eq: BT_dyn}824 % \label{eq:DYN_BT} 825 \begin{equation} 826 \label{eq:DYN_BT_dyn} 884 827 \frac{\partial {\mathrm \overline{{\mathbf U}}_h} }{\partial t}= 885 828 -f\;{\mathrm {\mathbf k}}\times {\mathrm \overline{{\mathbf U}}_h} … … 887 830 \end{equation} 888 831 \[ 889 % \label{eq: BT_ssh}832 % \label{eq:DYN_BT_ssh} 890 833 \frac{\partial \eta }{\partial t}=-\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\mathrm{\mathbf \overline{U}}}_h \,} \right]+P-E 891 834 \] … … 893 836 where $\mathrm {\overline{\mathbf G}}$ is a forcing term held constant, containing coupling term between modes, 894 837 surface atmospheric forcing as well as slowly varying barotropic terms not explicitly computed to gain efficiency. 895 The third term on the right hand side of \autoref{eq: BT_dyn} represents the bottom stress896 (see section \autoref{sec:ZDF_ bfr}), explicitly accounted for at each barotropic iteration.838 The third term on the right hand side of \autoref{eq:DYN_BT_dyn} represents the bottom stress 839 (see section \autoref{sec:ZDF_drg}), explicitly accounted for at each barotropic iteration. 897 840 Temporal discretization of the system above follows a three-time step Generalized Forward Backward algorithm 898 841 detailed in \citet{shchepetkin.mcwilliams_OM05}. … … 901 844 (see their figure 12, lower left). 902 845 903 %> > > > > > > > > > > > > > > > > > > > > > > > > > > >904 846 \begin{figure}[!t] 905 \begin{center} 906 \includegraphics[width=\textwidth]{Fig_DYN_dynspg_ts} 907 \caption{ 908 \protect\label{fig:DYN_dynspg_ts} 909 Schematic of the split-explicit time stepping scheme for the external and internal modes. 910 Time increases to the right. In this particular exemple, 911 a boxcar averaging window over $nn\_baro$ barotropic time steps is used ($nn\_bt\_flt=1$) and $nn\_baro=5$. 912 Internal mode time steps (which are also the model time steps) are denoted by $t-\rdt$, $t$ and $t+\rdt$. 913 Variables with $k$ superscript refer to instantaneous barotropic variables, 914 $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary (red vertical bars) and 915 secondary weights (blue vertical bars). 916 The former are used to obtain time filtered quantities at $t+\rdt$ while 917 the latter are used to obtain time averaged transports to advect tracers. 918 a) Forward time integration: \protect\np{ln\_bt\_fw}\forcode{ = .true.}, 919 \protect\np{ln\_bt\_av}\forcode{ = .true.}. 920 b) Centred time integration: \protect\np{ln\_bt\_fw}\forcode{ = .false.}, 921 \protect\np{ln\_bt\_av}\forcode{ = .true.}. 922 c) Forward time integration with no time filtering (POM-like scheme): 923 \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .false.}. 924 } 925 \end{center} 847 \centering 848 \includegraphics[width=0.66\textwidth]{Fig_DYN_dynspg_ts} 849 \caption[Split-explicit time stepping scheme for the external and internal modes]{ 850 Schematic of the split-explicit time stepping scheme for the external and internal modes. 851 Time increases to the right. 852 In this particular exemple, 853 a boxcar averaging window over \np{nn_baro}{nn\_baro} barotropic time steps is used 854 (\np[=1]{nn_bt_flt}{nn\_bt\_flt}) and \np[=5]{nn_baro}{nn\_baro}. 855 Internal mode time steps (which are also the model time steps) are denoted by 856 $t-\rdt$, $t$ and $t+\rdt$. 857 Variables with $k$ superscript refer to instantaneous barotropic variables, 858 $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary 859 (red vertical bars) and secondary weights (blue vertical bars). 860 The former are used to obtain time filtered quantities at $t+\rdt$ while 861 the latter are used to obtain time averaged transports to advect tracers. 862 a) Forward time integration: 863 \protect\np[=.true.]{ln_bt_fw}{ln\_bt\_fw}, \protect\np[=.true.]{ln_bt_av}{ln\_bt\_av}. 864 b) Centred time integration: 865 \protect\np[=.false.]{ln_bt_fw}{ln\_bt\_fw}, \protect\np[=.true.]{ln_bt_av}{ln\_bt\_av}. 866 c) Forward time integration with no time filtering (POM-like scheme): 867 \protect\np[=.true.]{ln_bt_fw}{ln\_bt\_fw}, \protect\np[=.false.]{ln_bt_av}{ln\_bt\_av}.} 868 \label{fig:DYN_spg_ts} 926 869 \end{figure} 927 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > 928 929 In the default case (\np{ln\_bt\_fw}\forcode{ = .true.}), 870 871 In the default case (\np[=.true.]{ln_bt_fw}{ln\_bt\_fw}), 930 872 the external mode is integrated between \textit{now} and \textit{after} baroclinic time-steps 931 (\autoref{fig:DYN_ dynspg_ts}a).873 (\autoref{fig:DYN_spg_ts}a). 932 874 To avoid aliasing of fast barotropic motions into three dimensional equations, 933 time filtering is eventually applied on barotropic quantities (\np {ln\_bt\_av}\forcode{ = .true.}).875 time filtering is eventually applied on barotropic quantities (\np[=.true.]{ln_bt_av}{ln\_bt\_av}). 934 876 In that case, the integration is extended slightly beyond \textit{after} time step to 935 877 provide time filtered quantities. … … 938 880 asselin filtering is not applied to barotropic quantities.\\ 939 881 Alternatively, one can choose to integrate barotropic equations starting from \textit{before} time step 940 (\np {ln\_bt\_fw}\forcode{ = .false.}).941 Although more computationaly expensive ( \np{nn \_baro} additional iterations are indeed necessary),882 (\np[=.false.]{ln_bt_fw}{ln\_bt\_fw}). 883 Although more computationaly expensive ( \np{nn_baro}{nn\_baro} additional iterations are indeed necessary), 942 884 the baroclinic to barotropic forcing term given at \textit{now} time step become centred in 943 885 the middle of the integration window. … … 946 888 %references to Patrick Marsaleix' work here. Also work done by SHOM group. 947 889 948 %%%949 890 950 891 As far as tracer conservation is concerned, … … 960 901 obtain exact conservation. 961 902 962 %%%963 903 964 904 One can eventually choose to feedback instantaneous values by not using any time filter 965 (\np {ln\_bt\_av}\forcode{ = .false.}).905 (\np[=.false.]{ln_bt_av}{ln\_bt\_av}). 966 906 In that case, external mode equations are continuous in time, 967 907 \ie\ they are not re-initialized when starting a new sub-stepping sequence. … … 975 915 it is still significant as shown by \citet{levier.treguier.ea_rpt07} in the case of an analytical barotropic Kelvin wave. 976 916 977 %>>>>>===============978 917 \gmcomment{ %%% copy from griffies Book 979 918 … … 1095 1034 } %%end gm comment (copy of griffies book) 1096 1035 1097 %>>>>>=============== 1098 1099 1100 %-------------------------------------------------------------------------------------------------------------- 1101 % Filtered free surface formulation 1102 %-------------------------------------------------------------------------------------------------------------- 1103 \subsection[Filtered free surface (\texttt{dynspg\_flt?})] 1104 {Filtered free surface (\protect\texttt{dynspg\_flt?})} 1036 %% ================================================================================================= 1037 \subsection{Filtered free surface (\forcode{dynspg_flt?})} 1105 1038 \label{subsec:DYN_spg_fltp} 1106 1039 1107 1040 The filtered formulation follows the \citet{roullet.madec_JGR00} implementation. 1108 The extra term introduced in the equations (see \autoref{subsec: PE_free_surface}) is solved implicitly.1041 The extra term introduced in the equations (see \autoref{subsec:MB_free_surface}) is solved implicitly. 1109 1042 The elliptic solvers available in the code are documented in \autoref{chap:MISC}. 1110 1043 … … 1112 1045 \gmcomment{ %%% copy from chap-model basics 1113 1046 \[ 1114 % \label{eq: spg_flt}1047 % \label{eq:DYN_spg_flt} 1115 1048 \frac{\partial {\mathrm {\mathbf U}}_h }{\partial t}= {\mathrm {\mathbf M}} 1116 1049 - g \nabla \left( \tilde{\rho} \ \eta \right) … … 1120 1053 $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, 1121 1054 and $\mathrm {\mathbf M}$ represents the collected contributions of the Coriolis, hydrostatic pressure gradient, 1122 non-linear and viscous terms in \autoref{eq: PE_dyn}.1055 non-linear and viscous terms in \autoref{eq:MB_dyn}. 1123 1056 } %end gmcomment 1124 1057 … … 1127 1060 It is computed once and for all and applies to all ocean time steps. 1128 1061 1129 % ================================================================ 1130 % Lateral diffusion term 1131 % ================================================================ 1132 \section[Lateral diffusion term and operators (\textit{dynldf.F90})] 1133 {Lateral diffusion term and operators (\protect\mdl{dynldf})} 1062 %% ================================================================================================= 1063 \section[Lateral diffusion term and operators (\textit{dynldf.F90})]{Lateral diffusion term and operators (\protect\mdl{dynldf})} 1134 1064 \label{sec:DYN_ldf} 1135 %------------------------------------------nam_dynldf---------------------------------------------------- 1136 1137 \nlst{namdyn_ldf} 1138 %------------------------------------------------------------------------------------------------------------- 1139 1140 Options are defined through the \nam{dyn\_ldf} namelist variables. 1065 1066 \begin{listing} 1067 \nlst{namdyn_ldf} 1068 \caption{\forcode{&namdyn_ldf}} 1069 \label{lst:namdyn_ldf} 1070 \end{listing} 1071 1072 Options are defined through the \nam{dyn_ldf}{dyn\_ldf} namelist variables. 1141 1073 The options available for lateral diffusion are to use either laplacian (rotated or not) or biharmonic operators. 1142 1074 The coefficients may be constant or spatially variable; … … 1145 1077 \ie\ the velocity appearing in its expression is the \textit{before} velocity in time, 1146 1078 except for the pure vertical component that appears when a tensor of rotation is used. 1147 This latter term is solved implicitly together with the vertical diffusion term (see \autoref{chap: STP}).1079 This latter term is solved implicitly together with the vertical diffusion term (see \autoref{chap:TD}). 1148 1080 1149 1081 At the lateral boundaries either free slip, … … 1164 1096 } 1165 1097 1166 % ================================================================ 1167 \subsection[Iso-level laplacian (\forcode{ln_dynldf_lap = .true.})] 1168 {Iso-level laplacian operator (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})} 1098 %% ================================================================================================= 1099 \subsection[Iso-level laplacian (\forcode{ln_dynldf_lap})]{Iso-level laplacian operator (\protect\np{ln_dynldf_lap}{ln\_dynldf\_lap})} 1169 1100 \label{subsec:DYN_ldf_lap} 1170 1101 1171 1102 For lateral iso-level diffusion, the discrete operator is: 1172 1103 \begin{equation} 1173 \label{eq: dynldf_lap}1104 \label{eq:DYN_ldf_lap} 1174 1105 \left\{ 1175 1106 \begin{aligned} … … 1184 1115 \end{equation} 1185 1116 1186 As explained in \autoref{subsec: PE_ldf},1117 As explained in \autoref{subsec:MB_ldf}, 1187 1118 this formulation (as the gradient of a divergence and curl of the vorticity) preserves symmetry and 1188 1119 ensures a complete separation between the vorticity and divergence parts of the momentum diffusion. 1189 1120 1190 %-------------------------------------------------------------------------------------------------------------- 1191 % Rotated laplacian operator 1192 %-------------------------------------------------------------------------------------------------------------- 1193 \subsection[Rotated laplacian (\forcode{ln_dynldf_iso = .true.})] 1194 {Rotated laplacian operator (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})} 1121 %% ================================================================================================= 1122 \subsection[Rotated laplacian (\forcode{ln_dynldf_iso})]{Rotated laplacian operator (\protect\np{ln_dynldf_iso}{ln\_dynldf\_iso})} 1195 1123 \label{subsec:DYN_ldf_iso} 1196 1124 1197 1125 A rotation of the lateral momentum diffusion operator is needed in several cases: 1198 for iso-neutral diffusion in the $z$-coordinate (\np {ln\_dynldf\_iso}\forcode{ = .true.}) and1199 for either iso-neutral (\np {ln\_dynldf\_iso}\forcode{ = .true.}) or1200 geopotential (\np {ln\_dynldf\_hor}\forcode{ = .true.}) diffusion in the $s$-coordinate.1126 for iso-neutral diffusion in the $z$-coordinate (\np[=.true.]{ln_dynldf_iso}{ln\_dynldf\_iso}) and 1127 for either iso-neutral (\np[=.true.]{ln_dynldf_iso}{ln\_dynldf\_iso}) or 1128 geopotential (\np[=.true.]{ln_dynldf_hor}{ln\_dynldf\_hor}) diffusion in the $s$-coordinate. 1201 1129 In the partial step case, coordinates are horizontal except at the deepest level and 1202 no rotation is performed when \np {ln\_dynldf\_hor}\forcode{ = .true.}.1130 no rotation is performed when \np[=.true.]{ln_dynldf_hor}{ln\_dynldf\_hor}. 1203 1131 The diffusion operator is defined simply as the divergence of down gradient momentum fluxes on 1204 1132 each momentum component. … … 1206 1134 The resulting discrete representation is: 1207 1135 \begin{equation} 1208 \label{eq: dyn_ldf_iso}1136 \label{eq:DYN_ldf_iso} 1209 1137 \begin{split} 1210 1138 D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} } \\ … … 1247 1175 The way these slopes are evaluated is given in the lateral physics chapter (\autoref{chap:LDF}). 1248 1176 1249 %-------------------------------------------------------------------------------------------------------------- 1250 % Iso-level bilaplacian operator 1251 %-------------------------------------------------------------------------------------------------------------- 1252 \subsection[Iso-level bilaplacian (\forcode{ln_dynldf_bilap = .true.})] 1253 {Iso-level bilaplacian operator (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})} 1177 %% ================================================================================================= 1178 \subsection[Iso-level bilaplacian (\forcode{ln_dynldf_bilap})]{Iso-level bilaplacian operator (\protect\np{ln_dynldf_bilap}{ln\_dynldf\_bilap})} 1254 1179 \label{subsec:DYN_ldf_bilap} 1255 1180 1256 The lateral fourth order operator formulation on momentum is obtained by applying \autoref{eq: dynldf_lap} twice.1181 The lateral fourth order operator formulation on momentum is obtained by applying \autoref{eq:DYN_ldf_lap} twice. 1257 1182 It requires an additional assumption on boundary conditions: 1258 1183 the first derivative term normal to the coast depends on the free or no-slip lateral boundary conditions chosen, 1259 1184 while the third derivative terms normal to the coast are set to zero (see \autoref{chap:LBC}). 1260 %%%1261 1185 \gmcomment{add a remark on the the change in the position of the coefficient} 1262 %%% 1263 1264 % ================================================================ 1265 % Vertical diffusion term 1266 % ================================================================ 1267 \section[Vertical diffusion term (\textit{dynzdf.F90})] 1268 {Vertical diffusion term (\protect\mdl{dynzdf})} 1186 1187 %% ================================================================================================= 1188 \section[Vertical diffusion term (\textit{dynzdf.F90})]{Vertical diffusion term (\protect\mdl{dynzdf})} 1269 1189 \label{sec:DYN_zdf} 1270 %----------------------------------------------namzdf------------------------------------------------------ 1271 1272 \nlst{namzdf} 1273 %------------------------------------------------------------------------------------------------------------- 1274 1275 Options are defined through the \nam{zdf} namelist variables. 1190 1191 Options are defined through the \nam{zdf}{zdf} namelist variables. 1276 1192 The large vertical diffusion coefficient found in the surface mixed layer together with high vertical resolution implies that in the case of explicit time stepping there would be too restrictive a constraint on the time step. 1277 1193 Two time stepping schemes can be used for the vertical diffusion term: 1278 1194 $(a)$ a forward time differencing scheme 1279 (\np {ln\_zdfexp}\forcode{ = .true.}) using a time splitting technique (\np{nn\_zdfexp} $>$ 1) or1280 $(b)$ a backward (or implicit) time differencing scheme (\np {ln\_zdfexp}\forcode{ = .false.})1281 (see \autoref{chap: STP}).1282 Note that namelist variables \np{ln \_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics.1195 (\np[=.true.]{ln_zdfexp}{ln\_zdfexp}) using a time splitting technique (\np{nn_zdfexp}{nn\_zdfexp} $>$ 1) or 1196 $(b)$ a backward (or implicit) time differencing scheme (\np[=.false.]{ln_zdfexp}{ln\_zdfexp}) 1197 (see \autoref{chap:TD}). 1198 Note that namelist variables \np{ln_zdfexp}{ln\_zdfexp} and \np{nn_zdfexp}{nn\_zdfexp} apply to both tracers and dynamics. 1283 1199 1284 1200 The formulation of the vertical subgrid scale physics is the same whatever the vertical coordinate is. 1285 The vertical diffusion operators given by \autoref{eq: PE_zdf} take the following semi-discrete space form:1286 \[ 1287 % \label{eq: dynzdf}1201 The vertical diffusion operators given by \autoref{eq:MB_zdf} take the following semi-discrete space form: 1202 \[ 1203 % \label{eq:DYN_zdf} 1288 1204 \left\{ 1289 1205 \begin{aligned} … … 1303 1219 the vertical turbulent momentum fluxes, 1304 1220 \begin{equation} 1305 \label{eq: dynzdf_sbc}1221 \label{eq:DYN_zdf_sbc} 1306 1222 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1} 1307 1223 = \frac{1}{\rho_o} \binom{\tau_u}{\tau_v } … … 1316 1232 1317 1233 The turbulent flux of momentum at the bottom of the ocean is specified through a bottom friction parameterisation 1318 (see \autoref{sec:ZDF_bfr}) 1319 1320 % ================================================================ 1321 % External Forcing 1322 % ================================================================ 1234 (see \autoref{sec:ZDF_drg}) 1235 1236 %% ================================================================================================= 1323 1237 \section{External forcings} 1324 1238 \label{sec:DYN_forcing} … … 1328 1242 three other forcings may enter the dynamical equations by affecting the surface pressure gradient. 1329 1243 1330 (1) When \np {ln\_apr\_dyn}\forcode{ = .true.} (see \autoref{sec:SBC_apr}),1244 (1) When \np[=.true.]{ln_apr_dyn}{ln\_apr\_dyn} (see \autoref{sec:SBC_apr}), 1331 1245 the atmospheric pressure is taken into account when computing the surface pressure gradient. 1332 1246 1333 (2) When \np {ln\_tide\_pot}\forcode{ = .true.} and \np{ln\_tide}\forcode{ = .true.} (see \autoref{sec:SBC_tide}),1247 (2) When \np[=.true.]{ln_tide_pot}{ln\_tide\_pot} and \np[=.true.]{ln_tide}{ln\_tide} (see \autoref{sec:SBC_tide}), 1334 1248 the tidal potential is taken into account when computing the surface pressure gradient. 1335 1249 1336 (3) When \np {nn\_ice\_embd}\forcode{ = 2} and LIM or CICE is used1250 (3) When \np[=2]{nn_ice_embd}{nn\_ice\_embd} and LIM or CICE is used 1337 1251 (\ie\ when the sea-ice is embedded in the ocean), 1338 1252 the snow-ice mass is taken into account when computing the surface pressure gradient. 1339 1253 1340 1341 1254 \gmcomment{ missing : the lateral boundary condition !!! another external forcing 1342 1255 } 1343 1256 1344 % ================================================================ 1345 % Wetting and drying 1346 % ================================================================ 1257 %% ================================================================================================= 1347 1258 \section{Wetting and drying } 1348 1259 \label{sec:DYN_wetdry} 1260 1349 1261 There are two main options for wetting and drying code (wd): 1350 1262 (a) an iterative limiter (il) and (b) a directional limiter (dl). … … 1356 1268 by setting $\mathrm{ln\_wd\_dl} = \mathrm{.true.}$ and $\mathrm{ln\_wd\_il} = \mathrm{.false.}$. 1357 1269 1358 \nlst{namwad} 1270 \begin{listing} 1271 \nlst{namwad} 1272 \caption{\forcode{&namwad}} 1273 \label{lst:namwad} 1274 \end{listing} 1359 1275 1360 1276 The following terminology is used. The depth of the topography (positive downwards) … … 1391 1307 The final sub-section covers some additional considerations that are relevant to both schemes. 1392 1308 1393 1394 %-----------------------------------------------------------------------------------------1395 1309 % Iterative limiters 1396 %----------------------------------------------------------------------------------------- 1397 \subsection[Directional limiter (\textit{wet\_dry.F90})] 1398 {Directional limiter (\mdl{wet\_dry})} 1310 %% ================================================================================================= 1311 \subsection[Directional limiter (\textit{wet\_dry.F90})]{Directional limiter (\mdl{wet\_dry})} 1399 1312 \label{subsec:DYN_wd_directional_limiter} 1313 1400 1314 The principal idea of the directional limiter is that 1401 water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than \np{rn \_wdmin1}).1315 water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than \np{rn_wdmin1}{rn\_wdmin1}). 1402 1316 1403 1317 All the changes associated with this option are made to the barotropic solver for the non-linear … … 1409 1323 1410 1324 The flux across each $u$-face of a tracer cell is multiplied by a factor zuwdmask (an array which depends on ji and jj). 1411 If the user sets \np {ln\_wd\_dl\_ramp}\forcode{ = .false.} then zuwdmask is 1 when the1412 flux is from a cell with water depth greater than \np{rn \_wdmin1} and 0 otherwise. If the user sets1413 \np {ln\_wd\_dl\_ramp}\forcode{ = .true.} the flux across the face is ramped down as the water depth decreases1414 from 2 * \np{rn \_wdmin1} to \np{rn\_wdmin1}. The use of this ramp reduced grid-scale noise in idealised test cases.1325 If the user sets \np[=.false.]{ln_wd_dl_ramp}{ln\_wd\_dl\_ramp} then zuwdmask is 1 when the 1326 flux is from a cell with water depth greater than \np{rn_wdmin1}{rn\_wdmin1} and 0 otherwise. If the user sets 1327 \np[=.true.]{ln_wd_dl_ramp}{ln\_wd\_dl\_ramp} the flux across the face is ramped down as the water depth decreases 1328 from 2 * \np{rn_wdmin1}{rn\_wdmin1} to \np{rn_wdmin1}{rn\_wdmin1}. The use of this ramp reduced grid-scale noise in idealised test cases. 1415 1329 1416 1330 At the point where the flux across a $u$-face is multiplied by zuwdmask , we have chosen … … 1422 1336 treatment in the calculation of the flux of mass across the cell face. 1423 1337 1424 1425 1338 \cite{warner.defne.ea_CG13} state that in their scheme the velocity masks at the cell faces for the baroclinic 1426 1339 timesteps are set to 0 or 1 depending on whether the average of the masks over the barotropic sub-steps is respectively less than … … 1428 1341 fields (tracers independent of $x$, $y$ and $z$). Our scheme conserves constant tracers because 1429 1342 the velocities used at the tracer cell faces on the baroclinic timesteps are carefully calculated by dynspg\_ts 1430 to equal their mean value during the barotropic steps. If the user sets \np {ln\_wd\_dl\_bc}\forcode{ = .true.}, the1343 to equal their mean value during the barotropic steps. If the user sets \np[=.true.]{ln_wd_dl_bc}{ln\_wd\_dl\_bc}, the 1431 1344 baroclinic velocities are also multiplied by a suitably weighted average of zuwdmask. 1432 1345 1433 %-----------------------------------------------------------------------------------------1434 1346 % Iterative limiters 1435 %----------------------------------------------------------------------------------------- 1436 1437 \subsection[Iterative limiter (\textit{wet\_dry.F90})] 1438 {Iterative limiter (\mdl{wet\_dry})} 1347 1348 %% ================================================================================================= 1349 \subsection[Iterative limiter (\textit{wet\_dry.F90})]{Iterative limiter (\mdl{wet\_dry})} 1439 1350 \label{subsec:DYN_wd_iterative_limiter} 1440 1351 1441 \subsubsection[Iterative flux limiter (\textit{wet\_dry.F90})] 1442 {Iterative flux limiter (\mdl{wet\_dry})}1443 \label{subs ubsec:DYN_wd_il_spg_limiter}1352 %% ================================================================================================= 1353 \subsubsection[Iterative flux limiter (\textit{wet\_dry.F90})]{Iterative flux limiter (\mdl{wet\_dry})} 1354 \label{subsec:DYN_wd_il_spg_limiter} 1444 1355 1445 1356 The iterative limiter modifies the fluxes across the faces of cells that are either already ``dry'' … … 1449 1360 1450 1361 The continuity equation for the total water depth in a column 1451 \begin{equation} \label{dyn_wd_continuity} 1452 \frac{\partial h}{\partial t} + \mathbf{\nabla.}(h\mathbf{u}) = 0 . 1362 \begin{equation} 1363 \label{eq:DYN_wd_continuity} 1364 \frac{\partial h}{\partial t} + \mathbf{\nabla.}(h\mathbf{u}) = 0 . 1453 1365 \end{equation} 1454 1366 can be written in discrete form as 1455 1367 1456 \begin{align} \label{dyn_wd_continuity_2} 1457 \frac{e_1 e_2}{\Delta t} ( h_{i,j}(t_{n+1}) - h_{i,j}(t_e) ) 1458 &= - ( \mathrm{flxu}_{i+1,j} - \mathrm{flxu}_{i,j} + \mathrm{flxv}_{i,j+1} - \mathrm{flxv}_{i,j} ) \\ 1459 &= \mathrm{zzflx}_{i,j} . 1368 \begin{align} 1369 \label{eq:DYN_wd_continuity_2} 1370 \frac{e_1 e_2}{\Delta t} ( h_{i,j}(t_{n+1}) - h_{i,j}(t_e) ) 1371 &= - ( \mathrm{flxu}_{i+1,j} - \mathrm{flxu}_{i,j} + \mathrm{flxv}_{i,j+1} - \mathrm{flxv}_{i,j} ) \\ 1372 &= \mathrm{zzflx}_{i,j} . 1460 1373 \end{align} 1461 1374 … … 1470 1383 (zzflxp) and fluxes that are into the cell (zzflxn). Clearly 1471 1384 1472 \begin{equation} \label{dyn_wd_zzflx_p_n_1} 1473 \mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} . 1385 \begin{equation} 1386 \label{eq:DYN_wd_zzflx_p_n_1} 1387 \mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} . 1474 1388 \end{equation} 1475 1389 … … 1482 1396 $\mathrm{zcoef}_{i,j}^{(m)}$ such that: 1483 1397 1484 \begin{equation} \label{dyn_wd_continuity_coef} 1485 \begin{split} 1486 \mathrm{zzflxp}^{(m)}_{i,j} =& \mathrm{zcoef}_{i,j}^{(m)} \mathrm{zzflxp}^{(0)}_{i,j} \\ 1487 \mathrm{zzflxn}^{(m)}_{i,j} =& \mathrm{zcoef}_{i,j}^{(m)} \mathrm{zzflxn}^{(0)}_{i,j} 1488 \end{split} 1398 \begin{equation} 1399 \label{eq:DYN_wd_continuity_coef} 1400 \begin{split} 1401 \mathrm{zzflxp}^{(m)}_{i,j} =& \mathrm{zcoef}_{i,j}^{(m)} \mathrm{zzflxp}^{(0)}_{i,j} \\ 1402 \mathrm{zzflxn}^{(m)}_{i,j} =& \mathrm{zcoef}_{i,j}^{(m)} \mathrm{zzflxn}^{(0)}_{i,j} 1403 \end{split} 1489 1404 \end{equation} 1490 1405 … … 1494 1409 The iteration is initialised by setting 1495 1410 1496 \begin{equation} \label{dyn_wd_zzflx_initial} 1497 \mathrm{zzflxp^{(0)}}_{i,j} = \mathrm{zzflxp}_{i,j} , \quad \mathrm{zzflxn^{(0)}}_{i,j} = \mathrm{zzflxn}_{i,j} . 1411 \begin{equation} 1412 \label{eq:DYN_wd_zzflx_initial} 1413 \mathrm{zzflxp^{(0)}}_{i,j} = \mathrm{zzflxp}_{i,j} , \quad \mathrm{zzflxn^{(0)}}_{i,j} = \mathrm{zzflxn}_{i,j} . 1498 1414 \end{equation} 1499 1415 1500 1416 The fluxes out of cell $(i,j)$ are updated at the $m+1$th iteration if the depth of the 1501 1417 cell on timestep $t_e$, namely $h_{i,j}(t_e)$, is less than the total flux out of the cell 1502 times the timestep divided by the cell area. Using (\ ref{dyn_wd_continuity_2}) this1418 times the timestep divided by the cell area. Using (\autoref{eq:DYN_wd_continuity_2}) this 1503 1419 condition is 1504 1420 1505 \begin{equation} \label{dyn_wd_continuity_if} 1506 h_{i,j}(t_e) - \mathrm{rn\_wdmin1} < \frac{\Delta t}{e_1 e_2} ( \mathrm{zzflxp}^{(m)}_{i,j} + \mathrm{zzflxn}^{(m)}_{i,j} ) . 1507 \end{equation} 1508 1509 Rearranging (\ref{dyn_wd_continuity_if}) we can obtain an expression for the maximum 1421 \begin{equation} 1422 \label{eq:DYN_wd_continuity_if} 1423 h_{i,j}(t_e) - \mathrm{rn\_wdmin1} < \frac{\Delta t}{e_1 e_2} ( \mathrm{zzflxp}^{(m)}_{i,j} + \mathrm{zzflxn}^{(m)}_{i,j} ) . 1424 \end{equation} 1425 1426 Rearranging (\autoref{eq:DYN_wd_continuity_if}) we can obtain an expression for the maximum 1510 1427 outward flux that can be allowed and still maintain the minimum wet depth: 1511 1428 1512 \begin{equation} \label{dyn_wd_max_flux} 1513 \begin{split} 1514 \mathrm{zzflxp}^{(m+1)}_{i,j} = \Big[ (h_{i,j}(t_e) & - \mathrm{rn\_wdmin1} - \mathrm{rn\_wdmin2}) \frac{e_1 e_2}{\Delta t} \phantom{]} \\ 1515 \phantom{[} & - \mathrm{zzflxn}^{(m)}_{i,j} \Big] 1516 \end{split} 1429 \begin{equation} 1430 \label{eq:DYN_wd_max_flux} 1431 \begin{split} 1432 \mathrm{zzflxp}^{(m+1)}_{i,j} = \Big[ (h_{i,j}(t_e) & - \mathrm{rn\_wdmin1} - \mathrm{rn\_wdmin2}) \frac{e_1 e_2}{\Delta t} \phantom{]} \\ 1433 \phantom{[} & - \mathrm{zzflxn}^{(m)}_{i,j} \Big] 1434 \end{split} 1517 1435 \end{equation} 1518 1436 1519 1437 Note a small tolerance ($\mathrm{rn\_wdmin2}$) has been introduced here {\itshape [Q: Why is 1520 this necessary/desirable?]}. Substituting from (\ ref{dyn_wd_continuity_coef}) gives an1438 this necessary/desirable?]}. Substituting from (\autoref{eq:DYN_wd_continuity_coef}) gives an 1521 1439 expression for the coefficient needed to multiply the outward flux at this cell in order 1522 1440 to avoid drying. 1523 1441 1524 \begin{equation} \label{dyn_wd_continuity_nxtcoef} 1525 \begin{split} 1526 \mathrm{zcoef}^{(m+1)}_{i,j} = \Big[ (h_{i,j}(t_e) & - \mathrm{rn\_wdmin1} - \mathrm{rn\_wdmin2}) \frac{e_1 e_2}{\Delta t} \phantom{]} \\ 1527 \phantom{[} & - \mathrm{zzflxn}^{(m)}_{i,j} \Big] \frac{1}{ \mathrm{zzflxp}^{(0)}_{i,j} } 1528 \end{split} 1442 \begin{equation} 1443 \label{eq:DYN_wd_continuity_nxtcoef} 1444 \begin{split} 1445 \mathrm{zcoef}^{(m+1)}_{i,j} = \Big[ (h_{i,j}(t_e) & - \mathrm{rn\_wdmin1} - \mathrm{rn\_wdmin2}) \frac{e_1 e_2}{\Delta t} \phantom{]} \\ 1446 \phantom{[} & - \mathrm{zzflxn}^{(m)}_{i,j} \Big] \frac{1}{ \mathrm{zzflxp}^{(0)}_{i,j} } 1447 \end{split} 1529 1448 \end{equation} 1530 1449 … … 1541 1460 directional limiter does. 1542 1461 1543 1544 %----------------------------------------------------------------------------------------1545 1462 % Surface pressure gradients 1546 %---------------------------------------------------------------------------------------- 1547 \subsubsection[Modification of surface pressure gradients (\textit{dynhpg.F90})] 1548 {Modification of surface pressure gradients (\mdl{dynhpg})} 1549 \label{subsubsec:DYN_wd_il_spg} 1463 %% ================================================================================================= 1464 \subsubsection[Modification of surface pressure gradients (\textit{dynhpg.F90})]{Modification of surface pressure gradients (\mdl{dynhpg})} 1465 \label{subsec:DYN_wd_il_spg} 1550 1466 1551 1467 At ``dry'' points the water depth is usually close to $\mathrm{rn\_wdmin1}$. If the … … 1560 1476 neighbouring $(i+1,j)$ and $(i,j)$ tracer points. zcpx is calculated using two logicals 1561 1477 variables, $\mathrm{ll\_tmp1}$ and $\mathrm{ll\_tmp2}$ which are evaluated for each grid 1562 column. The three possible combinations are illustrated in figure \ref{Fig_WAD_dynhpg}. 1563 1564 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1565 \begin{figure}[!ht] \begin{center} 1566 \includegraphics[width=\textwidth]{Fig_WAD_dynhpg} 1567 \caption{ \label{Fig_WAD_dynhpg} 1568 Illustrations of the three possible combinations of the logical variables controlling the 1569 limiting of the horizontal pressure gradient in wetting and drying regimes} 1570 \end{center}\end{figure} 1571 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1478 column. The three possible combinations are illustrated in \autoref{fig:DYN_WAD_dynhpg}. 1479 1480 \begin{figure}[!ht] 1481 \centering 1482 \includegraphics[width=0.66\textwidth]{Fig_WAD_dynhpg} 1483 \caption[Combinations controlling the limiting of the horizontal pressure gradient in 1484 wetting and drying regimes]{ 1485 Three possible combinations of the logical variables controlling the 1486 limiting of the horizontal pressure gradient in wetting and drying regimes} 1487 \label{fig:DYN_WAD_dynhpg} 1488 \end{figure} 1572 1489 1573 1490 The first logical, $\mathrm{ll\_tmp1}$, is set to true if and only if the water depth at … … 1576 1493 of the topography at the two points: 1577 1494 1578 \begin{equation} \label{dyn_ll_tmp1} 1579 \begin{split} 1580 \mathrm{ll\_tmp1} = & \mathrm{MIN(sshn(ji,jj), sshn(ji+1,jj))} > \\ 1495 \begin{equation} 1496 \label{eq:DYN_ll_tmp1} 1497 \begin{split} 1498 \mathrm{ll\_tmp1} = & \mathrm{MIN(sshn(ji,jj), sshn(ji+1,jj))} > \\ 1581 1499 & \quad \mathrm{MAX(-ht\_wd(ji,jj), -ht\_wd(ji+1,jj))\ .and.} \\ 1582 & \mathrm{MAX(sshn(ji,jj) + ht\_wd(ji,jj),} \\1583 & \mathrm{\phantom{MAX(}sshn(ji+1,jj) + ht\_wd(ji+1,jj))} >\\1584 & \quad\quad\mathrm{rn\_wdmin1 + rn\_wdmin2 }1585 \end{split}1500 & \mathrm{MAX(sshn(ji,jj) + ht\_wd(ji,jj),} \\ 1501 & \mathrm{\phantom{MAX(}sshn(ji+1,jj) + ht\_wd(ji+1,jj))} >\\ 1502 & \quad\quad\mathrm{rn\_wdmin1 + rn\_wdmin2 } 1503 \end{split} 1586 1504 \end{equation} 1587 1505 … … 1590 1508 at the two points plus $\mathrm{rn\_wdmin1} + \mathrm{rn\_wdmin2}$ 1591 1509 1592 \begin{equation} \label{dyn_ll_tmp2} 1593 \begin{split} 1594 \mathrm{ ll\_tmp2 } = & \mathrm{( ABS( sshn(ji,jj) - sshn(ji+1,jj) ) > 1.E-12 )\ .AND.}\\ 1595 & \mathrm{( MAX(sshn(ji,jj), sshn(ji+1,jj)) > } \\ 1596 & \mathrm{\phantom{(} MAX(-ht\_wd(ji,jj), -ht\_wd(ji+1,jj)) + rn\_wdmin1 + rn\_wdmin2}) . 1597 \end{split} 1510 \begin{equation} 1511 \label{eq:DYN_ll_tmp2} 1512 \begin{split} 1513 \mathrm{ ll\_tmp2 } = & \mathrm{( ABS( sshn(ji,jj) - sshn(ji+1,jj) ) > 1.E-12 )\ .AND.}\\ 1514 & \mathrm{( MAX(sshn(ji,jj), sshn(ji+1,jj)) > } \\ 1515 & \mathrm{\phantom{(} MAX(-ht\_wd(ji,jj), -ht\_wd(ji+1,jj)) + rn\_wdmin1 + rn\_wdmin2}) . 1516 \end{split} 1598 1517 \end{equation} 1599 1518 … … 1611 1530 conditions. 1612 1531 1613 \subsubsection[Additional considerations (\textit{usrdef\_zgr.F90})] 1614 {Additional considerations (\mdl{usrdef\_zgr})}1615 \label{subs ubsec:WAD_additional}1532 %% ================================================================================================= 1533 \subsubsection[Additional considerations (\textit{usrdef\_zgr.F90})]{Additional considerations (\mdl{usrdef\_zgr})} 1534 \label{subsec:DYN_WAD_additional} 1616 1535 1617 1536 In the very shallow water where wetting and drying occurs the parametrisation of … … 1623 1542 in uncoupled integrations the net surface heat fluxes need to be appropriately limited. 1624 1543 1625 %----------------------------------------------------------------------------------------1626 1544 % The WAD test cases 1627 %---------------------------------------------------------------------------------------- 1628 \subsection[The WAD test cases (\textit{usrdef\_zgr.F90})] 1629 {The WAD test cases (\mdl{usrdef\_zgr})} 1630 \label{WAD_test_cases} 1545 %% ================================================================================================= 1546 \subsection[The WAD test cases (\textit{usrdef\_zgr.F90})]{The WAD test cases (\mdl{usrdef\_zgr})} 1547 \label{subsec:DYN_WAD_test_cases} 1631 1548 1632 1549 See the WAD tests MY\_DOC documention for details of the WAD test cases. 1633 1550 1634 1635 1636 % ================================================================ 1637 % Time evolution term 1638 % ================================================================ 1639 \section[Time evolution term (\textit{dynnxt.F90})] 1640 {Time evolution term (\protect\mdl{dynnxt})} 1551 %% ================================================================================================= 1552 \section[Time evolution term (\textit{dynnxt.F90})]{Time evolution term (\protect\mdl{dynnxt})} 1641 1553 \label{sec:DYN_nxt} 1642 1554 1643 %----------------------------------------------namdom---------------------------------------------------- 1644 1645 \nlst{namdom} 1646 %------------------------------------------------------------------------------------------------------------- 1647 1648 Options are defined through the \nam{dom} namelist variables. 1555 Options are defined through the \nam{dom}{dom} namelist variables. 1649 1556 The general framework for dynamics time stepping is a leap-frog scheme, 1650 \ie\ a three level centred time scheme associated with an Asselin time filter (cf. \autoref{chap: STP}).1557 \ie\ a three level centred time scheme associated with an Asselin time filter (cf. \autoref{chap:TD}). 1651 1558 The scheme is applied to the velocity, except when 1652 1559 using the flux form of momentum advection (cf. \autoref{sec:DYN_adv_cor_flux}) 1653 1560 in the variable volume case (\texttt{vvl?} defined), 1654 where it has to be applied to the thickness weighted velocity (see \autoref{sec: A_momentum})1561 where it has to be applied to the thickness weighted velocity (see \autoref{sec:SCOORD_momentum}) 1655 1562 1656 1563 $\bullet$ vector invariant form or linear free surface 1657 (\np {ln\_dynhpg\_vec}\forcode{ = .true.} ; \texttt{vvl?} not defined):1658 \[ 1659 % \label{eq: dynnxt_vec}1564 (\np[=.true.]{ln_dynhpg_vec}{ln\_dynhpg\_vec} ; \texttt{vvl?} not defined): 1565 \[ 1566 % \label{eq:DYN_nxt_vec} 1660 1567 \left\{ 1661 1568 \begin{aligned} … … 1667 1574 1668 1575 $\bullet$ flux form and nonlinear free surface 1669 (\np {ln\_dynhpg\_vec}\forcode{ = .false.} ; \texttt{vvl?} defined):1670 \[ 1671 % \label{eq: dynnxt_flux}1576 (\np[=.false.]{ln_dynhpg_vec}{ln\_dynhpg\_vec} ; \texttt{vvl?} defined): 1577 \[ 1578 % \label{eq:DYN_nxt_flux} 1672 1579 \left\{ 1673 1580 \begin{aligned} … … 1680 1587 where RHS is the right hand side of the momentum equation, 1681 1588 the subscript $f$ denotes filtered values and $\gamma$ is the Asselin coefficient. 1682 $\gamma$ is initialized as \np{nn \_atfp} (namelist parameter).1683 Its default value is \np {nn\_atfp}\forcode{ = 10.e-3}.1589 $\gamma$ is initialized as \np{nn_atfp}{nn\_atfp} (namelist parameter). 1590 Its default value is \np[=10.e-3]{nn_atfp}{nn\_atfp}. 1684 1591 In both cases, the modified Asselin filter is not applied since perfect conservation is not an issue for 1685 1592 the momentum equations. … … 1689 1596 and only array swapping and Asselin filtering is done in \mdl{dynnxt}. 1690 1597 1691 % ================================================================ 1692 \biblio 1693 1694 \pindex 1598 \onlyinsubfile{\input{../../global/epilogue}} 1695 1599 1696 1600 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_LBC.tex
r11445 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter — Lateral Boundary Condition (LBC) 6 % ================================================================ 4 7 5 \chapter{Lateral Boundary Condition (LBC)} 8 6 \label{chap:LBC} 9 7 8 \thispagestyle{plain} 9 10 10 \chaptertoc 11 11 12 \newpage 12 \paragraph{Changes record} ~\\ 13 14 {\footnotesize 15 \begin{tabularx}{\textwidth}{l||X|X} 16 Release & Author(s) & Modifications \\ 17 \hline 18 {\em 4.0} & {\em ...} & {\em ...} \\ 19 {\em 3.6} & {\em ...} & {\em ...} \\ 20 {\em 3.4} & {\em ...} & {\em ...} \\ 21 {\em <=3.4} & {\em ...} & {\em ...} 22 \end{tabularx} 23 } 24 25 \clearpage 13 26 14 27 %gm% add here introduction to this chapter 15 28 16 % ================================================================ 17 % Boundary Condition at the Coast 18 % ================================================================ 19 \section[Boundary condition at the coast (\texttt{rn\_shlat})] 20 {Boundary condition at the coast (\protect\np{rn\_shlat})} 29 %% ================================================================================================= 30 \section[Boundary condition at the coast (\forcode{rn_shlat})]{Boundary condition at the coast (\protect\np{rn_shlat}{rn\_shlat})} 21 31 \label{sec:LBC_coast} 22 %--------------------------------------------nam_lbc------------------------------------------------------- 23 24 \nlst{namlbc} 25 %-------------------------------------------------------------------------------------------------------------- 32 33 \begin{listing} 34 \nlst{namlbc} 35 \caption{\forcode{&namlbc}} 36 \label{lst:namlbc} 37 \end{listing} 26 38 27 39 %The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt … … 40 52 %The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}. 41 53 42 Options are defined through the \nam{lbc} namelist variables.54 Options are defined through the \nam{lbc}{lbc} namelist variables. 43 55 The discrete representation of a domain with complex boundaries (coastlines and bottom topography) leads to 44 56 arrays that include large portions where a computation is not required as the model variables remain at zero. … … 57 69 58 70 \[ 59 % \label{eq: lbc_aaaa}71 % \label{eq:LBC_aaaa} 60 72 \frac{A^{lT} }{e_1 }\frac{\partial T}{\partial i}\equiv \frac{A_u^{lT} 61 73 }{e_{1u} } \; \delta_{i+1 / 2} \left[ T \right]\;\;mask_u … … 65 77 (normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}). 66 78 67 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>68 79 \begin{figure}[!t] 69 \begin{center} 70 \includegraphics[width=\textwidth]{Fig_LBC_uv} 71 \caption{ 72 \protect\label{fig:LBC_uv} 73 Lateral boundary (thick line) at T-level. 74 The velocity normal to the boundary is set to zero. 75 } 76 \end{center} 80 \centering 81 \includegraphics[width=0.66\textwidth]{Fig_LBC_uv} 82 \caption[Lateral boundary at $T$-level]{ 83 Lateral boundary (thick line) at T-level. 84 The velocity normal to the boundary is set to zero.} 85 \label{fig:LBC_uv} 77 86 \end{figure} 78 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>79 87 80 88 For momentum the situation is a bit more complex as two boundary conditions must be provided along the coast … … 90 98 and is required in order to compute the vorticity at the coast. 91 99 Four different types of lateral boundary condition are available, 92 controlled by the value of the \np{rn \_shlat} namelist parameter100 controlled by the value of the \np{rn_shlat}{rn\_shlat} namelist parameter 93 101 (The value of the mask$_{f}$ array along the coastline is set equal to this parameter). 94 102 These are: 95 103 96 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>97 104 \begin{figure}[!p] 98 \begin{center} 99 \includegraphics[width=\textwidth]{Fig_LBC_shlat} 100 \caption{ 101 \protect\label{fig:LBC_shlat} 102 lateral boundary condition 103 (a) free-slip ($rn\_shlat=0$); 104 (b) no-slip ($rn\_shlat=2$); 105 (c) "partial" free-slip ($0<rn\_shlat<2$) and 106 (d) "strong" no-slip ($2<rn\_shlat$). 107 Implied "ghost" velocity inside land area is display in grey. 108 } 109 \end{center} 105 \centering 106 \includegraphics[width=0.66\textwidth]{Fig_LBC_shlat} 107 \caption[Lateral boundary conditions]{ 108 Lateral boundary conditions 109 (a) free-slip (\protect\np[=0]{rn_shlat}{rn\_shlat}); 110 (b) no-slip (\protect\np[=2]{rn_shlat}{rn\_shlat}); 111 (c) "partial" free-slip (\forcode{0<}\protect\np[<2]{rn_shlat}{rn\_shlat}) and 112 (d) "strong" no-slip (\forcode{2<}\protect\np{rn_shlat}{rn\_shlat}). 113 Implied "ghost" velocity inside land area is display in grey.} 114 \label{fig:LBC_shlat} 110 115 \end{figure} 111 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>112 116 113 117 \begin{description} 114 118 115 \item [free-slip boundary condition (\np{rn\_shlat}\forcode{ = 0}):] the tangential velocity at119 \item [free-slip boundary condition ({\np[=0]{rn_shlat}{rn\_shlat}})] the tangential velocity at 116 120 the coastline is equal to the offshore velocity, 117 121 \ie\ the normal derivative of the tangential velocity is zero at the coast, … … 119 123 (\autoref{fig:LBC_shlat}-a). 120 124 121 \item [no-slip boundary condition (\np{rn\_shlat}\forcode{ = 2}):] the tangential velocity vanishes at the coastline.125 \item [no-slip boundary condition ({\np[=2]{rn_shlat}{rn\_shlat}})] the tangential velocity vanishes at the coastline. 122 126 Assuming that the tangential velocity decreases linearly from 123 127 the closest ocean velocity grid point to the coastline, … … 134 138 the no-slip boundary condition, simply by multiplying it by the mask$_{f}$ : 135 139 \[ 136 % \label{eq: lbc_bbbb}140 % \label{eq:LBC_bbbb} 137 141 \zeta \equiv \frac{1}{e_{1f} {\kern 1pt}e_{2f} }\left( {\delta_{i+1/2} 138 142 \left[ {e_{2v} \,v} \right]-\delta_{j+1/2} \left[ {e_{1u} \,u} \right]} … … 140 144 \] 141 145 142 \item ["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2):] the tangential velocity at146 \item ["partial" free-slip boundary condition (0$<$\np{rn_shlat}{rn\_shlat}$<$2)] the tangential velocity at 143 147 the coastline is smaller than the offshore velocity, \ie\ there is a lateral friction but 144 148 not strong enough to make the tangential velocity at the coast vanish (\autoref{fig:LBC_shlat}-c). 145 149 This can be selected by providing a value of mask$_{f}$ strictly inbetween $0$ and $2$. 146 150 147 \item ["strong" no-slip boundary condition (2$<$\np{rn\_shlat}):] the viscous boundary layer is assumed to151 \item ["strong" no-slip boundary condition (2$<$\np{rn_shlat}{rn\_shlat})] the viscous boundary layer is assumed to 148 152 be smaller than half the grid size (\autoref{fig:LBC_shlat}-d). 149 153 The friction is thus larger than in the no-slip case. … … 155 159 it is only applied next to the coast where the minimum water depth can be quite shallow. 156 160 157 158 % ================================================================ 159 % Boundary Condition around the Model Domain 160 % ================================================================ 161 \section[Model domain boundary condition (\texttt{jperio})] 162 {Model domain boundary condition (\protect\jp{jperio})} 161 %% ================================================================================================= 162 \section[Model domain boundary condition (\forcode{jperio})]{Model domain boundary condition (\protect\jp{jperio})} 163 163 \label{sec:LBC_jperio} 164 164 … … 168 168 The north-fold boundary condition is associated with the 3-pole ORCA mesh. 169 169 170 % ------------------------------------------------------------------------------------------------------------- 171 % Closed, cyclic (\jp{jperio}\forcode{ = 0..2}) 172 % ------------------------------------------------------------------------------------------------------------- 173 \subsection[Closed, cyclic (\forcode{jperio = [0127]})] 174 {Closed, cyclic (\protect\jp{jperio}\forcode{ = [0127]})} 170 %% ================================================================================================= 171 \subsection[Closed, cyclic (\forcode{=0,1,2,7})]{Closed, cyclic (\protect\jp{jperio}\forcode{=0,1,2,7})} 175 172 \label{subsec:LBC_jperio012} 176 173 177 174 The choice of closed or cyclic model domain boundary condition is made by 178 setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg} .175 setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}{cfg}. 179 176 Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}. 180 177 The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$, … … 185 182 \begin{description} 186 183 187 \item[For closed boundary (\jp{jperio}\forcode{ = 0})], 188 solid walls are imposed at all model boundaries: 184 \item [For closed boundary (\jp{jperio}\forcode{=0})], solid walls are imposed at all model boundaries: 189 185 first and last rows and columns are set to zero. 190 186 191 \item[For cyclic east-west boundary (\jp{jperio}\forcode{ = 1})], 192 first and last rows are set to zero (closed) whilst the first column is set to 187 \item [For cyclic east-west boundary (\jp{jperio}\forcode{=1})], first and last rows are set to zero (closed) whilst the first column is set to 193 188 the value of the last-but-one column and the last column to the value of the second one 194 189 (\autoref{fig:LBC_jperio}-a). 195 190 Whatever flows out of the eastern (western) end of the basin enters the western (eastern) end. 196 191 197 \item[For cyclic north-south boundary (\jp{jperio}\forcode{ = 2})], 198 first and last columns are set to zero (closed) whilst the first row is set to 192 \item [For cyclic north-south boundary (\jp{jperio}\forcode{=2})], first and last columns are set to zero (closed) whilst the first row is set to 199 193 the value of the last-but-one row and the last row to the value of the second one 200 194 (\autoref{fig:LBC_jperio}-a). 201 195 Whatever flows out of the northern (southern) end of the basin enters the southern (northern) end. 202 196 203 \item [Bi-cyclic east-west and north-south boundary (\jp{jperio}\forcode{ =7})] combines cases 1 and 2.197 \item [Bi-cyclic east-west and north-south boundary (\jp{jperio}\forcode{=7})] combines cases 1 and 2. 204 198 205 199 \end{description} 206 200 207 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>208 201 \begin{figure}[!t] 209 \begin{center} 210 \includegraphics[width=\textwidth]{Fig_LBC_jperio} 211 \caption{ 212 \protect\label{fig:LBC_jperio} 213 setting of (a) east-west cyclic (b) symmetric across the equator boundary conditions. 214 } 215 \end{center} 202 \centering 203 \includegraphics[width=0.66\textwidth]{Fig_LBC_jperio} 204 \caption[Setting of east-west cyclic and symmetric across the Equator boundary conditions]{ 205 Setting of (a) east-west cyclic (b) symmetric across the Equator boundary conditions} 206 \label{fig:LBC_jperio} 216 207 \end{figure} 217 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 218 219 % ------------------------------------------------------------------------------------------------------------- 220 % North fold (\textit{jperio = 3 }to $6)$ 221 % ------------------------------------------------------------------------------------------------------------- 222 \subsection[North-fold (\forcode{jperio = [3-6]})] 223 {North-fold (\protect\jp{jperio}\forcode{ = [3-6]})} 208 209 %% ================================================================================================= 210 \subsection[North-fold (\forcode{=3,6})]{North-fold (\protect\jp{jperio}\forcode{=3,6})} 224 211 \label{subsec:LBC_north_fold} 225 212 226 213 The north fold boundary condition has been introduced in order to handle the north boundary of 227 214 a three-polar ORCA grid. 228 Such a grid has two poles in the northern hemisphere (\autoref{fig: MISC_ORCA_msh},229 and thus requires a specific treatment illustrated in \autoref{fig: North_Fold_T}.215 Such a grid has two poles in the northern hemisphere (\autoref{fig:CFGS_ORCA_msh}, 216 and thus requires a specific treatment illustrated in \autoref{fig:LBC_North_Fold_T}. 230 217 Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition. 231 218 232 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>233 219 \begin{figure}[!t] 234 \begin{center} 235 \includegraphics[width=\textwidth]{Fig_North_Fold_T} 236 \caption{ 237 \protect\label{fig:North_Fold_T} 238 North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$), 239 as used in ORCA 2, 1/4, and 1/12. 240 Pink shaded area corresponds to the inner domain mask (see text). 241 } 242 \end{center} 220 \centering 221 \includegraphics[width=0.66\textwidth]{Fig_North_Fold_T} 222 \caption[North fold boundary in ORCA 2\deg, 1/4\deg and 1/12\deg]{ 223 North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$), 224 as used in ORCA 2\deg, 1/4\deg and 1/12\deg. 225 Pink shaded area corresponds to the inner domain mask (see text).} 226 \label{fig:LBC_North_Fold_T} 243 227 \end{figure} 244 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 245 246 % ==================================================================== 247 % Exchange with neighbouring processors 248 % ==================================================================== 249 \section[Exchange with neighbouring processors (\textit{lbclnk.F90}, \textit{lib\_mpp.F90})] 250 {Exchange with neighbouring processors (\protect\mdl{lbclnk}, \protect\mdl{lib\_mpp})} 228 229 %% ================================================================================================= 230 \section[Exchange with neighbouring processors (\textit{lbclnk.F90}, \textit{lib\_mpp.F90})]{Exchange with neighbouring processors (\protect\mdl{lbclnk}, \protect\mdl{lib\_mpp})} 251 231 \label{sec:LBC_mpp} 252 232 233 \begin{listing} 234 \nlst{nammpp} 235 \caption{\forcode{&nammpp}} 236 \label{lst:nammpp} 237 \end{listing} 238 253 239 For massively parallel processing (mpp), a domain decomposition method is used. 254 The basic idea of the method is to split the large computation domain of a numerical experiment into 255 s everal smaller domains and solve the set of equations by addressing independent local problems.240 The basic idea of the method is to split the large computation domain of a numerical experiment into several smaller domains and 241 solve the set of equations by addressing independent local problems. 256 242 Each processor has its own local memory and computes the model equation over a subdomain of the whole model domain. 257 The subdomain boundary conditions are specified through communications between processors which 258 are organized by explicit statements (message passing method). 259 260 A big advantage is that the method does not need many modifications of the initial \fortran code. 261 From the modeller's point of view, each sub domain running on a processor is identical to the "mono-domain" code. 262 In addition, the programmer manages the communications between subdomains, 263 and the code is faster when the number of processors is increased. 264 The porting of OPA code on an iPSC860 was achieved during Guyon's PhD [Guyon et al. 1994, 1995] 265 in collaboration with CETIIS and ONERA. 266 The implementation in the operational context and the studies of performance on 267 a T3D and T3E Cray computers have been made in collaboration with IDRIS and CNRS. 243 The subdomain boundary conditions are specified through communications between processors which are organized by 244 explicit statements (message passing method). 268 245 The present implementation is largely inspired by Guyon's work [Guyon 1995]. 269 246 … … 272 249 depend at the very most on one neighbouring point. 273 250 The only non-local computations concern the vertical physics 274 (implicit diffusion, turbulent closure scheme, ...) (delocalization over the whole water column), 275 and the solving of the elliptic equation associated with the surface pressure gradient computation 276 (delocalization over the whole horizontal domain). 251 (implicit diffusion, turbulent closure scheme, ...). 277 252 Therefore, a pencil strategy is used for the data sub-structuration: 278 253 the 3D initial domain is laid out on local processor memories following a 2D horizontal topological splitting. … … 284 259 each processor sends to its neighbouring processors the update values of the points corresponding to 285 260 the interior overlapping area to its neighbouring sub-domain (\ie\ the innermost of the two overlapping rows). 286 The communication is done through the Message Passing Interface (MPI). 261 Communications are first done according to the east-west direction and next according to the north-south direction. 262 There is no specific communications for the corners. 263 The communication is done through the Message Passing Interface (MPI) and requires \key{mpp\_mpi}. 264 Use also \key{mpi2} if MPI3 is not available on your computer. 287 265 The data exchanges between processors are required at the very place where 288 266 lateral domain boundary conditions are set in the mono-domain computation: 289 267 the \rou{lbc\_lnk} routine (found in \mdl{lbclnk} module) which manages such conditions is interfaced with 290 routines found in \mdl{lib\_mpp} module when running on an MPP computer (\ie\ when \key{mpp\_mpi} defined). 291 It has to be pointed out that when using the MPP version of the model, 292 the east-west cyclic boundary condition is done implicitly, 293 whilst the south-symmetric boundary condition option is not available. 294 295 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 268 routines found in \mdl{lib\_mpp} module. 269 The output file \textit{communication\_report.txt} provides the list of which routines do how 270 many communications during 1 time step of the model.\\ 271 296 272 \begin{figure}[!t] 297 \begin{center} 298 \includegraphics[width=\textwidth]{Fig_mpp} 299 \caption{ 300 \protect\label{fig:mpp} 301 Positioning of a sub-domain when massively parallel processing is used. 302 } 303 \end{center} 273 \centering 274 \includegraphics[width=0.66\textwidth]{Fig_mpp} 275 \caption{Positioning of a sub-domain when massively parallel processing is used} 276 \label{fig:LBC_mpp} 304 277 \end{figure} 305 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 306 307 In the standard version of \NEMO, the splitting is regular and arithmetic. 308 The i-axis is divided by \jp{jpni} and 309 the j-axis by \jp{jpnj} for a number of processors \jp{jpnij} most often equal to $jpni \times jpnj$ 310 (parameters set in \nam{mpp} namelist). 311 Each processor is independent and without message passing or synchronous process, 312 programs run alone and access just its own local memory. 313 For this reason, the main model dimensions are now the local dimensions of the subdomain (pencil) that 314 are named \jp{jpi}, \jp{jpj}, \jp{jpk}. 278 279 In \NEMO, the splitting is regular and arithmetic. 280 The total number of subdomains corresponds to the number of MPI processes allocated to \NEMO\ when the model is launched 281 (\ie\ mpirun -np x ./nemo will automatically give x subdomains). 282 The i-axis is divided by \np{jpni}{jpni} and the j-axis by \np{jpnj}{jpnj}. 283 These parameters are defined in \nam{mpp}{mpp} namelist. 284 If \np{jpni}{jpni} and \np{jpnj}{jpnj} are < 1, they will be automatically redefined in the code to give the best domain decomposition 285 (see bellow). 286 287 Each processor is independent and without message passing or synchronous process, programs run alone and access just its own local memory. 288 For this reason, 289 the main model dimensions are now the local dimensions of the subdomain (pencil) that are named \jp{jpi}, \jp{jpj}, \jp{jpk}. 315 290 These dimensions include the internal domain and the overlapping rows. 316 The number of rows to exchange (known as the halo) is usually set to one (\jp{jpreci}=1, in \mdl{par\_oce}). 291 The number of rows to exchange (known as the halo) is usually set to one (nn\_hls=1, in \mdl{par\_oce}, 292 and must be kept to one until further notice). 317 293 The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}. 318 294 The relationship between the whole domain and a sub-domain is: 319 \[ 320 jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci 321 jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj 322 \] 323 where \jp{jpni}, \jp{jpnj} are the number of processors following the i- and j-axis. 324 325 One also defines variables nldi and nlei which correspond to the internal domain bounds, 326 and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain. 295 \begin{gather*} 296 jpi = ( jpiglo-2\times nn\_hls + (jpni-1) ) / jpni + 2\times nn\_hls \\ 297 jpj = ( jpjglo-2\times nn\_hls + (jpnj-1) ) / jpnj + 2\times nn\_hls 298 \end{gather*} 299 300 One also defines variables nldi and nlei which correspond to the internal domain bounds, and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain (\autoref{fig:LBC_mpp}). Note that since the version 4, there is no more extra-halo area as defined in \autoref{fig:LBC_mpp} so \jp{jpi} is now always equal to nlci and \jp{jpj} equal to nlcj. 301 327 302 An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 328 303 a global array (whole domain) by the relationship: 329 304 \[ 330 % \label{eq: lbc_nimpp}305 % \label{eq:LBC_nimpp} 331 306 T_{g} (i+nimpp-1,j+njmpp-1,k) = T_{l} (i,j,k), 332 307 \] 333 with $1 \leq i \leq jpi$, $1 \leq j \leq jpj $ , and $1 \leq k \leq jpk$. 334 335 Processors are numbered from 0 to $jpnij-1$, the number is saved in the variable nproc. 336 In the standard version, a processor has no more than 337 four neighbouring processors named nono (for north), noea (east), noso (south) and nowe (west) and 338 two variables, nbondi and nbondj, indicate the relative position of the processor: 339 \begin{itemize} 340 \item nbondi = -1 an east neighbour, no west processor, 341 \item nbondi = 0 an east neighbour, a west neighbour, 342 \item nbondi = 1 no east processor, a west neighbour, 343 \item nbondi = 2 no splitting following the i-axis. 344 \end{itemize} 345 During the simulation, processors exchange data with their neighbours. 346 If there is effectively a neighbour, the processor receives variables from this processor on its overlapping row, 347 and sends the data issued from internal domain corresponding to the overlapping row of the other processor. 348 349 350 The \NEMO\ model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). 351 It is easily readable and very efficient in the context of a computer with vectorial architecture. 352 However, in the case of a scalar processor, computations over the land regions become more expensive in 353 terms of CPU time. 354 It is worse when we use a complex configuration with a realistic bathymetry like the global ocean where 355 more than 50 \% of points are land points. 356 For this reason, a pre-processing tool can be used to choose the mpp domain decomposition with a maximum number of 357 only land points processors, which can then be eliminated (\autoref{fig:mppini2}) 358 (For example, the mpp\_optimiz tools, available from the DRAKKAR web site). 359 This optimisation is dependent on the specific bathymetry employed. 360 The user then chooses optimal parameters \jp{jpni}, \jp{jpnj} and \jp{jpnij} with $jpnij < jpni \times jpnj$, 361 leading to the elimination of $jpni \times jpnj - jpnij$ land processors. 362 When those parameters are specified in \nam{mpp} namelist, 363 the algorithm in the \rou{inimpp2} routine sets each processor's parameters (nbound, nono, noea,...) so that 364 the land-only processors are not taken into account. 365 366 \gmcomment{Note that the inimpp2 routine is general so that the original inimpp 367 routine should be suppressed from the code.} 368 369 When land processors are eliminated, 370 the value corresponding to these locations in the model output files is undefined. 371 Note that this is a problem for the meshmask file which requires to be defined over the whole domain. 372 Therefore, user should not eliminate land processors when creating a meshmask file 373 (\ie\ when setting a non-zero value to \np{nn\_msh}). 374 375 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 308 with $1 \leq i \leq jpi$, $1 \leq j \leq jpj $ , and $1 \leq k \leq jpk$. 309 310 The 1-d arrays $mig(1:\jp{jpi})$ and $mjg(1:\jp{jpj})$, defined in \rou{dom\_glo} routine (\mdl{domain} module), should be used to get global domain indices from local domain indices. The 1-d arrays, $mi0(1:\jp{jpiglo})$, $mi1(1:\jp{jpiglo})$ and $mj0(1:\jp{jpjglo})$, $mj1(1:\jp{jpjglo})$ have the reverse purpose and should be used to define loop indices expressed in global domain indices (see examples in \mdl{dtastd} module).\\ 311 312 The \NEMO\ model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). It is therefore possible that an MPI subdomain contains only land points. To save ressources, we try to supress from the computational domain as much land subdomains as possible. For example if $N_{mpi}$ processes are allocated to NEMO, the domain decomposition will be given by the following equation: 313 \[ 314 N_{mpi} = jpni \times jpnj - N_{land} + N_{useless} 315 \] 316 $N_{land}$ is the total number of land subdomains in the domain decomposition defined by \np{jpni}{jpni} and \np{jpnj}{jpnj}. $N_{useless}$ is the number of land subdomains that are kept in the compuational domain in order to make sure that $N_{mpi}$ MPI processes are indeed allocated to a given subdomain. The values of $N_{mpi}$, \np{jpni}{jpni}, \np{jpnj}{jpnj}, $N_{land}$ and $N_{useless}$ are printed in the output file \texttt{ocean.output}. $N_{useless}$ must, of course, be as small as possible to limit the waste of ressources. A warning is issued in \texttt{ocean.output} if $N_{useless}$ is not zero. Note that non-zero value of $N_{useless}$ is uselly required when using AGRIF as, up to now, the parent grid and each of the child grids must use all the $N_{mpi}$ processes. 317 318 If the domain decomposition is automatically defined (when \np{jpni}{jpni} and \np{jpnj}{jpnj} are < 1), the decomposition chosen by the model will minimise the sub-domain size (defined as $max_{all domains}(jpi \times jpj)$) and maximize the number of eliminated land subdomains. This means that no other domain decomposition (a set of \np{jpni}{jpni} and \np{jpnj}{jpnj} values) will use less processes than $(jpni \times jpnj - N_{land})$ and get a smaller subdomain size. 319 In order to specify $N_{mpi}$ properly (minimize $N_{useless}$), you must run the model once with \np{ln_list}{ln\_list} activated. In this case, the model will start the initialisation phase, print the list of optimum decompositions ($N_{mpi}$, \np{jpni}{jpni} and \np{jpnj}{jpnj}) in \texttt{ocean.output} and directly abort. The maximum value of $N_{mpi}$ tested in this list is given by $max(N_{MPI\_tasks}, jpni \times jpnj)$. For example, run the model on 40 nodes with ln\_list activated and $jpni = 10000$ and $jpnj = 1$, will print the list of optimum domains decomposition from 1 to about 10000. 320 321 Processors are numbered from 0 to $N_{mpi} - 1$. Subdomains containning some ocean points are numbered first from 0 to $jpni * jpnj - N_{land} -1$. The remaining $N_{useless}$ land subdomains are numbered next, which means that, for a given (\np{jpni}{jpni}, \np{jpnj}{jpnj}), the numbers attributed to he ocean subdomains do not vary with $N_{useless}$. 322 323 When land processors are eliminated, the value corresponding to these locations in the model output files is undefined. \np{ln_mskland}{ln\_mskland} must be activated in order avoid Not a Number values in output files. Note that it is better to not eliminate land processors when creating a meshmask file (\ie\ when setting a non-zero value to \np{nn_msh}{nn\_msh}). 324 376 325 \begin{figure}[!ht] 377 \begin{center} 378 \includegraphics[width=\textwidth]{Fig_mppini2} 379 \caption { 380 \protect\label{fig:mppini2} 381 Example of Atlantic domain defined for the CLIPPER projet. 382 Initial grid is composed of 773 x 1236 horizontal points. 383 (a) the domain is split onto 9 \time 20 subdomains (jpni=9, jpnj=20). 384 52 subdomains are land areas. 385 (b) 52 subdomains are eliminated (white rectangles) and 386 the resulting number of processors really used during the computation is jpnij=128. 387 } 388 \end{center} 326 \centering 327 \includegraphics[width=0.66\textwidth]{Fig_mppini2} 328 \caption[Atlantic domain defined for the CLIPPER projet]{ 329 Example of Atlantic domain defined for the CLIPPER projet. 330 Initial grid is composed of 773 x 1236 horizontal points. 331 (a) the domain is split onto 9 $times$ 20 subdomains (jpni=9, jpnj=20). 332 52 subdomains are land areas. 333 (b) 52 subdomains are eliminated (white rectangles) and 334 the resulting number of processors really used during the computation is jpnij=128.} 335 \label{fig:LBC_mppini2} 389 336 \end{figure} 390 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 391 392 393 % ==================================================================== 394 % Unstructured open boundaries BDY 395 % ==================================================================== 337 338 %% ================================================================================================= 396 339 \section{Unstructured open boundary conditions (BDY)} 397 340 \label{sec:LBC_bdy} 398 341 399 %-----------------------------------------nambdy-------------------------------------------- 400 401 \nlst{nambdy} 402 %----------------------------------------------------------------------------------------------- 403 %-----------------------------------------nambdy_dta-------------------------------------------- 404 405 \nlst{nambdy_dta} 406 %----------------------------------------------------------------------------------------------- 407 408 Options are defined through the \nam{bdy} \nam{bdy\_dta} namelist variables. 342 \begin{listing} 343 \nlst{nambdy} 344 \caption{\forcode{&nambdy}} 345 \label{lst:nambdy} 346 \end{listing} 347 348 \begin{listing} 349 \nlst{nambdy_dta} 350 \caption{\forcode{&nambdy_dta}} 351 \label{lst:nambdy_dta} 352 \end{listing} 353 354 Options are defined through the \nam{bdy}{bdy} and \nam{bdy_dta}{bdy\_dta} namelist variables. 409 355 The BDY module is the core implementation of open boundary conditions for regional configurations on 410 temperature, salinity, barotropic and baroclinic velocities, as well as ice concentration, ice and snow thicknesses.356 ocean temperature, salinity, barotropic-baroclinic velocities, ice-snow concentration, thicknesses, temperatures, salinity and melt ponds concentration and thickness. 411 357 412 358 The BDY module was modelled on the OBC module (see \NEMO\ 3.4) and shares many features and … … 417 363 See the section on the Input Boundary Data Files for details. 418 364 419 % ----------------------------------------------365 %% ================================================================================================= 420 366 \subsection{Namelists} 421 \label{subsec: BDY_namelist}422 423 The BDY module is activated by setting \np {ln\_bdy}\forcode{ = .true.} .367 \label{subsec:LBC_bdy_namelist} 368 369 The BDY module is activated by setting \np[=.true.]{ln_bdy}{ln\_bdy} . 424 370 It is possible to define more than one boundary ``set'' and apply different boundary conditions to each set. 425 The number of boundary sets is defined by \np{nb\_bdy}. 426 Each boundary set may be defined as a set of straight line segments in a namelist 427 (\np{ln\_coords\_file}\forcode{ = .false.}) or read in from a file (\np{ln\_coords\_file}\forcode{ = .true.}). 428 If the set is defined in a namelist, then the namelists \nam{bdy\_index} must be included separately, one for each set. 429 If the set is defined by a file, then a ``\ifile{coordinates.bdy}'' file must be provided. 371 The number of boundary sets is defined by \np{nb_bdy}{nb\_bdy}. 372 Each boundary set can be either defined as a series of straight line segments directly in the namelist 373 (\np[=.false.]{ln_coords_file}{ln\_coords\_file}, and a namelist block \nam{bdy_index}{bdy\_index} must be included for each set) or read in from a file (\np[=.true.]{ln_coords_file}{ln\_coords\_file}, and a ``\ifile{coordinates.bdy}'' file must be provided). 430 374 The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file. 431 375 In the example above, there are two boundary sets, the first of which is defined via a file and 432 the second is defined in anamelist.433 For more details of the definition of the boundary geometry see section \autoref{subsec: BDY_geometry}.376 the second is defined in the namelist. 377 For more details of the definition of the boundary geometry see section \autoref{subsec:LBC_bdy_geometry}. 434 378 435 379 For each boundary set a boundary condition has to be chosen for the barotropic solution 436 380 (``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''), 437 for the active tracers \footnote{The BDY module does not deal with passive tracers at this version} (``tra''), and sea-ice (``ice''). 438 For each set of variables there is a choice of algorithm and a choice for the data, 439 eg. for the active tracers the algorithm is set by \np{cn\_tra} and the choice of data is set by \np{nn\_tra\_dta}.\\ 381 for the active tracers \footnote{The BDY module does not deal with passive tracers at this version} (``tra''), and for sea-ice (``ice''). 382 For each set of variables one has to choose an algorithm and the boundary data (set resp. by \np{cn_tra}{cn\_tra} and \np{nn_tra_dta}{nn\_tra\_dta} for tracers).\\ 440 383 441 384 The choice of algorithm is currently as follows: 442 385 443 386 \begin{description} 444 \item [\forcode{'none'}:] No boundary condition applied.387 \item [\forcode{'none'}:] No boundary condition applied. 445 388 So the solution will ``see'' the land points around the edge of the edge of the domain. 446 \item [\forcode{'specified'}:] Specified boundary condition applied (only available for baroclinic velocity and tracer variables).447 \item [\forcode{'neumann'}:] Value at the boundary are duplicated (No gradient). Only available for baroclinic velocity and tracer variables.448 \item [\forcode{'frs'}:] Flow Relaxation Scheme (FRS) available for all variables.449 \item [\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables.450 \item [\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables.451 \item [\forcode{'flather'}:] Flather radiation scheme for the barotropic variables only.389 \item [\forcode{'specified'}:] Specified boundary condition applied (only available for baroclinic velocity and tracer variables). 390 \item [\forcode{'neumann'}:] Value at the boundary are duplicated (No gradient). Only available for baroclinic velocity and tracer variables. 391 \item [\forcode{'frs'}:] Flow Relaxation Scheme (FRS) available for all variables. 392 \item [\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables. 393 \item [\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables. 394 \item [\forcode{'flather'}:] Flather radiation scheme for the barotropic variables only. 452 395 \end{description} 453 396 454 The main choice for the boundary data is to use initial conditions as boundary data455 (\np {nn\_tra\_dta}\forcode{ = 0}) or to use external data from a file (\np{nn\_tra\_dta}\forcode{ = 1}).397 The boundary data is either set to initial conditions 398 (\np[=0]{nn_tra_dta}{nn\_tra\_dta}) or forced with external data from a file (\np[=1]{nn_tra_dta}{nn\_tra\_dta}). 456 399 In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity), 457 the bdy code can derived baroclinic and barotropic velocities by setting \np {ln\_full\_vel}\forcode{ = .true.}400 the bdy code can derived baroclinic and barotropic velocities by setting \np[=.true.]{ln_full_vel}{ln\_full\_vel} 458 401 For the barotropic solution there is also the option to use tidal harmonic forcing either by 459 itself (\np {nn\_dyn2d\_dta}\forcode{ = 2}) or in addition to other external data (\np{nn\_dyn2d\_dta}\forcode{ = 3}).\\460 Sea-ice salinity, temperature and age data at the boundary are constant and defined repectively by \np{rn\_ice\_sal}, \np{rn\_ice\_tem} and \np{rn\_ice\_age}.461 462 If external boundary data is required then the \nam{bdy \_dta} namelist must be defined.463 One \nam{bdy \_dta} namelist is required for each boundary set, adopting the same order of indexes in which the boundary sets are defined in nambdy.464 In the example given, two boundary sets have been defined. The first one is reading data file in the \nam{bdy \_dta} namelist shown above402 itself (\np[=2]{nn_dyn2d_dta}{nn\_dyn2d\_dta}) or in addition to other external data (\np[=3]{nn_dyn2d_dta}{nn\_dyn2d\_dta}).\\ 403 If not set to initial conditions, sea-ice salinity, temperatures and melt ponds data at the boundary can either be read in a file or defined as constant (by \np{rn_ice_sal}{rn\_ice\_sal}, \np{rn_ice_tem}{rn\_ice\_tem}, \np{rn_ice_apnd}{rn\_ice\_apnd}, \np{rn_ice_hpnd}{rn\_ice\_hpnd}). Ice age is constant and defined by \np{rn_ice_age}{rn\_ice\_age}. 404 405 If external boundary data is required then the \nam{bdy_dta}{bdy\_dta} namelist must be defined. 406 One \nam{bdy_dta}{bdy\_dta} namelist is required for each boundary set, adopting the same order of indexes in which the boundary sets are defined in nambdy. 407 In the example given, two boundary sets have been defined. The first one is reading data file in the \nam{bdy_dta}{bdy\_dta} namelist shown above 465 408 and the second one is using data from intial condition (no namelist block needed). 466 409 The boundary data is read in using the fldread module, 467 so the \nam{bdy \_dta} namelist is in the format required for fldread.410 so the \nam{bdy_dta}{bdy\_dta} namelist is in the format required for fldread. 468 411 For each required variable, the filename, the frequency of the files and 469 412 the frequency of the data in the files are given. 470 Also whether or not time-interpolation is required and whether the data is climatological (time-cyclic) data.\\ 413 Also whether or not time-interpolation is required and whether the data is climatological (time-cyclic) data. 414 For sea-ice salinity, temperatures and melt ponds, reading the files are skipped and constant values are used if filenames are defined as {'NOT USED'}.\\ 471 415 472 416 There is currently an option to vertically interpolate the open boundary data onto the native grid at run-time. 473 If \np{nn \_bdy\_jpk} $<-1$, it is assumed that the lateral boundary data are already on the native grid.474 However, if \np{nn \_bdy\_jpk} is set to the number of vertical levels present in the boundary data,417 If \np{nn_bdy_jpk}{nn\_bdy\_jpk}$<-1$, it is assumed that the lateral boundary data are already on the native grid. 418 However, if \np{nn_bdy_jpk}{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data, 475 419 a bilinear interpolation onto the native grid will be triggered at runtime. 476 420 For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files. … … 486 430 FRS conditions are applied on temperature and salinity and climatological data is read from initial condition files. 487 431 488 % ----------------------------------------------432 %% ================================================================================================= 489 433 \subsection{Flow relaxation scheme} 490 \label{subsec: BDY_FRS_scheme}434 \label{subsec:LBC_bdy_FRS_scheme} 491 435 492 436 The Flow Relaxation Scheme (FRS) \citep{davies_QJRMS76,engedahl_T95}, … … 495 439 Given a model prognostic variable $\Phi$ 496 440 \[ 497 % \label{eq: bdy_frs1}441 % \label{eq:LBC_bdy_frs1} 498 442 \Phi(d) = \alpha(d)\Phi_{e}(d) + (1-\alpha(d))\Phi_{m}(d)\;\;\;\;\; d=1,N 499 443 \] … … 504 448 the prognostic equation for $\Phi$ of the form: 505 449 \[ 506 % \label{eq: bdy_frs2}450 % \label{eq:LBC_bdy_frs2} 507 451 -\frac{1}{\tau}\left(\Phi - \Phi_{e}\right) 508 452 \] 509 453 where the relaxation time scale $\tau$ is given by a function of $\alpha$ and the model time step $\Delta t$: 510 454 \[ 511 % \label{eq: bdy_frs3}455 % \label{eq:LBC_bdy_frs3} 512 456 \tau = \frac{1-\alpha}{\alpha} \,\rdt 513 457 \] … … 519 463 The function $\alpha$ is specified as a $tanh$ function: 520 464 \[ 521 % \label{eq: bdy_frs4}465 % \label{eq:LBC_bdy_frs4} 522 466 \alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right), \quad d=1,N 523 467 \] 524 The width of the FRS zone is specified in the namelist as \np{nn \_rimwidth}.468 The width of the FRS zone is specified in the namelist as \np{nn_rimwidth}{nn\_rimwidth}. 525 469 This is typically set to a value between 8 and 10. 526 470 527 % ----------------------------------------------471 %% ================================================================================================= 528 472 \subsection{Flather radiation scheme} 529 \label{subsec: BDY_flather_scheme}473 \label{subsec:LBC_bdy_flather_scheme} 530 474 531 475 The \citet{flather_JPO94} scheme is a radiation condition on the normal, 532 476 depth-mean transport across the open boundary. 533 477 It takes the form 534 \begin{equation} \label{eq:bdy_fla1} 535 U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right), 478 \begin{equation} 479 \label{eq:LBC_bdy_fla1} 480 U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right), 536 481 \end{equation} 537 482 where $U$ is the depth-mean velocity normal to the boundary and $\eta$ is the sea surface height, … … 542 487 the external depth-mean normal velocity, 543 488 plus a correction term that allows gravity waves generated internally to exit the model boundary. 544 Note that the sea-surface height gradient in \autoref{eq: bdy_fla1} is a spatial gradient across the model boundary,489 Note that the sea-surface height gradient in \autoref{eq:LBC_bdy_fla1} is a spatial gradient across the model boundary, 545 490 so that $\eta_{e}$ is defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the $T$ points with $nbr=2$. 546 491 $U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie\ between the two $T$ grid points. 547 492 548 % ----------------------------------------------493 %% ================================================================================================= 549 494 \subsection{Orlanski radiation scheme} 550 \label{subsec: BDY_orlanski_scheme}495 \label{subsec:LBC_bdy_orlanski_scheme} 551 496 552 497 The Orlanski scheme is based on the algorithm described by \citep{marchesiello.mcwilliams.ea_OM01}, hereafter MMS. … … 554 499 The adaptive Orlanski condition solves a wave plus relaxation equation at the boundary: 555 500 \begin{equation} 556 \frac{\partial\phi}{\partial t} + c_x \frac{\partial\phi}{\partial x} + c_y \frac{\partial\phi}{\partial y} = 557 -\frac{1}{\tau}(\phi - \phi^{ext})558 \label{eq:wave_continuous} 501 \label{eq:LBC_wave_continuous} 502 \frac{\partial\phi}{\partial t} + c_x \frac{\partial\phi}{\partial x} + c_y \frac{\partial\phi}{\partial y} = 503 -\frac{1}{\tau}(\phi - \phi^{ext}) 559 504 \end{equation} 560 505 … … 562 507 velocities are diagnosed from the model fields as: 563 508 564 \begin{equation} \label{eq:cx} 565 c_x = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial x}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} 509 \begin{equation} 510 \label{eq:LBC_cx} 511 c_x = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial x}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} 566 512 \end{equation} 567 513 \begin{equation} 568 \label{eq:cy}569 c_y = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial y}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2}514 \label{eq:LBC_cy} 515 c_y = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial y}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} 570 516 \end{equation} 571 517 572 518 (As noted by MMS, this is a circular diagnosis of the phase speeds which only makes sense on a discrete grid). 573 Equation (\autoref{eq: wave_continuous}) is defined adaptively depending on the sign of the phase velocity normal to the boundary $c_x$.519 Equation (\autoref{eq:LBC_wave_continuous}) is defined adaptively depending on the sign of the phase velocity normal to the boundary $c_x$. 574 520 For $c_x$ outward, we have 575 521 … … 581 527 582 528 \begin{equation} 583 \tau = \tau_{in}\,\,\,;\,\,\, c_x = c_y = 0 584 \label{eq:tau_in} 529 \label{eq:LBC_tau_in} 530 \tau = \tau_{in}\,\,\,;\,\,\, c_x = c_y = 0 585 531 \end{equation} 586 532 587 Generally the relaxation time scale at inward propagation points (\np{rn \_time\_dmp}) is set much shorter than the time scale at outward propagation588 points (\np{rn \_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points.589 See \autoref{subsec: BDY_relaxation} for detailed on the spatial shape of the scaling.\\533 Generally the relaxation time scale at inward propagation points (\np{rn_time_dmp}{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation 534 points (\np{rn_time_dmp_out}{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points. 535 See \autoref{subsec:LBC_bdy_relaxation} for detailed on the spatial shape of the scaling.\\ 590 536 The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming 591 that $c_y$ is zero in equation (\autoref{eq: wave_continuous}), but including592 this term in the denominator of equation (\autoref{eq: cx}). Both versions of the scheme are options in BDY. Equations593 (\autoref{eq: wave_continuous}) - (\autoref{eq:tau_in}) correspond to equations (13) - (15) and (2) - (3) in MMS.\\594 595 % ----------------------------------------------537 that $c_y$ is zero in equation (\autoref{eq:LBC_wave_continuous}), but including 538 this term in the denominator of equation (\autoref{eq:LBC_cx}). Both versions of the scheme are options in BDY. Equations 539 (\autoref{eq:LBC_wave_continuous}) - (\autoref{eq:LBC_tau_in}) correspond to equations (13) - (15) and (2) - (3) in MMS.\\ 540 541 %% ================================================================================================= 596 542 \subsection{Relaxation at the boundary} 597 \label{subsec: BDY_relaxation}598 599 In addition to a specific boundary condition specified as \np{cn \_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available.600 It is control by the namelist parameter \np{ln \_tra\_dmp} and \np{ln\_dyn3d\_dmp} for each boundary set.601 602 The relaxation time scale value (\np{rn \_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself.603 This time scale ($\alpha$) is weighted by the distance ($d$) from the boundary over \np{nn \_rimwidth} cells ($N$):543 \label{subsec:LBC_bdy_relaxation} 544 545 In addition to a specific boundary condition specified as \np{cn_tra}{cn\_tra} and \np{cn_dyn3d}{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. 546 It is control by the namelist parameter \np{ln_tra_dmp}{ln\_tra\_dmp} and \np{ln_dyn3d_dmp}{ln\_dyn3d\_dmp} for each boundary set. 547 548 The relaxation time scale value (\np{rn_time_dmp}{rn\_time\_dmp} and \np{rn_time_dmp_out}{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself. 549 This time scale ($\alpha$) is weighted by the distance ($d$) from the boundary over \np{nn_rimwidth}{nn\_rimwidth} cells ($N$): 604 550 605 551 \[ … … 609 555 The same scaling is applied in the Orlanski damping. 610 556 611 % ----------------------------------------------557 %% ================================================================================================= 612 558 \subsection{Boundary geometry} 613 \label{subsec: BDY_geometry}559 \label{subsec:LBC_bdy_geometry} 614 560 615 561 Each open boundary set is defined as a list of points. … … 620 566 the boundary point is increasingly further away from the edge of the model domain. 621 567 A set of $nbi$, $nbj$, and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ grids. 622 Figure\autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary.568 \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary. 623 569 624 570 The boundary geometry for each set may be defined in a namelist nambdy\_index or … … 630 576 \jp{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 631 577 These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$). 632 The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np {nn\_rimwidth}\forcode{ > 1}.578 The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np[>1]{nn_rimwidth}{nn\_rimwidth}. 633 579 634 580 The boundary geometry may also be defined from a ``\ifile{coordinates.bdy}'' file. 635 Figure\autoref{fig:LBC_nc_header} gives an example of the header information from such a file, based on the description of geometrical setup given above.581 \autoref{fig:LBC_nc_header} gives an example of the header information from such a file, based on the description of geometrical setup given above. 636 582 The file should contain the index arrays for each of the $T$, $U$ and $V$ grids. 637 583 The arrays must be in order of increasing $nbr$. … … 645 591 For example, if an open boundary is defined along an isobath, say at the shelf break, 646 592 then the areas of ocean outside of this boundary will need to be masked out. 647 This can be done by reading a mask file defined as \np{cn \_mask\_file} in the nam\_bdy namelist.593 This can be done by reading a mask file defined as \np{cn_mask_file}{cn\_mask\_file} in the nam\_bdy namelist. 648 594 Only one mask file is used even if multiple boundary sets are defined. 649 595 650 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>651 596 \begin{figure}[!t] 652 \begin{center} 653 \includegraphics[width=\textwidth]{Fig_LBC_bdy_geom} 654 \caption { 655 \protect\label{fig:LBC_bdy_geom} 656 Example of geometry of unstructured open boundary 657 } 658 \end{center} 597 \centering 598 \includegraphics[width=0.66\textwidth]{Fig_LBC_bdy_geom} 599 \caption[Geometry of unstructured open boundary]{Example of geometry of unstructured open boundary} 600 \label{fig:LBC_bdy_geom} 659 601 \end{figure} 660 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 661 662 %---------------------------------------------- 602 603 %% ================================================================================================= 663 604 \subsection{Input boundary data files} 664 \label{subsec: BDY_data}605 \label{subsec:LBC_bdy_data} 665 606 666 607 The data files contain the data arrays in the order in which the points are defined in the $nbi$ and $nbj$ arrays. … … 685 626 These restrictions mean that data files used with versions of the 686 627 model prior to Version 3.4 may not work with Version 3.4 onwards. 687 A \fortran utility {\itshape bdy\_reorder} exists in the TOOLS directory which628 A \fortran\ utility {\itshape bdy\_reorder} exists in the TOOLS directory which 688 629 will re-order the data in old BDY data files. 689 630 690 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>691 631 \begin{figure}[!t] 692 \begin{center} 693 \includegraphics[width=\textwidth]{Fig_LBC_nc_header} 694 \caption { 695 \protect\label{fig:LBC_nc_header} 696 Example of the header for a \protect\ifile{coordinates.bdy} file 697 } 698 \end{center} 632 \centering 633 \includegraphics[width=0.66\textwidth]{Fig_LBC_nc_header} 634 \caption[Header for a \protect\ifile{coordinates.bdy} file]{ 635 Example of the header for a \protect\ifile{coordinates.bdy} file} 636 \label{fig:LBC_nc_header} 699 637 \end{figure} 700 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 701 702 %---------------------------------------------- 638 639 %% ================================================================================================= 703 640 \subsection{Volume correction} 704 \label{subsec: BDY_vol_corr}641 \label{subsec:LBC_bdy_vol_corr} 705 642 706 643 There is an option to force the total volume in the regional model to be constant. 707 This is controlled by the \np{ln \_vol} parameter in the namelist.708 A value of \np {ln\_vol}\forcode{ = .false.} indicates that this option is not used.709 Two options to control the volume are available (\np{nn \_volctl}).710 If \np {nn\_volctl}\forcode{ = 0} then a correction is applied to the normal barotropic velocities around the boundary at644 This is controlled by the \np{ln_vol}{ln\_vol} parameter in the namelist. 645 A value of \np[=.false.]{ln_vol}{ln\_vol} indicates that this option is not used. 646 Two options to control the volume are available (\np{nn_volctl}{nn\_volctl}). 647 If \np[=0]{nn_volctl}{nn\_volctl} then a correction is applied to the normal barotropic velocities around the boundary at 711 648 each timestep to ensure that the integrated volume flow through the boundary is zero. 712 If \np {nn\_volctl}\forcode{ = 1} then the calculation of the volume change on649 If \np[=1]{nn_volctl}{nn\_volctl} then the calculation of the volume change on 713 650 the timestep includes the change due to the freshwater flux across the surface and 714 651 the correction velocity corrects for this as well. … … 717 654 applied to all boundaries at once. 718 655 719 % ----------------------------------------------656 %% ================================================================================================= 720 657 \subsection{Tidal harmonic forcing} 721 \label{subsec:BDY_tides} 722 723 %-----------------------------------------nambdy_tide-------------------------------------------- 724 725 \nlst{nambdy_tide} 726 %----------------------------------------------------------------------------------------------- 658 \label{subsec:LBC_bdy_tides} 659 660 \begin{listing} 661 \nlst{nambdy_tide} 662 \caption{\forcode{&nambdy_tide}} 663 \label{lst:nambdy_tide} 664 \end{listing} 727 665 728 666 Tidal forcing at open boundaries requires the activation of surface 729 tides (i.e., in \nam{ \_tide}, \np{ln\_tide} needs to be set to667 tides (i.e., in \nam{_tide}{\_tide}, \np{ln_tide}{ln\_tide} needs to be set to 730 668 \forcode{.true.} and the required constituents need to be activated by 731 including their names in the \np{clname} array; see669 including their names in the \np{clname}{clname} array; see 732 670 \autoref{sec:SBC_tide}). Specific options related to the reading in of 733 671 the complex harmonic amplitudes of elevation (SSH) and barotropic 734 672 velocity (u,v) at open boundaries are defined through the 735 \nam{bdy \_tide} namelist parameters.\\673 \nam{bdy_tide}{bdy\_tide} namelist parameters.\\ 736 674 737 675 The tidal harmonic data at open boundaries can be specified in two 738 676 different ways, either on a two-dimensional grid covering the entire 739 677 model domain or along open boundary segments; these two variants can 740 be selected by setting \np{ln \_bdytide\_2ddta } to \forcode{.true.} or678 be selected by setting \np{ln_bdytide_2ddta }{ln\_bdytide\_2ddta } to \forcode{.true.} or 741 679 \forcode{.false.}, respectively. In either case, the real and 742 680 imaginary parts of SSH and the two barotropic velocity components for … … 744 682 separately: when two-dimensional data is used, variables 745 683 \textit{tcname\_z1} and \textit{tcname\_z2} for real and imaginary SSH, 746 respectively, are expected in input file \np{filtide} with suffix684 respectively, are expected in input file \np{filtide}{filtide} with suffix 747 685 \ifile{\_grid\_T}, variables \textit{tcname\_u1} and 748 686 \textit{tcname\_u2} for real and imaginary u, respectively, are 749 expected in input file \np{filtide} with suffix \ifile{\_grid\_U}, and687 expected in input file \np{filtide}{filtide} with suffix \ifile{\_grid\_U}, and 750 688 \textit{tcname\_v1} and \textit{tcname\_v2} for real and imaginary v, 751 respectively, are expected in input file \np{filtide} with suffix689 respectively, are expected in input file \np{filtide}{filtide} with suffix 752 690 \ifile{\_grid\_V}; when data along open boundary segments is used, 753 691 variables \textit{z1} and \textit{z2} (real and imaginary part of SSH) 754 are expected to be available from file \np{filtide} with suffix692 are expected to be available from file \np{filtide}{filtide} with suffix 755 693 \ifile{tcname\_grid\_T}, variables \textit{u1} and \textit{u2} (real 756 694 and imaginary part of u) are expected to be available from file 757 \np{filtide} with suffix \ifile{tcname\_grid\_U}, and variables695 \np{filtide}{filtide} with suffix \ifile{tcname\_grid\_U}, and variables 758 696 \textit{v1} and \textit{v2} (real and imaginary part of v) are 759 expected to be available from file \np{filtide} with suffix760 \ifile{tcname\_grid\_V}. If \np{ln \_bdytide\_conj} is set to697 expected to be available from file \np{filtide}{filtide} with suffix 698 \ifile{tcname\_grid\_V}. If \np{ln_bdytide_conj}{ln\_bdytide\_conj} is set to 761 699 \forcode{.true.}, the data is expected to be in complex conjugate 762 700 form. … … 770 708 direction of rotation). %, e.g. anticlockwise or clockwise. 771 709 772 \biblio 773 774 \pindex 710 \onlyinsubfile{\input{../../global/epilogue}} 775 711 776 712 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_LDF.tex
r11435 r11799 3 3 \begin{document} 4 4 5 % ================================================================6 % Chapter Lateral Ocean Physics (LDF)7 % ================================================================8 5 \chapter{Lateral Ocean Physics (LDF)} 9 6 \label{chap:LDF} 10 7 8 \thispagestyle{plain} 9 11 10 \chaptertoc 12 11 13 \newpage 14 15 The lateral physics terms in the momentum and tracer equations have been described in \autoref{eq:PE_zdf} and 12 \paragraph{Changes record} ~\\ 13 14 {\footnotesize 15 \begin{tabularx}{\textwidth}{l||X|X} 16 Release & Author(s) & Modifications \\ 17 \hline 18 {\em 4.0} & {\em ...} & {\em ...} \\ 19 {\em 3.6} & {\em ...} & {\em ...} \\ 20 {\em 3.4} & {\em ...} & {\em ...} \\ 21 {\em <=3.4} & {\em ...} & {\em ...} 22 \end{tabularx} 23 } 24 25 \clearpage 26 27 The lateral physics terms in the momentum and tracer equations have been described in \autoref{eq:MB_zdf} and 16 28 their discrete formulation in \autoref{sec:TRA_ldf} and \autoref{sec:DYN_ldf}). 17 29 In this section we further discuss each lateral physics option. … … 22 34 (3) the space and time variations of the eddy coefficients. 23 35 These three aspects of the lateral diffusion are set through namelist parameters 24 (see the \nam{tra\_ldf} and \nam{dyn\_ldf} below). 25 Note that this chapter describes the standard implementation of iso-neutral tracer mixing. 26 Griffies's implementation, which is used if \np{ln\_traldf\_triad}\forcode{ = .true.}, 27 is described in \autoref{apdx:triad} 28 29 %-----------------------------------namtra_ldf - namdyn_ldf-------------------------------------------- 30 31 \nlst{namtra_ldf} 32 33 \nlst{namdyn_ldf} 34 %-------------------------------------------------------------------------------------------------------------- 35 36 % ================================================================ 37 % Lateral Mixing Operator 38 % ================================================================ 39 \section[Lateral mixing operators] 40 {Lateral mixing operators} 36 (see the \nam{tra_ldf}{tra\_ldf} and \nam{dyn_ldf}{dyn\_ldf} below). 37 Note that this chapter describes the standard implementation of iso-neutral tracer mixing. 38 Griffies's implementation, which is used if \np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}, 39 is described in \autoref{apdx:TRIADS} 40 41 %% ================================================================================================= 42 \section[Lateral mixing operators]{Lateral mixing operators} 41 43 \label{sec:LDF_op} 42 44 We remind here the different lateral mixing operators that can be used. Further details can be found in \autoref{subsec:TRA_ldf_op} and \autoref{sec:DYN_ldf}. 43 45 44 \subsection[No lateral mixing (\forcode{ln_traldf_OFF}, \forcode{ln_dynldf_OFF})] 45 {No lateral mixing (\protect\np{ln\_traldf\_OFF}, \protect\np{ln\_dynldf\_OFF})}46 47 It is possible to run without explicit lateral diffusion on tracers (\protect\np {ln\_traldf\_OFF}\forcode{ = .true.}) and/or48 momentum (\protect\np {ln\_dynldf\_OFF}\forcode{ = .true.}). The latter option is even recommended if using the49 UBS advection scheme on momentum (\np {ln\_dynadv\_ubs}\forcode{ = .true.},46 %% ================================================================================================= 47 \subsection[No lateral mixing (\forcode{ln_traldf_OFF} \& \forcode{ln_dynldf_OFF})]{No lateral mixing (\protect\np{ln_traldf_OFF}{ln\_traldf\_OFF} \& \protect\np{ln_dynldf_OFF}{ln\_dynldf\_OFF})} 48 49 It is possible to run without explicit lateral diffusion on tracers (\protect\np[=.true.]{ln_traldf_OFF}{ln\_traldf\_OFF}) and/or 50 momentum (\protect\np[=.true.]{ln_dynldf_OFF}{ln\_dynldf\_OFF}). The latter option is even recommended if using the 51 UBS advection scheme on momentum (\np[=.true.]{ln_dynadv_ubs}{ln\_dynadv\_ubs}, 50 52 see \autoref{subsec:DYN_adv_ubs}) and can be useful for testing purposes. 51 53 52 \subsection[Laplacian mixing (\forcode{ln_traldf_lap}, \forcode{ln_dynldf_lap})] 53 {Laplacian mixing (\protect\np{ln\_traldf\_lap}, \protect\np{ln\_dynldf\_lap})}54 Setting \protect\np {ln\_traldf\_lap}\forcode{ = .true.} and/or \protect\np{ln\_dynldf\_lap}\forcode{ = .true.} enables55 a second order diffusion on tracers and momentum respectively. Note that in \NEMO\ 4, one can not combine 54 %% ================================================================================================= 55 \subsection[Laplacian mixing (\forcode{ln_traldf_lap} \& \forcode{ln_dynldf_lap})]{Laplacian mixing (\protect\np{ln_traldf_lap}{ln\_traldf\_lap} \& \protect\np{ln_dynldf_lap}{ln\_dynldf\_lap})} 56 Setting \protect\np[=.true.]{ln_traldf_lap}{ln\_traldf\_lap} and/or \protect\np[=.true.]{ln_dynldf_lap}{ln\_dynldf\_lap} enables 57 a second order diffusion on tracers and momentum respectively. Note that in \NEMO\ 4, one can not combine 56 58 Laplacian and Bilaplacian operators for the same variable. 57 59 58 \subsection[Bilaplacian mixing (\forcode{ln_traldf_blp}, \forcode{ln_dynldf_blp})] 59 {Bilaplacian mixing (\protect\np{ln\_traldf\_blp}, \protect\np{ln\_dynldf\_blp})}60 Setting \protect\np {ln\_traldf\_blp}\forcode{ = .true.} and/or \protect\np{ln\_dynldf\_blp}\forcode{ = .true.} enables61 a fourth order diffusion on tracers and momentum respectively. It is implemented by calling the above Laplacian operator twice. 60 %% ================================================================================================= 61 \subsection[Bilaplacian mixing (\forcode{ln_traldf_blp} \& \forcode{ln_dynldf_blp})]{Bilaplacian mixing (\protect\np{ln_traldf_blp}{ln\_traldf\_blp} \& \protect\np{ln_dynldf_blp}{ln\_dynldf\_blp})} 62 Setting \protect\np[=.true.]{ln_traldf_blp}{ln\_traldf\_blp} and/or \protect\np[=.true.]{ln_dynldf_blp}{ln\_dynldf\_blp} enables 63 a fourth order diffusion on tracers and momentum respectively. It is implemented by calling the above Laplacian operator twice. 62 64 We stress again that from \NEMO\ 4, the simultaneous use Laplacian and Bilaplacian operators is not allowed. 63 65 64 % ================================================================ 65 % Direction of lateral Mixing 66 % ================================================================ 67 \section[Direction of lateral mixing (\textit{ldfslp.F90})] 68 {Direction of lateral mixing (\protect\mdl{ldfslp})} 66 %% ================================================================================================= 67 \section[Direction of lateral mixing (\textit{ldfslp.F90})]{Direction of lateral mixing (\protect\mdl{ldfslp})} 69 68 \label{sec:LDF_slp} 70 69 71 %%%72 70 \gmcomment{ 73 71 we should emphasize here that the implementation is a rather old one. … … 77 75 A direction for lateral mixing has to be defined when the desired operator does not act along the model levels. 78 76 This occurs when $(a)$ horizontal mixing is required on tracer or momentum 79 (\np{ln \_traldf\_hor} or \np{ln\_dynldf\_hor}) in $s$- or mixed $s$-$z$- coordinates,77 (\np{ln_traldf_hor}{ln\_traldf\_hor} or \np{ln_dynldf_hor}{ln\_dynldf\_hor}) in $s$- or mixed $s$-$z$- coordinates, 80 78 and $(b)$ isoneutral mixing is required whatever the vertical coordinate is. 81 79 This direction of mixing is defined by its slopes in the \textbf{i}- and \textbf{j}-directions at the face of 82 80 the cell of the quantity to be diffused. 83 81 For a tracer, this leads to the following four slopes: 84 $r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \autoref{eq: tra_ldf_iso}),82 $r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \autoref{eq:TRA_ldf_iso}), 85 83 while for momentum the slopes are $r_{1t}$, $r_{1uw}$, $r_{2f}$, $r_{2uw}$ for $u$ and 86 $r_{1f}$, $r_{1vw}$, $r_{2t}$, $r_{2vw}$ for $v$. 84 $r_{1f}$, $r_{1vw}$, $r_{2t}$, $r_{2vw}$ for $v$. 87 85 88 86 %gm% add here afigure of the slope in i-direction 89 87 88 %% ================================================================================================= 90 89 \subsection{Slopes for tracer geopotential mixing in the $s$-coordinate} 91 90 92 91 In $s$-coordinates, geopotential mixing (\ie\ horizontal mixing) $r_1$ and $r_2$ are the slopes between 93 92 the geopotential and computational surfaces. 94 Their discrete formulation is found by locally solving \autoref{eq: tra_ldf_iso} when93 Their discrete formulation is found by locally solving \autoref{eq:TRA_ldf_iso} when 95 94 the diffusive fluxes in the three directions are set to zero and $T$ is assumed to be horizontally uniform, 96 \ie\ a linear function of $z_T$, the depth of a $T$-point. 95 \ie\ a linear function of $z_T$, the depth of a $T$-point. 97 96 %gm { Steven : My version is obviously wrong since I'm left with an arbitrary constant which is the local vertical temperature gradient} 98 97 99 98 \begin{equation} 100 \label{eq: ldfslp_geo}99 \label{eq:LDF_slp_geo} 101 100 \begin{aligned} 102 101 r_{1u} &= \frac{e_{3u}}{ \left( e_{1u}\;\overline{\overline{e_{3w}}}^{\,i+1/2,\,k} \right)} … … 113 112 \end{equation} 114 113 115 %gm% caution I'm not sure the simplification was a good idea! 116 117 These slopes are computed once in \rou{ldf\_slp\_init} when \np{ln\_sco}\forcode{ = .true.}, 118 and either \np{ln\_traldf\_hor}\forcode{ = .true.} or \np{ln\_dynldf\_hor}\forcode{ = .true.}. 119 114 %gm% caution I'm not sure the simplification was a good idea! 115 116 These slopes are computed once in \rou{ldf\_slp\_init} when \np[=.true.]{ln_sco}{ln\_sco}, 117 and either \np[=.true.]{ln_traldf_hor}{ln\_traldf\_hor} or \np[=.true.]{ln_dynldf_hor}{ln\_dynldf\_hor}. 118 119 %% ================================================================================================= 120 120 \subsection{Slopes for tracer iso-neutral mixing} 121 121 \label{subsec:LDF_slp_iso} … … 125 125 Their discrete formulation is found using the fact that the diffusive fluxes of 126 126 locally referenced potential density (\ie\ $in situ$ density) vanish. 127 So, substituting $T$ by $\rho$ in \autoref{eq: tra_ldf_iso} and setting the diffusive fluxes in127 So, substituting $T$ by $\rho$ in \autoref{eq:TRA_ldf_iso} and setting the diffusive fluxes in 128 128 the three directions to zero leads to the following definition for the neutral slopes: 129 129 130 130 \begin{equation} 131 \label{eq: ldfslp_iso}131 \label{eq:LDF_slp_iso} 132 132 \begin{split} 133 133 r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac{\delta_{i+1/2}[\rho]} … … 145 145 146 146 %gm% rewrite this as the explanation is not very clear !!! 147 %In practice, \autoref{eq: ldfslp_iso} is of little help in evaluating the neutral surface slopes. Indeed, for an unsimplified equation of state, the density has a strong dependancy on pressure (here approximated as the depth), therefore applying \autoref{eq:ldfslp_iso} using the $in situ$ density, $\rho$, computed at T-points leads to a flattening of slopes as the depth increases. This is due to the strong increase of the $in situ$ density with depth.148 149 %By definition, neutral surfaces are tangent to the local $in situ$ density \citep{mcdougall_JPO87}, therefore in \autoref{eq: ldfslp_iso}, all the derivatives have to be evaluated at the same local pressure (which in decibars is approximated by the depth in meters).150 151 %In the $z$-coordinate, the derivative of the \autoref{eq: ldfslp_iso} numerator is evaluated at the same depth \nocite{as what?} ($T$-level, which is the same as the $u$- and $v$-levels), so the $in situ$ density can be used for its evaluation.152 153 As the mixing is performed along neutral surfaces, the gradient of $\rho$ in \autoref{eq: ldfslp_iso} has to147 %In practice, \autoref{eq:LDF_slp_iso} is of little help in evaluating the neutral surface slopes. Indeed, for an unsimplified equation of state, the density has a strong dependancy on pressure (here approximated as the depth), therefore applying \autoref{eq:LDF_slp_iso} using the $in situ$ density, $\rho$, computed at T-points leads to a flattening of slopes as the depth increases. This is due to the strong increase of the $in situ$ density with depth. 148 149 %By definition, neutral surfaces are tangent to the local $in situ$ density \citep{mcdougall_JPO87}, therefore in \autoref{eq:LDF_slp_iso}, all the derivatives have to be evaluated at the same local pressure (which in decibars is approximated by the depth in meters). 150 151 %In the $z$-coordinate, the derivative of the \autoref{eq:LDF_slp_iso} numerator is evaluated at the same depth \nocite{as what?} ($T$-level, which is the same as the $u$- and $v$-levels), so the $in situ$ density can be used for its evaluation. 152 153 As the mixing is performed along neutral surfaces, the gradient of $\rho$ in \autoref{eq:LDF_slp_iso} has to 154 154 be evaluated at the same local pressure 155 155 (which, in decibars, is approximated by the depth in meters in the model). 156 Therefore \autoref{eq: ldfslp_iso} cannot be used as such,156 Therefore \autoref{eq:LDF_slp_iso} cannot be used as such, 157 157 but further transformation is needed depending on the vertical coordinate used: 158 158 159 159 \begin{description} 160 161 \item[$z$-coordinate with full step: ] 162 in \autoref{eq:ldfslp_iso} the densities appearing in the $i$ and $j$ derivatives are taken at the same depth, 160 \item [$z$-coordinate with full step:] in \autoref{eq:LDF_slp_iso} the densities appearing in the $i$ and $j$ derivatives are taken at the same depth, 163 161 thus the $in situ$ density can be used. 164 162 This is not the case for the vertical derivatives: $\delta_{k+1/2}[\rho]$ is replaced by $-\rho N^2/g$, 165 163 where $N^2$ is the local Brunt-Vais\"{a}l\"{a} frequency evaluated following \citet{mcdougall_JPO87} 166 (see \autoref{subsec:TRA_bn2}). 167 168 \item[$z$-coordinate with partial step: ] 169 this case is identical to the full step case except that at partial step level, 164 (see \autoref{subsec:TRA_bn2}). 165 \item [$z$-coordinate with partial step:] this case is identical to the full step case except that at partial step level, 170 166 the \emph{horizontal} density gradient is evaluated as described in \autoref{sec:TRA_zpshde}. 171 172 \item[$s$- or hybrid $s$-$z$- coordinate: ] 173 in the current release of \NEMO, iso-neutral mixing is only employed for $s$-coordinates if 174 the Griffies scheme is used (\np{ln\_traldf\_triad}\forcode{ = .true.}; 175 see \autoref{apdx:triad}). 167 \item [$s$- or hybrid $s$-$z$- coordinate:] in the current release of \NEMO, iso-neutral mixing is only employed for $s$-coordinates if 168 the Griffies scheme is used (\np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}; 169 see \autoref{apdx:TRIADS}). 176 170 In other words, iso-neutral mixing will only be accurately represented with a linear equation of state 177 (\np {ln\_seos}\forcode{ = .true.}).178 In the case of a "true" equation of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq: ldfslp_iso}171 (\np[=.true.]{ln_seos}{ln\_seos}). 172 In the case of a "true" equation of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:LDF_slp_iso} 179 173 will include a pressure dependent part, leading to the wrong evaluation of the neutral slopes. 180 174 181 %gm% 175 %gm% 182 176 Note: The solution for $s$-coordinate passes trough the use of different (and better) expression for 183 177 the constraint on iso-neutral fluxes. … … 193 187 194 188 \[ 195 % \label{eq: ldfslp_iso2}189 % \label{eq:LDF_slp_iso2} 196 190 \begin{split} 197 191 r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac … … 221 215 222 216 Note that such a formulation could be also used in the $z$-coordinate and $z$-coordinate with partial steps cases. 223 224 217 \end{description} 225 218 … … 230 223 To overcome this problem, several techniques have been proposed in which the numerical schemes of 231 224 the ocean model are modified \citep{weaver.eby_JPO97, griffies.gnanadesikan.ea_JPO98}. 232 Griffies's scheme is now available in \NEMO\ if \np {ln\_traldf\_triad}\forcode{ = .true.}; see \autoref{apdx:triad}.225 Griffies's scheme is now available in \NEMO\ if \np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}; see \autoref{apdx:TRIADS}. 233 226 Here, another strategy is presented \citep{lazar_phd97}: 234 227 a local filtering of the iso-neutral slopes (made on 9 grid-points) prevents the development of … … 240 233 241 234 Nevertheless, this iso-neutral operator does not ensure that variance cannot increase, 242 contrary to the \citet{griffies.gnanadesikan.ea_JPO98} operator which has that property. 243 244 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 235 contrary to the \citet{griffies.gnanadesikan.ea_JPO98} operator which has that property. 236 245 237 \begin{figure}[!ht] 246 \begin{center} 247 \includegraphics[width=\textwidth]{Fig_LDF_ZDF1} 248 \caption { 249 \protect\label{fig:LDF_ZDF1} 250 averaging procedure for isopycnal slope computation. 251 } 252 \end{center} 238 \centering 239 \includegraphics[width=0.66\textwidth]{Fig_LDF_ZDF1} 240 \caption{Averaging procedure for isopycnal slope computation} 241 \label{fig:LDF_ZDF1} 253 242 \end{figure} 254 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 255 256 %There are three additional questions about the slope calculation. 257 %First the expression for the rotation tensor has been obtain assuming the "small slope" approximation, so a bound has to be imposed on slopes. 258 %Second, numerical stability issues also require a bound on slopes. 243 244 %There are three additional questions about the slope calculation. 245 %First the expression for the rotation tensor has been obtain assuming the "small slope" approximation, so a bound has to be imposed on slopes. 246 %Second, numerical stability issues also require a bound on slopes. 259 247 %Third, the question of boundary condition specified on slopes... 260 248 261 249 %from griffies: chapter 13.1.... 262 250 263 264 265 % In addition and also for numerical stability reasons \citep{cox_OM87, griffies_bk04}, 266 % the slopes are bounded by $1/100$ everywhere. This limit is decreasing linearly 267 % to zero fom $70$ meters depth and the surface (the fact that the eddies "feel" the 251 % In addition and also for numerical stability reasons \citep{cox_OM87, griffies_bk04}, 252 % the slopes are bounded by $1/100$ everywhere. This limit is decreasing linearly 253 % to zero fom $70$ meters depth and the surface (the fact that the eddies "feel" the 268 254 % surface motivates this flattening of isopycnals near the surface). 269 255 270 256 For numerical stability reasons \citep{cox_OM87, griffies_bk04}, the slopes must also be bounded by 271 the namelist scalar \np{rn \_slpmax} (usually $1/100$) everywhere.257 the namelist scalar \np{rn_slpmax}{rn\_slpmax} (usually $1/100$) everywhere. 272 258 This constraint is applied in a piecewise linear fashion, increasing from zero at the surface to 273 259 $1/100$ at $70$ metres and thereafter decreasing to zero at the bottom of the ocean … … 275 261 \colorbox{yellow}{The way slopes are tapered has be checked. Not sure that this is still what is actually done.} 276 262 277 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>278 263 \begin{figure}[!ht] 279 \begin{center} 280 \includegraphics[width=\textwidth]{Fig_eiv_slp} 281 \caption{ 282 \protect\label{fig:eiv_slp} 283 Vertical profile of the slope used for lateral mixing in the mixed layer: 284 \textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior, 285 which has to be adjusted at the surface boundary 286 \ie\ it must tend to zero at the surface since there is no mixing across the air-sea interface: 287 wall boundary condition). 288 Nevertheless, the profile between the surface zero value and the interior iso-neutral one is unknown, 289 and especially the value at the base of the mixed layer; 290 \textit{(b)} profile of slope using a linear tapering of the slope near the surface and 291 imposing a maximum slope of 1/100; 292 \textit{(c)} profile of slope actually used in \NEMO: a linear decrease of the slope from 293 zero at the surface to its ocean interior value computed just below the mixed layer. 294 Note the huge change in the slope at the base of the mixed layer between \textit{(b)} and \textit{(c)}. 295 } 296 \end{center} 264 \centering 265 \includegraphics[width=0.66\textwidth]{Fig_eiv_slp} 266 \caption[Vertical profile of the slope used for lateral mixing in the mixed layer]{ 267 Vertical profile of the slope used for lateral mixing in the mixed layer: 268 \textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior, 269 which has to be adjusted at the surface boundary 270 \ie\ it must tend to zero at the surface since there is no mixing across the air-sea interface: 271 wall boundary condition). 272 Nevertheless, 273 the profile between the surface zero value and the interior iso-neutral one is unknown, 274 and especially the value at the base of the mixed layer; 275 \textit{(b)} profile of slope using a linear tapering of the slope near the surface and 276 imposing a maximum slope of 1/100; 277 \textit{(c)} profile of slope actually used in \NEMO: 278 a linear decrease of the slope from zero at the surface to 279 its ocean interior value computed just below the mixed layer. 280 Note the huge change in the slope at the base of the mixed layer between 281 \textit{(b)} and \textit{(c)}.} 282 \label{fig:LDF_eiv_slp} 297 283 \end{figure} 298 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>299 284 300 285 \colorbox{yellow}{add here a discussion about the flattening of the slopes, vs tapering the coefficient.} 301 286 287 %% ================================================================================================= 302 288 \subsection{Slopes for momentum iso-neutral mixing} 303 289 304 290 The iso-neutral diffusion operator on momentum is the same as the one used on tracers but 305 291 applied to each component of the velocity separately 306 (see \autoref{eq: dyn_ldf_iso} in section~\autoref{subsec:DYN_ldf_iso}).292 (see \autoref{eq:DYN_ldf_iso} in section~\autoref{subsec:DYN_ldf_iso}). 307 293 The slopes between the surface along which the diffusion operator acts and the surface of computation 308 294 ($z$- or $s$-surfaces) are defined at $T$-, $f$-, and \textit{uw}- points for the $u$-component, and $T$-, $f$- and 309 295 \textit{vw}- points for the $v$-component. 310 296 They are computed from the slopes used for tracer diffusion, 311 \ie\ \autoref{eq: ldfslp_geo} and \autoref{eq:ldfslp_iso}:297 \ie\ \autoref{eq:LDF_slp_geo} and \autoref{eq:LDF_slp_iso}: 312 298 313 299 \[ 314 % \label{eq: ldfslp_dyn}300 % \label{eq:LDF_slp_dyn} 315 301 \begin{aligned} 316 302 &r_{1t}\ \ = \overline{r_{1u}}^{\,i} &&& r_{1f}\ \ &= \overline{r_{1u}}^{\,i+1/2} \\ … … 326 312 (see \autoref{sec:LBC_coast}). 327 313 328 329 % ================================================================ 330 % Lateral Mixing Coefficients 331 % ================================================================ 332 \section[Lateral mixing coefficient (\forcode{nn_aht_ijk_t}, \forcode{nn_ahm_ijk_t})] 333 {Lateral mixing coefficient (\protect\np{nn\_aht\_ijk\_t}, \protect\np{nn\_ahm\_ijk\_t})} 314 %% ================================================================================================= 315 \section[Lateral mixing coefficient (\forcode{nn_aht_ijk_t} \& \forcode{nn_ahm_ijk_t})]{Lateral mixing coefficient (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 334 316 \label{sec:LDF_coef} 335 317 336 The specification of the space variation of the coefficient is made in modules \mdl{ldftra} and \mdl{ldfdyn}. 318 The specification of the space variation of the coefficient is made in modules \mdl{ldftra} and \mdl{ldfdyn}. 337 319 The way the mixing coefficients are set in the reference version can be described as follows: 338 320 339 \subsection[Mixing coefficients read from file (\forcode{nn_aht_ijk_t = -20, -30}, \forcode{nn_ahm_ijk_t = -20,-30})] 340 { Mixing coefficients read from file (\protect\np{nn\_aht\_ijk\_t}\forcode{ = -20, -30}, \protect\np{nn\_ahm\_ijk\_t}\forcode{ = -20, -30})}341 342 Mixing coefficients can be read from file if a particular geographical variation is needed. For example, in the ORCA2 global ocean model, 321 %% ================================================================================================= 322 \subsection[Mixing coefficients read from file (\forcode{=-20, -30})]{ Mixing coefficients read from file (\protect\np[=-20, -30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=-20, -30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 323 324 Mixing coefficients can be read from file if a particular geographical variation is needed. For example, in the ORCA2 global ocean model, 343 325 the laplacian viscosity operator uses $A^l$~= 4.10$^4$ m$^2$/s poleward of 20$^{\circ}$ north and south and 344 decreases linearly to $A^l$~= 2.10$^3$ m$^2$/s at the equator \citep{madec.delecluse.ea_JPO96, delecluse.madec_icol99}. 345 Similar modified horizontal variations can be found with the Antarctic or Arctic sub-domain options of ORCA2 and ORCA05. 346 The provided fields can either be 2d (\np{nn\_aht\_ijk\_t}\forcode{ = -20}, \np{nn\_ahm\_ijk\_t}\forcode{ = -20}) or 3d (\np{nn\_aht\_ijk\_t}\forcode{ = -30}, \np{nn\_ahm\_ijk\_t}\forcode{ = -30}). They must be given at U, V points for tracers and T, F points for momentum (see \autoref{tab:LDF_files}). 347 348 %-------------------------------------------------TABLE--------------------------------------------------- 326 decreases linearly to $A^l$~= 2.10$^3$ m$^2$/s at the equator \citep{madec.delecluse.ea_JPO96, delecluse.madec_icol99}. 327 Similar modified horizontal variations can be found with the Antarctic or Arctic sub-domain options of ORCA2 and ORCA05. 328 The provided fields can either be 2d (\np[=-20]{nn_aht_ijk_t}{nn\_aht\_ijk\_t}, \np[=-20]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}) or 3d (\np[=-30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t}, \np[=-30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}). They must be given at U, V points for tracers and T, F points for momentum (see \autoref{tab:LDF_files}). 329 349 330 \begin{table}[htb] 350 \begin{center} 351 \begin{tabular}{|l|l|l|l|} 352 \hline 353 Namelist parameter & Input filename & dimensions & variable names \\ \hline 354 \np{nn\_ahm\_ijk\_t}\forcode{ = -20} & \forcode{eddy_viscosity_2D.nc } & $(i,j)$ & \forcode{ahmt_2d, ahmf_2d} \\ \hline 355 \np{nn\_aht\_ijk\_t}\forcode{ = -20} & \forcode{eddy_diffusivity_2D.nc } & $(i,j)$ & \forcode{ahtu_2d, ahtv_2d} \\ \hline 356 \np{nn\_ahm\_ijk\_t}\forcode{ = -30} & \forcode{eddy_viscosity_3D.nc } & $(i,j,k)$ & \forcode{ahmt_3d, ahmf_3d} \\ \hline 357 \np{nn\_aht\_ijk\_t}\forcode{ = -30} & \forcode{eddy_diffusivity_3D.nc } & $(i,j,k)$ & \forcode{ahtu_3d, ahtv_3d} \\ \hline 358 \end{tabular} 359 \caption{ 360 \protect\label{tab:LDF_files} 361 Description of expected input files if mixing coefficients are read from NetCDF files. 362 } 363 \end{center} 331 \centering 332 \begin{tabular}{|l|l|l|l|} 333 \hline 334 Namelist parameter & Input filename & dimensions & variable names \\ \hline 335 \np[=-20]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t} & \forcode{eddy_viscosity_2D.nc } & $(i,j)$ & \forcode{ahmt_2d, ahmf_2d} \\ \hline 336 \np[=-20]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} & \forcode{eddy_diffusivity_2D.nc } & $(i,j)$ & \forcode{ahtu_2d, ahtv_2d} \\ \hline 337 \np[=-30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t} & \forcode{eddy_viscosity_3D.nc } & $(i,j,k)$ & \forcode{ahmt_3d, ahmf_3d} \\ \hline 338 \np[=-30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} & \forcode{eddy_diffusivity_3D.nc } & $(i,j,k)$ & \forcode{ahtu_3d, ahtv_3d} \\ \hline 339 \end{tabular} 340 \caption{Description of expected input files if mixing coefficients are read from NetCDF files} 341 \label{tab:LDF_files} 364 342 \end{table} 365 %-------------------------------------------------------------------------------------------------------------- 366 367 \subsection[Constant mixing coefficients (\forcode{nn_aht_ijk_t = 0}, \forcode{nn_ahm_ijk_t = 0})] 368 { Constant mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{ = 0}, \protect\np{nn\_ahm\_ijk\_t}\forcode{ = 0})} 343 344 %% ================================================================================================= 345 \subsection[Constant mixing coefficients (\forcode{=0})]{ Constant mixing coefficients (\protect\np[=0]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=0]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 369 346 370 347 If constant, mixing coefficients are set thanks to a velocity and a length scales ($U_{scl}$, $L_{scl}$) such that: 371 348 372 349 \begin{equation} 373 \label{eq: constantah}350 \label{eq:LDF_constantah} 374 351 A_o^l = \left\{ 375 352 \begin{aligned} … … 380 357 \end{equation} 381 358 382 $U_{scl}$ and $L_{scl}$ are given by the namelist parameters \np{rn \_Ud}, \np{rn\_Uv}, \np{rn\_Ld} and \np{rn\_Lv}.383 384 \subsection[Vertically varying mixing coefficients (\forcode{nn_aht_ijk_t = 10}, \forcode{nn_ahm_ijk_t = 10})] 385 {Vertically varying mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{ = 10}, \protect\np{nn\_ahm\_ijk\_t}\forcode{ = 10})}359 $U_{scl}$ and $L_{scl}$ are given by the namelist parameters \np{rn_Ud}{rn\_Ud}, \np{rn_Uv}{rn\_Uv}, \np{rn_Ld}{rn\_Ld} and \np{rn_Lv}{rn\_Lv}. 360 361 %% ================================================================================================= 362 \subsection[Vertically varying mixing coefficients (\forcode{=10})]{Vertically varying mixing coefficients (\protect\np[=10]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=10]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 386 363 387 364 In the vertically varying case, a hyperbolic variation of the lateral mixing coefficient is introduced in which 388 the surface value is given by \autoref{eq: constantah}, the bottom value is 1/4 of the surface value,365 the surface value is given by \autoref{eq:LDF_constantah}, the bottom value is 1/4 of the surface value, 389 366 and the transition takes place around z=500~m with a width of 200~m. 390 367 This profile is hard coded in module \mdl{ldfc1d\_c2d}, but can be easily modified by users. 391 368 392 \subsection[Mesh size dependent mixing coefficients (\forcode{nn_aht_ijk_t = 20}, \forcode{nn_ahm_ijk_t = 20})] 393 {Mesh size dependent mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{ = 20}, \protect\np{nn\_ahm\_ijk\_t}\forcode{ = 20})}369 %% ================================================================================================= 370 \subsection[Mesh size dependent mixing coefficients (\forcode{=20})]{Mesh size dependent mixing coefficients (\protect\np[=20]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=20]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 394 371 395 372 In that case, the horizontal variation of the eddy coefficient depends on the local mesh size and 396 373 the type of operator used: 397 374 \begin{equation} 398 \label{eq: title}375 \label{eq:LDF_title} 399 376 A_l = \left\{ 400 377 \begin{aligned} … … 404 381 \right. 405 382 \end{equation} 406 where $U_{scl}$ is a user defined velocity scale (\np{rn \_Ud}, \np{rn\_Uv}).383 where $U_{scl}$ is a user defined velocity scale (\np{rn_Ud}{rn\_Ud}, \np{rn_Uv}{rn\_Uv}). 407 384 This variation is intended to reflect the lesser need for subgrid scale eddy mixing where 408 385 the grid size is smaller in the domain. … … 411 388 model configurations presenting large changes in grid spacing such as global ocean models. 412 389 Indeed, in such a case, a constant mixing coefficient can lead to a blow up of the model due to 413 large coefficient compare to the smallest grid size (see \autoref{sec: STP_forward_imp}),390 large coefficient compare to the smallest grid size (see \autoref{sec:TD_forward_imp}), 414 391 especially when using a bilaplacian operator. 415 392 416 \colorbox{yellow}{CASE \np{nn \_aht\_ijk\_t} = 21 to be added}417 418 \subsection[Mesh size and depth dependent mixing coefficients (\forcode{nn_aht_ijk_t = 30}, \forcode{nn_ahm_ijk_t = 30})] 419 {Mesh size and depth dependent mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{ = 30}, \protect\np{nn\_ahm\_ijk\_t}\forcode{ = 30})}393 \colorbox{yellow}{CASE \np{nn_aht_ijk_t}{nn\_aht\_ijk\_t} = 21 to be added} 394 395 %% ================================================================================================= 396 \subsection[Mesh size and depth dependent mixing coefficients (\forcode{=30})]{Mesh size and depth dependent mixing coefficients (\protect\np[=30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 420 397 421 398 The 3D space variation of the mixing coefficient is simply the combination of the 1D and 2D cases above, 422 399 \ie\ a hyperbolic tangent variation with depth associated with a grid size dependence of 423 the magnitude of the coefficient. 424 425 \subsection[Velocity dependent mixing coefficients (\forcode{nn_aht_ijk_t = 31}, \forcode{nn_ahm_ijk_t = 31})] 426 {Flow dependent mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{ = 31}, \protect\np{nn\_ahm\_ijk\_t}\forcode{ = 31})}400 the magnitude of the coefficient. 401 402 %% ================================================================================================= 403 \subsection[Velocity dependent mixing coefficients (\forcode{=31})]{Flow dependent mixing coefficients (\protect\np[=31]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=31]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 427 404 In that case, the eddy coefficient is proportional to the local velocity magnitude so that the Reynolds number $Re = \lvert U \rvert e / A_l$ is constant (and here hardcoded to $12$): 428 405 \colorbox{yellow}{JC comment: The Reynolds is effectively set to 12 in the code for both operators but shouldn't it be 2 for Laplacian ?} 429 406 430 407 \begin{equation} 431 \label{eq: flowah}408 \label{eq:LDF_flowah} 432 409 A_l = \left\{ 433 410 \begin{aligned} 434 411 & \frac{1}{12} \lvert U \rvert e & \text{for laplacian operator } \\ 435 & \frac{1}{12} \lvert U \rvert e^3 & \text{for bilaplacian operator } 412 & \frac{1}{12} \lvert U \rvert e^3 & \text{for bilaplacian operator } 436 413 \end{aligned} 437 414 \right. 438 415 \end{equation} 439 416 440 \subsection[Deformation rate dependent viscosities (\forcode{nn_ahm_ijk_t = 32})] 441 {Deformation rate dependent viscosities (\protect\np{nn\_ahm\_ijk\_t}\forcode{ = 32})}442 443 This option refers to the \citep{smagorinsky_MW63} scheme which is here implemented for momentum only. Smagorinsky chose as a 417 %% ================================================================================================= 418 \subsection[Deformation rate dependent viscosities (\forcode{nn_ahm_ijk_t=32})]{Deformation rate dependent viscosities (\protect\np[=32]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 419 420 This option refers to the \citep{smagorinsky_MW63} scheme which is here implemented for momentum only. Smagorinsky chose as a 444 421 characteristic time scale $T_{smag}$ the deformation rate and for the lengthscale $L_{smag}$ the maximum wavenumber possible on the horizontal grid, e.g.: 445 422 446 423 \begin{equation} 447 \label{eq: smag1}424 \label{eq:LDF_smag1} 448 425 \begin{split} 449 426 T_{smag}^{-1} & = \sqrt{\left( \partial_x u - \partial_y v\right)^2 + \left( \partial_y u + \partial_x v\right)^2 } \\ … … 452 429 \end{equation} 453 430 454 Introducing a user defined constant $C$ (given in the namelist as \np{rn \_csmc}), one can deduce the mixing coefficients as follows:455 456 \begin{equation} 457 \label{eq: smag2}431 Introducing a user defined constant $C$ (given in the namelist as \np{rn_csmc}{rn\_csmc}), one can deduce the mixing coefficients as follows: 432 433 \begin{equation} 434 \label{eq:LDF_smag2} 458 435 A_{smag} = \left\{ 459 436 \begin{aligned} 460 437 & C^2 T_{smag}^{-1} L_{smag}^2 & \text{for laplacian operator } \\ 461 & \frac{C^2}{8} T_{smag}^{-1} L_{smag}^4 & \text{for bilaplacian operator } 438 & \frac{C^2}{8} T_{smag}^{-1} L_{smag}^4 & \text{for bilaplacian operator } 462 439 \end{aligned} 463 440 \right. 464 441 \end{equation} 465 442 466 For stability reasons, upper and lower limits are applied on the resulting coefficient (see \autoref{sec: STP_forward_imp}) so that:467 \begin{equation} 468 \label{eq: smag3}443 For stability reasons, upper and lower limits are applied on the resulting coefficient (see \autoref{sec:TD_forward_imp}) so that: 444 \begin{equation} 445 \label{eq:LDF_smag3} 469 446 \begin{aligned} 470 447 & C_{min} \frac{1}{2} \lvert U \rvert e < A_{smag} < C_{max} \frac{e^2}{ 8\rdt} & \text{for laplacian operator } \\ 471 & C_{min} \frac{1}{12} \lvert U \rvert e^3 < A_{smag} < C_{max} \frac{e^4}{64 \rdt} & \text{for bilaplacian operator } 448 & C_{min} \frac{1}{12} \lvert U \rvert e^3 < A_{smag} < C_{max} \frac{e^4}{64 \rdt} & \text{for bilaplacian operator } 472 449 \end{aligned} 473 450 \end{equation} 474 451 475 where $C_{min}$ and $C_{max}$ are adimensional namelist parameters given by \np{rn\_minfac} and \np{rn\_maxfac} respectively. 476 452 where $C_{min}$ and $C_{max}$ are adimensional namelist parameters given by \np{rn_minfac}{rn\_minfac} and \np{rn_maxfac}{rn\_maxfac} respectively. 453 454 %% ================================================================================================= 477 455 \subsection{About space and time varying mixing coefficients} 478 456 … … 480 458 481 459 (1) the momentum diffusion operator acting along model level surfaces is written in terms of curl and 482 divergent components of the horizontal current (see \autoref{subsec: PE_ldf}).460 divergent components of the horizontal current (see \autoref{subsec:MB_ldf}). 483 461 Although the eddy coefficient could be set to different values in these two terms, 484 this option is not currently available. 462 this option is not currently available. 485 463 486 464 (2) with an horizontally varying viscosity, the quadratic integral constraints on enstrophy and on the square of 487 465 the horizontal divergence for operators acting along model-surfaces are no longer satisfied 488 (\autoref{sec:dynldf_properties}). 489 490 % ================================================================ 491 % Eddy Induced Mixing 492 % ================================================================ 493 \section[Eddy induced velocity (\forcode{ln_ldfeiv = .true.})] 494 {Eddy induced velocity (\protect\np{ln\_ldfeiv}\forcode{ = .true.})} 466 (\autoref{sec:INVARIANTS_dynldf_properties}). 467 468 %% ================================================================================================= 469 \section[Eddy induced velocity (\forcode{ln_ldfeiv})]{Eddy induced velocity (\protect\np{ln_ldfeiv}{ln\_ldfeiv})} 495 470 496 471 \label{sec:LDF_eiv} 497 472 498 %--------------------------------------------namtra_eiv--------------------------------------------------- 499 500 \nlst{namtra_eiv} 501 502 %-------------------------------------------------------------------------------------------------------------- 503 473 \begin{listing} 474 \nlst{namtra_eiv} 475 \caption{\forcode{&namtra_eiv}} 476 \label{lst:namtra_eiv} 477 \end{listing} 504 478 505 479 %%gm from Triad appendix : to be incorporated.... … … 507 481 Values of iso-neutral diffusivity and GM coefficient are set as described in \autoref{sec:LDF_coef}. 508 482 If none of the keys \key{traldf\_cNd}, N=1,2,3 is set (the default), spatially constant iso-neutral $A_l$ and 509 GM diffusivity $A_e$ are directly set by \np{rn \_aeih\_0} and \np{rn\_aeiv\_0}.483 GM diffusivity $A_e$ are directly set by \np{rn_aeih_0}{rn\_aeih\_0} and \np{rn_aeiv_0}{rn\_aeiv\_0}. 510 484 If 2D-varying coefficients are set with \key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal 511 485 scale factor according to \autoref{eq:title} … … 520 494 In this case, $A_e$ at low latitudes $|\theta|<20^{\circ}$ is further reduced by a factor $|f/f_{20}|$, 521 495 where $f_{20}$ is the value of $f$ at $20^{\circ}$~N 522 } (\mdl{ldfeiv}) and \np{rn \_aeiv\_0} is ignored unless it is zero.496 } (\mdl{ldfeiv}) and \np{rn_aeiv_0}{rn\_aeiv\_0} is ignored unless it is zero. 523 497 } 524 498 525 When \citet{gent.mcwilliams_JPO90} diffusion is used (\np {ln\_ldfeiv}\forcode{ = .true.}),499 When \citet{gent.mcwilliams_JPO90} diffusion is used (\np[=.true.]{ln_ldfeiv}{ln\_ldfeiv}), 526 500 an eddy induced tracer advection term is added, 527 501 the formulation of which depends on the slopes of iso-neutral surfaces. 528 502 Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, 529 \ie\ \autoref{eq: ldfslp_geo} is used in $z$-coordinates,530 and the sum \autoref{eq: ldfslp_geo} + \autoref{eq:ldfslp_iso} in $s$-coordinates.531 532 If isopycnal mixing is used in the standard way, \ie\ \np {ln\_traldf\_triad}\forcode{ = .false.}, the eddy induced velocity is given by:533 \begin{equation} 534 \label{eq: ldfeiv}503 \ie\ \autoref{eq:LDF_slp_geo} is used in $z$-coordinates, 504 and the sum \autoref{eq:LDF_slp_geo} + \autoref{eq:LDF_slp_iso} in $s$-coordinates. 505 506 If isopycnal mixing is used in the standard way, \ie\ \np[=.false.]{ln_traldf_triad}{ln\_traldf\_triad}, the eddy induced velocity is given by: 507 \begin{equation} 508 \label{eq:LDF_eiv} 535 509 \begin{split} 536 510 u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\ … … 539 513 \end{split} 540 514 \end{equation} 541 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn \_aei\_ijk\_t} \nam{tra\_eiv} namelist parameter.515 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn_aei_ijk_t}{nn\_aei\_ijk\_t} \nam{tra_eiv}{tra\_eiv} namelist parameter. 542 516 The three components of the eddy induced velocity are computed in \rou{ldf\_eiv\_trp} and 543 517 added to the eulerian velocity in \rou{tra\_adv} where tracer advection is performed. … … 547 521 previous releases of OPA \citep{madec.delecluse.ea_NPM98}. 548 522 This is particularly useful for passive tracers where \emph{positivity} of the advection scheme is of 549 paramount importance. 523 paramount importance. 550 524 551 525 At the surface, lateral and bottom boundaries, the eddy induced velocity, 552 and thus the advective eddy fluxes of heat and salt, are set to zero. 553 The value of the eddy induced mixing coefficient and its space variation is controlled in a similar way as for lateral mixing coefficient described in the preceding subsection (\np{nn\_aei\_ijk\_t}, \np{rn\_Ue}, \np{rn\_Le} namelist parameters). 554 \colorbox{yellow}{CASE \np{nn\_aei\_ijk\_t} = 21 to be added} 555 556 In case of setting \np{ln\_traldf\_triad}\forcode{ = .true.}, a skew form of the eddy induced advective fluxes is used, which is described in \autoref{apdx:triad}. 557 558 % ================================================================ 559 % Mixed layer eddies 560 % ================================================================ 561 \section[Mixed layer eddies (\forcode{ln_mle = .true.})] 562 {Mixed layer eddies (\protect\np{ln\_mle}\forcode{ = .true.})} 563 526 and thus the advective eddy fluxes of heat and salt, are set to zero. 527 The value of the eddy induced mixing coefficient and its space variation is controlled in a similar way as for lateral mixing coefficient described in the preceding subsection (\np{nn_aei_ijk_t}{nn\_aei\_ijk\_t}, \np{rn_Ue}{rn\_Ue}, \np{rn_Le}{rn\_Le} namelist parameters). 528 \colorbox{yellow}{CASE \np{nn_aei_ijk_t}{nn\_aei\_ijk\_t} = 21 to be added} 529 530 In case of setting \np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}, a skew form of the eddy induced advective fluxes is used, which is described in \autoref{apdx:TRIADS}. 531 532 %% ================================================================================================= 533 \section[Mixed layer eddies (\forcode{ln_mle})]{Mixed layer eddies (\protect\np{ln_mle}{ln\_mle})} 564 534 \label{sec:LDF_mle} 565 535 566 %--------------------------------------------namtra_eiv--------------------------------------------------- 567 568 \nlst{namtra_mle}569 570 %-------------------------------------------------------------------------------------------------------------- 571 572 If \np {ln\_mle}\forcode{ = .true.} in \nam{tra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection.536 \begin{listing} 537 \nlst{namtra_mle} 538 \caption{\forcode{&namtra_mle}} 539 \label{lst:namtra_mle} 540 \end{listing} 541 542 If \np[=.true.]{ln_mle}{ln\_mle} in \nam{tra_mle}{tra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection. 573 543 574 544 \colorbox{yellow}{TBC} 575 545 576 \biblio 577 578 \pindex 546 \onlyinsubfile{\input{../../global/epilogue}} 579 547 580 548 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_OBS.tex
r11435 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter observation operator (OBS) 6 % ================================================================ 4 7 5 \chapter{Observation and Model Comparison (OBS)} 8 6 \label{chap:OBS} 9 7 8 %\subsubsection*{Changes record} 9 %\begin{tabular}{l||l|m{0.65\linewidth}} 10 % Release & Author & Modifications \\ 11 % {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates} \\ 12 % {\em 3.6} & {\em M. Martin, A. Ryan} & {\em Add averaging operator, standalone obs oper} \\ 13 % {\em 3.4} & {\em D. J. Lea, M. Martin, ...} & {\em Initial version} \\ 14 % {\em --\texttt{"}--} & {\em ... K. Mogensen, A. Vidard, A. Weaver} & {\em ---\texttt{"}---} \\ 15 %\end{tabular} 16 17 \thispagestyle{plain} 18 10 19 \chaptertoc 11 20 12 \vfill 13 \begin{figure}[b] 14 \subsubsection*{Changes record} 15 \begin{tabular}{l||l|m{0.65\linewidth}} 16 Release & Author & Modifications \\ 17 {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates} \\ 18 {\em 3.6} & {\em M. Martin, A. Ryan} & {\em Add averaging operator, standalone obs oper} \\ 19 {\em 3.4} & {\em D. J. Lea, M. Martin, ...} & {\em Initial version} \\ 20 {\em --\texttt{"}--} & {\em ... K. Mogensen, A. Vidard, A. Weaver} & {\em ---\texttt{"}---} \\ 21 \end{tabular} 22 \end{figure} 23 24 \newpage 21 \paragraph{Changes record} ~\\ 22 23 {\footnotesize 24 \begin{tabularx}{\textwidth}{l||X|X} 25 Release & Author(s) & Modifications \\ 26 \hline 27 {\em 4.0} & {\em ...} & {\em ...} \\ 28 {\em 3.6} & {\em ...} & {\em ...} \\ 29 {\em 3.4} & {\em ...} & {\em ...} \\ 30 {\em <=3.4} & {\em ...} & {\em ...} 31 \end{tabularx} 32 } 33 34 \clearpage 25 35 26 36 The observation and model comparison code, the observation operator (OBS), reads in observation files … … 32 42 The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model equivalent values for observations on the 0th time step. 33 43 The code is then called again after each time step from \mdl{step}. 34 The code is only activated if the \nam{obs} namelist logical \np{ln\_diaobs} is set to true.44 The code is only activated if the \nam{obs}{obs} namelist logical \np{ln_diaobs}{ln\_diaobs} is set to true. 35 45 36 46 For all data types a 2D horizontal interpolator or averager is needed to … … 42 52 Some profile observation types (\eg\ tropical moored buoys) are made available as daily averaged quantities. 43 53 The observation operator code can be set-up to calculate the equivalent daily average model temperature fields using 44 the \np{nn \_profdavtypes} namelist array.54 the \np{nn_profdavtypes}{nn\_profdavtypes} namelist array. 45 55 Some SST observations are equivalent to a night-time average value and 46 56 the observation operator code can calculate equivalent night-time average model SST fields by 47 setting the namelist value \np{ln \_sstnight} to true.57 setting the namelist value \np{ln_sstnight}{ln\_sstnight} to true. 48 58 Otherwise (by default) the model value from the nearest time step to the observation time is used. 49 59 50 The code is controlled by the namelist \nam{obs} .60 The code is controlled by the namelist \nam{obs}{obs}. 51 61 See the following sections for more details on setting up the namelist. 52 62 … … 60 70 In \autoref{sec:OBS_obsutils} we describe some utilities to help work with the files produced by the OBS code. 61 71 62 % ================================================================ 63 % Example 64 % ================================================================ 72 %% ================================================================================================= 65 73 \section{Running the observation operator code example} 66 74 \label{sec:OBS_example} … … 92 100 \end{enumerate} 93 101 94 Options are defined through the \nam{obs} namelist variables.95 The options \np{ln \_t3d} and \np{ln\_s3d} switch on the temperature and salinity profile observation operator code.96 The filename or array of filenames are specified using the \np{cn \_profbfiles} variable.102 Options are defined through the \nam{obs}{obs} namelist variables. 103 The options \np{ln_t3d}{ln\_t3d} and \np{ln_s3d}{ln\_s3d} switch on the temperature and salinity profile observation operator code. 104 The filename or array of filenames are specified using the \np{cn_profbfiles}{cn\_profbfiles} variable. 97 105 The model grid points for a particular observation latitude and longitude are found using 98 106 the grid searching part of the code. 99 107 This can be expensive, particularly for large numbers of observations, 100 setting \np{ln \_grid\_search\_lookup} allows the use of a lookup table which101 is saved into an \np{cn \_gridsearch} file (or files).108 setting \np{ln_grid_search_lookup}{ln\_grid\_search\_lookup} allows the use of a lookup table which 109 is saved into an \np{cn_gridsearch}{cn\_gridsearch} file (or files). 102 110 This will need to be generated the first time if it does not exist in the run directory. 103 111 However, once produced it will significantly speed up future grid searches. 104 Setting \np{ln \_grid\_global} means that the code distributes the observations evenly between processors.112 Setting \np{ln_grid_global}{ln\_grid\_global} means that the code distributes the observations evenly between processors. 105 113 Alternatively each processor will work with observations located within the model subdomain 106 114 (see \autoref{subsec:OBS_parallel}). … … 111 119 \autoref{sec:OBS_obsutils}. 112 120 121 %% ================================================================================================= 113 122 \section{Technical details (feedback type observation file headers)} 114 123 \label{sec:OBS_details} 115 124 116 Here we show a more complete example namelist \nam{obs} and also show the NetCDF headers of125 Here we show a more complete example namelist \nam{obs}{obs} and also show the NetCDF headers of 117 126 the observation files that may be used with the observation operator. 118 127 119 %------------------------------------------namobs-------------------------------------------------------- 120 121 \nlst{namobs} 122 %------------------------------------------------------------------------------------------------------------- 128 \begin{listing} 129 \nlst{namobs} 130 \caption{\forcode{&namobs}} 131 \label{lst:namobs} 132 \end{listing} 123 133 124 134 The observation operator code uses the feedback observation file format for all data types. … … 127 137 sea surface temperature are in the following subsections. 128 138 139 %% ================================================================================================= 129 140 \subsection{Profile feedback file} 130 141 … … 283 294 \end{clines} 284 295 296 %% ================================================================================================= 285 297 \subsection{Sea level anomaly feedback file} 286 298 … … 429 441 \end{clines} 430 442 443 %% ================================================================================================= 431 444 \subsection{Sea surface temperature feedback file} 432 445 … … 546 559 \end{clines} 547 560 561 %% ================================================================================================= 548 562 \section{Theoretical details} 549 563 \label{sec:OBS_theory} 550 564 565 %% ================================================================================================= 551 566 \subsection{Horizontal interpolation and averaging methods} 552 567 … … 561 576 (for surface observation types only). 562 577 563 The main namelist option associated with the interpolation/averaging is \np{nn \_2dint}.578 The main namelist option associated with the interpolation/averaging is \np{nn_2dint}{nn\_2dint}. 564 579 This default option can be set to values from 0 to 6. 565 580 Values between 0 to 4 are associated with interpolation while values 5 or 6 are associated with averaging. 566 581 \begin{itemize} 567 \item \np {nn\_2dint}\forcode{ = 0}: Distance-weighted interpolation568 \item \np {nn\_2dint}\forcode{ = 1}: Distance-weighted interpolation (small angle)569 \item \np {nn\_2dint}\forcode{ = 2}: Bilinear interpolation (geographical grid)570 \item \np {nn\_2dint}\forcode{ = 3}: Bilinear remapping interpolation (general grid)571 \item \np {nn\_2dint}\forcode{ = 4}: Polynomial interpolation572 \item \np {nn\_2dint}\forcode{ = 5}: Radial footprint averaging with diameter specified in the namelist as582 \item \np[=0]{nn_2dint}{nn\_2dint}: Distance-weighted interpolation 583 \item \np[=1]{nn_2dint}{nn\_2dint}: Distance-weighted interpolation (small angle) 584 \item \np[=2]{nn_2dint}{nn\_2dint}: Bilinear interpolation (geographical grid) 585 \item \np[=3]{nn_2dint}{nn\_2dint}: Bilinear remapping interpolation (general grid) 586 \item \np[=4]{nn_2dint}{nn\_2dint}: Polynomial interpolation 587 \item \np[=5]{nn_2dint}{nn\_2dint}: Radial footprint averaging with diameter specified in the namelist as 573 588 \texttt{rn\_[var]\_avglamscl} in degrees or metres (set using \texttt{ln\_[var]\_fp\_indegs}) 574 \item \np {nn\_2dint}\forcode{ = 6}: Rectangular footprint averaging with E/W and N/S size specified in589 \item \np[=6]{nn_2dint}{nn\_2dint}: Rectangular footprint averaging with E/W and N/S size specified in 575 590 the namelist as \texttt{rn\_[var]\_avglamscl} and \texttt{rn\_[var]\_avgphiscl} in degrees or metres 576 591 (set using \texttt{ln\_[var]\_fp\_indegs}) … … 578 593 Replace \texttt{[var]} in the last two options with the observation type (sla, sst, sss or sic) for 579 594 which the averaging is to be performed (see namelist example above). 580 The \np{nn \_2dint} default option can be overridden for surface observation types using595 The \np{nn_2dint}{nn\_2dint} default option can be overridden for surface observation types using 581 596 namelist values \texttt{nn\_2dint\_[var]} where \texttt{[var]} is the observation type. 582 597 583 598 Below is some more detail on the various options for interpolation and averaging available in \NEMO. 584 599 600 %% ================================================================================================= 585 601 \subsubsection{Horizontal interpolation} 586 602 … … 605 621 606 622 \begin{enumerate} 607 608 \item[1.] {\bfseries Great-Circle distance-weighted interpolation.} 623 \item {\bfseries Great-Circle distance-weighted interpolation.} 609 624 The weights are computed as a function of the great-circle distance $s(P, \cdot)$ between $P$ and 610 625 the model grid points $A$, $B$ etc. … … 651 666 \end{alignat*} 652 667 653 \item [2.]{\bfseries Great-Circle distance-weighted interpolation with small angle approximation.}668 \item {\bfseries Great-Circle distance-weighted interpolation with small angle approximation.} 654 669 Similar to the previous interpolation but with the distance $s$ computed as 655 670 \begin{alignat*}{2} … … 661 676 where $M$ corresponds to $A$, $B$, $C$ or $D$. 662 677 663 \item [3.]{\bfseries Bilinear interpolation for a regular spaced grid.}678 \item {\bfseries Bilinear interpolation for a regular spaced grid.} 664 679 The interpolation is split into two 1D interpolations in the longitude and latitude directions, respectively. 665 680 666 \item [4.]{\bfseries Bilinear remapping interpolation for a general grid.}681 \item {\bfseries Bilinear remapping interpolation for a general grid.} 667 682 An iterative scheme that involves first mapping a quadrilateral cell into 668 683 a cell with coordinates (0,0), (1,0), (0,1) and (1,1). … … 671 686 \end{enumerate} 672 687 688 %% ================================================================================================= 673 689 \subsubsection{Horizontal averaging} 674 690 … … 691 707 692 708 Examples of the weights calculated for an observation with rectangular and radial footprints are shown in 693 \autoref{fig:obsavgrec} and~\autoref{fig:obsavgrad}. 694 695 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 709 \autoref{fig:OBS_avgrec} and~\autoref{fig:OBS_avgrad}. 710 696 711 \begin{figure} 697 \begin{center} 698 \includegraphics[width=\textwidth]{Fig_OBS_avg_rec} 699 \caption{ 700 \protect\label{fig:obsavgrec} 701 Weights associated with each model grid box (blue lines and numbers) 702 for an observation at -170.5\deg{E}, 56.0\deg{N} with a rectangular footprint of 1\deg x 1\deg. 703 } 704 \end{center} 712 \centering 713 \includegraphics[width=0.66\textwidth]{Fig_OBS_avg_rec} 714 \caption[Observational weights with a rectangular footprint]{ 715 Weights associated with each model grid box (blue lines and numbers) 716 for an observation at -170.5\deg{E}, 56.0\deg{N} with a rectangular footprint of 1\deg\ x 1\deg.} 717 \label{fig:OBS_avgrec} 705 718 \end{figure} 706 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 707 708 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 719 709 720 \begin{figure} 710 \begin{center} 711 \includegraphics[width=\textwidth]{Fig_OBS_avg_rad} 712 \caption{ 713 \protect\label{fig:obsavgrad} 714 Weights associated with each model grid box (blue lines and numbers) 715 for an observation at -170.5\deg{E}, 56.0\deg{N} with a radial footprint with diameter 1\deg. 716 } 717 \end{center} 721 \centering 722 \includegraphics[width=0.66\textwidth]{Fig_OBS_avg_rad} 723 \caption[Observational weights with a radial footprint]{ 724 Weights associated with each model grid box (blue lines and numbers) 725 for an observation at -170.5\deg{E}, 56.0\deg{N} with a radial footprint with diameter 1\deg.} 726 \label{fig:OBS_avgrad} 718 727 \end{figure} 719 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 720 721 728 729 %% ================================================================================================= 722 730 \subsection{Grid search} 723 731 … … 756 764 ({\phi_{}}_{\mathrm D} \; - \; {\phi_{}}_{\mathrm P} )] \; \widehat{\mathbf k} \\ 757 765 \end{array} 758 % \label{eq: cross}766 % \label{eq:OBS_cross} 759 767 \end{align*} 760 768 point in the opposite direction to the unit normal $\widehat{\mathbf k}$ … … 770 778 the $i$ and $j$ ranges of this point searched to determine the precise four points surrounding the observation. 771 779 780 %% ================================================================================================= 772 781 \subsection{Parallel aspects of horizontal interpolation} 773 782 \label{subsec:OBS_parallel} … … 784 793 and 2) round-robin. 785 794 795 %% ================================================================================================= 786 796 \subsubsection{Geographical distribution of observations among processors} 787 797 788 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>789 798 \begin{figure} 790 \begin{center} 791 \includegraphics[width=\textwidth]{Fig_ASM_obsdist_local} 792 \caption{ 793 \protect\label{fig:obslocal} 794 Example of the distribution of observations with the geographical distribution of observational data. 795 } 796 \end{center} 799 \centering 800 \includegraphics[width=0.66\textwidth]{Fig_ASM_obsdist_local} 801 \caption[Observations with the geographical distribution]{ 802 Example of the distribution of observations with 803 the geographical distribution of observational data} 804 \label{fig:OBS_local} 797 805 \end{figure} 798 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>799 806 800 807 This is the simplest option in which the observations are distributed according to 801 808 the domain of the grid-point parallelization. 802 \autoref{fig: obslocal} shows an example of the distribution of the {\em in situ} data on processors with809 \autoref{fig:OBS_local} shows an example of the distribution of the {\em in situ} data on processors with 803 810 a different colour for each observation on a given processor for a 4 $\times$ 2 decomposition with ORCA2. 804 811 The grid-point domain decomposition is clearly visible on the plot. … … 813 820 this could lead to load imbalance. 814 821 822 %% ================================================================================================= 815 823 \subsubsection{Round-robin distribution of observations among processors} 816 824 817 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>818 825 \begin{figure} 819 \begin{center} 820 \includegraphics[width=\textwidth]{Fig_ASM_obsdist_global} 821 \caption{ 822 \protect\label{fig:obsglobal} 823 Example of the distribution of observations with the round-robin distribution of observational data. 824 } 825 \end{center} 826 \centering 827 \includegraphics[width=0.66\textwidth]{Fig_ASM_obsdist_global} 828 \caption[Observations with the round-robin distribution]{ 829 Example of the distribution of observations with 830 the round-robin distribution of observational data.} 831 \label{fig:OBS_global} 826 832 \end{figure} 827 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>828 833 829 834 An alternative approach is to distribute the observations equally among processors and 830 835 use message passing in order to retrieve the stencil for interpolation. 831 836 The simplest distribution of the observations is to distribute them using a round-robin scheme. 832 \autoref{fig: obsglobal} shows the distribution of the {\em in situ} data on processors for837 \autoref{fig:OBS_global} shows the distribution of the {\em in situ} data on processors for 833 838 the round-robin distribution of observations with a different colour for each observation on a given processor for 834 a 4 $\times$ 2 decomposition with ORCA2 for the same input data as in \autoref{fig: obslocal}.839 a 4 $\times$ 2 decomposition with ORCA2 for the same input data as in \autoref{fig:OBS_local}. 835 840 The observations are now clearly randomly distributed on the globe. 836 841 In order to be able to perform horizontal interpolation in this case, 837 842 a subroutine has been developed that retrieves any grid points in the global space. 838 843 844 %% ================================================================================================= 839 845 \subsection{Vertical interpolation operator} 840 846 … … 846 852 For profile observation types we do both vertical and horizontal interpolation. \NEMO\ has a generalised vertical coordinate system this means the vertical level depths can vary with location. Therefore, it is necessary first to perform vertical interpolation of the model value to the observation depths for each of the four surrounding grid points. After this the model values, at these points, at the observation depth, are horizontally interpolated to the observation location. 847 853 848 \newpage849 850 % ================================================================851 % Standalone observation operator documentation852 % ================================================================853 854 854 %\usepackage{framed} 855 855 856 %% ================================================================================================= 856 857 \section{Standalone observation operator} 857 858 \label{sec:OBS_sao} 858 859 860 %% ================================================================================================= 859 861 \subsection{Concept} 860 862 … … 873 875 By forecast, we mean any method which produces an estimate of physical reality which is not an observed value. 874 876 875 %--------------------------------------------------------------------------------------------------------876 877 % sao.exe 877 %-------------------------------------------------------------------------------------------------------- 878 878 879 %% ================================================================================================= 879 880 \subsection{Using the standalone observation operator} 880 881 882 %% ================================================================================================= 881 883 \subsubsection{Building} 882 884 … … 886 888 Note this a similar approach to that taken by the standalone surface scheme \emph{SAS\_SRC} and the offline TOP model \emph{OFF\_SRC}. 887 889 888 %--------------------------------------------------------------------------------------------------------889 890 % Running 890 % --------------------------------------------------------------------------------------------------------891 %% ================================================================================================= 891 892 \subsubsection{Running} 892 893 … … 894 895 a full \NEMO\ namelist and then to run the executable as if it were nemo.exe. 895 896 896 %--------------------------------------------------------------------------------------------------------897 897 % Configuration section 898 % --------------------------------------------------------------------------------------------------------898 %% ================================================================================================= 899 899 \subsection{Configuring the standalone observation operator} 900 The observation files and settings understood by \nam{obs} have been outlined in the online observation operator section. 901 In addition is a further namelist \nam{sao} which used to set the input model fields for the SAO 902 900 The observation files and settings understood by \nam{obs}{obs} have been outlined in the online observation operator section. 901 In addition is a further namelist \nam{sao}{sao} which used to set the input model fields for the SAO 902 903 %% ================================================================================================= 903 904 \subsubsection{Single field} 904 905 … … 909 910 \textbf{votemper}, \textbf{vosaline} and optionally \textbf{sshn} present. 910 911 911 For each field read there must be an entry in the \nam{sao} namelist specifying912 For each field read there must be an entry in the \nam{sao}{sao} namelist specifying 912 913 the name of the file to read and the index along the \emph{time\_counter}. 913 914 For example, to read the second time counter from a single file the namelist would be. … … 925 926 \end{forlines} 926 927 928 %% ================================================================================================= 927 929 \subsubsection{Multiple fields per run} 928 930 … … 960 962 This approach is referred to as \emph{Class 4} since it is the fourth metric defined by the GODAE intercomparison project. This requires multiple runs of the SAO and running an additional utility (not currently in the \NEMO\ repository) to combine the feedback files into one class 4 file. 961 963 962 \newpage 963 964 %% ================================================================================================= 964 965 \section{Observation utilities} 965 966 \label{sec:OBS_obsutils} … … 967 968 For convenience some tools for viewing and processing of observation and feedback files are provided in 968 969 the \NEMO\ repository. 969 These tools include OBSTOOLS which are a collection of \fortran programs which are helpful to deal with feedback files.970 These tools include OBSTOOLS which are a collection of \fortran\ programs which are helpful to deal with feedback files. 970 971 They do such tasks as observation file conversion, printing of file contents, 971 972 some basic statistical analysis of feedback files. … … 974 975 OBSTOOLS and dataplot are described in more detail below. 975 976 977 %% ================================================================================================= 976 978 \subsection{Obstools} 977 979 978 A series of \fortran utilities is provided with \NEMO\ called OBSTOOLS.980 A series of \fortran\ utilities is provided with \NEMO\ called OBSTOOLS. 979 981 This are helpful in handling observation files and the feedback file output from the observation operator. A brief description of some of the utilities follows 980 982 983 %% ================================================================================================= 981 984 \subsubsection{corio2fb} 982 985 … … 988 991 \end{cmds} 989 992 993 %% ================================================================================================= 990 994 \subsubsection{enact2fb} 991 995 … … 997 1001 \end{cmds} 998 1002 1003 %% ================================================================================================= 999 1004 \subsubsection{fbcomb} 1000 1005 … … 1007 1012 \end{cmds} 1008 1013 1014 %% ================================================================================================= 1009 1015 \subsubsection{fbmatchup} 1010 1016 … … 1016 1022 \end{cmds} 1017 1023 1024 %% ================================================================================================= 1018 1025 \subsubsection{fbprint} 1019 1026 … … 1044 1051 \end{cmds} 1045 1052 1053 %% ================================================================================================= 1046 1054 \subsubsection{fbsel} 1047 1055 … … 1053 1061 \end{cmds} 1054 1062 1063 %% ================================================================================================= 1055 1064 \subsubsection{fbstat} 1056 1065 … … 1062 1071 \end{cmds} 1063 1072 1073 %% ================================================================================================= 1064 1074 \subsubsection{fbthin} 1065 1075 … … 1072 1082 \end{cmds} 1073 1083 1084 %% ================================================================================================= 1074 1085 \subsubsection{sla2fb} 1075 1086 … … 1084 1095 \end{cmds} 1085 1096 1097 %% ================================================================================================= 1086 1098 \subsubsection{vel2fb} 1087 1099 … … 1093 1105 \end{cmds} 1094 1106 1107 %% ================================================================================================= 1095 1108 \subsection{Building the obstools} 1096 1109 1097 1110 To build the obstools use in the tools directory use ./maketools -n OBSTOOLS -m [ARCH]. 1098 1111 1112 %% ================================================================================================= 1099 1113 \subsection{Dataplot} 1100 1114 … … 1118 1132 \end{minted} 1119 1133 1120 \autoref{fig: obsdataplotmain} shows the main window which is launched when dataplot starts.1134 \autoref{fig:OBS_dataplotmain} shows the main window which is launched when dataplot starts. 1121 1135 This is split into three parts. 1122 1136 At the top there is a menu bar which contains a variety of drop down menus. … … 1148 1162 The rightmost group of buttons will print the plot window as a postscript, save it as png, or exit from dataplot. 1149 1163 1150 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>1151 1164 \begin{figure} 1152 \begin{center} 1153 % \includegraphics[width=\textwidth]{Fig_OBS_dataplot_main} 1154 \includegraphics[width=\textwidth]{Fig_OBS_dataplot_main} 1155 \caption{ 1156 \protect\label{fig:obsdataplotmain} 1157 Main window of dataplot. 1158 } 1159 \end{center} 1165 \centering 1166 \includegraphics[width=0.66\textwidth]{Fig_OBS_dataplot_main} 1167 \caption{Main window of dataplot} 1168 \label{fig:OBS_dataplotmain} 1160 1169 \end{figure} 1161 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>1162 1170 1163 1171 If a profile point is clicked with the mouse button a plot of the observation and background values as 1164 a function of depth (\autoref{fig:obsdataplotprofile}). 1165 1166 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1172 a function of depth (\autoref{fig:OBS_dataplotprofile}). 1173 1167 1174 \begin{figure} 1168 \begin{center} 1169 % \includegraphics[width=\textwidth]{Fig_OBS_dataplot_prof} 1170 \includegraphics[width=\textwidth]{Fig_OBS_dataplot_prof} 1171 \caption{ 1172 \protect\label{fig:obsdataplotprofile} 1173 Profile plot from dataplot produced by right clicking on a point in the main window. 1174 } 1175 \end{center} 1175 \centering 1176 \includegraphics[width=0.66\textwidth]{Fig_OBS_dataplot_prof} 1177 \caption[Profile plot from dataplot]{ 1178 Profile plot from dataplot produced by right clicking on a point in the main window} 1179 \label{fig:OBS_dataplotprofile} 1176 1180 \end{figure} 1177 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1178 1179 \biblio 1180 1181 \pindex 1181 1182 \onlyinsubfile{\input{../../global/epilogue}} 1182 1183 1183 1184 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_SBC.tex
r11435 r11799 3 3 \begin{document} 4 4 5 % ================================================================6 % Chapter —— Surface Boundary Condition (SBC, SAS, ISF, ICB)7 % ================================================================8 5 \chapter{Surface Boundary Condition (SBC, SAS, ISF, ICB)} 9 6 \label{chap:SBC} 7 8 \thispagestyle{plain} 9 10 10 \chaptertoc 11 11 12 \newpage 13 14 %---------------------------------------namsbc-------------------------------------------------- 15 16 \nlst{namsbc} 17 %-------------------------------------------------------------------------------------------------------------- 12 \paragraph{Changes record} ~\\ 13 14 {\footnotesize 15 \begin{tabularx}{\textwidth}{l||X|X} 16 Release & Author(s) & Modifications \\ 17 \hline 18 {\em 4.0} & {\em ...} & {\em ...} \\ 19 {\em 3.6} & {\em ...} & {\em ...} \\ 20 {\em 3.4} & {\em ...} & {\em ...} \\ 21 {\em <=3.4} & {\em ...} & {\em ...} 22 \end{tabularx} 23 } 24 25 \clearpage 26 27 \begin{listing} 28 \nlst{namsbc} 29 \caption{\forcode{&namsbc}} 30 \label{lst:namsbc} 31 \end{listing} 18 32 19 33 The ocean needs seven fields as surface boundary condition: 20 34 21 35 \begin{itemize} 22 \item 23 the two components of the surface ocean stress $\left( {\tau_u \;,\;\tau_v} \right)$ 24 \item 25 the incoming solar and non solar heat fluxes $\left( {Q_{ns} \;,\;Q_{sr} } \right)$ 26 \item 27 the surface freshwater budget $\left( {\textit{emp}} \right)$ 28 \item 29 the surface salt flux associated with freezing/melting of seawater $\left( {\textit{sfx}} \right)$ 30 \item 31 the atmospheric pressure at the ocean surface $\left( p_a \right)$ 36 \item the two components of the surface ocean stress $\left( {\tau_u \;,\;\tau_v} \right)$ 37 \item the incoming solar and non solar heat fluxes $\left( {Q_{ns} \;,\;Q_{sr} } \right)$ 38 \item the surface freshwater budget $\left( {\textit{emp}} \right)$ 39 \item the surface salt flux associated with freezing/melting of seawater $\left( {\textit{sfx}} \right)$ 40 \item the atmospheric pressure at the ocean surface $\left( p_a \right)$ 32 41 \end{itemize} 33 42 34 43 Four different ways are available to provide the seven fields to the ocean. They are controlled by 35 namelist \nam{sbc} variables:44 namelist \nam{sbc}{sbc} variables: 36 45 37 46 \begin{itemize} 38 \item 39 a bulk formulation (\np{ln\_blk}\forcode{ = .true.} with four possible bulk algorithms), 40 \item 41 a flux formulation (\np{ln\_flx}\forcode{ = .true.}), 42 \item 43 a coupled or mixed forced/coupled formulation (exchanges with a atmospheric model via the OASIS coupler), 44 (\np{ln\_cpl} or \np{ln\_mixcpl}\forcode{ = .true.}), 45 \item 46 a user defined formulation (\np{ln\_usr}\forcode{ = .true.}). 47 \item a bulk formulation (\np[=.true.]{ln_blk}{ln\_blk} with four possible bulk algorithms), 48 \item a flux formulation (\np[=.true.]{ln_flx}{ln\_flx}), 49 \item a coupled or mixed forced/coupled formulation (exchanges with a atmospheric model via the OASIS coupler), 50 (\np{ln_cpl}{ln\_cpl} or \np[=.true.]{ln_mixcpl}{ln\_mixcpl}), 51 \item a user defined formulation (\np[=.true.]{ln_usr}{ln\_usr}). 47 52 \end{itemize} 48 53 49 The frequency at which the forcing fields have to be updated is given by the \np{nn \_fsbc} namelist parameter.54 The frequency at which the forcing fields have to be updated is given by the \np{nn_fsbc}{nn\_fsbc} namelist parameter. 50 55 51 56 When the fields are supplied from data files (bulk, flux and mixed formulations), … … 61 66 62 67 \begin{itemize} 63 \item 64 the rotation of vector components supplied relative to an east-north coordinate system onto 68 \item the rotation of vector components supplied relative to an east-north coordinate system onto 65 69 the local grid directions in the model, 66 \item 67 the use of a land/sea mask for input fields (\np{nn\_lsm}\forcode{ = .true.}), 68 \item 69 the addition of a surface restoring term to observed SST and/or SSS (\np{ln\_ssr}\forcode{ = .true.}), 70 \item 71 the modification of fluxes below ice-covered areas (using climatological ice-cover or a sea-ice model) 72 (\np{nn\_ice}\forcode{ = 0..3}), 73 \item 74 the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln\_rnf}\forcode{ = .true.}), 75 \item 76 the addition of ice-shelf melting as lateral inflow (parameterisation) or 77 as fluxes applied at the land-ice ocean interface (\np{ln\_isf}\forcode{ = .true.}), 78 \item 79 the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift 80 (\np{nn\_fwb}\forcode{ = 0..2}), 81 \item 82 the transformation of the solar radiation (if provided as daily mean) into an analytical diurnal cycle 83 (\np{ln\_dm2dc}\forcode{ = .true.}), 84 \item 85 the activation of wave effects from an external wave model (\np{ln\_wave}\forcode{ = .true.}), 86 \item 87 a neutral drag coefficient is read from an external wave model (\np{ln\_cdgw}\forcode{ = .true.}), 88 \item 89 the Stokes drift from an external wave model is accounted for (\np{ln\_sdw}\forcode{ = .true.}), 90 \item 91 the choice of the Stokes drift profile parameterization (\np{nn\_sdrift}\forcode{ = 0..2}), 92 \item 93 the surface stress given to the ocean is modified by surface waves (\np{ln\_tauwoc}\forcode{ = .true.}), 94 \item 95 the surface stress given to the ocean is read from an external wave model (\np{ln\_tauw}\forcode{ = .true.}), 96 \item 97 the Stokes-Coriolis term is included (\np{ln\_stcor}\forcode{ = .true.}), 98 \item 99 the light penetration in the ocean (\np{ln\_traqsr}\forcode{ = .true.} with namelist \nam{tra\_qsr}), 100 \item 101 the atmospheric surface pressure gradient effect on ocean and ice dynamics (\np{ln\_apr\_dyn}\forcode{ = .true.} with namelist \nam{sbc\_apr}), 102 \item 103 the effect of sea-ice pressure on the ocean (\np{ln\_ice\_embd}\forcode{ = .true.}). 70 \item the use of a land/sea mask for input fields (\np[=.true.]{nn_lsm}{nn\_lsm}), 71 \item the addition of a surface restoring term to observed SST and/or SSS (\np[=.true.]{ln_ssr}{ln\_ssr}), 72 \item the modification of fluxes below ice-covered areas (using climatological ice-cover or a sea-ice model) 73 (\np[=0..3]{nn_ice}{nn\_ice}), 74 \item the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np[=.true.]{ln_rnf}{ln\_rnf}), 75 \item the addition of ice-shelf melting as lateral inflow (parameterisation) or 76 as fluxes applied at the land-ice ocean interface (\np[=.true.]{ln_isf}{ln\_isf}), 77 \item the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift 78 (\np[=0..2]{nn_fwb}{nn\_fwb}), 79 \item the transformation of the solar radiation (if provided as daily mean) into an analytical diurnal cycle 80 (\np[=.true.]{ln_dm2dc}{ln\_dm2dc}), 81 \item the activation of wave effects from an external wave model (\np[=.true.]{ln_wave}{ln\_wave}), 82 \item a neutral drag coefficient is read from an external wave model (\np[=.true.]{ln_cdgw}{ln\_cdgw}), 83 \item the Stokes drift from an external wave model is accounted for (\np[=.true.]{ln_sdw}{ln\_sdw}), 84 \item the choice of the Stokes drift profile parameterization (\np[=0..2]{nn_sdrift}{nn\_sdrift}), 85 \item the surface stress given to the ocean is modified by surface waves (\np[=.true.]{ln_tauwoc}{ln\_tauwoc}), 86 \item the surface stress given to the ocean is read from an external wave model (\np[=.true.]{ln_tauw}{ln\_tauw}), 87 \item the Stokes-Coriolis term is included (\np[=.true.]{ln_stcor}{ln\_stcor}), 88 \item the light penetration in the ocean (\np[=.true.]{ln_traqsr}{ln\_traqsr} with namelist \nam{tra_qsr}{tra\_qsr}), 89 \item the atmospheric surface pressure gradient effect on ocean and ice dynamics (\np[=.true.]{ln_apr_dyn}{ln\_apr\_dyn} with namelist \nam{sbc_apr}{sbc\_apr}), 90 \item the effect of sea-ice pressure on the ocean (\np[=.true.]{ln_ice_embd}{ln\_ice\_embd}). 104 91 \end{itemize} 105 92 … … 109 96 Next, the scheme for interpolation on the fly is described. 110 97 Finally, the different options that further modify the fluxes applied to the ocean are discussed. 111 One of these is modification by icebergs (see \autoref{sec: ICB_icebergs}),98 One of these is modification by icebergs (see \autoref{sec:SBC_ICB_icebergs}), 112 99 which act as drifting sources of fresh water. 113 100 Another example of modification is that due to the ice shelf melting/freezing (see \autoref{sec:SBC_isf}), 114 101 which provides additional sources of fresh water. 115 102 116 117 118 % ================================================================ 119 % Surface boundary condition for the ocean 120 % ================================================================ 103 %% ================================================================================================= 121 104 \section{Surface boundary condition for the ocean} 122 105 \label{sec:SBC_ocean} … … 124 107 The surface ocean stress is the stress exerted by the wind and the sea-ice on the ocean. 125 108 It is applied in \mdl{dynzdf} module as a surface boundary condition of the computation of 126 the momentum vertical mixing trend (see \autoref{eq: dynzdf_sbc} in \autoref{sec:DYN_zdf}).109 the momentum vertical mixing trend (see \autoref{eq:DYN_zdf_sbc} in \autoref{sec:DYN_zdf}). 127 110 As such, it has to be provided as a 2D vector interpolated onto the horizontal velocity ocean mesh, 128 111 \ie\ resolved onto the model (\textbf{i},\textbf{j}) direction at $u$- and $v$-points. … … 135 118 It is applied in \mdl{trasbc} module as a surface boundary condition trend of 136 119 the first level temperature time evolution equation 137 (see \autoref{eq: tra_sbc} and \autoref{eq:tra_sbc_lin} in \autoref{subsec:TRA_sbc}).120 (see \autoref{eq:TRA_sbc} and \autoref{eq:TRA_sbc_lin} in \autoref{subsec:TRA_sbc}). 138 121 The latter is the penetrative part of the heat flux. 139 122 It is applied as a 3D trend of the temperature equation (\mdl{traqsr} module) when 140 \np {ln\_traqsr}\forcode{ = .true.}.123 \np[=.true.]{ln_traqsr}{ln\_traqsr}. 141 124 The way the light penetrates inside the water column is generally a sum of decreasing exponentials 142 125 (see \autoref{subsec:TRA_qsr}). … … 151 134 the mass exchanged with atmosphere, sea-ice and ice shelves. 152 135 153 154 136 %\colorbox{yellow}{Miss: } 155 %156 137 %A extensive description of all namsbc namelist (parameter that have to be 157 138 %created!) 158 % 159 %Especially the \np{nn\_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu 139 %Especially the \np{nn_fsbc}{nn\_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu 160 140 %ssv) \ie\ information required by flux computation or sea-ice 161 %162 141 %\mdl{sbc\_oce} containt the definition in memory of the 7 fields (6+runoff), add 163 142 %a word on runoff: included in surface bc or add as lateral obc{\ldots}. 164 %165 143 %Sbcmod manage the ``providing'' (fourniture) to the ocean the 7 fields 166 %167 144 %Fluxes update only each nf\_sbc time step (namsbc) explain relation 168 145 %between nf\_sbc and nf\_ice, do we define nf\_blk??? ? only one 169 146 %nf\_sbc 170 %171 147 %Explain here all the namlist namsbc variable{\ldots}. 172 %173 148 % explain : use or not of surface currents 174 %175 149 %\colorbox{yellow}{End Miss } 176 150 177 151 The ocean model provides, at each time step, to the surface module (\mdl{sbcmod}) 178 152 the surface currents, temperature and salinity. 179 These variables are averaged over \np{nn\_fsbc} time-step (\autoref{tab:ssm}), and 180 these averaged fields are used to compute the surface fluxes at the frequency of \np{nn\_fsbc} time-steps. 181 182 183 %-------------------------------------------------TABLE--------------------------------------------------- 153 These variables are averaged over \np{nn_fsbc}{nn\_fsbc} time-step (\autoref{tab:SBC_ssm}), and 154 these averaged fields are used to compute the surface fluxes at the frequency of \np{nn_fsbc}{nn\_fsbc} time-steps. 155 184 156 \begin{table}[tb] 185 \begin{center} 186 \begin{tabular}{|l|l|l|l|} 187 \hline 188 Variable description & Model variable & Units & point \\\hline 189 i-component of the surface current & ssu\_m & $m.s^{-1}$ & U \\\hline 190 j-component of the surface current & ssv\_m & $m.s^{-1}$ & V \\ \hline 191 Sea surface temperature & sst\_m & \r{}$K$ & T \\\hline 192 Sea surface salinty & sss\_m & $psu$ & T \\ \hline 193 \end{tabular} 194 \caption{ 195 \protect\label{tab:ssm} 196 Ocean variables provided by the ocean to the surface module (SBC). 197 The variable are averaged over \np{nn\_fsbc} time-step, 198 \ie\ the frequency of computation of surface fluxes. 199 } 200 \end{center} 157 \centering 158 \begin{tabular}{|l|l|l|l|} 159 \hline 160 Variable description & Model variable & Units & point \\ 161 \hline 162 i-component of the surface current & ssu\_m & $m.s^{-1}$ & U \\ 163 \hline 164 j-component of the surface current & ssv\_m & $m.s^{-1}$ & V \\ 165 \hline 166 Sea surface temperature & sst\_m & \r{}$K$ & T \\\hline 167 Sea surface salinty & sss\_m & $psu$ & T \\ \hline 168 \end{tabular} 169 \caption[Ocean variables provided to the surface module)]{ 170 Ocean variables provided to the surface module (\texttt{SBC}). 171 The variable are averaged over \protect\np{nn_fsbc}{nn\_fsbc} time-step, 172 \ie\ the frequency of computation of surface fluxes.} 173 \label{tab:SBC_ssm} 201 174 \end{table} 202 %--------------------------------------------------------------------------------------------------------------203 175 204 176 %\colorbox{yellow}{Penser a} mettre dans le restant l'info nn\_fsbc ET nn\_fsbc*rdt de sorte de reinitialiser la moyenne si on change la frequence ou le pdt 205 177 206 207 208 % ================================================================ 209 % Input Data 210 % ================================================================ 178 %% ================================================================================================= 211 179 \section{Input data generic interface} 212 180 \label{sec:SBC_input} … … 217 185 The module is designed with four main objectives in mind: 218 186 \begin{enumerate} 219 \item 220 optionally provide a time interpolation of the input data every specified model time-step, whatever their input frequency is, 187 \item optionally provide a time interpolation of the input data every specified model time-step, whatever their input frequency is, 221 188 and according to the different calendars available in the model. 222 \item 223 optionally provide an on-the-fly space interpolation from the native input data grid to the model grid. 224 \item 225 make the run duration independent from the period cover by the input files. 226 \item 227 provide a simple user interface and a rather simple developer interface by 189 \item optionally provide an on-the-fly space interpolation from the native input data grid to the model grid. 190 \item make the run duration independent from the period cover by the input files. 191 \item provide a simple user interface and a rather simple developer interface by 228 192 limiting the number of prerequisite informations. 229 193 \end{enumerate} … … 242 206 243 207 Note that when an input data is archived on a disc which is accessible directly from the workspace where 244 the code is executed, then the user can set the \np{cn \_dir} to the pathway leading to the data.208 the code is executed, then the user can set the \np{cn_dir}{cn\_dir} to the pathway leading to the data. 245 209 By default, the data are assumed to be in the same directory as the executable, so that cn\_dir='./'. 246 210 247 248 % ------------------------------------------------------------------------------------------------------------- 249 % Input Data specification (\mdl{fldread}) 250 % ------------------------------------------------------------------------------------------------------------- 251 \subsection[Input data specification (\textit{fldread.F90})] 252 {Input data specification (\protect\mdl{fldread})} 211 %% ================================================================================================= 212 \subsection[Input data specification (\textit{fldread.F90})]{Input data specification (\protect\mdl{fldread})} 253 213 \label{subsec:SBC_fldread} 254 214 … … 260 220 where 261 221 \begin{description} 262 \item[File name]: 263 the stem name of the NetCDF file to be opened. 222 \item [File name]: the stem name of the NetCDF file to be opened. 264 223 This stem will be completed automatically by the model, with the addition of a '.nc' at its end and 265 224 by date information and possibly a prefix (when using AGRIF). 266 \autoref{tab: fldread} provides the resulting file name in all possible cases according to225 \autoref{tab:SBC_fldread} provides the resulting file name in all possible cases according to 267 226 whether it is a climatological file or not, and to the open/close frequency (see below for definition). 268 269 %--------------------------------------------------TABLE--------------------------------------------------270 227 \begin{table}[htbp] 271 \begin{center} 272 \begin{tabular}{|l|c|c|c|} 273 \hline 274 & daily or weekLL & monthly & yearly \\ \hline 275 \np{clim}\forcode{ = .false.} & fn\_yYYYYmMMdDD.nc & fn\_yYYYYmMM.nc & fn\_yYYYY.nc \\ \hline 276 \np{clim}\forcode{ = .true.} & not possible & fn\_m??.nc & fn \\ \hline 277 \end{tabular} 278 \end{center} 279 \caption{ 280 \protect\label{tab:fldread} 281 naming nomenclature for climatological or interannual input file(s), as a function of the open/close frequency. 228 \centering 229 \begin{tabular}{|l|c|c|c|} 230 \hline 231 & daily or weekLL & monthly & yearly \\ 232 \hline 233 \np[=.false.]{clim}{clim} & fn\_yYYYYmMMdDD.nc & fn\_yYYYYmMM.nc & fn\_yYYYY.nc \\ 234 \hline 235 \np[=.true.]{clim}{clim} & not possible & fn\_m??.nc & fn \\ 236 \hline 237 \end{tabular} 238 \caption[Naming nomenclature for climatological or interannual input file]{ 239 Naming nomenclature for climatological or interannual input file, 240 as a function of the open/close frequency. 282 241 The stem name is assumed to be 'fn'. 283 242 For weekly files, the 'LLL' corresponds to the first three letters of the first day of the week 284 243 (\ie\ 'sun','sat','fri','thu','wed','tue','mon'). 285 The 'YYYY', 'MM' and 'DD' should be replaced by the actual year/month/day, always coded with 4 or 2 digits. 286 Note that (1) in mpp, if the file is split over each subdomain, the suffix '.nc' is replaced by '\_PPPP.nc', 244 The 'YYYY', 'MM' and 'DD' should be replaced by the actual year/month/day, 245 always coded with 4 or 2 digits. 246 Note that (1) in mpp, if the file is split over each subdomain, 247 the suffix '.nc' is replaced by '\_PPPP.nc', 287 248 where 'PPPP' is the process number coded with 4 digits; 288 249 (2) when using AGRIF, the prefix '\_N' is added to files, where 'N' is the child grid number. 289 250 } 251 \label{tab:SBC_fldread} 290 252 \end{table} 291 %-------------------------------------------------------------------------------------------------------------- 292 293 294 \item[Record frequency]: 295 the frequency of the records contained in the input file. 253 \item [Record frequency]: the frequency of the records contained in the input file. 296 254 Its unit is in hours if it is positive (for example 24 for daily forcing) or in months if negative 297 255 (for example -1 for monthly forcing or -12 for annual forcing). 298 256 Note that this frequency must REALLY be an integer and not a real. 299 257 On some computers, setting it to '24.' can be interpreted as 240! 300 301 \item[Variable name]: 302 the name of the variable to be read in the input NetCDF file. 303 304 \item[Time interpolation]: 305 a logical to activate, or not, the time interpolation. 258 \item [Variable name]: the name of the variable to be read in the input NetCDF file. 259 \item [Time interpolation]: a logical to activate, or not, the time interpolation. 306 260 If set to 'false', the forcing will have a steplike shape remaining constant during each forcing period. 307 261 For example, when using a daily forcing without time interpolation, the forcing remaining constant from … … 311 265 For example, when using a daily forcing with time interpolation, 312 266 linear interpolation will be performed between mid-day of two consecutive days. 313 314 \item[Climatological forcing]: 315 a logical to specify if a input file contains climatological forcing which can be cycle in time, 267 \item [Climatological forcing]: a logical to specify if a input file contains climatological forcing which can be cycle in time, 316 268 or an interannual forcing which will requires additional files if 317 269 the period covered by the simulation exceeds the one of the file. 318 270 See the above file naming strategy which impacts the expected name of the file to be opened. 319 320 \item[Open/close frequency]: 321 the frequency at which forcing files must be opened/closed. 271 \item [Open/close frequency]: the frequency at which forcing files must be opened/closed. 322 272 Four cases are coded: 323 273 'daily', 'weekLLL' (with 'LLL' the first 3 letters of the first day of the week), 'monthly' and 'yearly' which … … 326 276 For example, the first record of a yearly file containing daily data is Jan 1st even if 327 277 the experiment is not starting at the beginning of the year. 328 329 \item[Others]: 330 'weights filename', 'pairing rotation' and 'land/sea mask' are associated with 278 \item [Others]: 'weights filename', 'pairing rotation' and 'land/sea mask' are associated with 331 279 on-the-fly interpolation which is described in \autoref{subsec:SBC_iof}. 332 333 280 \end{description} 334 281 … … 341 288 a time interpolation will be performed at the following time: 0h30'00", 1h30'00", 2h30'00", etc. 342 289 However, for forcing data related to the surface module, 343 values are not needed at every time-step but at every \np{nn \_fsbc} time-step.344 For example with \np {nn\_fsbc}\forcode{ = 3}, the surface module will be called at time-steps 1, 4, 7, etc.345 The date used for the time interpolation is thus redefined to the middle of \np{nn \_fsbc} time-step period.290 values are not needed at every time-step but at every \np{nn_fsbc}{nn\_fsbc} time-step. 291 For example with \np[=3]{nn_fsbc}{nn\_fsbc}, the surface module will be called at time-steps 1, 4, 7, etc. 292 The date used for the time interpolation is thus redefined to the middle of \np{nn_fsbc}{nn\_fsbc} time-step period. 346 293 In the previous example, this leads to: 1h30'00", 4h30'00", 7h30'00", etc. \\ 347 294 (2) For code readablility and maintenance issues, we don't take into account the NetCDF input file calendar. … … 368 315 a useful feature for user considering that it is too heavy to manipulate the complete file for year Y-1. 369 316 370 371 % ------------------------------------------------------------------------------------------------------------- 372 % Interpolation on the Fly 373 % ------------------------------------------------------------------------------------------------------------- 317 %% ================================================================================================= 374 318 \subsection{Interpolation on-the-fly} 375 319 \label{subsec:SBC_iof} … … 394 338 Note that nn\_lsm=0 forces the code to not apply the procedure, even if a land/sea mask file is supplied. 395 339 396 397 % ------------------------------------------------------------------------------------------------------------- 398 % Bilinear interpolation 399 % ------------------------------------------------------------------------------------------------------------- 340 %% ================================================================================================= 400 341 \subsubsection{Bilinear interpolation} 401 342 \label{subsec:SBC_iof_bilinear} … … 419 360 and wgt(1) corresponds to variable "wgt01" for example. 420 361 421 422 % ------------------------------------------------------------------------------------------------------------- 423 % Bicubic interpolation 424 % ------------------------------------------------------------------------------------------------------------- 362 %% ================================================================================================= 425 363 \subsubsection{Bicubic interpolation} 426 364 \label{subsec:SBC_iof_bicubic} … … 441 379 the spatial dependency has been included into the weights. 442 380 443 444 % ------------------------------------------------------------------------------------------------------------- 445 % Implementation 446 % ------------------------------------------------------------------------------------------------------------- 381 %% ================================================================================================= 447 382 \subsubsection{Implementation} 448 383 \label{subsec:SBC_iof_imp} … … 480 415 or is a copy of one from the first few columns on the opposite side of the grid (cyclical case). 481 416 482 483 % ------------------------------------------------------------------------------------------------------------- 484 % Limitations 485 % ------------------------------------------------------------------------------------------------------------- 417 %% ================================================================================================= 486 418 \subsubsection{Limitations} 487 419 \label{subsec:SBC_iof_lim} 488 420 489 421 \begin{enumerate} 490 \item 491 The case where input data grids are not logically rectangular (irregular grid case) has not been tested. 492 \item 493 This code is not guaranteed to produce positive definite answers from positive definite inputs when 422 \item The case where input data grids are not logically rectangular (irregular grid case) has not been tested. 423 \item This code is not guaranteed to produce positive definite answers from positive definite inputs when 494 424 a bicubic interpolation method is used. 495 \item 496 The cyclic condition is only applied on left and right columns, and not to top and bottom rows. 497 \item 498 The gradients across the ends of a cyclical grid assume that the grid spacing between 425 \item The cyclic condition is only applied on left and right columns, and not to top and bottom rows. 426 \item The gradients across the ends of a cyclical grid assume that the grid spacing between 499 427 the two columns involved are consistent with the weights used. 500 \item 501 Neither interpolation scheme is conservative. (There is a conservative scheme available in SCRIP, 428 \item Neither interpolation scheme is conservative. (There is a conservative scheme available in SCRIP, 502 429 but this has not been implemented.) 503 430 \end{enumerate} 504 431 432 %% ================================================================================================= 505 433 \subsubsection{Utilities} 506 434 \label{subsec:SBC_iof_util} … … 510 438 (see the directory NEMOGCM/TOOLS/WEIGHTS). 511 439 512 513 % ------------------------------------------------------------------------------------------------------------- 514 % Standalone Surface Boundary Condition Scheme 515 % ------------------------------------------------------------------------------------------------------------- 440 %% ================================================================================================= 516 441 \subsection{Standalone surface boundary condition scheme (SAS)} 517 \label{subsec:SAS} 518 519 %---------------------------------------namsbc_sas-------------------------------------------------- 520 521 \nlst{namsbc_sas} 522 %-------------------------------------------------------------------------------------------------------------- 442 \label{subsec:SBC_SAS} 443 444 \begin{listing} 445 \nlst{namsbc_sas} 446 \caption{\forcode{&namsbc_sas}} 447 \label{lst:namsbc_sas} 448 \end{listing} 523 449 524 450 In some circumstances, it may be useful to avoid calculating the 3D temperature, … … 527 453 528 454 \begin{itemize} 529 \item 530 Multiple runs of the model are required in code development to 455 \item Multiple runs of the model are required in code development to 531 456 see the effect of different algorithms in the bulk formulae. 532 \item 533 The effect of different parameter sets in the ice model is to be examined. 534 \item 535 Development of sea-ice algorithms or parameterizations. 536 \item 537 Spinup of the iceberg floats 538 \item 539 Ocean/sea-ice simulation with both models running in parallel (\np{ln\_mixcpl}\forcode{ = .true.}) 457 \item The effect of different parameter sets in the ice model is to be examined. 458 \item Development of sea-ice algorithms or parameterizations. 459 \item Spinup of the iceberg floats 460 \item Ocean/sea-ice simulation with both models running in parallel (\np[=.true.]{ln_mixcpl}{ln\_mixcpl}) 540 461 \end{itemize} 541 462 542 463 The Standalone Surface scheme provides this capacity. 543 Its options are defined through the \nam{sbc \_sas} namelist variables.464 Its options are defined through the \nam{sbc_sas}{sbc\_sas} namelist variables. 544 465 A new copy of the model has to be compiled with a configuration based on ORCA2\_SAS\_LIM. 545 466 However, no namelist parameters need be changed from the settings of the previous run (except perhaps nn\_date0). … … 548 469 549 470 \begin{itemize} 550 \item 551 \mdl{nemogcm}: 552 This routine initialises the rest of the model and repeatedly calls the stp time stepping routine (\mdl{step}). 471 \item \mdl{nemogcm}: This routine initialises the rest of the model and repeatedly calls the stp time stepping routine (\mdl{step}). 553 472 Since the ocean state is not calculated all associated initialisations have been removed. 554 \item 555 \mdl{step}: 556 The main time stepping routine now only needs to call the sbc routine (and a few utility functions). 557 \item 558 \mdl{sbcmod}: 559 This has been cut down and now only calculates surface forcing and the ice model required. 473 \item \mdl{step}: The main time stepping routine now only needs to call the sbc routine (and a few utility functions). 474 \item \mdl{sbcmod}: This has been cut down and now only calculates surface forcing and the ice model required. 560 475 New surface modules that can function when only the surface level of the ocean state is defined can also be added 561 476 (\eg\ icebergs). 562 \item 563 \mdl{daymod}: 564 No ocean restarts are read or written (though the ice model restarts are retained), 477 \item \mdl{daymod}: No ocean restarts are read or written (though the ice model restarts are retained), 565 478 so calls to restart functions have been removed. 566 479 This also means that the calendar cannot be controlled by time in a restart file, 567 480 so the user must check that nn\_date0 in the model namelist is correct for his or her purposes. 568 \item 569 \mdl{stpctl}: 570 Since there is no free surface solver, references to it have been removed from \rou{stp\_ctl} module. 571 \item 572 \mdl{diawri}: 573 All 3D data have been removed from the output. 481 \item \mdl{stpctl}: Since there is no free surface solver, references to it have been removed from \rou{stp\_ctl} module. 482 \item \mdl{diawri}: All 3D data have been removed from the output. 574 483 The surface temperature, salinity and velocity components (which have been read in) are written along with 575 484 relevant forcing and ice data. … … 579 488 580 489 \begin{itemize} 581 \item 582 \mdl{sbcsas}: 583 This module initialises the input files needed for reading temperature, salinity and 490 \item \mdl{sbcsas}: This module initialises the input files needed for reading temperature, salinity and 584 491 velocity arrays at the surface. 585 492 These filenames are supplied in namelist namsbc\_sas. … … 590 497 \end{itemize} 591 498 592 593 The user can also choose in the \nam{sbc\_sas} namelist to read the mean (nn\_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level using 594 (\np{ln\_flx}\forcode{ = .true.}) and to provide 3D oceanic velocities instead of 2D ones (\np{ln\_flx}\forcode{ = .true.}). In that last case, only the 1st level will be read in. 595 596 597 598 % ================================================================ 599 % Flux formulation 600 % ================================================================ 601 \section[Flux formulation (\textit{sbcflx.F90})] 602 {Flux formulation (\protect\mdl{sbcflx})} 499 The user can also choose in the \nam{sbc_sas}{sbc\_sas} namelist to read the mean (nn\_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level using 500 (\np[=.true.]{ln_flx}{ln\_flx}) and to provide 3D oceanic velocities instead of 2D ones (\np{ln_flx}{ln\_flx}\forcode{=.true.}). In that last case, only the 1st level will be read in. 501 502 %% ================================================================================================= 503 \section[Flux formulation (\textit{sbcflx.F90})]{Flux formulation (\protect\mdl{sbcflx})} 603 504 \label{sec:SBC_flx} 604 %------------------------------------------namsbc_flx---------------------------------------------------- 605 606 \nlst{namsbc_flx} 607 %------------------------------------------------------------------------------------------------------------- 608 609 In the flux formulation (\np{ln\_flx}\forcode{ = .true.}), 505 506 \begin{listing} 507 \nlst{namsbc_flx} 508 \caption{\forcode{&namsbc_flx}} 509 \label{lst:namsbc_flx} 510 \end{listing} 511 512 In the flux formulation (\np[=.true.]{ln_flx}{ln\_flx}), 610 513 the surface boundary condition fields are directly read from input files. 611 The user has to define in the namelist \nam{sbc \_flx} the name of the file,514 The user has to define in the namelist \nam{sbc_flx}{sbc\_flx} the name of the file, 612 515 the name of the variable read in the file, the time frequency at which it is given (in hours), 613 516 and a logical setting whether a time interpolation to the model time step is required for this field. … … 617 520 See \autoref{subsec:SBC_ssr} for its specification. 618 521 619 620 621 % ================================================================ 622 % Bulk formulation 623 % ================================================================ 624 \section[Bulk formulation (\textit{sbcblk.F90})] 625 {Bulk formulation (\protect\mdl{sbcblk})} 522 %% ================================================================================================= 523 \section[Bulk formulation (\textit{sbcblk.F90})]{Bulk formulation (\protect\mdl{sbcblk})} 626 524 \label{sec:SBC_blk} 627 %---------------------------------------namsbc_blk-------------------------------------------------- 628 629 \nlst{namsbc_blk} 630 %-------------------------------------------------------------------------------------------------------------- 525 526 \begin{listing} 527 \nlst{namsbc_blk} 528 \caption{\forcode{&namsbc_blk}} 529 \label{lst:namsbc_blk} 530 \end{listing} 631 531 632 532 In the bulk formulation, the surface boundary condition fields are computed with bulk formulae using atmospheric fields 633 and ocean (and sea-ice) variables averaged over \np{nn \_fsbc} time-step.533 and ocean (and sea-ice) variables averaged over \np{nn_fsbc}{nn\_fsbc} time-step. 634 534 635 535 The atmospheric fields used depend on the bulk formulae used. … … 640 540 the NCAR (formerly named CORE), COARE 3.0, COARE 3.5 and ECMWF bulk formulae. 641 541 The choice is made by setting to true one of the following namelist variable: 642 \np{ln \_NCAR}, \np{ln\_COARE\_3p0}, \np{ln\_COARE\_3p5} and \np{ln\_ECMWF}.542 \np{ln_NCAR}{ln\_NCAR}, \np{ln_COARE_3p0}{ln\_COARE\_3p0}, \np{ln_COARE_3p5}{ln\_COARE\_3p5} and \np{ln_ECMWF}{ln\_ECMWF}. 643 543 For sea-ice, three possibilities can be selected: 644 a constant transfer coefficient (1.4e-3; default value), \citet{lupkes.gryanik.ea_JGR12} (\np{ln \_Cd\_L12}), and \citet{lupkes.gryanik_JGR15} (\np{ln\_Cd\_L15}) parameterizations645 646 Common options are defined through the \nam{sbc \_blk} namelist variables.544 a constant transfer coefficient (1.4e-3; default value), \citet{lupkes.gryanik.ea_JGR12} (\np{ln_Cd_L12}{ln\_Cd\_L12}), and \citet{lupkes.gryanik_JGR15} (\np{ln_Cd_L15}{ln\_Cd\_L15}) parameterizations 545 546 Common options are defined through the \nam{sbc_blk}{sbc\_blk} namelist variables. 647 547 The required 9 input fields are: 648 548 649 %--------------------------------------------------TABLE--------------------------------------------------650 549 \begin{table}[htbp] 651 \label{tab:BULK} 652 \begin{center} 653 \begin{tabular}{|l|c|c|c|} 654 \hline 655 Variable description & Model variable & Units & point \\ \hline 656 i-component of the 10m air velocity & utau & $m.s^{-1}$ & T \\ \hline 657 j-component of the 10m air velocity & vtau & $m.s^{-1}$ & T \\ \hline 658 10m air temperature & tair & \r{}$K$ & T \\ \hline 659 Specific humidity & humi & \% & T \\ \hline 660 Incoming long wave radiation & qlw & $W.m^{-2}$ & T \\ \hline 661 Incoming short wave radiation & qsr & $W.m^{-2}$ & T \\ \hline 662 Total precipitation (liquid + solid) & precip & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 663 Solid precipitation & snow & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 664 Mean sea-level pressure & slp & $hPa$ & T \\ \hline 550 \centering 551 \begin{tabular}{|l|c|c|c|} 552 \hline 553 Variable description & Model variable & Units & point \\ 554 \hline 555 i-component of the 10m air velocity & utau & $m.s^{-1}$ & T \\ 556 \hline 557 j-component of the 10m air velocity & vtau & $m.s^{-1}$ & T \\ 558 \hline 559 10m air temperature & tair & \r{}$K$ & T \\ 560 \hline 561 Specific humidity & humi & \% & T \\ 562 \hline 563 Incoming long wave radiation & qlw & $W.m^{-2}$ & T \\ 564 \hline 565 Incoming short wave radiation & qsr & $W.m^{-2}$ & T \\ 566 \hline 567 Total precipitation (liquid + solid) & precip & $Kg.m^{-2}.s^{-1}$ & T \\ 568 \hline 569 Solid precipitation & snow & $Kg.m^{-2}.s^{-1}$ & T \\ 570 \hline 571 Mean sea-level pressure & slp & $hPa$ & T \\ 572 \hline 665 573 \end{tabular} 666 \ end{center}574 \label{tab:SBC_BULK} 667 575 \end{table} 668 %--------------------------------------------------------------------------------------------------------------669 576 670 577 Note that the air velocity is provided at a tracer ocean point, not at a velocity ocean point ($u$- and $v$-points). … … 672 579 the ocean grid size is the same or larger than the one of the input atmospheric fields. 673 580 674 The \np{sn \_wndi}, \np{sn\_wndj}, \np{sn\_qsr}, \np{sn\_qlw}, \np{sn\_tair}, \np{sn\_humi}, \np{sn\_prec},675 \np{sn \_snow}, \np{sn\_tdif} parameters describe the fields and the way they have to be used581 The \np{sn_wndi}{sn\_wndi}, \np{sn_wndj}{sn\_wndj}, \np{sn_qsr}{sn\_qsr}, \np{sn_qlw}{sn\_qlw}, \np{sn_tair}{sn\_tair}, \np{sn_humi}{sn\_humi}, \np{sn_prec}{sn\_prec}, 582 \np{sn_snow}{sn\_snow}, \np{sn_tdif}{sn\_tdif} parameters describe the fields and the way they have to be used 676 583 (spatial and temporal interpolations). 677 584 678 \np{cn \_dir} is the directory of location of bulk files679 \np{ln \_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.)680 \np{rn \_zqt}: is the height of humidity and temperature measurements (m)681 \np{rn \_zu}: is the height of wind measurements (m)585 \np{cn_dir}{cn\_dir} is the directory of location of bulk files 586 \np{ln_taudif}{ln\_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.) 587 \np{rn_zqt}{rn\_zqt}: is the height of humidity and temperature measurements (m) 588 \np{rn_zu}{rn\_zu}: is the height of wind measurements (m) 682 589 683 590 Three multiplicative factors are available: 684 \np{rn \_pfac} and \np{rn\_efac} allow to adjust (if necessary) the global freshwater budget by591 \np{rn_pfac}{rn\_pfac} and \np{rn_efac}{rn\_efac} allow to adjust (if necessary) the global freshwater budget by 685 592 increasing/reducing the precipitations (total and snow) and or evaporation, respectively. 686 The third one,\np{rn \_vfac}, control to which extend the ice/ocean velocities are taken into account in593 The third one,\np{rn_vfac}{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account in 687 594 the calculation of surface wind stress. 688 595 Its range must be between zero and one, and it is recommended to set it to 0 at low-resolution (ORCA2 configuration). … … 691 598 the namsbc\_blk namelist (see \autoref{subsec:SBC_fldread}). 692 599 693 694 % ------------------------------------------------------------------------------------------------------------- 695 % Ocean-Atmosphere Bulk formulae 696 % ------------------------------------------------------------------------------------------------------------- 697 \subsection[Ocean-Atmosphere Bulk formulae (\textit{sbcblk\_algo\_coare.F90, sbcblk\_algo\_coare3p5.F90, 698 sbcblk\_algo\_ecmwf.F90, sbcblk\_algo\_ncar.F90})] 699 {Ocean-Atmosphere Bulk formulae (\mdl{sbcblk\_algo\_coare}, \mdl{sbcblk\_algo\_coare3p5}, 700 \mdl{sbcblk\_algo\_ecmwf}, \mdl{sbcblk\_algo\_ncar})} 600 %% ================================================================================================= 601 \subsection[Ocean-Atmosphere Bulk formulae (\textit{sbcblk\_algo\_coare.F90, sbcblk\_algo\_coare3p5.F90, sbcblk\_algo\_ecmwf.F90, sbcblk\_algo\_ncar.F90})]{Ocean-Atmosphere Bulk formulae (\mdl{sbcblk\_algo\_coare}, \mdl{sbcblk\_algo\_coare3p5}, \mdl{sbcblk\_algo\_ecmwf}, \mdl{sbcblk\_algo\_ncar})} 701 602 \label{subsec:SBC_blk_ocean} 702 603 … … 705 606 their neutral transfer coefficients relationships with neutral wind. 706 607 \begin{itemize} 707 \item 708 NCAR (\np{ln\_NCAR}\forcode{ = .true.}): 709 The NCAR bulk formulae have been developed by \citet{large.yeager_rpt04}. 608 \item NCAR (\np[=.true.]{ln_NCAR}{ln\_NCAR}): The NCAR bulk formulae have been developed by \citet{large.yeager_rpt04}. 710 609 They have been designed to handle the NCAR forcing, a mixture of NCEP reanalysis and satellite data. 711 610 They use an inertial dissipative method to compute the turbulent transfer coefficients … … 715 614 Note that substituting ERA40 to NCEP reanalysis fields does not require changes in the bulk formulea themself. 716 615 This is the so-called DRAKKAR Forcing Set (DFS) \citep{brodeau.barnier.ea_OM10}. 717 \item 718 COARE 3.0 (\np{ln\_COARE\_3p0}\forcode{ = .true.}): 719 See \citet{fairall.bradley.ea_JC03} for more details 720 \item 721 COARE 3.5 (\np{ln\_COARE\_3p5}\forcode{ = .true.}): 722 See \citet{edson.jampana.ea_JPO13} for more details 723 \item 724 ECMWF (\np{ln\_ECMWF}\forcode{ = .true.}): 725 Based on \href{https://www.ecmwf.int/node/9221}{IFS (Cy31)} implementation and documentation. 616 \item COARE 3.0 (\np[=.true.]{ln_COARE_3p0}{ln\_COARE\_3p0}): See \citet{fairall.bradley.ea_JC03} for more details 617 \item COARE 3.5 (\np[=.true.]{ln_COARE_3p5}{ln\_COARE\_3p5}): See \citet{edson.jampana.ea_JPO13} for more details 618 \item ECMWF (\np[=.true.]{ln_ECMWF}{ln\_ECMWF}): Based on \href{https://www.ecmwf.int/node/9221}{IFS (Cy31)} implementation and documentation. 726 619 Surface roughness lengths needed for the Obukhov length are computed following \citet{beljaars_QJRMS95}. 727 620 \end{itemize} 728 621 729 % ------------------------------------------------------------------------------------------------------------- 730 % Ice-Atmosphere Bulk formulae 731 % ------------------------------------------------------------------------------------------------------------- 622 %% ================================================================================================= 732 623 \subsection{Ice-Atmosphere Bulk formulae} 733 624 \label{subsec:SBC_blk_ice} … … 736 627 737 628 \begin{itemize} 738 \item 739 Constant value (\np{constant\ value}\forcode{ Cd_ice = 1.4e-3 }): 629 \item Constant value (\np[ Cd_ice=1.4e-3 ]{constant value}{constant\ value}): 740 630 default constant value used for momentum and heat neutral transfer coefficients 741 \item 742 \citet{lupkes.gryanik.ea_JGR12} (\np{ln\_Cd\_L12}\forcode{ = .true.}): 631 \item \citet{lupkes.gryanik.ea_JGR12} (\np[=.true.]{ln_Cd_L12}{ln\_Cd\_L12}): 743 632 This scheme adds a dependency on edges at leads, melt ponds and flows 744 633 of the constant neutral air-ice drag. After some approximations, … … 747 636 starting at 1.5e-3 for A=0, reaching 1.97e-3 for A=0.5 and going down 1.4e-3 for A=1. 748 637 It is theoretically applicable to all ice conditions (not only MIZ). 749 \item 750 \citet{lupkes.gryanik_JGR15} (\np{ln\_Cd\_L15}\forcode{ = .true.}): 638 \item \citet{lupkes.gryanik_JGR15} (\np[=.true.]{ln_Cd_L15}{ln\_Cd\_L15}): 751 639 Alternative turbulent transfer coefficients formulation between sea-ice 752 640 and atmosphere with distinct momentum and heat coefficients depending … … 758 646 \end{itemize} 759 647 760 761 762 % ================================================================ 763 % Coupled formulation 764 % ================================================================ 765 \section[Coupled formulation (\textit{sbccpl.F90})] 766 {Coupled formulation (\protect\mdl{sbccpl})} 648 %% ================================================================================================= 649 \section[Coupled formulation (\textit{sbccpl.F90})]{Coupled formulation (\protect\mdl{sbccpl})} 767 650 \label{sec:SBC_cpl} 768 %------------------------------------------namsbc_cpl---------------------------------------------------- 769 770 \nlst{namsbc_cpl} 771 %------------------------------------------------------------------------------------------------------------- 651 652 \begin{listing} 653 \nlst{namsbc_cpl} 654 \caption{\forcode{&namsbc_cpl}} 655 \label{lst:namsbc_cpl} 656 \end{listing} 772 657 773 658 In the coupled formulation of the surface boundary condition, … … 786 671 the whole carbon cycle is computed. 787 672 In this case, CO$_2$ fluxes will be exchanged between the atmosphere and the ice-ocean system 788 (and need to be activated in \nam{sbc \_cpl} ).673 (and need to be activated in \nam{sbc_cpl}{sbc\_cpl} ). 789 674 790 675 The namelist above allows control of various aspects of the coupling fields (particularly for vectors) and 791 676 now allows for any coupling fields to have multiple sea ice categories (as required by LIM3 and CICE). 792 When indicating a multi-category coupling field in \nam{sbc \_cpl}, the number of categories will be determined by677 When indicating a multi-category coupling field in \nam{sbc_cpl}{sbc\_cpl}, the number of categories will be determined by 793 678 the number used in the sea ice model. 794 679 In some limited cases, it may be possible to specify single category coupling fields even when … … 797 682 In cases where this is definitely not possible, the model should abort with an error message. 798 683 799 800 801 % ================================================================ 802 % Atmospheric pressure 803 % ================================================================ 804 \section[Atmospheric pressure (\textit{sbcapr.F90})] 805 {Atmospheric pressure (\protect\mdl{sbcapr})} 684 %% ================================================================================================= 685 \section[Atmospheric pressure (\textit{sbcapr.F90})]{Atmospheric pressure (\protect\mdl{sbcapr})} 806 686 \label{sec:SBC_apr} 807 %------------------------------------------namsbc_apr---------------------------------------------------- 808 809 \nlst{namsbc_apr} 810 %------------------------------------------------------------------------------------------------------------- 687 688 \begin{listing} 689 \nlst{namsbc_apr} 690 \caption{\forcode{&namsbc_apr}} 691 \label{lst:namsbc_apr} 692 \end{listing} 811 693 812 694 The optional atmospheric pressure can be used to force ocean and ice dynamics 813 (\np {ln\_apr\_dyn}\forcode{ = .true.}, \nam{sbc} namelist).814 The input atmospheric forcing defined via \np{sn \_apr} structure (\nam{sbc\_apr} namelist)695 (\np[=.true.]{ln_apr_dyn}{ln\_apr\_dyn}, \nam{sbc}{sbc} namelist). 696 The input atmospheric forcing defined via \np{sn_apr}{sn\_apr} structure (\nam{sbc_apr}{sbc\_apr} namelist) 815 697 can be interpolated in time to the model time step, and even in space when the interpolation on-the-fly is used. 816 698 When used to force the dynamics, the atmospheric pressure is further transformed into … … 821 703 \] 822 704 where $P_{atm}$ is the atmospheric pressure and $P_o$ a reference atmospheric pressure. 823 A value of $101,000~N/m^2$ is used unless \np{ln \_ref\_apr} is set to true.705 A value of $101,000~N/m^2$ is used unless \np{ln_ref_apr}{ln\_ref\_apr} is set to true. 824 706 In this case, $P_o$ is set to the value of $P_{atm}$ averaged over the ocean domain, 825 707 \ie\ the mean value of $\eta_{ib}$ is kept to zero at all time steps. … … 834 716 When using time-splitting and BDY package for open boundaries conditions, 835 717 the equivalent inverse barometer sea surface height $\eta_{ib}$ can be added to BDY ssh data: 836 \np{ln\_apr\_obc} might be set to true. 837 838 839 840 % ================================================================ 841 % Surface Tides Forcing 842 % ================================================================ 843 \section[Surface tides (\textit{sbctide.F90})] 844 {Surface tides (\protect\mdl{sbctide})} 718 \np{ln_apr_obc}{ln\_apr\_obc} might be set to true. 719 720 %% ================================================================================================= 721 \section[Surface tides (\textit{sbctide.F90})]{Surface tides (\protect\mdl{sbctide})} 845 722 \label{sec:SBC_tide} 846 723 847 %------------------------------------------nam_tide--------------------------------------- 848 849 \nlst{nam_tide} 850 %----------------------------------------------------------------------------------------- 724 \begin{listing} 725 \nlst{nam_tide} 726 \caption{\forcode{&nam_tide}} 727 \label{lst:nam_tide} 728 \end{listing} 851 729 852 730 The tidal forcing, generated by the gravity forces of the Earth-Moon and Earth-Sun sytems, 853 is activated if \np{ln \_tide} and \np{ln\_tide\_pot} are both set to \forcode{.true.} in \nam{\_tide}.854 This translates as an additional barotropic force in the momentum equations \ref{eq:PE_dyn} such that:731 is activated if \np{ln_tide}{ln\_tide} and \np{ln_tide_pot}{ln\_tide\_pot} are both set to \forcode{.true.} in \nam{_tide}{\_tide}. 732 This translates as an additional barotropic force in the momentum \autoref{eq:MB_PE_dyn} such that: 855 733 \[ 856 % \label{eq: PE_dyn_tides}734 % \label{eq:SBC_PE_dyn_tides} 857 735 \frac{\partial {\mathrm {\mathbf U}}_h }{\partial t}= ... 858 736 +g\nabla (\Pi_{eq} + \Pi_{sal}) … … 867 745 Msqm, Mtm, S1, MU2, NU2, L2}, and \textit{T2}). Individual 868 746 constituents are selected by including their names in the array 869 \np{clname} in \nam{\_tide} (e.g., \np{clname}\forcode{(1) ='M2', }870 \np{clname} \forcode{(2) ='S2'} to select solely the tidal consituents \textit{M2}871 and \textit{S2}). Optionally, when \np{ln \_tide\_ramp} is set to747 \np{clname}{clname} in \nam{_tide}{\_tide} (e.g., \np{clname}{clname}\forcode{(1)='M2', } 748 \np{clname}{clname}\forcode{(2)='S2'} to select solely the tidal consituents \textit{M2} 749 and \textit{S2}). Optionally, when \np{ln_tide_ramp}{ln\_tide\_ramp} is set to 872 750 \forcode{.true.}, the equilibrium tidal forcing can be ramped up 873 linearly from zero during the initial \np{rdttideramp} days of the751 linearly from zero during the initial \np{rdttideramp}{rdttideramp} days of the 874 752 model run. 875 753 … … 880 758 computationally too expensive. Here, two options are available: 881 759 $\Pi_{sal}$ generated by an external model can be read in 882 (\np {ln\_read\_load}\forcode{ =.true.}), or a ``scalar approximation'' can be883 used (\np {ln\_scal\_load}\forcode{ =.true.}). In the latter case760 (\np[=.true.]{ln_read_load}{ln\_read\_load}), or a ``scalar approximation'' can be 761 used (\np[=.true.]{ln_scal_load}{ln\_scal\_load}). In the latter case 884 762 \[ 885 763 \Pi_{sal} = \beta \eta, 886 764 \] 887 where $\beta$ (\np{rn \_scal\_load} with a default value of 0.094) is a765 where $\beta$ (\np{rn_scal_load}{rn\_scal\_load} with a default value of 0.094) is a 888 766 spatially constant scalar, often chosen to minimize tidal prediction 889 errors. Setting both \np{ln \_read\_load} and \np{ln\_scal\_load} to767 errors. Setting both \np{ln_read_load}{ln\_read\_load} and \np{ln_scal_load}{ln\_scal\_load} to 890 768 \forcode{.false.} removes the SAL contribution. 891 769 892 893 894 % ================================================================ 895 % River runoffs 896 % ================================================================ 897 \section[River runoffs (\textit{sbcrnf.F90})] 898 {River runoffs (\protect\mdl{sbcrnf})} 770 %% ================================================================================================= 771 \section[River runoffs (\textit{sbcrnf.F90})]{River runoffs (\protect\mdl{sbcrnf})} 899 772 \label{sec:SBC_rnf} 900 %------------------------------------------namsbc_rnf---------------------------------------------------- 901 902 \nlst{namsbc_rnf} 903 %------------------------------------------------------------------------------------------------------------- 773 774 \begin{listing} 775 \nlst{namsbc_rnf} 776 \caption{\forcode{&namsbc_rnf}} 777 \label{lst:namsbc_rnf} 778 \end{listing} 904 779 905 780 %River runoff generally enters the ocean at a nonzero depth rather than through the surface. … … 912 787 %required to properly represent the diurnal cycle \citep{bernie.woolnough.ea_JC05}. see also \autoref{fig:SBC_dcy}.}. 913 788 914 915 789 %To do this we need to treat evaporation/precipitation fluxes and river runoff differently in the 916 790 %\mdl{tra\_sbc} module. We decided to separate them throughout the code, so that the variable … … 920 794 %emp or emps and the changes made are below: 921 795 922 923 796 %Rachel: 924 797 River runoff generally enters the ocean at a nonzero depth rather than through the surface. … … 939 812 along with the depth (in metres) which the river should be added to. 940 813 941 Namelist variables in \nam{sbc \_rnf}, \np{ln\_rnf\_depth}, \np{ln\_rnf\_sal} and942 \np{ln \_rnf\_temp} control whether the river attributes (depth, salinity and temperature) are read in and used.814 Namelist variables in \nam{sbc_rnf}{sbc\_rnf}, \np{ln_rnf_depth}{ln\_rnf\_depth}, \np{ln_rnf_sal}{ln\_rnf\_sal} and 815 \np{ln_rnf_temp}{ln\_rnf\_temp} control whether the river attributes (depth, salinity and temperature) are read in and used. 943 816 If these are set as false the river is added to the surface box only, assumed to be fresh (0~psu), 944 817 and/or taken as surface temperature respectively. … … 952 825 (converted into m/s) to give the heat and salt content of the river runoff. 953 826 After the user specified depth is read ini, 954 the number of grid boxes this corresponds to is calculated and stored in the variable \np{nz \_rnf}.827 the number of grid boxes this corresponds to is calculated and stored in the variable \np{nz_rnf}{nz\_rnf}. 955 828 The variable \textit{h\_dep} is then calculated to be the depth (in metres) of 956 829 the bottom of the lowest box the river water is being added to … … 997 870 as the ocean water leaving the domain removes heat and salt (at the same concentration) with it. 998 871 999 1000 872 %\colorbox{yellow}{Nevertheless, Pb of vertical resolution and 3D input : increase vertical mixing near river mouths to mimic a 3D river 1001 873 … … 1009 881 1010 882 %\gmcomment{ word doc of runoffs: 1011 %1012 883 %In the current \NEMO\ setup river runoff is added to emp fluxes, these are then applied at just the sea surface as a volume change (in the variable volume case this is a literal volume change, and in the linear free surface case the free surface is moved) and a salt flux due to the concentration/dilution effect. There is also an option to increase vertical mixing near river mouths; this gives the effect of having a 3d river. All river runoff and emp fluxes are assumed to be fresh water (zero salinity) and at the same temperature as the sea surface. 1013 884 %Our aim was to code the option to specify the temperature and salinity of river runoff, (as well as the amount), along with the depth that the river water will affect. This would make it possible to model low salinity outflow, such as the Baltic, and would allow the ocean temperature to be affected by river runoff. … … 1017 888 %To do this we need to treat evaporation/precipitation fluxes and river runoff differently in the tra_sbc module. We decided to separate them throughout the code, so that the variable emp represented solely evaporation minus precipitation fluxes, and a new 2d variable rnf was added which represents the volume flux of river runoff (in kg/m2s to remain consistent with emp). This meant many uses of emp and emps needed to be changed, a list of all modules which use emp or emps and the changes made are below: 1018 889 1019 1020 1021 % ================================================================ 1022 % Ice shelf melting 1023 % ================================================================ 1024 \section[Ice shelf melting (\textit{sbcisf.F90})] 1025 {Ice shelf melting (\protect\mdl{sbcisf})} 890 %% ================================================================================================= 891 \section[Ice shelf melting (\textit{sbcisf.F90})]{Ice shelf melting (\protect\mdl{sbcisf})} 1026 892 \label{sec:SBC_isf} 1027 %------------------------------------------namsbc_isf---------------------------------------------------- 1028 1029 \nlst{namsbc_isf} 1030 %-------------------------------------------------------------------------------------------------------- 1031 1032 The namelist variable in \nam{sbc}, \np{nn\_isf}, controls the ice shelf representation. 1033 Description and result of sensitivity test to \np{nn\_isf} are presented in \citet{mathiot.jenkins.ea_GMD17}. 893 894 \begin{listing} 895 \nlst{namsbc_isf} 896 \caption{\forcode{&namsbc_isf}} 897 \label{lst:namsbc_isf} 898 \end{listing} 899 900 The namelist variable in \nam{sbc}{sbc}, \np{nn_isf}{nn\_isf}, controls the ice shelf representation. 901 Description and result of sensitivity test to \np{nn_isf}{nn\_isf} are presented in \citet{mathiot.jenkins.ea_GMD17}. 1034 902 The different options are illustrated in \autoref{fig:SBC_isf}. 1035 903 1036 904 \begin{description} 1037 1038 \item[\np{nn\_isf}\forcode{ = 1}]: 1039 The ice shelf cavity is represented (\np{ln\_isfcav}\forcode{ = .true.} needed). 905 \item [{\np[=1]{nn_isf}{nn\_isf}}]: The ice shelf cavity is represented (\np[=.true.]{ln_isfcav}{ln\_isfcav} needed). 1040 906 The fwf and heat flux are depending of the local water properties. 1041 907 … … 1043 909 1044 910 \begin{description} 1045 \item[\np{nn\_isfblk}\forcode{ = 1}]: 1046 The melt rate is based on a balance between the upward ocean heat flux and 911 \item [{\np[=1]{nn_isfblk}{nn\_isfblk}}]: The melt rate is based on a balance between the upward ocean heat flux and 1047 912 the latent heat flux at the ice shelf base. A complete description is available in \citet{hunter_rpt06}. 1048 \item[\np{nn\_isfblk}\forcode{ = 2}]: 1049 The melt rate and the heat flux are based on a 3 equations formulation 913 \item [{\np[=2]{nn_isfblk}{nn\_isfblk}}]: The melt rate and the heat flux are based on a 3 equations formulation 1050 914 (a heat flux budget at the ice base, a salt flux budget at the ice base and a linearised freezing point temperature equation). 1051 915 A complete description is available in \citet{jenkins_JGR91}. … … 1053 917 1054 918 Temperature and salinity used to compute the melt are the average temperature in the top boundary layer \citet{losch_JGR08}. 1055 Its thickness is defined by \np{rn \_hisf\_tbl}.1056 The fluxes and friction velocity are computed using the mean temperature, salinity and velocity in the the first \np{rn \_hisf\_tbl} m.919 Its thickness is defined by \np{rn_hisf_tbl}{rn\_hisf\_tbl}. 920 The fluxes and friction velocity are computed using the mean temperature, salinity and velocity in the the first \np{rn_hisf_tbl}{rn\_hisf\_tbl} m. 1057 921 Then, the fluxes are spread over the same thickness (ie over one or several cells). 1058 If \np{rn \_hisf\_tbl} larger than top $e_{3}t$, there is no more feedback between the freezing point at the interface and the the top cell temperature.922 If \np{rn_hisf_tbl}{rn\_hisf\_tbl} larger than top $e_{3}t$, there is no more feedback between the freezing point at the interface and the the top cell temperature. 1059 923 This can lead to super-cool temperature in the top cell under melting condition. 1060 If \np{rn \_hisf\_tbl} smaller than top $e_{3}t$, the top boundary layer thickness is set to the top cell thickness.\\924 If \np{rn_hisf_tbl}{rn\_hisf\_tbl} smaller than top $e_{3}t$, the top boundary layer thickness is set to the top cell thickness.\\ 1061 925 1062 926 Each melt bulk formula depends on a exchange coeficient ($\Gamma^{T,S}$) between the ocean and the ice. 1063 927 There are 3 different ways to compute the exchange coeficient: 1064 928 \begin{description} 1065 \item[\np{nn\_gammablk}\forcode{ = 0}]: 1066 The salt and heat exchange coefficients are constant and defined by \np{rn\_gammas0} and \np{rn\_gammat0}. 1067 \[ 1068 % \label{eq:sbc_isf_gamma_iso} 1069 \gamma^{T} = \np{rn\_gammat0} 1070 \] 1071 \[ 1072 \gamma^{S} = \np{rn\_gammas0} 1073 \] 929 \item [{\np[=0]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are constant and defined by \np{rn_gammas0}{rn\_gammas0} and \np{rn_gammat0}{rn\_gammat0}. 930 \begin{gather*} 931 % \label{eq:SBC_isf_gamma_iso} 932 \gamma^{T} = rn\_gammat0 \\ 933 \gamma^{S} = rn\_gammas0 934 \end{gather*} 1074 935 This is the recommended formulation for ISOMIP. 1075 \item[\np{nn\_gammablk}\forcode{ = 1}]: 1076 The salt and heat exchange coefficients are velocity dependent and defined as 1077 \[ 1078 \gamma^{T} = \np{rn\_gammat0} \times u_{*} 1079 \] 1080 \[ 1081 \gamma^{S} = \np{rn\_gammas0} \times u_{*} 1082 \] 1083 where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters). 936 \item [{\np[=1]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are velocity dependent and defined as 937 \begin{gather*} 938 \gamma^{T} = rn\_gammat0 \times u_{*} \\ 939 \gamma^{S} = rn\_gammas0 \times u_{*} 940 \end{gather*} 941 where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl}{rn\_hisf\_tbl} meters). 1084 942 See \citet{jenkins.nicholls.ea_JPO10} for all the details on this formulation. It is the recommended formulation for realistic application. 1085 \item[\np{nn\_gammablk}\forcode{ = 2}]: 1086 The salt and heat exchange coefficients are velocity and stability dependent and defined as: 943 \item [{\np[=2]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are velocity and stability dependent and defined as: 1087 944 \[ 1088 945 \gamma^{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}} 1089 946 \] 1090 where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn \_hisf\_tbl} meters),947 where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl}{rn\_hisf\_tbl} meters), 1091 948 $\Gamma_{Turb}$ the contribution of the ocean stability and 1092 949 $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion. … … 1094 951 This formulation has not been extensively tested in \NEMO\ (not recommended). 1095 952 \end{description} 1096 \item[\np{nn\_isf}\forcode{ = 2}]: 1097 The ice shelf cavity is not represented. 953 \item [{\np[=2]{nn_isf}{nn\_isf}}]: The ice shelf cavity is not represented. 1098 954 The fwf and heat flux are computed using the \citet{beckmann.goosse_OM03} parameterisation of isf melting. 1099 955 The fluxes are distributed along the ice shelf edge between the depth of the average grounding line (GL) 1100 (\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front 1101 (\np{sn\_depmin\_isf}) as in (\np{nn\_isf}\forcode{ = 3}). 1102 The effective melting length (\np{sn\_Leff\_isf}) is read from a file. 1103 \item[\np{nn\_isf}\forcode{ = 3}]: 1104 The ice shelf cavity is not represented. 1105 The fwf (\np{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between 1106 the depth of the average grounding line (GL) (\np{sn\_depmax\_isf}) and 1107 the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}). 956 (\np{sn_depmax_isf}{sn\_depmax\_isf}) and the base of the ice shelf along the calving front 957 (\np{sn_depmin_isf}{sn\_depmin\_isf}) as in (\np[=3]{nn_isf}{nn\_isf}). 958 The effective melting length (\np{sn_Leff_isf}{sn\_Leff\_isf}) is read from a file. 959 \item [{\np[=3]{nn_isf}{nn\_isf}}]: The ice shelf cavity is not represented. 960 The fwf (\np{sn_rnfisf}{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between 961 the depth of the average grounding line (GL) (\np{sn_depmax_isf}{sn\_depmax\_isf}) and 962 the base of the ice shelf along the calving front (\np{sn_depmin_isf}{sn\_depmin\_isf}). 1108 963 The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 1109 \item[\np{nn\_isf}\forcode{ = 4}]: 1110 The ice shelf cavity is opened (\np{ln\_isfcav}\forcode{ = .true.} needed). 1111 However, the fwf is not computed but specified from file \np{sn\_fwfisf}). 964 \item [{\np[=4]{nn_isf}{nn\_isf}}]: The ice shelf cavity is opened (\np[=.true.]{ln_isfcav}{ln\_isfcav} needed). 965 However, the fwf is not computed but specified from file \np{sn_fwfisf}{sn\_fwfisf}). 1112 966 The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 1113 As in \np {nn\_isf}\forcode{ = 1}, the fluxes are spread over the top boundary layer thickness (\np{rn\_hisf\_tbl})\\967 As in \np[=1]{nn_isf}{nn\_isf}, the fluxes are spread over the top boundary layer thickness (\np{rn_hisf_tbl}{rn\_hisf\_tbl})\\ 1114 968 \end{description} 1115 969 1116 $\bullet$ \np {nn\_isf}\forcode{ = 1} and \np{nn\_isf}\forcode{ = 2} compute a melt rate based on970 $\bullet$ \np[=1]{nn_isf}{nn\_isf} and \np[=2]{nn_isf}{nn\_isf} compute a melt rate based on 1117 971 the water mass properties, ocean velocities and depth. 1118 972 This flux is thus highly dependent of the model resolution (horizontal and vertical), 1119 973 realism of the water masses onto the shelf ...\\ 1120 974 1121 $\bullet$ \np {nn\_isf}\forcode{ = 3} and \np{nn\_isf}\forcode{ = 4} read the melt rate from a file.975 $\bullet$ \np[=3]{nn_isf}{nn\_isf} and \np[=4]{nn_isf}{nn\_isf} read the melt rate from a file. 1122 976 You have total control of the fwf forcing. 1123 977 This can be useful if the water masses on the shelf are not realistic or … … 1130 984 See the runoff section \autoref{sec:SBC_rnf} for all the details about the divergence correction.\\ 1131 985 1132 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>1133 986 \begin{figure}[!t] 1134 \begin{center} 1135 \includegraphics[width=\textwidth]{Fig_SBC_isf} 1136 \caption{ 1137 \protect\label{fig:SBC_isf} 1138 Illustration the location where the fwf is injected and whether or not the fwf is interactif or not depending of \np{nn\_isf}. 1139 } 1140 \end{center} 987 \centering 988 \includegraphics[width=0.66\textwidth]{Fig_SBC_isf} 989 \caption[Ice shelf location and fresh water flux definition]{ 990 Illustration of the location where the fwf is injected and 991 whether or not the fwf is interactif or not depending of \protect\np{nn_isf}{nn\_isf}.} 992 \label{fig:SBC_isf} 1141 993 \end{figure} 1142 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1143 1144 1145 1146 % ================================================================ 1147 % Ice sheet coupling 1148 % ================================================================ 994 995 %% ================================================================================================= 1149 996 \section{Ice sheet coupling} 1150 997 \label{sec:SBC_iscpl} 1151 %------------------------------------------namsbc_iscpl---------------------------------------------------- 1152 1153 \nlst{namsbc_iscpl} 1154 %-------------------------------------------------------------------------------------------------------- 998 999 \begin{listing} 1000 \nlst{namsbc_iscpl} 1001 \caption{\forcode{&namsbc_iscpl}} 1002 \label{lst:namsbc_iscpl} 1003 \end{listing} 1155 1004 1156 1005 Ice sheet/ocean coupling is done through file exchange at the restart step. 1157 1006 At each restart step: 1158 1007 1159 \begin{ description}1160 \item [Step 1]:the ice sheet model send a new bathymetry and ice shelf draft netcdf file.1161 \item [Step 2]:a new domcfg.nc file is built using the DOMAINcfg tools.1162 \item [Step 3]:\NEMO\ run for a specific period and output the average melt rate over the period.1163 \item [Step 4]:the ice sheet model run using the melt rate outputed in step 4.1164 \item [Step 5]:go back to 1.1165 \end{ description}1166 1167 If \np {ln\_iscpl}\forcode{ = .true.}, the isf draft is assume to be different at each restart step with1008 \begin{enumerate} 1009 \item the ice sheet model send a new bathymetry and ice shelf draft netcdf file. 1010 \item a new domcfg.nc file is built using the DOMAINcfg tools. 1011 \item \NEMO\ run for a specific period and output the average melt rate over the period. 1012 \item the ice sheet model run using the melt rate outputed in step 4. 1013 \item go back to 1. 1014 \end{enumerate} 1015 1016 If \np[=.true.]{ln_iscpl}{ln\_iscpl}, the isf draft is assume to be different at each restart step with 1168 1017 potentially some new wet/dry cells due to the ice sheet dynamics/thermodynamics. 1169 1018 The wetting and drying scheme applied on the restart is very simple and described below for the 6 different possible cases: 1170 1019 1171 1020 \begin{description} 1172 \item[Thin a cell down]: 1173 T/S/ssh are unchanged and U/V in the top cell are corrected to keep the barotropic transport (bt) constant 1021 \item [Thin a cell down]: T/S/ssh are unchanged and U/V in the top cell are corrected to keep the barotropic transport (bt) constant 1174 1022 ($bt_b=bt_n$). 1175 \item[Enlarge a cell]: 1176 See case "Thin a cell down" 1177 \item[Dry a cell]: 1178 mask, T/S, U/V and ssh are set to 0. 1023 \item [Enlarge a cell]: See case "Thin a cell down" 1024 \item [Dry a cell]: mask, T/S, U/V and ssh are set to 0. 1179 1025 Furthermore, U/V into the water column are modified to satisfy ($bt_b=bt_n$). 1180 \item[Wet a cell]: 1181 mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$ and U/V set to 0. 1026 \item [Wet a cell]: mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$ and U/V set to 0. 1182 1027 If no neighbours, T/S is extrapolated from old top cell value. 1183 1028 If no neighbours along i,j and k (both previous test failed), T/S/U/V/ssh and mask are set to 0. 1184 \item[Dry a column]: 1185 mask, T/S, U/V are set to 0 everywhere in the column and ssh set to 0. 1186 \item[Wet a column]: 1187 set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0. 1029 \item [Dry a column]: mask, T/S, U/V are set to 0 everywhere in the column and ssh set to 0. 1030 \item [Wet a column]: set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0. 1188 1031 If no neighbour, T/S/U/V and mask set to 0. 1189 1032 \end{description} … … 1192 1035 the restart time step is prescribed to be an euler time step instead of a leap frog and $fields_b = fields_n$.\\ 1193 1036 1194 The horizontal extrapolation to fill new cell with realistic value is called \np{nn \_drown} times.1195 It means that if the grounding line retreat by more than \np{nn \_drown} cells between 2 coupling steps,1037 The horizontal extrapolation to fill new cell with realistic value is called \np{nn_drown}{nn\_drown} times. 1038 It means that if the grounding line retreat by more than \np{nn_drown}{nn\_drown} cells between 2 coupling steps, 1196 1039 the code will be unable to fill all the new wet cells properly. 1197 1040 The default number is set up for the MISOMIP idealised experiments. … … 1201 1044 1202 1045 In order to remove the trend and keep the conservation level as close to 0 as possible, 1203 a simple conservation scheme is available with \np {ln\_hsb}\forcode{ = .true.}.1046 a simple conservation scheme is available with \np[=.true.]{ln_hsb}{ln\_hsb}. 1204 1047 The heat/salt/vol. gain/loss is diagnosed, as well as the location. 1205 A correction increment is computed and apply each time step during the next \np{rn \_fiscpl} time steps.1206 For safety, it is advised to set \np{rn \_fiscpl} equal to the coupling period (smallest increment possible).1048 A correction increment is computed and apply each time step during the next \np{rn_fiscpl}{rn\_fiscpl} time steps. 1049 For safety, it is advised to set \np{rn_fiscpl}{rn\_fiscpl} equal to the coupling period (smallest increment possible). 1207 1050 The corrective increment is apply into the cell itself (if it is a wet cell), the neigbouring cells or the closest wet cell (if the cell is now dry). 1208 1051 1209 1210 1211 % ================================================================ 1212 % Handling of icebergs 1213 % ================================================================ 1052 %% ================================================================================================= 1214 1053 \section{Handling of icebergs (ICB)} 1215 \label{sec:ICB_icebergs} 1216 %------------------------------------------namberg---------------------------------------------------- 1217 1218 \nlst{namberg} 1219 %------------------------------------------------------------------------------------------------------------- 1054 \label{sec:SBC_ICB_icebergs} 1055 1056 \begin{listing} 1057 \nlst{namberg} 1058 \caption{\forcode{&namberg}} 1059 \label{lst:namberg} 1060 \end{listing} 1220 1061 1221 1062 Icebergs are modelled as lagrangian particles in \NEMO\ \citep{marsh.ivchenko.ea_GMD15}. … … 1223 1064 (Note that the authors kindly provided a copy of their code to act as a basis for implementation in \NEMO). 1224 1065 Icebergs are initially spawned into one of ten classes which have specific mass and thickness as 1225 described in the \nam{berg} namelist: \np{rn\_initial\_mass} and \np{rn\_initial\_thickness}.1226 Each class has an associated scaling (\np{rn \_mass\_scaling}),1066 described in the \nam{berg}{berg} namelist: \np{rn_initial_mass}{rn\_initial\_mass} and \np{rn_initial_thickness}{rn\_initial\_thickness}. 1067 Each class has an associated scaling (\np{rn_mass_scaling}{rn\_mass\_scaling}), 1227 1068 which is an integer representing how many icebergs of this class are being described as one lagrangian point 1228 1069 (this reduces the numerical problem of tracking every single iceberg). 1229 They are enabled by setting \np {ln\_icebergs}\forcode{ = .true.}.1070 They are enabled by setting \np[=.true.]{ln_icebergs}{ln\_icebergs}. 1230 1071 1231 1072 Two initialisation schemes are possible. 1232 1073 \begin{description} 1233 \item[\np{nn\_test\_icebergs}~$>$~0] 1234 In this scheme, the value of \np{nn\_test\_icebergs} represents the class of iceberg to generate 1235 (so between 1 and 10), and \np{nn\_test\_icebergs} provides a lon/lat box in the domain at each grid point of 1074 \item [{\np{nn_test_icebergs}{nn\_test\_icebergs}~$>$~0}] In this scheme, the value of \np{nn_test_icebergs}{nn\_test\_icebergs} represents the class of iceberg to generate 1075 (so between 1 and 10), and \np{nn_test_icebergs}{nn\_test\_icebergs} provides a lon/lat box in the domain at each grid point of 1236 1076 which an iceberg is generated at the beginning of the run. 1237 (Note that this happens each time the timestep equals \np{nn \_nit000}.)1238 \np{nn \_test\_icebergs} is defined by four numbers in \np{nn\_test\_box} representing the corners of1077 (Note that this happens each time the timestep equals \np{nn_nit000}{nn\_nit000}.) 1078 \np{nn_test_icebergs}{nn\_test\_icebergs} is defined by four numbers in \np{nn_test_box}{nn\_test\_box} representing the corners of 1239 1079 the geographical box: lonmin,lonmax,latmin,latmax 1240 \item[\np{nn\_test\_icebergs}\forcode{ = -1}] 1241 In this scheme, the model reads a calving file supplied in the \np{sn\_icb} parameter. 1080 \item [{\np[=-1]{nn_test_icebergs}{nn\_test\_icebergs}}] In this scheme, the model reads a calving file supplied in the \np{sn_icb}{sn\_icb} parameter. 1242 1081 This should be a file with a field on the configuration grid (typically ORCA) 1243 1082 representing ice accumulation rate at each model point. … … 1254 1093 The latter act to disintegrate the iceberg. 1255 1094 This is either all melted freshwater, 1256 or (if \np{rn \_bits\_erosion\_fraction}~$>$~0) into melt and additionally small ice bits1095 or (if \np{rn_bits_erosion_fraction}{rn\_bits\_erosion\_fraction}~$>$~0) into melt and additionally small ice bits 1257 1096 which are assumed to propagate with their larger parent and thus delay fluxing into the ocean. 1258 1097 Melt water (and other variables on the configuration grid) are written into the main \NEMO\ model output files. … … 1260 1099 Extensive diagnostics can be produced. 1261 1100 Separate output files are maintained for human-readable iceberg information. 1262 A separate file is produced for each processor (independent of \np{ln \_ctl}).1101 A separate file is produced for each processor (independent of \np{ln_ctl}{ln\_ctl}). 1263 1102 The amount of information is controlled by two integer parameters: 1264 1103 \begin{description} 1265 \item [\np{nn\_verbose\_level}] takes a value between one and four and1104 \item [{\np{nn_verbose_level}{nn\_verbose\_level}}] takes a value between one and four and 1266 1105 represents an increasing number of points in the code at which variables are written, 1267 1106 and an increasing level of obscurity. 1268 \item [\np{nn\_verbose\_write}] is the number of timesteps between writes1107 \item [{\np{nn_verbose_write}{nn\_verbose\_write}}] is the number of timesteps between writes 1269 1108 \end{description} 1270 1109 1271 Iceberg trajectories can also be written out and this is enabled by setting \np{nn \_sample\_rate}~$>$~0.1110 Iceberg trajectories can also be written out and this is enabled by setting \np{nn_sample_rate}{nn\_sample\_rate}~$>$~0. 1272 1111 A non-zero value represents how many timesteps between writes of information into the output file. 1273 1112 These output files are in NETCDF format. … … 1277 1116 since its trajectory data may be spread across multiple files. 1278 1117 1279 1280 1281 % ============================================================================================================= 1282 % Interactions with waves (sbcwave.F90, ln_wave) 1283 % ============================================================================================================= 1284 \section[Interactions with waves (\textit{sbcwave.F90}, \texttt{ln\_wave})] 1285 {Interactions with waves (\protect\mdl{sbcwave}, \protect\np{ln\_wave})} 1118 %% ================================================================================================= 1119 \section[Interactions with waves (\textit{sbcwave.F90}, \forcode{ln_wave})]{Interactions with waves (\protect\mdl{sbcwave}, \protect\np{ln_wave}{ln\_wave})} 1286 1120 \label{sec:SBC_wave} 1287 %------------------------------------------namsbc_wave-------------------------------------------------------- 1288 1289 \nlst{namsbc_wave} 1290 %------------------------------------------------------------------------------------------------------------- 1121 1122 \begin{listing} 1123 \nlst{namsbc_wave} 1124 \caption{\forcode{&namsbc_wave}} 1125 \label{lst:namsbc_wave} 1126 \end{listing} 1291 1127 1292 1128 Ocean waves represent the interface between the ocean and the atmosphere, so \NEMO\ is extended to incorporate … … 1297 1133 1298 1134 Physical processes related to ocean surface waves can be accounted by setting the logical variable 1299 \np {ln\_wave}\forcode{ = .true.} in \nam{sbc} namelist. In addition, specific flags accounting for1135 \np[=.true.]{ln_wave}{ln\_wave} in \nam{sbc}{sbc} namelist. In addition, specific flags accounting for 1300 1136 different processes should be activated as explained in the following sections. 1301 1137 1302 1138 Wave fields can be provided either in forced or coupled mode: 1303 1139 \begin{description} 1304 \item [forced mode]: wave fields should be defined through the \nam{sbc\_wave} namelist1140 \item [forced mode]: wave fields should be defined through the \nam{sbc_wave}{sbc\_wave} namelist 1305 1141 for external data names, locations, frequency, interpolation and all the miscellanous options allowed by 1306 1142 Input Data generic Interface (see \autoref{sec:SBC_input}). 1307 \item [coupled mode]: \NEMO\ and an external wave model can be coupled by setting \np{ln\_cpl} \forcode{= .true.}1308 in \nam{sbc} namelist and filling the \nam{sbc\_cpl} namelist.1143 \item [coupled mode]: \NEMO\ and an external wave model can be coupled by setting \np[=.true.]{ln_cpl}{ln\_cpl} 1144 in \nam{sbc}{sbc} namelist and filling the \nam{sbc_cpl}{sbc\_cpl} namelist. 1309 1145 \end{description} 1310 1146 1311 1312 % ---------------------------------------------------------------- 1313 % Neutral drag coefficient from wave model (ln_cdgw) 1314 1315 % ---------------------------------------------------------------- 1316 \subsection[Neutral drag coefficient from wave model (\texttt{ln\_cdgw})] 1317 {Neutral drag coefficient from wave model (\protect\np{ln\_cdgw})} 1147 %% ================================================================================================= 1148 \subsection[Neutral drag coefficient from wave model (\forcode{ln_cdgw})]{Neutral drag coefficient from wave model (\protect\np{ln_cdgw}{ln\_cdgw})} 1318 1149 \label{subsec:SBC_wave_cdgw} 1319 1150 1320 1151 The neutral surface drag coefficient provided from an external data source (\ie\ a wave model), 1321 can be used by setting the logical variable \np {ln\_cdgw} \forcode{= .true.} in \nam{sbc} namelist.1152 can be used by setting the logical variable \np[=.true.]{ln_cdgw}{ln\_cdgw} in \nam{sbc}{sbc} namelist. 1322 1153 Then using the routine \rou{sbcblk\_algo\_ncar} and starting from the neutral drag coefficent provided, 1323 1154 the drag coefficient is computed according to the stable/unstable conditions of the 1324 1155 air-sea interface following \citet{large.yeager_rpt04}. 1325 1156 1326 1327 % ---------------------------------------------------------------- 1328 % 3D Stokes Drift (ln_sdw, nn_sdrift) 1329 % ---------------------------------------------------------------- 1330 \subsection[3D Stokes Drift (\texttt{ln\_sdw}, \texttt{nn\_sdrift})] 1331 {3D Stokes Drift (\protect\np{ln\_sdw, nn\_sdrift})} 1157 %% ================================================================================================= 1158 \subsection[3D Stokes Drift (\forcode{ln_sdw} \& \forcode{nn_sdrift})]{3D Stokes Drift (\protect\np{ln_sdw}{ln\_sdw} \& \np{nn_sdrift}{nn\_sdrift})} 1332 1159 \label{subsec:SBC_wave_sdw} 1333 1160 … … 1343 1170 1344 1171 \[ 1345 % \label{eq: sbc_wave_sdw}1172 % \label{eq:SBC_wave_sdw} 1346 1173 \mathbf{U}_{st} = \frac{16{\pi^3}} {g} 1347 1174 \int_0^\infty \int_{-\pi}^{\pi} (cos{\theta},sin{\theta}) {f^3} … … 1358 1185 To simplify, it is customary to use approximations to the full Stokes profile. 1359 1186 Three possible parameterizations for the calculation for the approximate Stokes drift velocity profile 1360 are included in the code through the \np{nn \_sdrift} parameter once provided the surface Stokes drift1187 are included in the code through the \np{nn_sdrift}{nn\_sdrift} parameter once provided the surface Stokes drift 1361 1188 $\mathbf{U}_{st |_{z=0}}$ which is evaluated by an external wave model that accurately reproduces the wave spectra 1362 1189 and makes possible the estimation of the surface Stokes drift for random directional waves in … … 1364 1191 1365 1192 \begin{description} 1366 \item [\np{nn\_sdrift} = 0]: exponential integral profile parameterization proposed by1193 \item [{\np{nn_sdrift}{nn\_sdrift} = 0}]: exponential integral profile parameterization proposed by 1367 1194 \citet{breivik.janssen.ea_JPO14}: 1368 1195 1369 1196 \[ 1370 % \label{eq: sbc_wave_sdw_0a}1197 % \label{eq:SBC_wave_sdw_0a} 1371 1198 \mathbf{U}_{st} \cong \mathbf{U}_{st |_{z=0}} \frac{\mathrm{e}^{-2k_ez}} {1-8k_ez} 1372 1199 \] … … 1375 1202 1376 1203 \[ 1377 % \label{eq: sbc_wave_sdw_0b}1204 % \label{eq:SBC_wave_sdw_0b} 1378 1205 k_e = \frac{|\mathbf{U}_{\left.st\right|_{z=0}}|} {|T_{st}|} 1379 1206 \quad \text{and }\ … … 1383 1210 where $H_s$ is the significant wave height and $\omega$ is the wave frequency. 1384 1211 1385 \item [\np{nn\_sdrift} = 1]: velocity profile based on the Phillips spectrum which is considered to be a1212 \item [{\np{nn_sdrift}{nn\_sdrift} = 1}]: velocity profile based on the Phillips spectrum which is considered to be a 1386 1213 reasonable estimate of the part of the spectrum mostly contributing to the Stokes drift velocity near the surface 1387 1214 \citep{breivik.bidlot.ea_OM16}: 1388 1215 1389 1216 \[ 1390 % \label{eq: sbc_wave_sdw_1}1217 % \label{eq:SBC_wave_sdw_1} 1391 1218 \mathbf{U}_{st} \cong \mathbf{U}_{st |_{z=0}} \Big[exp(2k_pz)-\beta \sqrt{-2 \pi k_pz} 1392 1219 \textit{ erf } \Big(\sqrt{-2 k_pz}\Big)\Big] … … 1395 1222 where $erf$ is the complementary error function and $k_p$ is the peak wavenumber. 1396 1223 1397 \item [\np{nn\_sdrift} = 2]: velocity profile based on the Phillips spectrum as for \np{nn\_sdrift} = 11224 \item [{\np{nn_sdrift}{nn\_sdrift} = 2}]: velocity profile based on the Phillips spectrum as for \np{nn_sdrift}{nn\_sdrift} = 1 1398 1225 but using the wave frequency from a wave model. 1399 1226 … … 1404 1231 1405 1232 \[ 1406 % \label{eq: sbc_wave_eta_sdw}1233 % \label{eq:SBC_wave_eta_sdw} 1407 1234 \frac{\partial{\eta}}{\partial{t}} = 1408 1235 -\nabla_h \int_{-H}^{\eta} (\mathbf{U} + \mathbf{U}_{st}) dz … … 1416 1243 1417 1244 \[ 1418 % \label{eq: sbc_wave_tra_sdw}1245 % \label{eq:SBC_wave_tra_sdw} 1419 1246 \frac{\partial{c}}{\partial{t}} = 1420 1247 - (\mathbf{U} + \mathbf{U}_{st}) \cdot \nabla{c} 1421 1248 \] 1422 1249 1423 1424 % ---------------------------------------------------------------- 1425 % Stokes-Coriolis term (ln_stcor) 1426 % ---------------------------------------------------------------- 1427 \subsection[Stokes-Coriolis term (\texttt{ln\_stcor})] 1428 {Stokes-Coriolis term (\protect\np{ln\_stcor})} 1250 %% ================================================================================================= 1251 \subsection[Stokes-Coriolis term (\forcode{ln_stcor})]{Stokes-Coriolis term (\protect\np{ln_stcor}{ln\_stcor})} 1429 1252 \label{subsec:SBC_wave_stcor} 1430 1253 … … 1434 1257 In order to include this term, once evaluated the Stokes drift (using one of the 3 possible 1435 1258 approximations described in \autoref{subsec:SBC_wave_sdw}), 1436 \np{ln\_stcor}\forcode{ = .true.} has to be set. 1437 1438 1439 % ---------------------------------------------------------------- 1440 % Waves modified stress (ln_tauwoc, ln_tauw) 1441 % ---------------------------------------------------------------- 1442 \subsection[Wave modified stress (\texttt{ln\_tauwoc}, \texttt{ln\_tauw})] 1443 {Wave modified sress (\protect\np{ln\_tauwoc, ln\_tauw})} 1259 \np[=.true.]{ln_stcor}{ln\_stcor} has to be set. 1260 1261 %% ================================================================================================= 1262 \subsection[Wave modified stress (\forcode{ln_tauwoc} \& \forcode{ln_tauw})]{Wave modified sress (\protect\np{ln_tauwoc}{ln\_tauwoc} \& \np{ln_tauw}{ln\_tauw})} 1444 1263 \label{subsec:SBC_wave_tauw} 1445 1264 … … 1453 1272 1454 1273 \[ 1455 % \label{eq: sbc_wave_tauoc}1274 % \label{eq:SBC_wave_tauoc} 1456 1275 \tau_{oc,a} = \tau_a - \tau_w 1457 1276 \] … … 1461 1280 1462 1281 \[ 1463 % \label{eq: sbc_wave_tauw}1282 % \label{eq:SBC_wave_tauw} 1464 1283 \tau_w = \rho g \int {\frac{dk}{c_p} (S_{in}+S_{nl}+S_{diss})} 1465 1284 \] … … 1475 1294 1476 1295 The wave stress derived from an external wave model can be provided either through the normalized 1477 wave stress into the ocean by setting \np{ln\_tauwoc}\forcode{ = .true.}, or through the zonal and 1478 meridional stress components by setting \np{ln\_tauw}\forcode{ = .true.}. 1479 1480 1481 1482 % ================================================================ 1483 % Miscellanea options 1484 % ================================================================ 1296 wave stress into the ocean by setting \np[=.true.]{ln_tauwoc}{ln\_tauwoc}, or through the zonal and 1297 meridional stress components by setting \np[=.true.]{ln_tauw}{ln\_tauw}. 1298 1299 %% ================================================================================================= 1485 1300 \section{Miscellaneous options} 1486 1301 \label{sec:SBC_misc} 1487 1302 1488 1489 % ------------------------------------------------------------------------------------------------------------- 1490 % Diurnal cycle 1491 % ------------------------------------------------------------------------------------------------------------- 1492 \subsection[Diurnal cycle (\textit{sbcdcy.F90})] 1493 {Diurnal cycle (\protect\mdl{sbcdcy})} 1303 %% ================================================================================================= 1304 \subsection[Diurnal cycle (\textit{sbcdcy.F90})]{Diurnal cycle (\protect\mdl{sbcdcy})} 1494 1305 \label{subsec:SBC_dcy} 1495 %------------------------------------------namsbc------------------------------------------------------------- 1496 % 1497 \nlst{namsbc} 1498 %------------------------------------------------------------------------------------------------------------- 1499 1500 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1306 1501 1307 \begin{figure}[!t] 1502 \begin{center} 1503 \includegraphics[width=\textwidth]{Fig_SBC_diurnal} 1504 \caption{ 1505 \protect\label{fig:SBC_diurnal} 1506 Example of recontruction of the diurnal cycle variation of short wave flux from daily mean values. 1507 The reconstructed diurnal cycle (black line) is chosen as 1508 the mean value of the analytical cycle (blue line) over a time step, 1509 not as the mid time step value of the analytically cycle (red square). 1510 From \citet{bernie.guilyardi.ea_CD07}. 1511 } 1512 \end{center} 1308 \centering 1309 \includegraphics[width=0.66\textwidth]{Fig_SBC_diurnal} 1310 \caption[Reconstruction of the diurnal cycle variation of short wave flux]{ 1311 Example of reconstruction of the diurnal cycle variation of short wave flux from 1312 daily mean values. 1313 The reconstructed diurnal cycle (black line) is chosen as 1314 the mean value of the analytical cycle (blue line) over a time step, 1315 not as the mid time step value of the analytically cycle (red square). 1316 From \citet{bernie.guilyardi.ea_CD07}.} 1317 \label{fig:SBC_diurnal} 1513 1318 \end{figure} 1514 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>1515 1319 1516 1320 \cite{bernie.woolnough.ea_JC05} have shown that to capture 90$\%$ of the diurnal variability of SST requires a vertical resolution in upper ocean of 1~m or better and a temporal resolution of the surface fluxes of 3~h or less. … … 1521 1325 assuming that the diurnal cycle of SWF is a scaling of the top of the atmosphere diurnal cycle of incident SWF. 1522 1326 The \cite{bernie.guilyardi.ea_CD07} reconstruction algorithm is available in \NEMO\ by 1523 setting \np {ln\_dm2dc}\forcode{ = .true.} (a \textit{\nam{sbc}} namelist variable) when1524 using a bulk formulation (\np {ln\_blk}\forcode{ = .true.}) or1525 the flux formulation (\np {ln\_flx}\forcode{ = .true.}).1327 setting \np[=.true.]{ln_dm2dc}{ln\_dm2dc} (a \textit{\nam{sbc}{sbc}} namelist variable) when 1328 using a bulk formulation (\np[=.true.]{ln_blk}{ln\_blk}) or 1329 the flux formulation (\np[=.true.]{ln_flx}{ln\_flx}). 1526 1330 The reconstruction is performed in the \mdl{sbcdcy} module. 1527 1331 The detail of the algoritm used can be found in the appendix~A of \cite{bernie.guilyardi.ea_CD07}. … … 1529 1333 a given time step is the mean value of the analytical cycle over this time step (\autoref{fig:SBC_diurnal}). 1530 1334 The use of diurnal cycle reconstruction requires the input SWF to be daily 1531 (\ie\ a frequency of 24 hours and a time interpolation set to true in \np{sn \_qsr} namelist parameter).1335 (\ie\ a frequency of 24 hours and a time interpolation set to true in \np{sn_qsr}{sn\_qsr} namelist parameter). 1532 1336 Furthermore, it is recommended to have a least 8 surface module time steps per day, 1533 1337 that is $\rdt \ nn\_fsbc < 10,800~s = 3~h$. … … 1535 1339 one every 2~hours (from 1am to 11pm). 1536 1340 1537 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>1538 1341 \begin{figure}[!t] 1539 \begin{center} 1540 \includegraphics[width=\textwidth]{Fig_SBC_dcy} 1541 \caption{ 1542 \protect\label{fig:SBC_dcy} 1543 Example of recontruction of the diurnal cycle variation of short wave flux from 1544 daily mean values on an ORCA2 grid with a time sampling of 2~hours (from 1am to 11pm). 1545 The display is on (i,j) plane. 1546 } 1547 \end{center} 1342 \centering 1343 \includegraphics[width=0.66\textwidth]{Fig_SBC_dcy} 1344 \caption[Reconstruction of the diurnal cycle variation of short wave flux on an ORCA2 grid]{ 1345 Example of reconstruction of the diurnal cycle variation of short wave flux from 1346 daily mean values on an ORCA2 grid with a time sampling of 2~hours (from 1am to 11pm). 1347 The display is on (i,j) plane.} 1348 \label{fig:SBC_dcy} 1548 1349 \end{figure} 1549 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>1550 1350 1551 1351 Note also that the setting a diurnal cycle in SWF is highly recommended when … … 1553 1353 an inconsistency between the scale of the vertical resolution and the forcing acting on that scale. 1554 1354 1555 1556 % ------------------------------------------------------------------------------------------------------------- 1557 % Rotation of vector pairs onto the model grid directions 1558 % ------------------------------------------------------------------------------------------------------------- 1355 %% ================================================================================================= 1559 1356 \subsection{Rotation of vector pairs onto the model grid directions} 1560 1357 \label{subsec:SBC_rotation} 1561 1358 1562 When using a flux (\np {ln\_flx}\forcode{ = .true.}) or bulk (\np{ln\_blk}\forcode{ = .true.}) formulation,1359 When using a flux (\np[=.true.]{ln_flx}{ln\_flx}) or bulk (\np[=.true.]{ln_blk}{ln\_blk}) formulation, 1563 1360 pairs of vector components can be rotated from east-north directions onto the local grid directions. 1564 1361 This is particularly useful when interpolation on the fly is used since here any vectors are likely to … … 1573 1370 The rot\_rep routine from the \mdl{geo2ocean} module is used to perform the rotation. 1574 1371 1575 1576 % ------------------------------------------------------------------------------------------------------------- 1577 % Surface restoring to observed SST and/or SSS 1578 % ------------------------------------------------------------------------------------------------------------- 1579 \subsection[Surface restoring to observed SST and/or SSS (\textit{sbcssr.F90})] 1580 {Surface restoring to observed SST and/or SSS (\protect\mdl{sbcssr})} 1372 %% ================================================================================================= 1373 \subsection[Surface restoring to observed SST and/or SSS (\textit{sbcssr.F90})]{Surface restoring to observed SST and/or SSS (\protect\mdl{sbcssr})} 1581 1374 \label{subsec:SBC_ssr} 1582 %------------------------------------------namsbc_ssr---------------------------------------------------- 1583 1584 \nlst{namsbc_ssr} 1585 %------------------------------------------------------------------------------------------------------------- 1586 1587 Options are defined through the \nam{sbc\_ssr} namelist variables. 1588 On forced mode using a flux formulation (\np{ln\_flx}\forcode{ = .true.}), 1375 1376 \begin{listing} 1377 \nlst{namsbc_ssr} 1378 \caption{\forcode{&namsbc_ssr}} 1379 \label{lst:namsbc_ssr} 1380 \end{listing} 1381 1382 Options are defined through the \nam{sbc_ssr}{sbc\_ssr} namelist variables. 1383 On forced mode using a flux formulation (\np[=.true.]{ln_flx}{ln\_flx}), 1589 1384 a feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$: 1590 1385 \[ 1591 % \label{eq: sbc_dmp_q}1386 % \label{eq:SBC_dmp_q} 1592 1387 Q_{ns} = Q_{ns}^o + \frac{dQ}{dT} \left( \left. T \right|_{k=1} - SST_{Obs} \right) 1593 1388 \] … … 1602 1397 1603 1398 \begin{equation} 1604 \label{eq: sbc_dmp_emp}1399 \label{eq:SBC_dmp_emp} 1605 1400 \textit{emp} = \textit{emp}_o + \gamma_s^{-1} e_{3t} \frac{ \left(\left.S\right|_{k=1}-SSS_{Obs}\right)} 1606 1401 {\left.S\right|_{k=1}} … … 1613 1408 $\left.S\right|_{k=1}$ is the model surface layer salinity and 1614 1409 $\gamma_s$ is a negative feedback coefficient which is provided as a namelist parameter. 1615 Unlike heat flux, there is no physical justification for the feedback term in \autoref{eq: sbc_dmp_emp} as1410 Unlike heat flux, there is no physical justification for the feedback term in \autoref{eq:SBC_dmp_emp} as 1616 1411 the atmosphere does not care about ocean surface salinity \citep{madec.delecluse_IWN97}. 1617 1412 The SSS restoring term should be viewed as a flux correction on freshwater fluxes to 1618 1413 reduce the uncertainties we have on the observed freshwater budget. 1619 1414 1620 1621 % ------------------------------------------------------------------------------------------------------------- 1622 % Handling of ice-covered area 1623 % ------------------------------------------------------------------------------------------------------------- 1415 %% ================================================================================================= 1624 1416 \subsection{Handling of ice-covered area (\textit{sbcice\_...})} 1625 1417 \label{subsec:SBC_ice-cover} … … 1627 1419 The presence at the sea surface of an ice covered area modifies all the fluxes transmitted to the ocean. 1628 1420 There are several way to handle sea-ice in the system depending on 1629 the value of the \np{nn \_ice} namelist parameter found in \nam{sbc} namelist.1421 the value of the \np{nn_ice}{nn\_ice} namelist parameter found in \nam{sbc}{sbc} namelist. 1630 1422 \begin{description} 1631 \item[nn\_ice = 0] 1632 there will never be sea-ice in the computational domain. 1423 \item [nn\_ice = 0] there will never be sea-ice in the computational domain. 1633 1424 This is a typical namelist value used for tropical ocean domain. 1634 1425 The surface fluxes are simply specified for an ice-free ocean. 1635 1426 No specific things is done for sea-ice. 1636 \item[nn\_ice = 1] 1637 sea-ice can exist in the computational domain, but no sea-ice model is used. 1427 \item [nn\_ice = 1] sea-ice can exist in the computational domain, but no sea-ice model is used. 1638 1428 An observed ice covered area is read in a file. 1639 1429 Below this area, the SST is restored to the freezing point and … … 1646 1436 is usually referred as the \textit{ice-if} model. 1647 1437 It can be found in the \mdl{sbcice\_if} module. 1648 \item[nn\_ice = 2 or more] 1649 A full sea ice model is used. 1438 \item [nn\_ice = 2 or more] A full sea ice model is used. 1650 1439 This model computes the ice-ocean fluxes, 1651 1440 that are combined with the air-sea fluxes using the ice fraction of each model cell to … … 1659 1448 %GS: ocean-ice (SI3) interface is not located in SBC directory anymore, so it should be included in SI3 doc 1660 1449 1661 1662 % ------------------------------------------------------------------------------------------------------------- 1663 % CICE-ocean Interface 1664 % ------------------------------------------------------------------------------------------------------------- 1665 \subsection[Interface to CICE (\textit{sbcice\_cice.F90})] 1666 {Interface to CICE (\protect\mdl{sbcice\_cice})} 1450 %% ================================================================================================= 1451 \subsection[Interface to CICE (\textit{sbcice\_cice.F90})]{Interface to CICE (\protect\mdl{sbcice\_cice})} 1667 1452 \label{subsec:SBC_cice} 1668 1453 … … 1675 1460 (seek advice from UKMO if necessary). 1676 1461 Currently, the code is only designed to work when using the NCAR forcing option for \NEMO\ %GS: still true ? 1677 (with \textit{calc\_strair}\forcode{ = .true.} and \textit{calc\_Tsfc}\forcode{ =.true.} in the CICE name-list),1462 (with \textit{calc\_strair}\forcode{=.true.} and \textit{calc\_Tsfc}\forcode{=.true.} in the CICE name-list), 1678 1463 or alternatively when \NEMO\ is coupled to the HadGAM3 atmosphere model 1679 (with \textit{calc\_strair}\forcode{ = .false.} and \textit{calc\_Tsfc}\forcode{ =false}).1680 The code is intended to be used with \np{nn \_fsbc} set to 11464 (with \textit{calc\_strair}\forcode{=.false.} and \textit{calc\_Tsfc}\forcode{=false}). 1465 The code is intended to be used with \np{nn_fsbc}{nn\_fsbc} set to 1 1681 1466 (although coupling ocean and ice less frequently should work, 1682 1467 it is possible the calculation of some of the ocean-ice fluxes needs to be modified slightly - … … 1694 1479 there is no sea ice. 1695 1480 1696 1697 % ------------------------------------------------------------------------------------------------------------- 1698 % Freshwater budget control 1699 % ------------------------------------------------------------------------------------------------------------- 1700 \subsection[Freshwater budget control (\textit{sbcfwb.F90})] 1701 {Freshwater budget control (\protect\mdl{sbcfwb})} 1481 %% ================================================================================================= 1482 \subsection[Freshwater budget control (\textit{sbcfwb.F90})]{Freshwater budget control (\protect\mdl{sbcfwb})} 1702 1483 \label{subsec:SBC_fwb} 1703 1484 … … 1707 1488 1708 1489 \begin{description} 1709 \item[\np{nn\_fwb}\forcode{ = 0}] 1710 no control at all. 1490 \item [{\np[=0]{nn_fwb}{nn\_fwb}}] no control at all. 1711 1491 The mean sea level is free to drift, and will certainly do so. 1712 \item[\np{nn\_fwb}\forcode{ = 1}] 1713 global mean \textit{emp} set to zero at each model time step. 1492 \item [{\np[=1]{nn_fwb}{nn\_fwb}}] global mean \textit{emp} set to zero at each model time step. 1714 1493 %GS: comment below still relevant ? 1715 1494 %Note that with a sea-ice model, this technique only controls the mean sea level with linear free surface and no mass flux between ocean and ice (as it is implemented in the current ice-ocean coupling). 1716 \item[\np{nn\_fwb}\forcode{ = 2}] 1717 freshwater budget is adjusted from the previous year annual mean budget which 1495 \item [{\np[=2]{nn_fwb}{nn\_fwb}}] freshwater budget is adjusted from the previous year annual mean budget which 1718 1496 is read in the \textit{EMPave\_old.dat} file. 1719 1497 As the model uses the Boussinesq approximation, the annual mean fresh water budget is simply evaluated from … … 1743 1521 % in ocean-ice models. 1744 1522 1745 1746 \biblio 1747 1748 \pindex 1523 \onlyinsubfile{\input{../../global/epilogue}} 1749 1524 1750 1525 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_STO.tex
r11435 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter stochastic parametrization of EOS (STO) 6 % ================================================================ 4 7 5 \chapter{Stochastic Parametrization of EOS (STO)} 8 6 \label{chap:STO} 9 7 8 \thispagestyle{plain} 9 10 10 \chaptertoc 11 12 \paragraph{Changes record} ~\\ 13 14 {\footnotesize 15 \begin{tabularx}{\textwidth}{l||X|X} 16 Release & Author(s) & Modifications \\ 17 \hline 18 {\em 4.0} & {\em ...} & {\em ...} \\ 19 {\em 3.6} & {\em ...} & {\em ...} \\ 20 {\em 3.4} & {\em ...} & {\em ...} \\ 21 {\em <=3.4} & {\em ...} & {\em ...} 22 \end{tabularx} 23 } 11 24 12 25 % \vfill 13 26 % \begin{figure}[b] 27 %% ================================================================================================= 14 28 % \subsubsection*{Changes record} 15 29 % \begin{tabular}{l||l|m{0.65\linewidth}} … … 20 34 % \end{figure} 21 35 22 Authors: \\ 23 C. Levy release 4.0.1 update \\ 24 P.-A. Bouttier release 3.6 inital version 25 26 \newpage 36 \clearpage 27 37 28 38 As a result of the nonlinearity of the seawater equation of state, unresolved scales represent a major source of uncertainties in the computation of the large-scale horizontal density gradient from the large-scale temperature and salinity fields. Following \cite{brankart_OM13}, the impact of these uncertainties can be simulated by random processes representing unresolved T/S fluctuations. The Stochastic Parametrization of EOS (STO) module implements this parametrization. … … 30 40 As detailed in \cite{brankart_OM13}, the stochastic formulation of the equation of state can be written as: 31 41 \begin{equation} 32 \label{eq: eos_sto}42 \label{eq:STO_eos_sto} 33 43 \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)] \} 34 44 \end{equation} … … 37 47 the scalar product of the respective local T/S gradients with random walks $\mathbf{\xi}$: 38 48 \begin{equation} 39 \label{eq: sto_pert}49 \label{eq:STO_sto_pert} 40 50 \Delta T_i = \mathbf{\xi}_i \cdot \nabla T \qquad \hbox{and} \qquad \Delta S_i = \mathbf{\xi}_i \cdot \nabla S 41 51 \end{equation} … … 44 54 $\mathbf{\xi}$ are uncorrelated over the horizontal and fully correlated along the vertical. 45 55 46 56 %% ================================================================================================= 47 57 \section{Stochastic processes} 48 58 \label{sec:STO_the_details} … … 59 69 60 70 \begin{equation} 61 \label{eq: autoreg}71 \label{eq:STO_autoreg} 62 72 \xi^{(i)}_{k+1} = a^{(i)} \xi^{(i)}_k + b^{(i)} w^{(i)} + c^{(i)} 63 73 \end{equation} … … 69 79 70 80 \begin{itemize} 71 \item 72 for order~1 processes, $w^{(i)}$ is a Gaussian white noise, with zero mean and standard deviation equal to~1, 81 \item for order~1 processes, $w^{(i)}$ is a Gaussian white noise, with zero mean and standard deviation equal to~1, 73 82 and the parameters $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by: 74 83 75 84 \[ 76 % \label{eq: ord1}85 % \label{eq:STO_ord1} 77 86 \left\{ 78 87 \begin{array}{l} … … 84 93 \] 85 94 86 \item 87 for order~$n>1$ processes, $w^{(i)}$ is an order~$n-1$ autoregressive process, with zero mean, 95 \item for order~$n>1$ processes, $w^{(i)}$ is an order~$n-1$ autoregressive process, with zero mean, 88 96 standard deviation equal to~$\sigma^{(i)}$; 89 97 correlation timescale equal to~$\tau^{(i)}$; … … 91 99 92 100 \begin{equation} 93 \label{eq: ord2}101 \label{eq:STO_ord2} 94 102 \left\{ 95 103 \begin{array}{l} … … 107 115 \noindent 108 116 In this way, higher order processes can be easily generated recursively using the same piece of code implementing 109 \autoref{eq: autoreg}, and using successive processes from order $0$ to~$n-1$ as~$w^{(i)}$.110 The parameters in \autoref{eq: ord2} are computed so that this recursive application of111 \autoref{eq: autoreg} leads to processes with the required standard deviation and correlation timescale,117 \autoref{eq:STO_autoreg}, and using successive processes from order $0$ to~$n-1$ as~$w^{(i)}$. 118 The parameters in \autoref{eq:STO_ord2} are computed so that this recursive application of 119 \autoref{eq:STO_autoreg} leads to processes with the required standard deviation and correlation timescale, 112 120 with the additional condition that the $n-1$ first derivatives of the autocorrelation function are equal to 113 121 zero at~$t=0$, so that the resulting processes become smoother and smoother as $n$ increases. … … 122 130 for any other configuration or resolution of the model. 123 131 132 %% ================================================================================================= 124 133 \section{Implementation details} 125 134 \label{sec:STO_thech_details} 126 127 135 128 136 The code implementing stochastic parametrisation is located in the src/OCE/STO directory. … … 135 143 136 144 \mdl{stopts} : stochastic parametrisation associated with the non-linearity of the equation of 137 seawater, implementing \autoref{eq: sto_pert} so as specifics in the equation of state138 implementing \autoref{eq: eos_sto}.145 seawater, implementing \autoref{eq:STO_sto_pert} so as specifics in the equation of state 146 implementing \autoref{eq:STO_eos_sto}. 139 147 % \end{description} 140 148 141 149 The \mdl{stopar} module includes three public routines called in the model: 142 150 143 (\rou{sto\_par}) is a direct implementation of \autoref{eq: autoreg},151 (\rou{sto\_par}) is a direct implementation of \autoref{eq:STO_autoreg}, 144 152 applied at each model grid point (in 2D or 3D), and called at each model time step ($k$) to 145 153 update every autoregressive process ($i=1,\ldots,m$). … … 154 162 155 163 (\rou{sto\_rst\_write}) writes a restart file 156 (which suffix name is given by \np{cn \_storst\_out} namelist parameter) containing the current value of164 (which suffix name is given by \np{cn_storst_out}{cn\_storst\_out} namelist parameter) containing the current value of 157 165 all autoregressive processes to allow creating the file needed for a restart. 158 166 This restart file also contains the current state of the random number generator. 159 When \np{ln \_rststo} is set to \forcode{.true.}),160 the restart file (which suffix name is given by \np{cn \_storst\_in} namelist parameter) is read by167 When \np{ln_rststo}{ln\_rststo} is set to \forcode{.true.}), 168 the restart file (which suffix name is given by \np{cn_storst_in}{cn\_storst\_in} namelist parameter) is read by 161 169 the initialization routine (\rou{sto\_par\_init}). 162 170 The simulation will continue exactly as if it was not interrupted only 163 when \np{ln \_rstseed} is set to \forcode{.true.},171 when \np{ln_rstseed}{ln\_rstseed} is set to \forcode{.true.}, 164 172 \ie\ when the state of the random number generator is read in the restart file.\\ 165 173 … … 170 178 Options and parameters \\ 171 179 172 The \np{ln \_sto\_eos} namelist variable activates stochastic parametrisation of equation of state.180 The \np{ln_sto_eos}{ln\_sto\_eos} namelist variable activates stochastic parametrisation of equation of state. 173 181 By default it set to \forcode{.false.}) and not active. 174 The set of parameters is available in \nam{sto} namelist182 The set of parameters is available in \nam{sto}{sto} namelist 175 183 (only the subset for equation of state stochastic parametrisation is listed below): 176 %---------------------------------------namsto-------------------------------------------------- 177 178 \nlst{namsto} 179 %-------------------------------------------------------------------------------------------------------------- 184 185 \begin{listing} 186 \nlst{namsto} 187 \caption{\forcode{&namsto}} 188 \label{lst:namsto} 189 \end{listing} 180 190 181 191 The variables of stochastic paramtetrisation itself (based on the global 2° experiments as in \cite{brankart_OM13} are: 182 192 183 193 \begin{description} 184 \item[\np{nn\_sto\_eos}:] number of independent random walks 185 \item[\np{rn\_eos\_stdxy}:] random walk horizontal standard deviation (in grid points) 186 \item[\np{rn\_eos\_stdz}:] random walk vertical standard deviation (in grid points) 187 \item[\np{rn\_eos\_tcor}:] random walk time correlation (in timesteps) 188 \item[\np{nn\_eos\_ord}:] order of autoregressive processes 189 \item[\np{nn\_eos\_flt}:] passes of Laplacian filter 190 \item[\np{rn\_eos\_lim}:] limitation factor (default = 3.0) 194 \item [{\np{nn_sto_eos}{nn\_sto\_eos}:}] number of independent random walks 195 \item [{\np{rn_eos_stdxy}{rn\_eos\_stdxy}:}] random walk horizontal standard deviation 196 (in grid points) 197 \item [{\np{rn_eos_stdz}{rn\_eos\_stdz}:}] random walk vertical standard deviation 198 (in grid points) 199 \item [{\np{rn_eos_tcor}{rn\_eos\_tcor}:}] random walk time correlation (in timesteps) 200 \item [{\np{nn_eos_ord}{nn\_eos\_ord}:}] order of autoregressive processes 201 \item [{\np{nn_eos_flt}{nn\_eos\_flt}:}] passes of Laplacian filter 202 \item [{\np{rn_eos_lim}{rn\_eos\_lim}:}] limitation factor (default = 3.0) 191 203 \end{description} 192 204 193 205 The first four parameters define the stochastic part of equation of state. 194 \biblio 195 196 \pindex 206 207 \onlyinsubfile{\input{../../global/epilogue}} 197 208 198 209 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_TRA.tex
r11459 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter 1 ——— Ocean Tracers (TRA) 6 % ================================================================ 4 7 5 \chapter{Ocean Tracers (TRA)} 8 6 \label{chap:TRA} 9 7 8 \thispagestyle{plain} 9 10 10 \chaptertoc 11 12 \paragraph{Changes record} ~\\ 13 14 {\footnotesize 15 \begin{tabularx}{\textwidth}{l||X|X} 16 Release & Author(s) & Modifications \\ 17 \hline 18 {\em 4.0} & {\em Christian \'{E}th\'{e} } & {\em Review } \\ 19 {\em 3.6} & {\em Gurvan Madec } & {\em Update } \\ 20 {\em $\leq$ 3.4} & {\em Gurvan Madec and S\'{e}bastien Masson} & {\em First version} \\ 21 \end{tabularx} 22 } 23 24 \clearpage 11 25 12 26 % missing/update … … 19 33 the tracer equations are available depending on the vertical coordinate used and on the physics used. 20 34 In all the equations presented here, the masking has been omitted for simplicity. 21 One must be aware that all the quantities are masked fields and that each time a mean or22 difference operator is used, the resulting field is multiplied by a mask.35 One must be aware that all the quantities are masked fields and that 36 each time a mean or difference operator is used, the resulting field is multiplied by a mask. 23 37 24 38 The two active tracers are potential temperature and salinity. … … 31 45 NXT stands for next, referring to the time-stepping. 32 46 From left to right, the terms on the rhs of the tracer equations are the advection (ADV), 33 the lateral diffusion (LDF), the vertical diffusion (ZDF), the contributions from the external forcings 34 (SBC: Surface Boundary Condition, QSR: penetrative Solar Radiation, and BBC: Bottom Boundary Condition), 35 the contribution from the bottom boundary Layer (BBL) parametrisation, and an internal damping (DMP) term. 47 the lateral diffusion (LDF), the vertical diffusion (ZDF), 48 the contributions from the external forcings (SBC: Surface Boundary Condition, 49 QSR: penetrative Solar Radiation, and BBC: Bottom Boundary Condition), 50 the contribution from the bottom boundary Layer (BBL) parametrisation, 51 and an internal damping (DMP) term. 36 52 The terms QSR, BBC, BBL and DMP are optional. 37 53 The external forcings and parameterisations require complex inputs and complex calculations … … 39 55 LDF and ZDF modules and described in \autoref{chap:SBC}, \autoref{chap:LDF} and 40 56 \autoref{chap:ZDF}, respectively. 41 Note that \mdl{tranpc}, the non-penetrative convection module, although located in42 the \path{./src/OCE/TRA} directory as it directly modifies the tracer fields,57 Note that \mdl{tranpc}, the non-penetrative convection module, 58 although located in the \path{./src/OCE/TRA} directory as it directly modifies the tracer fields, 43 59 is described with the model vertical physics (ZDF) together with 44 60 other available parameterization of convection. 45 61 46 In the present chapter we also describe the diagnostic equations used to compute the sea-water properties47 (density, Brunt-V\"{a}is\"{a}l\"{a} frequency, specific heat and freezing point with 48 associated modules \mdl{eosbn2} and \mdl{phycst}).62 In the present chapter we also describe the diagnostic equations used to 63 compute the sea-water properties (density, Brunt-V\"{a}is\"{a}l\"{a} frequency, specific heat and 64 freezing point with associated modules \mdl{eosbn2} and \mdl{phycst}). 49 65 50 66 The different options available to the user are managed by namelist logicals. … … 55 71 56 72 The user has the option of extracting each tendency term on the RHS of the tracer equation for output 57 (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}\forcode{ = .true.}), as described in \autoref{chap:DIA}. 58 59 % ================================================================ 60 % Tracer Advection 61 % ================================================================ 62 \section[Tracer advection (\textit{traadv.F90})] 63 {Tracer advection (\protect\mdl{traadv})} 73 (\np{ln_tra_trd}{ln\_tra\_trd} or \np[=.true.]{ln_tra_mxl}{ln\_tra\_mxl}), 74 as described in \autoref{chap:DIA}. 75 76 %% ================================================================================================= 77 \section[Tracer advection (\textit{traadv.F90})]{Tracer advection (\protect\mdl{traadv})} 64 78 \label{sec:TRA_adv} 65 %------------------------------------------namtra_adv----------------------------------------------------- 66 67 \nlst{namtra_adv} 68 %------------------------------------------------------------------------------------------------------------- 69 70 When considered (\ie\ when \np{ln\_traadv\_OFF} is not set to \forcode{.true.}), 79 80 \begin{listing} 81 \nlst{namtra_adv} 82 \caption{\forcode{&namtra_adv}} 83 \label{lst:namtra_adv} 84 \end{listing} 85 86 When considered (\ie\ when \np{ln_traadv_OFF}{ln\_traadv\_OFF} is not set to \forcode{.true.}), 71 87 the advection tendency of a tracer is expressed in flux form, 72 88 \ie\ as the divergence of the advective fluxes. 73 Its discrete expression is given by 74 \begin{equation} 75 \label{eq: tra_adv}89 Its discrete expression is given by: 90 \begin{equation} 91 \label{eq:TRA_adv} 76 92 ADV_\tau = - \frac{1}{b_t} \Big( \delta_i [ e_{2u} \, e_{3u} \; u \; \tau_u] 77 93 + \delta_j [ e_{1v} \, e_{3v} \; v \; \tau_v] \Big) … … 79 95 \end{equation} 80 96 where $\tau$ is either T or S, and $b_t = e_{1t} \, e_{2t} \, e_{3t}$ is the volume of $T$-cells. 81 The flux form in \autoref{eq:tra_adv} implicitly requires the use of the continuity equation. 82 Indeed, it is obtained by using the following equality: $\nabla \cdot (\vect U \, T) = \vect U \cdot \nabla T$ which 83 results from the use of the continuity equation, $\partial_t e_3 + e_3 \; \nabla \cdot \vect U = 0$ 84 (which reduces to $\nabla \cdot \vect U = 0$ in linear free surface, \ie\ \np{ln\_linssh}\forcode{ = .true.}). 85 Therefore it is of paramount importance to design the discrete analogue of the advection tendency so that 86 it is consistent with the continuity equation in order to enforce the conservation properties of 87 the continuous equations. 88 In other words, by setting $\tau = 1$ in (\autoref{eq:tra_adv}) we recover the discrete form of 89 the continuity equation which is used to calculate the vertical velocity. 90 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 91 \begin{figure}[!t] 92 \begin{center} 93 \includegraphics[width=\textwidth]{Fig_adv_scheme} 94 \caption{ 95 \protect\label{fig:adv_scheme} 96 Schematic representation of some ways used to evaluate the tracer value at $u$-point and 97 the amount of tracer exchanged between two neighbouring grid points. 98 Upsteam biased scheme (ups): 99 the upstream value is used and the black area is exchanged. 100 Piecewise parabolic method (ppm): 101 a parabolic interpolation is used and the black and dark grey areas are exchanged. 102 Monotonic upstream scheme for conservative laws (muscl): 103 a parabolic interpolation is used and black, dark grey and grey areas are exchanged. 104 Second order scheme (cen2): 105 the mean value is used and black, dark grey, grey and light grey areas are exchanged. 106 Note that this illustration does not include the flux limiter used in ppm and muscl schemes. 107 } 108 \end{center} 97 The flux form in \autoref{eq:TRA_adv} implicitly requires the use of the continuity equation. 98 Indeed, it is obtained by using the following equality: 99 $\nabla \cdot (\vect U \, T) = \vect U \cdot \nabla T$ which 100 results from the use of the continuity equation, 101 $\partial_t e_3 + e_3 \; \nabla \cdot \vect U = 0$ 102 (which reduces to $\nabla \cdot \vect U = 0$ in linear free surface, 103 \ie\ \np[=.true.]{ln_linssh}{ln\_linssh}). 104 Therefore it is of paramount importance to 105 design the discrete analogue of the advection tendency so that 106 it is consistent with the continuity equation in order to 107 enforce the conservation properties of the continuous equations. 108 In other words, by setting $\tau = 1$ in (\autoref{eq:TRA_adv}) we recover 109 the discrete form of the continuity equation which is used to calculate the vertical velocity. 110 \begin{figure} 111 \centering 112 \includegraphics[width=0.66\textwidth]{Fig_adv_scheme} 113 \caption[Ways to evaluate the tracer value and the amount of tracer exchanged]{ 114 Schematic representation of some ways used to evaluate the tracer value at $u$-point and 115 the amount of tracer exchanged between two neighbouring grid points. 116 Upsteam biased scheme (ups): 117 the upstream value is used and the black area is exchanged. 118 Piecewise parabolic method (ppm): 119 a parabolic interpolation is used and the black and dark grey areas are exchanged. 120 Monotonic upstream scheme for conservative laws (muscl): 121 a parabolic interpolation is used and black, dark grey and grey areas are exchanged. 122 Second order scheme (cen2): 123 the mean value is used and black, dark grey, grey and light grey areas are exchanged. 124 Note that this illustration does not include the flux limiter used in ppm and muscl schemes.} 125 \label{fig:TRA_adv_scheme} 109 126 \end{figure} 110 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 111 112 The key difference between the advection schemes available in \NEMO\ is the choice made in space and 113 time interpolation to define the value of the tracer at the velocity points 114 (\autoref{fig:adv_scheme}). 127 128 The key difference between the advection schemes available in \NEMO\ is the choice made in 129 space and time interpolation to define the value of the tracer at the velocity points 130 (\autoref{fig:TRA_adv_scheme}). 115 131 116 132 Along solid lateral and bottom boundaries a zero tracer flux is automatically specified, … … 119 135 120 136 \begin{description} 121 \item[linear free surface:] 122 (\np{ln\_linssh}\forcode{ = .true.}) 137 \item [linear free surface] (\np[=.true.]{ln_linssh}{ln\_linssh}) 123 138 the first level thickness is constant in time: 124 the vertical boundary condition is applied at the fixed surface $z = 0$ rather than on 125 the moving surface $z = \eta$. 126 There is a non-zero advective flux which is set for all advection schemes as 127 $\tau_w|_{k = 1/2} = T_{k = 1}$, \ie\ the product of surface velocity (at $z = 0$) by 128 the first level tracer value. 129 \item[non-linear free surface:] 130 (\np{ln\_linssh}\forcode{ = .false.}) 139 the vertical boundary condition is applied at the fixed surface $z = 0$ rather than 140 on the moving surface $z = \eta$. 141 There is a non-zero advective flux which is set for 142 all advection schemes as $\tau_w|_{k = 1/2} = T_{k = 1}$, 143 \ie\ the product of surface velocity (at $z = 0$) by the first level tracer value. 144 \item [non-linear free surface] (\np[=.false.]{ln_linssh}{ln\_linssh}) 131 145 convergence/divergence in the first ocean level moves the free surface up/down. 132 There is no tracer advection through it so that the advective fluxes through the surface are also zero. 146 There is no tracer advection through it so that 147 the advective fluxes through the surface are also zero. 133 148 \end{description} 134 149 135 150 In all cases, this boundary condition retains local conservation of tracer. 136 Global conservation is obtained in non-linear free surface case, but \textit{not} in the linear free surface case. 137 Nevertheless, in the latter case, it is achieved to a good approximation since 138 the non-conservative term is the product of the time derivative of the tracer and the free surface height, 139 two quantities that are not correlated \citep{roullet.madec_JGR00, griffies.pacanowski.ea_MWR01, campin.adcroft.ea_OM04}. 140 141 The velocity field that appears in (\autoref{eq:tra_adv} is 151 Global conservation is obtained in non-linear free surface case, 152 but \textit{not} in the linear free surface case. 153 Nevertheless, in the latter case, 154 it is achieved to a good approximation since the non-conservative term is 155 the product of the time derivative of the tracer and the free surface height, 156 two quantities that are not correlated 157 \citep{roullet.madec_JGR00, griffies.pacanowski.ea_MWR01, campin.adcroft.ea_OM04}. 158 159 The velocity field that appears in (\autoref{eq:TRA_adv} is 142 160 the centred (\textit{now}) \textit{effective} ocean velocity, \ie\ the \textit{eulerian} velocity 143 161 (see \autoref{chap:DYN}) plus the eddy induced velocity (\textit{eiv}) and/or … … 145 163 (see \autoref{chap:LDF}). 146 164 147 Several tracer advection scheme are proposed, namely a $2^{nd}$ or $4^{th}$ order centred schemes (CEN), 148 a $2^{nd}$ or $4^{th}$ order Flux Corrected Transport scheme (FCT), a Monotone Upstream Scheme for 149 Conservative Laws scheme (MUSCL), a $3^{rd}$ Upstream Biased Scheme (UBS, also often called UP3), 150 and a Quadratic Upstream Interpolation for Convective Kinematics with Estimated Streaming Terms scheme (QUICKEST). 151 The choice is made in the \nam{tra\_adv} namelist, by setting to \forcode{.true.} one of 152 the logicals \textit{ln\_traadv\_xxx}. 153 The corresponding code can be found in the \textit{traadv\_xxx.F90} module, where 154 \textit{xxx} is a 3 or 4 letter acronym corresponding to each scheme. 155 By default (\ie\ in the reference namelist, \textit{namelist\_ref}), all the logicals are set to \forcode{.false.}. 156 If the user does not select an advection scheme in the configuration namelist (\textit{namelist\_cfg}), 157 the tracers will \textit{not} be advected! 165 Several tracer advection scheme are proposed, 166 namely a $2^{nd}$ or $4^{th}$ order \textbf{CEN}tred schemes (CEN), 167 a $2^{nd}$ or $4^{th}$ order \textbf{F}lux \textbf{C}orrected \textbf{T}ransport scheme (FCT), 168 a \textbf{M}onotone \textbf{U}pstream \textbf{S}cheme for 169 \textbf{C}onservative \textbf{L}aws scheme (MUSCL), 170 a $3^{rd}$ \textbf{U}pstream \textbf{B}iased \textbf{S}cheme (UBS, also often called UP3), 171 and a \textbf{Q}uadratic \textbf{U}pstream \textbf{I}nterpolation for 172 \textbf{C}onvective \textbf{K}inematics with 173 \textbf{E}stimated \textbf{S}treaming \textbf{T}erms scheme (QUICKEST). 174 The choice is made in the \nam{tra_adv}{tra\_adv} namelist, 175 by setting to \forcode{.true.} one of the logicals \textit{ln\_traadv\_xxx}. 176 The corresponding code can be found in the \textit{traadv\_xxx.F90} module, 177 where \textit{xxx} is a 3 or 4 letter acronym corresponding to each scheme. 178 By default (\ie\ in the reference namelist, \textit{namelist\_ref}), 179 all the logicals are set to \forcode{.false.}. 180 If the user does not select an advection scheme in the configuration namelist 181 (\textit{namelist\_cfg}), the tracers will \textit{not} be advected! 158 182 159 183 Details of the advection schemes are given below. 160 The choosing an advection scheme is a complex matter which depends on the model physics, model resolution, 161 type of tracer, as well as the issue of numerical cost. In particular, we note that 184 The choosing an advection scheme is a complex matter which depends on the 185 model physics, model resolution, type of tracer, as well as the issue of numerical cost. 186 In particular, we note that 162 187 163 188 \begin{enumerate} 164 \item 165 CEN and FCT schemes require an explicit diffusion operator while the other schemes are diffusive enough so that 166 they do not necessarily need additional diffusion; 167 \item 168 CEN and UBS are not \textit{positive} schemes 169 \footnote{negative values can appear in an initially strictly positive tracer field which is advected}, 189 \item CEN and FCT schemes require an explicit diffusion operator while 190 the other schemes are diffusive enough so that they do not necessarily need additional diffusion; 191 \item CEN and UBS are not \textit{positive} schemes \footnote{negative values can appear in 192 an initially strictly positive tracer field which is advected}, 170 193 implying that false extrema are permitted. 171 194 Their use is not recommended on passive tracers; 172 \item 173 It is recommended that the same advection-diffusion scheme is used onboth active and passive tracers.195 \item It is recommended that the same advection-diffusion scheme is used on 196 both active and passive tracers. 174 197 \end{enumerate} 175 198 176 Indeed, if a source or sink of a passive tracer depends on an active one, the difference of treatment of active and 177 passive tracers can create very nice-looking frontal structures that are pure numerical artefacts. 199 Indeed, if a source or sink of a passive tracer depends on an active one, 200 the difference of treatment of active and passive tracers can create 201 very nice-looking frontal structures that are pure numerical artefacts. 178 202 Nevertheless, most of our users set a different treatment on passive and active tracers, 179 203 that's the reason why this possibility is offered. 180 We strongly suggest them to perform a sensitivity experiment using a same treatment to assess the robustness of 181 their results. 182 183 % ------------------------------------------------------------------------------------------------------------- 184 % 2nd and 4th order centred schemes 185 % ------------------------------------------------------------------------------------------------------------- 186 \subsection[CEN: Centred scheme (\forcode{ln_traadv_cen = .true.})] 187 {CEN: Centred scheme (\protect\np{ln\_traadv\_cen}\forcode{ = .true.})} 204 We strongly suggest them to perform a sensitivity experiment using a same treatment to 205 assess the robustness of their results. 206 207 %% ================================================================================================= 208 \subsection[CEN: Centred scheme (\forcode{ln_traadv_cen})]{CEN: Centred scheme (\protect\np{ln_traadv_cen}{ln\_traadv\_cen})} 188 209 \label{subsec:TRA_adv_cen} 189 210 190 211 % 2nd order centred scheme 191 212 192 The centred advection scheme (CEN) is used when \np{ln\_traadv\_cen}\forcode{ = .true.}. 193 Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level) and vertical direction by 194 setting \np{nn\_cen\_h} and \np{nn\_cen\_v} to $2$ or $4$. 213 The \textbf{CEN}tred advection scheme (CEN) is used when \np[=.true.]{ln_traadv_cen}{ln\_traadv\_cen}. 214 Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on 215 horizontal (iso-level) and vertical direction by 216 setting \np{nn_cen_h}{nn\_cen\_h} and \np{nn_cen_v}{nn\_cen\_v} to $2$ or $4$. 195 217 CEN implementation can be found in the \mdl{traadv\_cen} module. 196 218 197 In the $2^{nd}$ order centred formulation (CEN2), the tracer at velocity points is evaluated as the mean of198 the two neighbouring $T$-point values.219 In the $2^{nd}$ order centred formulation (CEN2), the tracer at velocity points is evaluated as 220 the mean of the two neighbouring $T$-point values. 199 221 For example, in the $i$-direction : 200 222 \begin{equation} 201 \label{eq: tra_adv_cen2}223 \label{eq:TRA_adv_cen2} 202 224 \tau_u^{cen2} = \overline T ^{i + 1/2} 203 225 \end{equation} 204 226 205 CEN2 is non diffusive (\ie\ it conserves the tracer variance, $\tau^2$) but dispersive 206 (\ie\ it may create false extrema). 207 It is therefore notoriously noisy and must be used in conjunction with an explicit diffusion operator to 208 produce a sensible solution. 209 The associated time-stepping is performed using a leapfrog scheme in conjunction with an Asselin time-filter, 210 so $T$ in (\autoref{eq:tra_adv_cen2}) is the \textit{now} tracer value. 227 CEN2 is non diffusive (\ie\ it conserves the tracer variance, $\tau^2$) but 228 dispersive (\ie\ it may create false extrema). 229 It is therefore notoriously noisy and must be used in conjunction with 230 an explicit diffusion operator to produce a sensible solution. 231 The associated time-stepping is performed using 232 a leapfrog scheme in conjunction with an Asselin time-filter, 233 so $T$ in (\autoref{eq:TRA_adv_cen2}) is the \textit{now} tracer value. 211 234 212 235 Note that using the CEN2, the overall tracer advection is of second order accuracy since 213 both (\autoref{eq: tra_adv}) and (\autoref{eq:tra_adv_cen2}) have this order of accuracy.236 both (\autoref{eq:TRA_adv}) and (\autoref{eq:TRA_adv_cen2}) have this order of accuracy. 214 237 215 238 % 4nd order centred scheme 216 239 217 In the $4^{th}$ order formulation (CEN4), tracer values are evaluated at u- and v-points as 218 a $4^{th}$ order interpolation, and thus depend on the four neighbouring $T$-points. 240 In the $4^{th}$ order formulation (CEN4), 241 tracer values are evaluated at u- and v-points as a $4^{th}$ order interpolation, 242 and thus depend on the four neighbouring $T$-points. 219 243 For example, in the $i$-direction: 220 244 \begin{equation} 221 \label{eq: tra_adv_cen4}245 \label{eq:TRA_adv_cen4} 222 246 \tau_u^{cen4} = \overline{T - \frac{1}{6} \, \delta_i \Big[ \delta_{i + 1/2}[T] \, \Big]}^{\,i + 1/2} 223 247 \end{equation} 224 In the vertical direction (\np {nn\_cen\_v}\forcode{ = 4}),248 In the vertical direction (\np[=4]{nn_cen_v}{nn\_cen\_v}), 225 249 a $4^{th}$ COMPACT interpolation has been prefered \citep{demange_phd14}. 226 In the COMPACT scheme, both the field and its derivative are interpolated, which leads, after a matrix inversion, 227 spectral characteristics similar to schemes of higher order \citep{lele_JCP92}. 250 In the COMPACT scheme, both the field and its derivative are interpolated, 251 which leads, after a matrix inversion, spectral characteristics similar to schemes of higher order 252 \citep{lele_JCP92}. 228 253 229 254 Strictly speaking, the CEN4 scheme is not a $4^{th}$ order advection scheme but 230 255 a $4^{th}$ order evaluation of advective fluxes, 231 since the divergence of advective fluxes \autoref{eq: tra_adv} is kept at $2^{nd}$ order.232 The expression \textit{$4^{th}$ order scheme} used in oceanographic literature is usually associated with233 the scheme presented here.234 Introducing a \forcode{.true.}$4^{th}$ order advection scheme is feasible but, for consistency reasons,235 it requires changes in the discretisation of the tracer advection together with changes in the continuity equation,236 and the momentum advection and pressure terms.256 since the divergence of advective fluxes \autoref{eq:TRA_adv} is kept at $2^{nd}$ order. 257 The expression \textit{$4^{th}$ order scheme} used in oceanographic literature is 258 usually associated with the scheme presented here. 259 Introducing a ``true'' $4^{th}$ order advection scheme is feasible but, for consistency reasons, 260 it requires changes in the discretisation of the tracer advection together with 261 changes in the continuity equation, and the momentum advection and pressure terms. 237 262 238 263 A direct consequence of the pseudo-fourth order nature of the scheme is that it is not non-diffusive, 239 264 \ie\ the global variance of a tracer is not preserved using CEN4. 240 Furthermore, it must be used in conjunction with an explicit diffusion operator to produce a sensible solution. 241 As in CEN2 case, the time-stepping is performed using a leapfrog scheme in conjunction with an Asselin time-filter, 242 so $T$ in (\autoref{eq:tra_adv_cen4}) is the \textit{now} tracer. 265 Furthermore, it must be used in conjunction with an explicit diffusion operator to 266 produce a sensible solution. 267 As in CEN2 case, the time-stepping is performed using a leapfrog scheme in conjunction with 268 an Asselin time-filter, so $T$ in (\autoref{eq:TRA_adv_cen4}) is the \textit{now} tracer. 243 269 244 270 At a $T$-grid cell adjacent to a boundary (coastline, bottom and surface), … … 246 272 This hypothesis usually reduces the order of the scheme. 247 273 Here we choose to set the gradient of $T$ across the boundary to zero. 248 Alternative conditions can be specified, such as a reduction to a second order scheme for 249 these near boundary grid points. 250 251 % ------------------------------------------------------------------------------------------------------------- 252 % FCT scheme 253 % ------------------------------------------------------------------------------------------------------------- 254 \subsection[FCT: Flux Corrected Transport scheme (\forcode{ln_traadv_fct = .true.})] 255 {FCT: Flux Corrected Transport scheme (\protect\np{ln\_traadv\_fct}\forcode{ = .true.})} 274 Alternative conditions can be specified, 275 such as a reduction to a second order scheme for these near boundary grid points. 276 277 %% ================================================================================================= 278 \subsection[FCT: Flux Corrected Transport scheme (\forcode{ln_traadv_fct})]{FCT: Flux Corrected Transport scheme (\protect\np{ln_traadv_fct}{ln\_traadv\_fct})} 256 279 \label{subsec:TRA_adv_tvd} 257 280 258 The Flux Corrected Transport schemes (FCT) is used when \np{ln\_traadv\_fct}\forcode{ = .true.}. 259 Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level) and vertical direction by 260 setting \np{nn\_fct\_h} and \np{nn\_fct\_v} to $2$ or $4$. 281 The \textbf{F}lux \textbf{C}orrected \textbf{T}ransport schemes (FCT) is used when 282 \np[=.true.]{ln_traadv_fct}{ln\_traadv\_fct}. 283 Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on 284 horizontal (iso-level) and vertical direction by 285 setting \np{nn_fct_h}{nn\_fct\_h} and \np{nn_fct_v}{nn\_fct\_v} to $2$ or $4$. 261 286 FCT implementation can be found in the \mdl{traadv\_fct} module. 262 287 263 In FCT formulation, the tracer at velocity points is evaluated using a combination of an upstream and264 a c entred scheme.288 In FCT formulation, the tracer at velocity points is evaluated using 289 a combination of an upstream and a centred scheme. 265 290 For example, in the $i$-direction : 266 291 \begin{equation} 267 \label{eq: tra_adv_fct}292 \label{eq:TRA_adv_fct} 268 293 \begin{split} 269 294 \tau_u^{ups} &= … … 271 296 T_{i + 1} & \text{if~} u_{i + 1/2} < 0 \\ 272 297 T_i & \text{if~} u_{i + 1/2} \geq 0 \\ 273 \end{cases} 274 \\ 298 \end{cases} \\ 275 299 \tau_u^{fct} &= \tau_u^{ups} + c_u \, \big( \tau_u^{cen} - \tau_u^{ups} \big) 276 300 \end{split} … … 278 302 where $c_u$ is a flux limiter function taking values between 0 and 1. 279 303 The FCT order is the one of the centred scheme used 280 (\ie\ it depends on the setting of \np{nn \_fct\_h} and \np{nn\_fct\_v}).304 (\ie\ it depends on the setting of \np{nn_fct_h}{nn\_fct\_h} and \np{nn_fct_v}{nn\_fct\_v}). 281 305 There exist many ways to define $c_u$, each corresponding to a different FCT scheme. 282 306 The one chosen in \NEMO\ is described in \citet{zalesak_JCP79}. … … 286 310 A comparison of FCT-2 with MUSCL and a MPDATA scheme can be found in \citet{levy.estublier.ea_GRL01}. 287 311 288 289 For stability reasons (see \autoref{chap:STP}), 290 $\tau_u^{cen}$ is evaluated in (\autoref{eq:tra_adv_fct}) using the \textit{now} tracer while 312 For stability reasons (see \autoref{chap:TD}), 313 $\tau_u^{cen}$ is evaluated in (\autoref{eq:TRA_adv_fct}) using the \textit{now} tracer while 291 314 $\tau_u^{ups}$ is evaluated using the \textit{before} tracer. 292 In other words, the advective part of the scheme is time stepped with a leap-frog scheme 293 while a forward scheme is used for the diffusive part. 294 295 % ------------------------------------------------------------------------------------------------------------- 296 % MUSCL scheme 297 % ------------------------------------------------------------------------------------------------------------- 298 \subsection[MUSCL: Monotone Upstream Scheme for Conservative Laws (\forcode{ln_traadv_mus = .true.})] 299 {MUSCL: Monotone Upstream Scheme for Conservative Laws (\protect\np{ln\_traadv\_mus}\forcode{ = .true.})} 315 In other words, the advective part of the scheme is time stepped with a leap-frog scheme while 316 a forward scheme is used for the diffusive part. 317 318 %% ================================================================================================= 319 \subsection[MUSCL: Monotone Upstream Scheme for Conservative Laws (\forcode{ln_traadv_mus})]{MUSCL: Monotone Upstream Scheme for Conservative Laws (\protect\np{ln_traadv_mus}{ln\_traadv\_mus})} 300 320 \label{subsec:TRA_adv_mus} 301 321 302 The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln\_traadv\_mus}\forcode{ = .true.}. 322 The \textbf{M}onotone \textbf{U}pstream \textbf{S}cheme for \textbf{C}onservative \textbf{L}aws 323 (MUSCL) is used when \np[=.true.]{ln_traadv_mus}{ln\_traadv\_mus}. 303 324 MUSCL implementation can be found in the \mdl{traadv\_mus} module. 304 325 305 326 MUSCL has been first implemented in \NEMO\ by \citet{levy.estublier.ea_GRL01}. 306 In its formulation, the tracer at velocity points is evaluated assuming a linear tracer variation between307 two $T$-points (\autoref{fig:adv_scheme}).327 In its formulation, the tracer at velocity points is evaluated assuming 328 a linear tracer variation between two $T$-points (\autoref{fig:TRA_adv_scheme}). 308 329 For example, in the $i$-direction : 309 \ begin{equation}310 % \label{eq: tra_adv_mus}330 \[ 331 % \label{eq:TRA_adv_mus} 311 332 \tau_u^{mus} = \lt\{ 312 333 \begin{split} 313 \tau_i&+ \frac{1}{2} \lt( 1 - \frac{u_{i + 1/2} \, \rdt}{e_{1u}} \rt)314 \widetilde{\partial_i\tau} & \text{if~} u_{i + 1/2} \geqslant 0 \\315 316 334 \tau_i &+ \frac{1}{2} \lt( 1 - \frac{u_{i + 1/2} \, \rdt}{e_{1u}} \rt) 335 \widetilde{\partial_i \tau} & \text{if~} u_{i + 1/2} \geqslant 0 \\ 336 \tau_{i + 1/2} &+ \frac{1}{2} \lt( 1 + \frac{u_{i + 1/2} \, \rdt}{e_{1u}} \rt) 337 \widetilde{\partial_{i + 1/2} \tau} & \text{if~} u_{i + 1/2} < 0 317 338 \end{split} 318 339 \rt. 319 \ end{equation}320 where $\widetilde{\partial_i \tau}$ is the slope of the tracer on which a limitation is imposed to321 ensure the \textit{positive} character of the scheme.322 323 The time stepping is performed using a forward scheme, that is the \textit{before} tracer field is used to324 evaluate $\tau_u^{mus}$.340 \] 341 where $\widetilde{\partial_i \tau}$ is the slope of the tracer on which 342 a limitation is imposed to ensure the \textit{positive} character of the scheme. 343 344 The time stepping is performed using a forward scheme, 345 that is the \textit{before} tracer field is used to evaluate $\tau_u^{mus}$. 325 346 326 347 For an ocean grid point adjacent to land and where the ocean velocity is directed toward land, 327 348 an upstream flux is used. 328 349 This choice ensure the \textit{positive} character of the scheme. 329 In addition, fluxes round a grid-point where a runoff is applied can optionally be computed using upstream fluxes 330 (\np{ln\_mus\_ups}\forcode{ = .true.}). 331 332 % ------------------------------------------------------------------------------------------------------------- 333 % UBS scheme 334 % ------------------------------------------------------------------------------------------------------------- 335 \subsection[UBS a.k.a. UP3: Upstream-Biased Scheme (\forcode{ln_traadv_ubs = .true.})] 336 {UBS a.k.a. UP3: Upstream-Biased Scheme (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})} 350 In addition, fluxes round a grid-point where a runoff is applied can optionally be computed using 351 upstream fluxes (\np[=.true.]{ln_mus_ups}{ln\_mus\_ups}). 352 353 %% ================================================================================================= 354 \subsection[UBS a.k.a. UP3: Upstream-Biased Scheme (\forcode{ln_traadv_ubs})]{UBS a.k.a. UP3: Upstream-Biased Scheme (\protect\np{ln_traadv_ubs}{ln\_traadv\_ubs})} 337 355 \label{subsec:TRA_adv_ubs} 338 356 339 The Upstream-Biased Scheme (UBS) is used when \np{ln\_traadv\_ubs}\forcode{ = .true.}. 357 The \textbf{U}pstream-\textbf{B}iased \textbf{S}cheme (UBS) is used when 358 \np[=.true.]{ln_traadv_ubs}{ln\_traadv\_ubs}. 340 359 UBS implementation can be found in the \mdl{traadv\_mus} module. 341 360 342 361 The UBS scheme, often called UP3, is also known as the Cell Averaged QUICK scheme 343 (Quadratic Upstream Interpolation for Convective Kinematics). 362 (\textbf{Q}uadratic \textbf{U}pstream \textbf{I}nterpolation for 363 \textbf{C}onvective \textbf{K}inematics). 344 364 It is an upstream-biased third order scheme based on an upstream-biased parabolic interpolation. 345 365 For example, in the $i$-direction: 346 366 \begin{equation} 347 \label{eq: tra_adv_ubs}367 \label{eq:TRA_adv_ubs} 348 368 \tau_u^{ubs} = \overline T ^{i + 1/2} - \frac{1}{6} 349 369 \begin{cases} 350 351 370 \tau"_i & \text{if~} u_{i + 1/2} \geqslant 0 \\ 371 \tau"_{i + 1} & \text{if~} u_{i + 1/2} < 0 352 372 \end{cases} 353 \quad 354 \text{where~} \tau"_i = \delta_i \lt[ \delta_{i + 1/2} [\tau] \rt] 373 \quad \text{where~} \tau"_i = \delta_i \lt[ \delta_{i + 1/2} [\tau] \rt] 355 374 \end{equation} 356 375 357 376 This results in a dissipatively dominant (i.e. hyper-diffusive) truncation error 358 377 \citep{shchepetkin.mcwilliams_OM05}. 359 The overall performance of the advection scheme is similar to that reported in \cite{farrow.stevens_JPO95}. 378 The overall performance of the advection scheme is similar to that reported in 379 \cite{farrow.stevens_JPO95}. 360 380 It is a relatively good compromise between accuracy and smoothness. 361 381 Nevertheless the scheme is not \textit{positive}, meaning that false extrema are permitted, 362 382 but the amplitude of such are significantly reduced over the centred second or fourth order method. 363 Therefore it is not recommended that it should be applied to a passive tracer that requires positivity. 383 Therefore it is not recommended that it should be applied to 384 a passive tracer that requires positivity. 364 385 365 386 The intrinsic diffusion of UBS makes its use risky in the vertical direction where 366 387 the control of artificial diapycnal fluxes is of paramount importance 367 388 \citep{shchepetkin.mcwilliams_OM05, demange_phd14}. 368 Therefore the vertical flux is evaluated using either a $2^nd$ order FCT scheme or a $4^th$ order COMPACT scheme369 (\np{nn\_ubs\_v}\forcode{ = 2 or 4}).370 371 For stability reasons (see \autoref{chap: STP}), the first term in \autoref{eq:tra_adv_ubs}372 (which corresponds to a second order centred scheme)373 is evaluated using the \textit{now} tracer (centred in time) while the second term374 (which is the diffusive part of the scheme),389 Therefore the vertical flux is evaluated using either a $2^nd$ order FCT scheme or 390 a $4^th$ order COMPACT scheme (\np[=2 or 4]{nn_ubs_v}{nn\_ubs\_v}). 391 392 For stability reasons (see \autoref{chap:TD}), 393 the first term in \autoref{eq:TRA_adv_ubs} (which corresponds to a second order centred scheme) 394 is evaluated using the \textit{now} tracer (centred in time) while 395 the second term (which is the diffusive part of the scheme), 375 396 is evaluated using the \textit{before} tracer (forward in time). 376 This choice is discussed by \citet{webb.de-cuevas.ea_JAOT98} in the context of the QUICK advection scheme. 397 This choice is discussed by \citet{webb.de-cuevas.ea_JAOT98} in 398 the context of the QUICK advection scheme. 377 399 UBS and QUICK schemes only differ by one coefficient. 378 Replacing 1/6 with 1/8 in \autoref{eq:tra_adv_ubs} leads to the QUICK advection scheme \citep{webb.de-cuevas.ea_JAOT98}. 400 Replacing 1/6 with 1/8 in \autoref{eq:TRA_adv_ubs} leads to the QUICK advection scheme 401 \citep{webb.de-cuevas.ea_JAOT98}. 379 402 This option is not available through a namelist parameter, since the 1/6 coefficient is hard coded. 380 Nevertheless it is quite easy to make the substitution in the \mdl{traadv\_ubs} module and obtain a QUICK scheme. 381 382 Note that it is straightforward to rewrite \autoref{eq:tra_adv_ubs} as follows: 403 Nevertheless it is quite easy to make the substitution in the \mdl{traadv\_ubs} module and 404 obtain a QUICK scheme. 405 406 Note that it is straightforward to rewrite \autoref{eq:TRA_adv_ubs} as follows: 383 407 \begin{gather} 384 \label{eq: traadv_ubs2}408 \label{eq:TRA_adv_ubs2} 385 409 \tau_u^{ubs} = \tau_u^{cen4} + \frac{1}{12} 386 410 \begin{cases} … … 389 413 \end{cases} 390 414 \intertext{or equivalently} 391 % \label{eq: traadv_ubs2b}415 % \label{eq:TRA_adv_ubs2b} 392 416 u_{i + 1/2} \ \tau_u^{ubs} = u_{i + 1/2} \, \overline{T - \frac{1}{6} \, \delta_i \Big[ \delta_{i + 1/2}[T] \Big]}^{\,i + 1/2} 393 417 - \frac{1}{2} |u|_{i + 1/2} \, \frac{1}{6} \, \delta_{i + 1/2} [\tau"_i] \nonumber 394 418 \end{gather} 395 419 396 \autoref{eq: traadv_ubs2} has several advantages.420 \autoref{eq:TRA_adv_ubs2} has several advantages. 397 421 Firstly, it clearly reveals that the UBS scheme is based on the fourth order scheme to which 398 422 an upstream-biased diffusion term is added. 399 Secondly, this emphasises that the $4^{th}$ order part (as well as the $2^{nd}$ order part as stated above) has to 400 be evaluated at the \textit{now} time step using \autoref{eq:tra_adv_ubs}. 401 Thirdly, the diffusion term is in fact a biharmonic operator with an eddy coefficient which 402 is simply proportional to the velocity: $A_u^{lm} = \frac{1}{12} \, {e_{1u}}^3 \, |u|$. 403 Note the current version of \NEMO\ uses the computationally more efficient formulation \autoref{eq:tra_adv_ubs}. 404 405 % ------------------------------------------------------------------------------------------------------------- 406 % QCK scheme 407 % ------------------------------------------------------------------------------------------------------------- 408 \subsection[QCK: QuiCKest scheme (\forcode{ln_traadv_qck = .true.})] 409 {QCK: QuiCKest scheme (\protect\np{ln\_traadv\_qck}\forcode{ = .true.})} 423 Secondly, 424 this emphasises that the $4^{th}$ order part (as well as the $2^{nd}$ order part as stated above) has to be evaluated at the \textit{now} time step using \autoref{eq:TRA_adv_ubs}. 425 Thirdly, the diffusion term is in fact a biharmonic operator with 426 an eddy coefficient which is simply proportional to the velocity: 427 $A_u^{lm} = \frac{1}{12} \, {e_{1u}}^3 \, |u|$. 428 Note the current version of \NEMO\ uses the computationally more efficient formulation 429 \autoref{eq:TRA_adv_ubs}. 430 431 %% ================================================================================================= 432 \subsection[QCK: QuiCKest scheme (\forcode{ln_traadv_qck})]{QCK: QuiCKest scheme (\protect\np{ln_traadv_qck}{ln\_traadv\_qck})} 410 433 \label{subsec:TRA_adv_qck} 411 434 412 The Quadratic Upstream Interpolation for Convective Kinematics with Estimated Streaming Terms (QUICKEST) scheme 413 proposed by \citet{leonard_CMAME79} is used when \np{ln\_traadv\_qck}\forcode{ = .true.}. 435 The \textbf{Q}uadratic \textbf{U}pstream \textbf{I}nterpolation for 436 \textbf{C}onvective \textbf{K}inematics with \textbf{E}stimated \textbf{S}treaming \textbf{T}erms 437 (QUICKEST) scheme proposed by \citet{leonard_CMAME79} is used when 438 \np[=.true.]{ln_traadv_qck}{ln\_traadv\_qck}. 414 439 QUICKEST implementation can be found in the \mdl{traadv\_qck} module. 415 440 416 441 QUICKEST is the third order Godunov scheme which is associated with the ULTIMATE QUICKEST limiter 417 442 \citep{leonard_CMAME91}. 418 It has been implemented in \NEMO\ by G. Reffray (MERCATOR-ocean) and can be found in the \mdl{traadv\_qck} module. 443 It has been implemented in \NEMO\ by G. Reffray (Mercator Ocean) and 444 can be found in the \mdl{traadv\_qck} module. 419 445 The resulting scheme is quite expensive but \textit{positive}. 420 446 It can be used on both active and passive tracers. … … 423 449 Therefore the vertical flux is evaluated using the CEN2 scheme. 424 450 This no longer guarantees the positivity of the scheme. 425 The use of FCT in the vertical direction (as for the UBS case) should be implemented to restore this property. 451 The use of FCT in the vertical direction (as for the UBS case) should be implemented to 452 restore this property. 426 453 427 454 %%%gmcomment : Cross term are missing in the current implementation.... 428 455 429 % ================================================================ 430 % Tracer Lateral Diffusion 431 % ================================================================ 432 \section[Tracer lateral diffusion (\textit{traldf.F90})] 433 {Tracer lateral diffusion (\protect\mdl{traldf})} 456 %% ================================================================================================= 457 \section[Tracer lateral diffusion (\textit{traldf.F90})]{Tracer lateral diffusion (\protect\mdl{traldf})} 434 458 \label{sec:TRA_ldf} 435 %-----------------------------------------nam_traldf------------------------------------------------------ 436 437 \nlst{namtra_ldf} 438 %------------------------------------------------------------------------------------------------------------- 439 440 Options are defined through the \nam{tra\_ldf} namelist variables. 459 460 \begin{listing} 461 \nlst{namtra_ldf} 462 \caption{\forcode{&namtra_ldf}} 463 \label{lst:namtra_ldf} 464 \end{listing} 465 466 Options are defined through the \nam{tra_ldf}{tra\_ldf} namelist variables. 441 467 They are regrouped in four items, allowing to specify 442 $(i)$ the type of operator used (none, laplacian, bilaplacian), 443 $(ii)$ the direction along which the operator acts (iso-level, horizontal, iso-neutral), 444 $(iii)$ some specific options related to the rotated operators (\ie\ non-iso-level operator), and 445 $(iv)$ the specification of eddy diffusivity coefficient (either constant or variable in space and time). 446 Item $(iv)$ will be described in \autoref{chap:LDF}. 468 \begin{enumerate*}[label=(\textit{\roman*})] 469 \item the type of operator used (none, laplacian, bilaplacian), 470 \item the direction along which the operator acts (iso-level, horizontal, iso-neutral), 471 \item some specific options related to the rotated operators (\ie\ non-iso-level operator), and 472 \item the specification of eddy diffusivity coefficient 473 (either constant or variable in space and time). 474 \end{enumerate*} 475 Item (iv) will be described in \autoref{chap:LDF}. 447 476 The direction along which the operators act is defined through the slope between 448 477 this direction and the iso-level surfaces. … … 452 481 \ie\ the tracers appearing in its expression are the \textit{before} tracers in time, 453 482 except for the pure vertical component that appears when a rotation tensor is used. 454 This latter component is solved implicitly together with the vertical diffusion term (see \autoref{chap:STP}). 455 When \np{ln\_traldf\_msc}\forcode{ = .true.}, a Method of Stabilizing Correction is used in which 456 the pure vertical component is split into an explicit and an implicit part \citep{lemarie.debreu.ea_OM12}. 457 458 % ------------------------------------------------------------------------------------------------------------- 459 % Type of operator 460 % ------------------------------------------------------------------------------------------------------------- 461 \subsection[Type of operator (\texttt{ln\_traldf}\{\texttt{\_OFF,\_lap,\_blp}\})] 462 {Type of operator (\protect\np{ln\_traldf\_OFF}, \protect\np{ln\_traldf\_lap}, or \protect\np{ln\_traldf\_blp}) } 483 This latter component is solved implicitly together with the vertical diffusion term 484 (see \autoref{chap:TD}). 485 When \np[=.true.]{ln_traldf_msc}{ln\_traldf\_msc}, 486 a Method of Stabilizing Correction is used in which the pure vertical component is split into 487 an explicit and an implicit part \citep{lemarie.debreu.ea_OM12}. 488 489 %% ================================================================================================= 490 \subsection[Type of operator (\forcode{ln_traldf_}\{\forcode{OFF,lap,blp}\})]{Type of operator (\protect\np{ln_traldf_OFF}{ln\_traldf\_OFF}, \protect\np{ln_traldf_lap}{ln\_traldf\_lap}, or \protect\np{ln_traldf_blp}{ln\_traldf\_blp})} 463 491 \label{subsec:TRA_ldf_op} 464 492 … … 466 494 467 495 \begin{description} 468 \item[\np{ln\_traldf\_OFF}\forcode{ = .true.}:] 469 no operator selected, the lateral diffusive tendency will not be applied to the tracer equation. 470 This option can be used when the selected advection scheme is diffusive enough (MUSCL scheme for example). 471 \item[\np{ln\_traldf\_lap}\forcode{ = .true.}:] 472 a laplacian operator is selected. 473 This harmonic operator takes the following expression: $\mathpzc{L}(T) = \nabla \cdot A_{ht} \; \nabla T $, 496 \item [{\np[=.true.]{ln_traldf_OFF}{ln\_traldf\_OFF}}] no operator selected, 497 the lateral diffusive tendency will not be applied to the tracer equation. 498 This option can be used when the selected advection scheme is diffusive enough 499 (MUSCL scheme for example). 500 \item [{\np[=.true.]{ln_traldf_lap}{ln\_traldf\_lap}}] a laplacian operator is selected. 501 This harmonic operator takes the following expression: 502 $\mathcal{L}(T) = \nabla \cdot A_{ht} \; \nabla T $, 474 503 where the gradient operates along the selected direction (see \autoref{subsec:TRA_ldf_dir}), 475 504 and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see \autoref{chap:LDF}). 476 \item[\np{ln\_traldf\_blp}\forcode{ = .true.}]: 477 a bilaplacian operator is selected. 505 \item [{\np[=.true.]{ln_traldf_blp}{ln\_traldf\_blp}}] a bilaplacian operator is selected. 478 506 This biharmonic operator takes the following expression: 479 $\math pzc{B} = - \mathpzc{L}(\mathpzc{L}(T)) = - \nabla \cdot b \nabla (\nabla \cdot b \nabla T)$507 $\mathcal{B} = - \mathcal{L}(\mathcal{L}(T)) = - \nabla \cdot b \nabla (\nabla \cdot b \nabla T)$ 480 508 where the gradient operats along the selected direction, 481 and $b^2 = B_{ht}$ is the eddy diffusivity coefficient expressed in $m^4/s$ (see \autoref{chap:LDF}). 509 and $b^2 = B_{ht}$ is the eddy diffusivity coefficient expressed in $m^4/s$ 510 (see \autoref{chap:LDF}). 482 511 In the code, the bilaplacian operator is obtained by calling the laplacian twice. 483 512 \end{description} … … 487 516 minimizing the impact on the larger scale features. 488 517 The main difference between the two operators is the scale selectiveness. 489 The bilaplacian damping time (\ie\ its spin down time) scales like $\lambda^{-4}$ for 490 disturbances of wavelength $\lambda$ (so that short waves damped more rapidelly than long ones), 518 The bilaplacian damping time (\ie\ its spin down time) scales like 519 $\lambda^{-4}$ for disturbances of wavelength $\lambda$ 520 (so that short waves damped more rapidelly than long ones), 491 521 whereas the laplacian damping time scales only like $\lambda^{-2}$. 492 522 493 % ------------------------------------------------------------------------------------------------------------- 494 % Direction of action 495 % ------------------------------------------------------------------------------------------------------------- 496 \subsection[Action direction (\texttt{ln\_traldf}\{\texttt{\_lev,\_hor,\_iso,\_triad}\})] 497 {Direction of action (\protect\np{ln\_traldf\_lev}, \protect\np{ln\_traldf\_hor}, \protect\np{ln\_traldf\_iso}, or \protect\np{ln\_traldf\_triad}) } 523 %% ================================================================================================= 524 \subsection[Action direction (\forcode{ln_traldf_}\{\forcode{lev,hor,iso,triad}\})]{Direction of action (\protect\np{ln_traldf_lev}{ln\_traldf\_lev}, \protect\np{ln_traldf_hor}{ln\_traldf\_hor}, \protect\np{ln_traldf_iso}{ln\_traldf\_iso}, or \protect\np{ln_traldf_triad}{ln\_traldf\_triad})} 498 525 \label{subsec:TRA_ldf_dir} 499 526 500 527 The choice of a direction of action determines the form of operator used. 501 528 The operator is a simple (re-entrant) laplacian acting in the (\textbf{i},\textbf{j}) plane when 502 iso-level option is used (\np {ln\_traldf\_lev}\forcode{ = .true.}) or503 whena horizontal (\ie\ geopotential) operator is demanded in \textit{z}-coordinate504 (\np{ln \_traldf\_hor} and \np{ln\_zco} equal \forcode{.true.}).529 iso-level option is used (\np[=.true.]{ln_traldf_lev}{ln\_traldf\_lev}) or when 530 a horizontal (\ie\ geopotential) operator is demanded in \textit{z}-coordinate 531 (\np{ln_traldf_hor}{ln\_traldf\_hor} and \np[=.true.]{ln_zco}{ln\_zco}). 505 532 The associated code can be found in the \mdl{traldf\_lap\_blp} module. 506 533 The operator is a rotated (re-entrant) laplacian when 507 534 the direction along which it acts does not coincide with the iso-level surfaces, 508 535 that is when standard or triad iso-neutral option is used 509 (\np{ln \_traldf\_iso} or \np{ln\_traldf\_triad} equals\forcode{.true.},536 (\np{ln_traldf_iso}{ln\_traldf\_iso} or \np{ln_traldf_triad}{ln\_traldf\_triad} = \forcode{.true.}, 510 537 see \mdl{traldf\_iso} or \mdl{traldf\_triad} module, resp.), or 511 538 when a horizontal (\ie\ geopotential) operator is demanded in \textit{s}-coordinate 512 (\np{ln \_traldf\_hor} and \np{ln\_sco} equal \forcode{.true.})513 \footnote{In this case, the standard iso-neutral operator will be automatically selected}.539 (\np{ln_traldf_hor}{ln\_traldf\_hor} and \np{ln_sco}{ln\_sco} = \forcode{.true.}) \footnote{ 540 In this case, the standard iso-neutral operator will be automatically selected}. 514 541 In that case, a rotation is applied to the gradient(s) that appears in the operator so that 515 542 diffusive fluxes acts on the three spatial direction. … … 518 545 the next two sub-sections. 519 546 520 % ------------------------------------------------------------------------------------------------------------- 521 % iso-level operator 522 % ------------------------------------------------------------------------------------------------------------- 523 \subsection[Iso-level (bi-)laplacian operator (\texttt{ln\_traldf\_iso})] 524 {Iso-level (bi-)laplacian operator ( \protect\np{ln\_traldf\_iso})} 547 %% ================================================================================================= 548 \subsection[Iso-level (bi-)laplacian operator (\forcode{ln_traldf_iso})]{Iso-level (bi-)laplacian operator ( \protect\np{ln_traldf_iso}{ln\_traldf\_iso})} 525 549 \label{subsec:TRA_ldf_lev} 526 550 527 551 The laplacian diffusion operator acting along the model (\textit{i,j})-surfaces is given by: 528 552 \begin{equation} 529 \label{eq: tra_ldf_lap}553 \label{eq:TRA_ldf_lap} 530 554 D_t^{lT} = \frac{1}{b_t} \Bigg( \delta_{i} \lt[ A_u^{lT} \; \frac{e_{2u} \, e_{3u}}{e_{1u}} \; \delta_{i + 1/2} [T] \rt] 531 555 + \delta_{j} \lt[ A_v^{lT} \; \frac{e_{1v} \, e_{3v}}{e_{2v}} \; \delta_{j + 1/2} [T] \rt] \Bigg) … … 534 558 where zero diffusive fluxes is assumed across solid boundaries, 535 559 first (and third in bilaplacian case) horizontal tracer derivative are masked. 536 It is implemented in the \rou{tra\_ldf\_lap} subroutine found in the \mdl{traldf\_lap\_blp}} module. 537 The module also contains \rou{tra\_ldf\_blp}, the subroutine calling twice \rou{tra\_ldf\_lap} in order to 560 It is implemented in the \rou{tra\_ldf\_lap} subroutine found in the \mdl{traldf\_lap\_blp} module. 561 The module also contains \rou{tra\_ldf\_blp}, 562 the subroutine calling twice \rou{tra\_ldf\_lap} in order to 538 563 compute the iso-level bilaplacian operator. 539 564 540 565 It is a \textit{horizontal} operator (\ie acting along geopotential surfaces) in 541 the $z$-coordinate with or without partial steps, but is simply an iso-level operator in the $s$-coordinate. 542 It is thus used when, in addition to \np{ln\_traldf\_lap} or \np{ln\_traldf\_blp}\forcode{ = .true.}, 543 we have \np{ln\_traldf\_lev}\forcode{ = .true.} or \np{ln\_traldf\_hor}~=~\np{ln\_zco}\forcode{ = .true.}. 566 the $z$-coordinate with or without partial steps, 567 but is simply an iso-level operator in the $s$-coordinate. 568 It is thus used when, 569 in addition to \np{ln_traldf_lap}{ln\_traldf\_lap} or \np[=.true.]{ln_traldf_blp}{ln\_traldf\_blp}, 570 we have \np[=.true.]{ln_traldf_lev}{ln\_traldf\_lev} or 571 \np[=]{ln_traldf_hor}{ln\_traldf\_hor}\np[=.true.]{ln_zco}{ln\_zco}. 544 572 In both cases, it significantly contributes to diapycnal mixing. 545 573 It is therefore never recommended, even when using it in the bilaplacian case. 546 574 547 Note that in the partial step $z$-coordinate (\np {ln\_zps}\forcode{ = .true.}),575 Note that in the partial step $z$-coordinate (\np[=.true.]{ln_zps}{ln\_zps}), 548 576 tracers in horizontally adjacent cells are located at different depths in the vicinity of the bottom. 549 In this case, horizontal derivatives in (\autoref{eq:tra_ldf_lap}) at the bottom level require a specific treatment. 577 In this case, 578 horizontal derivatives in (\autoref{eq:TRA_ldf_lap}) at the bottom level require a specific treatment. 550 579 They are calculated in the \mdl{zpshde} module, described in \autoref{sec:TRA_zpshde}. 551 580 552 % ------------------------------------------------------------------------------------------------------------- 553 % Rotated laplacian operator 554 % ------------------------------------------------------------------------------------------------------------- 581 %% ================================================================================================= 555 582 \subsection{Standard and triad (bi-)laplacian operator} 556 583 \label{subsec:TRA_ldf_iso_triad} 557 584 558 %&& Standard rotated (bi-)laplacian operator 559 %&& ---------------------------------------------- 560 \subsubsection[Standard rotated (bi-)laplacian operator (\textit{traldf\_iso.F90})] 561 {Standard rotated (bi-)laplacian operator (\protect\mdl{traldf\_iso})} 585 %% ================================================================================================= 586 \subsubsection[Standard rotated (bi-)laplacian operator (\textit{traldf\_iso.F90})]{Standard rotated (bi-)laplacian operator (\protect\mdl{traldf\_iso})} 562 587 \label{subsec:TRA_ldf_iso} 563 The general form of the second order lateral tracer subgrid scale physics (\autoref{eq:PE_zdf}) 564 takes the following semi -discrete space form in $z$- and $s$-coordinates: 565 \begin{equation} 566 \label{eq:tra_ldf_iso} 588 589 The general form of the second order lateral tracer subgrid scale physics (\autoref{eq:MB_zdf}) 590 takes the following semi-discrete space form in $z$- and $s$-coordinates: 591 \begin{equation} 592 \label{eq:TRA_ldf_iso} 567 593 \begin{split} 568 594 D_T^{lT} = \frac{1}{b_t} \Bigg[ \quad &\delta_i A_u^{lT} \lt( \frac{e_{2u} e_{3u}}{e_{1u}} \, \delta_{i + 1/2} [T] … … 578 604 $r_1$ and $r_2$ are the slopes between the surface of computation ($z$- or $s$-surfaces) and 579 605 the surface along which the diffusion operator acts (\ie\ horizontal or iso-neutral surfaces). 580 It is thus used when, in addition to \np {ln\_traldf\_lap}\forcode{ = .true.},581 we have \np {ln\_traldf\_iso}\forcode{ = .true.},582 or both \np {ln\_traldf\_hor}\forcode{ = .true.} and \np{ln\_zco}\forcode{ = .true.}.606 It is thus used when, in addition to \np[=.true.]{ln_traldf_lap}{ln\_traldf\_lap}, 607 we have \np[=.true.]{ln_traldf_iso}{ln\_traldf\_iso}, 608 or both \np[=.true.]{ln_traldf_hor}{ln\_traldf\_hor} and \np[=.true.]{ln_zco}{ln\_zco}. 583 609 The way these slopes are evaluated is given in \autoref{sec:LDF_slp}. 584 At the surface, bottom and lateral boundaries, the turbulent fluxes of heat and salt are set to zero using 585 the mask technique (see \autoref{sec:LBC_coast}). 586 587 The operator in \autoref{eq:tra_ldf_iso} involves both lateral and vertical derivatives. 588 For numerical stability, the vertical second derivative must be solved using the same implicit time scheme as that 589 used in the vertical physics (see \autoref{sec:TRA_zdf}). 610 At the surface, bottom and lateral boundaries, 611 the turbulent fluxes of heat and salt are set to zero using the mask technique 612 (see \autoref{sec:LBC_coast}). 613 614 The operator in \autoref{eq:TRA_ldf_iso} involves both lateral and vertical derivatives. 615 For numerical stability, the vertical second derivative must be solved using 616 the same implicit time scheme as that used in the vertical physics (see \autoref{sec:TRA_zdf}). 590 617 For computer efficiency reasons, this term is not computed in the \mdl{traldf\_iso} module, 591 618 but in the \mdl{trazdf} module where, if iso-neutral mixing is used, 592 the vertical mixing coefficient is simply increased by $\frac{e_{1w} e_{2w}}{e_{3w}}(r_{1w}^2 + r_{2w}^2)$. 619 the vertical mixing coefficient is simply increased by 620 $\frac{e_{1w} e_{2w}}{e_{3w}}(r_{1w}^2 + r_{2w}^2)$. 593 621 594 622 This formulation conserves the tracer but does not ensure the decrease of the tracer variance. 595 Nevertheless the treatment performed on the slopes (see \autoref{chap:LDF}) allows the model to run safely without 596 any additional background horizontal diffusion \citep{guilyardi.madec.ea_CD01}. 597 598 Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{ = .true.}), 599 the horizontal derivatives at the bottom level in \autoref{eq:tra_ldf_iso} require a specific treatment. 623 Nevertheless the treatment performed on the slopes (see \autoref{chap:LDF}) allows the model to 624 run safely without any additional background horizontal diffusion \citep{guilyardi.madec.ea_CD01}. 625 626 Note that in the partial step $z$-coordinate (\np[=.true.]{ln_zps}{ln\_zps}), 627 the horizontal derivatives at the bottom level in \autoref{eq:TRA_ldf_iso} require 628 a specific treatment. 600 629 They are calculated in module zpshde, described in \autoref{sec:TRA_zpshde}. 601 630 602 %&& Triad rotated (bi-)laplacian operator 603 %&& ------------------------------------------- 604 \subsubsection[Triad rotated (bi-)laplacian operator (\textit{ln\_traldf\_triad})] 605 {Triad rotated (bi-)laplacian operator (\protect\np{ln\_traldf\_triad})} 631 %% ================================================================================================= 632 \subsubsection[Triad rotated (bi-)laplacian operator (\forcode{ln_traldf_triad})]{Triad rotated (bi-)laplacian operator (\protect\np{ln_traldf_triad}{ln\_traldf\_triad})} 606 633 \label{subsec:TRA_ldf_triad} 607 634 608 An alternative scheme developed by \cite{griffies.gnanadesikan.ea_JPO98} which ensures tracer variance decreases 609 is also available in \NEMO\ (\np{ln\_traldf\_triad}\forcode{ = .true.}). 610 A complete description of the algorithm is given in \autoref{apdx:triad}. 611 612 The lateral fourth order bilaplacian operator on tracers is obtained by applying (\autoref{eq:tra_ldf_lap}) twice. 635 An alternative scheme developed by \cite{griffies.gnanadesikan.ea_JPO98} which 636 ensures tracer variance decreases is also available in \NEMO\ 637 (\np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}). 638 A complete description of the algorithm is given in \autoref{apdx:TRIADS}. 639 640 The lateral fourth order bilaplacian operator on tracers is obtained by 641 applying (\autoref{eq:TRA_ldf_lap}) twice. 613 642 The operator requires an additional assumption on boundary conditions: 614 643 both first and third derivative terms normal to the coast are set to zero. 615 644 616 The lateral fourth order operator formulation on tracers is obtained by applying (\autoref{eq:tra_ldf_iso}) twice. 645 The lateral fourth order operator formulation on tracers is obtained by 646 applying (\autoref{eq:TRA_ldf_iso}) twice. 617 647 It requires an additional assumption on boundary conditions: 618 648 first and third derivative terms normal to the coast, 619 649 normal to the bottom and normal to the surface are set to zero. 620 650 621 %&& Option for the rotated operators 622 %&& ---------------------------------------------- 651 %% ================================================================================================= 623 652 \subsubsection{Option for the rotated operators} 624 653 \label{subsec:TRA_ldf_options} 625 654 626 \begin{itemize} 627 \item \np{ln\_traldf\_msc} = Method of Stabilizing Correction (both operators) 628 \item \np{rn\_slpmax} = slope limit (both operators) 629 \item \np{ln\_triad\_iso} = pure horizontal mixing in ML (triad only) 630 \item \np{rn\_sw\_triad} $= 1$ switching triad; $= 0$ all 4 triads used (triad only) 631 \item \np{ln\_botmix\_triad} = lateral mixing on bottom (triad only) 632 \end{itemize} 633 634 % ================================================================ 635 % Tracer Vertical Diffusion 636 % ================================================================ 637 \section[Tracer vertical diffusion (\textit{trazdf.F90})] 638 {Tracer vertical diffusion (\protect\mdl{trazdf})} 655 \begin{labeling}{{\np{ln_botmix_triad}{ln\_botmix\_triad}}} 656 \item [{\np{ln_traldf_msc}{ln\_traldf\_msc} }] Method of Stabilizing Correction (both operators) 657 \item [{\np{rn_slpmax}{rn\_slpmax} }] Slope limit (both operators) 658 \item [{\np{ln_triad_iso}{ln\_triad\_iso} }] Pure horizontal mixing in ML (triad only) 659 \item [{\np{rn_sw_triad}{rn\_sw\_triad} }] \forcode{=1} switching triad; 660 \forcode{= 0} all 4 triads used (triad only) 661 \item [{\np{ln_botmix_triad}{ln\_botmix\_triad}}] Lateral mixing on bottom (triad only) 662 \end{labeling} 663 664 %% ================================================================================================= 665 \section[Tracer vertical diffusion (\textit{trazdf.F90})]{Tracer vertical diffusion (\protect\mdl{trazdf})} 639 666 \label{sec:TRA_zdf} 640 %--------------------------------------------namzdf--------------------------------------------------------- 641 642 \nlst{namzdf} 643 %-------------------------------------------------------------------------------------------------------------- 644 645 Options are defined through the \nam{zdf} namelist variables. 646 The formulation of the vertical subgrid scale tracer physics is the same for all the vertical coordinates, 647 and is based on a laplacian operator. 648 The vertical diffusion operator given by (\autoref{eq:PE_zdf}) takes the following semi -discrete space form: 649 \begin{gather*} 650 % \label{eq:tra_zdf} 651 D^{vT}_T = \frac{1}{e_{3t}} \, \delta_k \lt[ \, \frac{A^{vT}_w}{e_{3w}} \delta_{k + 1/2}[T] \, \rt] \\ 652 D^{vS}_T = \frac{1}{e_{3t}} \; \delta_k \lt[ \, \frac{A^{vS}_w}{e_{3w}} \delta_{k + 1/2}[S] \, \rt] 653 \end{gather*} 654 where $A_w^{vT}$ and $A_w^{vS}$ are the vertical eddy diffusivity coefficients on temperature and salinity, 655 respectively. 667 668 Options are defined through the \nam{zdf}{zdf} namelist variables. 669 The formulation of the vertical subgrid scale tracer physics is the same for 670 all the vertical coordinates, and is based on a laplacian operator. 671 The vertical diffusion operator given by (\autoref{eq:MB_zdf}) takes 672 the following semi-discrete space form: 673 \[ 674 % \label{eq:TRA_zdf} 675 D^{vT}_T = \frac{1}{e_{3t}} \, \delta_k \lt[ \, \frac{A^{vT}_w}{e_{3w}} \delta_{k + 1/2}[T] \, \rt] \quad 676 D^{vS}_T = \frac{1}{e_{3t}} \; \delta_k \lt[ \, \frac{A^{vS}_w}{e_{3w}} \delta_{k + 1/2}[S] \, \rt] 677 \] 678 where $A_w^{vT}$ and $A_w^{vS}$ are the vertical eddy diffusivity coefficients on 679 temperature and salinity, respectively. 656 680 Generally, $A_w^{vT} = A_w^{vS}$ except when double diffusive mixing is parameterised 657 (\ie\ \np {ln\_zdfddm} equals \forcode{.true.},).681 (\ie\ \np[=.true.]{ln_zdfddm}{ln\_zdfddm},). 658 682 The way these coefficients are evaluated is given in \autoref{chap:ZDF} (ZDF). 659 Furthermore, when iso-neutral mixing is used, both mixing coefficients are increased by660 $\frac{e_{1w} e_{2w}}{e_{3w} }({r_{1w}^2 + r_{2w}^2})$ to account for the vertical second derivative of 661 \autoref{eq:tra_ldf_iso}.683 Furthermore, when iso-neutral mixing is used, 684 both mixing coefficients are increased by $\frac{e_{1w} e_{2w}}{e_{3w} }({r_{1w}^2 + r_{2w}^2})$ to 685 account for the vertical second derivative of \autoref{eq:TRA_ldf_iso}. 662 686 663 687 At the surface and bottom boundaries, the turbulent fluxes of heat and salt must be specified. … … 666 690 a geothermal flux forcing is prescribed as a bottom boundary condition (see \autoref{subsec:TRA_bbc}). 667 691 668 The large eddy coefficient found in the mixed layer together with high vertical resolution implies that669 th ere would be too restrictive constraint on the time step if we use explicit time stepping.692 The large eddy coefficient found in the mixed layer together with high vertical resolution implies 693 that there would be too restrictive constraint on the time step if we use explicit time stepping. 670 694 Therefore an implicit time stepping is preferred for the vertical diffusion since 671 695 it overcomes the stability constraint. 672 696 673 % ================================================================ 674 % External Forcing 675 % ================================================================ 697 %% ================================================================================================= 676 698 \section{External forcing} 677 699 \label{sec:TRA_sbc_qsr_bbc} 678 700 679 % ------------------------------------------------------------------------------------------------------------- 680 % surface boundary condition 681 % ------------------------------------------------------------------------------------------------------------- 682 \subsection[Surface boundary condition (\textit{trasbc.F90})] 683 {Surface boundary condition (\protect\mdl{trasbc})} 701 %% ================================================================================================= 702 \subsection[Surface boundary condition (\textit{trasbc.F90})]{Surface boundary condition (\protect\mdl{trasbc})} 684 703 \label{subsec:TRA_sbc} 685 704 … … 691 710 692 711 Due to interactions and mass exchange of water ($F_{mass}$) with other Earth system components 693 (\ie\ atmosphere, sea-ice, land), the change in the heat and salt content of the surface layer of the ocean is due 694 both to the heat and salt fluxes crossing the sea surface (not linked with $F_{mass}$) and 712 (\ie\ atmosphere, sea-ice, land), 713 the change in the heat and salt content of the surface layer of the ocean is due both to 714 the heat and salt fluxes crossing the sea surface (not linked with $F_{mass}$) and 695 715 to the heat and salt content of the mass exchange. 696 716 They are both included directly in $Q_{ns}$, the surface heat flux, 697 717 and $F_{salt}$, the surface salt flux (see \autoref{chap:SBC} for further details). 698 By doing this, the forcing formulation is the same for any tracer (including temperature and salinity). 699 700 The surface module (\mdl{sbcmod}, see \autoref{chap:SBC}) provides the following forcing fields (used on tracers): 701 702 \begin{itemize} 703 \item 704 $Q_{ns}$, the non-solar part of the net surface heat flux that crosses the sea surface 705 (\ie\ the difference between the total surface heat flux and the fraction of the short wave flux that 706 penetrates into the water column, see \autoref{subsec:TRA_qsr}) 718 By doing this, the forcing formulation is the same for any tracer 719 (including temperature and salinity). 720 721 The surface module (\mdl{sbcmod}, see \autoref{chap:SBC}) provides the following forcing fields 722 (used on tracers): 723 724 \begin{labeling}{\textit{fwfisf}} 725 \item [$Q_{ns}$] The non-solar part of the net surface heat flux that crosses the sea surface 726 (\ie\ the difference between the total surface heat flux and 727 the fraction of the short wave flux that penetrates into the water column, 728 see \autoref{subsec:TRA_qsr}) 707 729 plus the heat content associated with of the mass exchange with the atmosphere and lands. 708 \item 709 $\textit{sfx}$, the salt flux resulting from ice-ocean mass exchange (freezing, melting, ridging...) 710 \item 711 \textit{emp}, the mass flux exchanged with the atmosphere (evaporation minus precipitation) and 730 \item [\textit{sfx}] The salt flux resulting from ice-ocean mass exchange 731 (freezing, melting, ridging...) 732 \item [\textit{emp}] The mass flux exchanged with the atmosphere (evaporation minus precipitation) and 712 733 possibly with the sea-ice and ice-shelves. 713 \item 714 \textit{rnf}, the mass flux associated with runoff 734 \item [\textit{rnf}] The mass flux associated with runoff 715 735 (see \autoref{sec:SBC_rnf} for further detail of how it acts on temperature and salinity tendencies) 716 \item 717 \textit{fwfisf}, the mass flux associated with ice shelf melt, 736 \item [\textit{fwfisf}] The mass flux associated with ice shelf melt, 718 737 (see \autoref{sec:SBC_isf} for further details on how the ice shelf melt is computed and applied). 719 \end{ itemize}738 \end{labeling} 720 739 721 740 The surface boundary condition on temperature and salinity is applied as follows: 722 741 \begin{equation} 723 \label{eq:tra_sbc} 724 \begin{alignedat}{2} 725 F^T &= \frac{1}{C_p} &\frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} &\overline{Q_{ns} }^t \\ 726 F^S &= &\frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} &\overline{\textit{sfx}}^t 727 \end{alignedat} 742 \label{eq:TRA_sbc} 743 F^T = \frac{1}{C_p} \frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} \overline{Q_{ns} }^t \qquad 744 F^S = \frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} \overline{\textit{sfx}}^t 728 745 \end{equation} 729 746 where $\overline x^t$ means that $x$ is averaged over two consecutive time steps 730 747 ($t - \rdt / 2$ and $t + \rdt / 2$). 731 Such time averaging prevents the divergence of odd and even time step (see \autoref{chap:STP}). 732 733 In the linear free surface case (\np{ln\_linssh}\forcode{ = .true.}), an additional term has to be added on 734 both temperature and salinity. 735 On temperature, this term remove the heat content associated with mass exchange that has been added to $Q_{ns}$. 736 On salinity, this term mimics the concentration/dilution effect that would have resulted from a change in 737 the volume of the first level. 748 Such time averaging prevents the divergence of odd and even time step (see \autoref{chap:TD}). 749 750 In the linear free surface case (\np[=.true.]{ln_linssh}{ln\_linssh}), 751 an additional term has to be added on both temperature and salinity. 752 On temperature, this term remove the heat content associated with 753 mass exchange that has been added to $Q_{ns}$. 754 On salinity, this term mimics the concentration/dilution effect that would have resulted from 755 a change in the volume of the first level. 738 756 The resulting surface boundary condition is applied as follows: 739 757 \begin{equation} 740 \label{eq:tra_sbc_lin} 741 \begin{alignedat}{2} 742 F^T &= \frac{1}{C_p} &\frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} 743 &\overline{(Q_{ns} - C_p \, \textit{emp} \lt. T \rt|_{k = 1})}^t \\ 744 F^S &= &\frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} 745 &\overline{(\textit{sfx} - \textit{emp} \lt. S \rt|_{k = 1})}^t 746 \end{alignedat} 747 \end{equation} 748 Note that an exact conservation of heat and salt content is only achieved with non-linear free surface. 758 \label{eq:TRA_sbc_lin} 759 F^T = \frac{1}{C_p} \frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} 760 \overline{(Q_{ns} - C_p \, \textit{emp} \lt. T \rt|_{k = 1})}^t \qquad 761 F^S = \frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} 762 \overline{(\textit{sfx} - \textit{emp} \lt. S \rt|_{k = 1})}^t 763 \end{equation} 764 Note that an exact conservation of heat and salt content is only achieved with 765 non-linear free surface. 749 766 In the linear free surface case, there is a small imbalance. 750 The imbalance is larger than the imbalance associated with the Asselin time filter \citep{leclair.madec_OM09}. 751 This is the reason why the modified filter is not applied in the linear free surface case (see \autoref{chap:STP}). 752 753 % ------------------------------------------------------------------------------------------------------------- 754 % Solar Radiation Penetration 755 % ------------------------------------------------------------------------------------------------------------- 756 \subsection[Solar radiation penetration (\textit{traqsr.F90})] 757 {Solar radiation penetration (\protect\mdl{traqsr})} 767 The imbalance is larger than the imbalance associated with the Asselin time filter 768 \citep{leclair.madec_OM09}. 769 This is the reason why the modified filter is not applied in the linear free surface case 770 (see \autoref{chap:TD}). 771 772 %% ================================================================================================= 773 \subsection[Solar radiation penetration (\textit{traqsr.F90})]{Solar radiation penetration (\protect\mdl{traqsr})} 758 774 \label{subsec:TRA_qsr} 759 %--------------------------------------------namqsr-------------------------------------------------------- 760 761 \nlst{namtra_qsr} 762 %-------------------------------------------------------------------------------------------------------------- 763 764 Options are defined through the \nam{tra\_qsr} namelist variables. 765 When the penetrative solar radiation option is used (\np{ln\_traqsr}\forcode{ = .true.}), 775 776 \begin{listing} 777 \nlst{namtra_qsr} 778 \caption{\forcode{&namtra_qsr}} 779 \label{lst:namtra_qsr} 780 \end{listing} 781 782 Options are defined through the \nam{tra_qsr}{tra\_qsr} namelist variables. 783 When the penetrative solar radiation option is used (\np[=.true.]{ln_traqsr}{ln\_traqsr}), 766 784 the solar radiation penetrates the top few tens of meters of the ocean. 767 If it is not used (\np{ln\_traqsr}\forcode{ = .false.}) all the heat flux is absorbed in the first ocean level. 768 Thus, in the former case a term is added to the time evolution equation of temperature \autoref{eq:PE_tra_T} and 769 the surface boundary condition is modified to take into account only the non-penetrative part of the surface 770 heat flux: 771 \begin{equation} 772 \label{eq:PE_qsr} 785 If it is not used (\np[=.false.]{ln_traqsr}{ln\_traqsr}) all the heat flux is absorbed in 786 the first ocean level. 787 Thus, in the former case a term is added to the time evolution equation of temperature 788 \autoref{eq:MB_PE_tra_T} and the surface boundary condition is modified to 789 take into account only the non-penetrative part of the surface heat flux: 790 \begin{equation} 791 \label{eq:TRA_PE_qsr} 773 792 \begin{gathered} 774 793 \pd[T]{t} = \ldots + \frac{1}{\rho_o \, C_p \, e_3} \; \pd[I]{k} \\ … … 778 797 where $Q_{sr}$ is the penetrative part of the surface heat flux (\ie\ the shortwave radiation) and 779 798 $I$ is the downward irradiance ($\lt. I \rt|_{z = \eta} = Q_{sr}$). 780 The additional term in \autoref{eq: PE_qsr} is discretized as follows:781 \begin{equation} 782 \label{eq: tra_qsr}799 The additional term in \autoref{eq:TRA_PE_qsr} is discretized as follows: 800 \begin{equation} 801 \label{eq:TRA_qsr} 783 802 \frac{1}{\rho_o \, C_p \, e_3} \, \pd[I]{k} \equiv \frac{1}{\rho_o \, C_p \, e_{3t}} \delta_k [I_w] 784 803 \end{equation} 785 804 786 805 The shortwave radiation, $Q_{sr}$, consists of energy distributed across a wide spectral range. 787 The ocean is strongly absorbing for wavelengths longer than 700~nm and these wavelengths contribute to 788 heating the upper few tens of centimetres. 789 The fraction of $Q_{sr}$ that resides in these almost non-penetrative wavebands, $R$, is $\sim 58\%$ 790 (specified through namelist parameter \np{rn\_abs}). 791 It is assumed to penetrate the ocean with a decreasing exponential profile, with an e-folding depth scale, $\xi_0$, 792 of a few tens of centimetres (typically $\xi_0 = 0.35~m$ set as \np{rn\_si0} in the \nam{tra\_qsr} namelist). 793 For shorter wavelengths (400-700~nm), the ocean is more transparent, and solar energy propagates to 794 larger depths where it contributes to local heating. 795 The way this second part of the solar energy penetrates into the ocean depends on which formulation is chosen. 796 In the simple 2-waveband light penetration scheme (\np{ln\_qsr\_2bd}\forcode{ = .true.}) 806 The ocean is strongly absorbing for wavelengths longer than 700 $nm$ and 807 these wavelengths contribute to heat the upper few tens of centimetres. 808 The fraction of $Q_{sr}$ that resides in these almost non-penetrative wavebands, $R$, is $\sim$ 58\% 809 (specified through namelist parameter \np{rn_abs}{rn\_abs}). 810 It is assumed to penetrate the ocean with a decreasing exponential profile, 811 with an e-folding depth scale, $\xi_0$, of a few tens of centimetres 812 (typically $\xi_0 = 0.35~m$ set as \np{rn_si0}{rn\_si0} in the \nam{tra_qsr}{tra\_qsr} namelist). 813 For shorter wavelengths (400-700 $nm$), the ocean is more transparent, 814 and solar energy propagates to larger depths where it contributes to local heating. 815 The way this second part of the solar energy penetrates into 816 the ocean depends on which formulation is chosen. 817 In the simple 2-waveband light penetration scheme (\np[=.true.]{ln_qsr_2bd}{ln\_qsr\_2bd}) 797 818 a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths, 798 819 leading to the following expression \citep{paulson.simpson_JPO77}: 799 820 \[ 800 % \label{eq: traqsr_iradiance}821 % \label{eq:TRA_qsr_iradiance} 801 822 I(z) = Q_{sr} \lt[ Re^{- z / \xi_0} + (1 - R) e^{- z / \xi_1} \rt] 802 823 \] 803 824 where $\xi_1$ is the second extinction length scale associated with the shorter wavelengths. 804 It is usually chosen to be 23~m by setting the \np{rn \_si0} namelist parameter.805 The set of default values ($\xi_0, \xi_1, R$) corresponds to a Type I water in Jerlov's (1968) classification806 (oligotrophic waters).825 It is usually chosen to be 23~m by setting the \np{rn_si0}{rn\_si0} namelist parameter. 826 The set of default values ($\xi_0, \xi_1, R$) corresponds to 827 a Type I water in Jerlov's (1968) classification (oligotrophic waters). 807 828 808 829 Such assumptions have been shown to provide a very crude and simplistic representation of 809 observed light penetration profiles (\cite{morel_JGR88}, see also \autoref{fig: traqsr_irradiance}).830 observed light penetration profiles (\cite{morel_JGR88}, see also \autoref{fig:TRA_qsr_irradiance}). 810 831 Light absorption in the ocean depends on particle concentration and is spectrally selective. 811 832 \cite{morel_JGR88} has shown that an accurate representation of light penetration can be provided by 812 833 a 61 waveband formulation. 813 834 Unfortunately, such a model is very computationally expensive. 814 Thus, \cite{lengaigne.menkes.ea_CD07} have constructed a simplified version of this formulation in which 815 visible light is split into three wavebands: blue (400-500 nm), green (500-600 nm) and red (600-700nm). 816 For each wave-band, the chlorophyll-dependent attenuation coefficient is fitted to the coefficients computed from 817 the full spectral model of \cite{morel_JGR88} (as modified by \cite{morel.maritorena_JGR01}), 818 assuming the same power-law relationship. 819 As shown in \autoref{fig:traqsr_irradiance}, this formulation, called RGB (Red-Green-Blue), 835 Thus, \cite{lengaigne.menkes.ea_CD07} have constructed a simplified version of 836 this formulation in which visible light is split into three wavebands: 837 blue (400-500 $nm$), green (500-600 $nm$) and red (600-700 $nm$). 838 For each wave-band, the chlorophyll-dependent attenuation coefficient is fitted to 839 the coefficients computed from the full spectral model of \cite{morel_JGR88} 840 (as modified by \cite{morel.maritorena_JGR01}), assuming the same power-law relationship. 841 As shown in \autoref{fig:TRA_qsr_irradiance}, this formulation, 842 called RGB (\textbf{R}ed-\textbf{G}reen-\textbf{B}lue), 820 843 reproduces quite closely the light penetration profiles predicted by the full spectal model, 821 844 but with much greater computational efficiency. 822 845 The 2-bands formulation does not reproduce the full model very well. 823 846 824 The RGB formulation is used when \np {ln\_qsr\_rgb}\forcode{ = .true.}.825 The RGB attenuation coefficients (\ie\ the inverses of the extinction length scales) are tabulated over826 61 nonuniform chlorophyll classes ranging from 0.01 to 10 g.Chl/L 847 The RGB formulation is used when \np[=.true.]{ln_qsr_rgb}{ln\_qsr\_rgb}. 848 The RGB attenuation coefficients (\ie\ the inverses of the extinction length scales) are 849 tabulated over 61 nonuniform chlorophyll classes ranging from 0.01 to 10 $g.Chl/L$ 827 850 (see the routine \rou{trc\_oce\_rgb} in \mdl{trc\_oce} module). 828 851 Four types of chlorophyll can be chosen in the RGB formulation: 829 852 830 853 \begin{description} 831 \item[\np{nn\_chldta}\forcode{ = 0}] 832 a constant 0.05 g.Chl/L value everywhere ; 833 \item[\np{nn\_chldta}\forcode{ = 1}] 834 an observed time varying chlorophyll deduced from satellite surface ocean color measurement spread uniformly in 835 the vertical direction; 836 \item[\np{nn\_chldta}\forcode{ = 2}] 837 same as previous case except that a vertical profile of chlorophyl is used. 838 Following \cite{morel.berthon_LO89}, the profile is computed from the local surface chlorophyll value; 839 \item[\np{ln\_qsr\_bio}\forcode{ = .true.}] 840 simulated time varying chlorophyll by TOP biogeochemical model. 841 In this case, the RGB formulation is used to calculate both the phytoplankton light limitation in 842 PISCES and the oceanic heating rate. 854 \item [{\np[=0]{nn_chldta}{nn\_chldta}}] a constant 0.05 $g.Chl/L$ value everywhere; 855 \item [{\np[=1]{nn_chldta}{nn\_chldta}}] an observed time varying chlorophyll deduced from 856 satellite surface ocean color measurement spread uniformly in the vertical direction; 857 \item [{\np[=2]{nn_chldta}{nn\_chldta}}] same as previous case except that 858 a vertical profile of chlorophyl is used. 859 Following \cite{morel.berthon_LO89}, 860 the profile is computed from the local surface chlorophyll value; 861 \item [{\np[=.true.]{ln_qsr_bio}{ln\_qsr\_bio}}] simulated time varying chlorophyll by 862 \TOP\ biogeochemical model. 863 In this case, the RGB formulation is used to calculate both 864 the phytoplankton light limitation in \PISCES\ and the oceanic heating rate. 843 865 \end{description} 844 866 845 The trend in \autoref{eq: tra_qsr} associated with the penetration of the solar radiation is added to867 The trend in \autoref{eq:TRA_qsr} associated with the penetration of the solar radiation is added to 846 868 the temperature trend, and the surface heat flux is modified in routine \mdl{traqsr}. 847 869 … … 851 873 (\ie\ it is less than the computer precision) is computed once, 852 874 and the trend associated with the penetration of the solar radiation is only added down to that level. 853 Finally, note that when the ocean is shallow ($<$ 200~m), part of the solar radiation can reach the ocean floor. 875 Finally, note that when the ocean is shallow ($<$ 200~m), 876 part of the solar radiation can reach the ocean floor. 854 877 In this case, we have chosen that all remaining radiation is absorbed in the last ocean level 855 878 (\ie\ $I$ is masked). 856 879 857 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 858 \begin{figure}[!t] 859 \begin{center} 860 \includegraphics[width=\textwidth]{Fig_TRA_Irradiance} 861 \caption{ 862 \protect\label{fig:traqsr_irradiance} 863 Penetration profile of the downward solar irradiance calculated by four models. 864 Two waveband chlorophyll-independent formulation (blue), 865 a chlorophyll-dependent monochromatic formulation (green), 866 4 waveband RGB formulation (red), 867 61 waveband Morel (1988) formulation (black) for a chlorophyll concentration of 868 (a) Chl=0.05 mg/m$^3$ and (b) Chl=0.5 mg/m$^3$. 869 From \citet{lengaigne.menkes.ea_CD07}. 870 } 871 \end{center} 880 \begin{figure} 881 \centering 882 \includegraphics[width=0.66\textwidth]{Fig_TRA_Irradiance} 883 \caption[Penetration profile of the downward solar irradiance calculated by four models]{ 884 Penetration profile of the downward solar irradiance calculated by four models. 885 Two waveband chlorophyll-independent formulation (blue), 886 a chlorophyll-dependent monochromatic formulation (green), 887 4 waveband RGB formulation (red), 888 61 waveband Morel (1988) formulation (black) for a chlorophyll concentration of 889 (a) Chl=0.05 $mg/m^3$ and (b) Chl=0.5 $mg/m^3$. 890 From \citet{lengaigne.menkes.ea_CD07}.} 891 \label{fig:TRA_qsr_irradiance} 872 892 \end{figure} 873 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 874 875 % ------------------------------------------------------------------------------------------------------------- 876 % Bottom Boundary Condition 877 % ------------------------------------------------------------------------------------------------------------- 878 \subsection[Bottom boundary condition (\textit{trabbc.F90}) - \forcode{ln_trabbc = .true.})] 879 {Bottom boundary condition (\protect\mdl{trabbc})} 893 894 %% ================================================================================================= 895 \subsection[Bottom boundary condition (\textit{trabbc.F90}) - \forcode{ln_trabbc})]{Bottom boundary condition (\protect\mdl{trabbc} - \protect\np{ln_trabbc}{ln\_trabbc})} 880 896 \label{subsec:TRA_bbc} 881 %--------------------------------------------nambbc-------------------------------------------------------- 882 883 \nlst{nambbc}884 %-------------------------------------------------------------------------------------------------------------- 885 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 886 \ begin{figure}[!t]887 \begin{center} 888 \includegraphics[width=\textwidth]{Fig_TRA_geoth}889 \caption{890 \protect\label{fig:geothermal}891 Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{emile-geay.madec_OS09}.892 It is inferred from the age of the sea floor and the formulae of \citet{stein.stein_N92}.893 }894 \ end{center}897 898 \begin{listing} 899 \nlst{nambbc} 900 \caption{\forcode{&nambbc}} 901 \label{lst:nambbc} 902 \end{listing} 903 904 \begin{figure} 905 \centering 906 \includegraphics[width=0.66\textwidth]{Fig_TRA_geoth} 907 \caption[Geothermal heat flux]{ 908 Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{emile-geay.madec_OS09}. 909 It is inferred from the age of the sea floor and the formulae of \citet{stein.stein_N92}.} 910 \label{fig:TRA_geothermal} 895 911 \end{figure} 896 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>897 912 898 913 Usually it is assumed that there is no exchange of heat or salt through the ocean bottom, 899 914 \ie\ a no flux boundary condition is applied on active tracers at the bottom. 900 915 This is the default option in \NEMO, and it is implemented using the masking technique. 901 However, there is a non-zero heat flux across the seafloor that is associated with solid earth cooling. 902 This flux is weak compared to surface fluxes (a mean global value of $\sim 0.1 \, W/m^2$ \citep{stein.stein_N92}), 916 However, there is a non-zero heat flux across the seafloor that 917 is associated with solid earth cooling. 918 This flux is weak compared to surface fluxes 919 (a mean global value of $\sim 0.1 \, W/m^2$ \citep{stein.stein_N92}), 903 920 but it warms systematically the ocean and acts on the densest water masses. 904 921 Taking this flux into account in a global ocean model increases the deepest overturning cell 905 (\ie\ the one associated with the Antarctic Bottom Water) by a few Sverdrups \citep{emile-geay.madec_OS09}. 906 907 Options are defined through the \nam{bbc} namelist variables. 908 The presence of geothermal heating is controlled by setting the namelist parameter \np{ln\_trabbc} to true. 909 Then, when \np{nn\_geoflx} is set to 1, a constant geothermal heating is introduced whose value is given by 910 the \np{rn\_geoflx\_cst}, which is also a namelist parameter. 911 When \np{nn\_geoflx} is set to 2, a spatially varying geothermal heat flux is introduced which is provided in 912 the \ifile{geothermal\_heating} NetCDF file (\autoref{fig:geothermal}) \citep{emile-geay.madec_OS09}. 913 914 % ================================================================ 915 % Bottom Boundary Layer 916 % ================================================================ 917 \section[Bottom boundary layer (\textit{trabbl.F90} - \forcode{ln_trabbl = .true.})] 918 {Bottom boundary layer (\protect\mdl{trabbl} - \protect\np{ln\_trabbl}\forcode{ = .true.})} 922 (\ie\ the one associated with the Antarctic Bottom Water) by 923 a few Sverdrups \citep{emile-geay.madec_OS09}. 924 925 Options are defined through the \nam{bbc}{bbc} namelist variables. 926 The presence of geothermal heating is controlled by 927 setting the namelist parameter \np{ln_trabbc}{ln\_trabbc} to true. 928 Then, when \np{nn_geoflx}{nn\_geoflx} is set to 1, a constant geothermal heating is introduced whose 929 value is given by the \np{rn_geoflx_cst}{rn\_geoflx\_cst}, which is also a namelist parameter. 930 When \np{nn_geoflx}{nn\_geoflx} is set to 2, 931 a spatially varying geothermal heat flux is introduced which is provided in 932 the \ifile{geothermal\_heating} NetCDF file 933 (\autoref{fig:TRA_geothermal}) \citep{emile-geay.madec_OS09}. 934 935 %% ================================================================================================= 936 \section[Bottom boundary layer (\textit{trabbl.F90} - \forcode{ln_trabbl})]{Bottom boundary layer (\protect\mdl{trabbl} - \protect\np{ln_trabbl}{ln\_trabbl})} 919 937 \label{sec:TRA_bbl} 920 %--------------------------------------------nambbl--------------------------------------------------------- 921 922 \nlst{nambbl} 923 %-------------------------------------------------------------------------------------------------------------- 924 925 Options are defined through the \nam{bbl} namelist variables. 938 939 \begin{listing} 940 \nlst{nambbl} 941 \caption{\forcode{&nambbl}} 942 \label{lst:nambbl} 943 \end{listing} 944 945 Options are defined through the \nam{bbl}{bbl} namelist variables. 926 946 In a $z$-coordinate configuration, the bottom topography is represented by a series of discrete steps. 927 947 This is not adequate to represent gravity driven downslope flows. … … 929 949 where dense water formed in marginal seas flows into a basin filled with less dense water, 930 950 or along the continental slope when dense water masses are formed on a continental shelf. 931 The amount of entrainment that occurs in these gravity plumes is critical in determining the density and 932 volume flux of the densest waters of the ocean, such as Antarctic Bottom Water, or North Atlantic Deep Water. 951 The amount of entrainment that occurs in these gravity plumes is critical in 952 determining the density and volume flux of the densest waters of the ocean, 953 such as Antarctic Bottom Water, or North Atlantic Deep Water. 933 954 $z$-coordinate models tend to overestimate the entrainment, 934 because the gravity flow is mixed vertically by convection as it goes ''downstairs'' following the step topography, 955 because the gravity flow is mixed vertically by convection as 956 it goes ''downstairs'' following the step topography, 935 957 sometimes over a thickness much larger than the thickness of the observed gravity plume. 936 A similar problem occurs in the $s$-coordinate when the thickness of the bottom level varies rapidly downstream of 937 a sill \citep{willebrand.barnier.ea_PO01}, and the thickness of the plume is not resolved. 938 939 The idea of the bottom boundary layer (BBL) parameterisation, first introduced by \citet{beckmann.doscher_JPO97}, 958 A similar problem occurs in the $s$-coordinate when 959 the thickness of the bottom level varies rapidly downstream of a sill 960 \citep{willebrand.barnier.ea_PO01}, and the thickness of the plume is not resolved. 961 962 The idea of the bottom boundary layer (BBL) parameterisation, first introduced by 963 \citet{beckmann.doscher_JPO97}, 940 964 is to allow a direct communication between two adjacent bottom cells at different levels, 941 965 whenever the densest water is located above the less dense water. 942 The communication can be by a diffusive flux (diffusive BBL), an advective flux (advective BBL), or both. 966 The communication can be by a diffusive flux (diffusive BBL), 967 an advective flux (advective BBL), or both. 943 968 In the current implementation of the BBL, only the tracers are modified, not the velocities. 944 Furthermore, it only connects ocean bottom cells, and therefore does not include all the improvements introduced by 945 \citet{campin.goosse_T99}. 946 947 % ------------------------------------------------------------------------------------------------------------- 948 % Diffusive BBL 949 % ------------------------------------------------------------------------------------------------------------- 950 \subsection[Diffusive bottom boundary layer (\forcode{nn_bbl_ldf = 1})] 951 {Diffusive bottom boundary layer (\protect\np{nn\_bbl\_ldf}\forcode{ = 1})} 969 Furthermore, it only connects ocean bottom cells, 970 and therefore does not include all the improvements introduced by \citet{campin.goosse_T99}. 971 972 %% ================================================================================================= 973 \subsection[Diffusive bottom boundary layer (\forcode{nn_bbl_ldf=1})]{Diffusive bottom boundary layer (\protect\np[=1]{nn_bbl_ldf}{nn\_bbl\_ldf})} 952 974 \label{subsec:TRA_bbl_diff} 953 975 954 When applying sigma-diffusion (\np{ln\_trabbl}\forcode{ = .true.} and \np{nn\_bbl\_ldf} set to 1), 976 When applying sigma-diffusion 977 (\np[=.true.]{ln_trabbl}{ln\_trabbl} and \np{nn_bbl_ldf}{nn\_bbl\_ldf} set to 1), 955 978 the diffusive flux between two adjacent cells at the ocean floor is given by 956 979 \[ 957 % \label{eq: tra_bbl_diff}980 % \label{eq:TRA_bbl_diff} 958 981 \vect F_\sigma = A_l^\sigma \, \nabla_\sigma T 959 982 \] 960 with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells, and961 $A_l^\sigma$ the lateral diffusivity in the BBL.983 with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells, 984 and $A_l^\sigma$ the lateral diffusivity in the BBL. 962 985 Following \citet{beckmann.doscher_JPO97}, the latter is prescribed with a spatial dependence, 963 986 \ie\ in the conditional form 964 987 \begin{equation} 965 \label{eq: tra_bbl_coef}988 \label{eq:TRA_bbl_coef} 966 989 A_l^\sigma (i,j,t) = 967 990 \begin{cases} 968 991 A_{bbl} & \text{if~} \nabla_\sigma \rho \cdot \nabla H < 0 \\ 969 \\ 970 0 & \text{otherwise} \\ 992 0 & \text{otherwise} 971 993 \end{cases} 972 994 \end{equation} 973 where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist parameter \np{rn\_ahtbbl} and 995 where $A_{bbl}$ is the BBL diffusivity coefficient, 996 given by the namelist parameter \np{rn_ahtbbl}{rn\_ahtbbl} and 974 997 usually set to a value much larger than the one used for lateral mixing in the open ocean. 975 The constraint in \autoref{eq: tra_bbl_coef} implies that sigma-like diffusion only occurs when998 The constraint in \autoref{eq:TRA_bbl_coef} implies that sigma-like diffusion only occurs when 976 999 the density above the sea floor, at the top of the slope, is larger than in the deeper ocean 977 (see green arrow in \autoref{fig: bbl}).1000 (see green arrow in \autoref{fig:TRA_bbl}). 978 1001 In practice, this constraint is applied separately in the two horizontal directions, 979 and the density gradient in \autoref{eq: tra_bbl_coef} is evaluated with the log gradient formulation:1002 and the density gradient in \autoref{eq:TRA_bbl_coef} is evaluated with the log gradient formulation: 980 1003 \[ 981 % \label{eq: tra_bbl_Drho}1004 % \label{eq:TRA_bbl_Drho} 982 1005 \nabla_\sigma \rho / \rho = \alpha \, \nabla_\sigma T + \beta \, \nabla_\sigma S 983 1006 \] 984 where $\rho$, $\alpha$ and $\beta$ are functions of $\overline T^\sigma$, $\overline S^\sigma$ and 985 $\overline H^\sigma$, the along bottom mean temperature, salinity and depth, respectively. 986 987 % ------------------------------------------------------------------------------------------------------------- 988 % Advective BBL 989 % ------------------------------------------------------------------------------------------------------------- 990 \subsection[Advective bottom boundary layer (\forcode{nn_bbl_adv = [12]})] 991 {Advective bottom boundary layer (\protect\np{nn\_bbl\_adv}\forcode{ = [12]})} 1007 where $\rho$, $\alpha$ and $\beta$ are functions of 1008 $\overline T^\sigma$, $\overline S^\sigma$ and $\overline H^\sigma$, 1009 the along bottom mean temperature, salinity and depth, respectively. 1010 1011 %% ================================================================================================= 1012 \subsection[Advective bottom boundary layer (\forcode{nn_bbl_adv=1,2})]{Advective bottom boundary layer (\protect\np[=1,2]{nn_bbl_adv}{nn\_bbl\_adv})} 992 1013 \label{subsec:TRA_bbl_adv} 993 1014 … … 997 1018 %} 998 1019 999 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1000 \begin{figure}[!t] 1001 \begin{center} 1002 \includegraphics[width=\textwidth]{Fig_BBL_adv} 1003 \caption{ 1004 \protect\label{fig:bbl} 1005 Advective/diffusive Bottom Boundary Layer. 1006 The BBL parameterisation is activated when $\rho^i_{kup}$ is larger than $\rho^{i + 1}_{kdnw}$. 1007 Red arrows indicate the additional overturning circulation due to the advective BBL. 1008 The transport of the downslope flow is defined either as the transport of the bottom ocean cell (black arrow), 1009 or as a function of the along slope density gradient. 1010 The green arrow indicates the diffusive BBL flux directly connecting $kup$ and $kdwn$ ocean bottom cells. 1011 } 1012 \end{center} 1020 \begin{figure} 1021 \centering 1022 \includegraphics[width=0.33\textwidth]{Fig_BBL_adv} 1023 \caption[Advective/diffusive bottom boundary layer]{ 1024 Advective/diffusive Bottom Boundary Layer. 1025 The BBL parameterisation is activated when $\rho^i_{kup}$ is larger than $\rho^{i + 1}_{kdnw}$. 1026 Red arrows indicate the additional overturning circulation due to the advective BBL. 1027 The transport of the downslope flow is defined either 1028 as the transport of the bottom ocean cell (black arrow), 1029 or as a function of the along slope density gradient. 1030 The green arrow indicates the diffusive BBL flux directly connecting 1031 $kup$ and $kdwn$ ocean bottom cells.} 1032 \label{fig:TRA_bbl} 1013 1033 \end{figure} 1014 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>1015 1034 1016 1035 %!! nn_bbl_adv = 1 use of the ocean velocity as bbl velocity … … 1020 1039 %%%gmcomment : this section has to be really written 1021 1040 1022 When applying an advective BBL (\np{nn\_bbl\_adv}\forcode{ = 1..2}), an overturning circulation is added which 1023 connects two adjacent bottom grid-points only if dense water overlies less dense water on the slope. 1041 When applying an advective BBL (\np[=1..2]{nn_bbl_adv}{nn\_bbl\_adv}), 1042 an overturning circulation is added which connects two adjacent bottom grid-points only if 1043 dense water overlies less dense water on the slope. 1024 1044 The density difference causes dense water to move down the slope. 1025 1045 1026 \np{nn\_bbl\_adv}\forcode{ = 1}: 1027 the downslope velocity is chosen to be the Eulerian ocean velocity just above the topographic step 1028 (see black arrow in \autoref{fig:bbl}) \citep{beckmann.doscher_JPO97}. 1029 It is a \textit{conditional advection}, that is, advection is allowed only 1030 if dense water overlies less dense water on the slope (\ie\ $\nabla_\sigma \rho \cdot \nabla H < 0$) and 1031 if the velocity is directed towards greater depth (\ie\ $\vect U \cdot \nabla H > 0$). 1032 1033 \np{nn\_bbl\_adv}\forcode{ = 2}: 1034 the downslope velocity is chosen to be proportional to $\Delta \rho$, 1035 the density difference between the higher cell and lower cell densities \citep{campin.goosse_T99}. 1036 The advection is allowed only if dense water overlies less dense water on the slope 1037 (\ie\ $\nabla_\sigma \rho \cdot \nabla H < 0$). 1038 For example, the resulting transport of the downslope flow, here in the $i$-direction (\autoref{fig:bbl}), 1039 is simply given by the following expression: 1040 \[ 1041 % \label{eq:bbl_Utr} 1042 u^{tr}_{bbl} = \gamma g \frac{\Delta \rho}{\rho_o} e_{1u} \, min ({e_{3u}}_{kup},{e_{3u}}_{kdwn}) 1043 \] 1044 where $\gamma$, expressed in seconds, is the coefficient of proportionality provided as \np{rn\_gambbl}, 1045 a namelist parameter, and \textit{kup} and \textit{kdwn} are the vertical index of the higher and lower cells, 1046 respectively. 1047 The parameter $\gamma$ should take a different value for each bathymetric step, but for simplicity, 1048 and because no direct estimation of this parameter is available, a uniform value has been assumed. 1049 The possible values for $\gamma$ range between 1 and $10~s$ \citep{campin.goosse_T99}. 1050 1051 Scalar properties are advected by this additional transport $(u^{tr}_{bbl},v^{tr}_{bbl})$ using the upwind scheme. 1052 Such a diffusive advective scheme has been chosen to mimic the entrainment between the downslope plume and 1053 the surrounding water at intermediate depths. 1046 \begin{description} 1047 \item [{\np[=1]{nn_bbl_adv}{nn\_bbl\_adv}}] the downslope velocity is chosen to 1048 be the Eulerian ocean velocity just above the topographic step 1049 (see black arrow in \autoref{fig:TRA_bbl}) \citep{beckmann.doscher_JPO97}. 1050 It is a \textit{conditional advection}, that is, 1051 advection is allowed only if dense water overlies less dense water on the slope 1052 (\ie\ $\nabla_\sigma \rho \cdot \nabla H < 0$) and if the velocity is directed towards greater depth 1053 (\ie\ $\vect U \cdot \nabla H > 0$). 1054 \item [{\np[=2]{nn_bbl_adv}{nn\_bbl\_adv}}] the downslope velocity is chosen to be proportional to 1055 $\Delta \rho$, the density difference between the higher cell and lower cell densities 1056 \citep{campin.goosse_T99}. 1057 The advection is allowed only if dense water overlies less dense water on the slope 1058 (\ie\ $\nabla_\sigma \rho \cdot \nabla H < 0$). 1059 For example, the resulting transport of the downslope flow, here in the $i$-direction 1060 (\autoref{fig:TRA_bbl}), is simply given by the following expression: 1061 \[ 1062 % \label{eq:TRA_bbl_Utr} 1063 u^{tr}_{bbl} = \gamma g \frac{\Delta \rho}{\rho_o} e_{1u} \, min ({e_{3u}}_{kup},{e_{3u}}_{kdwn}) 1064 \] 1065 where $\gamma$, expressed in seconds, is the coefficient of proportionality provided as 1066 \np{rn_gambbl}{rn\_gambbl}, a namelist parameter, and 1067 \textit{kup} and \textit{kdwn} are the vertical index of the higher and lower cells, respectively. 1068 The parameter $\gamma$ should take a different value for each bathymetric step, but for simplicity, 1069 and because no direct estimation of this parameter is available, a uniform value has been assumed. 1070 The possible values for $\gamma$ range between 1 and $10~s$ \citep{campin.goosse_T99}. 1071 \end{description} 1072 1073 Scalar properties are advected by this additional transport $(u^{tr}_{bbl},v^{tr}_{bbl})$ using 1074 the upwind scheme. 1075 Such a diffusive advective scheme has been chosen to mimic the entrainment between 1076 the downslope plume and the surrounding water at intermediate depths. 1054 1077 The entrainment is replaced by the vertical mixing implicit in the advection scheme. 1055 Let us consider as an example the case displayed in \autoref{fig: bbl} where1078 Let us consider as an example the case displayed in \autoref{fig:TRA_bbl} where 1056 1079 the density at level $(i,kup)$ is larger than the one at level $(i,kdwn)$. 1057 The advective BBL scheme modifies the tracer time tendency of the ocean cells near the topographic step by 1058 the downslope flow \autoref{eq:bbl_dw}, the horizontal \autoref{eq:bbl_hor} and 1059 the upward \autoref{eq:bbl_up} return flows as follows: 1060 \begin{alignat}{3} 1061 \label{eq:bbl_dw} 1062 \partial_t T^{do}_{kdw} &\equiv \partial_t T^{do}_{kdw} 1063 &&+ \frac{u^{tr}_{bbl}}{{b_t}^{do}_{kdw}} &&\lt( T^{sh}_{kup} - T^{do}_{kdw} \rt) \\ 1064 \label{eq:bbl_hor} 1065 \partial_t T^{sh}_{kup} &\equiv \partial_t T^{sh}_{kup} 1066 &&+ \frac{u^{tr}_{bbl}}{{b_t}^{sh}_{kup}} &&\lt( T^{do}_{kup} - T^{sh}_{kup} \rt) \\ 1067 % 1068 \intertext{and for $k =kdw-1,\;..., \; kup$ :} 1069 % 1070 \label{eq:bbl_up} 1071 \partial_t T^{do}_{k} &\equiv \partial_t S^{do}_{k} 1072 &&+ \frac{u^{tr}_{bbl}}{{b_t}^{do}_{k}} &&\lt( T^{do}_{k +1} - T^{sh}_{k} \rt) 1080 The advective BBL scheme modifies the tracer time tendency of 1081 the ocean cells near the topographic step by the downslope flow \autoref{eq:TRA_bbl_dw}, 1082 the horizontal \autoref{eq:TRA_bbl_hor} and the upward \autoref{eq:TRA_bbl_up} return flows as follows: 1083 \begin{alignat}{5} 1084 \label{eq:TRA_bbl_dw} 1085 \partial_t T^{do}_{kdw} &\equiv \partial_t T^{do}_{kdw} &&+ \frac{u^{tr}_{bbl}}{{b_t}^{do}_{kdw}} &&\lt( T^{sh}_{kup} - T^{do}_{kdw} \rt) \\ 1086 \label{eq:TRA_bbl_hor} 1087 \partial_t T^{sh}_{kup} &\equiv \partial_t T^{sh}_{kup} &&+ \frac{u^{tr}_{bbl}}{{b_t}^{sh}_{kup}} &&\lt( T^{do}_{kup} - T^{sh}_{kup} \rt) \\ 1088 \shortintertext{and for $k =kdw-1,\;..., \; kup$ :} 1089 \label{eq:TRA_bbl_up} 1090 \partial_t T^{do}_{k} &\equiv \partial_t S^{do}_{k} &&+ \frac{u^{tr}_{bbl}}{{b_t}^{do}_{k}} &&\lt( T^{do}_{k +1} - T^{sh}_{k} \rt) 1073 1091 \end{alignat} 1074 1092 where $b_t$ is the $T$-cell volume. … … 1077 1095 It has to be used to compute the effective velocity as well as the effective overturning circulation. 1078 1096 1079 % ================================================================ 1080 % Tracer damping 1081 % ================================================================ 1082 \section[Tracer damping (\textit{tradmp.F90})] 1083 {Tracer damping (\protect\mdl{tradmp})} 1097 %% ================================================================================================= 1098 \section[Tracer damping (\textit{tradmp.F90})]{Tracer damping (\protect\mdl{tradmp})} 1084 1099 \label{sec:TRA_dmp} 1085 %--------------------------------------------namtra_dmp------------------------------------------------- 1086 1087 \nlst{namtra_dmp} 1088 %-------------------------------------------------------------------------------------------------------------- 1089 1090 In some applications it can be useful to add a Newtonian damping term into the temperature and salinity equations: 1091 \begin{equation} 1092 \label{eq:tra_dmp} 1093 \begin{gathered} 1094 \pd[T]{t} = \cdots - \gamma (T - T_o) \\ 1095 \pd[S]{t} = \cdots - \gamma (S - S_o) 1096 \end{gathered} 1097 \end{equation} 1098 where $\gamma$ is the inverse of a time scale, and $T_o$ and $S_o$ are given temperature and salinity fields 1099 (usually a climatology). 1100 Options are defined through the \nam{tra\_dmp} namelist variables. 1101 The restoring term is added when the namelist parameter \np{ln\_tradmp} is set to true. 1102 It also requires that both \np{ln\_tsd\_init} and \np{ln\_tsd\_dmp} are set to true in 1103 \nam{tsd} namelist as well as \np{sn\_tem} and \np{sn\_sal} structures are correctly set 1100 1101 \begin{listing} 1102 \nlst{namtra_dmp} 1103 \caption{\forcode{&namtra_dmp}} 1104 \label{lst:namtra_dmp} 1105 \end{listing} 1106 1107 In some applications it can be useful to add a Newtonian damping term into 1108 the temperature and salinity equations: 1109 \begin{equation} 1110 \label{eq:TRA_dmp} 1111 \pd[T]{t} = \cdots - \gamma (T - T_o) \qquad \pd[S]{t} = \cdots - \gamma (S - S_o) 1112 \end{equation} 1113 where $\gamma$ is the inverse of a time scale, 1114 and $T_o$ and $S_o$ are given temperature and salinity fields (usually a climatology). 1115 Options are defined through the \nam{tra_dmp}{tra\_dmp} namelist variables. 1116 The restoring term is added when the namelist parameter \np{ln_tradmp}{ln\_tradmp} is set to true. 1117 It also requires that both \np{ln_tsd_init}{ln\_tsd\_init} and 1118 \np{ln_tsd_dmp}{ln\_tsd\_dmp} are set to true in \nam{tsd}{tsd} namelist as well as 1119 \np{sn_tem}{sn\_tem} and \np{sn_sal}{sn\_sal} structures are correctly set 1104 1120 (\ie\ that $T_o$ and $S_o$ are provided in input files and read using \mdl{fldread}, 1105 1121 see \autoref{subsec:SBC_fldread}). 1106 The restoring coefficient $\gamma$ is a three-dimensional array read in during the \rou{tra\_dmp\_init} routine. 1107 The file name is specified by the namelist variable \np{cn\_resto}. 1108 The DMP\_TOOLS tool is provided to allow users to generate the netcdf file. 1109 1110 The two main cases in which \autoref{eq:tra_dmp} is used are 1111 \textit{(a)} the specification of the boundary conditions along artificial walls of a limited domain basin and 1112 \textit{(b)} the computation of the velocity field associated with a given $T$-$S$ field 1113 (for example to build the initial state of a prognostic simulation, 1114 or to use the resulting velocity field for a passive tracer study). 1122 The restoring coefficient $\gamma$ is a three-dimensional array read in during 1123 the \rou{tra\_dmp\_init} routine. 1124 The file name is specified by the namelist variable \np{cn_resto}{cn\_resto}. 1125 The \texttt{DMP\_TOOLS} are provided to allow users to generate the netcdf file. 1126 1127 The two main cases in which \autoref{eq:TRA_dmp} is used are 1128 \begin{enumerate*}[label=(\textit{\alph*})] 1129 \item the specification of the boundary conditions along 1130 artificial walls of a limited domain basin and 1131 \item the computation of the velocity field associated with a given $T$-$S$ field 1132 (for example to build the initial state of a prognostic simulation, 1133 or to use the resulting velocity field for a passive tracer study). 1134 \end{enumerate*} 1115 1135 The first case applies to regional models that have artificial walls instead of open boundaries. 1116 In the vicinity of these walls, $\gamma$ takes large values (equivalent to a time scale of a few days) whereas1117 it is zero in the interior of the model domain.1136 In the vicinity of these walls, $\gamma$ takes large values (equivalent to a time scale of a few days) 1137 whereas it is zero in the interior of the model domain. 1118 1138 The second case corresponds to the use of the robust diagnostic method \citep{sarmiento.bryan_JGR82}. 1119 1139 It allows us to find the velocity field consistent with the model dynamics whilst 1120 1140 having a $T$, $S$ field close to a given climatological field ($T_o$, $S_o$). 1121 1141 1122 The robust diagnostic method is very efficient in preventing temperature drift in intermediate waters but1123 i t produces artificial sources of heat and salt within the ocean.1142 The robust diagnostic method is very efficient in preventing temperature drift in 1143 intermediate waters but it produces artificial sources of heat and salt within the ocean. 1124 1144 It also has undesirable effects on the ocean convection. 1125 It tends to prevent deep convection and subsequent deep-water formation, by stabilising the water column too much. 1126 1127 The namelist parameter \np{nn\_zdmp} sets whether the damping should be applied in the whole water column or 1128 only below the mixed layer (defined either on a density or $S_o$ criterion). 1145 It tends to prevent deep convection and subsequent deep-water formation, 1146 by stabilising the water column too much. 1147 1148 The namelist parameter \np{nn_zdmp}{nn\_zdmp} sets whether the damping should be applied in 1149 the whole water column or only below the mixed layer (defined either on a density or $S_o$ criterion). 1129 1150 It is common to set the damping to zero in the mixed layer as the adjustment time scale is short here 1130 1151 \citep{madec.delecluse.ea_JPO96}. 1131 1152 1132 For generating \ifile{resto}, see the documentation for the DMP tool provided with the source code under 1133 \path{./tools/DMP_TOOLS}. 1134 1135 % ================================================================ 1136 % Tracer time evolution 1137 % ================================================================ 1138 \section[Tracer time evolution (\textit{tranxt.F90})] 1139 {Tracer time evolution (\protect\mdl{tranxt})} 1153 For generating \ifile{resto}, 1154 see the documentation for the DMP tools provided with the source code under \path{./tools/DMP_TOOLS}. 1155 1156 %% ================================================================================================= 1157 \section[Tracer time evolution (\textit{tranxt.F90})]{Tracer time evolution (\protect\mdl{tranxt})} 1140 1158 \label{sec:TRA_nxt} 1141 %--------------------------------------------namdom----------------------------------------------------- 1142 1143 \nlst{namdom} 1144 %-------------------------------------------------------------------------------------------------------------- 1145 1146 Options are defined through the \nam{dom} namelist variables. 1147 The general framework for tracer time stepping is a modified leap-frog scheme \citep{leclair.madec_OM09}, 1148 \ie\ a three level centred time scheme associated with a Asselin time filter (cf. \autoref{sec:STP_mLF}): 1149 \begin{equation} 1150 \label{eq:tra_nxt} 1151 \begin{alignedat}{3} 1159 1160 Options are defined through the \nam{dom}{dom} namelist variables. 1161 The general framework for tracer time stepping is a modified leap-frog scheme 1162 \citep{leclair.madec_OM09}, \ie\ a three level centred time scheme associated with 1163 a Asselin time filter (cf. \autoref{sec:TD_mLF}): 1164 \begin{equation} 1165 \label{eq:TRA_nxt} 1166 \begin{alignedat}{5} 1152 1167 &(e_{3t}T)^{t + \rdt} &&= (e_{3t}T)_f^{t - \rdt} &&+ 2 \, \rdt \,e_{3t}^t \ \text{RHS}^t \\ 1153 1168 &(e_{3t}T)_f^t &&= (e_{3t}T)^t &&+ \, \gamma \, \lt[ (e_{3t}T)_f^{t - \rdt} - 2(e_{3t}T)^t + (e_{3t}T)^{t + \rdt} \rt] \\ … … 1155 1170 \end{alignedat} 1156 1171 \end{equation} 1157 where RHS is the right hand side of the temperature equation, the subscript $f$ denotes filtered values, 1158 $\gamma$ is the Asselin coefficient, and $S$ is the total forcing applied on $T$ 1159 (\ie\ fluxes plus content in mass exchanges). 1160 $\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter). 1161 Its default value is \np{rn\_atfp}\forcode{ = 10.e-3}. 1172 where RHS is the right hand side of the temperature equation, 1173 the subscript $f$ denotes filtered values, $\gamma$ is the Asselin coefficient, 1174 and $S$ is the total forcing applied on $T$ (\ie\ fluxes plus content in mass exchanges). 1175 $\gamma$ is initialized as \np{rn_atfp}{rn\_atfp}, its default value is \forcode{10.e-3}. 1162 1176 Note that the forcing correction term in the filter is not applied in linear free surface 1163 (\jp{ln\_linssh}\forcode{ = .true.}) (see \autoref{subsec:TRA_sbc}). 1164 Not also that in constant volume case, the time stepping is performed on $T$, not on its content, $e_{3t}T$. 1165 1166 When the vertical mixing is solved implicitly, the update of the \textit{next} tracer fields is done in 1167 \mdl{trazdf} module. 1177 (\jp{ln\_linssh}\forcode{=.true.}) (see \autoref{subsec:TRA_sbc}). 1178 Not also that in constant volume case, the time stepping is performed on $T$, 1179 not on its content, $e_{3t}T$. 1180 1181 When the vertical mixing is solved implicitly, 1182 the update of the \textit{next} tracer fields is done in \mdl{trazdf} module. 1168 1183 In this case only the swapping of arrays and the Asselin filtering is done in the \mdl{tranxt} module. 1169 1184 1170 In order to prepare for the computation of the \textit{next} time step, a swap of tracer arrays is performed: 1171 $T^{t - \rdt} = T^t$ and $T^t = T_f$. 1172 1173 % ================================================================ 1174 % Equation of State (eosbn2) 1175 % ================================================================ 1176 \section[Equation of state (\textit{eosbn2.F90})] 1177 {Equation of state (\protect\mdl{eosbn2})} 1185 In order to prepare for the computation of the \textit{next} time step, 1186 a swap of tracer arrays is performed: $T^{t - \rdt} = T^t$ and $T^t = T_f$. 1187 1188 %% ================================================================================================= 1189 \section[Equation of state (\textit{eosbn2.F90})]{Equation of state (\protect\mdl{eosbn2})} 1178 1190 \label{sec:TRA_eosbn2} 1179 %--------------------------------------------nameos----------------------------------------------------- 1180 1181 \nlst{nameos} 1182 %-------------------------------------------------------------------------------------------------------------- 1183 1184 % ------------------------------------------------------------------------------------------------------------- 1185 % Equation of State 1186 % ------------------------------------------------------------------------------------------------------------- 1187 \subsection[Equation of seawater (\texttt{ln}\{\texttt{\_teso10,\_eos80,\_seos}\})] 1188 {Equation of seawater (\protect\np{ln\_teos10}, \protect\np{ln\_teos80}, or \protect\np{ln\_seos}) } 1191 1192 \begin{listing} 1193 \nlst{nameos} 1194 \caption{\forcode{&nameos}} 1195 \label{lst:nameos} 1196 \end{listing} 1197 1198 %% ================================================================================================= 1199 \subsection[Equation of seawater (\forcode{ln_}\{\forcode{teos10,eos80,seos}\})]{Equation of seawater (\protect\np{ln_teos10}{ln\_teos10}, \protect\np{ln_teos80}{ln\_teos80}, or \protect\np{ln_seos}{ln\_seos})} 1189 1200 \label{subsec:TRA_eos} 1190 1201 1191 1192 The Equation Of Seawater (EOS) is an empirical nonlinear thermodynamic relationship linking seawater density, 1193 $\rho$, to a number of state variables, most typically temperature, salinity and pressure. 1202 The \textbf{E}quation \textbf{O}f \textbf{S}eawater (EOS) is 1203 an empirical nonlinear thermodynamic relationship linking 1204 seawater density, $\rho$, to a number of state variables, 1205 most typically temperature, salinity and pressure. 1194 1206 Because density gradients control the pressure gradient force through the hydrostatic balance, 1195 the equation of state provides a fundamental bridge between the distribution of active tracers and1196 the fluid dynamics.1207 the equation of state provides a fundamental bridge between 1208 the distribution of active tracers and the fluid dynamics. 1197 1209 Nonlinearities of the EOS are of major importance, in particular influencing the circulation through 1198 1210 determination of the static stability below the mixed layer, 1199 thus controlling rates of exchange between the atmosphere and the ocean interior \citep{roquet.madec.ea_JPO15}. 1200 Therefore an accurate EOS based on either the 1980 equation of state (EOS-80, \cite{fofonoff.millard_bk83}) or 1201 TEOS-10 \citep{ioc.iapso_bk10} standards should be used anytime a simulation of the real ocean circulation is attempted 1211 thus controlling rates of exchange between the atmosphere and the ocean interior 1202 1212 \citep{roquet.madec.ea_JPO15}. 1213 Therefore an accurate EOS based on either the 1980 equation of state 1214 (EOS-80, \cite{fofonoff.millard_bk83}) or TEOS-10 \citep{ioc.iapso_bk10} standards should 1215 be used anytime a simulation of the real ocean circulation is attempted \citep{roquet.madec.ea_JPO15}. 1203 1216 The use of TEOS-10 is highly recommended because 1204 \textit{(i)} it is the new official EOS, 1205 \textit{(ii)} it is more accurate, being based on an updated database of laboratory measurements, and 1206 \textit{(iii)} it uses Conservative Temperature and Absolute Salinity (instead of potential temperature and 1207 practical salinity for EOS-80, both variables being more suitable for use as model variables 1208 \citep{ioc.iapso_bk10, graham.mcdougall_JPO13}. 1217 \begin{enumerate*}[label=(\textit{\roman*})] 1218 \item it is the new official EOS, 1219 \item it is more accurate, being based on an updated database of laboratory measurements, and 1220 \item it uses Conservative Temperature and Absolute Salinity 1221 (instead of potential temperature and practical salinity for EOS-80), 1222 both variables being more suitable for use as model variables 1223 \citep{ioc.iapso_bk10, graham.mcdougall_JPO13}. 1224 \end{enumerate*} 1209 1225 EOS-80 is an obsolescent feature of the \NEMO\ system, kept only for backward compatibility. 1210 1226 For process studies, it is often convenient to use an approximation of the EOS. 1211 1227 To that purposed, a simplified EOS (S-EOS) inspired by \citet{vallis_bk06} is also available. 1212 1228 1213 In the computer code, a density anomaly, $d_a = \rho / \rho_o - 1$, is computed, with $\rho_o$ a reference density. 1214 Called \textit{rau0} in the code, $\rho_o$ is set in \mdl{phycst} to a value of $1,026~Kg/m^3$. 1215 This is a sensible choice for the reference density used in a Boussinesq ocean climate model, as, 1216 with the exception of only a small percentage of the ocean, 1217 density in the World Ocean varies by no more than 2$\%$ from that value \citep{gill_bk82}. 1218 1219 Options which control the EOS used are defined through the \ngn{nameos} namelist variables. 1229 In the computer code, a density anomaly, $d_a = \rho / \rho_o - 1$, is computed, 1230 with $\rho_o$ a reference density. 1231 Called \textit{rau0} in the code, 1232 $\rho_o$ is set in \mdl{phycst} to a value of \texttt{1,026} $Kg/m^3$. 1233 This is a sensible choice for the reference density used in a Boussinesq ocean climate model, 1234 as, with the exception of only a small percentage of the ocean, 1235 density in the World Ocean varies by no more than 2\% from that value \citep{gill_bk82}. 1236 1237 Options which control the EOS used are defined through the \nam{eos}{eos} namelist variables. 1220 1238 1221 1239 \begin{description} 1222 \item [\np{ln\_teos10}\forcode{ = .true.}]1223 the polyTEOS10-bsq equation of seawater\citep{roquet.madec.ea_OM15} is used.1240 \item [{\np[=.true.]{ln_teos10}{ln\_teos10}}] the polyTEOS10-bsq equation of seawater 1241 \citep{roquet.madec.ea_OM15} is used. 1224 1242 The accuracy of this approximation is comparable to the TEOS-10 rational function approximation, 1225 but it is optimized for a boussinesq fluid and the polynomial expressions have simpler and 1226 more computationally efficient expressions for their derived quantities which make them more adapted for 1227 use in ocean models. 1228 Note that a slightly higher precision polynomial form is now used replacement of 1229 the TEOS-10 rational function approximation for hydrographic data analysis \citep{ioc.iapso_bk10}. 1243 but it is optimized for a Boussinesq fluid and 1244 the polynomial expressions have simpler and more computationally efficient expressions for 1245 their derived quantities which make them more adapted for use in ocean models. 1246 Note that a slightly higher precision polynomial form is now used 1247 replacement of the TEOS-10 rational function approximation for hydrographic data analysis 1248 \citep{ioc.iapso_bk10}. 1230 1249 A key point is that conservative state variables are used: 1231 Absolute Salinity (unit: g/kg, notation: $S_A$) and Conservative Temperature (unit: \deg{C}, notation: $\Theta$). 1250 Absolute Salinity (unit: $g/kg$, notation: $S_A$) and 1251 Conservative Temperature (unit: $\deg{C}$, notation: $\Theta$). 1232 1252 The pressure in decibars is approximated by the depth in meters. 1233 1253 With TEOS10, the specific heat capacity of sea water, $C_p$, is a constant. 1234 It is set to $C_p = 3991.86795711963~J\,Kg^{-1}\,^{\circ}K^{-1}$, according to \citet{ioc.iapso_bk10}. 1254 It is set to $C_p$ = 3991.86795711963 $J.Kg^{-1}.\deg{K}^{-1}$, 1255 according to \citet{ioc.iapso_bk10}. 1235 1256 Choosing polyTEOS10-bsq implies that the state variables used by the model are $\Theta$ and $S_A$. 1236 In particular, the initial state de ined by the user have to be given as \textit{Conservative} Temperature and1237 \textit{ Absolute} Salinity.1257 In particular, the initial state defined by the user have to be given as 1258 \textit{Conservative} Temperature and \textit{Absolute} Salinity. 1238 1259 In addition, when using TEOS10, the Conservative SST is converted to potential SST prior to 1239 1260 either computing the air-sea and ice-sea fluxes (forced mode) or 1240 1261 sending the SST field to the atmosphere (coupled mode). 1241 \item[\np{ln\_eos80}\forcode{ = .true.}] 1242 the polyEOS80-bsq equation of seawater is used. 1243 It takes the same polynomial form as the polyTEOS10, but the coefficients have been optimized to 1244 accurately fit EOS80 (Roquet, personal comm.). 1262 \item [{\np[=.true.]{ln_eos80}{ln\_eos80}}] the polyEOS80-bsq equation of seawater is used. 1263 It takes the same polynomial form as the polyTEOS10, 1264 but the coefficients have been optimized to accurately fit EOS80 (Roquet, personal comm.). 1245 1265 The state variables used in both the EOS80 and the ocean model are: 1246 the Practical Salinity ( (unit: psu, notation: $S_p$)) and1247 Potential Temperature (unit: $ ^{\circ}C$, notation: $\theta$).1266 the Practical Salinity (unit: $psu$, notation: $S_p$) and 1267 Potential Temperature (unit: $\deg{C}$, notation: $\theta$). 1248 1268 The pressure in decibars is approximated by the depth in meters. 1249 With thsi EOS, the specific heat capacity of sea water, $C_p$, is a function of temperature, salinity and1250 pressure \citep{fofonoff.millard_bk83}.1269 With EOS, the specific heat capacity of sea water, $C_p$, is a function of 1270 temperature, salinity and pressure \citep{fofonoff.millard_bk83}. 1251 1271 Nevertheless, a severe assumption is made in order to have a heat content ($C_p T_p$) which 1252 1272 is conserved by the model: $C_p$ is set to a constant value, the TEOS10 value. 1253 \item [\np{ln\_seos}\forcode{ = .true.}]1254 a simplified EOS (S-EOS) inspired by\citet{vallis_bk06} is chosen,1255 the coefficients of which has been optimized to fit the behavior of TEOS10 1256 ( Roquet, personal comm.) (see also \citet{roquet.madec.ea_JPO15}).1273 \item [{\np[=.true.]{ln_seos}{ln\_seos}}] a simplified EOS (S-EOS) inspired by 1274 \citet{vallis_bk06} is chosen, 1275 the coefficients of which has been optimized to fit the behavior of TEOS10 (Roquet, personal comm.) 1276 (see also \citet{roquet.madec.ea_JPO15}). 1257 1277 It provides a simplistic linear representation of both cabbeling and thermobaricity effects which 1258 1278 is enough for a proper treatment of the EOS in theoretical studies \citep{roquet.madec.ea_JPO15}. 1259 With such an equation of state there is no longer a distinction between 1260 \textit{ conservative} and \textit{potential} temperature,1261 as well as between \textit{absolute} and\textit{practical} salinity.1279 With such an equation of state there is no longer a distinction between \textit{conservative} and 1280 \textit{potential} temperature, as well as between \textit{absolute} and 1281 \textit{practical} salinity. 1262 1282 S-EOS takes the following expression: 1263 1264 1283 \begin{gather*} 1265 % \label{eq:tra_S-EOS} 1266 \begin{alignedat}{2} 1267 &d_a(T,S,z) = \frac{1}{\rho_o} \big[ &- a_0 \; ( 1 + 0.5 \; \lambda_1 \; T_a + \mu_1 \; z ) * &T_a \big. \\ 1268 & &+ b_0 \; ( 1 - 0.5 \; \lambda_2 \; S_a - \mu_2 \; z ) * &S_a \\ 1269 & \big. &- \nu \; T_a &S_a \big] \\ 1270 \end{alignedat} 1271 \\ 1284 % \label{eq:TRA_S-EOS} 1285 d_a(T,S,z) = \frac{1}{\rho_o} \big[ - a_0 \; ( 1 + 0.5 \; \lambda_1 \; T_a + \mu_1 \; z ) * T_a \big. 1286 + b_0 \; ( 1 - 0.5 \; \lambda_2 \; S_a - \mu_2 \; z ) * S_a 1287 \big. - \nu \; T_a S_a \big] \\ 1272 1288 \text{with~} T_a = T - 10 \, ; \, S_a = S - 35 \, ; \, \rho_o = 1026~Kg/m^3 1273 1289 \end{gather*} 1274 where the computer name of the coefficients as well as their standard value are given in \autoref{tab:SEOS}. 1290 where the computer name of the coefficients as well as their standard value are given in 1291 \autoref{tab:TRA_SEOS}. 1275 1292 In fact, when choosing S-EOS, various approximation of EOS can be specified simply by 1276 1293 changing the associated coefficients. 1277 Setting to zero the two thermobaric coefficients $(\mu_1,\mu_2)$ remove thermobaric effect from S-EOS. 1278 setting to zero the three cabbeling coefficients $(\lambda_1,\lambda_2,\nu)$ remove cabbeling effect from 1279 S-EOS. 1294 Setting to zero the two thermobaric coefficients $(\mu_1,\mu_2)$ 1295 remove thermobaric effect from S-EOS. 1296 Setting to zero the three cabbeling coefficients $(\lambda_1,\lambda_2,\nu)$ 1297 remove cabbeling effect from S-EOS. 1280 1298 Keeping non-zero value to $a_0$ and $b_0$ provide a linear EOS function of T and S. 1281 1299 \end{description} 1282 1300 1283 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1284 \begin{table}[!tb] 1285 \begin{center} 1286 \begin{tabular}{|l|l|l|l|} 1287 \hline 1288 coeff. & computer name & S-EOS & description \\ 1289 \hline 1290 $a_0$ & \np{rn\_a0} & $1.6550~10^{-1}$ & linear thermal expansion coeff. \\ 1291 \hline 1292 $b_0$ & \np{rn\_b0} & $7.6554~10^{-1}$ & linear haline expansion coeff. \\ 1293 \hline 1294 $\lambda_1$ & \np{rn\_lambda1}& $5.9520~10^{-2}$ & cabbeling coeff. in $T^2$ \\ 1295 \hline 1296 $\lambda_2$ & \np{rn\_lambda2}& $5.4914~10^{-4}$ & cabbeling coeff. in $S^2$ \\ 1297 \hline 1298 $\nu$ & \np{rn\_nu} & $2.4341~10^{-3}$ & cabbeling coeff. in $T \, S$ \\ 1299 \hline 1300 $\mu_1$ & \np{rn\_mu1} & $1.4970~10^{-4}$ & thermobaric coeff. in T \\ 1301 \hline 1302 $\mu_2$ & \np{rn\_mu2} & $1.1090~10^{-5}$ & thermobaric coeff. in S \\ 1303 \hline 1304 \end{tabular} 1305 \caption{ 1306 \protect\label{tab:SEOS} 1307 Standard value of S-EOS coefficients. 1308 } 1309 \end{center} 1301 \begin{table} 1302 \centering 1303 \begin{tabular}{|l|l|l|l|} 1304 \hline 1305 coeff. & computer name & S-EOS & description \\ 1306 \hline 1307 $a_0 $ & \np{rn_a0}{rn\_a0} & $1.6550~10^{-1}$ & linear thermal expansion coeff. \\ 1308 \hline 1309 $b_0 $ & \np{rn_b0}{rn\_b0} & $7.6554~10^{-1}$ & linear haline expansion coeff. \\ 1310 \hline 1311 $\lambda_1$ & \np{rn_lambda1}{rn\_lambda1} & $5.9520~10^{-2}$ & cabbeling coeff. in $T^2$ \\ 1312 \hline 1313 $\lambda_2$ & \np{rn_lambda2}{rn\_lambda2} & $5.4914~10^{-4}$ & cabbeling coeff. in $S^2$ \\ 1314 \hline 1315 $\nu $ & \np{rn_nu}{rn\_nu} & $2.4341~10^{-3}$ & cabbeling coeff. in $T \, S$ \\ 1316 \hline 1317 $\mu_1 $ & \np{rn_mu1}{rn\_mu1} & $1.4970~10^{-4}$ & thermobaric coeff. in T \\ 1318 \hline 1319 $\mu_2 $ & \np{rn_mu2}{rn\_mu2} & $1.1090~10^{-5}$ & thermobaric coeff. in S \\ 1320 \hline 1321 \end{tabular} 1322 \caption{Standard value of S-EOS coefficients} 1323 \label{tab:TRA_SEOS} 1310 1324 \end{table} 1311 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1312 1313 % ------------------------------------------------------------------------------------------------------------- 1314 % Brunt-V\"{a}is\"{a}l\"{a} Frequency 1315 % ------------------------------------------------------------------------------------------------------------- 1316 \subsection[Brunt-V\"{a}is\"{a}l\"{a} frequency] 1317 {Brunt-V\"{a}is\"{a}l\"{a} frequency} 1325 1326 %% ================================================================================================= 1327 \subsection[Brunt-V\"{a}is\"{a}l\"{a} frequency]{Brunt-V\"{a}is\"{a}l\"{a} frequency} 1318 1328 \label{subsec:TRA_bn2} 1319 1329 1320 An accurate computation of the ocean stability (i.e. of $N$, the brunt-V\"{a}is\"{a}l\"{a} frequency) is of1321 paramount importance as determine the ocean stratification andis used in several ocean parameterisations1330 An accurate computation of the ocean stability (i.e. of $N$, the Brunt-V\"{a}is\"{a}l\"{a} frequency) is of paramount importance as determine the ocean stratification and 1331 is used in several ocean parameterisations 1322 1332 (namely TKE, GLS, Richardson number dependent vertical diffusion, enhanced vertical diffusion, 1323 1333 non-penetrative convection, tidal mixing parameterisation, iso-neutral diffusion). … … 1326 1336 The expression for $N^2$ is given by: 1327 1337 \[ 1328 % \label{eq: tra_bn2}1338 % \label{eq:TRA_bn2} 1329 1339 N^2 = \frac{g}{e_{3w}} \lt( \beta \; \delta_{k + 1/2}[S] - \alpha \; \delta_{k + 1/2}[T] \rt) 1330 1340 \] 1331 1341 where $(T,S) = (\Theta,S_A)$ for TEOS10, $(\theta,S_p)$ for TEOS-80, or $(T,S)$ for S-EOS, and, 1332 1342 $\alpha$ and $\beta$ are the thermal and haline expansion coefficients. 1333 The coefficients are a polynomial function of temperature, salinity and depth which expression depends on 1334 the chosen EOS. 1335 They are computed through \textit{eos\_rab}, a \fortran function that can be found in \mdl{eosbn2}. 1336 1337 % ------------------------------------------------------------------------------------------------------------- 1338 % Freezing Point of Seawater 1339 % ------------------------------------------------------------------------------------------------------------- 1343 The coefficients are a polynomial function of temperature, salinity and depth which 1344 expression depends on the chosen EOS. 1345 They are computed through \textit{eos\_rab}, a \fortran\ function that can be found in \mdl{eosbn2}. 1346 1347 %% ================================================================================================= 1340 1348 \subsection{Freezing point of seawater} 1341 1349 \label{subsec:TRA_fzp} … … 1343 1351 The freezing point of seawater is a function of salinity and pressure \citep{fofonoff.millard_bk83}: 1344 1352 \begin{equation} 1345 \label{eq:tra_eos_fzp} 1346 \begin{split} 1347 &T_f (S,p) = \lt( a + b \, \sqrt{S} + c \, S \rt) \, S + d \, p \\ 1348 &\text{where~} a = -0.0575, \, b = 1.710523~10^{-3}, \, c = -2.154996~10^{-4} \\ 1349 &\text{and~} d = -7.53~10^{-3} 1350 \end{split} 1351 \end{equation} 1352 1353 \autoref{eq:tra_eos_fzp} is only used to compute the potential freezing point of sea water 1353 \label{eq:TRA_eos_fzp} 1354 \begin{gathered} 1355 T_f (S,p) = \lt( a + b \, \sqrt{S} + c \, S \rt) \, S + d \, p \\ 1356 \text{where~} a = -0.0575, \, b = 1.710523~10^{-3}, \, c = -2.154996~10^{-4} \text{and~} d = -7.53~10^{-3} 1357 \end{gathered} 1358 \end{equation} 1359 1360 \autoref{eq:TRA_eos_fzp} is only used to compute the potential freezing point of sea water 1354 1361 (\ie\ referenced to the surface $p = 0$), 1355 thus the pressure dependent terms in \autoref{eq: tra_eos_fzp} (last term) have been dropped.1362 thus the pressure dependent terms in \autoref{eq:TRA_eos_fzp} (last term) have been dropped. 1356 1363 The freezing point is computed through \textit{eos\_fzp}, 1357 a \fortran function that can be found in \mdl{eosbn2}. 1358 1359 % ------------------------------------------------------------------------------------------------------------- 1360 % Potential Energy 1361 % ------------------------------------------------------------------------------------------------------------- 1364 a \fortran\ function that can be found in \mdl{eosbn2}. 1365 1366 %% ================================================================================================= 1362 1367 %\subsection{Potential Energy anomalies} 1363 1368 %\label{subsec:TRA_bn2} 1364 1369 1365 1370 % =====>>>>> TO BE written 1366 % 1367 1368 % ================================================================ 1369 % Horizontal Derivative in zps-coordinate 1370 % ================================================================ 1371 \section[Horizontal derivative in \textit{zps}-coordinate (\textit{zpshde.F90})] 1372 {Horizontal derivative in \textit{zps}-coordinate (\protect\mdl{zpshde})} 1371 1372 %% ================================================================================================= 1373 \section[Horizontal derivative in \textit{zps}-coordinate (\textit{zpshde.F90})]{Horizontal derivative in \textit{zps}-coordinate (\protect\mdl{zpshde})} 1373 1374 \label{sec:TRA_zpshde} 1374 1375 … … 1376 1377 I've changed "derivative" to "difference" and "mean" to "average"} 1377 1378 1378 With partial cells (\np{ln\_zps}\forcode{ = .true.}) at bottom and top (\np{ln\_isfcav}\forcode{ = .true.}), 1379 With partial cells (\np[=.true.]{ln_zps}{ln\_zps}) at bottom and top 1380 (\np[=.true.]{ln_isfcav}{ln\_isfcav}), 1379 1381 in general, tracers in horizontally adjacent cells live at different depths. 1380 Horizontal gradients of tracers are needed for horizontal diffusion (\mdl{traldf} module) and1381 the hydrostatic pressure gradient calculations (\mdl{dynhpg} module).1382 The partial cell properties at the top (\np {ln\_isfcav}\forcode{ = .true.}) are computed in the same way as1383 for the bottom.1382 Horizontal gradients of tracers are needed for horizontal diffusion 1383 (\mdl{traldf} module) and the hydrostatic pressure gradient calculations (\mdl{dynhpg} module). 1384 The partial cell properties at the top (\np[=.true.]{ln_isfcav}{ln\_isfcav}) are computed in 1385 the same way as for the bottom. 1384 1386 So, only the bottom interpolation is explained below. 1385 1387 1386 1388 Before taking horizontal gradients between the tracers next to the bottom, 1387 1389 a linear interpolation in the vertical is used to approximate the deeper tracer as if 1388 it actually lived at the depth of the shallower tracer point (\autoref{fig:Partial_step_scheme}). 1389 For example, for temperature in the $i$-direction the needed interpolated temperature, $\widetilde T$, is: 1390 1391 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1392 \begin{figure}[!p] 1393 \begin{center} 1394 \includegraphics[width=\textwidth]{Fig_partial_step_scheme} 1395 \caption{ 1396 \protect\label{fig:Partial_step_scheme} 1397 Discretisation of the horizontal difference and average of tracers in the $z$-partial step coordinate 1398 (\protect\np{ln\_zps}\forcode{ = .true.}) in the case $(e3w_k^{i + 1} - e3w_k^i) > 0$. 1399 A linear interpolation is used to estimate $\widetilde T_k^{i + 1}$, 1400 the tracer value at the depth of the shallower tracer point of the two adjacent bottom $T$-points. 1401 The horizontal difference is then given by: $\delta_{i + 1/2} T_k = \widetilde T_k^{\, i + 1} -T_k^{\, i}$ and 1402 the average by: $\overline T_k^{\, i + 1/2} = (\widetilde T_k^{\, i + 1/2} - T_k^{\, i}) / 2$. 1403 } 1404 \end{center} 1390 it actually lived at the depth of the shallower tracer point (\autoref{fig:TRA_Partial_step_scheme}). 1391 For example, for temperature in the $i$-direction the needed interpolated temperature, 1392 $\widetilde T$, is: 1393 1394 \begin{figure} 1395 \centering 1396 \includegraphics[width=0.33\textwidth]{Fig_partial_step_scheme} 1397 \caption[Discretisation of the horizontal difference and average of tracers in 1398 the $z$-partial step coordinate]{ 1399 Discretisation of the horizontal difference and average of tracers in 1400 the $z$-partial step coordinate (\protect\np[=.true.]{ln_zps}{ln\_zps}) in 1401 the case $(e3w_k^{i + 1} - e3w_k^i) > 0$. 1402 A linear interpolation is used to estimate $\widetilde T_k^{i + 1}$, 1403 the tracer value at the depth of the shallower tracer point of the two adjacent bottom $T$-points. 1404 The horizontal difference is then given by: 1405 $\delta_{i + 1/2} T_k = \widetilde T_k^{\, i + 1} -T_k^{\, i}$ and the average by: 1406 $\overline T_k^{\, i + 1/2} = (\widetilde T_k^{\, i + 1/2} - T_k^{\, i}) / 2$.} 1407 \label{fig:TRA_Partial_step_scheme} 1405 1408 \end{figure} 1406 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1409 1407 1410 \[ 1408 1411 \widetilde T = \lt\{ 1409 1412 \begin{alignedat}{2} 1410 1413 &T^{\, i + 1} &-\frac{ \lt( e_{3w}^{i + 1} -e_{3w}^i \rt) }{ e_{3w}^{i + 1} } \; \delta_k T^{i + 1} 1411 & \quad \text{if $e_{3w}^{i + 1} \geq e_{3w}^i$} \\ \\1414 & \quad \text{if $e_{3w}^{i + 1} \geq e_{3w}^i$} \\ 1412 1415 &T^{\, i} &+\frac{ \lt( e_{3w}^{i + 1} -e_{3w}^i \rt )}{e_{3w}^i } \; \delta_k T^{i + 1} 1413 1416 & \quad \text{if $e_{3w}^{i + 1} < e_{3w}^i$} … … 1415 1418 \rt. 1416 1419 \] 1417 and the resulting forms for the horizontal difference and the horizontal average value of $T$ at a $U$-point are: 1418 \begin{equation} 1419 \label{eq:zps_hde} 1420 and the resulting forms for the horizontal difference and the horizontal average value of 1421 $T$ at a $U$-point are: 1422 \begin{equation} 1423 \label{eq:TRA_zps_hde} 1420 1424 \begin{split} 1421 1425 \delta_{i + 1/2} T &= 1422 1426 \begin{cases} 1423 \widetilde T - T^i & \text{if~} e_{3w}^{i + 1} \geq e_{3w}^i \\ 1424 \\ 1425 T^{\, i + 1} - \widetilde T & \text{if~} e_{3w}^{i + 1} < e_{3w}^i 1426 \end{cases} 1427 \\ 1427 \widetilde T - T^i & \text{if~} e_{3w}^{i + 1} \geq e_{3w}^i \\ 1428 T^{\, i + 1} - \widetilde T & \text{if~} e_{3w}^{i + 1} < e_{3w}^i 1429 \end{cases} \\ 1428 1430 \overline T^{\, i + 1/2} &= 1429 1431 \begin{cases} 1430 (\widetilde T - T^{\, i} ) / 2 & \text{if~} e_{3w}^{i + 1} \geq e_{3w}^i \\ 1431 \\ 1432 (T^{\, i + 1} - \widetilde T) / 2 & \text{if~} e_{3w}^{i + 1} < e_{3w}^i 1432 (\widetilde T - T^{\, i} ) / 2 & \text{if~} e_{3w}^{i + 1} \geq e_{3w}^i \\ 1433 (T^{\, i + 1} - \widetilde T) / 2 & \text{if~} e_{3w}^{i + 1} < e_{3w}^i 1433 1434 \end{cases} 1434 1435 \end{split} … … 1437 1438 The computation of horizontal derivative of tracers as well as of density is performed once for all at 1438 1439 each time step in \mdl{zpshde} module and stored in shared arrays to be used when needed. 1439 It has to be emphasized that the procedure used to compute the interpolated density, $\widetilde \rho$, 1440 is not the same as that used for $T$ and $S$. 1441 Instead of forming a linear approximation of density, we compute $\widetilde \rho$ from the interpolated values of 1442 $T$ and $S$, and the pressure at a $u$-point 1440 It has to be emphasized that the procedure used to compute the interpolated density, 1441 $\widetilde \rho$, is not the same as that used for $T$ and $S$. 1442 Instead of forming a linear approximation of density, 1443 we compute $\widetilde \rho$ from the interpolated values of $T$ and $S$, 1444 and the pressure at a $u$-point 1443 1445 (in the equation of state pressure is approximated by depth, see \autoref{subsec:TRA_eos}): 1444 1446 \[ 1445 % \label{eq: zps_hde_rho}1447 % \label{eq:TRA_zps_hde_rho} 1446 1448 \widetilde \rho = \rho (\widetilde T,\widetilde S,z_u) \quad \text{where~} z_u = \min \lt( z_T^{i + 1},z_T^i \rt) 1447 1449 \] 1448 1450 1449 1451 This is a much better approximation as the variation of $\rho$ with depth (and thus pressure) 1450 is highly non-linear with a true equation of state and thus is badly approximated with a linear interpolation. 1451 This approximation is used to compute both the horizontal pressure gradient (\autoref{sec:DYN_hpg}) and 1452 the slopes of neutral surfaces (\autoref{sec:LDF_slp}). 1453 1454 Note that in almost all the advection schemes presented in this Chapter, 1452 is highly non-linear with a true equation of state and thus is badly approximated with 1453 a linear interpolation. 1454 This approximation is used to compute both the horizontal pressure gradient (\autoref{sec:DYN_hpg}) 1455 and the slopes of neutral surfaces (\autoref{sec:LDF_slp}). 1456 1457 Note that in almost all the advection schemes presented in this chapter, 1455 1458 both averaging and differencing operators appear. 1456 Yet \autoref{eq: zps_hde} has not been used in these schemes:1459 Yet \autoref{eq:TRA_zps_hde} has not been used in these schemes: 1457 1460 in contrast to diffusion and pressure gradient computations, 1458 1461 no correction for partial steps is applied for advection. 1459 1462 The main motivation is to preserve the domain averaged mean variance of the advected field when 1460 1463 using the $2^{nd}$ order centred scheme. 1461 Sensitivity of the advection schemes to the way horizontal averages are performed in the vicinity of 1462 partial cells should be further investigated in the near future. 1463 %%% 1464 Sensitivity of the advection schemes to the way horizontal averages are performed in 1465 the vicinity of partial cells should be further investigated in the near future. 1464 1466 \gmcomment{gm : this last remark has to be done} 1465 %%% 1466 1467 \biblio 1468 1469 \pindex 1467 1468 \onlyinsubfile{\input{../../global/epilogue}} 1470 1469 1471 1470 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_ZDF.tex
r11435 r11799 1 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 %% Custom aliases 4 \newcommand{\cf}{\ensuremath{C\kern-0.14em f}} 5 3 6 \begin{document} 4 % ================================================================ 5 % Chapter Vertical Ocean Physics (ZDF) 6 % ================================================================ 7 7 8 \chapter{Vertical Ocean Physics (ZDF)} 8 9 \label{chap:ZDF} 9 10 11 \thispagestyle{plain} 12 10 13 \chaptertoc 11 14 15 \paragraph{Changes record} ~\\ 16 17 {\footnotesize 18 \begin{tabularx}{\textwidth}{l||X|X} 19 Release & Author(s) & Modifications \\ 20 \hline 21 {\em 4.0} & {\em ...} & {\em ...} \\ 22 {\em 3.6} & {\em ...} & {\em ...} \\ 23 {\em 3.4} & {\em ...} & {\em ...} \\ 24 {\em <=3.4} & {\em ...} & {\em ...} 25 \end{tabularx} 26 } 27 28 \clearpage 29 12 30 %gm% Add here a small introduction to ZDF and naming of the different physics (similar to what have been written for TRA and DYN. 13 31 14 \newpage 15 16 % ================================================================ 17 % Vertical Mixing 18 % ================================================================ 32 %% ================================================================================================= 19 33 \section{Vertical mixing} 20 \label{sec:ZDF _zdf}34 \label{sec:ZDF} 21 35 22 36 The discrete form of the ocean subgrid scale physics has been presented in … … 25 39 At the surface they are prescribed from the surface forcing (see \autoref{chap:SBC}), 26 40 while at the bottom they are set to zero for heat and salt, 27 unless a geothermal flux forcing is prescribed as a bottom boundary condition (\ie\ \np{ln \_trabbc} defined,41 unless a geothermal flux forcing is prescribed as a bottom boundary condition (\ie\ \np{ln_trabbc}{ln\_trabbc} defined, 28 42 see \autoref{subsec:TRA_bbc}), and specified through a bottom friction parameterisation for momentum 29 43 (see \autoref{sec:ZDF_drg}). … … 39 53 are computed and added to the general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively. 40 54 %These trends can be computed using either a forward time stepping scheme 41 %(namelist parameter \np{ln\_zdfexp}\forcode{ = .true.}) or a backward time stepping scheme 42 %(\np{ln\_zdfexp}\forcode{ = .false.}) depending on the magnitude of the mixing coefficients, 43 %and thus of the formulation used (see \autoref{chap:STP}). 44 45 %--------------------------------------------namzdf-------------------------------------------------------- 46 47 \nlst{namzdf} 48 %-------------------------------------------------------------------------------------------------------------- 49 50 % ------------------------------------------------------------------------------------------------------------- 51 % Constant 52 % ------------------------------------------------------------------------------------------------------------- 53 \subsection[Constant (\forcode{ln_zdfcst = .true.})] 54 {Constant (\protect\np{ln\_zdfcst}\forcode{ = .true.})} 55 %(namelist parameter \np[=.true.]{ln_zdfexp}{ln\_zdfexp}) or a backward time stepping scheme 56 %(\np[=.false.]{ln_zdfexp}{ln\_zdfexp}) depending on the magnitude of the mixing coefficients, 57 %and thus of the formulation used (see \autoref{chap:TD}). 58 59 \begin{listing} 60 \nlst{namzdf} 61 \caption{\forcode{&namzdf}} 62 \label{lst:namzdf} 63 \end{listing} 64 65 %% ================================================================================================= 66 \subsection[Constant (\forcode{ln_zdfcst})]{Constant (\protect\np{ln_zdfcst}{ln\_zdfcst})} 55 67 \label{subsec:ZDF_cst} 56 68 57 Options are defined through the \nam{zdf} namelist variables.58 When \np{ln \_zdfcst} is defined, the momentum and tracer vertical eddy coefficients are set to69 Options are defined through the \nam{zdf}{zdf} namelist variables. 70 When \np{ln_zdfcst}{ln\_zdfcst} is defined, the momentum and tracer vertical eddy coefficients are set to 59 71 constant values over the whole ocean. 60 72 This is the crudest way to define the vertical ocean physics. … … 66 78 \end{align*} 67 79 68 These values are set through the \np{rn \_avm0} and \np{rn\_avt0} namelist parameters.80 These values are set through the \np{rn_avm0}{rn\_avm0} and \np{rn_avt0}{rn\_avt0} namelist parameters. 69 81 In all cases, do not use values smaller that those associated with the molecular viscosity and diffusivity, 70 82 that is $\sim10^{-6}~m^2.s^{-1}$ for momentum, $\sim10^{-7}~m^2.s^{-1}$ for temperature and 71 83 $\sim10^{-9}~m^2.s^{-1}$ for salinity. 72 84 73 % ------------------------------------------------------------------------------------------------------------- 74 % Richardson Number Dependent 75 % ------------------------------------------------------------------------------------------------------------- 76 \subsection[Richardson number dependent (\forcode{ln_zdfric = .true.})] 77 {Richardson number dependent (\protect\np{ln\_zdfric}\forcode{ = .true.})} 85 %% ================================================================================================= 86 \subsection[Richardson number dependent (\forcode{ln_zdfric})]{Richardson number dependent (\protect\np{ln_zdfric}{ln\_zdfric})} 78 87 \label{subsec:ZDF_ric} 79 88 80 %--------------------------------------------namric--------------------------------------------------------- 81 82 \nlst{namzdf_ric} 83 %-------------------------------------------------------------------------------------------------------------- 84 85 When \np{ln\_zdfric}\forcode{ = .true.}, a local Richardson number dependent formulation for the vertical momentum and 86 tracer eddy coefficients is set through the \nam{zdf\_ric} namelist variables. 89 \begin{listing} 90 \nlst{namzdf_ric} 91 \caption{\forcode{&namzdf_ric}} 92 \label{lst:namzdf_ric} 93 \end{listing} 94 95 When \np[=.true.]{ln_zdfric}{ln\_zdfric}, a local Richardson number dependent formulation for the vertical momentum and 96 tracer eddy coefficients is set through the \nam{zdf_ric}{zdf\_ric} namelist variables. 87 97 The vertical mixing coefficients are diagnosed from the large scale variables computed by the model. 88 98 \textit{In situ} measurements have been used to link vertical turbulent activity to large scale ocean structures. … … 92 102 Following \citet{pacanowski.philander_JPO81}, the following formulation has been implemented: 93 103 \[ 94 % \label{eq: zdfric}104 % \label{eq:ZDF_ric} 95 105 \left\{ 96 106 \begin{aligned} … … 105 115 (see \autoref{subsec:ZDF_cst}), and $A_{ric}^{vT} = 10^{-4}~m^2.s^{-1}$ is the maximum value that 106 116 can be reached by the coefficient when $Ri\leq 0$, $a=5$ and $n=2$. 107 The last three values can be modified by setting the \np{rn \_avmri}, \np{rn\_alp} and108 \np{nn \_ric} namelist parameters, respectively.117 The last three values can be modified by setting the \np{rn_avmri}{rn\_avmri}, \np{rn_alp}{rn\_alp} and 118 \np{nn_ric}{nn\_ric} namelist parameters, respectively. 109 119 110 120 A simple mixing-layer model to transfer and dissipate the atmospheric forcings 111 (wind-stress and buoyancy fluxes) can be activated setting the \np {ln\_mldw}\forcode{ = .true.} in the namelist.121 (wind-stress and buoyancy fluxes) can be activated setting the \np[=.true.]{ln_mldw}{ln\_mldw} in the namelist. 112 122 113 123 In this case, the local depth of turbulent wind-mixing or "Ekman depth" $h_{e}(x,y,t)$ is evaluated and … … 125 135 \] 126 136 is computed from the wind stress vector $|\tau|$ and the reference density $ \rho_o$. 127 The final $h_{e}$ is further constrained by the adjustable bounds \np{rn \_mldmin} and \np{rn\_mldmax}.137 The final $h_{e}$ is further constrained by the adjustable bounds \np{rn_mldmin}{rn\_mldmin} and \np{rn_mldmax}{rn\_mldmax}. 128 138 Once $h_{e}$ is computed, the vertical eddy coefficients within $h_{e}$ are set to 129 the empirical values \np{rn\_wtmix} and \np{rn\_wvmix} \citep{lermusiaux_JMS01}. 130 131 % ------------------------------------------------------------------------------------------------------------- 132 % TKE Turbulent Closure Scheme 133 % ------------------------------------------------------------------------------------------------------------- 134 \subsection[TKE turbulent closure scheme (\forcode{ln_zdftke = .true.})] 135 {TKE turbulent closure scheme (\protect\np{ln\_zdftke}\forcode{ = .true.})} 139 the empirical values \np{rn_wtmix}{rn\_wtmix} and \np{rn_wvmix}{rn\_wvmix} \citep{lermusiaux_JMS01}. 140 141 %% ================================================================================================= 142 \subsection[TKE turbulent closure scheme (\forcode{ln_zdftke})]{TKE turbulent closure scheme (\protect\np{ln_zdftke}{ln\_zdftke})} 136 143 \label{subsec:ZDF_tke} 137 %--------------------------------------------namzdf_tke-------------------------------------------------- 138 139 \nlst{namzdf_tke} 140 %-------------------------------------------------------------------------------------------------------------- 144 145 \begin{listing} 146 \nlst{namzdf_tke} 147 \caption{\forcode{&namzdf_tke}} 148 \label{lst:namzdf_tke} 149 \end{listing} 141 150 142 151 The vertical eddy viscosity and diffusivity coefficients are computed from a TKE turbulent closure model based on … … 151 160 its destruction through stratification, its vertical diffusion, and its dissipation of \citet{kolmogorov_IANS42} type: 152 161 \begin{equation} 153 \label{eq: zdftke_e}162 \label{eq:ZDF_tke_e} 154 163 \frac{\partial \bar{e}}{\partial t} = 155 164 \frac{K_m}{{e_3}^2 }\;\left[ {\left( {\frac{\partial u}{\partial k}} \right)^2 … … 161 170 \end{equation} 162 171 \[ 163 % \label{eq: zdftke_kz}172 % \label{eq:ZDF_tke_kz} 164 173 \begin{split} 165 174 K_m &= C_k\ l_k\ \sqrt {\bar{e}\; } \\ … … 172 181 The constants $C_k = 0.1$ and $C_\epsilon = \sqrt {2} /2$ $\approx 0.7$ are designed to deal with 173 182 vertical mixing at any depth \citep{gaspar.gregoris.ea_JGR90}. 174 They are set through namelist parameters \np{nn \_ediff} and \np{nn\_ediss}.183 They are set through namelist parameters \np{nn_ediff}{nn\_ediff} and \np{nn_ediss}{nn\_ediss}. 175 184 $P_{rt}$ can be set to unity or, following \citet{blanke.delecluse_JPO93}, be a function of the local Richardson number, $R_i$: 176 185 \begin{align*} 177 % \label{eq: prt}186 % \label{eq:ZDF_prt} 178 187 P_{rt} = 179 188 \begin{cases} … … 183 192 \end{cases} 184 193 \end{align*} 185 The choice of $P_{rt}$ is controlled by the \np{nn \_pdl} namelist variable.194 The choice of $P_{rt}$ is controlled by the \np{nn_pdl}{nn\_pdl} namelist variable. 186 195 187 196 At the sea surface, the value of $\bar{e}$ is prescribed from the wind stress field as 188 $\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn \_ebb} namelist parameter.197 $\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn_ebb}{rn\_ebb} namelist parameter. 189 198 The default value of $e_{bb}$ is 3.75. \citep{gaspar.gregoris.ea_JGR90}), however a much larger value can be used when 190 199 taking into account the surface wave breaking (see below Eq. \autoref{eq:ZDF_Esbc}). … … 192 201 The time integration of the $\bar{e}$ equation may formally lead to negative values because 193 202 the numerical scheme does not ensure its positivity. 194 To overcome this problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn \_emin} namelist parameter).203 To overcome this problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn_emin}{rn\_emin} namelist parameter). 195 204 Following \citet{gaspar.gregoris.ea_JGR90}, the cut-off value is set to $\sqrt{2}/2~10^{-6}~m^2.s^{-2}$. 196 205 This allows the subsequent formulations to match that of \citet{gargett_JMR84} for the diffusion in … … 198 207 In addition, a cut-off is applied on $K_m$ and $K_\rho$ to avoid numerical instabilities associated with 199 208 too weak vertical diffusion. 200 They must be specified at least larger than the molecular values, and are set through \np{rn\_avm0} and 201 \np{rn\_avt0} (\nam{zdf} namelist, see \autoref{subsec:ZDF_cst}). 202 209 They must be specified at least larger than the molecular values, and are set through \np{rn_avm0}{rn\_avm0} and 210 \np{rn_avt0}{rn\_avt0} (\nam{zdf}{zdf} namelist, see \autoref{subsec:ZDF_cst}). 211 212 %% ================================================================================================= 203 213 \subsubsection{Turbulent length scale} 204 214 205 215 For computational efficiency, the original formulation of the turbulent length scales proposed by 206 216 \citet{gaspar.gregoris.ea_JGR90} has been simplified. 207 Four formulations are proposed, the choice of which is controlled by the \np{nn \_mxl} namelist parameter.217 Four formulations are proposed, the choice of which is controlled by the \np{nn_mxl}{nn\_mxl} namelist parameter. 208 218 The first two are based on the following first order approximation \citep{blanke.delecluse_JPO93}: 209 219 \begin{equation} 210 \label{eq: tke_mxl0_1}220 \label{eq:ZDF_tke_mxl0_1} 211 221 l_k = l_\epsilon = \sqrt {2 \bar{e}\; } / N 212 222 \end{equation} 213 223 which is valid in a stable stratified region with constant values of the Brunt-Vais\"{a}l\"{a} frequency. 214 224 The resulting length scale is bounded by the distance to the surface or to the bottom 215 (\np {nn\_mxl}\forcode{ = 0}) or by the local vertical scale factor (\np{nn\_mxl}\forcode{ = 1}).225 (\np[=0]{nn_mxl}{nn\_mxl}) or by the local vertical scale factor (\np[=1]{nn_mxl}{nn\_mxl}). 216 226 \citet{blanke.delecluse_JPO93} notice that this simplification has two major drawbacks: 217 227 it makes no sense for locally unstable stratification and the computation no longer uses all 218 228 the information contained in the vertical density profile. 219 To overcome these drawbacks, \citet{madec.delecluse.ea_NPM98} introduces the \np {nn\_mxl}\forcode{ = 2, 3} cases,229 To overcome these drawbacks, \citet{madec.delecluse.ea_NPM98} introduces the \np[=2, 3]{nn_mxl}{nn\_mxl} cases, 220 230 which add an extra assumption concerning the vertical gradient of the computed length scale. 221 So, the length scales are first evaluated as in \autoref{eq: tke_mxl0_1} and then bounded such that:231 So, the length scales are first evaluated as in \autoref{eq:ZDF_tke_mxl0_1} and then bounded such that: 222 232 \begin{equation} 223 \label{eq: tke_mxl_constraint}233 \label{eq:ZDF_tke_mxl_constraint} 224 234 \frac{1}{e_3 }\left| {\frac{\partial l}{\partial k}} \right| \leq 1 225 235 \qquad \text{with }\ l = l_k = l_\epsilon 226 236 \end{equation} 227 \autoref{eq: tke_mxl_constraint} means that the vertical variations of the length scale cannot be larger than237 \autoref{eq:ZDF_tke_mxl_constraint} means that the vertical variations of the length scale cannot be larger than 228 238 the variations of depth. 229 239 It provides a better approximation of the \citet{gaspar.gregoris.ea_JGR90} formulation while being much less … … 231 241 In particular, it allows the length scale to be limited not only by the distance to the surface or 232 242 to the ocean bottom but also by the distance to a strongly stratified portion of the water column such as 233 the thermocline (\autoref{fig: mixing_length}).234 In order to impose the \autoref{eq: tke_mxl_constraint} constraint, we introduce two additional length scales:243 the thermocline (\autoref{fig:ZDF_mixing_length}). 244 In order to impose the \autoref{eq:ZDF_tke_mxl_constraint} constraint, we introduce two additional length scales: 235 245 $l_{up}$ and $l_{dwn}$, the upward and downward length scales, and 236 246 evaluate the dissipation and mixing length scales as 237 247 (and note that here we use numerical indexing): 238 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>239 248 \begin{figure}[!t] 240 \begin{center} 241 \includegraphics[width=\textwidth]{Fig_mixing_length} 242 \caption{ 243 \protect\label{fig:mixing_length} 244 Illustration of the mixing length computation. 245 } 246 \end{center} 249 \centering 250 \includegraphics[width=0.66\textwidth]{Fig_mixing_length} 251 \caption[Mixing length computation]{Illustration of the mixing length computation} 252 \label{fig:ZDF_mixing_length} 247 253 \end{figure} 248 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 249 \[ 250 % \label{eq:tke_mxl2} 254 \[ 255 % \label{eq:ZDF_tke_mxl2} 251 256 \begin{aligned} 252 257 l_{up\ \ }^{(k)} &= \min \left( l^{(k)} \ , \ l_{up}^{(k+1)} + e_{3t}^{(k)}\ \ \ \; \right) … … 256 261 \end{aligned} 257 262 \] 258 where $l^{(k)}$ is computed using \autoref{eq: tke_mxl0_1}, \ie\ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$.259 260 In the \np {nn\_mxl}\forcode{ = 2} case, the dissipation and mixing length scales take the same value:261 $ l_k= l_\epsilon = \min \left(\ l_{up} \;,\; l_{dwn}\ \right)$, while in the \np {nn\_mxl}\forcode{ = 3} case,263 where $l^{(k)}$ is computed using \autoref{eq:ZDF_tke_mxl0_1}, \ie\ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$. 264 265 In the \np[=2]{nn_mxl}{nn\_mxl} case, the dissipation and mixing length scales take the same value: 266 $ l_k= l_\epsilon = \min \left(\ l_{up} \;,\; l_{dwn}\ \right)$, while in the \np[=3]{nn_mxl}{nn\_mxl} case, 262 267 the dissipation and mixing turbulent length scales are give as in \citet{gaspar.gregoris.ea_JGR90}: 263 268 \[ 264 % \label{eq: tke_mxl_gaspar}269 % \label{eq:ZDF_tke_mxl_gaspar} 265 270 \begin{aligned} 266 271 & l_k = \sqrt{\ l_{up} \ \ l_{dwn}\ } \\ … … 269 274 \] 270 275 271 At the ocean surface, a non zero length scale is set through the \np{rn \_mxl0} namelist parameter.276 At the ocean surface, a non zero length scale is set through the \np{rn_mxl0}{rn\_mxl0} namelist parameter. 272 277 Usually the surface scale is given by $l_o = \kappa \,z_o$ where $\kappa = 0.4$ is von Karman's constant and 273 278 $z_o$ the roughness parameter of the surface. 274 Assuming $z_o=0.1$~m \citep{craig.banner_JPO94} leads to a 0.04~m, the default value of \np{rn \_mxl0}.279 Assuming $z_o=0.1$~m \citep{craig.banner_JPO94} leads to a 0.04~m, the default value of \np{rn_mxl0}{rn\_mxl0}. 275 280 In the ocean interior a minimum length scale is set to recover the molecular viscosity when 276 281 $\bar{e}$ reach its minimum value ($1.10^{-6}= C_k\, l_{min} \,\sqrt{\bar{e}_{min}}$ ). 277 282 283 %% ================================================================================================= 278 284 \subsubsection{Surface wave breaking parameterization} 279 %-----------------------------------------------------------------------%280 285 281 286 Following \citet{mellor.blumberg_JPO04}, the TKE turbulence closure model has been modified to … … 303 308 $\alpha_{CB} = 100$ the Craig and Banner's value. 304 309 As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$, 305 with $e_{bb}$ the \np{rn \_ebb} namelist parameter, setting \np{rn\_ebb}\forcode{ = 67.83} corresponds310 with $e_{bb}$ the \np{rn_ebb}{rn\_ebb} namelist parameter, setting \np[=67.83]{rn_ebb}{rn\_ebb} corresponds 306 311 to $\alpha_{CB} = 100$. 307 Further setting \np {ln\_mxl0}\forcode{ =.true.}, applies \autoref{eq:ZDF_Lsbc} as the surface boundary condition on the length scale,312 Further setting \np[=.true.]{ln_mxl0}{ln\_mxl0}, applies \autoref{eq:ZDF_Lsbc} as the surface boundary condition on the length scale, 308 313 with $\beta$ hard coded to the Stacey's value. 309 Note that a minimal threshold of \np{rn \_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) is applied on the314 Note that a minimal threshold of \np{rn_emin0}{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) is applied on the 310 315 surface $\bar{e}$ value. 311 316 317 %% ================================================================================================= 312 318 \subsubsection{Langmuir cells} 313 %--------------------------------------%314 319 315 320 Langmuir circulations (LC) can be described as ordered large-scale vertical motions in … … 325 330 The parameterization, tuned against large-eddy simulation, includes the whole effect of LC in 326 331 an extra source term of TKE, $P_{LC}$. 327 The presence of $P_{LC}$ in \autoref{eq: zdftke_e}, the TKE equation, is controlled by setting \np{ln\_lc} to328 \forcode{.true.} in the \nam{zdf \_tke} namelist.332 The presence of $P_{LC}$ in \autoref{eq:ZDF_tke_e}, the TKE equation, is controlled by setting \np{ln_lc}{ln\_lc} to 333 \forcode{.true.} in the \nam{zdf_tke}{zdf\_tke} namelist. 329 334 330 335 By making an analogy with the characteristic convective velocity scale (\eg, \citet{dalessio.abdella.ea_JPO98}), … … 354 359 where $c_{LC} = 0.15$ has been chosen by \citep{axell_JGR02} as a good compromise to fit LES data. 355 360 The chosen value yields maximum vertical velocities $w_{LC}$ of the order of a few centimeters per second. 356 The value of $c_{LC}$ is set through the \np{rn \_lc} namelist parameter,361 The value of $c_{LC}$ is set through the \np{rn_lc}{rn\_lc} namelist parameter, 357 362 having in mind that it should stay between 0.15 and 0.54 \citep{axell_JGR02}. 358 363 … … 364 369 \] 365 370 371 %% ================================================================================================= 366 372 \subsubsection{Mixing just below the mixed layer} 367 %--------------------------------------------------------------%368 373 369 374 Vertical mixing parameterizations commonly used in ocean general circulation models tend to … … 376 381 (\ie\ near-inertial oscillations and ocean swells and waves). 377 382 378 When using this parameterization (\ie\ when \np {nn\_etau}\forcode{ = 1}),383 When using this parameterization (\ie\ when \np[=1]{nn_etau}{nn\_etau}), 379 384 the TKE input to the ocean ($S$) imposed by the winds in the form of near-inertial oscillations, 380 385 swell and waves is parameterized by \autoref{eq:ZDF_Esbc} the standard TKE surface boundary condition, … … 388 393 the penetration, and $f_i$ is the ice concentration 389 394 (no penetration if $f_i=1$, \ie\ if the ocean is entirely covered by sea-ice). 390 The value of $f_r$, usually a few percents, is specified through \np{rn \_efr} namelist parameter.391 The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np {nn\_etau}\forcode{ = 0}) or395 The value of $f_r$, usually a few percents, is specified through \np{rn_efr}{rn\_efr} namelist parameter. 396 The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np[=0]{nn_etau}{nn\_etau}) or 392 397 a latitude dependent value (varying from 0.5~m at the Equator to a maximum value of 30~m at high latitudes 393 (\np {nn\_etau}\forcode{ = 1}).394 395 Note that two other option exist, \np {nn\_etau}\forcode{ = 2, 3}.398 (\np[=1]{nn_etau}{nn\_etau}). 399 400 Note that two other option exist, \np[=2, 3]{nn_etau}{nn\_etau}. 396 401 They correspond to applying \autoref{eq:ZDF_Ehtau} only at the base of the mixed layer, 397 402 or to using the high frequency part of the stress to evaluate the fraction of TKE that penetrates the ocean. … … 400 405 401 406 % This should be explain better below what this rn_eice parameter is meant for: 402 In presence of Sea Ice, the value of this mixing can be modulated by the \np{rn \_eice} namelist parameter.407 In presence of Sea Ice, the value of this mixing can be modulated by the \np{rn_eice}{rn\_eice} namelist parameter. 403 408 This parameter varies from \forcode{0} for no effect to \forcode{4} to suppress the TKE input into the ocean when Sea Ice concentration 404 409 is greater than 25\%. … … 412 417 % (\eg\ Mellor, 1989; Large et al., 1994; Meier, 2001; Axell, 2002; St. Laurent and Garrett, 2002). 413 418 414 % ------------------------------------------------------------------------------------------------------------- 415 % GLS Generic Length Scale Scheme 416 % ------------------------------------------------------------------------------------------------------------- 417 \subsection[GLS: Generic Length Scale (\forcode{ln_zdfgls = .true.})] 418 {GLS: Generic Length Scale (\protect\np{ln\_zdfgls}\forcode{ = .true.})} 419 %% ================================================================================================= 420 \subsection[GLS: Generic Length Scale (\forcode{ln_zdfgls})]{GLS: Generic Length Scale (\protect\np{ln_zdfgls}{ln\_zdfgls})} 419 421 \label{subsec:ZDF_gls} 420 422 421 %--------------------------------------------namzdf_gls--------------------------------------------------------- 422 423 \nlst{namzdf_gls} 424 %-------------------------------------------------------------------------------------------------------------- 423 \begin{listing} 424 \nlst{namzdf_gls} 425 \caption{\forcode{&namzdf_gls}} 426 \label{lst:namzdf_gls} 427 \end{listing} 425 428 426 429 The Generic Length Scale (GLS) scheme is a turbulent closure scheme based on two prognostic equations: … … 428 431 $\psi$ \citep{umlauf.burchard_JMR03, umlauf.burchard_CSR05}. 429 432 This later variable is defined as: $\psi = {C_{0\mu}}^{p} \ {\bar{e}}^{m} \ l^{n}$, 430 where the triplet $(p, m, n)$ value given in Tab.\autoref{tab: GLS} allows to recover a number of433 where the triplet $(p, m, n)$ value given in Tab.\autoref{tab:ZDF_GLS} allows to recover a number of 431 434 well-known turbulent closures ($k$-$kl$ \citep{mellor.yamada_RG82}, $k$-$\epsilon$ \citep{rodi_JGR87}, 432 435 $k$-$\omega$ \citep{wilcox_AJ88} among others \citep{umlauf.burchard_JMR03,kantha.carniel_JMR03}). 433 436 The GLS scheme is given by the following set of equations: 434 437 \begin{equation} 435 \label{eq: zdfgls_e}438 \label{eq:ZDF_gls_e} 436 439 \frac{\partial \bar{e}}{\partial t} = 437 440 \frac{K_m}{\sigma_e e_3 }\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2 … … 443 446 444 447 \[ 445 % \label{eq: zdfgls_psi}448 % \label{eq:ZDF_gls_psi} 446 449 \begin{split} 447 450 \frac{\partial \psi}{\partial t} =& \frac{\psi}{\bar{e}} \left\{ … … 455 458 456 459 \[ 457 % \label{eq: zdfgls_kz}460 % \label{eq:ZDF_gls_kz} 458 461 \begin{split} 459 462 K_m &= C_{\mu} \ \sqrt {\bar{e}} \ l \\ … … 463 466 464 467 \[ 465 % \label{eq: zdfgls_eps}468 % \label{eq:ZDF_gls_eps} 466 469 {\epsilon} = C_{0\mu} \,\frac{\bar {e}^{3/2}}{l} \; 467 470 \] … … 470 473 The constants $C_1$, $C_2$, $C_3$, ${\sigma_e}$, ${\sigma_{\psi}}$ and the wall function ($Fw$) depends of 471 474 the choice of the turbulence model. 472 Four different turbulent models are pre-defined (\autoref{tab:GLS}). 473 They are made available through the \np{nn\_clo} namelist parameter. 474 475 %--------------------------------------------------TABLE-------------------------------------------------- 475 Four different turbulent models are pre-defined (\autoref{tab:ZDF_GLS}). 476 They are made available through the \np{nn_clo}{nn\_clo} namelist parameter. 477 476 478 \begin{table}[htbp] 477 \begin{center} 478 % \begin{tabular}{cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}c} 479 \begin{tabular}{ccccc} 480 & $k-kl$ & $k-\epsilon$ & $k-\omega$ & generic \\ 481 % & \citep{mellor.yamada_RG82} & \citep{rodi_JGR87} & \citep{wilcox_AJ88} & \\ 482 \hline 483 \hline 484 \np{nn\_clo} & \textbf{0} & \textbf{1} & \textbf{2} & \textbf{3} \\ 485 \hline 486 $( p , n , m )$ & ( 0 , 1 , 1 ) & ( 3 , 1.5 , -1 ) & ( -1 , 0.5 , -1 ) & ( 2 , 1 , -0.67 ) \\ 487 $\sigma_k$ & 2.44 & 1. & 2. & 0.8 \\ 488 $\sigma_\psi$ & 2.44 & 1.3 & 2. & 1.07 \\ 489 $C_1$ & 0.9 & 1.44 & 0.555 & 1. \\ 490 $C_2$ & 0.5 & 1.92 & 0.833 & 1.22 \\ 491 $C_3$ & 1. & 1. & 1. & 1. \\ 492 $F_{wall}$ & Yes & -- & -- & -- \\ 493 \hline 494 \hline 495 \end{tabular} 496 \caption{ 497 \protect\label{tab:GLS} 498 Set of predefined GLS parameters, or equivalently predefined turbulence models available with 499 \protect\np{ln\_zdfgls}\forcode{ = .true.} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\nam{zdf\_gls}. 500 } 501 \end{center} 479 \centering 480 % \begin{tabular}{cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}c} 481 \begin{tabular}{ccccc} 482 & $k-kl$ & $k-\epsilon$ & $k-\omega$ & generic \\ 483 % & \citep{mellor.yamada_RG82} & \citep{rodi_JGR87} & \citep{wilcox_AJ88} & \\ 484 \hline 485 \hline 486 \np{nn_clo}{nn\_clo} & \textbf{0} & \textbf{1} & \textbf{2} & \textbf{3} \\ 487 \hline 488 $( p , n , m )$ & ( 0 , 1 , 1 ) & ( 3 , 1.5 , -1 ) & ( -1 , 0.5 , -1 ) & ( 2 , 1 , -0.67 ) \\ 489 $\sigma_k$ & 2.44 & 1. & 2. & 0.8 \\ 490 $\sigma_\psi$ & 2.44 & 1.3 & 2. & 1.07 \\ 491 $C_1$ & 0.9 & 1.44 & 0.555 & 1. \\ 492 $C_2$ & 0.5 & 1.92 & 0.833 & 1.22 \\ 493 $C_3$ & 1. & 1. & 1. & 1. \\ 494 $F_{wall}$ & Yes & -- & -- & -- \\ 495 \hline 496 \hline 497 \end{tabular} 498 \caption[Set of predefined GLS parameters or equivalently predefined turbulence models available]{ 499 Set of predefined GLS parameters, or equivalently predefined turbulence models available with 500 \protect\np[=.true.]{ln_zdfgls}{ln\_zdfgls} and controlled by 501 the \protect\np{nn_clos}{nn\_clos} namelist variable in \protect\nam{zdf_gls}{zdf\_gls}.} 502 \label{tab:ZDF_GLS} 502 503 \end{table} 503 %--------------------------------------------------------------------------------------------------------------504 504 505 505 In the Mellor-Yamada model, the negativity of $n$ allows to use a wall function to force the convergence of … … 508 508 $C_{\mu}$ and $C_{\mu'}$ are calculated from stability function proposed by \citet{galperin.kantha.ea_JAS88}, 509 509 or by \citet{kantha.clayson_JGR94} or one of the two functions suggested by \citet{canuto.howard.ea_JPO01} 510 (\np {nn\_stab\_func}\forcode{ = 0, 3}, resp.).510 (\np[=0, 3]{nn_stab_func}{nn\_stab\_func}, resp.). 511 511 The value of $C_{0\mu}$ depends on the choice of the stability function. 512 512 513 513 The surface and bottom boundary condition on both $\bar{e}$ and $\psi$ can be calculated thanks to Dirichlet or 514 Neumann condition through \np{nn \_bc\_surf} and \np{nn\_bc\_bot}, resp.514 Neumann condition through \np{nn_bc_surf}{nn\_bc\_surf} and \np{nn_bc_bot}{nn\_bc\_bot}, resp. 515 515 As for TKE closure, the wave effect on the mixing is considered when 516 \np {rn\_crban}\forcode{ > 0.} \citep{craig.banner_JPO94, mellor.blumberg_JPO04}.517 The \np{rn \_crban} namelist parameter is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and518 \np{rn \_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}.516 \np[ > 0.]{rn_crban}{rn\_crban} \citep{craig.banner_JPO94, mellor.blumberg_JPO04}. 517 The \np{rn_crban}{rn\_crban} namelist parameter is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and 518 \np{rn_charn}{rn\_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}. 519 519 520 520 The $\psi$ equation is known to fail in stably stratified flows, and for this reason … … 525 525 the entrainment depth predicted in stably stratified situations, 526 526 and that its value has to be chosen in accordance with the algebraic model for the turbulent fluxes. 527 The clipping is only activated if \np {ln\_length\_lim}\forcode{ = .true.},528 and the $c_{lim}$ is set to the \np{rn \_clim\_galp} value.527 The clipping is only activated if \np[=.true.]{ln_length_lim}{ln\_length\_lim}, 528 and the $c_{lim}$ is set to the \np{rn_clim_galp}{rn\_clim\_galp} value. 529 529 530 530 The time and space discretization of the GLS equations follows the same energetic consideration as for … … 533 533 in \citet{reffray.guillaume.ea_GMD15} for the \NEMO\ model. 534 534 535 536 535 % ------------------------------------------------------------------------------------------------------------- 537 % OSM OSMOSIS BL Scheme 536 % OSM OSMOSIS BL Scheme 538 537 % ------------------------------------------------------------------------------------------------------------- 539 \subsection[OSM: OSM osisboundary layer scheme (\forcode{ln_zdfosm = .true.})]540 {OSM: OSM osis boundary layer scheme (\protect\np{ln\_zdfosm}\forcode{ = .true.})}538 \subsection[OSM: OSMOSIS boundary layer scheme (\forcode{ln_zdfosm = .true.})] 539 {OSM: OSMOSIS boundary layer scheme (\protect\np{ln_zdfosm}{ln\_zdfosm})} 541 540 \label{subsec:ZDF_osm} 542 %--------------------------------------------namzdf_osm--------------------------------------------------------- 543 544 \nlst{namzdf_osm} 541 542 \begin{listing} 543 \nlst{namzdf_osm} 544 \caption{\forcode{&namzdf_osm}} 545 \label{lst:namzdf_osm} 546 \end{listing} 547 545 548 %-------------------------------------------------------------------------------------------------------------- 546 547 The OSMOSIS turbulent closure scheme is based on...... TBC 548 549 % ------------------------------------------------------------------------------------------------------------- 550 % TKE and GLS discretization considerations 551 % ------------------------------------------------------------------------------------------------------------- 552 \subsection[ Discrete energy conservation for TKE and GLS schemes] 553 {Discrete energy conservation for TKE and GLS schemes} 554 \label{subsec:ZDF_tke_ene} 555 556 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 549 \paragraph{Namelist choices} 550 Most of the namelist options refer to how to specify the Stokes 551 surface drift and penetration depth. There are three options: 552 \begin{description} 553 \item \protect\np[=0]{nn_osm_wave}{nn\_osm\_wave} Default value in \texttt{namelist\_ref}. In this case the Stokes drift is 554 assumed to be parallel to the surface wind stress, with 555 magnitude consistent with a constant turbulent Langmuir number 556 $\mathrm{La}_t=$ \protect\np{rn_m_la} {rn\_m\_la} i.e.\ 557 $u_{s0}=\tau/(\mathrm{La}_t^2\rho_0)$. Default value of 558 \protect\np{rn_m_la}{rn\_m\_la} is 0.3. The Stokes penetration 559 depth $\delta = $ \protect\np{rn_osm_dstokes}{rn\_osm\_dstokes}; this has default value 560 of 5~m. 561 562 \item \protect\np[=1]{nn_osm_wave}{nn\_osm\_wave} In this case the Stokes drift is 563 assumed to be parallel to the surface wind stress, with 564 magnitude as in the classical Pierson-Moskowitz wind-sea 565 spectrum. Significant wave height and 566 wave-mean period taken from this spectrum are used to calculate the Stokes penetration 567 depth, following the approach set out in \citet{breivik.janssen.ea_JPO14}. 568 569 \item \protect\np[=2]{nn_osm_wave}{nn\_osm\_wave} In this case the Stokes drift is 570 taken from ECMWF wave model output, though only the component parallel 571 to the wind stress is retained. Significant wave height and 572 wave-mean period from ECMWF wave model output are used to calculate the Stokes penetration 573 depth, again following \citet{breivik.janssen.ea_JPO14}. 574 575 \end{description} 576 577 Others refer to the treatment of diffusion and viscosity beneath 578 the surface boundary layer: 579 \begin{description} 580 \item \protect\np{ln_kpprimix} {ln\_kpprimix} Default is \np{.true.}. Switches on KPP-style Ri \#-dependent 581 mixing below the surface boundary layer. If this is set 582 \texttt{.true.} the following variable settings are honoured: 583 \item \protect\np{rn_riinfty}{rn\_riinfty} Critical value of local Ri \# below which 584 shear instability increases vertical mixing from background value. 585 \item \protect\np{rn_difri} {rn\_difri} Maximum value of Ri \#-dependent mixing at $\mathrm{Ri}=0$. 586 \item \protect\np{ln_convmix}{ln\_convmix} If \texttt{.true.} then, where water column is unstable, specify 587 diffusivity equal to \protect\np{rn_dif_conv}{rn\_dif\_conv} (default value is 1 m~s$^{-2}$). 588 \end{description} 589 Diagnostic output is controlled by: 590 \begin{description} 591 \item \protect\np{ln_dia_osm}{ln\_dia\_osm} Default is \np{.false.}; allows XIOS output of OSMOSIS internal fields. 592 \end{description} 593 Obsolete namelist parameters include: 594 \begin{description} 595 \item \protect\np{ln_use_osm_la}\np{ln\_use\_osm\_la} With \protect\np[=0]{nn_osm_wave}{nn\_osm\_wave}, 596 \protect\np{rn_osm_dstokes} {rn\_osm\_dstokes} is always used to specify the Stokes 597 penetration depth. 598 \item \protect\np{nn_ave} {nn\_ave} Choice of averaging method for KPP-style Ri \# 599 mixing. Not taken account of. 600 \item \protect\np{rn_osm_hbl0} {rn\_osm\_hbl0} Depth of initial boundary layer is now set 601 by a density criterion similar to that used in calculating \emph{hmlp} (output as \texttt{mldr10\_1}) in \mdl{zdfmxl}. 602 \end{description} 603 604 \subsubsection{Summary} 605 Much of the time the turbulent motions in the ocean surface boundary 606 layer (OSBL) are not given by 607 classical shear turbulence. Instead they are in a regime known as 608 `Langmuir turbulence', dominated by an 609 interaction between the currents and the Stokes drift of the surface waves \citep[e.g.][]{mcwilliams.ea_JFM97}. 610 This regime is characterised by strong vertical turbulent motion, and appears when the surface Stokes drift $u_{s0}$ is much greater than the friction velocity $u_{\ast}$. More specifically Langmuir turbulence is thought to be crucial where the turbulent Langmuir number $\mathrm{La}_{t}=(u_{\ast}/u_{s0}) > 0.4$. 611 612 The OSMOSIS model is fundamentally based on results of Large Eddy 613 Simulations (LES) of Langmuir turbulence and aims to fully describe 614 this Langmuir regime. The description in this section is of necessity incomplete and further details are available in Grant. A (2019); in prep. 615 616 The OSMOSIS turbulent closure scheme is a similarity-scale scheme in 617 the same spirit as the K-profile 618 parameterization (KPP) scheme of \citet{large.ea_RG97}. 619 A specified shape of diffusivity, scaled by the (OSBL) depth 620 $h_{\mathrm{BL}}$ and a turbulent velocity scale, is imposed throughout the 621 boundary layer 622 $-h_{\mathrm{BL}}<z<\eta$. The turbulent closure model 623 also includes fluxes of tracers and momentum that are``non-local'' (independent of the local property gradient). 624 625 Rather than the OSBL 626 depth being diagnosed in terms of a bulk Richardson number criterion, 627 as in KPP, it is set by a prognostic equation that is informed by 628 energy budget considerations reminiscent of the classical mixed layer 629 models of \citet{kraus.turner_tellus67}. 630 The model also includes an explicit parametrization of the structure 631 of the pycnocline (the stratified region at the bottom of the OSBL). 632 633 Presently, mixing below the OSBL is handled by the Richardson 634 number-dependent mixing scheme used in \citet{large.ea_RG97}. 635 636 Convective parameterizations such as described in \ref{sec:ZDF_conv} 637 below should not be used with the OSMOSIS-OBL model: instabilities 638 within the OSBL are part of the model, while instabilities below the 639 ML are handled by the Ri \# dependent scheme. 640 641 \subsubsection{Depth and velocity scales} 642 The model supposes a boundary layer of thickness $h_{\mathrm{bl}}$ enclosing a well-mixed layer of thickness $h_{\mathrm{ml}}$ and a relatively thin pycnocline at the base of thickness $\Delta h$; Fig.~\ref{fig: OSBL_structure} shows typical (a) buoyancy structure and (b) turbulent buoyancy flux profile for the unstable boundary layer (losing buoyancy at the surface; e.g.\ cooling). 557 643 \begin{figure}[!t] 558 644 \begin{center} 559 \includegraphics[width= \textwidth]{Fig_ZDF_TKE_time_scheme}645 \includegraphics[width=0.7\textwidth]{Fig_ZDF_OSM_structure_of_OSBL} 560 646 \caption{ 561 \protect\label{fig: TKE_time_scheme}562 Illustration of the subgrid kinetic energy integration in GLS and TKE schemes and its links to the momentum and tracer time integration.647 \protect\label{fig: OSBL_structure} 648 The structure of the entraining boundary layer. (a) Mean buoyancy profile. (b) Profile of the buoyancy flux. 563 649 } 564 650 \end{center} 565 651 \end{figure} 566 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 652 The pycnocline in the OSMOSIS scheme is assumed to have a finite thickness, and may include a number of model levels. This means that the OSMOSIS scheme must parametrize both the thickness of the pycnocline, and the turbulent fluxes within the pycnocline. 653 654 Consideration of the power input by wind acting on the Stokes drift suggests that the Langmuir turbulence has velocity scale: 655 \begin{equation}\label{eq:w_La} 656 w_{*L}= \left(u_*^2 u_{s\,0}\right)^{1/3}; 657 \end{equation} 658 but at times the Stokes drift may be weak due to e.g.\ ice cover, short fetch, misalignment with the surface stress, etc.\ so a composite velocity scale is assumed for the stable (warming) boundary layer: 659 \begin{equation}\label{eq:composite-nu} 660 \nu_{\ast}= \left\{ u_*^3 \left[1-\exp(-.5 \mathrm{La}_t^2)\right]+w_{*L}^3\right\}^{1/3}. 661 \end{equation} 662 For the unstable boundary layer this is merged with the standard convective velocity scale $w_{*C}=\left(\overline{w^\prime b^\prime}_0 \,h_\mathrm{ml}\right)^{1/3}$, where $\overline{w^\prime b^\prime}_0$ is the upwards surface buoyancy flux, to give: 663 \begin{equation}\label{eq:vel-scale-unstable} 664 \omega_* = \left(\nu_*^3 + 0.5 w_{*C}^3\right)^{1/3}. 665 \end{equation} 666 667 \subsubsection{The flux gradient model} 668 The flux-gradient relationships used in the OSMOSIS scheme take the form: 669 % 670 \begin{equation}\label{eq:flux-grad-gen} 671 \overline{w^\prime\chi^\prime}=-K\frac{\partial\overline{\chi}}{\partial z} + N_{\chi,s} +N_{\chi,b} +N_{\chi,t}, 672 \end{equation} 673 % 674 where $\chi$ is a general variable and $N_{\chi,s}, N_{\chi,b} \mathrm{and} N_{\chi,t}$ are the non-gradient terms, and represent the effects of the different terms in the turbulent flux-budget on the transport of $\chi$. $N_{\chi,s}$ represents the effects that the Stokes shear has on the transport of $\chi$, $N_{\chi,b}$ the effect of buoyancy, and $N_{\chi,t}$ the effect of the turbulent transport. The same general form for the flux-gradient relationship is used to parametrize the transports of momentum, heat and salinity. 675 676 In terms of the non-dimensionalized depth variables 677 % 678 \begin{equation}\label{eq:sigma} 679 \sigma_{\mathrm{ml}}= -z/h_{\mathrm{ml}}; \;\sigma_{\mathrm{bl}}= -z/h_{\mathrm{bl}}, 680 \end{equation} 681 % 682 in unstable conditions the eddy diffusivity ($K_d$) and eddy viscosity ($K_\nu$) profiles are parametrized as: 683 % 684 \begin{align}\label{eq:diff-unstable} 685 K_d=&0.8\, \omega_*\, h_{\mathrm{ml}} \, \sigma_{\mathrm{ml}} \left(1-\beta_d \sigma_{\mathrm{ml}}\right)^{3/2} 686 \\\label{eq:visc-unstable} 687 K_\nu =& 0.3\, \omega_* \,h_{\mathrm{ml}}\, \sigma_{\mathrm{ml}} \left(1-\beta_\nu \sigma_{\mathrm{ml}}\right)\left(1-\tfrac{1}{2}\sigma_{\mathrm{ml}}^2\right) 688 \end{align} 689 % 690 where $\beta_d$ and $\beta_\nu$ are parameters that are determined by matching Eqs \ref{eq:diff-unstable} and \ref{eq:visc-unstable} to the eddy diffusivity and viscosity at the base of the well-mixed layer, given by 691 % 692 \begin{equation}\label{eq:diff-wml-base} 693 K_{d,\mathrm{ml}}=K_{\nu,\mathrm{ml}}=\,0.16\,\omega_* \Delta h. 694 \end{equation} 695 % 696 For stable conditions the eddy diffusivity/viscosity profiles are given by: 697 % 698 \begin{align}\label{diff-stable} 699 K_d= & 0.75\,\, \nu_*\, h_{\mathrm{ml}}\,\, \exp\left[-2.8 \left(h_{\mathrm{bl}}/L_L\right)^2\right]\sigma_{\mathrm{ml}} \left(1-\sigma_{\mathrm{ml}}\right)^{3/2} \\\label{eq:visc-stable} 700 K_\nu = & 0.375\,\, \nu_*\, h_{\mathrm{ml}} \,\, \exp\left[-2.8 \left(h_{\mathrm{bl}}/L_L\right)^2\right] \sigma_{\mathrm{ml}} \left(1-\sigma_{\mathrm{ml}}\right)\left(1-\tfrac{1}{2}\sigma_{\mathrm{ml}}^2\right). 701 \end{align} 702 % 703 The shape of the eddy viscosity and diffusivity profiles is the same as the shape in the unstable OSBL. The eddy diffusivity/viscosity depends on the stability parameter $h_{\mathrm{bl}}/{L_L}$ where $ L_L$ is analogous to the Obukhov length, but for Langmuir turbulence: 704 \begin{equation}\label{eq:L_L} 705 L_L=-w_{*L}^3/\left<\overline{w^\prime b^\prime}\right>_L, 706 \end{equation} 707 with the mean turbulent buoyancy flux averaged over the boundary layer given in terms of its surface value $\overline{w^\prime b^\prime}_0$ and (downwards) )solar irradiance $I(z)$ by 708 \begin{equation} \label{eq:stable-av-buoy-flux} 709 \left<\overline{w^\prime b^\prime}\right>_L = \tfrac{1}{2} {\overline{w^\prime b^\prime}}_0-g\alpha_E\left[\tfrac{1}{2}(I(0)+I(-h))-\left<I\right>\right]. 710 \end{equation} 711 % 712 In unstable conditions the eddy diffusivity and viscosity depend on stability through the velocity scale $\omega_*$, which depends on the two velocity scales $\nu_*$ and $w_{*C}$. 713 714 Details of the non-gradient terms in \eqref{eq:flux-grad-gen} and of the fluxes within the pycnocline $-h_{\mathrm{bl}}<z<h_{\mathrm{ml}}$ can be found in Grant (2019). 715 716 \subsubsection{Evolution of the boundary layer depth} 717 718 The prognostic equation for the depth of the neutral/unstable boundary layer is given by \citep{grant+etal18}, 719 720 \begin{equation} \label{eq:dhdt-unstable} 721 %\frac{\partial h_\mathrm{bl}}{\partial t} + \mathbf{U}_b\cdot\nabla h_\mathrm{bl}= W_b - \frac{{\overline{w^\prime b^\prime}}_\mathrm{ent}}{\Delta B_\mathrm{bl}} 722 \frac{\partial h_\mathrm{bl}}{\partial t} = W_b - \frac{{\overline{w^\prime b^\prime}}_\mathrm{ent}}{\Delta B_\mathrm{bl}} 723 \end{equation} 724 where $h_\mathrm{bl}$ is the horizontally-varying depth of the OSBL, 725 $\mathbf{U}_b$ and $W_b$ are the mean horizontal and vertical 726 velocities at the base of the OSBL, ${\overline{w^\prime 727 b^\prime}}_\mathrm{ent}$ is the buoyancy flux due to entrainment 728 and $\Delta B_\mathrm{bl}$ is the difference between the buoyancy 729 averaged over the depth of the OSBL (i.e.\ including the ML and 730 pycnocline) and the buoyancy just below the base of the OSBL. This 731 equation for the case when the pycnocline has a finite thickness, 732 based on the potential energy budget of the OSBL, is the leading term 733 \citep{grant+etal18} of a generalization of that used in mixed-layer 734 models e.g.\ \citet{kraus.turner_tellus67}, in which the thickness of the pycnocline is taken to be zero. 735 736 The entrainment flux for the combination of convective and Langmuir turbulence is given by 737 \begin{equation} \label{eq:entrain-flux} 738 {\overline{w^\prime b^\prime}}_\mathrm{ent} = -\alpha_{\mathrm{B}} {\overline{w^\prime b^\prime}}_0 - \alpha_{\mathrm{S}} \frac{u_*^3}{h_{\mathrm{ml}}} 739 + G\left(\delta/h_{\mathrm{ml}} \right)\left[\alpha_{\mathrm{S}}e^{-1.5\, \mathrm{La}_t}-\alpha_{\mathrm{L}} \frac{w_{\mathrm{*L}}^3}{h_{\mathrm{ml}}}\right] 740 \end{equation} 741 where the factor $G\equiv 1 - \mathrm{e}^ {-25\delta/h_{\mathrm{bl}}}(1-4\delta/h_{\mathrm{bl}})$ models the lesser efficiency of Langmuir mixing when the boundary-layer depth is much greater than the Stokes depth, and $\alpha_{\mathrm{B}}$, $\alpha_{S}$ and $\alpha_{\mathrm{L}}$ depend on the ratio of the appropriate eddy turnover time to the inertial timescale $f^{-1}$. Results from the LES suggest $\alpha_{\mathrm{B}}=0.18 F(fh_{\mathrm{bl}}/w_{*C})$, $\alpha_{S}=0.15 F(fh_{\mathrm{bl}}/u_*$ and $\alpha_{\mathrm{L}}=0.035 F(fh_{\mathrm{bl}}/u_{*L})$, where $F(x)\equiv\tanh(x^{-1})^{0.69}$. 742 743 For the stable boundary layer, the equation for the depth of the OSBL is: 744 745 \begin{equation}\label{eq:dhdt-stable} 746 \max\left(\Delta B_{bl},\frac{w_{*L}^2}{h_\mathrm{bl}}\right)\frac{\partial h_\mathrm{bl}}{\partial t} = \left(0.06 + 0.52\,\frac{ h_\mathrm{bl}}{L_L}\right) \frac{w_{*L}^3}{h_\mathrm{bl}} +\left<\overline{w^\prime b^\prime}\right>_L. 747 \end{equation} 748 749 Equation. \ref{eq:dhdt-unstable} always leads to the depth of the entraining OSBL increasing (ignoring the effect of the mean vertical motion), but the change in the thickness of the stable OSBL given by Eq. \ref{eq:dhdt-stable} can be positive or negative, depending on the magnitudes of $\left<\overline{w^\prime b^\prime}\right>_L$ and $h_\mathrm{bl}/L_L$. The rate at which the depth of the OSBL can decrease is limited by choosing an effective buoyancy $w_{*L}^2/h_\mathrm{bl}$, in place of $\Delta B_{bl}$ which will be $\approx 0$ for the collapsing OSBL. 750 751 752 %% ================================================================================================= 753 \subsection[ Discrete energy conservation for TKE and GLS schemes]{Discrete energy conservation for TKE and GLS schemes} 754 \label{subsec:ZDF_tke_ene} 755 756 \begin{figure}[!t] 757 \centering 758 \includegraphics[width=0.66\textwidth]{Fig_ZDF_TKE_time_scheme} 759 \caption[Subgrid kinetic energy integration in GLS and TKE schemes]{ 760 Illustration of the subgrid kinetic energy integration in GLS and TKE schemes and 761 its links to the momentum and tracer time integration.} 762 \label{fig:ZDF_TKE_time_scheme} 763 \end{figure} 567 764 568 765 The production of turbulence by vertical shear (the first term of the right hand side of 569 \autoref{eq: zdftke_e}) and \autoref{eq:zdfgls_e}) should balance the loss of kinetic energy associated with the vertical momentum diffusion570 (first line in \autoref{eq: PE_zdf}).766 \autoref{eq:ZDF_tke_e}) and \autoref{eq:ZDF_gls_e}) should balance the loss of kinetic energy associated with the vertical momentum diffusion 767 (first line in \autoref{eq:MB_zdf}). 571 768 To do so a special care has to be taken for both the time and space discretization of 572 769 the kinetic energy equation \citep{burchard_OM02,marsaleix.auclair.ea_OM08}. 573 770 574 Let us first address the time stepping issue. \autoref{fig: TKE_time_scheme} shows how771 Let us first address the time stepping issue. \autoref{fig:ZDF_TKE_time_scheme} shows how 575 772 the two-level Leap-Frog time stepping of the momentum and tracer equations interplays with 576 773 the one-level forward time stepping of the equation for $\bar{e}$. … … 579 776 summing the result vertically: 580 777 \begin{equation} 581 \label{eq: energ1}778 \label{eq:ZDF_energ1} 582 779 \begin{split} 583 780 \int_{-H}^{\eta} u^t \,\partial_z &\left( {K_m}^t \,(\partial_z u)^{t+\rdt} \right) \,dz \\ … … 587 784 \end{equation} 588 785 Here, the vertical diffusion of momentum is discretized backward in time with a coefficient, $K_m$, 589 known at time $t$ (\autoref{fig: TKE_time_scheme}), as it is required when using the TKE scheme590 (see \autoref{sec: STP_forward_imp}).591 The first term of the right hand side of \autoref{eq: energ1} represents the kinetic energy transfer at786 known at time $t$ (\autoref{fig:ZDF_TKE_time_scheme}), as it is required when using the TKE scheme 787 (see \autoref{sec:TD_forward_imp}). 788 The first term of the right hand side of \autoref{eq:ZDF_energ1} represents the kinetic energy transfer at 592 789 the surface (atmospheric forcing) and at the bottom (friction effect). 593 790 The second term is always negative. 594 791 It is the dissipation rate of kinetic energy, and thus minus the shear production rate of $\bar{e}$. 595 \autoref{eq: energ1} implies that, to be energetically consistent,792 \autoref{eq:ZDF_energ1} implies that, to be energetically consistent, 596 793 the production rate of $\bar{e}$ used to compute $(\bar{e})^t$ (and thus ${K_m}^t$) should be expressed as 597 794 ${K_m}^{t-\rdt}\,(\partial_z u)^{t-\rdt} \,(\partial_z u)^t$ … … 599 796 600 797 A similar consideration applies on the destruction rate of $\bar{e}$ due to stratification 601 (second term of the right hand side of \autoref{eq: zdftke_e} and \autoref{eq:zdfgls_e}).798 (second term of the right hand side of \autoref{eq:ZDF_tke_e} and \autoref{eq:ZDF_gls_e}). 602 799 This term must balance the input of potential energy resulting from vertical mixing. 603 800 The rate of change of potential energy (in 1D for the demonstration) due to vertical mixing is obtained by 604 801 multiplying the vertical density diffusion tendency by $g\,z$ and and summing the result vertically: 605 802 \begin{equation} 606 \label{eq: energ2}803 \label{eq:ZDF_energ2} 607 804 \begin{split} 608 805 \int_{-H}^{\eta} g\,z\,\partial_z &\left( {K_\rho}^t \,(\partial_k \rho)^{t+\rdt} \right) \,dz \\ … … 614 811 \end{equation} 615 812 where we use $N^2 = -g \,\partial_k \rho / (e_3 \rho)$. 616 The first term of the right hand side of \autoref{eq: energ2} is always zero because813 The first term of the right hand side of \autoref{eq:ZDF_energ2} is always zero because 617 814 there is no diffusive flux through the ocean surface and bottom). 618 815 The second term is minus the destruction rate of $\bar{e}$ due to stratification. 619 Therefore \autoref{eq: energ1} implies that, to be energetically consistent,620 the product ${K_\rho}^{t-\rdt}\,(N^2)^t$ should be used in \autoref{eq: zdftke_e} and \autoref{eq:zdfgls_e}.816 Therefore \autoref{eq:ZDF_energ1} implies that, to be energetically consistent, 817 the product ${K_\rho}^{t-\rdt}\,(N^2)^t$ should be used in \autoref{eq:ZDF_tke_e} and \autoref{eq:ZDF_gls_e}. 621 818 622 819 Let us now address the space discretization issue. 623 820 The vertical eddy coefficients are defined at $w$-point whereas the horizontal velocity components are in 624 the centre of the side faces of a $t$-box in staggered C-grid (\autoref{fig: cell}).821 the centre of the side faces of a $t$-box in staggered C-grid (\autoref{fig:DOM_cell}). 625 822 A space averaging is thus required to obtain the shear TKE production term. 626 By redoing the \autoref{eq: energ1} in the 3D case, it can be shown that the product of eddy coefficient by823 By redoing the \autoref{eq:ZDF_energ1} in the 3D case, it can be shown that the product of eddy coefficient by 627 824 the shear at $t$ and $t-\rdt$ must be performed prior to the averaging. 628 825 Furthermore, the time variation of $e_3$ has be taken into account. … … 630 827 The above energetic considerations leads to the following final discrete form for the TKE equation: 631 828 \begin{equation} 632 \label{eq: zdftke_ene}829 \label{eq:ZDF_tke_ene} 633 830 \begin{split} 634 831 \frac { (\bar{e})^t - (\bar{e})^{t-\rdt} } {\rdt} \equiv … … 647 844 \end{split} 648 845 \end{equation} 649 where the last two terms in \autoref{eq: zdftke_ene} (vertical diffusion and Kolmogorov dissipation)650 are time stepped using a backward scheme (see\autoref{sec: STP_forward_imp}).846 where the last two terms in \autoref{eq:ZDF_tke_ene} (vertical diffusion and Kolmogorov dissipation) 847 are time stepped using a backward scheme (see\autoref{sec:TD_forward_imp}). 651 848 Note that the Kolmogorov term has been linearized in time in order to render the implicit computation possible. 652 849 %The restart of the TKE scheme requires the storage of $\bar {e}$, $K_m$, $K_\rho$ and $l_\epsilon$ as 653 %they all appear in the right hand side of \autoref{eq: zdftke_ene}.850 %they all appear in the right hand side of \autoref{eq:ZDF_tke_ene}. 654 851 %For the latter, it is in fact the ratio $\sqrt{\bar{e}}/l_\epsilon$ which is stored. 655 852 656 % ================================================================ 657 % Convection 658 % ================================================================ 853 %% ================================================================================================= 659 854 \section{Convection} 660 855 \label{sec:ZDF_conv} … … 667 862 or/and the use of a turbulent closure scheme. 668 863 669 % ------------------------------------------------------------------------------------------------------------- 670 % Non-Penetrative Convective Adjustment 671 % ------------------------------------------------------------------------------------------------------------- 672 \subsection[Non-penetrative convective adjustment (\forcode{ln_tranpc = .true.})] 673 {Non-penetrative convective adjustment (\protect\np{ln\_tranpc}\forcode{ = .true.})} 864 %% ================================================================================================= 865 \subsection[Non-penetrative convective adjustment (\forcode{ln_tranpc})]{Non-penetrative convective adjustment (\protect\np{ln_tranpc}{ln\_tranpc})} 674 866 \label{subsec:ZDF_npc} 675 867 676 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>677 868 \begin{figure}[!htb] 678 \begin{center} 679 \includegraphics[width=\textwidth]{Fig_npc} 680 \caption{ 681 \protect\label{fig:npc} 682 Example of an unstable density profile treated by the non penetrative convective adjustment algorithm. 683 $1^{st}$ step: the initial profile is checked from the surface to the bottom. 684 It is found to be unstable between levels 3 and 4. 685 They are mixed. 686 The resulting $\rho$ is still larger than $\rho$(5): levels 3 to 5 are mixed. 687 The resulting $\rho$ is still larger than $\rho$(6): levels 3 to 6 are mixed. 688 The $1^{st}$ step ends since the density profile is then stable below the level 3. 689 $2^{nd}$ step: the new $\rho$ profile is checked following the same procedure as in $1^{st}$ step: 690 levels 2 to 5 are mixed. 691 The new density profile is checked. 692 It is found stable: end of algorithm. 693 } 694 \end{center} 869 \centering 870 \includegraphics[width=0.66\textwidth]{Fig_npc} 871 \caption[Unstable density profile treated by the non penetrative convective adjustment algorithm]{ 872 Example of an unstable density profile treated by 873 the non penetrative convective adjustment algorithm. 874 $1^{st}$ step: the initial profile is checked from the surface to the bottom. 875 It is found to be unstable between levels 3 and 4. 876 They are mixed. 877 The resulting $\rho$ is still larger than $\rho$(5): levels 3 to 5 are mixed. 878 The resulting $\rho$ is still larger than $\rho$(6): levels 3 to 6 are mixed. 879 The $1^{st}$ step ends since the density profile is then stable below the level 3. 880 $2^{nd}$ step: the new $\rho$ profile is checked following the same procedure as in $1^{st}$ step: 881 levels 2 to 5 are mixed. 882 The new density profile is checked. 883 It is found stable: end of algorithm.} 884 \label{fig:ZDF_npc} 695 885 \end{figure} 696 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 697 698 Options are defined through the \nam{zdf} namelist variables. 699 The non-penetrative convective adjustment is used when \np{ln\_zdfnpc}\forcode{ = .true.}. 700 It is applied at each \np{nn\_npc} time step and mixes downwards instantaneously the statically unstable portion of 886 887 Options are defined through the \nam{zdf}{zdf} namelist variables. 888 The non-penetrative convective adjustment is used when \np[=.true.]{ln_zdfnpc}{ln\_zdfnpc}. 889 It is applied at each \np{nn_npc}{nn\_npc} time step and mixes downwards instantaneously the statically unstable portion of 701 890 the water column, but only until the density structure becomes neutrally stable 702 891 (\ie\ until the mixed portion of the water column has \textit{exactly} the density of the water just below) 703 892 \citep{madec.delecluse.ea_JPO91}. 704 The associated algorithm is an iterative process used in the following way (\autoref{fig: npc}):893 The associated algorithm is an iterative process used in the following way (\autoref{fig:ZDF_npc}): 705 894 starting from the top of the ocean, the first instability is found. 706 895 Assume in the following that the instability is located between levels $k$ and $k+1$. … … 734 923 having to recompute the expansion coefficients at each mixing iteration. 735 924 736 % ------------------------------------------------------------------------------------------------------------- 737 % Enhanced Vertical Diffusion 738 % ------------------------------------------------------------------------------------------------------------- 739 \subsection[Enhanced vertical diffusion (\forcode{ln_zdfevd = .true.})] 740 {Enhanced vertical diffusion (\protect\np{ln\_zdfevd}\forcode{ = .true.})} 925 %% ================================================================================================= 926 \subsection[Enhanced vertical diffusion (\forcode{ln_zdfevd})]{Enhanced vertical diffusion (\protect\np{ln_zdfevd}{ln\_zdfevd})} 741 927 \label{subsec:ZDF_evd} 742 928 743 Options are defined through the \nam{zdf} namelist variables.744 The enhanced vertical diffusion parameterisation is used when \np {ln\_zdfevd}\forcode{ = .true.}.929 Options are defined through the \nam{zdf}{zdf} namelist variables. 930 The enhanced vertical diffusion parameterisation is used when \np[=.true.]{ln_zdfevd}{ln\_zdfevd}. 745 931 In this case, the vertical eddy mixing coefficients are assigned very large values 746 932 in regions where the stratification is unstable 747 933 (\ie\ when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative) \citep{lazar_phd97, lazar.madec.ea_JPO99}. 748 This is done either on tracers only (\np {nn\_evdm}\forcode{ = 0}) or749 on both momentum and tracers (\np {nn\_evdm}\forcode{ = 1}).750 751 In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and if \np {nn\_evdm}\forcode{ = 1},934 This is done either on tracers only (\np[=0]{nn_evdm}{nn\_evdm}) or 935 on both momentum and tracers (\np[=1]{nn_evdm}{nn\_evdm}). 936 937 In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and if \np[=1]{nn_evdm}{nn\_evdm}, 752 938 the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$ values also, are set equal to 753 the namelist parameter \np{rn \_avevd}.939 the namelist parameter \np{rn_avevd}{rn\_avevd}. 754 940 A typical value for $rn\_avevd$ is between 1 and $100~m^2.s^{-1}$. 755 941 This parameterisation of convective processes is less time consuming than … … 759 945 Note that the stability test is performed on both \textit{before} and \textit{now} values of $N^2$. 760 946 This removes a potential source of divergence of odd and even time step in 761 a leapfrog environment \citep{leclair_phd10} (see \autoref{sec:STP_mLF}). 762 763 % ------------------------------------------------------------------------------------------------------------- 764 % Turbulent Closure Scheme 765 % ------------------------------------------------------------------------------------------------------------- 766 \subsection{Handling convection with turbulent closure schemes (\forcode{ln_zdf\{tke,gls,osm\} = .true.})} 947 a leapfrog environment \citep{leclair_phd10} (see \autoref{sec:TD_mLF}). 948 949 %% ================================================================================================= 950 \subsection[Handling convection with turbulent closure schemes (\forcode{ln_zdf_}\{\forcode{tke,gls,osm}\})]{Handling convection with turbulent closure schemes (\forcode{ln_zdf{tke,gls,osm}})} 767 951 \label{subsec:ZDF_tcs} 768 952 769 770 953 The turbulent closure schemes presented in \autoref{subsec:ZDF_tke}, \autoref{subsec:ZDF_gls} and 771 \autoref{subsec:ZDF_osm} (\ie\ \np{ln \_zdftke} or \np{ln\_zdfgls} or \np{ln\_zdfosm} defined) deal, in theory,954 \autoref{subsec:ZDF_osm} (\ie\ \np{ln_zdftke}{ln\_zdftke} or \np{ln_zdfgls}{ln\_zdfgls} or \np{ln_zdfosm}{ln\_zdfosm} defined) deal, in theory, 772 955 with statically unstable density profiles. 773 956 In such a case, the term corresponding to the destruction of turbulent kinetic energy through stratification in 774 \autoref{eq: zdftke_e} or \autoref{eq:zdfgls_e} becomes a source term, since $N^2$ is negative.957 \autoref{eq:ZDF_tke_e} or \autoref{eq:ZDF_gls_e} becomes a source term, since $N^2$ is negative. 775 958 It results in large values of $A_T^{vT}$ and $A_T^{vT}$, and also of the four neighboring values at 776 959 velocity points $A_u^{vm} {and}\;A_v^{vm}$ (up to $1\;m^2s^{-1}$). … … 781 964 because the mixing length scale is bounded by the distance to the sea surface. 782 965 It can thus be useful to combine the enhanced vertical diffusion with the turbulent closure scheme, 783 \ie\ setting the \np{ln \_zdfnpc} namelist parameter to true and784 defining the turbulent closure (\np{ln \_zdftke} or \np{ln\_zdfgls} = \forcode{.true.}) all together.966 \ie\ setting the \np{ln_zdfnpc}{ln\_zdfnpc} namelist parameter to true and 967 defining the turbulent closure (\np{ln_zdftke}{ln\_zdftke} or \np{ln_zdfgls}{ln\_zdfgls} = \forcode{.true.}) all together. 785 968 786 969 The OSMOSIS turbulent closure scheme already includes enhanced vertical diffusion in the case of convection, 787 970 %as governed by the variables $bvsqcon$ and $difcon$ found in \mdl{zdfkpp}, 788 therefore \np {ln\_zdfevd}\forcode{ = .false.} should be used with the OSMOSIS scheme.971 therefore \np[=.false.]{ln_zdfevd}{ln\_zdfevd} should be used with the OSMOSIS scheme. 789 972 % gm% + one word on non local flux with KPP scheme trakpp.F90 module... 790 973 791 % ================================================================ 792 % Double Diffusion Mixing 793 % ================================================================ 794 \section[Double diffusion mixing (\forcode{ln_zdfddm = .true.})] 795 {Double diffusion mixing (\protect\np{ln\_zdfddm}\forcode{ = .true.})} 974 %% ================================================================================================= 975 \section[Double diffusion mixing (\forcode{ln_zdfddm})]{Double diffusion mixing (\protect\np{ln_zdfddm}{ln\_zdfddm})} 796 976 \label{subsec:ZDF_ddm} 797 977 798 799 %-------------------------------------------namzdf_ddm-------------------------------------------------800 %801 978 %\nlst{namzdf_ddm} 802 %--------------------------------------------------------------------------------------------------------------803 979 804 980 This parameterisation has been introduced in \mdl{zdfddm} module and is controlled by the namelist parameter 805 \np{ln \_zdfddm} in \nam{zdf}.981 \np{ln_zdfddm}{ln\_zdfddm} in \nam{zdf}{zdf}. 806 982 Double diffusion occurs when relatively warm, salty water overlies cooler, fresher water, or vice versa. 807 983 The former condition leads to salt fingering and the latter to diffusive convection. … … 811 987 temperature and salinity. 812 988 813 814 989 Diapycnal mixing of S and T are described by diapycnal diffusion coefficients 815 990 \begin{align*} 816 % \label{eq: zdfddm_Kz}991 % \label{eq:ZDF_ddm_Kz} 817 992 &A^{vT} = A_o^{vT}+A_f^{vT}+A_d^{vT} \\ 818 993 &A^{vS} = A_o^{vS}+A_f^{vS}+A_d^{vS} … … 826 1001 (1981): 827 1002 \begin{align} 828 \label{eq: zdfddm_f}1003 \label{eq:ZDF_ddm_f} 829 1004 A_f^{vS} &= 830 1005 \begin{cases} … … 832 1007 0 &\text{otherwise} 833 1008 \end{cases} 834 \\ \label{eq: zdfddm_f_T}1009 \\ \label{eq:ZDF_ddm_f_T} 835 1010 A_f^{vT} &= 0.7 \ A_f^{vS} / R_\rho 836 1011 \end{align} 837 1012 838 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>839 1013 \begin{figure}[!t] 840 \begin{center} 841 \includegraphics[width=\textwidth]{Fig_zdfddm} 842 \caption{ 843 \protect\label{fig:zdfddm} 844 From \citet{merryfield.holloway.ea_JPO99} : 845 (a) Diapycnal diffusivities $A_f^{vT}$ and $A_f^{vS}$ for temperature and salt in regions of salt fingering. 846 Heavy curves denote $A^{\ast v} = 10^{-3}~m^2.s^{-1}$ and thin curves $A^{\ast v} = 10^{-4}~m^2.s^{-1}$; 847 (b) diapycnal diffusivities $A_d^{vT}$ and $A_d^{vS}$ for temperature and salt in regions of 848 diffusive convection. 849 Heavy curves denote the Federov parameterisation and thin curves the Kelley parameterisation. 850 The latter is not implemented in \NEMO. 851 } 852 \end{center} 1014 \centering 1015 \includegraphics[width=0.66\textwidth]{Fig_zdfddm} 1016 \caption[Diapycnal diffusivities for temperature and salt in regions of salt fingering and 1017 diffusive convection]{ 1018 From \citet{merryfield.holloway.ea_JPO99}: 1019 (a) Diapycnal diffusivities $A_f^{vT}$ and $A_f^{vS}$ for temperature and salt in 1020 regions of salt fingering. 1021 Heavy curves denote $A^{\ast v} = 10^{-3}~m^2.s^{-1}$ and 1022 thin curves $A^{\ast v} = 10^{-4}~m^2.s^{-1}$; 1023 (b) diapycnal diffusivities $A_d^{vT}$ and $A_d^{vS}$ for temperature and salt in 1024 regions of diffusive convection. 1025 Heavy curves denote the Federov parameterisation and thin curves the Kelley parameterisation. 1026 The latter is not implemented in \NEMO.} 1027 \label{fig:ZDF_ddm} 853 1028 \end{figure} 854 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 855 856 The factor 0.7 in \autoref{eq:zdfddm_f_T} reflects the measured ratio $\alpha F_T /\beta F_S \approx 0.7$ of 1029 1030 The factor 0.7 in \autoref{eq:ZDF_ddm_f_T} reflects the measured ratio $\alpha F_T /\beta F_S \approx 0.7$ of 857 1031 buoyancy flux of heat to buoyancy flux of salt (\eg, \citet{mcdougall.taylor_JMR84}). 858 1032 Following \citet{merryfield.holloway.ea_JPO99}, we adopt $R_c = 1.6$, $n = 6$, and $A^{\ast v} = 10^{-4}~m^2.s^{-1}$. … … 861 1035 Federov (1988) is used: 862 1036 \begin{align} 863 % \label{eq: zdfddm_d}1037 % \label{eq:ZDF_ddm_d} 864 1038 A_d^{vT} &= 865 1039 \begin{cases} … … 869 1043 \end{cases} 870 1044 \nonumber \\ 871 \label{eq: zdfddm_d_S}1045 \label{eq:ZDF_ddm_d_S} 872 1046 A_d^{vS} &= 873 1047 \begin{cases} … … 878 1052 \end{align} 879 1053 880 The dependencies of \autoref{eq: zdfddm_f} to \autoref{eq:zdfddm_d_S} on $R_\rho$ are illustrated in881 \autoref{fig: zdfddm}.1054 The dependencies of \autoref{eq:ZDF_ddm_f} to \autoref{eq:ZDF_ddm_d_S} on $R_\rho$ are illustrated in 1055 \autoref{fig:ZDF_ddm}. 882 1056 Implementing this requires computing $R_\rho$ at each grid point on every time step. 883 1057 This is done in \mdl{eosbn2} at the same time as $N^2$ is computed. 884 1058 This avoids duplication in the computation of $\alpha$ and $\beta$ (which is usually quite expensive). 885 1059 886 % ================================================================ 887 % Bottom Friction 888 % ================================================================ 889 \section[Bottom and top friction (\textit{zdfdrg.F90})] 890 {Bottom and top friction (\protect\mdl{zdfdrg})} 891 \label{sec:ZDF_drg} 892 893 %--------------------------------------------nambfr-------------------------------------------------------- 894 % 895 \nlst{namdrg} 896 \nlst{namdrg_top} 897 \nlst{namdrg_bot} 898 899 %-------------------------------------------------------------------------------------------------------------- 900 901 Options to define the top and bottom friction are defined through the \nam{drg} namelist variables. 1060 %% ================================================================================================= 1061 \section[Bottom and top friction (\textit{zdfdrg.F90})]{Bottom and top friction (\protect\mdl{zdfdrg})} 1062 \label{sec:ZDF_drg} 1063 1064 \begin{listing} 1065 \nlst{namdrg} 1066 \caption{\forcode{&namdrg}} 1067 \label{lst:namdrg} 1068 \end{listing} 1069 \begin{listing} 1070 \nlst{namdrg_top} 1071 \caption{\forcode{&namdrg_top}} 1072 \label{lst:namdrg_top} 1073 \end{listing} 1074 \begin{listing} 1075 \nlst{namdrg_bot} 1076 \caption{\forcode{&namdrg_bot}} 1077 \label{lst:namdrg_bot} 1078 \end{listing} 1079 1080 Options to define the top and bottom friction are defined through the \nam{drg}{drg} namelist variables. 902 1081 The bottom friction represents the friction generated by the bathymetry. 903 1082 The top friction represents the friction generated by the ice shelf/ocean interface. … … 905 1084 the description below considers mostly the bottom friction case, if not stated otherwise. 906 1085 907 908 1086 Both the surface momentum flux (wind stress) and the bottom momentum flux (bottom friction) enter the equations as 909 1087 a condition on the vertical diffusive flux. 910 1088 For the bottom boundary layer, one has: 911 1089 \[ 912 % \label{eq: zdfbfr_flux}1090 % \label{eq:ZDF_bfr_flux} 913 1091 A^{vm} \left( \partial {\textbf U}_h / \partial z \right) = {{\cal F}}_h^{\textbf U} 914 1092 \] … … 926 1104 To illustrate this, consider the equation for $u$ at $k$, the last ocean level: 927 1105 \begin{equation} 928 \label{eq: zdfdrg_flux2}1106 \label{eq:ZDF_drg_flux2} 929 1107 \frac{\partial u_k}{\partial t} = \frac{1}{e_{3u}} \left[ \frac{A_{uw}^{vm}}{e_{3uw}} \delta_{k+1/2}\;[u] - {\cal F}^u_h \right] \approx - \frac{{\cal F}^u_{h}}{e_{3u}} 930 1108 \end{equation} … … 946 1124 These coefficients are computed in \mdl{zdfdrg} and generally take the form $c_b^{\textbf U}$ where: 947 1125 \begin{equation} 948 \label{eq: zdfbfr_bdef}1126 \label{eq:ZDF_bfr_bdef} 949 1127 \frac{\partial {\textbf U_h}}{\partial t} = 950 1128 - \frac{{\cal F}^{\textbf U}_{h}}{e_{3u}} = \frac{c_b^{\textbf U}}{e_{3u}} \;{\textbf U}_h^b … … 953 1131 Note than from \NEMO\ 4.0, drag coefficients are only computed at cell centers (\ie\ at T-points) and refer to as $c_b^T$ in the following. These are then linearly interpolated in space to get $c_b^\textbf{U}$ at velocity points. 954 1132 955 % ------------------------------------------------------------------------------------------------------------- 956 % Linear Bottom Friction 957 % ------------------------------------------------------------------------------------------------------------- 958 \subsection[Linear top/bottom friction (\forcode{ln_lin = .true.})] 959 {Linear top/bottom friction (\protect\np{ln\_lin}\forcode{ = .true.)}} 960 \label{subsec:ZDF_drg_linear} 1133 %% ================================================================================================= 1134 \subsection[Linear top/bottom friction (\forcode{ln_lin})]{Linear top/bottom friction (\protect\np{ln_lin}{ln\_lin})} 1135 \label{subsec:ZDF_drg_linear} 961 1136 962 1137 The linear friction parameterisation (including the special case of a free-slip condition) assumes that 963 1138 the friction is proportional to the interior velocity (\ie\ the velocity of the first/last model level): 964 1139 \[ 965 % \label{eq: zdfbfr_linear}1140 % \label{eq:ZDF_bfr_linear} 966 1141 {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3} \; \frac{\partial \textbf{U}_h}{\partial k} = r \; \textbf{U}_h^b 967 1142 \] … … 976 1151 and assuming an ocean depth $H = 4000$~m, the resulting friction coefficient is $r = 4\;10^{-4}$~m\;s$^{-1}$. 977 1152 This is the default value used in \NEMO. It corresponds to a decay time scale of 115~days. 978 It can be changed by specifying \np{rn \_Uc0} (namelist parameter).979 980 For the linear friction case the drag coefficient used in the general expression \autoref{eq: zdfbfr_bdef} is:981 \[ 982 % \label{eq: zdfbfr_linbfr_b}1153 It can be changed by specifying \np{rn_Uc0}{rn\_Uc0} (namelist parameter). 1154 1155 For the linear friction case the drag coefficient used in the general expression \autoref{eq:ZDF_bfr_bdef} is: 1156 \[ 1157 % \label{eq:ZDF_bfr_linbfr_b} 983 1158 c_b^T = - r 984 1159 \] 985 When \np {ln\_lin} \forcode{= .true.}, the value of $r$ used is \np{rn\_Uc0}*\np{rn\_Cd0}.986 Setting \np {ln\_OFF} \forcode{= .true.} (and \forcode{ln_lin =.true.}) is equivalent to setting $r=0$ and leads to a free-slip boundary condition.1160 When \np[=.true.]{ln_lin}{ln\_lin}, the value of $r$ used is \np{rn_Uc0}{rn\_Uc0}*\np{rn_Cd0}{rn\_Cd0}. 1161 Setting \np[=.true.]{ln_OFF}{ln\_OFF} (and \forcode{ln_lin=.true.}) is equivalent to setting $r=0$ and leads to a free-slip boundary condition. 987 1162 988 1163 These values are assigned in \mdl{zdfdrg}. 989 1164 Note that there is support for local enhancement of these values via an externally defined 2D mask array 990 (\np {ln\_boost}\forcode{ = .true.}) given in the \ifile{bfr\_coef} input NetCDF file.1165 (\np[=.true.]{ln_boost}{ln\_boost}) given in the \ifile{bfr\_coef} input NetCDF file. 991 1166 The mask values should vary from 0 to 1. 992 1167 Locations with a non-zero mask value will have the friction coefficient increased by 993 $mask\_value$ * \np{rn\_boost} * \np{rn\_Cd0}. 994 995 % ------------------------------------------------------------------------------------------------------------- 996 % Non-Linear Bottom Friction 997 % ------------------------------------------------------------------------------------------------------------- 998 \subsection[Non-linear top/bottom friction (\forcode{ln_non_lin = .true.})] 999 {Non-linear top/bottom friction (\protect\np{ln\_non\_lin}\forcode{ = .true.})} 1000 \label{subsec:ZDF_drg_nonlinear} 1168 $mask\_value$ * \np{rn_boost}{rn\_boost} * \np{rn_Cd0}{rn\_Cd0}. 1169 1170 %% ================================================================================================= 1171 \subsection[Non-linear top/bottom friction (\forcode{ln_non_lin})]{Non-linear top/bottom friction (\protect\np{ln_non_lin}{ln\_non\_lin})} 1172 \label{subsec:ZDF_drg_nonlinear} 1001 1173 1002 1174 The non-linear bottom friction parameterisation assumes that the top/bottom friction is quadratic: 1003 1175 \[ 1004 % \label{eq: zdfdrg_nonlinear}1176 % \label{eq:ZDF_drg_nonlinear} 1005 1177 {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3 }\frac{\partial \textbf {U}_h 1006 1178 }{\partial k}=C_D \;\sqrt {u_b ^2+v_b ^2+e_b } \;\; \textbf {U}_h^b … … 1012 1184 $e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{killworth_JPO92} uses $C_D = 1.4\;10^{-3}$ and 1013 1185 $e_b =2.5\;\;10^{-3}$m$^2$\;s$^{-2}$. 1014 The CME choices have been set as default values (\np{rn \_Cd0} and \np{rn\_ke0} namelist parameters).1186 The CME choices have been set as default values (\np{rn_Cd0}{rn\_Cd0} and \np{rn_ke0}{rn\_ke0} namelist parameters). 1015 1187 1016 1188 As for the linear case, the friction is imposed in the code by adding the trend due to … … 1018 1190 For the non-linear friction case the term computed in \mdl{zdfdrg} is: 1019 1191 \[ 1020 % \label{eq: zdfdrg_nonlinbfr}1192 % \label{eq:ZDF_drg_nonlinbfr} 1021 1193 c_b^T = - \; C_D\;\left[ \left(\bar{u_b}^{i}\right)^2 + \left(\bar{v_b}^{j}\right)^2 + e_b \right]^{1/2} 1022 1194 \] 1023 1195 1024 1196 The coefficients that control the strength of the non-linear friction are initialised as namelist parameters: 1025 $C_D$= \np{rn \_Cd0}, and $e_b$ =\np{rn\_bfeb2}.1026 Note that for applications which consider tides explicitly, a low or even zero value of \np{rn \_bfeb2} is recommended. A local enhancement of $C_D$ is again possible via an externally defined 2D mask array1027 (\np {ln\_boost}\forcode{ = .true.}).1197 $C_D$= \np{rn_Cd0}{rn\_Cd0}, and $e_b$ =\np{rn_bfeb2}{rn\_bfeb2}. 1198 Note that for applications which consider tides explicitly, a low or even zero value of \np{rn_bfeb2}{rn\_bfeb2} is recommended. A local enhancement of $C_D$ is again possible via an externally defined 2D mask array 1199 (\np[=.true.]{ln_boost}{ln\_boost}). 1028 1200 This works in the same way as for the linear friction case with non-zero masked locations increased by 1029 $mask\_value$ * \np{rn\_boost} * \np{rn\_Cd0}. 1030 1031 % ------------------------------------------------------------------------------------------------------------- 1032 % Bottom Friction Log-layer 1033 % ------------------------------------------------------------------------------------------------------------- 1034 \subsection[Log-layer top/bottom friction (\forcode{ln_loglayer = .true.})] 1035 {Log-layer top/bottom friction (\protect\np{ln\_loglayer}\forcode{ = .true.})} 1036 \label{subsec:ZDF_drg_loglayer} 1201 $mask\_value$ * \np{rn_boost}{rn\_boost} * \np{rn_Cd0}{rn\_Cd0}. 1202 1203 %% ================================================================================================= 1204 \subsection[Log-layer top/bottom friction (\forcode{ln_loglayer})]{Log-layer top/bottom friction (\protect\np{ln_loglayer}{ln\_loglayer})} 1205 \label{subsec:ZDF_drg_loglayer} 1037 1206 1038 1207 In the non-linear friction case, the drag coefficient, $C_D$, can be optionally enhanced using 1039 1208 a "law of the wall" scaling. This assumes that the model vertical resolution can capture the logarithmic layer which typically occur for layers thinner than 1 m or so. 1040 If \np {ln\_loglayer} \forcode{= .true.}, $C_D$ is no longer constant but is related to the distance to the wall (or equivalently to the half of the top/bottom layer thickness):1209 If \np[=.true.]{ln_loglayer}{ln\_loglayer}, $C_D$ is no longer constant but is related to the distance to the wall (or equivalently to the half of the top/bottom layer thickness): 1041 1210 \[ 1042 1211 C_D = \left ( {\kappa \over {\mathrm log}\left ( 0.5 \; e_{3b} / rn\_{z0} \right ) } \right )^2 1043 1212 \] 1044 1213 1045 \noindent where $\kappa$ is the von-Karman constant and \np{rn \_z0} is a roughness length provided via the namelist.1214 \noindent where $\kappa$ is the von-Karman constant and \np{rn_z0}{rn\_z0} is a roughness length provided via the namelist. 1046 1215 1047 1216 The drag coefficient is bounded such that it is kept greater or equal to 1048 the base \np{rn \_Cd0} value which occurs where layer thicknesses become large and presumably logarithmic layers are not resolved at all. For stability reason, it is also not allowed to exceed the value of an additional namelist parameter:1049 \np{rn \_Cdmax}, \ie1217 the base \np{rn_Cd0}{rn\_Cd0} value which occurs where layer thicknesses become large and presumably logarithmic layers are not resolved at all. For stability reason, it is also not allowed to exceed the value of an additional namelist parameter: 1218 \np{rn_Cdmax}{rn\_Cdmax}, \ie 1050 1219 \[ 1051 1220 rn\_Cd0 \leq C_D \leq rn\_Cdmax … … 1053 1222 1054 1223 \noindent The log-layer enhancement can also be applied to the top boundary friction if 1055 under ice-shelf cavities are activated (\np{ln\_isfcav}\forcode{ = .true.}). 1056 %In this case, the relevant namelist parameters are \np{rn\_tfrz0}, \np{rn\_tfri2} and \np{rn\_tfri2\_max}. 1057 1058 % ------------------------------------------------------------------------------------------------------------- 1059 % Explicit bottom Friction 1060 % ------------------------------------------------------------------------------------------------------------- 1061 \subsection{Explicit top/bottom friction (\forcode{ln_drgimp = .false.})} 1062 \label{subsec:ZDF_drg_stability} 1063 1064 Setting \np{ln\_drgimp} \forcode{= .false.} means that bottom friction is treated explicitly in time, which has the advantage of simplifying the interaction with the split-explicit free surface (see \autoref{subsec:ZDF_drg_ts}). The latter does indeed require the knowledge of bottom stresses in the course of the barotropic sub-iteration, which becomes less straightforward in the implicit case. In the explicit case, top/bottom stresses can be computed using \textit{before} velocities and inserted in the overall momentum tendency budget. This reads: 1224 under ice-shelf cavities are activated (\np[=.true.]{ln_isfcav}{ln\_isfcav}). 1225 %In this case, the relevant namelist parameters are \np{rn_tfrz0}{rn\_tfrz0}, \np{rn_tfri2}{rn\_tfri2} and \np{rn_tfri2_max}{rn\_tfri2\_max}. 1226 1227 %% ================================================================================================= 1228 \subsection[Explicit top/bottom friction (\forcode{ln_drgimp=.false.})]{Explicit top/bottom friction (\protect\np[=.false.]{ln_drgimp}{ln\_drgimp})} 1229 \label{subsec:ZDF_drg_stability} 1230 1231 Setting \np[=.false.]{ln_drgimp}{ln\_drgimp} means that bottom friction is treated explicitly in time, which has the advantage of simplifying the interaction with the split-explicit free surface (see \autoref{subsec:ZDF_drg_ts}). The latter does indeed require the knowledge of bottom stresses in the course of the barotropic sub-iteration, which becomes less straightforward in the implicit case. In the explicit case, top/bottom stresses can be computed using \textit{before} velocities and inserted in the overall momentum tendency budget. This reads: 1065 1232 1066 1233 At the top (below an ice shelf cavity): … … 1077 1244 1078 1245 Since this is conditionally stable, some care needs to exercised over the choice of parameters to ensure that the implementation of explicit top/bottom friction does not induce numerical instability. 1079 For the purposes of stability analysis, an approximation to \autoref{eq: zdfdrg_flux2} is:1246 For the purposes of stability analysis, an approximation to \autoref{eq:ZDF_drg_flux2} is: 1080 1247 \begin{equation} 1081 \label{eq: Eqn_drgstab}1248 \label{eq:ZDF_Eqn_drgstab} 1082 1249 \begin{split} 1083 1250 \Delta u &= -\frac{{{\cal F}_h}^u}{e_{3u}}\;2 \rdt \\ … … 1090 1257 |\Delta u| < \;|u| 1091 1258 \] 1092 \noindent which, using \autoref{eq: Eqn_drgstab}, gives:1259 \noindent which, using \autoref{eq:ZDF_Eqn_drgstab}, gives: 1093 1260 \[ 1094 1261 r\frac{2\rdt}{e_{3u}} < 1 \qquad \Rightarrow \qquad r < \frac{e_{3u}}{2\rdt}\\ … … 1117 1284 The number of potential breaches of the explicit stability criterion are still reported for information purposes. 1118 1285 1119 % ------------------------------------------------------------------------------------------------------------- 1120 % Implicit Bottom Friction 1121 % ------------------------------------------------------------------------------------------------------------- 1122 \subsection[Implicit top/bottom friction (\forcode{ln_drgimp = .true.})] 1123 {Implicit top/bottom friction (\protect\np{ln\_drgimp}\forcode{ = .true.})} 1124 \label{subsec:ZDF_drg_imp} 1286 %% ================================================================================================= 1287 \subsection[Implicit top/bottom friction (\forcode{ln_drgimp=.true.})]{Implicit top/bottom friction (\protect\np[=.true.]{ln_drgimp}{ln\_drgimp})} 1288 \label{subsec:ZDF_drg_imp} 1125 1289 1126 1290 An optional implicit form of bottom friction has been implemented to improve model stability. 1127 1291 We recommend this option for shelf sea and coastal ocean applications. %, especially for split-explicit time splitting. 1128 This option can be invoked by setting \np{ln \_drgimp} to \forcode{.true.} in the \nam{drg} namelist.1129 %This option requires \np{ln \_zdfexp} to be \forcode{.false.} in the \nam{zdf} namelist.1292 This option can be invoked by setting \np{ln_drgimp}{ln\_drgimp} to \forcode{.true.} in the \nam{drg}{drg} namelist. 1293 %This option requires \np{ln_zdfexp}{ln\_zdfexp} to be \forcode{.false.} in the \nam{zdf}{zdf} namelist. 1130 1294 1131 1295 This implementation is performed in \mdl{dynzdf} where the following boundary conditions are set while solving the fully implicit diffusion step: … … 1133 1297 At the top (below an ice shelf cavity): 1134 1298 \[ 1135 % \label{eq: dynzdf_drg_top}1299 % \label{eq:ZDF_dynZDF__drg_top} 1136 1300 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{t} 1137 1301 = c_{t}^{\textbf{U}}\textbf{u}^{n+1}_{t} … … 1140 1304 At the bottom (above the sea floor): 1141 1305 \[ 1142 % \label{eq: dynzdf_drg_bot}1306 % \label{eq:ZDF_dynZDF__drg_bot} 1143 1307 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{b} 1144 1308 = c_{b}^{\textbf{U}}\textbf{u}^{n+1}_{b} … … 1148 1312 Superscript $n+1$ means the velocity used in the friction formula is to be calculated, so it is implicit. 1149 1313 1150 % ------------------------------------------------------------------------------------------------------------- 1151 % Bottom Friction with split-explicit free surface 1152 % ------------------------------------------------------------------------------------------------------------- 1153 \subsection[Bottom friction with split-explicit free surface] 1154 {Bottom friction with split-explicit free surface} 1155 \label{subsec:ZDF_drg_ts} 1156 1157 With split-explicit free surface, the sub-stepping of barotropic equations needs the knowledge of top/bottom stresses. An obvious way to satisfy this is to take them as constant over the course of the barotropic integration and equal to the value used to update the baroclinic momentum trend. Provided \np{ln\_drgimp}\forcode{= .false.} and a centred or \textit{leap-frog} like integration of barotropic equations is used (\ie\ \forcode{ln_bt_fw = .false.}, cf \autoref{subsec:DYN_spg_ts}), this does ensure that barotropic and baroclinic dynamics feel the same stresses during one leapfrog time step. However, if \np{ln\_drgimp}\forcode{= .true.}, stresses depend on the \textit{after} value of the velocities which themselves depend on the barotropic iteration result. This cyclic dependency makes difficult obtaining consistent stresses in 2d and 3d dynamics. Part of this mismatch is then removed when setting the final barotropic component of 3d velocities to the time splitting estimate. This last step can be seen as a necessary evil but should be minimized since it interferes with the adjustment to the boundary conditions. 1314 %% ================================================================================================= 1315 \subsection[Bottom friction with split-explicit free surface]{Bottom friction with split-explicit free surface} 1316 \label{subsec:ZDF_drg_ts} 1317 1318 With split-explicit free surface, the sub-stepping of barotropic equations needs the knowledge of top/bottom stresses. An obvious way to satisfy this is to take them as constant over the course of the barotropic integration and equal to the value used to update the baroclinic momentum trend. Provided \np[=.false.]{ln_drgimp}{ln\_drgimp} and a centred or \textit{leap-frog} like integration of barotropic equations is used (\ie\ \forcode{ln_bt_fw=.false.}, cf \autoref{subsec:DYN_spg_ts}), this does ensure that barotropic and baroclinic dynamics feel the same stresses during one leapfrog time step. However, if \np[=.true.]{ln_drgimp}{ln\_drgimp}, stresses depend on the \textit{after} value of the velocities which themselves depend on the barotropic iteration result. This cyclic dependency makes difficult obtaining consistent stresses in 2d and 3d dynamics. Part of this mismatch is then removed when setting the final barotropic component of 3d velocities to the time splitting estimate. This last step can be seen as a necessary evil but should be minimized since it interferes with the adjustment to the boundary conditions. 1158 1319 1159 1320 The strategy to handle top/bottom stresses with split-explicit free surface in \NEMO\ is as follows: … … 1165 1326 Note that other strategies are possible, like considering vertical diffusion step in advance, \ie\ prior barotropic integration. 1166 1327 1167 1168 % ================================================================ 1169 % Internal wave-driven mixing 1170 % ================================================================ 1171 \section[Internal wave-driven mixing (\forcode{ln_zdfiwm = .true.})] 1172 {Internal wave-driven mixing (\protect\np{ln\_zdfiwm}\forcode{ = .true.})} 1328 %% ================================================================================================= 1329 \section[Internal wave-driven mixing (\forcode{ln_zdfiwm})]{Internal wave-driven mixing (\protect\np{ln_zdfiwm}{ln\_zdfiwm})} 1173 1330 \label{subsec:ZDF_tmx_new} 1174 1331 1175 %--------------------------------------------namzdf_iwm------------------------------------------ 1176 % 1177 \nlst{namzdf_iwm} 1178 %-------------------------------------------------------------------------------------------------------------- 1332 \begin{listing} 1333 \nlst{namzdf_iwm} 1334 \caption{\forcode{&namzdf_iwm}} 1335 \label{lst:namzdf_iwm} 1336 \end{listing} 1179 1337 1180 1338 The parameterization of mixing induced by breaking internal waves is a generalization of … … 1183 1341 and the resulting diffusivity is obtained as 1184 1342 \[ 1185 % \label{eq: Kwave}1343 % \label{eq:ZDF_Kwave} 1186 1344 A^{vT}_{wave} = R_f \,\frac{ \epsilon }{ \rho \, N^2 } 1187 1345 \] 1188 1346 where $R_f$ is the mixing efficiency and $\epsilon$ is a specified three dimensional distribution of 1189 1347 the energy available for mixing. 1190 If the \np{ln \_mevar} namelist parameter is set to \forcode{.false.}, the mixing efficiency is taken as constant and1348 If the \np{ln_mevar}{ln\_mevar} namelist parameter is set to \forcode{.false.}, the mixing efficiency is taken as constant and 1191 1349 equal to 1/6 \citep{osborn_JPO80}. 1192 1350 In the opposite (recommended) case, $R_f$ is instead a function of … … 1198 1356 1199 1357 In addition to the mixing efficiency, the ratio of salt to heat diffusivities can chosen to vary 1200 as a function of $Re_b$ by setting the \np{ln \_tsdiff} parameter to \forcode{.true.}, a recommended choice.1358 as a function of $Re_b$ by setting the \np{ln_tsdiff}{ln\_tsdiff} parameter to \forcode{.true.}, a recommended choice. 1201 1359 This parameterization of differential mixing, due to \cite{jackson.rehmann_JPO14}, 1202 1360 is implemented as in \cite{de-lavergne.madec.ea_JPO16}. … … 1216 1374 h_{wkb} = H \, \frac{ \int_{-H}^{z} N \, dz' } { \int_{-H}^{\eta} N \, dz' } \; , 1217 1375 \] 1218 The $n_p$ parameter (given by \np{nn \_zpyc} in \nam{zdf\_iwm} namelist)1376 The $n_p$ parameter (given by \np{nn_zpyc}{nn\_zpyc} in \nam{zdf_iwm}{zdf\_iwm} namelist) 1219 1377 controls the stratification-dependence of the pycnocline-intensified dissipation. 1220 1378 It can take values of $1$ (recommended) or $2$. … … 1224 1382 $h_{bot}$ is a function of the energy flux $E_{bot}$, the characteristic horizontal scale of 1225 1383 the abyssal hill topography \citep{goff_JGR10} and the latitude. 1226 %1227 1384 % Jc: input files names ? 1228 1385 1229 % ================================================================ 1230 % surface wave-induced mixing 1231 % ================================================================ 1232 \section[Surface wave-induced mixing (\forcode{ln_zdfswm = .true.})] 1233 {Surface wave-induced mixing (\protect\np{ln\_zdfswm}\forcode{ = .true.})} 1386 %% ================================================================================================= 1387 \section[Surface wave-induced mixing (\forcode{ln_zdfswm})]{Surface wave-induced mixing (\protect\np{ln_zdfswm}{ln\_zdfswm})} 1234 1388 \label{subsec:ZDF_swm} 1235 1389 … … 1242 1396 1243 1397 \begin{equation} 1244 \label{eq: Bv}1398 \label{eq:ZDF_Bv} 1245 1399 B_{v} = \alpha {A} {U}_{st} {exp(3kz)} 1246 1400 \end{equation} … … 1254 1408 and diffusivity coefficients. 1255 1409 1256 In order to account for this contribution set: \forcode{ln_zdfswm =.true.},1257 then wave interaction has to be activated through \forcode{ln_wave =.true.},1258 the Stokes Drift can be evaluated by setting \forcode{ln_sdw =.true.}1410 In order to account for this contribution set: \forcode{ln_zdfswm=.true.}, 1411 then wave interaction has to be activated through \forcode{ln_wave=.true.}, 1412 the Stokes Drift can be evaluated by setting \forcode{ln_sdw=.true.} 1259 1413 (see \autoref{subsec:SBC_wave_sdw}) 1260 1414 and the needed wave fields can be provided either in forcing or coupled mode 1261 1415 (for more information on wave parameters and settings see \autoref{sec:SBC_wave}) 1262 1416 1263 % ================================================================ 1264 % Adaptive-implicit vertical advection 1265 % ================================================================ 1266 \section[Adaptive-implicit vertical advection (\forcode{ln_zad_Aimp = .true.})] 1267 {Adaptive-implicit vertical advection(\protect\np{ln\_zad\_Aimp}\forcode{ = .true.})} 1417 %% ================================================================================================= 1418 \section[Adaptive-implicit vertical advection (\forcode{ln_zad_Aimp})]{Adaptive-implicit vertical advection(\protect\np{ln_zad_Aimp}{ln\_zad\_Aimp})} 1268 1419 \label{subsec:ZDF_aimp} 1269 1420 … … 1276 1427 criteria for a range of advection schemes. The values for the Leap-Frog with Robert 1277 1428 asselin filter time-stepping (as used in NEMO) are reproduced in 1278 \autoref{tab: zad_Aimp_CFLcrit}. Treating the vertical advection implicitly can avoid these1429 \autoref{tab:ZDF_zad_Aimp_CFLcrit}. Treating the vertical advection implicitly can avoid these 1279 1430 restrictions but at the cost of large dispersive errors and, possibly, large numerical 1280 1431 viscosity. The adaptive-implicit vertical advection option provides a targetted use of the … … 1283 1434 interest or due to short-lived conditions such that the extra numerical diffusion or 1284 1435 viscosity does not greatly affect the overall solution. With such applications, setting: 1285 \forcode{ln_zad_Aimp =.true.} should allow much longer model timesteps to be used whilst1436 \forcode{ln_zad_Aimp=.true.} should allow much longer model timesteps to be used whilst 1286 1437 retaining the accuracy of the high order explicit schemes over most of the domain. 1287 1438 1288 1439 \begin{table}[htbp] 1289 \begin{center} 1290 % \begin{tabular}{cp{70pt}cp{70pt}cp{70pt}cp{70pt}} 1291 \begin{tabular}{r|ccc} 1292 \hline 1293 spatial discretization & 2nd order centered & 3rd order upwind & 4th order compact \\ 1294 advective CFL criterion & 0.904 & 0.472 & 0.522 \\ 1295 \hline 1296 \end{tabular} 1297 \caption{ 1298 \protect\label{tab:zad_Aimp_CFLcrit} 1299 The advective CFL criteria for a range of spatial discretizations for the Leap-Frog with Robert Asselin filter time-stepping 1300 ($\nu=0.1$) as given in \citep{lemarie.debreu.ea_OM15}. 1301 } 1302 \end{center} 1440 \centering 1441 % \begin{tabular}{cp{70pt}cp{70pt}cp{70pt}cp{70pt}} 1442 \begin{tabular}{r|ccc} 1443 \hline 1444 spatial discretization & 2$^nd$ order centered & 3$^rd$ order upwind & 4$^th$ order compact \\ 1445 advective CFL criterion & 0.904 & 0.472 & 0.522 \\ 1446 \hline 1447 \end{tabular} 1448 \caption[Advective CFL criteria for the leapfrog with Robert Asselin filter time-stepping]{ 1449 The advective CFL criteria for a range of spatial discretizations for 1450 the leapfrog with Robert Asselin filter time-stepping 1451 ($\nu=0.1$) as given in \citep{lemarie.debreu.ea_OM15}.} 1452 \label{tab:ZDF_zad_Aimp_CFLcrit} 1303 1453 \end{table} 1304 1454 … … 1313 1463 1314 1464 \begin{equation} 1315 \label{eq: Eqn_zad_Aimp_Courant}1465 \label{eq:ZDF_Eqn_zad_Aimp_Courant} 1316 1466 \begin{split} 1317 1467 Cu &= {2 \rdt \over e^n_{3t_{ijk}}} \bigg (\big [ \texttt{Max}(w^n_{ijk},0.0) - \texttt{Min}(w^n_{ijk+1},0.0) \big ] \\ … … 1326 1476 1327 1477 \begin{align} 1328 \label{eq: Eqn_zad_Aimp_partition}1478 \label{eq:ZDF_Eqn_zad_Aimp_partition} 1329 1479 Cu_{min} &= 0.15 \nonumber \\ 1330 1480 Cu_{max} &= 0.3 \nonumber \\ 1331 1481 Cu_{cut} &= 2Cu_{max} - Cu_{min} \nonumber \\ 1332 1482 Fcu &= 4Cu_{max}*(Cu_{max}-Cu_{min}) \nonumber \\ 1333 C\kern-0.14emf &=1483 \cf &= 1334 1484 \begin{cases} 1335 1485 0.0 &\text{if $Cu \leq Cu_{min}$} \\ … … 1340 1490 1341 1491 \begin{figure}[!t] 1342 \begin{center} 1343 \includegraphics[width=\textwidth]{Fig_ZDF_zad_Aimp_coeff} 1344 \caption{ 1345 \protect\label{fig:zad_Aimp_coeff} 1346 The value of the partitioning coefficient ($C\kern-0.14em f$) used to partition vertical velocities into parts to 1347 be treated implicitly and explicitly for a range of typical Courant numbers (\forcode{ln_zad_Aimp=.true.}) 1348 } 1349 \end{center} 1492 \centering 1493 \includegraphics[width=0.66\textwidth]{Fig_ZDF_zad_Aimp_coeff} 1494 \caption[Partitioning coefficient used to partition vertical velocities into parts]{ 1495 The value of the partitioning coefficient (\cf) used to partition vertical velocities into 1496 parts to be treated implicitly and explicitly for a range of typical Courant numbers 1497 (\forcode{ln_zad_Aimp=.true.}).} 1498 \label{fig:ZDF_zad_Aimp_coeff} 1350 1499 \end{figure} 1351 1500 … … 1355 1504 1356 1505 \begin{align} 1357 \label{eq: Eqn_zad_Aimp_partition2}1358 w_{i_{ijk}} &= C\kern-0.14emf_{ijk} w_{n_{ijk}} \nonumber \\1359 w_{n_{ijk}} &= (1- C\kern-0.14em f_{ijk}) w_{n_{ijk}}1506 \label{eq:ZDF_Eqn_zad_Aimp_partition2} 1507 w_{i_{ijk}} &= \cf_{ijk} w_{n_{ijk}} \nonumber \\ 1508 w_{n_{ijk}} &= (1-\cf_{ijk}) w_{n_{ijk}} 1360 1509 \end{align} 1361 1510 1362 1511 \noindent Note that the coefficient is such that the treatment is never fully implicit; 1363 the three cases from \autoref{eq: Eqn_zad_Aimp_partition} can be considered as:1512 the three cases from \autoref{eq:ZDF_Eqn_zad_Aimp_partition} can be considered as: 1364 1513 fully-explicit; mixed explicit/implicit and mostly-implicit. With the settings shown the 1365 coefficient ( $C\kern-0.14em f$) varies as shown in \autoref{fig:zad_Aimp_coeff}. Note with these values1514 coefficient (\cf) varies as shown in \autoref{fig:ZDF_zad_Aimp_coeff}. Note with these values 1366 1515 the $Cu_{cut}$ boundary between the mixed implicit-explicit treatment and 'mostly 1367 1516 implicit' is 0.45 which is just below the stability limited given in 1368 \autoref{tab: zad_Aimp_CFLcrit} for a 3rd order scheme.1517 \autoref{tab:ZDF_zad_Aimp_CFLcrit} for a 3rd order scheme. 1369 1518 1370 1519 The $w_i$ component is added to the implicit solvers for the vertical mixing in … … 1376 1525 vertical fluxes are then removed since they are added by the implicit solver later on. 1377 1526 1378 The adaptive-implicit vertical advection option is new to NEMO at v4.0 and has yet to be 1527 The adaptive-implicit vertical advection option is new to NEMO at v4.0 and has yet to be 1379 1528 used in a wide range of simulations. The following test simulation, however, does illustrate 1380 1529 the potential benefits and will hopefully encourage further testing and feedback from users: 1381 1530 1382 1531 \begin{figure}[!t] 1383 \begin{center} 1384 \includegraphics[width=\textwidth]{Fig_ZDF_zad_Aimp_overflow_frames} 1385 \caption{ 1386 \protect\label{fig:zad_Aimp_overflow_frames} 1387 A time-series of temperature vertical cross-sections for the OVERFLOW test case. These results are for the default 1388 settings with \forcode{nn_rdt=10.0} and without adaptive implicit vertical advection (\forcode{ln_zad_Aimp=.false.}). 1389 } 1390 \end{center} 1532 \centering 1533 \includegraphics[width=0.66\textwidth]{Fig_ZDF_zad_Aimp_overflow_frames} 1534 \caption[OVERFLOW: time-series of temperature vertical cross-sections]{ 1535 A time-series of temperature vertical cross-sections for the OVERFLOW test case. 1536 These results are for the default settings with \forcode{nn_rdt=10.0} and 1537 without adaptive implicit vertical advection (\forcode{ln_zad_Aimp=.false.}).} 1538 \label{fig:ZDF_zad_Aimp_overflow_frames} 1391 1539 \end{figure} 1392 1540 1541 %% ================================================================================================= 1393 1542 \subsection{Adaptive-implicit vertical advection in the OVERFLOW test-case} 1543 1394 1544 The \href{https://forge.ipsl.jussieu.fr/nemo/chrome/site/doc/NEMO/guide/html/test\_cases.html\#overflow}{OVERFLOW test case} 1395 1545 provides a simple illustration of the adaptive-implicit advection in action. The example here differs from the basic test case … … 1407 1557 1408 1558 \noindent which were chosen to provide a slightly more stable and less noisy solution. The 1409 result when using the default value of \forcode{nn_rdt =10.} without adaptive-implicit1410 vertical velocity is illustrated in \autoref{fig: zad_Aimp_overflow_frames}. The mass of1559 result when using the default value of \forcode{nn_rdt=10.} without adaptive-implicit 1560 vertical velocity is illustrated in \autoref{fig:ZDF_zad_Aimp_overflow_frames}. The mass of 1411 1561 cold water, initially sitting on the shelf, moves down the slope and forms a 1412 1562 bottom-trapped, dense plume. Even with these extra physics choices the model is close to 1413 stability limits and attempts with \forcode{nn_rdt =30.} will fail after about 5.5 hours1563 stability limits and attempts with \forcode{nn_rdt=30.} will fail after about 5.5 hours 1414 1564 with excessively high horizontal velocities. This time-scale corresponds with the time the 1415 1565 plume reaches the steepest part of the topography and, although detected as a horizontal … … 1418 1568 1419 1569 The results with \forcode{ln_zad_Aimp=.true.} and a variety of model timesteps 1420 are shown in \autoref{fig: zad_Aimp_overflow_all_rdt} (together with the equivalent1570 are shown in \autoref{fig:ZDF_zad_Aimp_overflow_all_rdt} (together with the equivalent 1421 1571 frames from the base run). In this simple example the use of the adaptive-implicit 1422 1572 vertcal advection scheme has enabled a 12x increase in the model timestep without 1423 1573 significantly altering the solution (although at this extreme the plume is more diffuse 1424 1574 and has not travelled so far). Notably, the solution with and without the scheme is 1425 slightly different even with \forcode{nn_rdt =10.}; suggesting that the base run was1575 slightly different even with \forcode{nn_rdt=10.}; suggesting that the base run was 1426 1576 close enough to instability to trigger the scheme despite completing successfully. 1427 1577 To assist in diagnosing how active the scheme is, in both location and time, the 3D 1428 1578 implicit and explicit components of the vertical velocity are available via XIOS as 1429 1579 \texttt{wimp} and \texttt{wexp} respectively. Likewise, the partitioning coefficient 1430 ( $C\kern-0.14em f$) is also available as \texttt{wi\_cff}. For a quick oversight of1580 (\cf) is also available as \texttt{wi\_cff}. For a quick oversight of 1431 1581 the schemes activity the global maximum values of the absolute implicit component 1432 1582 of the vertical velocity and the partitioning coefficient are written to the netCDF … … 1434 1584 \autoref{sec:MISC_opt} for activation details). 1435 1585 1436 \autoref{fig: zad_Aimp_maxCf} shows examples of the maximum partitioning coefficient for1586 \autoref{fig:ZDF_zad_Aimp_maxCf} shows examples of the maximum partitioning coefficient for 1437 1587 the various overflow tests. Note that the adaptive-implicit vertical advection scheme is 1438 1588 active even in the base run with \forcode{nn_rdt=10.0s} adding to the evidence that the … … 1441 1591 oscillatory nature of this measure appears to be linked to the progress of the plume front 1442 1592 as each cusp is associated with the location of the maximum shifting to the adjacent cell. 1443 This is illustrated in \autoref{fig: zad_Aimp_maxCf_loc} where the i- and k- locations of the1593 This is illustrated in \autoref{fig:ZDF_zad_Aimp_maxCf_loc} where the i- and k- locations of the 1444 1594 maximum have been overlaid for the base run case. 1445 1595 … … 1460 1610 1461 1611 \begin{figure}[!t] 1462 \ begin{center}1463 \includegraphics[width=\textwidth]{Fig_ZDF_zad_Aimp_overflow_all_rdt}1464 \caption{1465 \protect\label{fig:zad_Aimp_overflow_all_rdt}1466 Sample temperature vertical cross-sections from mid- and end-run using different values for \forcode{nn_rdt}1467 and with or without adaptive implicit vertical advection. Without the adaptive implicit vertical advection only1468 the run with the shortest timestep is able to run to completion. Note also that the colour-scale has been1469 chosen to confirm that temperatures remain within the original range of 10$^o$ to 20$^o$.1470 }1471 \ end{center}1612 \centering 1613 \includegraphics[width=0.66\textwidth]{Fig_ZDF_zad_Aimp_overflow_all_rdt} 1614 \caption[OVERFLOW: sample temperature vertical cross-sections from mid- and end-run]{ 1615 Sample temperature vertical cross-sections from mid- and end-run using 1616 different values for \forcode{nn_rdt} and with or without adaptive implicit vertical advection. 1617 Without the adaptive implicit vertical advection 1618 only the run with the shortest timestep is able to run to completion. 1619 Note also that the colour-scale has been chosen to confirm that 1620 temperatures remain within the original range of 10$^o$ to 20$^o$.} 1621 \label{fig:ZDF_zad_Aimp_overflow_all_rdt} 1472 1622 \end{figure} 1473 1623 1474 1624 \begin{figure}[!t] 1475 \begin{center} 1476 \includegraphics[width=\textwidth]{Fig_ZDF_zad_Aimp_maxCf} 1477 \caption{ 1478 \protect\label{fig:zad_Aimp_maxCf} 1479 The maximum partitioning coefficient during a series of test runs with increasing model timestep length. 1480 At the larger timesteps, the vertical velocity is treated mostly implicitly at some location throughout 1481 the run. 1482 } 1483 \end{center} 1625 \centering 1626 \includegraphics[width=0.66\textwidth]{Fig_ZDF_zad_Aimp_maxCf} 1627 \caption[OVERFLOW: maximum partitioning coefficient during a series of test runs]{ 1628 The maximum partitioning coefficient during a series of test runs with 1629 increasing model timestep length. 1630 At the larger timesteps, 1631 the vertical velocity is treated mostly implicitly at some location throughout the run.} 1632 \label{fig:ZDF_zad_Aimp_maxCf} 1484 1633 \end{figure} 1485 1634 1486 1635 \begin{figure}[!t] 1487 \begin{center} 1488 \includegraphics[width=\textwidth]{Fig_ZDF_zad_Aimp_maxCf_loc} 1489 \caption{ 1490 \protect\label{fig:zad_Aimp_maxCf_loc} 1491 The maximum partitioning coefficient for the \forcode{nn_rdt=10.0s} case overlaid with information on the gridcell i- and k- 1492 locations of the maximum value. 1493 } 1494 \end{center} 1636 \centering 1637 \includegraphics[width=0.66\textwidth]{Fig_ZDF_zad_Aimp_maxCf_loc} 1638 \caption[OVERFLOW: maximum partitioning coefficient for the case overlaid]{ 1639 The maximum partitioning coefficient for the \forcode{nn_rdt=10.0} case overlaid with 1640 information on the gridcell i- and k-locations of the maximum value.} 1641 \label{fig:ZDF_zad_Aimp_maxCf_loc} 1495 1642 \end{figure} 1496 1643 1497 % ================================================================ 1498 1499 \biblio 1500 1501 \pindex 1644 \onlyinsubfile{\input{../../global/epilogue}} 1502 1645 1503 1646 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_conservation.tex
r11435 r11799 3 3 \begin{document} 4 4 5 % ================================================================6 % Invariant of the Equations7 % ================================================================8 5 \chapter{Invariants of the Primitive Equations} 9 \label{chap:Invariant} 6 \label{chap:CONS} 7 8 \thispagestyle{plain} 9 10 10 \chaptertoc 11 12 \paragraph{Changes record} ~\\ 13 14 {\footnotesize 15 \begin{tabularx}{\textwidth}{l||X|X} 16 Release & Author(s) & Modifications \\ 17 \hline 18 {\em 4.0} & {\em ...} & {\em ...} \\ 19 {\em 3.6} & {\em ...} & {\em ...} \\ 20 {\em 3.4} & {\em ...} & {\em ...} \\ 21 {\em <=3.4} & {\em ...} & {\em ...} 22 \end{tabularx} 23 } 24 25 \clearpage 11 26 12 27 The continuous equations of motion have many analytic properties. … … 41 56 \citep{Marti1992?, Levy1996?, Levy1998?}. 42 57 43 % ------------------------------------------------------------------------------------------------------------- 44 % Conservation Properties on Ocean Dynamics 45 % ------------------------------------------------------------------------------------------------------------- 58 %% ================================================================================================= 46 59 \section{Conservation properties on ocean dynamics} 47 \label{sec: Invariant_dyn}60 \label{sec:CONS_Invariant_dyn} 48 61 49 62 The non linear term of the momentum equations has been split into a vorticity term, … … 63 76 The continuous formulation of the vorticity term satisfies following integral constraints: 64 77 \[ 65 % \label{eq: vor_vorticity}78 % \label{eq:CONS_vor_vorticity} 66 79 \int_D {{\textbf {k}}\cdot \frac{1}{e_3 }\nabla \times \left( {\varsigma 67 80 \;{\mathrm {\mathbf k}}\times {\textbf {U}}_h } \right)\;dv} =0 … … 69 82 70 83 \[ 71 % \label{eq: vor_enstrophy}84 % \label{eq:CONS_vor_enstrophy} 72 85 if\quad \chi =0\quad \quad \int\limits_D {\varsigma \;{\textbf{k}}\cdot 73 86 \frac{1}{e_3 }\nabla \times \left( {\varsigma {\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =-\int\limits_D {\frac{1}{2}\varsigma ^2\,\chi \;dv} … … 76 89 77 90 \[ 78 % \label{eq: vor_energy}91 % \label{eq:CONS_vor_energy} 79 92 \int_D {{\textbf{U}}_h \times \left( {\varsigma \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =0 80 93 \] … … 88 101 Using the symmetry or anti-symmetry properties of the operators (Eqs II.1.10 and 11), 89 102 it can be shown that the scheme (II.2.11) satisfies (II.4.1b) but not (II.4.1c), 90 while scheme (II.2.12) satisfies (II.4.1c) but not (II.4.1b) (see appendix C). 103 while scheme (II.2.12) satisfies (II.4.1c) but not (II.4.1b) (see appendix C). 91 104 Note that the enstrophy conserving scheme on total vorticity has been chosen as the standard discrete form of 92 105 the vorticity term. … … 102 115 the horizontal gradient of horizontal kinetic energy: 103 116 104 \begin{equation} \label{eq: keg_zad}105 \int_D {{\textbf{U}}_h \cdot \nabla _h \left( {1/2\;{\textbf{U}}_h ^2} \right)\;dv} =-\int_D {{\textbf{U}}_h \cdot \frac{w}{e_3 }\;\frac{\partial 117 \begin{equation} \label{eq:CONS_keg_zad} 118 \int_D {{\textbf{U}}_h \cdot \nabla _h \left( {1/2\;{\textbf{U}}_h ^2} \right)\;dv} =-\int_D {{\textbf{U}}_h \cdot \frac{w}{e_3 }\;\frac{\partial 106 119 {\textbf{U}}_h }{\partial k}\;dv} 107 120 \end{equation} 108 121 109 122 Using the discrete form given in {\S}II.2-a and the symmetry or anti-symmetry properties of 110 the mean and difference operators, \autoref{eq: keg_zad} is demonstrated in the Appendix C.111 The main point here is that satisfying \autoref{eq: keg_zad} links the choice of the discrete forms of123 the mean and difference operators, \autoref{eq:CONS_keg_zad} is demonstrated in the Appendix C. 124 The main point here is that satisfying \autoref{eq:CONS_keg_zad} links the choice of the discrete forms of 112 125 the vertical advection and of the horizontal gradient of horizontal kinetic energy. 113 126 Choosing one imposes the other. … … 127 140 128 141 \[ 129 % \label{eq: hpg_pe}142 % \label{eq:CONS_hpg_pe} 130 143 \int_D {-\frac{1}{\rho_o }\left. {\nabla p^h} \right|_z \cdot {\textbf {U}}_h \;dv} \;=\;\int_D {\nabla .\left( {\rho \,{\textbf{U}}} \right)\;g\;z\;\;dv} 131 144 \] … … 133 146 Using the discrete form given in {\S}~II.2-a and the symmetry or anti-symmetry properties of 134 147 the mean and difference operators, (II.4.3) is demonstrated in the Appendix C. 135 The main point here is that satisfying (II.4.3) strongly constraints the discrete expression of the depth of 148 The main point here is that satisfying (II.4.3) strongly constraints the discrete expression of the depth of 136 149 $T$-points and of the term added to the pressure gradient in $s-$coordinates: the depth of a $T$-point, $z_T$, 137 150 is defined as the sum the vertical scale factors at $w$-points starting from the surface. … … 145 158 Nevertheless, the $\psi$-equation is solved numerically by an iterative solver (see {\S}~III.5), 146 159 thus the property is only satisfied with the accuracy required on the solver. 147 In addition, with the rigid-lid approximation, the change of horizontal kinetic energy due to the work of 160 In addition, with the rigid-lid approximation, the change of horizontal kinetic energy due to the work of 148 161 surface pressure forces is exactly zero: 149 162 \[ 150 % \label{eq: spg}163 % \label{eq:CONS_spg} 151 164 \int_D {-\frac{1}{\rho_o }\nabla _h } \left( {p_s } \right)\cdot {\textbf{U}}_h \;dv=0 152 165 \] … … 157 170 otherwise there is no guarantee that the surface pressure force work vanishes. 158 171 159 % ------------------------------------------------------------------------------------------------------------- 160 % Conservation Properties on Ocean Thermodynamics 161 % ------------------------------------------------------------------------------------------------------------- 172 %% ================================================================================================= 162 173 \section{Conservation properties on ocean thermodynamics} 163 \label{sec: Invariant_tra}174 \label{sec:CONS_Invariant_tra} 164 175 165 176 In continuous formulation, the advective terms of the tracer equations conserve the tracer content and 166 177 the quadratic form of the tracer, \ie 167 178 \[ 168 % \label{eq: tra_tra2}179 % \label{eq:CONS_tra_tra2} 169 180 \int_D {\nabla .\left( {T\;{\textbf{U}}} \right)\;dv} =0 170 181 \;\text{and} … … 176 187 Note that in both continuous and discrete formulations, there is generally no strict conservation of mass, 177 188 since the equation of state is non linear with respect to $T$ and $S$. 178 In practice, the mass is conserved with a very good accuracy. 179 180 % ------------------------------------------------------------------------------------------------------------- 181 % Conservation Properties on Momentum Physics 182 % ------------------------------------------------------------------------------------------------------------- 189 In practice, the mass is conserved with a very good accuracy. 190 191 %% ================================================================================================= 183 192 \subsection{Conservation properties on momentum physics} 184 \label{subsec: Invariant_dyn_physics}193 \label{subsec:CONS_Invariant_dyn_physics} 185 194 186 195 \textbf{* lateral momentum diffusion term} … … 188 197 The continuous formulation of the horizontal diffusion of momentum satisfies the following integral constraints~: 189 198 \[ 190 % \label{eq: dynldf_dyn}199 % \label{eq:CONS_dynldf_dyn} 191 200 \int\limits_D {\frac{1}{e_3 }{\mathrm {\mathbf k}}\cdot \nabla \times \left[ {\nabla 192 201 _h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left( {A^{lm}\;\zeta … … 195 204 196 205 \[ 197 % \label{eq: dynldf_div}206 % \label{eq:CONS_dynldf_div} 198 207 \int\limits_D {\nabla _h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi } 199 208 \right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\mathrm {\mathbf k}}} \right)} … … 202 211 203 212 \[ 204 % \label{eq: dynldf_curl}213 % \label{eq:CONS_dynldf_curl} 205 214 \int_D {{\mathrm {\mathbf U}}_h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi } 206 215 \right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\mathrm {\mathbf k}}} \right)} … … 209 218 210 219 \[ 211 % \label{eq: dynldf_curl2}220 % \label{eq:CONS_dynldf_curl2} 212 221 \mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\zeta \;{\mathrm {\mathbf k}}\cdot 213 222 \nabla \times \left[ {\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h … … 217 226 218 227 \[ 219 % \label{eq: dynldf_div2}228 % \label{eq:CONS_dynldf_div2} 220 229 \mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\chi \;\nabla _h \cdot \left[ 221 230 {\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left( 222 231 {A^{lm}\;\zeta \;{\mathrm {\mathbf k}}} \right)} \right]\;dv} \leqslant 0 223 232 \] 224 225 233 226 234 (II.4.6a) and (II.4.6b) means that the horizontal diffusion of momentum conserve both the potential vorticity and … … 250 258 251 259 \[ 252 % \label{eq: dynzdf_dyn}260 % \label{eq:CONS_dynzdf_dyn} 253 261 \begin{aligned} 254 262 & \int_D {\frac{1}{e_3 }} \frac{\partial }{\partial k}\left( \frac{A^{vm}}{e_3 }\frac{\partial {\textbf{U}}_h }{\partial k} \right) \;dv = \overrightarrow{\textbf{0}} \\ … … 258 266 conservation of vorticity, dissipation of enstrophy 259 267 \[ 260 % \label{eq: dynzdf_vor}268 % \label{eq:CONS_dynzdf_vor} 261 269 \begin{aligned} 262 270 & \int_D {\frac{1}{e_3 }{\mathrm {\mathbf k}}\cdot \nabla \times \left( {\frac{1}{e_3 … … 270 278 conservation of horizontal divergence, dissipation of square of the horizontal divergence 271 279 \[ 272 % \label{eq: dynzdf_div}280 % \label{eq:CONS_dynzdf_div} 273 281 \begin{aligned} 274 282 &\int_D {\nabla \cdot \left( {\frac{1}{e_3 }\frac{\partial }{\partial … … 285 293 \ie\ the vertical momentum physics conserve momentum, potential vorticity, and horizontal divergence. 286 294 287 % ------------------------------------------------------------------------------------------------------------- 288 % Conservation Properties on Tracer Physics 289 % ------------------------------------------------------------------------------------------------------------- 295 %% ================================================================================================= 290 296 \subsection{Conservation properties on tracer physics} 291 \label{subsec: Invariant_tra_physics}297 \label{subsec:CONS_Invariant_tra_physics} 292 298 293 299 The numerical schemes used for tracer subgridscale physics are written in such a way that … … 296 302 the quadratic form of these quantities (\ie\ their variance) globally tends to diminish. 297 303 As for the advective term, there is generally no strict conservation of mass even if, 298 in practice, the mass is conserved with a very good accuracy. 299 300 \textbf{* lateral physics: }conservation of tracer, dissipation of tracer 304 in practice, the mass is conserved with a very good accuracy. 305 306 \textbf{* lateral physics: }conservation of tracer, dissipation of tracer 301 307 variance, i.e. 302 308 303 309 \[ 304 % \label{eq: traldf_t_t2}310 % \label{eq:CONS_traldf_t_t2} 305 311 \begin{aligned} 306 312 &\int_D \nabla\, \cdot\, \left( A^{lT} \,\Re \,\nabla \,T \right)\;dv = 0 \\ … … 312 318 313 319 \[ 314 % \label{eq: trazdf_t_t2}320 % \label{eq:CONS_trazdf_t_t2} 315 321 \begin{aligned} 316 322 & \int_D \frac{1}{e_3 } \frac{\partial }{\partial k}\left( \frac{A^{vT}}{e_3 } \frac{\partial T}{\partial k} \right)\;dv = 0 \\ … … 328 334 It has not been implemented. 329 335 330 \biblio 331 332 \pindex 336 \onlyinsubfile{\input{../../global/epilogue}} 333 337 334 338 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_misc.tex
r11435 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter --- Miscellaneous Topics 6 % ================================================================ 4 7 5 \chapter{Miscellaneous Topics} 8 6 \label{chap:MISC} 9 7 8 \thispagestyle{plain} 9 10 10 \chaptertoc 11 11 12 \newpage 13 14 % ================================================================ 15 % Representation of Unresolved Straits 16 % ================================================================ 12 \paragraph{Changes record} ~\\ 13 14 {\footnotesize 15 \begin{tabularx}{\textwidth}{l||X|X} 16 Release & Author(s) & Modifications \\ 17 \hline 18 {\em 4.0} & {\em ...} & {\em ...} \\ 19 {\em 3.6} & {\em ...} & {\em ...} \\ 20 {\em 3.4} & {\em ...} & {\em ...} \\ 21 {\em <=3.4} & {\em ...} & {\em ...} 22 \end{tabularx} 23 } 24 25 \clearpage 26 27 %% ================================================================================================= 17 28 \section{Representation of unresolved straits} 18 29 \label{sec:MISC_strait} … … 27 38 balance the net evaporation occurring over the Mediterranean region. 28 39 This problem occurs even in eddy permitting simulations. 29 For example, in ORCA 1/4\deg several straits of the Indonesian archipelago (Ombai, Lombok...)40 For example, in ORCA 1/4\deg\ several straits of the Indonesian archipelago (Ombai, Lombok...) 30 41 are much narrow than even a single ocean grid-point. 31 42 … … 36 47 lateral friction. 37 48 38 % ------------------------------------------------------------------------------------------------------------- 39 % Hand made geometry changes 40 % ------------------------------------------------------------------------------------------------------------- 49 %% ================================================================================================= 41 50 \subsection{Hand made geometry changes} 42 51 \label{subsec:MISC_strait_hand} … … 53 62 \begin{itemize} 54 63 55 \item Add \texttt{e1e2u} and \texttt{e1e2v} arrays to the \np{cn \_domcfg} file. These 2D64 \item Add \texttt{e1e2u} and \texttt{e1e2v} arrays to the \np{cn_domcfg}{cn\_domcfg} file. These 2D 56 65 arrays should contain the products of the unaltered values of: $\texttt{e1u}*\texttt{e2u}$ 57 66 and $\texttt{e1u}*\texttt{e2v}$ respectively. That is the original surface areas of $u$- 58 67 and $v$- cells respectively. These areas are usually defined by the corresponding product 59 68 within the \NEMO\ code but the presence of \texttt{e1e2u} and \texttt{e1e2v} in the 60 \np{cn \_domcfg} file will suppress this calculation and use the supplied fields instead.69 \np{cn_domcfg}{cn\_domcfg} file will suppress this calculation and use the supplied fields instead. 61 70 If the model domain is provided by user-supplied code in \mdl{usrdef\_hgr}, then this 62 71 routine should also return \texttt{e1e2u} and \texttt{e1e2v} and set the integer return … … 64 73 will suppress the calculation of the areas. 65 74 66 \item Change values of \texttt{e2u} or \texttt{e1v} (either in the \np{cn \_domcfg} file or75 \item Change values of \texttt{e2u} or \texttt{e1v} (either in the \np{cn_domcfg}{cn\_domcfg} file or 67 76 via code in \mdl{usrdef\_hgr}), whereever a Strait reduction is required. The choice of 68 77 whether to alter \texttt{e2u} or \texttt{e1v} depends. respectively, on whether the … … 71 80 72 81 \end{itemize} 73 74 82 75 83 The second method is to increase the viscous boundary layer thickness by a local increase … … 84 92 \texttt{fmask} for any other configuration. 85 93 86 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>87 94 \begin{figure}[!tbp] 88 \begin{center} 89 \includegraphics[width=\textwidth]{Fig_Gibraltar} 90 \includegraphics[width=\textwidth]{Fig_Gibraltar2} 91 \caption{ 92 \protect\label{fig:MISC_strait_hand} 93 Example of the Gibraltar strait defined in a $1^{\circ} \times 1^{\circ}$ mesh. 94 \textit{Top}: using partially open cells. 95 The meridional scale factor at $v$-point is reduced on both sides of the strait to account for 96 the real width of the strait (about 20 km). 97 Note that the scale factors of the strait $T$-point remains unchanged. 98 \textit{Bottom}: using viscous boundary layers. 99 The four fmask parameters along the strait coastlines are set to a value larger than 4, 100 \ie\ "strong" no-slip case (see \autoref{fig:LBC_shlat}) creating a large viscous boundary layer that 101 allows a reduced transport through the strait. 102 } 103 \end{center} 95 \centering 96 \includegraphics[width=0.66\textwidth]{Fig_Gibraltar} 97 \includegraphics[width=0.66\textwidth]{Fig_Gibraltar2} 98 \caption[Two methods to defined the Gibraltar strait]{ 99 Example of the Gibraltar strait defined in a 1\deg\ $\times$ 1\deg\ mesh. 100 \textit{Top}: using partially open cells. 101 The meridional scale factor at $v$-point is reduced on both sides of the strait to 102 account for the real width of the strait (about 20 km). 103 Note that the scale factors of the strait $T$-point remains unchanged. 104 \textit{Bottom}: using viscous boundary layers. 105 The four fmask parameters along the strait coastlines are set to a value larger than 4, 106 \ie\ "strong" no-slip case (see \autoref{fig:LBC_shlat}) creating a large viscous boundary layer 107 that allows a reduced transport through the strait.} 108 \label{fig:MISC_strait_hand} 104 109 \end{figure} 105 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 106 107 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 110 108 111 \begin{figure}[!tbp] 109 \begin{center} 110 \includegraphics[width=\textwidth]{Fig_closea_mask_example} 111 \caption{ 112 \protect\label{fig:closea_mask_example} 113 Example of mask fields for the closea module. \textit{Left}: a 114 closea\_mask field; \textit{Right}: a closea\_mask\_rnf 115 field. In this example, if ln\_closea is set to .true., the mean 116 freshwater flux over each of the American Great Lakes will be 117 set to zero, and the total residual for all the lakes, if 118 negative, will be put into the St Laurence Seaway in the area 119 shown. 120 } 121 \end{center} 112 \centering 113 \includegraphics[width=0.66\textwidth]{Fig_closea_mask_example} 114 \caption[Mask fields for the \protect\mdl{closea} module]{ 115 Example of mask fields for the \protect\mdl{closea} module. 116 \textit{Left}: a closea\_mask field; 117 \textit{Right}: a closea\_mask\_rnf field. 118 In this example, if \protect\np{ln_closea}{ln\_closea} is set to \forcode{.true.}, 119 the mean freshwater flux over each of the American Great Lakes will be set to zero, 120 and the total residual for all the lakes, if negative, will be put into 121 the St Laurence Seaway in the area shown.} 122 \label{fig:MISC_closea_mask_example} 122 123 \end{figure} 123 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 124 125 % ================================================================ 126 % Closed seas 127 % ================================================================ 128 \section[Closed seas (\textit{closea.F90})] 129 {Closed seas (\protect\mdl{closea})} 124 125 %% ================================================================================================= 126 \section[Closed seas (\textit{closea.F90})]{Closed seas (\protect\mdl{closea})} 130 127 \label{sec:MISC_closea} 131 128 … … 147 144 148 145 \begin{enumerate} 149 \item {{\bfseries No ``closea\_mask'' field is included in domain configuration146 \item {{\bfseries No ``closea\_mask'' field is included in domain configuration 150 147 file.} In this case the closea module does nothing.} 151 148 152 \item {{\bfseries A field called closea\_mask is included in the domain149 \item {{\bfseries A field called closea\_mask is included in the domain 153 150 configuration file and ln\_closea=.false. in namelist namcfg.} In this 154 151 case the inland seas defined by the closea\_mask field are filled in … … 156 153 closea\_mask that is nonzero is set to be a land point.} 157 154 158 \item {{\bfseries A field called closea\_mask is included in the domain155 \item {{\bfseries A field called closea\_mask is included in the domain 159 156 configuration file and ln\_closea=.true. in namelist namcfg.} Each 160 157 inland sea or group of inland seas is set to a positive integer value 161 in the closea\_mask field (see Figure \ref{fig:closea_mask_example}158 in the closea\_mask field (see \autoref{fig:MISC_closea_mask_example} 162 159 for an example). The net surface flux over each inland sea or group of 163 160 inland seas is set to zero each timestep and the residual flux is … … 165 162 closea\_mask is zero).} 166 163 167 \item {{\bfseries Fields called closea\_mask and closea\_mask\_rnf are164 \item {{\bfseries Fields called closea\_mask and closea\_mask\_rnf are 168 165 included in the domain configuration file and ln\_closea=.true. in 169 166 namelist namcfg.} This option works as for option 3, except that if … … 174 171 by the closea\_mask\_rnf field. Each mapping is defined by a positive 175 172 integer value for the inland sea(s) and the corresponding runoff 176 points. An example is given in Figure177 \ ref{fig:closea_mask_example}. If no mapping is provided for a173 points. An example is given in 174 \autoref{fig:MISC_closea_mask_example}. If no mapping is provided for a 178 175 particular inland sea then the residual is spread over the global 179 176 ocean.} 180 177 181 \item {{\bfseries Fields called closea\_mask and closea\_mask\_emp are178 \item {{\bfseries Fields called closea\_mask and closea\_mask\_emp are 182 179 included in the domain configuration file and ln\_closea=.true. in 183 180 namelist namcfg.} This option works the same as option 4 except that … … 191 188 them to the domain configuration file in the utils/tools/DOMAINcfg directory. 192 189 193 % ================================================================ 194 % Sub-Domain Functionality 195 % ================================================================ 190 %% ================================================================================================= 196 191 \section{Sub-domain functionality} 197 192 \label{sec:MISC_zoom} 198 193 194 %% ================================================================================================= 199 195 \subsection{Simple subsetting of input files via NetCDF attributes} 200 196 … … 204 200 maintain different sets of input fields for use with or without active ice cavities. This 205 201 subsetting operates for the j-direction only and works by optionally looking for and using 206 a global file attribute (named: \np{open \_ocean\_jstart}) to determine the starting j-row202 a global file attribute (named: \np{open_ocean_jstart}{open\_ocean\_jstart}) to determine the starting j-row 207 203 for input. The use of this option is best explained with an example: 208 204 \medskip … … 211 207 configuration using the extended grid domain configuration file: \ifile{eORCA1\_domcfg.nc} 212 208 This file define a horizontal domain of 362x332. The first row with 213 open ocean wet points in the non-isf bathymetry for this set is row 42 (\fortran indexing)214 then the formally correct setting for \np{open \_ocean\_jstart} is 41. Using this value as209 open ocean wet points in the non-isf bathymetry for this set is row 42 (\fortran\ indexing) 210 then the formally correct setting for \np{open_ocean_jstart}{open\_ocean\_jstart} is 41. Using this value as 215 211 the first row to be read will result in a 362x292 domain which is the same size as the 216 212 original ORCA1 domain. Thus the extended domain configuration file can be used with all … … 219 215 220 216 \begin{itemize} 221 \item 217 \item Add the new attribute to any input files requiring a j-row offset, i.e: 222 218 \begin{cmds} 223 219 ncatted -a open_ocean_jstart,global,a,d,41 eORCA1_domcfg.nc 224 220 \end{cmds} 225 221 226 \item Add the logical switch \np{ln \_use\_jattr} to \nam{cfg} in the configuration227 namelist (if it is not already there) and set \ np{.true.}222 \item Add the logical switch \np{ln_use_jattr}{ln\_use\_jattr} to \nam{cfg}{cfg} in the configuration 223 namelist (if it is not already there) and set \forcode{.true.} 228 224 \end{itemize} 229 225 230 226 \noindent Note that with this option, the j-size of the global domain is (extended 231 j-size minus \np{open \_ocean\_jstart} + 1 ) and this must match the \texttt{jpjglo} value227 j-size minus \np{open_ocean_jstart}{open\_ocean\_jstart} + 1 ) and this must match the \texttt{jpjglo} value 232 228 for the configuration. This means an alternative version of \ifile{eORCA1\_domcfg.nc} must 233 be created for when \np{ln \_use\_jattr} is active. The \texttt{ncap2} tool provides a229 be created for when \np{ln_use_jattr}{ln\_use\_jattr} is active. The \texttt{ncap2} tool provides a 234 230 convenient way of achieving this: 235 231 … … 243 239 \texttt{open\_ocean\_jstart} attribute to the file's global attributes. 244 240 In particular this is true for any field that is read by \NEMO\ using the following optional argument to 245 the appropriate call to \np{iom \_get}.241 the appropriate call to \np{iom_get}{iom\_get}. 246 242 247 243 \begin{forlines} … … 257 253 conditions. Experimenting with this remains an exercise for the user. 258 254 259 % ================================================================ 260 % Accuracy and Reproducibility 261 % ================================================================ 262 \section[Accuracy and reproducibility (\textit{lib\_fortran.F90})] 263 {Accuracy and reproducibility (\protect\mdl{lib\_fortran})} 255 %% ================================================================================================= 256 \section[Accuracy and reproducibility (\textit{lib\_fortran.F90})]{Accuracy and reproducibility (\protect\mdl{lib\_fortran})} 264 257 \label{sec:MISC_fortran} 265 258 266 \subsection[Issues with intrinsinc SIGN function (\texttt{\textbf{key\_nosignedzero}})] 267 {Issues with intrinsinc SIGN function (\protect\key{nosignedzero})}259 %% ================================================================================================= 260 \subsection[Issues with intrinsinc SIGN function (\texttt{\textbf{key\_nosignedzero}})]{Issues with intrinsinc SIGN function (\protect\key{nosignedzero})} 268 261 \label{subsec:MISC_sign} 269 262 270 The SIGN(A, B) is the \fortran intrinsic function delivers the magnitude of A with the sign of B.263 The SIGN(A, B) is the \fortran\ intrinsic function delivers the magnitude of A with the sign of B. 271 264 For example, SIGN(-3.0,2.0) has the value 3.0. 272 265 The problematic case is when the second argument is zero, because, on platforms that support IEEE arithmetic, … … 280 273 and the processor is capable of distinguishing between positive and negative zero, 281 274 and B is negative real zero. 282 Then SIGN delivers a negative result where, under \fninety rules, it used to return a positive result.275 Then SIGN delivers a negative result where, under \fninety\ rules, it used to return a positive result. 283 276 This change may be especially sensitive for the ice model, 284 277 so we overwrite the intrinsinc function with our own function simply performing : \\ … … 290 283 some computers/compilers. 291 284 292 285 %% ================================================================================================= 293 286 \subsection{MPP reproducibility} 294 287 \label{subsec:MISC_glosum} … … 320 313 Note also that this implementation may be sensitive to the optimization level. 321 314 315 %% ================================================================================================= 322 316 \subsection{MPP scalability} 323 317 \label{subsec:MISC_mppsca} … … 339 333 be set at all the locations actually required by each individual for the fold operation. 340 334 This alternative method should give identical results to the default \textsc{ALLGATHER} method and 341 is recommended for large values of \np{jpni} .342 The new method is activated by setting \np{ln \_nnogather} to be true (\nam{mpp}).335 is recommended for large values of \np{jpni}{jpni}. 336 The new method is activated by setting \np{ln_nnogather}{ln\_nnogather} to be true (\nam{mpp}{mpp}). 343 337 The reproducibility of results using the two methods should be confirmed for each new, 344 338 non-reference configuration. 345 339 346 % ================================================================ 347 % Model optimisation, Control Print and Benchmark 348 % ================================================================ 340 %% ================================================================================================= 349 341 \section{Model optimisation, control print and benchmark} 350 342 \label{sec:MISC_opt} 351 %--------------------------------------------namctl------------------------------------------------------- 352 353 \nlst{namctl} 354 %-------------------------------------------------------------------------------------------------------------- 355 356 Options are defined through the \nam{ctl} namelist variables. 357 343 344 \begin{listing} 345 \nlst{namctl} 346 \caption{\forcode{&namctl}} 347 \label{lst:namctl} 348 \end{listing} 349 350 Options are defined through the \nam{ctl}{ctl} namelist variables. 351 352 %% ================================================================================================= 358 353 \subsection{Vector optimisation} 359 354 … … 366 361 % Add also one word on NEC specific optimisation (Novercheck option for example) 367 362 363 %% ================================================================================================= 368 364 \subsection{Control print} 369 365 370 The \np{ln \_ctl} switch was originally used as a debugging option in two modes:366 The \np{ln_ctl}{ln\_ctl} switch was originally used as a debugging option in two modes: 371 367 372 368 \begin{enumerate} 373 \item {\np{ln\_ctl}: compute and print the trends averaged over the interior domain in all TRA, DYN, LDF and369 \item {\np{ln_ctl}{ln\_ctl}: compute and print the trends averaged over the interior domain in all TRA, DYN, LDF and 374 370 ZDF modules. 375 371 This option is very helpful when diagnosing the origin of an undesired change in model results. } 376 372 377 \item {also \np{ln\_ctl} but using the nictl and njctl namelist parameters to check the source of differences between373 \item {also \np{ln_ctl}{ln\_ctl} but using the nictl and njctl namelist parameters to check the source of differences between 378 374 mono and multi processor runs.} 379 375 \end{enumerate} 380 376 381 377 However, in recent versions it has also been used to force all processors to assume the 382 reporting role. Thus when \np{ln \_ctl} is true all processors produce their own versions378 reporting role. Thus when \np{ln_ctl}{ln\_ctl} is true all processors produce their own versions 383 379 of files such as: ocean.output, layout.dat, etc. All such files, beyond the the normal 384 380 reporting processor (narea == 1), are named with a \_XXXX extension to their name, where … … 386 382 such as run.stat (and its netCDF counterpart: run.stat.nc) and tracer.stat contain global 387 383 information and are only ever produced by the reporting master (narea == 1). For version 388 4.0 a start has been made to return \np{ln \_ctl} to its original function by introducing384 4.0 a start has been made to return \np{ln_ctl}{ln\_ctl} to its original function by introducing 389 385 a new control structure which allows finer control over which files are produced. This 390 386 feature is still evolving but it does already allow the user to: select individually the … … 419 415 increment also applies to the time.step file which is otherwise updated every timestep. 420 416 421 % ================================================================ 422 \biblio 423 424 \pindex 417 \onlyinsubfile{\input{../../global/epilogue}} 425 418 426 419 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_model_basics.tex
r11435 r11799 1 2 1 \documentclass[../main/NEMO_manual]{subfiles} 3 2 4 3 \begin{document} 5 4 6 % ================================================================7 % Chapter 1 Model Basics8 % ================================================================9 5 \chapter{Model Basics} 10 \label{chap:PE} 6 \label{chap:MB} 7 8 \thispagestyle{plain} 11 9 12 10 \chaptertoc 13 11 14 \newpage 15 16 % ================================================================ 17 % Primitive Equations 18 % ================================================================ 12 \paragraph{Changes record} ~\\ 13 14 {\footnotesize 15 \begin{tabular}{l||l|l} 16 Release & Author(s) & Modifications \\ 17 \hline 18 {\em 4.0} & {\em Mike Bell } & {\em Review } \\ 19 {\em 3.6} & {\em Tim Graham and Gurvan Madec } & {\em Updates } \\ 20 {\em $\leq$ 3.4} & {\em Gurvan Madec and S\'{e}bastien Masson} & {\em First version} \\ 21 \end{tabular} 22 } 23 24 \clearpage 25 26 %% ================================================================================================= 19 27 \section{Primitive equations} 20 \label{sec:PE_PE} 21 22 % ------------------------------------------------------------------------------------------------------------- 23 % Vector Invariant Formulation 24 % ------------------------------------------------------------------------------------------------------------- 25 28 \label{sec:MB_PE} 29 30 %% ================================================================================================= 26 31 \subsection{Vector invariant formulation} 27 \label{subsec: PE_Vector}32 \label{subsec:MB_PE_vector} 28 33 29 34 The ocean is a fluid that can be described to a good approximation by the primitive equations, … … 32 37 plus the following additional assumptions made from scale considerations: 33 38 34 \begin{ enumerate}35 \item 36 \textit{spherical Earth approximation}: the geopotential surfaces are assumed to be oblate spheriods37 th at follow the Earth's bulge; these spheroids are approximated by spheres with38 gravity locally vertical(parallel to the Earth's radius) and independent of latitude39 \begin{labeling}{Neglect of additional Coriolis terms} 40 \item [\textit{Spherical Earth approximation}] The geopotential surfaces are assumed to 41 be oblate spheroids that follow the Earth's bulge; 42 these spheroids are approximated by spheres with gravity locally vertical 43 (parallel to the Earth's radius) and independent of latitude 39 44 \citep[][section 2]{white.hoskins.ea_QJRMS05}. 40 \item 41 \textit{thin-shell approximation}: the ocean depth is neglected compared to the earth's radius 42 \item 43 \textit{turbulent closure hypothesis}: the turbulent fluxes 45 \item [\textit{Thin-shell approximation}] The ocean depth is neglected compared to the earth's radius 46 \item [\textit{Turbulent closure hypothesis}] The turbulent fluxes 44 47 (which represent the effect of small scale processes on the large-scale) 45 48 are expressed in terms of large-scale features 46 \item 47 \textit{Boussinesq hypothesis}: density variations are neglected except in their contribution to 48 the buoyancy force 49 \item [\textit{Boussinesq hypothesis}] Density variations are neglected except in 50 their contribution to the buoyancy force 49 51 \begin{equation} 50 \label{eq: PE_eos}52 \label{eq:MB_PE_eos} 51 53 \rho = \rho \ (T,S,p) 52 54 \end{equation} 53 \item 54 \textit{Hydrostatic hypothesis}: the vertical momentum equation is reduced to a balance between 55 the vertical pressure gradient and the buoyancy force 55 \item [\textit{Hydrostatic hypothesis}] The vertical momentum equation is reduced to 56 a balance between the vertical pressure gradient and the buoyancy force 56 57 (this removes convective processes from the initial Navier-Stokes equations and so 57 58 convective processes must be parameterized instead) 58 59 \begin{equation} 59 \label{eq: PE_hydrostatic}60 \label{eq:MB_PE_hydrostatic} 60 61 \pd[p]{z} = - \rho \ g 61 62 \end{equation} 62 \item 63 \textit{Incompressibility hypothesis}: the three dimensional divergence of the velocity vector $\vect U$ 64 is assumed to be zero. 63 \item [\textit{Incompressibility hypothesis}] The three dimensional divergence of 64 the velocity vector $\vect U$ is assumed to be zero. 65 65 \begin{equation} 66 \label{eq: PE_continuity}66 \label{eq:MB_PE_continuity} 67 67 \nabla \cdot \vect U = 0 68 68 \end{equation} 69 \item 70 \textit{Neglect of additional Coriolis terms}: the Coriolis terms that vary with the cosine of latitude are neglected. 71 These terms may be non-negligible where the Brunt-Vaisala frequency $N$ is small, either in the deep ocean or 72 in the sub-mesoscale motions of the mixed layer, or near the equator \citep[][section 1]{white.hoskins.ea_QJRMS05}. 73 They can be consistently included as part of the ocean dynamics \citep[][section 3(d)]{white.hoskins.ea_QJRMS05} and are 74 retained in the MIT ocean model. 75 \end{enumerate} 69 \item [\textit{Neglect of additional Coriolis terms}] The Coriolis terms that vary with 70 the cosine of latitude are neglected. 71 These terms may be non-negligible where the Brunt-V\"{a}is\"{a}l\"{a} frequency $N$ is small, 72 either in the deep ocean or in the sub-mesoscale motions of the mixed layer, 73 or near the equator \citep[][section 1]{white.hoskins.ea_QJRMS05}. 74 They can be consistently included as part of the ocean dynamics 75 \citep[][section 3(d)]{white.hoskins.ea_QJRMS05} and are retained in the MIT ocean model. 76 \end{labeling} 76 77 77 78 Because the gravitational force is so dominant in the equations of large-scale motions, … … 79 80 $k$ is the local upward vector and $(i,j)$ are two vectors orthogonal to $k$, 80 81 \ie\ tangent to the geopotential surfaces. 81 Let us define the following variables: $\vect U$ the vector velocity, $\vect U = \vect U_h + w \, \vect k$ 82 Let us define the following variables: 83 $\vect U$ the vector velocity, $\vect U = \vect U_h + w \, \vect k$ 82 84 (the subscript $h$ denotes the local horizontal vector, \ie\ over the $(i,j)$ plane), 83 85 $T$ the potential temperature, $S$ the salinity, $\rho$ the \textit{in situ} density. … … 85 87 the following equations: 86 88 \begin{subequations} 87 \label{eq: PE}89 \label{eq:MB_PE} 88 90 \begin{gather} 89 \intertext{$-$ the momentum balance} 90 \label{eq:PE_dyn} 91 \pd[\vect U_h]{t} = - \lt[ (\nabla \times \vect U) \times \vect U + \frac{1}{2} \nabla \lt( \vect U^2 \rt) \rt]_h 92 - f \; k \times \vect U_h - \frac{1}{\rho_o} \nabla_h p 93 + \vect D^{\vect U} + \vect F^{\vect U} \\ 94 \intertext{$-$ the heat and salt conservation equations} 95 \label{eq:PE_tra_T} 91 \shortintertext{$-$ the momentum balance} 92 \label{eq:MB_PE_dyn} 93 \pd[\vect U_h]{t} = - \lt[ (\nabla \times \vect U) \times \vect U + \frac{1}{2} \nabla \lt( \vect U^2 \rt) \rt]_h - f \; k \times \vect U_h - \frac{1}{\rho_o} \nabla_h p + \vect D^{\vect U} + \vect F^{\vect U} 94 \shortintertext{$-$ the heat and salt conservation equations} 95 \label{eq:MB_PE_tra_T} 96 96 \pd[T]{t} = - \nabla \cdot (T \ \vect U) + D^T + F^T \\ 97 \label{eq: PE_tra_S}97 \label{eq:MB_PE_tra_S} 98 98 \pd[S]{t} = - \nabla \cdot (S \ \vect U) + D^S + F^S 99 99 \end{gather} … … 101 101 where $\nabla$ is the generalised derivative vector operator in $(i,j,k)$ directions, $t$ is the time, 102 102 $z$ is the vertical coordinate, $\rho$ is the \textit{in situ} density given by the equation of state 103 (\autoref{eq: PE_eos}), $\rho_o$ is a reference density, $p$ the pressure,103 (\autoref{eq:MB_PE_eos}), $\rho_o$ is a reference density, $p$ the pressure, 104 104 $f = 2 \vect \Omega \cdot k$ is the Coriolis acceleration 105 (where $\vect \Omega$ is the Earth's angular velocity vector), and $g$ is the gravitational acceleration. 105 (where $\vect \Omega$ is the Earth's angular velocity vector), 106 and $g$ is the gravitational acceleration. 106 107 $\vect D^{\vect U}$, $D^T$ and $D^S$ are the parameterisations of small-scale physics for momentum, 107 108 temperature and salinity, and $\vect F^{\vect U}$, $F^T$ and $F^S$ surface forcing terms. 108 Their nature and formulation are discussed in \autoref{sec:PE_zdf_ldf} and \autoref{subsec:PE_boundary_condition}. 109 110 % ------------------------------------------------------------------------------------------------------------- 111 % Boundary condition 112 % ------------------------------------------------------------------------------------------------------------- 109 Their nature and formulation are discussed in \autoref{sec:MB_zdf_ldf} and 110 \autoref{subsec:MB_boundary_condition}. 111 112 %% ================================================================================================= 113 113 \subsection{Boundary conditions} 114 \label{subsec: PE_boundary_condition}114 \label{subsec:MB_boundary_condition} 115 115 116 116 An ocean is bounded by complex coastlines, bottom topography at its base and … … 119 119 where $H$ is the depth of the ocean bottom and $\eta$ is the height of the sea surface 120 120 (discretisation can introduce additional artificial ``side-wall'' boundaries). 121 Both $H$ and $\eta$ are referenced to a surface of constant geopotential (\ie\ a mean sea surface height) on which $z = 0$.122 (\ autoref{fig:ocean_bc}).123 Through these two boundaries, the ocean can exchange fluxes of heat, fresh water, salt, and momentum with124 the solid earth, the continental margins, the sea ice and the atmosphere.125 However, some of these fluxes are so weak that even on climatic time scales of thousands of years126 they can be neglected.121 Both $H$ and $\eta$ are referenced to a surface of constant geopotential 122 (\ie\ a mean sea surface height) on which $z = 0$ (\autoref{fig:MB_ocean_bc}). 123 Through these two boundaries, the ocean can exchange fluxes of heat, fresh water, salt, 124 and momentum with the solid earth, the continental margins, the sea ice and the atmosphere. 125 However, some of these fluxes are so weak that 126 even on climatic time scales of thousands of years they can be neglected. 127 127 In the following, we briefly review the fluxes exchanged at the interfaces between the ocean and 128 128 the other components of the earth system. 129 129 130 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 131 \begin{figure}[!ht] 132 \begin{center} 133 \includegraphics[width=\textwidth]{Fig_I_ocean_bc} 134 \caption{ 135 \protect\label{fig:ocean_bc} 136 The ocean is bounded by two surfaces, $z = - H(i,j)$ and $z = \eta(i,j,t)$, 137 where $H$ is the depth of the sea floor and $\eta$ the height of the sea surface. 138 Both $H$ and $\eta$ are referenced to $z = 0$. 139 } 140 \end{center} 130 \begin{figure} 131 \centering 132 \includegraphics[width=0.66\textwidth]{Fig_I_ocean_bc} 133 \caption[Ocean boundary conditions]{ 134 The ocean is bounded by two surfaces, $z = - H(i,j)$ and $z = \eta(i,j,t)$, 135 where $H$ is the depth of the sea floor and $\eta$ the height of the sea surface. 136 Both $H$ and $\eta$ are referenced to $z = 0$.} 137 \label{fig:MB_ocean_bc} 141 138 \end{figure} 142 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>143 139 144 140 \begin{description} 145 \item [Land - ocean interface:]146 the major flux between continental margins and the ocean is a mass exchange offresh water through river runoff.141 \item [Land - ocean] The major flux between continental margins and the ocean is a mass exchange of 142 fresh water through river runoff. 147 143 Such an exchange modifies the sea surface salinity especially in the vicinity of major river mouths. 148 It can be neglected for short range integrations but has to be taken into account for long term integrations as 144 It can be neglected for short range integrations but 145 has to be taken into account for long term integrations as 149 146 it influences the characteristics of water masses formed (especially at high latitudes). 150 147 It is required in order to close the water cycle of the climate system. 151 It is usually specified as a fresh water flux at the air-sea interface in the vicinity of river mouths.152 \item[Solid earth - ocean interface:] 153 heat and salt fluxes through the sea floor are small, except in special areas of little extent. 154 They are usually neglected in the model155 \footnote{148 It is usually specified as a fresh water flux at the air-sea interface in 149 the vicinity of river mouths. 150 \item [Solid earth - ocean] Heat and salt fluxes through the sea floor are small, 151 except in special areas of little extent. 152 They are usually neglected in the model \footnote{ 156 153 In fact, it has been shown that the heat flux associated with the solid Earth cooling 157 (\ie\ the geothermal heating) is not negligible for the thermohaline circulation of the world ocean158 (see \autoref{subsec:TRA_bbc}).154 (\ie\ the geothermal heating) is not negligible for 155 the thermohaline circulation of the world ocean (see \autoref{subsec:TRA_bbc}). 159 156 }. 160 157 The boundary condition is thus set to no flux of heat and salt across solid boundaries. 161 For momentum, the situation is different. There is no flow across solid boundaries, 162 \ie\ the velocity normal to the ocean bottom and coastlines is zero (in other words, 163 the bottom velocity is parallel to solid boundaries). This kinematic boundary condition 164 can be expressed as: 158 For momentum, the situation is different. 159 There is no flow across solid boundaries, 160 \ie\ the velocity normal to the ocean bottom and coastlines is zero 161 (in other words, the bottom velocity is parallel to solid boundaries). 162 This kinematic boundary condition can be expressed as: 165 163 \begin{equation} 166 \label{eq: PE_w_bbc}164 \label{eq:MB_w_bbc} 167 165 w = - \vect U_h \cdot \nabla_h (H) 168 166 \end{equation} 169 167 In addition, the ocean exchanges momentum with the earth through frictional processes. 170 168 Such momentum transfer occurs at small scales in a boundary layer. 171 It must be parameterized in terms of turbulent fluxes using bottom and/or lateral boundary conditions. 169 It must be parameterized in terms of turbulent fluxes using 170 bottom and/or lateral boundary conditions. 172 171 Its specification depends on the nature of the physical parameterisation used for 173 $\vect D^{\vect U}$ in \autoref{eq:PE_dyn}. 174 It is discussed in \autoref{eq:PE_zdf}.% and Chap. III.6 to 9. 175 \item[Atmosphere - ocean interface:] 176 the kinematic surface condition plus the mass flux of fresh water PE (the precipitation minus evaporation budget) 177 leads to: 172 $\vect D^{\vect U}$ in \autoref{eq:MB_PE_dyn}. 173 It is discussed in \autoref{eq:MB_zdf}. % and Chap. III.6 to 9. 174 \item [Atmosphere - ocean] The kinematic surface condition plus the mass flux of fresh water PE 175 (the precipitation minus evaporation budget) leads to: 178 176 \[ 179 % \label{eq: PE_w_sbc}177 % \label{eq:MB_w_sbc} 180 178 w = \pd[\eta]{t} + \lt. \vect U_h \rt|_{z = \eta} \cdot \nabla_h (\eta) + P - E 181 179 \] 182 The dynamic boundary condition, neglecting the surface tension (which removes capillary waves from the system) 183 leads to the continuity of pressure across the interface $z = \eta$. 180 The dynamic boundary condition, neglecting the surface tension 181 (which removes capillary waves from the system) leads to 182 the continuity of pressure across the interface $z = \eta$. 184 183 The atmosphere and ocean also exchange horizontal momentum (wind stress), and heat. 185 \item[Sea ice - ocean interface:] 186 the ocean and sea ice exchange heat, salt, fresh water and momentum. 184 \item [Sea ice - ocean] The ocean and sea ice exchange heat, salt, fresh water and momentum. 187 185 The sea surface temperature is constrained to be at the freezing point at the interface. 188 186 Sea ice salinity is very low ($\sim4-6 \, psu$) compared to those of the ocean ($\sim34 \, psu$). 189 The cycle of freezing/melting is associated with fresh water and salt fluxes that cannot be neglected. 187 The cycle of freezing/melting is associated with fresh water and salt fluxes that 188 cannot be neglected. 190 189 \end{description} 191 190 192 % ================================================================ 193 % The Horizontal Pressure Gradient 194 % ================================================================ 191 %% ================================================================================================= 195 192 \section{Horizontal pressure gradient} 196 \label{sec:PE_hor_pg} 197 198 % ------------------------------------------------------------------------------------------------------------- 199 % Pressure Formulation 200 % ------------------------------------------------------------------------------------------------------------- 193 \label{sec:MB_hor_pg} 194 195 %% ================================================================================================= 201 196 \subsection{Pressure formulation} 202 \label{subsec: PE_p_formulation}197 \label{subsec:MB_p_formulation} 203 198 204 199 The total pressure at a given depth $z$ is composed of a surface pressure $p_s$ at 205 200 a reference geopotential surface ($z = 0$) and a hydrostatic pressure $p_h$ such that: 206 201 $p(i,j,k,t) = p_s(i,j,t) + p_h(i,j,k,t)$. 207 The latter is computed by integrating (\autoref{eq: PE_hydrostatic}),208 assuming that pressure in decibars can be approximated by depth in meters in (\autoref{eq: PE_eos}).202 The latter is computed by integrating (\autoref{eq:MB_PE_hydrostatic}), 203 assuming that pressure in decibars can be approximated by depth in meters in (\autoref{eq:MB_PE_eos}). 209 204 The hydrostatic pressure is then given by: 210 205 \[ 211 % \label{eq: PE_pressure}206 % \label{eq:MB_pressure} 212 207 p_h (i,j,z,t) = \int_{\varsigma = z}^{\varsigma = 0} g \; \rho (T,S,\varsigma) \; d \varsigma 213 208 \] 214 209 Two strategies can be considered for the surface pressure term: 215 $(a)$ introduce of a new variable $\eta$, the free-surface elevation, 210 \begin{enumerate*}[label=(\textit{\alph*})] 211 \item introduce of a new variable $\eta$, the free-surface elevation, 216 212 for which a prognostic equation can be established and solved; 217 $(b)$assume that the ocean surface is a rigid lid,213 \item assume that the ocean surface is a rigid lid, 218 214 on which the pressure (or its horizontal gradient) can be diagnosed. 215 \end{enumerate*} 219 216 When the former strategy is used, one solution of the free-surface elevation consists of 220 217 the excitation of external gravity waves. … … 227 224 modifies certain other longwave dynamics (\eg\ barotropic Rossby or planetary waves). 228 225 The rigid-lid hypothesis is an obsolescent feature in modern OGCMs. 229 It has been available until the release 3.1 of \NEMO, and it has been removed in release 3.2 and followings. 226 It has been available until the release 3.1 of \NEMO, 227 and it has been removed in release 3.2 and followings. 230 228 Only the free surface formulation is now described in this document (see the next sub-section). 231 229 232 % ------------------------------------------------------------------------------------------------------------- 233 % Free Surface Formulation 234 % ------------------------------------------------------------------------------------------------------------- 230 %% ================================================================================================= 235 231 \subsection{Free surface formulation} 236 \label{subsec: PE_free_surface}232 \label{subsec:MB_free_surface} 237 233 238 234 In the free surface formulation, a variable $\eta$, the sea-surface height, 239 235 is introduced which describes the shape of the air-sea interface. 240 This variable is solution of a prognostic equation which is established by forming the vertical average of241 the kinematic surface condition (\autoref{eq:PE_w_bbc}):236 This variable is solution of a prognostic equation which is established by 237 forming the vertical average of the kinematic surface condition (\autoref{eq:MB_w_bbc}): 242 238 \begin{equation} 243 \label{eq: PE_ssh}239 \label{eq:MB_ssh} 244 240 \pd[\eta]{t} = - D + P - E \quad \text{where} \quad D = \nabla \cdot \lt[ (H + \eta) \; \overline{U}_h \, \rt] 245 241 \end{equation} 246 and using (\autoref{eq:PE_hydrostatic}) the surface pressure is given by: $p_s = \rho \, g \, \eta$. 247 248 Allowing the air-sea interface to move introduces the external gravity waves (EGWs) as 242 and using (\autoref{eq:MB_PE_hydrostatic}) the surface pressure is given by: 243 $p_s = \rho \, g \, \eta$. 244 245 Allowing the air-sea interface to move introduces 246 the \textbf{E}xternal \textbf{G}ravity \textbf{W}aves (EGWs) as 249 247 a class of solution of the primitive equations. 250 248 These waves are barotropic (\ie\ nearly independent of depth) and their phase speed is quite high. … … 253 251 Two choices can be made regarding the implementation of the free surface in the model, 254 252 depending on the physical processes of interest. 255 256 $\bullet$ If one is interested in EGWs, in particular the tides and their interaction with 257 the baroclinic structure of the ocean (internal waves) possibly in shallow seas, 258 then a non linear free surface is the most appropriate. 259 This means that no approximation is made in \autoref{eq:PE_ssh} and that 260 the variation of the ocean volume is fully taken into account. 261 Note that in order to study the fast time scales associated with EGWs it is necessary to 262 minimize time filtering effects 263 (use an explicit time scheme with very small time step, or a split-explicit scheme with reasonably small time step, 264 see \autoref{subsec:DYN_spg_exp} or \autoref{subsec:DYN_spg_ts}). 265 266 $\bullet$ If one is not interested in EGW but rather sees them as high frequency noise, 267 it is possible to apply an explicit filter to slow down the fastest waves while 268 not altering the slow barotropic Rossby waves. 269 If further, an approximative conservation of heat and salt contents is sufficient for the problem solved, 270 then it is sufficient to solve a linearized version of \autoref{eq:PE_ssh}, 271 which still allows to take into account freshwater fluxes applied at the ocean surface \citep{roullet.madec_JGR00}. 272 Nevertheless, with the linearization, an exact conservation of heat and salt contents is lost. 273 274 The filtering of EGWs in models with a free surface is usually a matter of discretisation of 275 the temporal derivatives, 253 \begin{itemize} 254 \item If one is interested in EGWs, in particular the tides and their interaction with 255 the baroclinic structure of the ocean (internal waves) possibly in shallow seas, 256 then a non linear free surface is the most appropriate. 257 This means that no approximation is made in \autoref{eq:MB_ssh} and that 258 the variation of the ocean volume is fully taken into account. 259 Note that in order to study the fast time scales associated with EGWs it is necessary to 260 minimize time filtering effects 261 (use an explicit time scheme with very small time step, 262 or a split-explicit scheme with reasonably small time step, 263 see \autoref{subsec:DYN_spg_exp} or \autoref{subsec:DYN_spg_ts}). 264 \item If one is not interested in EGWs but rather sees them as high frequency noise, 265 it is possible to apply an explicit filter to slow down the fastest waves while 266 not altering the slow barotropic Rossby waves. 267 If further, an approximative conservation of heat and salt contents is sufficient for 268 the problem solved, then it is sufficient to solve a linearized version of \autoref{eq:MB_ssh}, 269 which still allows to take into account freshwater fluxes applied at the ocean surface 270 \citep{roullet.madec_JGR00}. 271 Nevertheless, with the linearization, an exact conservation of heat and salt contents is lost. 272 \end{itemize} 273 The filtering of EGWs in models with a free surface is usually 274 a matter of discretisation of the temporal derivatives, 276 275 using a split-explicit method \citep{killworth.webb.ea_JPO91, zhang.endoh_JGR92} or 277 the implicit scheme \citep{dukowicz.smith_JGR94} or 278 the addition of a filtering force in the momentum equation \citep{roullet.madec_JGR00}. 279 With the present release, \NEMO\ offers the choice between 280 an explicit free surface (see \autoref{subsec:DYN_spg_exp}) or 281 a split-explicit scheme strongly inspired the one proposed by \citet{shchepetkin.mcwilliams_OM05} 282 (see \autoref{subsec:DYN_spg_ts}). 283 284 % ================================================================ 285 % Curvilinear z-coordinate System 286 % ================================================================ 287 \section{Curvilinear \textit{z-}coordinate system} 288 \label{sec:PE_zco} 289 290 % ------------------------------------------------------------------------------------------------------------- 291 % Tensorial Formalism 292 % ------------------------------------------------------------------------------------------------------------- 276 the implicit scheme \citep{dukowicz.smith_JGR94} or the addition of a filtering force in 277 the momentum equation \citep{roullet.madec_JGR00}. 278 With the present release, \NEMO\ offers the choice between an explicit free surface 279 (see \autoref{subsec:DYN_spg_exp}) or a split-explicit scheme strongly inspired the one proposed by 280 \citet{shchepetkin.mcwilliams_OM05} (see \autoref{subsec:DYN_spg_ts}). 281 282 %% ================================================================================================= 283 \section{Curvilinear \textit{z}-coordinate system} 284 \label{sec:MB_zco} 285 286 %% ================================================================================================= 293 287 \subsection{Tensorial formalism} 294 \label{subsec: PE_tensorial}288 \label{subsec:MB_tensorial} 295 289 296 290 In many ocean circulation problems, the flow field has regions of enhanced dynamics … … 304 298 A solution consists of introducing an appropriate coordinate transformation that 305 299 shifts the singular point onto land \citep{madec.imbard_CD96, murray_JCP96}. 306 As a consequence, it is important to solve the primitive equations in various curvilinear coordinate systems. 307 An efficient way of introducing an appropriate coordinate transform can be found when using a tensorial formalism. 300 As a consequence, 301 it is important to solve the primitive equations in various curvilinear coordinate systems. 302 An efficient way of introducing an appropriate coordinate transform can be found when 303 using a tensorial formalism. 308 304 This formalism is suited to any multidimensional curvilinear coordinate system. 309 Ocean modellers mainly use three-dimensional orthogonal grids on the sphere (spherical earth approximation), 310 with preservation of the local vertical. Here we give the simplified equations for this particular case. 311 The general case is detailed by \citet{eiseman.stone_SR80} in their survey of the conservation laws of fluid dynamics. 305 Ocean modellers mainly use three-dimensional orthogonal grids on the sphere 306 (spherical earth approximation), with preservation of the local vertical. 307 Here we give the simplified equations for this particular case. 308 The general case is detailed by \citet{eiseman.stone_SR80} in 309 their survey of the conservation laws of fluid dynamics. 312 310 313 311 Let $(i,j,k)$ be a set of orthogonal curvilinear coordinates on … … 315 313 $(i,j,k)$ linked to the earth such that 316 314 $k$ is the local upward vector and $(i,j)$ are two vectors orthogonal to $k$, 317 \ie\ along geopotential surfaces (\autoref{fig: referential}).315 \ie\ along geopotential surfaces (\autoref{fig:MB_referential}). 318 316 Let $(\lambda,\varphi,z)$ be the geographical coordinate system in which a position is defined by 319 317 the latitude $\varphi(i,j)$, the longitude $\lambda(i,j)$ and 320 318 the distance from the centre of the earth $a + z(k)$ where $a$ is the earth's radius and 321 $z$ the altitude above a reference sea level (\autoref{fig: referential}).319 $z$ the altitude above a reference sea level (\autoref{fig:MB_referential}). 322 320 The local deformation of the curvilinear coordinate system is given by $e_1$, $e_2$ and $e_3$, 323 321 the three scale factors: 324 322 \begin{equation} 325 \label{eq:scale_factors} 326 \begin{aligned} 327 e_1 &= (a + z) \lt[ \lt( \pd[\lambda]{i} \cos \varphi \rt)^2 + \lt( \pd[\varphi]{i} \rt)^2 \rt]^{1/2} \\ 328 e_2 &= (a + z) \lt[ \lt( \pd[\lambda]{j} \cos \varphi \rt)^2 + \lt( \pd[\varphi]{j} \rt)^2 \rt]^{1/2} \\ 329 e_3 &= \lt( \pd[z]{k} \rt) 330 \end{aligned} 323 \label{eq:MB_scale_factors} 324 e_1 = (a + z) \lt[ \lt( \pd[\lambda]{i} \cos \varphi \rt)^2 + \lt( \pd[\varphi]{i} \rt)^2 \rt]^{1/2} \quad e_2 = (a + z) \lt[ \lt( \pd[\lambda]{j} \cos \varphi \rt)^2 + \lt( \pd[\varphi]{j} \rt)^2 \rt]^{1/2} \quad e_3 = \lt( \pd[z]{k} \rt) 331 325 \end{equation} 332 326 333 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 334 \begin{figure}[!tb] 335 \begin{center} 336 \includegraphics[width=\textwidth]{Fig_I_earth_referential} 337 \caption{ 338 \protect\label{fig:referential} 339 the geographical coordinate system $(\lambda,\varphi,z)$ and the curvilinear 340 coordinate system $(i,j,k)$. 341 } 342 \end{center} 327 \begin{figure} 328 \centering 329 \includegraphics[width=0.33\textwidth]{Fig_I_earth_referential} 330 \caption[Geographical and curvilinear coordinate systems]{ 331 the geographical coordinate system $(\lambda,\varphi,z)$ and the curvilinear 332 coordinate system $(i,j,k)$.} 333 \label{fig:MB_referential} 343 334 \end{figure} 344 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>345 335 346 336 Since the ocean depth is far smaller than the earth's radius, $a + z$, can be replaced by $a$ in 347 (\autoref{eq: scale_factors}) (thin-shell approximation).337 (\autoref{eq:MB_scale_factors}) (thin-shell approximation). 348 338 The resulting horizontal scale factors $e_1$, $e_2$ are independent of $k$ while 349 339 the vertical scale factor is a single function of $k$ as $k$ is parallel to $z$. 350 340 The scalar and vector operators that appear in the primitive equations 351 (\autoref{eq: PE_dyn} to \autoref{eq:PE_eos}) can then be written in the tensorial form,341 (\autoref{eq:MB_PE_dyn} to \autoref{eq:MB_PE_eos}) can then be written in the tensorial form, 352 342 invariant in any orthogonal horizontal curvilinear coordinate system transformation: 353 343 \begin{subequations} 354 % \label{eq:PE_discrete_operators} 355 \begin{gather} 356 \label{eq:PE_grad} 357 \nabla q = \frac{1}{e_1} \pd[q]{i} \; \vect i 358 + \frac{1}{e_2} \pd[q]{j} \; \vect j 359 + \frac{1}{e_3} \pd[q]{k} \; \vect k \\ 360 \label{eq:PE_div} 361 \nabla \cdot \vect A = \frac{1}{e_1 \; e_2} \lt[ \pd[(e_2 \; a_1)]{\partial i} + \pd[(e_1 \; a_2)]{j} \rt] 362 + \frac{1}{e_3} \lt[ \pd[a_3]{k} \rt] 363 \end{gather} 364 \begin{multline} 365 \label{eq:PE_curl} 366 \nabla \times \vect{A} = \lt[ \frac{1}{e_2} \pd[a_3]{j} - \frac{1}{e_3} \pd[a_2]{k} \rt] \vect i \\ 367 + \lt[ \frac{1}{e_3} \pd[a_1]{k} - \frac{1}{e_1} \pd[a_3]{i} \rt] \vect j \\ 368 + \frac{1}{e_1 e_2} \lt[ \pd[(e_2 a_2)]{i} - \pd[(e_1 a_1)]{j} \rt] \vect k 369 \end{multline} 370 \begin{gather} 371 \label{eq:PE_lap} 372 \Delta q = \nabla \cdot (\nabla q) \\ 373 \label{eq:PE_lap_vector} 374 \Delta \vect A = \nabla (\nabla \cdot \vect A) - \nabla \times (\nabla \times \vect A) 375 \end{gather} 344 % \label{eq:MB_discrete_operators} 345 \begin{align} 346 \label{eq:MB_grad} 347 \nabla q &= \frac{1}{e_1} \pd[q]{i} \; \vect i + \frac{1}{e_2} \pd[q]{j} \; \vect j + \frac{1}{e_3} \pd[q]{k} \; \vect k \\ 348 \label{eq:MB_div} 349 \nabla \cdot \vect A &= \frac{1}{e_1 \; e_2} \lt[ \pd[(e_2 \; a_1)]{\partial i} + \pd[(e_1 \; a_2)]{j} \rt] + \frac{1}{e_3} \lt[ \pd[a_3]{k} \rt] \\ 350 \label{eq:MB_curl} 351 \nabla \times \vect{A} &= \lt[ \frac{1}{e_2} \pd[a_3]{j} - \frac{1}{e_3} \pd[a_2]{k} \rt] \vect i + \lt[ \frac{1}{e_3} \pd[a_1]{k} - \frac{1}{e_1} \pd[a_3]{i} \rt] \vect j + \frac{1}{e_1 e_2} \lt[ \pd[(e_2 a_2)]{i} - \pd[(e_1 a_1)]{j} \rt] \vect k \\ 352 \label{eq:MB_lap} 353 \Delta q &= \nabla \cdot (\nabla q) \\ 354 \label{eq:MB_lap_vector} 355 \Delta \vect A &= \nabla (\nabla \cdot \vect A) - \nabla \times (\nabla \times \vect A) 356 \end{align} 376 357 \end{subequations} 377 where $q$ is a scalar quantity and $\vect A = (a_1,a_2,a_3)$ a vector in the $(i,j,k)$ coordinates system. 378 379 % ------------------------------------------------------------------------------------------------------------- 380 % Continuous Model Equations 381 % ------------------------------------------------------------------------------------------------------------- 358 where $q$ is a scalar quantity and 359 $\vect A = (a_1,a_2,a_3)$ a vector in the $(i,j,k)$ coordinates system. 360 361 %% ================================================================================================= 382 362 \subsection{Continuous model equations} 383 \label{subsec: PE_zco_Eq}363 \label{subsec:MB_zco_Eq} 384 364 385 365 In order to express the Primitive Equations in tensorial formalism, 386 it is necessary to compute the horizontal component of the non-linear and viscous terms of the equation using 387 \autoref{eq:PE_grad}) to \autoref{eq:PE_lap_vector}. 388 Let us set $\vect U = (u,v,w) = \vect U_h + w \; \vect k $, the velocity in the $(i,j,k)$ coordinates system and 389 define the relative vorticity $\zeta$ and the divergence of the horizontal velocity field $\chi$, by: 366 it is necessary to compute the horizontal component of the non-linear and viscous terms of 367 the equation using \autoref{eq:MB_grad}) to \autoref{eq:MB_lap_vector}. 368 Let us set $\vect U = (u,v,w) = \vect U_h + w \; \vect k $, 369 the velocity in the $(i,j,k)$ coordinates system, 370 and define the relative vorticity $\zeta$ and the divergence of the horizontal velocity field $\chi$, 371 by: 390 372 \begin{gather} 391 \label{eq: PE_curl_Uh}373 \label{eq:MB_curl_Uh} 392 374 \zeta = \frac{1}{e_1 e_2} \lt[ \pd[(e_2 \, v)]{i} - \pd[(e_1 \, u)]{j} \rt] \\ 393 \label{eq: PE_div_Uh}375 \label{eq:MB_div_Uh} 394 376 \chi = \frac{1}{e_1 e_2} \lt[ \pd[(e_2 \, u)]{i} + \pd[(e_1 \, v)]{j} \rt] 395 377 \end{gather} … … 397 379 Using again the fact that the horizontal scale factors $e_1$ and $e_2$ are independent of $k$ and that 398 380 $e_3$ is a function of the single variable $k$, 399 $NLT$ the nonlinear term of \autoref{eq:PE_dyn} can be transformed as follows: 400 \begin{alignat*}{2} 401 &NLT &= &\lt[ (\nabla \times {\vect U}) \times {\vect U} + \frac{1}{2} \nabla \lt( {\vect U}^2 \rt) \rt]_h \\ 402 & &= &\lt( 403 \begin{array}{*{20}c} 404 \lt[ \frac{1}{e_3} \pd[u]{k} - \frac{1}{e_1} \pd[w]{i} \rt] w - \zeta \; v \\ 405 \zeta \; u - \lt[ \frac{1}{e_2} \pd[w]{j} - \frac{1}{e_3} \pd[v]{k} \rt] \ w 406 \end{array} 407 \rt) 408 + \frac{1}{2} \lt( 409 \begin{array}{*{20}c} 410 \frac{1}{e_1} \pd[(u^2 + v^2 + w^2)]{i} \\ 411 \frac{1}{e_2} \pd[(u^2 + v^2 + w^2)]{j} 412 \end{array} 413 \rt) \\ 414 & &= &\lt( 415 \begin{array}{*{20}c} 416 -\zeta \; v \\ 417 \zeta \; u 418 \end{array} 419 \rt) 420 + \frac{1}{2} \lt( 421 \begin{array}{*{20}c} 422 \frac{1}{e_1} \pd[(u^2 + v^2)]{i} \\ 423 \frac{1}{e_2} \pd[(u^2 + v^2)]{j} 424 \end{array} 425 \rt) \\ 426 & & &+ \frac{1}{e_3} \lt( 427 \begin{array}{*{20}c} 428 w \; \pd[u]{k} \\ 429 w \; \pd[v]{k} 430 \end{array} 431 \rt) 432 - \lt( 433 \begin{array}{*{20}c} 434 \frac{w}{e_1} \pd[w]{i} - \frac{1}{2 e_1} \pd[w^2]{i} \\ 435 \frac{w}{e_2} \pd[w]{j} - \frac{1}{2 e_2} \pd[w^2]{j} 436 \end{array} 437 \rt) 438 \end{alignat*} 439 The last term of the right hand side is obviously zero, and thus the nonlinear term of 440 \autoref{eq:PE_dyn} is written in the $(i,j,k)$ coordinate system: 381 $NLT$ the nonlinear term of \autoref{eq:MB_PE_dyn} can be transformed as follows: 382 \begin{align*} 383 NLT &= \lt[ (\nabla \times {\vect U}) \times {\vect U} + \frac{1}{2} \nabla \lt( {\vect U}^2 \rt) \rt]_h \\ 384 &= \lt( 385 \begin{array}{*{20}c} 386 \lt[ \frac{1}{e_3} \pd[u]{k} - \frac{1}{e_1} \pd[w]{i} \rt] w - \zeta \; v \\ 387 \zeta \; u - \lt[ \frac{1}{e_2} \pd[w]{j} - \frac{1}{e_3} \pd[v]{k} \rt] \ w 388 \end{array} 389 \rt) 390 + \frac{1}{2} \lt( 391 \begin{array}{*{20}c} 392 \frac{1}{e_1} \pd[(u^2 + v^2 + w^2)]{i} \\ 393 \frac{1}{e_2} \pd[(u^2 + v^2 + w^2)]{j} 394 \end{array} 395 \rt) \\ 396 &= \lt( 397 \begin{array}{*{20}c} 398 -\zeta \; v \\ 399 \zeta \; u 400 \end{array} 401 \rt) 402 + \frac{1}{2} \lt( 403 \begin{array}{*{20}c} 404 \frac{1}{e_1} \pd[(u^2 + v^2)]{i} \\ 405 \frac{1}{e_2} \pd[(u^2 + v^2)]{j} 406 \end{array} 407 \rt) 408 + \frac{1}{e_3} \lt( 409 \begin{array}{*{20}c} 410 w \; \pd[u]{k} \\ 411 w \; \pd[v]{k} 412 \end{array} 413 \rt) 414 - \lt( 415 \begin{array}{*{20}c} 416 \frac{w}{e_1} \pd[w]{i} - \frac{1}{2 e_1} \pd[w^2]{i} \\ 417 \frac{w}{e_2} \pd[w]{j} - \frac{1}{2 e_2} \pd[w^2]{j} 418 \end{array} 419 \rt) 420 \end{align*} 421 The last term of the right hand side is obviously zero, 422 and thus the \textbf{N}on\textbf{L}inear \textbf{T}erm ($NLT$) of \autoref{eq:MB_PE_dyn} is written in 423 the $(i,j,k)$ coordinate system: 441 424 \begin{equation} 442 \label{eq:PE_vector_form} 443 NLT = \zeta \; \vect k \times \vect U_h + \frac{1}{2} \nabla_h \lt( \vect U_h^2 \rt) 444 + \frac{1}{e_3} w \pd[\vect U_h]{k} 425 \label{eq:MB_vector_form} 426 NLT = \zeta \; \vect k \times \vect U_h + \frac{1}{2} \nabla_h \lt( \vect U_h^2 \rt) + \frac{1}{e_3} w \pd[\vect U_h]{k} 445 427 \end{equation} 446 428 … … 448 430 For some purposes, it can be advantageous to write this term in the so-called flux form, 449 431 \ie\ to write it as the divergence of fluxes. 450 For example, the first component of \autoref{eq:PE_vector_form} (the $i$-component) is transformed as follows: 451 \begin{alignat*}{2} 432 For example, 433 the first component of \autoref{eq:MB_vector_form} (the $i$-component) is transformed as follows: 434 \begin{alignat*}{3} 452 435 &NLT_i &= &- \zeta \; v + \frac{1}{2 \; e_1} \pd[ (u^2 + v^2) ]{i} + \frac{1}{e_3} w \ \pd[u]{k} \\ 453 & &= &\frac{1}{e_1 \; e_2} \lt( -v \pd[(e_2 \, v)]{i} + v \pd[(e_1 \, u)]{j} \rt) 454 + \frac{1}{e_1 e_2} \lt( e_2 \; u \pd[u]{i} + e_2 \; v \pd[v]{i} \rt) \\ 455 & & &+ \frac{1}{e_3} \lt( w \; \pd[u]{k} \rt) \\ 456 & &= &\frac{1}{e_1 \; e_2} \lt[ - \lt( v^2 \pd[e_2]{i} + e_2 \, v \pd[v]{i} \rt) 457 + \lt( \pd[ \lt( e_1 \, u \, v \rt)]{j} - e_1 \, u \pd[v]{j} \rt) \rt. \\ 458 & & &\lt. + \lt( \pd[ \lt( e_2 \, u \, u \rt)]{i} - u \pd[ \lt( e_2 u \rt)]{i} \rt) 459 + e_2 v \pd[v]{i} \rt] \\ 436 & &= &\frac{1}{e_1 \; e_2} \lt( -v \pd[(e_2 \, v)]{i} + v \pd[(e_1 \, u)]{j} \rt) + \frac{1}{e_1 e_2} \lt( e_2 \; u \pd[u]{i} + e_2 \; v \pd[v]{i} \rt) + \frac{1}{e_3} \lt( w \; \pd[u]{k} \rt) \\ 437 & &= &\frac{1}{e_1 \; e_2} \lt[ - \lt( v^2 \pd[e_2]{i} + e_2 \, v \pd[v]{i} \rt) + \lt( \pd[ \lt( e_1 \, u \, v \rt)]{j} - e_1 \, u \pd[v]{j} \rt) \rt. \lt. + \lt( \pd[ \lt( e_2 \, u \, u \rt)]{i} - u \pd[ \lt( e_2 u \rt)]{i} \rt) + e_2 v \pd[v]{i} \rt] \\ 460 438 & & &+ \frac{1}{e_3} \lt( \pd[(w \, u)]{k} - u \pd[w]{k} \rt) \\ 461 & &= &\frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, u)]{i} + \pd[(e_1 \, u \, v)]{j} \rt) 462 + \frac{1}{e_3} \pd[(w \, u)]{k} \\ 463 & & &+ \frac{1}{e_1 e_2} \lt[ - u \lt( \pd[(e_1 v)]{j} - v \, \pd[e_1]{j} \rt) 464 - u \pd[(e_2 u)]{i} \rt] 465 - \frac{1}{e_3} \pd[w]{k} u \\ 439 & &= &\frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, u)]{i} + \pd[(e_1 \, u \, v)]{j} \rt) + \frac{1}{e_3} \pd[(w \, u)]{k} + \frac{1}{e_1 e_2} \lt[ - u \lt( \pd[(e_1 v)]{j} - v \, \pd[e_1]{j} \rt) - u \pd[(e_2 u)]{i} \rt] - \frac{1}{e_3} \pd[w]{k} u \\ 466 440 & & &+ \frac{1}{e_1 e_2} \lt( - v^2 \pd[e_2]{i} \rt) \\ 467 & &= &\nabla \cdot (\vect U \, u) - (\nabla \cdot \vect U) \ u 468 + \frac{1}{e_1 e_2} \lt( -v^2 \pd[e_2]{i} + u v \, \pd[e_1]{j} \rt) \\ 469 \intertext{as $\nabla \cdot {\vect U} \; = 0$ (incompressibility) it becomes:} 441 & &= &\nabla \cdot (\vect U \, u) - (\nabla \cdot \vect U) \ u + \frac{1}{e_1 e_2} \lt( -v^2 \pd[e_2]{i} + u v \, \pd[e_1]{j} \rt) \\ 442 \shortintertext{as $\nabla \cdot {\vect U} \; = 0$ (incompressibility) it becomes:} 470 443 & &= &\, \nabla \cdot (\vect U \, u) + \frac{1}{e_1 e_2} \lt( v \; \pd[e_2]{i} - u \; \pd[e_1]{j} \rt) (-v) 471 444 \end{alignat*} … … 473 446 The flux form of the momentum advection term is therefore given by: 474 447 \begin{equation} 475 \label{eq: PE_flux_form}476 NLT = 477 478 479 480 481 482 448 \label{eq:MB_flux_form} 449 NLT = \nabla \cdot \lt( 450 \begin{array}{*{20}c} 451 \vect U \, u \\ 452 \vect U \, v 453 \end{array} 454 \rt) 455 + \frac{1}{e_1 e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \vect k \times \vect U_h 483 456 \end{equation} 484 457 485 458 The flux form has two terms, 486 the first one is expressed as the divergence of momentum fluxes (hence the flux form name given to this formulation) 487 and the second one is due to the curvilinear nature of the coordinate system used. 488 The latter is called the \textit{metric} term and can be viewed as a modification of the Coriolis parameter: 459 the first one is expressed as the divergence of momentum fluxes 460 (hence the flux form name given to this formulation) and 461 the second one is due to the curvilinear nature of the coordinate system used. 462 The latter is called the \textit{metric} term and can be viewed as 463 a modification of the Coriolis parameter: 489 464 \[ 490 % \label{eq: PE_cor+metric}465 % \label{eq:MB_cor+metric} 491 466 f \to f + \frac{1}{e_1 e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) 492 467 \] … … 499 474 the following tensorial formalism: 500 475 501 \begin{itemize} 502 \item 503 \textbf{Vector invariant form of the momentum equations}: 476 \begin{description} 477 \item [Vector invariant form of the momentum equations] 504 478 \begin{equation} 505 \label{eq:PE_dyn_vect} 506 \begin{split} 507 % \label{eq:PE_dyn_vect_u} 508 \pd[u]{t} = &+ (\zeta + f) \, v - \frac{1}{2 e_1} \pd[]{i} (u^2 + v^2) 509 - \frac{1}{e_3} w \pd[u]{k} - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) \\ 510 &+ D_u^{\vect U} + F_u^{\vect U} \\ 511 \pd[v]{t} = &- (\zeta + f) \, u - \frac{1}{2 e_2} \pd[]{j} (u^2 + v^2) 512 - \frac{1}{e_3} w \pd[v]{k} - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) \\ 513 &+ D_v^{\vect U} + F_v^{\vect U} 514 \end{split} 479 \label{eq:MB_dyn_vect} 480 \begin{gathered} 481 % \label{eq:MB_dyn_vect_u} 482 \pd[u]{t} = + (\zeta + f) \, v - \frac{1}{2 e_1} \pd[]{i} (u^2 + v^2) - \frac{1}{e_3} w \pd[u]{k} - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) + D_u^{\vect U} + F_u^{\vect U} \\ 483 \pd[v]{t} = - (\zeta + f) \, u - \frac{1}{2 e_2} \pd[]{j} (u^2 + v^2) - \frac{1}{e_3} w \pd[v]{k} - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) + D_v^{\vect U} + F_v^{\vect U} 484 \end{gathered} 515 485 \end{equation} 516 \item 517 \textbf{flux form of the momentum equations}: 518 % \label{eq:PE_dyn_flux} 519 \begin{multline*} 520 % \label{eq:PE_dyn_flux_u} 521 \pd[u]{t} = + \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, v \\ 522 - \frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, u)]{i} + \pd[(e_1 \, v \, u)]{j} \rt) \\ 523 - \frac{1}{e_3} \pd[(w \, u)]{k} - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) 524 + D_u^{\vect U} + F_u^{\vect U} 525 \end{multline*} 526 \begin{multline*} 527 % \label{eq:PE_dyn_flux_v} 528 \pd[v]{t} = - \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, u \\ 529 - \frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, v)]{i} + \pd[(e_1 \, v \, v)]{j} \rt) \\ 530 - \frac{1}{e_3} \pd[(w \, v)]{k} - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) 531 + D_v^{\vect U} + F_v^{\vect U} 532 \end{multline*} 533 where $\zeta$, the relative vorticity, is given by \autoref{eq:PE_curl_Uh} and $p_s$, the surface pressure, 534 is given by: 486 \item [Flux form of the momentum equations] 487 % \label{eq:MB_dyn_flux} 488 \begin{alignat*}{2} 489 % \label{eq:MB_dyn_flux_u} 490 \pd[u]{t} = &+ \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, v - \frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, u)]{i} + \pd[(e_1 \, v \, u)]{j} \rt) - \frac{1}{e_3} \pd[(w \, u)]{k} \\ 491 &- \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) + D_u^{\vect U} + F_u^{\vect U} 492 \end{alignat*} 493 \begin{alignat*}{2} 494 % \label{eq:MB_dyn_flux_v} 495 \pd[v]{t} = &- \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, u - \frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, v)]{i} + \pd[(e_1 \, v \, v)]{j} \rt) - \frac{1}{e_3} \pd[(w \, v)]{k} \\ 496 &- \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) + D_v^{\vect U} + F_v^{\vect U} 497 \end{alignat*} 498 where $\zeta$, the relative vorticity, is given by \autoref{eq:MB_curl_Uh} and 499 $p_s$, the surface pressure, is given by: 535 500 \[ 536 % \label{eq: PE_spg}501 % \label{eq:MB_spg} 537 502 p_s = \rho \,g \, \eta 538 503 \] 539 and $\eta$ is the solution of \autoref{eq: PE_ssh}.504 and $\eta$ is the solution of \autoref{eq:MB_ssh}. 540 505 541 506 The vertical velocity and the hydrostatic pressure are diagnosed from the following equations: 542 507 \[ 543 % \label{eq: w_diag}508 % \label{eq:MB_w_diag} 544 509 \pd[w]{k} = - \chi \; e_3 \qquad 545 % \label{eq: hp_diag}510 % \label{eq:MB_hp_diag} 546 511 \pd[p_h]{k} = - \rho \; g \; e_3 547 512 \] 548 where the divergence of the horizontal velocity, $\chi$ is given by \autoref{eq:PE_div_Uh}. 549 550 \item 551 \textbf{tracer equations}: 552 \begin{equation} 553 \begin{split} 554 \pd[T]{t} = & - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 T \, u)]{i} + \pd[(e_1 T \, v)]{j} \rt] 555 - \frac{1}{e_3} \pd[(T \, w)]{k} + D^T + F^T \\ 556 \pd[S]{t} = & - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 S \, u)]{i} + \pd[(e_1 S \, v)]{j} \rt] 557 - \frac{1}{e_3} \pd[(S \, w)]{k} + D^S + F^S \\ 558 \rho = & \rho \big( T,S,z(k) \big) 559 \end{split} 560 \end{equation} 561 \end{itemize} 562 563 The expression of $\vect D^{U}$, $D^{S}$ and $D^{T}$ depends on the subgrid scale parameterisation used. 564 It will be defined in \autoref{eq:PE_zdf}. 513 where the divergence of the horizontal velocity, $\chi$ is given by \autoref{eq:MB_div_Uh}. 514 \item [Tracer equations] 515 \begin{gather*} 516 \pd[T]{t} = - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 T \, u)]{i} + \pd[(e_1 T \, v)]{j} \rt] - \frac{1}{e_3} \pd[(T \, w)]{k} + D^T + F^T \\ 517 \pd[S]{t} = - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 S \, u)]{i} + \pd[(e_1 S \, v)]{j} \rt] - \frac{1}{e_3} \pd[(S \, w)]{k} + D^S + F^S \\ 518 \rho = \rho \big( T,S,z(k) \big) 519 \end{gather*} 520 \end{description} 521 522 The expression of $\vect D^{U}$, $D^{S}$ and $D^{T}$ depends on 523 the subgrid scale parameterisation used. 524 It will be defined in \autoref{eq:MB_zdf}. 565 525 The nature and formulation of $\vect F^{\vect U}$, $F^T$ and $F^S$, the surface forcing terms, 566 526 are discussed in \autoref{chap:SBC}. 567 527 568 \newpage 569 570 % ================================================================ 571 % Curvilinear generalised vertical coordinate System 572 % ================================================================ 528 %% ================================================================================================= 573 529 \section{Curvilinear generalised vertical coordinate system} 574 \label{sec: PE_gco}530 \label{sec:MB_gco} 575 531 576 532 The ocean domain presents a huge diversity of situation in the vertical. … … 579 535 varying from more than 6,000 meters in abyssal trenches to zero at the coast. 580 536 Last but not least, the ocean stratification exerts a strong barrier to vertical motions and mixing. 581 Therefore, in order to represent the ocean with respect to 582 the first pointa space and time dependent vertical coordinate that follows the variation of the sea surface height537 Therefore, in order to represent the ocean with respect to the first point 538 a space and time dependent vertical coordinate that follows the variation of the sea surface height 583 539 \eg\ an \zstar-coordinate; 584 for the second point, a space variation to fit the change of bottom topography 540 for the second point, 541 a space variation to fit the change of bottom topography 585 542 \eg\ a terrain-following or $\sigma$-coordinate; 586 and for the third point, one will be tempted to use a space and time dependent coordinate that 587 follows the isopycnal surfaces, \eg\ an isopycnic coordinate. 588 589 In order to satisfy two or more constraints one can even be tempted to mixed these coordinate systems, as in 590 HYCOM (mixture of $z$-coordinate at the surface, isopycnic coordinate in the ocean interior and $\sigma$ at 591 the ocean bottom) \citep{chassignet.smith.ea_JPO03} or 592 OPA (mixture of $z$-coordinate in vicinity the surface and steep topography areas and $\sigma$-coordinate elsewhere) 593 \citep{madec.delecluse.ea_JPO96} among others. 543 and for the third point, 544 one will be tempted to use a space and time dependent coordinate that follows the isopycnal surfaces, 545 \eg\ an isopycnic coordinate. 546 547 In order to satisfy two or more constraints one can even be tempted to mixed these coordinate systems, 548 as in HYCOM (mixture of $z$-coordinate at the surface, isopycnic coordinate in the ocean interior and 549 $\sigma$ at the ocean bottom) \citep{chassignet.smith.ea_JPO03} or 550 OPA (mixture of $z$-coordinate in vicinity the surface and steep topography areas and 551 $\sigma$-coordinate elsewhere) \citep{madec.delecluse.ea_JPO96} among others. 594 552 595 553 In fact one is totally free to choose any space and time vertical coordinate by 596 554 introducing an arbitrary vertical coordinate : 597 555 \begin{equation} 598 \label{eq: PE_s}556 \label{eq:MB_s} 599 557 s = s(i,j,k,t) 600 558 \end{equation} 601 with the restriction that the above equation gives a single-valued monotonic relationship between $s$ and $k$, 602 when $i$, $j$ and $t$ are held fixed. 603 \autoref{eq:PE_s} is a transformation from the $(i,j,k,t)$ coordinate system with independent variables into 559 with the restriction that the above equation gives a single-valued monotonic relationship between 560 $s$ and $k$, when $i$, $j$ and $t$ are held fixed. 561 \autoref{eq:MB_s} is a transformation from 562 the $(i,j,k,t)$ coordinate system with independent variables into 604 563 the $(i,j,s,t)$ generalised coordinate system with $s$ depending on the other three variables through 605 \autoref{eq: PE_s}.564 \autoref{eq:MB_s}. 606 565 This so-called \textit{generalised vertical coordinate} \citep{kasahara_MWR74} is in fact 607 an Arbitrary Lagrangian--Eulerian (ALE) coordinate. 608 Indeed, one has a great deal of freedom in the choice of expression for $s$. The choice determines 609 which part of the vertical velocity (defined from a fixed referential) will cross the levels (Eulerian part) and 610 which part will be used to move them (Lagrangian part). 611 The coordinate is also sometime referenced as an adaptive coordinate \citep{hofmeister.burchard.ea_OM10}, 612 since the coordinate system is adapted in the course of the simulation. 566 an \textbf{A}rbitrary \textbf{L}agrangian--\textbf{E}ulerian (ALE) coordinate. 567 Indeed, one has a great deal of freedom in the choice of expression for $s$. 568 The choice determines which part of the vertical velocity (defined from a fixed referential) 569 will cross the levels (Eulerian part) and which part will be used to move them (Lagrangian part). 570 The coordinate is also sometimes referenced as an adaptive coordinate 571 \citep{hofmeister.burchard.ea_OM10}, since the coordinate system is adapted in 572 the course of the simulation. 613 573 Its most often used implementation is via an ALE algorithm, 614 574 in which a pure lagrangian step is followed by regridding and remapping steps, … … 627 587 The horizontal velocity in ocean models measures motions in the horizontal plane, 628 588 perpendicular to the local gravitational field. 629 That is, horizontal velocity is mathematically the same regardless of the vertical coordinate, be it geopotential,630 isopycnal, pressure, or terrain following.589 That is, horizontal velocity is mathematically the same regardless of the vertical coordinate, 590 be it geopotential, isopycnal, pressure, or terrain following. 631 591 The key motivation for maintaining the same horizontal velocity component is that 632 592 the hydrostatic and geostrophic balances are dominant in the large-scale ocean. 633 Use of an alternative quasi -horizontal velocity, for example one oriented parallel to the generalized surface, 593 Use of an alternative quasi -horizontal velocity, 594 for example one oriented parallel to the generalized surface, 634 595 would lead to unacceptable numerical errors. 635 596 Correspondingly, the vertical direction is anti -parallel to the gravitational force in … … 638 599 the surface of a constant generalized vertical coordinate. 639 600 640 It is the method used to measure transport across the generalized vertical coordinate surfaces which differs between 641 the vertical coordinate choices. 642 That is, computation of the dia-surface velocity component represents the fundamental distinction between 601 It is the method used to measure transport across the generalized vertical coordinate surfaces which 602 differs between the vertical coordinate choices. 603 That is, 604 computation of the dia-surface velocity component represents the fundamental distinction between 643 605 the various coordinates. 644 In some models, such as geopotential, pressure, and terrain following, this transport is typically diagnosed from 645 volume or mass conservation. 646 In other models, such as isopycnal layered models, this transport is prescribed based on assumptions about 647 the physical processes producing a flux across the layer interfaces. 606 In some models, such as geopotential, pressure, and terrain following, 607 this transport is typically diagnosed from volume or mass conservation. 608 In other models, such as isopycnal layered models, 609 this transport is prescribed based on assumptions about the physical processes producing 610 a flux across the layer interfaces. 648 611 649 612 In this section we first establish the PE in the generalised vertical $s$-coordinate, … … 651 614 %} 652 615 653 % ------------------------------------------------------------------------------------------------------------- 654 % The s-coordinate Formulation 655 % ------------------------------------------------------------------------------------------------------------- 616 %% ================================================================================================= 656 617 \subsection{\textit{S}-coordinate formulation} 657 618 658 Starting from the set of equations established in \autoref{sec:PE_zco} for the special case $k = z$ and 659 thus $e_3 = 1$, we introduce an arbitrary vertical coordinate $s = s(i,j,k,t)$, 619 Starting from the set of equations established in \autoref{sec:MB_zco} for 620 the special case $k = z$ and thus $e_3 = 1$, 621 we introduce an arbitrary vertical coordinate $s = s(i,j,k,t)$, 660 622 which includes $z$-, \zstar- and $\sigma$-coordinates as special cases 661 623 ($s = z$, $s = \zstar$, and $s = \sigma = z / H$ or $ = z / \lt( H + \eta \rt)$, resp.). 662 A formal derivation of the transformed equations is given in \autoref{apdx:A}. 663 Let us define the vertical scale factor by $e_3 = \partial_s z$ ($e_3$ is now a function of $(i,j,k,t)$ ), 624 A formal derivation of the transformed equations is given in \autoref{apdx:SCOORD}. 625 Let us define the vertical scale factor by $e_3 = \partial_s z$ 626 ($e_3$ is now a function of $(i,j,k,t)$ ), 664 627 and the slopes in the $(i,j)$ directions between $s$- and $z$-surfaces by: 665 628 \begin{equation} 666 \label{eq: PE_sco_slope}629 \label{eq:MB_sco_slope} 667 630 \sigma_1 = \frac{1}{e_1} \; \lt. \pd[z]{i} \rt|_s \quad \text{and} \quad 668 631 \sigma_2 = \frac{1}{e_2} \; \lt. \pd[z]{j} \rt|_s 669 632 \end{equation} 670 We also introduce $\omega$, a dia-surface velocity component, defined as the velocity671 relative to the moving $s$-surfaces and normal to them:633 We also introduce $\omega$, a dia-surface velocity component, 634 defined as the velocity relative to the moving $s$-surfaces and normal to them: 672 635 \[ 673 % \label{eq: PE_sco_w}636 % \label{eq:MB_sco_w} 674 637 \omega = w - \, \lt. \pd[z]{t} \rt|_s - \sigma_1 \, u - \sigma_2 \, v 675 638 \] 676 639 677 The equations solved by the ocean model \autoref{eq:PE} in $s$-coordinate can be written as follows 678 (see \autoref{sec:A_momentum}): 679 680 \begin{itemize} 681 \item \textbf{Vector invariant form of the momentum equation}: 682 \begin{multline*} 683 % \label{eq:PE_sco_u_vector} 684 \pd[u]{t} = + (\zeta + f) \, v - \frac{1}{2 \, e_1} \pd[]{i} (u^2 + v^2) - \frac{1}{e_3} \omega \pd[u]{k} \\ 685 - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o} \sigma_1 686 + D_u^{\vect U} + F_u^{\vect U} 687 \end{multline*} 688 \begin{multline*} 689 % \label{eq:PE_sco_v_vector} 690 \pd[v]{t} = - (\zeta + f) \, u - \frac{1}{2 \, e_2} \pd[]{j}(u^2 + v^2) - \frac{1}{e_3} \omega \pd[v]{k} \\ 691 - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o} \sigma_2 692 + D_v^{\vect U} + F_v^{\vect U} 693 \end{multline*} 694 \item \textbf{Flux form of the momentum equation}: 695 \begin{multline*} 696 % \label{eq:PE_sco_u_flux} 697 \frac{1}{e_3} \pd[(e_3 \, u)]{t} = + \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, v \\ 698 - \frac{1}{e_1 \; e_2 \; e_3} \lt( \pd[(e_2 \, e_3 \, u \, u)]{i} + \pd[(e_1 \, e_3 \, v \, u)]{j} \rt) \\ 699 - \frac{1}{e_3} \pd[(\omega \, u)]{k} 700 - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) 701 - g \frac{\rho}{\rho_o} \sigma_1 + D_u^{\vect U} + F_u^{\vect U} 702 \end{multline*} 703 \begin{multline*} 704 % \label{eq:PE_sco_v_flux} 705 \frac{1}{e_3} \pd[(e_3 \, v)]{t} = - \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, u \\ 706 - \frac{1}{e_1 \; e_2 \; e_3} \lt( \pd[( e_2 \; e_3 \, u \, v)]{i} + \pd[(e_1 \; e_3 \, v \, v)]{j} \rt) \\ 707 - \frac{1}{e_3} \pd[(\omega \, v)]{k} 708 - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) 709 - g \frac{\rho}{\rho_o}\sigma_2 + D_v^{\vect U} + F_v^{\vect U} 710 \end{multline*} 640 The equations solved by the ocean model \autoref{eq:MB_PE} in $s$-coordinate can be written as follows 641 (see \autoref{sec:SCOORD_momentum}): 642 643 \begin{description} 644 \item [Vector invariant form of the momentum equation] 645 \begin{gather*} 646 % \label{eq:MB_sco_u_vector} 647 \pd[u]{t} = + (\zeta + f) \, v - \frac{1}{2 \, e_1} \pd[]{i} (u^2 + v^2) - \frac{1}{e_3} \omega \pd[u]{k} - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o} \sigma_1 + D_u^{\vect U} + F_u^{\vect U} \\ 648 % \label{eq:MB_sco_v_vector} 649 \pd[v]{t} = - (\zeta + f) \, u - \frac{1}{2 \, e_2} \pd[]{j} (u^2 + v^2) - \frac{1}{e_3} \omega \pd[v]{k} - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o} \sigma_2 + D_v^{\vect U} + F_v^{\vect U} 650 \end{gather*} 651 \item [Flux form of the momentum equation] 652 \begin{alignat*}{2} 653 % \label{eq:MB_sco_u_flux} 654 \frac{1}{e_3} \pd[(e_3 \, u)]{t} = &+ \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, v - \frac{1}{e_1 \; e_2 \; e_3} \lt( \pd[(e_2 \, e_3 \, u \, u)]{i} + \pd[(e_1 \, e_3 \, v \, u)]{j} \rt) - \frac{1}{e_3} \pd[(\omega \, u)]{k} \\ 655 &- \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o} \sigma_1 + D_u^{\vect U} + F_u^{\vect U} 656 \end{alignat*} 657 \begin{alignat*}{2} 658 % \label{eq:MB_sco_v_flux} 659 \frac{1}{e_3} \pd[(e_3 \, v)]{t} = &- \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, u - \frac{1}{e_1 \; e_2 \; e_3} \lt( \pd[( e_2 \; e_3 \, u \, v)]{i} + \pd[(e_1 \; e_3 \, v \, v)]{j} \rt) - \frac{1}{e_3} \pd[(\omega \, v)]{k} \\ 660 &- \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o}\sigma_2 + D_v^{\vect U} + F_v^{\vect U} 661 \end{alignat*} 711 662 where the relative vorticity, $\zeta$, the surface pressure gradient, 712 663 and the hydrostatic pressure have the same expressions as in $z$-coordinates although 713 664 they do not represent exactly the same quantities. 714 $\omega$ is provided by the continuity equation (see \autoref{apdx: A}):665 $\omega$ is provided by the continuity equation (see \autoref{apdx:SCOORD}): 715 666 \[ 716 % \label{eq: PE_sco_continuity}667 % \label{eq:MB_sco_continuity} 717 668 \pd[e_3]{t} + e_3 \; \chi + \pd[\omega]{s} = 0 \quad \text{with} \quad 718 669 \chi = \frac{1}{e_1 e_2 e_3} \lt( \pd[(e_2 e_3 \, u)]{i} + \pd[(e_1 e_3 \, v)]{j} \rt) 719 670 \] 720 \item \textit{tracer equations}: 721 \begin{multline*} 722 % \label{eq:PE_sco_t} 723 \frac{1}{e_3} \pd[(e_3 \, T)]{t} = - \frac{1}{e_1 e_2 e_3} \lt( \pd[(e_2 e_3 \, u \, T)]{i} 724 + \pd[(e_1 e_3 \, v \, T)]{j} \rt) \\ 725 - \frac{1}{e_3} \pd[(T \, \omega)]{k} + D^T + F^S 726 \end{multline*} 727 \begin{multline} 728 % \label{eq:PE_sco_s} 729 \frac{1}{e_3} \pd[(e_3 \, S)]{t} = - \frac{1}{e_1 e_2 e_3} \lt( \pd[(e_2 e_3 \, u \, S)]{i} 730 + \pd[(e_1 e_3 \, v \, S)]{j} \rt) \\ 731 - \frac{1}{e_3} \pd[(S \, \omega)]{k} + D^S + F^S 732 \end{multline} 733 \end{itemize} 671 \item [Tracer equations] 672 \begin{gather*} 673 % \label{eq:MB_sco_t} 674 \frac{1}{e_3} \pd[(e_3 \, T)]{t} = - \frac{1}{e_1 e_2 e_3} \lt( \pd[(e_2 e_3 \, u \, T)]{i} + \pd[(e_1 e_3 \, v \, T)]{j} \rt) - \frac{1}{e_3} \pd[(T \, \omega)]{k} + D^T + F^S \\ 675 % \label{eq:MB_sco_s} 676 \frac{1}{e_3} \pd[(e_3 \, S)]{t} = - \frac{1}{e_1 e_2 e_3} \lt( \pd[(e_2 e_3 \, u \, S)]{i} + \pd[(e_1 e_3 \, v \, S)]{j} \rt) - \frac{1}{e_3} \pd[(S \, \omega)]{k} + D^S + F^S 677 \end{gather*} 678 \end{description} 734 679 The equation of state has the same expression as in $z$-coordinate, 735 680 and similar expressions are used for mixing and forcing terms. … … 741 686 } 742 687 743 % ------------------------------------------------------------------------------------------------------------- 744 % Curvilinear \zstar-coordinate System 745 % ------------------------------------------------------------------------------------------------------------- 688 %% ================================================================================================= 746 689 \subsection{Curvilinear \zstar-coordinate system} 747 \label{subsec:PE_zco_star} 748 749 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 750 \begin{figure}[!b] 751 \begin{center} 752 \includegraphics[width=\textwidth]{Fig_z_zstar} 753 \caption{ 754 \protect\label{fig:z_zstar} 755 (a) $z$-coordinate in linear free-surface case ; 756 (b) $z$-coordinate in non-linear free surface case ; 757 (c) re-scaled height coordinate 690 \label{subsec:MB_zco_star} 691 692 \begin{figure} 693 \centering 694 \includegraphics[width=0.66\textwidth]{Fig_z_zstar} 695 \caption[Curvilinear z-coordinate systems (\{non-\}linear free-surface cases and re-scaled \zstar)]{ 696 \begin{enumerate*}[label=(\textit{\alph*})] 697 \item $z$-coordinate in linear free-surface case; 698 \item $z$-coordinate in non-linear free surface case; 699 \item re-scaled height coordinate 758 700 (become popular as the \zstar-coordinate \citep{adcroft.campin_OM04}). 759 } 760 \end{center} 701 \end{enumerate*} 702 } 703 \label{fig:MB_z_zstar} 761 704 \end{figure} 762 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 763 764 In this case, the free surface equation is nonlinear, and the variations of volume are fully taken into account. 765 These coordinates systems is presented in a report \citep{levier.treguier.ea_rpt07} available on the \NEMO\ web site. 766 767 The \zstar coordinate approach is an unapproximated, non-linear free surface implementation which allows one to 768 deal with large amplitude free-surface variations relative to the vertical resolution \citep{adcroft.campin_OM04}. 769 In the \zstar formulation, 770 the variation of the column thickness due to sea-surface undulations is not concentrated in the surface level, 771 as in the $z$-coordinate formulation, but is equally distributed over the full water column. 705 706 In this case, the free surface equation is nonlinear, 707 and the variations of volume are fully taken into account. 708 These coordinates systems is presented in a report \citep{levier.treguier.ea_rpt07} available on 709 the \NEMO\ web site. 710 711 The \zstar\ coordinate approach is an unapproximated, non-linear free surface implementation which 712 allows one to deal with large amplitude free-surface variations relative to the vertical resolution 713 \citep{adcroft.campin_OM04}. 714 In the \zstar\ formulation, the variation of the column thickness due to sea-surface undulations is 715 not concentrated in the surface level, as in the $z$-coordinate formulation, 716 but is equally distributed over the full water column. 772 717 Thus vertical levels naturally follow sea-surface variations, with a linear attenuation with depth, 773 as illustrated by \autoref{fig:z_zstar}. 774 Note that with a flat bottom, such as in \autoref{fig:z_zstar}, the bottom-following $z$ coordinate and \zstar are equivalent. 718 as illustrated by \autoref{fig:MB_z_zstar}. 719 Note that with a flat bottom, such as in \autoref{fig:MB_z_zstar}, 720 the bottom-following $z$ coordinate and \zstar\ are equivalent. 775 721 The definition and modified oceanic equations for the rescaled vertical coordinate \zstar, 776 722 including the treatment of fresh-water flux at the surface, are detailed in Adcroft and Campin (2004). 777 723 The major points are summarized here. 778 The position (\zstar) and vertical discretization ( \zstar) are expressed as:724 The position (\zstar) and vertical discretization ($\delta \zstar$) are expressed as: 779 725 \[ 780 % \label{eq:PE_z-star} 781 H + \zstar = (H + z) / r \quad \text{and} \quad \delta \zstar 782 = \delta z / r \quad \text{with} \quad r 783 = \frac{H + \eta}{H} . 726 % \label{eq:MB_z-star} 727 H + \zstar = (H + z) / r \quad \text{and} \quad \delta \zstar = \delta z / r \quad \text{with} \quad r = \frac{H + \eta}{H} 784 728 \] 785 729 Simple re-organisation of the above expressions gives 786 730 \[ 787 % \label{eq: PE_zstar_2}788 \zstar = H \lt( \frac{z - \eta}{H + \eta} \rt) .731 % \label{eq:MB_zstar_2} 732 \zstar = H \lt( \frac{z - \eta}{H + \eta} \rt) 789 733 \] 790 734 Since the vertical displacement of the free surface is incorporated in the vertical coordinate \zstar, 791 the upper and lower boundaries are at fixed \zstarposition,735 the upper and lower boundaries are at fixed \zstar\ position, 792 736 $\zstar = 0$ and $\zstar = -H$ respectively. 793 737 Also the divergence of the flow field is no longer zero as shown by the continuity equation: 794 738 \[ 795 \pd[r]{t} = \nabla_{\zstar} \cdot \lt( r \; \vect U_h \rt) + \pd[r \; w^*]{\zstar} = 0 .739 \pd[r]{t} = \nabla_{\zstar} \cdot \lt( r \; \vect U_h \rt) + \pd[r \; w^*]{\zstar} = 0 796 740 \] 797 This \zstar coordinate is closely related to the "eta"coordinate used in many atmospheric models798 (see Black (1994) for a review of etacoordinate atmospheric models).741 This \zstar\ coordinate is closely related to the $\eta$ coordinate used in many atmospheric models 742 (see Black (1994) for a review of $\eta$ coordinate atmospheric models). 799 743 It was originally used in ocean models by Stacey et al. (1995) for studies of tides next to shelves, 800 744 and it has been recently promoted by Adcroft and Campin (2004) for global climate modelling. 801 745 802 The surfaces of constant \zstar are quasi-horizontal.803 Indeed, the \zstar coordinate reduces to $z$ when $\eta$ is zero.746 The surfaces of constant \zstar\ are quasi-horizontal. 747 Indeed, the \zstar\ coordinate reduces to $z$ when $\eta$ is zero. 804 748 In general, when noting the large differences between 805 749 undulations of the bottom topography versus undulations in the surface height, 806 it is clear that surfaces constant \zstar are very similar to the depth surfaces.750 it is clear that surfaces constant \zstar\ are very similar to the depth surfaces. 807 751 These properties greatly reduce difficulties of computing the horizontal pressure gradient relative to 808 terrain following sigma models discussed in \autoref{subsec: PE_sco}.752 terrain following sigma models discussed in \autoref{subsec:MB_sco}. 809 753 Additionally, since $\zstar = z$ when $\eta = 0$, 810 no flow is spontaneously generated in an unforced ocean starting from rest, regardless the bottom topography. 811 This behaviour is in contrast to the case with "s"-models, where pressure gradient errors in the presence of 812 nontrivial topographic variations can generate nontrivial spontaneous flow from a resting state, 754 no flow is spontaneously generated in an unforced ocean starting from rest, 755 regardless the bottom topography. 756 This behaviour is in contrast to the case with ``s''-models, 757 where pressure gradient errors in the presence of nontrivial topographic variations can generate 758 nontrivial spontaneous flow from a resting state, 813 759 depending on the sophistication of the pressure gradient solver. 814 The quasi 815 neutral physics parameterizations in \zstar 760 The quasi-horizontal nature of the coordinate surfaces also facilitates the implementation of 761 neutral physics parameterizations in \zstar\ models using the same techniques as in $z$-models 816 762 (see Chapters 13-16 of \cite{griffies_bk04}) for a discussion of neutral physics in $z$-models, 817 763 as well as \autoref{sec:LDF_slp} in this document for treatment in \NEMO). 818 764 819 The range over which \zstar 765 The range over which \zstar\ varies is time independent $-H \leq \zstar \leq 0$. 820 766 Hence, all cells remain nonvanishing, so long as the surface height maintains $\eta > -H$. 821 This is a minor constraint relative to that encountered on the surface height when using $s = z$ or $s = z - \eta$. 822 823 Because \zstar has a time independent range, all grid cells have static increments ds, 767 This is a minor constraint relative to that encountered on the surface height when 768 using $s = z$ or $s = z - \eta$. 769 770 Because \zstar\ has a time independent range, all grid cells have static increments ds, 824 771 and the sum of the vertical increments yields the time independent ocean depth. %k ds = H. 825 The \zstar coordinate is therefore invisible to undulations of the free surface,772 The \zstar\ coordinate is therefore invisible to undulations of the free surface, 826 773 since it moves along with the free surface. 827 This property means that no spurious vertical transport is induced across surfaces of constant \zstar by828 the motion of external gravity waves.774 This property means that no spurious vertical transport is induced across 775 surfaces of constant \zstar\ by the motion of external gravity waves. 829 776 Such spurious transport can be a problem in z-models, especially those with tidal forcing. 830 Quite generally, the time independent range for the \zstar coordinate is a very convenient property that 831 allows for a nearly arbitrary vertical resolution even in the presence of large amplitude fluctuations of 832 the surface height, again so long as $\eta > -H$. 777 Quite generally, 778 the time independent range for the \zstar\ coordinate is a very convenient property that 779 allows for a nearly arbitrary vertical resolution even in 780 the presence of large amplitude fluctuations of the surface height, again so long as $\eta > -H$. 833 781 %end MOM doc %%% 834 782 835 \newpage 836 837 % ------------------------------------------------------------------------------------------------------------- 838 % Terrain following coordinate System 839 % ------------------------------------------------------------------------------------------------------------- 783 %% ================================================================================================= 840 784 \subsection{Curvilinear terrain-following \textit{s}--coordinate} 841 \label{subsec:PE_sco} 842 843 % ------------------------------------------------------------------------------------------------------------- 844 % Introduction 845 % ------------------------------------------------------------------------------------------------------------- 846 \subsubsection{Introduction} 785 \label{subsec:MB_sco} 847 786 848 787 Several important aspects of the ocean circulation are influenced by bottom topography. 849 Of course, the most important is that bottom topography determines deep ocean sub-basins, barriers, sills and 850 channels that strongly constrain the path of water masses, but more subtle effects exist. 851 For example, the topographic $\beta$-effect is usually larger than the planetary one along continental slopes. 788 Of course, the most important is that bottom topography determines deep ocean sub-basins, barriers, 789 sills and channels that strongly constrain the path of water masses, but more subtle effects exist. 790 For example, 791 the topographic $\beta$-effect is usually larger than the planetary one along continental slopes. 852 792 Topographic Rossby waves can be excited and can interact with the mean current. 853 In the $z$-coordinate system presented in the previous section (\autoref{sec: PE_zco}),793 In the $z$-coordinate system presented in the previous section (\autoref{sec:MB_zco}), 854 794 $z$-surfaces are geopotential surfaces. 855 795 The bottom topography is discretised by steps. … … 857 797 large localized depth gradients associated with large localized vertical velocities. 858 798 The response to such a velocity field often leads to numerical dispersion effects. 859 One solution to strongly reduce this error is to use a partial step representation of bottom topography instead of860 a full step one \cite{pacanowski.gnanadesikan_MWR98}.799 One solution to strongly reduce this error is to use a partial step representation of 800 bottom topography instead of a full step one \cite{pacanowski.gnanadesikan_MWR98}. 861 801 Another solution is to introduce a terrain-following coordinate system (hereafter $s$-coordinate). 862 802 863 The $s$-coordinate avoids the discretisation error in the depth field since the layers of 864 computation are gradually adjusted with depth to the ocean bottom. 865 Relatively small topographic features as well as gentle, large-scale slopes of the sea floor in the deep ocean, 866 which would be ignored in typical $z$-model applications with the largest grid spacing at greatest depths, 803 The $s$-coordinate avoids the discretisation error in the depth field since 804 the layers of computation are gradually adjusted with depth to the ocean bottom. 805 Relatively small topographic features as well as 806 gentle, large-scale slopes of the sea floor in the deep ocean, 807 which would be ignored in typical $z$-model applications with 808 the largest grid spacing at greatest depths, 867 809 can easily be represented (with relatively low vertical resolution). 868 A terrain-following model (hereafter $s$-model) also facilitates the modelling of the boundary layer flows over 869 a large depth range, which in the framework of the $z$-model would require high vertical resolution over 810 A terrain-following model (hereafter $s$-model) also facilitates 811 the modelling of the boundary layer flows over a large depth range, 812 which in the framework of the $z$-model would require high vertical resolution over 870 813 the whole depth range. 871 Moreover, with a $s$-coordinate it is possible, at least in principle, to have the bottom and the sea surface as 814 Moreover, 815 with a $s$-coordinate it is possible, at least in principle, to have the bottom and the sea surface as 872 816 the only boundaries of the domain (no more lateral boundary condition to specify). 873 Nevertheless, a $s$-coordinate also has its drawbacks. Perfectly adapted to a homogeneous ocean, 817 Nevertheless, a $s$-coordinate also has its drawbacks. 818 Perfectly adapted to a homogeneous ocean, 874 819 it has strong limitations as soon as stratification is introduced. 875 820 The main two problems come from the truncation error in the horizontal pressure gradient and 876 821 a possibly increased diapycnal diffusion. 877 The horizontal pressure force in $s$-coordinate consists of two terms (see \autoref{apdx:A}), 878 822 The horizontal pressure force in $s$-coordinate consists of two terms (see \autoref{apdx:SCOORD}), 879 823 \begin{equation} 880 \label{eq: PE_p_sco}824 \label{eq:MB_p_sco} 881 825 \nabla p |_z = \nabla p |_s - \frac{1}{e_3} \pd[p]{s} \nabla z |_s 882 826 \end{equation} 883 827 884 The second term in \autoref{eq: PE_p_sco} depends on the tilt of the coordinate surface and828 The second term in \autoref{eq:MB_p_sco} depends on the tilt of the coordinate surface and 885 829 leads to a truncation error that is not present in a $z$-model. 886 In the special case of a $\sigma$-coordinate (i.e. a depth-normalised coordinate system $\sigma = z/H$), 887 \citet{haney_JPO91} and \citet{beckmann.haidvogel_JPO93} have given estimates of the magnitude of this truncation error. 888 It depends on topographic slope, stratification, horizontal and vertical resolution, the equation of state, 889 and the finite difference scheme. 830 In the special case of a $\sigma$-coordinate 831 (i.e. a depth-normalised coordinate system $\sigma = z/H$), 832 \citet{haney_JPO91} and \citet{beckmann.haidvogel_JPO93} have given estimates of 833 the magnitude of this truncation error. 834 It depends on topographic slope, stratification, horizontal and vertical resolution, 835 the equation of state, and the finite difference scheme. 890 836 This error limits the possible topographic slopes that a model can handle at 891 837 a given horizontal and vertical resolution. 892 838 This is a severe restriction for large-scale applications using realistic bottom topography. 893 The large-scale slopes require high horizontal resolution, and the computational cost becomes prohibitive. 839 The large-scale slopes require high horizontal resolution, 840 and the computational cost becomes prohibitive. 894 841 This problem can be at least partially overcome by mixing $s$-coordinate and 895 step-like representation of bottom topography \citep{gerdes_JGR93*a,gerdes_JGR93*b,madec.delecluse.ea_JPO96}. 842 step-like representation of bottom topography 843 \citep{gerdes_JGR93*a,gerdes_JGR93*b,madec.delecluse.ea_JPO96}. 896 844 However, the definition of the model domain vertical coordinate becomes then a non-trivial thing for 897 845 a realistic bottom topography: 898 an envelope topography is defined in $s$-coordinate on which a full or899 partial step bottom topography is then applied in order to adjust the model depth to the observed one 900 (see \autoref{sec:DOM_zgr}.901 902 For numerical reasons a minimum of diffusion is required along the coordinate surfaces of903 any finite difference model.846 an envelope topography is defined in $s$-coordinate on which 847 a full or partial step bottom topography is then applied in order to 848 adjust the model depth to the observed one (see \autoref{subsec:DOM_zgr}). 849 850 For numerical reasons a minimum of diffusion is required along 851 the coordinate surfaces of any finite difference model. 904 852 It causes spurious diapycnal mixing when coordinate surfaces do not coincide with isoneutral surfaces. 905 853 This is the case for a $z$-model as well as for a $s$-model. 906 However, density varies more strongly on $s$-surfaces than on horizontal surfaces in regions of 907 large topographic slopes, implying larger diapycnal diffusion in a $s$-model than in a $z$-model. 908 Whereas such a diapycnal diffusion in a $z$-model tends to weaken horizontal density (pressure) gradients and thus 909 the horizontal circulation, it usually reinforces these gradients in a $s$-model, creating spurious circulation. 910 For example, imagine an isolated bump of topography in an ocean at rest with a horizontally uniform stratification. 854 However, density varies more strongly on $s$-surfaces than on horizontal surfaces in 855 regions of large topographic slopes, 856 implying larger diapycnal diffusion in a $s$-model than in a $z$-model. 857 Whereas such a diapycnal diffusion in a $z$-model tends to 858 weaken horizontal density (pressure) gradients and thus the horizontal circulation, 859 it usually reinforces these gradients in a $s$-model, creating spurious circulation. 860 For example, imagine an isolated bump of topography in 861 an ocean at rest with a horizontally uniform stratification. 911 862 Spurious diffusion along $s$-surfaces will induce a bump of isoneutral surfaces over the topography, 912 863 and thus will generate there a baroclinic eddy. 913 864 In contrast, the ocean will stay at rest in a $z$-model. 914 As for the truncation error, the problem can be reduced by introducing the terrain-following coordinate below 915 the strongly stratified portion of the water column (\ie\ the main thermocline) \citep{madec.delecluse.ea_JPO96}. 916 An alternate solution consists of rotating the lateral diffusive tensor to geopotential or to isoneutral surfaces 917 (see \autoref{subsec:PE_ldf}). 865 As for the truncation error, the problem can be reduced by 866 introducing the terrain-following coordinate below the strongly stratified portion of the water column 867 (\ie\ the main thermocline) \citep{madec.delecluse.ea_JPO96}. 868 An alternate solution consists of rotating the lateral diffusive tensor to 869 geopotential or to isoneutral surfaces (see \autoref{subsec:MB_ldf}). 918 870 Unfortunately, the slope of isoneutral surfaces relative to the $s$-surfaces can very large, 919 strongly exceeding the stability limit of such a operator when it is discretized (see \autoref{chap:LDF}). 920 921 The $s$-coordinates introduced here \citep{lott.madec.ea_OM90,madec.delecluse.ea_JPO96} differ mainly in two aspects from 922 similar models: 923 it allows a representation of bottom topography with mixed full or partial step-like/terrain following topography; 871 strongly exceeding the stability limit of such a operator when it is discretized 872 (see \autoref{chap:LDF}). 873 874 The $s$-coordinates introduced here \citep{lott.madec.ea_OM90,madec.delecluse.ea_JPO96} 875 differ mainly in two aspects from similar models: 876 it allows a representation of bottom topography with 877 mixed full or partial step-like/terrain following topography; 924 878 It also offers a completely general transformation, $s=s(i,j,z)$ for the vertical coordinate. 925 879 926 % ------------------------------------------------------------------------------------------------------------- 927 % Curvilinear z-tilde coordinate System 928 % ------------------------------------------------------------------------------------------------------------- 929 \subsection{\texorpdfstring{Curvilinear \ztilde-coordinate}{}} 930 \label{subsec:PE_zco_tilde} 931 932 The \ztilde -coordinate has been developed by \citet{leclair.madec_OM11}. 880 %% ================================================================================================= 881 \subsection{Curvilinear \ztilde-coordinate} 882 \label{subsec:MB_zco_tilde} 883 884 The \ztilde-coordinate has been developed by \citet{leclair.madec_OM11}. 933 885 It is available in \NEMO\ since the version 3.4 and is more robust in version 4.0 than previously. 934 886 Nevertheless, it is currently not robust enough to be used in all possible configurations. 935 887 Its use is therefore not recommended. 936 888 937 \newpage 938 939 % ================================================================ 940 % Subgrid Scale Physics 941 % ================================================================ 889 %% ================================================================================================= 942 890 \section{Subgrid scale physics} 943 \label{sec:PE_zdf_ldf} 944 945 The hydrostatic primitive equations describe the behaviour of a geophysical fluid at space and time scales larger than 946 a few kilometres in the horizontal, a few meters in the vertical and a few minutes. 947 They are usually solved at larger scales: the specified grid spacing and time step of the numerical model. 891 \label{sec:MB_zdf_ldf} 892 893 The hydrostatic primitive equations describe the behaviour of a geophysical fluid at 894 space and time scales larger than a few kilometres in the horizontal, 895 a few meters in the vertical and a few minutes. 896 They are usually solved at larger scales: the specified grid spacing and time step of 897 the numerical model. 948 898 The effects of smaller scale motions (coming from the advective terms in the Navier-Stokes equations) 949 899 must be represented entirely in terms of large-scale patterns to close the equations. … … 956 906 small scale processes \textit{in fine} balance the surface input of kinetic energy and heat. 957 907 958 The control exerted by gravity on the flow induces a strong anisotropy between the lateral and vertical motions. 908 The control exerted by gravity on the flow induces a strong anisotropy between 909 the lateral and vertical motions. 959 910 Therefore subgrid-scale physics \textbf{D}$^{\vect U}$, $D^{S}$ and $D^{T}$ in 960 \autoref{eq: PE_dyn}, \autoref{eq:PE_tra_T} and \autoref{eq:PE_tra_S} are divided into961 a lateral part \textbf{D}$^{l \vect U}$, $D^{l S}$ and $D^{l T}$ and911 \autoref{eq:MB_PE_dyn}, \autoref{eq:MB_PE_tra_T} and \autoref{eq:MB_PE_tra_S} are divided into 912 a lateral part \textbf{D}$^{l \vect U}$, $D^{l S}$ and $D^{l T}$ and 962 913 a vertical part \textbf{D}$^{v \vect U}$, $D^{v S}$ and $D^{v T}$. 963 The formulation of these terms and their underlying physics are briefly discussed in the next two subsections. 964 965 % ------------------------------------------------------------------------------------------------------------- 966 % Vertical Subgrid Scale Physics 967 % ------------------------------------------------------------------------------------------------------------- 914 The formulation of these terms and their underlying physics are briefly discussed in 915 the next two subsections. 916 917 %% ================================================================================================= 968 918 \subsection{Vertical subgrid scale physics} 969 \label{subsec: PE_zdf}970 971 The model resolution is always larger than the scale at which the major sources of vertical turbulence occur972 (shear instability, internal wave breaking...).919 \label{subsec:MB_zdf} 920 921 The model resolution is always larger than the scale at which 922 the major sources of vertical turbulence occur (shear instability, internal wave breaking...). 973 923 Turbulent motions are thus never explicitly solved, even partially, but always parameterized. 974 The vertical turbulent fluxes are assumed to depend linearly on the gradients of large-scale quantities 975 (for example, the turbulent heat flux is given by $\overline{T' w'} = -A^{v T} \partial_z \overline T$, 924 The vertical turbulent fluxes are assumed to depend linearly on 925 the gradients of large-scale quantities (for example, 926 the turbulent heat flux is given by $\overline{T' w'} = -A^{v T} \partial_z \overline T$, 976 927 where $A^{v T}$ is an eddy coefficient). 977 928 This formulation is analogous to that of molecular diffusion and dissipation. … … 981 932 The resulting vertical momentum and tracer diffusive operators are of second order: 982 933 \begin{equation} 983 \label{eq: PE_zdf}934 \label{eq:MB_zdf} 984 935 \begin{gathered} 985 \vect D^{v \vect U} = \pd[]{z} \lt( A^{vm} \pd[\vect U_h]{z} \rt) \ , \\986 D^{vT} = \pd[]{z} \lt( A^{vT} \pd[T]{z} \rt) \ quad \text{and} \quad936 \vect D^{v \vect U} = \pd[]{z} \lt( A^{vm} \pd[\vect U_h]{z} \rt) \text{,} \ 937 D^{vT} = \pd[]{z} \lt( A^{vT} \pd[T]{z} \rt) \ \text{and} \ 987 938 D^{vS} = \pd[]{z} \lt( A^{vT} \pd[S]{z} \rt) 988 939 \end{gathered} 989 940 \end{equation} 990 where $A^{vm}$ and $A^{vT}$ are the vertical eddy viscosity and diffusivity coefficients, respectively. 941 where $A^{vm}$ and $A^{vT}$ are the vertical eddy viscosity and diffusivity coefficients, 942 respectively. 991 943 At the sea surface and at the bottom, turbulent fluxes of momentum, heat and salt must be specified 992 944 (see \autoref{chap:SBC} and \autoref{chap:ZDF} and \autoref{sec:TRA_bbl}). 993 945 All the vertical physics is embedded in the specification of the eddy coefficients. 994 946 They can be assumed to be either constant, or function of the local fluid properties 995 (\eg\ Richardson number, Brunt-V ais\"{a}l\"{a} frequency, distance from the boundary ...),947 (\eg\ Richardson number, Brunt-V\"{a}is\"{a}l\"{a} frequency, distance from the boundary ...), 996 948 or computed from a turbulent closure model. 997 949 The choices available in \NEMO\ are discussed in \autoref{chap:ZDF}). 998 950 999 % ------------------------------------------------------------------------------------------------------------- 1000 % Lateral Diffusive and Viscous Operators Formulation 1001 % ------------------------------------------------------------------------------------------------------------- 951 %% ================================================================================================= 1002 952 \subsection{Formulation of the lateral diffusive and viscous operators} 1003 \label{subsec: PE_ldf}953 \label{subsec:MB_ldf} 1004 954 1005 955 Lateral turbulence can be roughly divided into a mesoscale turbulence associated with eddies 1006 956 (which can be solved explicitly if the resolution is sufficient since 1007 957 their underlying physics are included in the primitive equations), 1008 and a sub mesoscale turbulence which is never explicitly solved even partially, but always parameterized. 1009 The formulation of lateral eddy fluxes depends on whether the mesoscale is below or above the grid-spacing 1010 (\ie\ the model is eddy-resolving or not). 958 and a sub mesoscale turbulence which is never explicitly solved even partially, 959 but always parameterized. 960 The formulation of lateral eddy fluxes depends on whether 961 the mesoscale is below or above the grid-spacing (\ie\ the model is eddy-resolving or not). 1011 962 1012 963 In non-eddy-resolving configurations, the closure is similar to that used for the vertical physics. 1013 The lateral turbulent fluxes are assumed to depend linearly on the lateral gradients of large-scale quantities. 964 The lateral turbulent fluxes are assumed to depend linearly on 965 the lateral gradients of large-scale quantities. 1014 966 The resulting lateral diffusive and dissipative operators are of second order. 1015 Observations show that lateral mixing induced by mesoscale turbulence tends to be along isopycnal surfaces 967 Observations show that 968 lateral mixing induced by mesoscale turbulence tends to be along isopycnal surfaces 1016 969 (or more precisely neutral surfaces \cite{mcdougall_JPO87}) rather than across them. 1017 As the slope of neutral surfaces is small in the ocean, a common approximation is to assume that 1018 the `lateral' direction is the horizontal, \ie\ the lateral mixing is performed along geopotential surfaces. 970 As the slope of neutral surfaces is small in the ocean, 971 a common approximation is to assume that the ``lateral'' direction is the horizontal, 972 \ie\ the lateral mixing is performed along geopotential surfaces. 1019 973 This leads to a geopotential second order operator for lateral subgrid scale physics. 1020 This assumption can be relaxed: the eddy-induced turbulent fluxes can be better approached by assuming that 974 This assumption can be relaxed: 975 the eddy-induced turbulent fluxes can be better approached by assuming that 1021 976 they depend linearly on the gradients of large-scale quantities computed along neutral surfaces. 1022 977 In such a case, the diffusive operator is an isoneutral second order operator and 1023 978 it has components in the three space directions. 1024 However, 1025 both horizontal and isoneutral operators have no effect onmean (\ie\ large scale) potential energy whereas979 However, both horizontal and isoneutral operators have no effect on 980 mean (\ie\ large scale) potential energy whereas 1026 981 potential energy is a main source of turbulence (through baroclinic instabilities). 1027 982 \citet{gent.mcwilliams_JPO90} proposed a parameterisation of mesoscale eddy-induced turbulence which 1028 983 associates an eddy-induced velocity to the isoneutral diffusion. 1029 984 Its mean effect is to reduce the mean potential energy of the ocean. 1030 This leads to a formulation of lateral subgrid-scale physics made up of an isoneutral second order operator and1031 an eddy induced advective part.985 This leads to a formulation of lateral subgrid-scale physics made up of 986 an isoneutral second order operator and an eddy induced advective part. 1032 987 In all these lateral diffusive formulations, 1033 988 the specification of the lateral eddy coefficients remains the problematic point as 1034 there is no really satisfactory formulation of these coefficients as a function of large-scale features. 989 there is no really satisfactory formulation of these coefficients as 990 a function of large-scale features. 1035 991 1036 992 In eddy-resolving configurations, a second order operator can be used, … … 1041 997 not interfering with the resolved mesoscale activity. 1042 998 Another approach is becoming more and more popular: 1043 instead of specifying explicitly a sub-grid scale term in the momentum and tracer time evolution equations, 999 instead of specifying explicitly a sub-grid scale term in 1000 the momentum and tracer time evolution equations, 1044 1001 one uses an advective scheme which is diffusive enough to maintain the model stability. 1045 It must be emphasised that then, all the sub-grid scale physics is included in the formulation of1046 the advection scheme.1002 It must be emphasised that then, 1003 all the sub-grid scale physics is included in the formulation of the advection scheme. 1047 1004 1048 1005 All these parameterisations of subgrid scale physics have advantages and drawbacks. 1049 They are not all available in \NEMO. For active tracers (temperature and salinity) the main ones are: 1006 They are not all available in \NEMO. 1007 For active tracers (temperature and salinity) the main ones are: 1050 1008 Laplacian and bilaplacian operators acting along geopotential or iso-neutral surfaces, 1051 1009 \citet{gent.mcwilliams_JPO90} parameterisation, and various slightly diffusive advection schemes. 1052 For momentum, the main ones are: Laplacian and bilaplacian operators acting along geopotential surfaces, 1010 For momentum, the main ones are: 1011 Laplacian and bilaplacian operators acting along geopotential surfaces, 1053 1012 and UBS advection schemes when flux form is chosen for the momentum advection. 1054 1013 1014 %% ================================================================================================= 1055 1015 \subsubsection{Lateral laplacian tracer diffusive operator} 1056 1016 1057 The lateral Laplacian tracer diffusive operator is defined by (see \autoref{apdx: B}):1017 The lateral Laplacian tracer diffusive operator is defined by (see \autoref{apdx:DIFFOPERS}): 1058 1018 \begin{equation} 1059 \label{eq:PE_iso_tensor} 1060 D^{lT} = \nabla \vect . \lt( A^{lT} \; \Re \; \nabla T \rt) \quad \text{with} \quad 1061 \Re = 1062 \begin{pmatrix} 1063 1 & 0 & -r_1 \\ 1064 0 & 1 & -r_2 \\ 1065 -r_1 & -r_2 & r_1^2 + r_2^2 \\ 1066 \end{pmatrix} 1019 \label{eq:MB_iso_tensor} 1020 D^{lT} = \nabla \vect . \lt( A^{lT} \; \Re \; \nabla T \rt) \quad \text{with} \quad \Re = 1021 \begin{pmatrix} 1022 1 & 0 & -r_1 \\ 1023 0 & 1 & -r_2 \\ 1024 -r_1 & -r_2 & r_1^2 + r_2^2 \\ 1025 \end{pmatrix} 1067 1026 \end{equation} 1068 1027 where $r_1$ and $r_2$ are the slopes between the surface along which the diffusive operator acts and 1069 1028 the model level (\eg\ $z$- or $s$-surfaces). 1070 Note that the formulation \autoref{eq: PE_iso_tensor} is exact for1029 Note that the formulation \autoref{eq:MB_iso_tensor} is exact for 1071 1030 the rotation between geopotential and $s$-surfaces, 1072 1031 while it is only an approximation for the rotation between isoneutral and $z$- or $s$-surfaces. 1073 Indeed, in the latter case, two assumptions are made to simplify \autoref{eq:PE_iso_tensor} \citep{cox_OM87}. 1074 First, the horizontal contribution of the dianeutral mixing is neglected since the ratio between iso and 1075 dia-neutral diffusive coefficients is known to be several orders of magnitude smaller than unity. 1032 Indeed, in the latter case, two assumptions are made to simplify \autoref{eq:MB_iso_tensor} 1033 \citep{cox_OM87}. 1034 First, the horizontal contribution of the dianeutral mixing is neglected since 1035 the ratio between iso and dia-neutral diffusive coefficients is known to be 1036 several orders of magnitude smaller than unity. 1076 1037 Second, the two isoneutral directions of diffusion are assumed to be independent since 1077 the slopes are generally less than $10^{-2}$ in the ocean (see \autoref{apdx: B}).1038 the slopes are generally less than $10^{-2}$ in the ocean (see \autoref{apdx:DIFFOPERS}). 1078 1039 1079 1040 For \textit{iso-level} diffusion, $r_1$ and $r_2 $ are zero. … … 1082 1043 For \textit{geopotential} diffusion, 1083 1044 $r_1$ and $r_2 $ are the slopes between the geopotential and computational surfaces: 1084 they are equal to $\sigma_1$ and $\sigma_2$, respectively (see \autoref{eq:PE_sco_slope}). 1085 1086 For \textit{isoneutral} diffusion $r_1$ and $r_2$ are the slopes between the isoneutral and computational surfaces. 1045 they are equal to $\sigma_1$ and $\sigma_2$, respectively (see \autoref{eq:MB_sco_slope}). 1046 1047 For \textit{isoneutral} diffusion $r_1$ and $r_2$ are the slopes between 1048 the isoneutral and computational surfaces. 1087 1049 Therefore, they are different quantities, but have similar expressions in $z$- and $s$-coordinates. 1088 1050 In $z$-coordinates: 1089 1051 \begin{equation} 1090 \label{eq: PE_iso_slopes}1091 r_1 = \frac{e_3}{e_1} 1092 r_2 = \frac{e_3}{e_2} 1052 \label{eq:MB_iso_slopes} 1053 r_1 = \frac{e_3}{e_1} \lt( \pd[\rho]{i} \rt) \lt( \pd[\rho]{k} \rt)^{-1} \quad 1054 r_2 = \frac{e_3}{e_2} \lt( \pd[\rho]{j} \rt) \lt( \pd[\rho]{k} \rt)^{-1} 1093 1055 \end{equation} 1094 1056 while in $s$-coordinates $\pd[]{k}$ is replaced by $\pd[]{s}$. 1095 1057 1058 %% ================================================================================================= 1096 1059 \subsubsection{Eddy induced velocity} 1097 1060 … … 1099 1062 an additional tracer advection is introduced in combination with the isoneutral diffusion of tracers: 1100 1063 \[ 1101 % \label{eq: PE_iso+eiv}1064 % \label{eq:MB_iso+eiv} 1102 1065 D^{lT} = \nabla \cdot \lt( A^{lT} \; \Re \; \nabla T \rt) + \nabla \cdot \lt( \vect U^\ast \, T \rt) 1103 1066 \] 1104 1067 where $ \vect U^\ast = \lt( u^\ast,v^\ast,w^\ast \rt)$ is a non-divergent, 1105 1068 eddy-induced transport velocity. This velocity field is defined by: 1106 \ begin{gather}1107 % \label{eq: PE_eiv}1108 u^\ast = \frac{1}{e_3} \pd[]{k} \lt( A^{eiv} \; \tilde{r}_1 \rt) \ \1109 v^\ast = \frac{1}{e_3} \pd[]{k} \lt( A^{eiv} \; \tilde{r}_2 \rt) \ \1069 \[ 1070 % \label{eq:MB_eiv} 1071 u^\ast = \frac{1}{e_3} \pd[]{k} \lt( A^{eiv} \; \tilde{r}_1 \rt) \quad 1072 v^\ast = \frac{1}{e_3} \pd[]{k} \lt( A^{eiv} \; \tilde{r}_2 \rt) \quad 1110 1073 w^\ast = - \frac{1}{e_1 e_2} \lt[ \pd[]{i} \lt( A^{eiv} \; e_2 \, \tilde{r}_1 \rt) 1111 1074 + \pd[]{j} \lt( A^{eiv} \; e_1 \, \tilde{r}_2 \rt) \rt] 1112 \ end{gather}1075 \] 1113 1076 where $A^{eiv}$ is the eddy induced velocity coefficient 1114 1077 (or equivalently the isoneutral thickness diffusivity coefficient), 1115 and $\tilde r_1$ and $\tilde r_2$ are the slopes between isoneutral and \textit{geopotential} surfaces. 1116 Their values are thus independent of the vertical coordinate, but their expression depends on the coordinate: 1117 \begin{align} 1118 \label{eq:PE_slopes_eiv} 1078 and $\tilde r_1$ and $\tilde r_2$ are the slopes between 1079 isoneutral and \textit{geopotential} surfaces. 1080 Their values are thus independent of the vertical coordinate, 1081 but their expression depends on the coordinate: 1082 \begin{equation} 1083 \label{eq:MB_slopes_eiv} 1119 1084 \tilde{r}_n = 1120 1085 \begin{cases} … … 1123 1088 \end{cases} 1124 1089 \quad \text{where~} n = 1, 2 1125 \end{ align}1090 \end{equation} 1126 1091 1127 1092 The normal component of the eddy induced velocity is zero at all the boundaries. 1128 This can be achieved in a model by tapering either the eddy coefficient or the slopes to zero in the vicinity of1129 the boundaries.1093 This can be achieved in a model by tapering either the eddy coefficient or the slopes to zero in 1094 the vicinity of the boundaries. 1130 1095 The latter strategy is used in \NEMO\ (cf. \autoref{chap:LDF}). 1131 1096 1097 %% ================================================================================================= 1132 1098 \subsubsection{Lateral bilaplacian tracer diffusive operator} 1133 1099 1134 1100 The lateral bilaplacian tracer diffusive operator is defined by: 1135 1101 \[ 1136 % \label{eq: PE_bilapT}1102 % \label{eq:MB_bilapT} 1137 1103 D^{lT}= - \Delta \; (\Delta T) \quad \text{where} \quad 1138 1104 \Delta \bullet = \nabla \lt( \sqrt{B^{lT}} \; \Re \; \nabla \bullet \rt) 1139 1105 \] 1140 It is the Laplacian operator given by \autoref{eq: PE_iso_tensor} applied twice with1106 It is the Laplacian operator given by \autoref{eq:MB_iso_tensor} applied twice with 1141 1107 the harmonic eddy diffusion coefficient set to the square root of the biharmonic one. 1142 1108 1109 %% ================================================================================================= 1143 1110 \subsubsection{Lateral Laplacian momentum diffusive operator} 1144 1111 1145 1112 The Laplacian momentum diffusive operator along $z$- or $s$-surfaces is found by 1146 applying \autoref{eq: PE_lap_vector} to the horizontal velocity vector (see \autoref{apdx:B}):1113 applying \autoref{eq:MB_lap_vector} to the horizontal velocity vector (see \autoref{apdx:DIFFOPERS}): 1147 1114 \begin{align*} 1148 % \label{eq: PE_lapU}1115 % \label{eq:MB_lapU} 1149 1116 \vect D^{l \vect U} &= \nabla_h \big( A^{lm} \chi \big) 1150 1117 - \nabla_h \times \big( A^{lm} \, \zeta \; \vect k \big) \\ … … 1155 1122 \end{align*} 1156 1123 1157 Such a formulation ensures a complete separation between the vorticity and horizontal divergence fields1158 (see \autoref{apdx:C}).1124 Such a formulation ensures a complete separation between 1125 the vorticity and horizontal divergence fields (see \autoref{apdx:INVARIANTS}). 1159 1126 Unfortunately, it is only available in \textit{iso-level} direction. 1160 1127 When a rotation is required 1161 (\ie\ geopotential diffusion in $s$-coordinates or isoneutral diffusion in both $z$- and $s$-coordinates), 1162 the $u$ and $v$-fields are considered as independent scalar fields, so that the diffusive operator is given by: 1163 \begin{gather*} 1164 % \label{eq:PE_lapU_iso} 1165 D_u^{l \vect U} = \nabla . \lt( A^{lm} \; \Re \; \nabla u \rt) \\ 1128 (\ie\ geopotential diffusion in $s$-coordinates or 1129 isoneutral diffusion in both $z$- and $s$-coordinates), 1130 the $u$ and $v$-fields are considered as independent scalar fields, 1131 so that the diffusive operator is given by: 1132 \[ 1133 % \label{eq:MB_lapU_iso} 1134 D_u^{l \vect U} = \nabla . \lt( A^{lm} \; \Re \; \nabla u \rt) \quad 1166 1135 D_v^{l \vect U} = \nabla . \lt( A^{lm} \; \Re \; \nabla v \rt) 1167 \ end{gather*}1168 where $\Re$ is given by \autoref{eq: PE_iso_tensor}.1136 \] 1137 where $\Re$ is given by \autoref{eq:MB_iso_tensor}. 1169 1138 It is the same expression as those used for diffusive operator on tracers. 1170 1139 It must be emphasised that such a formulation is only exact in a Cartesian coordinate system, … … 1173 1142 a geographical coordinate system \citep{lengaigne.madec.ea_JGR03}. 1174 1143 1144 %% ================================================================================================= 1175 1145 \subsubsection{Lateral bilaplacian momentum diffusive operator} 1176 1146 1177 As for tracers, the bilaplacian order momentum diffusive operator is a re-entering Laplacian operator with 1147 As for tracers, 1148 the bilaplacian order momentum diffusive operator is a re-entering Laplacian operator with 1178 1149 the harmonic eddy diffusion coefficient set to the square root of the biharmonic one. 1179 1150 Nevertheless it is currently not available in the iso-neutral case. 1180 1151 1181 \biblio 1182 1183 \pindex 1152 \onlyinsubfile{\input{../../global/epilogue}} 1184 1153 1185 1154 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex
r11435 r11799 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter 1 Model Basics 6 % ================================================================ 7 % ================================================================ 8 % Curvilinear \zstar- \sstar-coordinate System 9 % ================================================================ 4 10 5 \chapter{ essai \zstar \sstar} 6 7 \thispagestyle{plain} 8 9 \chaptertoc 10 11 \paragraph{Changes record} ~\\ 12 13 {\footnotesize 14 \begin{tabularx}{\textwidth}{l||X|X} 15 Release & Author(s) & Modifications \\ 16 \hline 17 {\em 4.0} & {\em ...} & {\em ...} \\ 18 {\em 3.6} & {\em ...} & {\em ...} \\ 19 {\em 3.4} & {\em ...} & {\em ...} \\ 20 {\em <=3.4} & {\em ...} & {\em ...} 21 \end{tabularx} 22 } 23 24 \clearpage 25 26 %% ================================================================================================= 11 27 \section{Curvilinear \zstar- or \sstar coordinate system} 12 13 % -------------------------------------------------------------------------------------------------------------14 % ????15 % -------------------------------------------------------------------------------------------------------------16 28 17 29 \colorbox{yellow}{ to be updated } … … 26 38 To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate 27 39 \[ 28 % \label{eq: PE_}40 % \label{eq:MBZ_PE_} 29 41 z^\star = H \left( \frac{z-\eta}{H+\eta} \right) 30 42 \] … … 40 52 the surface height, it is clear that surfaces constant $z^\star$ are very similar to the depth surfaces. 41 53 These properties greatly reduce difficulties of computing the horizontal pressure gradient relative to 42 terrain following sigma models discussed in \autoref{subsec: PE_sco}.54 terrain following sigma models discussed in \autoref{subsec:MB_sco}. 43 55 Additionally, since $z^\star$ when $\eta = 0$, no flow is spontaneously generated in 44 56 an unforced ocean starting from rest, regardless the bottom topography. … … 66 78 the surface height, again so long as $\eta > -H$. 67 79 68 %%%69 80 % essai update time splitting... 70 %%% 71 72 % ================================================================ 73 % Surface Pressure Gradient and Sea Surface Height 74 % ================================================================ 75 \section[Surface pressure gradient and sea surface heigth (\textit{dynspg.F90})] 76 {Surface pressure gradient and sea surface heigth (\protect\mdl{dynspg})} 77 \label{sec:DYN_hpg_spg} 78 %-----------------------------------------nam_dynspg---------------------------------------------------- 81 82 %% ================================================================================================= 83 \section[Surface pressure gradient and sea surface heigth (\textit{dynspg.F90})]{Surface pressure gradient and sea surface heigth (\protect\mdl{dynspg})} 84 \label{sec:MBZ_dyn_hpg_spg} 79 85 80 86 %\nlst{nam_dynspg} 81 %------------------------------------------------------------------------------------------------------------ 82 Options are defined through the \nam{\_dynspg} namelist variables. 83 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). 87 Options are defined through the \nam{_dynspg}{\_dynspg} namelist variables. 88 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:MB_hor_pg}). 84 89 The main distinction is between the fixed volume case (linear free surface or rigid lid) and 85 90 the variable volume case (nonlinear free surface, \key{vvl} is active). 86 In the linear free surface case (\autoref{subsec: PE_free_surface}) and rigid lid (\autoref{PE_rigid_lid}),91 In the linear free surface case (\autoref{subsec:MB_free_surface}) and rigid lid (\autoref{PE_rigid_lid}), 87 92 the vertical scale factors $e_{3}$ are fixed in time, 88 while in the nonlinear case (\autoref{subsec: PE_free_surface}) they are time-dependent.93 while in the nonlinear case (\autoref{subsec:MB_free_surface}) they are time-dependent. 89 94 With both linear and nonlinear free surface, external gravity waves are allowed in the equations, 90 95 which imposes a very small time step when an explicit time stepping is used. 91 96 Two methods are proposed to allow a longer time step for the three-dimensional equations: 92 the filtered free surface, which is a modification of the continuous equations %(see \autoref{eq: PE_flt?}),97 the filtered free surface, which is a modification of the continuous equations %(see \autoref{eq:MB_flt?}), 93 98 and the split-explicit free surface described below. 94 99 The extra term introduced in the filtered method is calculated implicitly, 95 100 so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 96 101 97 %-------------------------------------------------------------98 102 % Explicit 99 %------------------------------------------------------------- 100 \subsubsection[Explicit (\texttt{\textbf{key\_dynspg\_exp}})] 101 {Explicit (\protect\key{dynspg\_exp})} 102 \label{subsec:DYN_spg_exp} 103 %% ================================================================================================= 104 \subsubsection[Explicit (\texttt{\textbf{key\_dynspg\_exp}})]{Explicit (\protect\key{dynspg\_exp})} 105 \label{subsec:MBZ_dyn_spg_exp} 103 106 104 107 In the explicit free surface formulation, the model time step is chosen small enough to … … 106 109 The sea surface height is given by: 107 110 \begin{equation} 108 \label{eq: dynspg_ssh}111 \label{eq:MBZ_dynspg_ssh} 109 112 \frac{\partial \eta }{\partial t}\equiv \frac{\text{EMP}}{\rho_w }+\frac{1}{e_{1T} 110 113 e_{2T} }\sum\limits_k {\left( {\delta_i \left[ {e_{2u} e_{3u} u} … … 116 119 and $\rho_w =1,000\,Kg.m^{-3}$ is the volumic mass of pure water. 117 120 The sea-surface height is evaluated using a leapfrog scheme in combination with an Asselin time filter, 118 (\ie\ the velocity appearing in (\autoref{eq: dynspg_ssh}) is centred in time (\textit{now} velocity).121 (\ie\ the velocity appearing in (\autoref{eq:DYN_spg_ssh}) is centred in time (\textit{now} velocity). 119 122 120 123 The surface pressure gradient, also evaluated using a leap-frog scheme, is then simply given by: 121 124 \begin{equation} 122 \label{eq: dynspg_exp}125 \label{eq:MBZ_dynspg_exp} 123 126 \left\{ 124 127 \begin{aligned} … … 130 133 131 134 Consistent with the linearization, a $\left. \rho \right|_{k=1} / \rho_o$ factor is omitted in 132 (\autoref{eq:dynspg_exp}). 133 134 %------------------------------------------------------------- 135 (\autoref{eq:DYN_spg_exp}). 136 135 137 % Split-explicit time-stepping 136 %------------------------------------------------------------- 137 \subsubsection[Split-explicit time-stepping (\texttt{\textbf{key\_dynspg\_ts}})] 138 {Split-explicit time-stepping (\protect\key{dynspg\_ts})} 139 \label{subsec:DYN_spg_ts} 140 %--------------------------------------------namdom---------------------------------------------------- 141 142 \nlst{namdom} 143 %-------------------------------------------------------------------------------------------------------------- 138 %% ================================================================================================= 139 \subsubsection[Split-explicit time-stepping (\texttt{\textbf{key\_dynspg\_ts}})]{Split-explicit time-stepping (\protect\key{dynspg\_ts})} 140 \label{subsec:MBZ_dyn_spg_ts} 141 144 142 The split-explicit free surface formulation used in OPA follows the one proposed by \citet{Griffies2004?}. 145 143 The general idea is to solve the free surface equation with a small time step, 146 144 while the three dimensional prognostic variables are solved with a longer time step that 147 is a multiple of \np{rdtbt} in the \nam{dom} namelist (Figure III.3). 148 149 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > 145 is a multiple of \np{rdtbt}{rdtbt} in the \nam{dom}{dom} namelist (Figure III.3). 146 150 147 \begin{figure}[!t] 151 \ begin{center}152 \includegraphics[width=\textwidth]{Fig_DYN_dynspg_ts}153 \caption{154 \protect\label{fig:DYN_dynspg_ts}155 156 157 158 159 160 161 162 163 164 165 166 167 168 A baroclinic leap-frog time step carries the surface height to $t+\Delta t$ using the convergence of169 the time averaged vertically integrated velocity taken from baroclinic time step t.170 }171 \ end{center}148 \centering 149 \includegraphics[width=0.66\textwidth]{Fig_DYN_dynspg_ts} 150 \caption[Schematic of the split-explicit time stepping scheme for 151 the barotropic and baroclinic modes, after \citet{Griffies2004?}]{ 152 Schematic of the split-explicit time stepping scheme for the barotropic and baroclinic modes, 153 after \citet{Griffies2004?}. 154 Time increases to the right. 155 Baroclinic time steps are denoted by $t-\Delta t$, $t, t+\Delta t$, and $t+2\Delta t$. 156 The curved line represents a leap-frog time step, 157 and the smaller barotropic time steps $N \Delta t=2\Delta t$ are denoted by the zig-zag line. 158 The vertically integrated forcing \textbf{M}(t) computed at 159 baroclinic time step t represents the interaction between the barotropic and baroclinic motions. 160 While keeping the total depth, tracer, and freshwater forcing fields fixed, 161 a leap-frog integration carries the surface height and vertically integrated velocity from 162 t to $t+2 \Delta t$ using N barotropic time steps of length $\Delta t$. 163 Time averaging the barotropic fields over the N+1 time steps (endpoints included) 164 centers the vertically integrated velocity at the baroclinic timestep $t+\Delta t$. 165 A baroclinic leap-frog time step carries the surface height to $t+\Delta t$ using 166 the convergence of the time averaged vertically integrated velocity taken from 167 baroclinic time step t.} 168 \label{fig:MBZ_dyn_dynspg_ts} 172 169 \end{figure} 173 %> > > > > > > > > > > > > > > > > > > > > > > > > > > >174 170 175 171 The split-explicit formulation has a damping effect on external gravity waves, … … 186 182 We have 187 183 \[ 188 % \label{eq: DYN_spg_ts_eta}184 % \label{eq:MBZ_dyn_spg_ts_eta} 189 185 \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) 190 186 = 2 \Delta t \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] 191 187 \] 192 188 \begin{multline*} 193 % \label{eq: DYN_spg_ts_u}189 % \label{eq:MBZ_dyn_spg_ts_u} 194 190 \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1}) \\ 195 191 = 2\Delta t \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n}) … … 207 203 This is also the time that sets the barotropic time steps via 208 204 \[ 209 % \label{eq: DYN_spg_ts_t}205 % \label{eq:MBZ_dyn_spg_ts_t} 210 206 t_n=\tau+n\Delta t 211 207 \] … … 213 209 The density scaled surface pressure is evaluated via 214 210 \[ 215 % \label{eq: DYN_spg_ts_ps}211 % \label{eq:MBZ_dyn_spg_ts_ps} 216 212 p_s^{(b)}(\tau,t_{n}) = 217 213 \begin{cases} … … 222 218 To get started, we assume the following initial conditions 223 219 \[ 224 % \label{eq: DYN_spg_ts_eta}220 % \label{eq:MBZ_dyn_spg_ts_eta} 225 221 \begin{split} 226 222 \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)} \\ … … 230 226 with 231 227 \[ 232 % \label{eq: DYN_spg_ts_etaF}228 % \label{eq:MBZ_dyn_spg_ts_etaF} 233 229 \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\Delta t,t_{n}) 234 230 \] … … 236 232 Likewise, 237 233 \[ 238 % \label{eq: DYN_spg_ts_u}234 % \label{eq:MBZ_dyn_spg_ts_u} 239 235 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)} \\ \\ 240 236 \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \Delta t \ \text{RHS}_{n=0} … … 242 238 with 243 239 \[ 244 % \label{eq: DYN_spg_ts_u}240 % \label{eq:MBZ_dyn_spg_ts_u} 245 241 \overline{\textbf{U}^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\Delta t,t_{n}) 246 242 \] … … 251 247 produce the updated vertically integrated velocity at baroclinic time $\tau + \Delta \tau$ 252 248 \[ 253 % \label{eq: DYN_spg_ts_u}249 % \label{eq:MBZ_dyn_spg_ts_u} 254 250 \textbf{U}(\tau+\Delta t) = \overline{\textbf{U}^{(b)}(\tau+\Delta t)} 255 251 = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) … … 258 254 a baroclinic leap-frog using the following form 259 255 \begin{equation} 260 \label{eq: DYN_spg_ts_ssh}256 \label{eq:MBZ_dyn_spg_ts_ssh} 261 257 \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\Delta t \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] 262 258 \end{equation} … … 267 263 268 264 In general, some form of time filter is needed to maintain integrity of the surface height field due to 269 the leap-frog splitting mode in equation \autoref{eq: DYN_spg_ts_ssh}.265 the leap-frog splitting mode in equation \autoref{eq:MBZ_dyn_spg_ts_ssh}. 270 266 We have tried various forms of such filtering, 271 267 with the following method discussed in Griffies et al. (2001) chosen due to its stability and … … 273 269 274 270 \begin{equation} 275 \label{eq: DYN_spg_ts_sshf}271 \label{eq:MBZ_dyn_spg_ts_sshf} 276 272 \eta^{F}(\tau-\Delta) = \overline{\eta^{(b)}(\tau)} 277 273 \end{equation} … … 279 275 280 276 \[ 281 % \label{eq: DYN_spg_ts_sshf2}277 % \label{eq:MBZ_dyn_spg_ts_sshf2} 282 278 \eta^{F}(\tau-\Delta) = \eta(\tau) 283 279 + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\Delta t) … … 288 284 This isolation allows for an easy check that tracer conservation is exact when eliminating tracer and 289 285 surface height time filtering (see ?? for more complete discussion). 290 However, in the general case with a non-zero $\alpha$, the filter \autoref{eq: DYN_spg_ts_sshf} was found to286 However, in the general case with a non-zero $\alpha$, the filter \autoref{eq:MBZ_dyn_spg_ts_sshf} was found to 291 287 be more conservative, and so is recommended. 292 288 293 %-------------------------------------------------------------294 289 % Filtered formulation 295 %------------------------------------------------------------- 296 \subsubsection[Filtered formulation (\texttt{\textbf{key\_dynspg\_flt}})] 297 {Filtered formulation (\protect\key{dynspg\_flt})} 298 \label{subsec:DYN_spg_flt} 290 %% ================================================================================================= 291 \subsubsection[Filtered formulation (\texttt{\textbf{key\_dynspg\_flt}})]{Filtered formulation (\protect\key{dynspg\_flt})} 292 \label{subsec:MBZ_dyn_spg_flt} 299 293 300 294 The filtered formulation follows the \citet{Roullet2000?} implementation. 301 295 The extra term introduced in the equations (see {\S}I.2.2) is solved implicitly. 302 296 The elliptic solvers available in the code are documented in \autoref{chap:MISC}. 303 The amplitude of the extra term is given by the namelist variable \np{rnu} .297 The amplitude of the extra term is given by the namelist variable \np{rnu}{rnu}. 304 298 The default value is 1, as recommended by \citet{Roullet2000?} 305 299 306 \colorbox{red}{\np{rnu}\forcode{ = 1} to be suppressed from namelist !} 307 308 %------------------------------------------------------------- 300 \colorbox{red}{\np[=1]{rnu}{rnu} to be suppressed from namelist !} 301 309 302 % Non-linear free surface formulation 310 %------------------------------------------------------------- 311 \subsection[Non-linear free surface formulation (\texttt{\textbf{key\_vvl}})] 312 {Non-linear free surface formulation (\protect\key{vvl})} 313 \label{subsec:DYN_spg_vvl} 303 %% ================================================================================================= 304 \subsection[Non-linear free surface formulation (\texttt{\textbf{key\_vvl}})]{Non-linear free surface formulation (\protect\key{vvl})} 305 \label{subsec:MBZ_dyn_spg_vvl} 314 306 315 307 In the non-linear free surface formulation, the variations of volume are fully taken into account. 316 308 This option is presented in a report \citep{levier.treguier.ea_rpt07} available on the \NEMO\ web site. 317 309 The three time-stepping methods (explicit, split-explicit and filtered) are the same as in 318 \autoref{ DYN_spg_linear} except that the ocean depth is now time-dependent.310 \autoref{?:DYN_spg_linear?} except that the ocean depth is now time-dependent. 319 311 In particular, this means that in filtered case, the matrix to be inverted has to be recomputed at each time-step. 320 312 321 \biblio 322 323 \pindex 313 \onlyinsubfile{\input{../../global/epilogue}} 324 314 325 315 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/NEMO/subfiles/chap_time_domain.tex
r11435 r11799 3 3 \begin{document} 4 4 5 % ================================================================ 6 % Chapter 2 ——— Time Domain (step.F90) 7 % ================================================================ 8 \ chapter{Time Domain (STP)}9 \label{chap:STP} 5 \chapter{Time Domain} 6 \label{chap:TD} 7 8 \thispagestyle{plain} 9 10 10 \chaptertoc 11 11 12 \paragraph{Changes record} ~\\ 13 14 {\footnotesize 15 \begin{tabularx}{0.5\textwidth}{l||X|X} 16 Release & Author(s) & 17 Modifications \\ 18 \hline 19 {\em 4.0} & {\em J\'{e}r\^{o}me Chanut \newline Tim Graham} & 20 {\em Review \newline Update } \\ 21 {\em 3.6} & {\em Christian \'{E}th\'{e} } & 22 {\em Update } \\ 23 {\em $\leq$ 3.4} & {\em Gurvan Madec } & 24 {\em First version } \\ 25 \end{tabularx} 26 } 27 28 \clearpage 29 12 30 % Missing things: 13 % - daymod: definition of the time domain (nit000, nitend and the calendar) 14 15 \gmcomment{STEVEN :maybe a picture of the directory structure in the introduction which could be referred to here, 16 would help ==> to be added} 17 %%%% 18 19 \newpage 20 21 Having defined the continuous equations in \autoref{chap:PE}, we need now to choose a time discretization, 31 % - daymod: definition of the time domain (nit000, nitend and the calendar) 32 33 \gmcomment{STEVEN :maybe a picture of the directory structure in the introduction which 34 could be referred to here, would help ==> to be added} 35 36 Having defined the continuous equations in \autoref{chap:MB}, 37 we need now to choose a time discretization, 22 38 a key feature of an ocean model as it exerts a strong influence on the structure of the computer code 23 39 (\ie\ on its flowchart). 24 In the present chapter, we provide a general description of the \NEMO\ 40 In the present chapter, we provide a general description of the \NEMO\ time stepping strategy and 25 41 the consequences for the order in which the equations are solved. 26 42 27 % ================================================================ 28 % Time Discretisation 29 % ================================================================ 43 %% ================================================================================================= 30 44 \section{Time stepping environment} 31 \label{sec: STP_environment}45 \label{sec:TD_environment} 32 46 33 47 The time stepping used in \NEMO\ is a three level scheme that can be represented as follows: 34 48 \begin{equation} 35 \label{eq: STP}49 \label{eq:TD} 36 50 x^{t + \rdt} = x^{t - \rdt} + 2 \, \rdt \ \text{RHS}_x^{t - \rdt, \, t, \, t + \rdt} 37 51 \end{equation} 38 52 where $x$ stands for $u$, $v$, $T$ or $S$; 39 RHS is the Right-Hand-Side of the corresponding time evolution equation;53 RHS is the \textbf{R}ight-\textbf{H}and-\textbf{S}ide of the corresponding time evolution equation; 40 54 $\rdt$ is the time step; 41 55 and the superscripts indicate the time at which a quantity is evaluated. 42 Each term of the RHS is evaluated at a specific time stepping depending on the physics with which it is associated. 56 Each term of the RHS is evaluated at a specific time stepping depending on 57 the physics with which it is associated. 43 58 44 59 The choice of the time stepping used for this evaluation is discussed below as well as 45 60 the implications for starting or restarting a model simulation. 46 61 Note that the time stepping calculation is generally performed in a single operation. 47 With such a complex and nonlinear system of equations it would be dangerous to let a prognostic variable evolve in48 time for each term separately.62 With such a complex and nonlinear system of equations it would be dangerous to 63 let a prognostic variable evolve in time for each term separately. 49 64 50 65 The three level scheme requires three arrays for each prognostic variable. … … 52 67 The third array, although referred to as $x_a$ (after) in the code, 53 68 is usually not the variable at the after time step; 54 but rather it is used to store the time derivative (RHS in \autoref{eq:STP}) prior to time-stepping the equation. 55 The time stepping itself is performed once at each time step where implicit vertical diffusion is computed, \ie\ in the \mdl{trazdf} and \mdl{dynzdf} modules. 56 57 % ------------------------------------------------------------------------------------------------------------- 58 % Non-Diffusive Part---Leapfrog Scheme 59 % ------------------------------------------------------------------------------------------------------------- 69 but rather it is used to store the time derivative (RHS in \autoref{eq:TD}) 70 prior to time-stepping the equation. 71 The time stepping itself is performed once at each time step where 72 implicit vertical diffusion is computed, 73 \ie\ in the \mdl{trazdf} and \mdl{dynzdf} modules. 74 75 %% ================================================================================================= 60 76 \section{Non-diffusive part --- Leapfrog scheme} 61 \label{sec: STP_leap_frog}62 63 The time stepping used for processes other than diffusion is the well-known leapfrog scheme64 \citep{mesinger.arakawa_bk76}.77 \label{sec:TD_leap_frog} 78 79 The time stepping used for processes other than diffusion is 80 the well-known \textbf{L}eap\textbf{F}rog (LF) scheme \citep{mesinger.arakawa_bk76}. 65 81 This scheme is widely used for advection processes in low-viscosity fluids. 66 It is a time centred scheme, \ie\ the RHS in \autoref{eq:STP} is evaluated at time step $t$, the now time step. 82 It is a time centred scheme, \ie\ the RHS in \autoref{eq:TD} is evaluated at 83 time step $t$, the now time step. 67 84 It may be used for momentum and tracer advection, pressure gradient, and Coriolis terms, 68 85 but not for diffusion terms. 69 86 It is an efficient method that achieves second-order accuracy with 70 87 just one right hand side evaluation per time step. 71 Moreover, it does not artificially damp linear oscillatory motion nor does it produce instability by72 amplifying the oscillations.88 Moreover, it does not artificially damp linear oscillatory motion 89 nor does it produce instability by amplifying the oscillations. 73 90 These advantages are somewhat diminished by the large phase-speed error of the leapfrog scheme, 74 and the unsuitability of leapfrog differencing for the representation of diffusion and Rayleigh damping processes. 91 and the unsuitability of leapfrog differencing for the representation of diffusion and 92 Rayleigh damping processes. 75 93 However, the scheme allows the coexistence of a numerical and a physical mode due to 76 94 its leading third order dispersive error. 77 95 In other words a divergence of odd and even time steps may occur. 78 To prevent it, the leapfrog scheme is often used in association with a Robert-Asselin time filter 79 (hereafter the LF-RA scheme). 80 This filter, first designed by \citet{robert_JMSJ66} and more comprehensively studied by \citet{asselin_MWR72}, 96 To prevent it, the leapfrog scheme is often used in association with 97 a \textbf{R}obert-\textbf{A}sselin time filter (hereafter the LF-RA scheme). 98 This filter, 99 first designed by \citet{robert_JMSJ66} and more comprehensively studied by \citet{asselin_MWR72}, 81 100 is a kind of laplacian diffusion in time that mixes odd and even time steps: 82 101 \begin{equation} 83 \label{eq: STP_asselin}102 \label{eq:TD_asselin} 84 103 x_F^t = x^t + \gamma \, \lt[ x_F^{t - \rdt} - 2 x^t + x^{t + \rdt} \rt] 85 104 \end{equation} 86 105 where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin coefficient. 87 $\gamma$ is initialized as \np{rn \_atfp} (namelist parameter).88 Its default value is \np {rn\_atfp}\forcode{ = 10.e-3} (see \autoref{sec:STP_mLF}),106 $\gamma$ is initialized as \np{rn_atfp}{rn\_atfp} (namelist parameter). 107 Its default value is \np[=10.e-3]{rn_atfp}{rn\_atfp} (see \autoref{sec:TD_mLF}), 89 108 causing only a weak dissipation of high frequency motions (\citep{farge-coulombier_phd87}). 90 109 The addition of a time filter degrades the accuracy of the calculation from second to first order. 91 110 However, the second order truncation error is proportional to $\gamma$, which is small compared to 1. 92 111 Therefore, the LF-RA is a quasi second order accurate scheme. 93 The LF-RA scheme is preferred to other time differencing schemes such as predictor corrector or trapezoidal schemes, 94 because the user has an explicit and simple control of the magnitude of the time diffusion of the scheme. 95 When used with the 2nd order space centred discretisation of the advection terms in 112 The LF-RA scheme is preferred to other time differencing schemes such as 113 predictor corrector or trapezoidal schemes, because the user has an explicit and simple control of 114 the magnitude of the time diffusion of the scheme. 115 When used with the 2$^nd$ order space centred discretisation of the advection terms in 96 116 the momentum and tracer equations, LF-RA avoids implicit numerical diffusion: 97 diffusion is set explicitly by the user through the Robert-Asselin 98 filter parameter and the viscosity and diffusion coefficients. 99 100 % ------------------------------------------------------------------------------------------------------------- 101 % Diffusive Part---Forward or Backward Scheme 102 % ------------------------------------------------------------------------------------------------------------- 117 diffusion is set explicitly by the user through the Robert-Asselin filter parameter and 118 the viscosity and diffusion coefficients. 119 120 %% ================================================================================================= 103 121 \section{Diffusive part --- Forward or backward scheme} 104 \label{sec:STP_forward_imp} 105 106 The leapfrog differencing scheme is unsuitable for the representation of diffusion and damping processes. 122 \label{sec:TD_forward_imp} 123 124 The leapfrog differencing scheme is unsuitable for 125 the representation of diffusion and damping processes. 107 126 For a tendency $D_x$, representing a diffusion term or a restoring term to a tracer climatology 108 127 (when present, see \autoref{sec:TRA_dmp}), a forward time differencing scheme is used : 109 128 \[ 110 %\label{eq: STP_euler}129 %\label{eq:TD_euler} 111 130 x^{t + \rdt} = x^{t - \rdt} + 2 \, \rdt \ D_x^{t - \rdt} 112 131 \] 113 132 114 133 This is diffusive in time and conditionally stable. 115 The conditions for stability of second and fourth order horizontal diffusion schemes are \citep{griffies_bk04}: 134 The conditions for stability of second and fourth order horizontal diffusion schemes are 135 \citep{griffies_bk04}: 116 136 \begin{equation} 117 \label{eq: STP_euler_stability}137 \label{eq:TD_euler_stability} 118 138 A^h < 119 139 \begin{cases} … … 122 142 \end{cases} 123 143 \end{equation} 124 where $e$ is the smallest grid size in the two horizontal directions and $A^h$ is the mixing coefficient. 125 The linear constraint \autoref{eq:STP_euler_stability} is a necessary condition, but not sufficient. 144 where $e$ is the smallest grid size in the two horizontal directions and 145 $A^h$ is the mixing coefficient. 146 The linear constraint \autoref{eq:TD_euler_stability} is a necessary condition, but not sufficient. 126 147 If it is not satisfied, even mildly, then the model soon becomes wildly unstable. 127 The instability can be removed by either reducing the length of the time steps or reducing the mixing coefficient. 148 The instability can be removed by either reducing the length of the time steps or 149 reducing the mixing coefficient. 128 150 129 151 For the vertical diffusion terms, a forward time differencing scheme can be used, 130 but usually the numerical stability condition imposes a strong constraint on the time step. To overcome the stability constraint, a 131 backward (or implicit) time differencing scheme is used. This scheme is unconditionally stable but diffusive and can be written as follows: 152 but usually the numerical stability condition imposes a strong constraint on the time step. 153 To overcome the stability constraint, a backward (or implicit) time differencing scheme is used. 154 This scheme is unconditionally stable but diffusive and can be written as follows: 132 155 \begin{equation} 133 \label{eq: STP_imp}156 \label{eq:TD_imp} 134 157 x^{t + \rdt} = x^{t - \rdt} + 2 \, \rdt \ \text{RHS}_x^{t + \rdt} 135 158 \end{equation} … … 139 162 %%gm 140 163 141 This scheme is rather time consuming since it requires a matrix inversion. For example, the finite difference approximation of the temperature equation is: 164 This scheme is rather time consuming since it requires a matrix inversion. 165 For example, the finite difference approximation of the temperature equation is: 142 166 \[ 143 % \label{eq: STP_imp_zdf}167 % \label{eq:TD_imp_zdf} 144 168 \frac{T(k)^{t + 1} - T(k)^{t - 1}}{2 \; \rdt} 145 169 \equiv … … 147 171 \] 148 172 where RHS is the right hand side of the equation except for the vertical diffusion term. 149 We rewrite \autoref{eq: STP_imp} as:173 We rewrite \autoref{eq:TD_imp} as: 150 174 \begin{equation} 151 \label{eq: STP_imp_mat}175 \label{eq:TD_imp_mat} 152 176 -c(k + 1) \; T^{t + 1}(k + 1) + d(k) \; T^{t + 1}(k) - \; c(k) \; T^{t + 1}(k - 1) \equiv b(k) 153 177 \end{equation} 154 178 where 155 \begin{align*} 156 c(k) &= A_w^{vT} (k) \, / \, e_{3w} (k) \\ 157 d(k) &= e_{3t} (k) \, / \, (2 \rdt) + c_k + c_{k + 1} \\ 158 b(k) &= e_{3t} (k) \; \lt( T^{t - 1}(k) \, / \, (2 \rdt) + \text{RHS} \rt) 159 \end{align*} 160 161 \autoref{eq:STP_imp_mat} is a linear system of equations with an associated matrix which is tridiagonal. 162 Moreover, 163 $c(k)$ and $d(k)$ are positive and the diagonal term is greater than the sum of the two extra-diagonal terms, 179 \[ 180 c(k) = A_w^{vT} (k) \, / \, e_{3w} (k) \text{,} \quad 181 d(k) = e_{3t} (k) \, / \, (2 \rdt) + c_k + c_{k + 1} \quad \text{and} \quad 182 b(k) = e_{3t} (k) \; \lt( T^{t - 1}(k) \, / \, (2 \rdt) + \text{RHS} \rt) 183 \] 184 185 \autoref{eq:TD_imp_mat} is a linear system of equations with 186 an associated matrix which is tridiagonal. 187 Moreover, $c(k)$ and $d(k)$ are positive and 188 the diagonal term is greater than the sum of the two extra-diagonal terms, 164 189 therefore a special adaptation of the Gauss elimination procedure is used to find the solution 165 190 (see for example \citet{richtmyer.morton_bk67}). 166 191 167 % ------------------------------------------------------------------------------------------------------------- 168 % Surface Pressure gradient 169 % ------------------------------------------------------------------------------------------------------------- 192 %% ================================================================================================= 170 193 \section{Surface pressure gradient} 171 \label{sec:STP_spg_ts} 172 173 The leapfrog environment supports a centred in time computation of the surface pressure, \ie\ evaluated 174 at \textit{now} time step. This refers to as the explicit free surface case in the code (\np{ln\_dynspg\_exp}\forcode{ = .true.}). 175 This choice however imposes a strong constraint on the time step which should be small enough to resolve the propagation 176 of external gravity waves. As a matter of fact, one rather use in a realistic setup, a split-explicit free surface 177 (\np{ln\_dynspg\_ts}\forcode{ = .true.}) in which barotropic and baroclinic dynamical equations are solved separately with ad-hoc 178 time steps. The use of the time-splitting (in combination with non-linear free surface) imposes some constraints on the design of 179 the overall flowchart, in particular to ensure exact tracer conservation (see \autoref{fig:TimeStep_flowchart}). 180 181 Compared to the former use of the filtered free surface in \NEMO\ v3.6 (\citet{roullet.madec_JGR00}), the use of a split-explicit free surface is advantageous 182 on massively parallel computers. Indeed, no global computations are anymore required by the elliptic solver which saves a substantial amount of communication 183 time. Fast barotropic motions (such as tides) are also simulated with a better accuracy. 194 \label{sec:TD_spg_ts} 195 196 The leapfrog environment supports a centred in time computation of the surface pressure, 197 \ie\ evaluated at \textit{now} time step. 198 This refers to as the explicit free surface case in the code 199 (\np[=.true.]{ln_dynspg_exp}{ln\_dynspg\_exp}). 200 This choice however imposes a strong constraint on the time step which 201 should be small enough to resolve the propagation of external gravity waves. 202 As a matter of fact, one rather use in a realistic setup, 203 a split-explicit free surface (\np[=.true.]{ln_dynspg_ts}{ln\_dynspg\_ts}) in which 204 barotropic and baroclinic dynamical equations are solved separately with ad-hoc time steps. 205 The use of the time-splitting (in combination with non-linear free surface) imposes 206 some constraints on the design of the overall flowchart, 207 in particular to ensure exact tracer conservation (see \autoref{fig:TD_TimeStep_flowchart}). 208 209 Compared to the former use of the filtered free surface in \NEMO\ v3.6 (\citet{roullet.madec_JGR00}), 210 the use of a split-explicit free surface is advantageous on massively parallel computers. 211 Indeed, no global computations are anymore required by the elliptic solver which 212 saves a substantial amount of communication time. 213 Fast barotropic motions (such as tides) are also simulated with a better accuracy. 184 214 185 215 %\gmcomment{ 186 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 187 \begin{figure}[!t] 188 \begin{center} 189 \includegraphics[width=\textwidth]{Fig_TimeStepping_flowchart_v4} 190 \caption{ 191 \protect\label{fig:TimeStep_flowchart} 192 Sketch of the leapfrog time stepping sequence in \NEMO\ with split-explicit free surface. The latter combined 193 with non-linear free surface requires the dynamical tendency being updated prior tracers tendency to ensure 194 conservation. Note the use of time integrated fluxes issued from the barotropic loop in subsequent calculations 195 of tracer advection and in the continuity equation. Details about the time-splitting scheme can be found 196 in \autoref{subsec:DYN_spg_ts}. 197 } 198 \end{center} 216 \begin{figure} 217 \centering 218 \includegraphics[width=0.66\textwidth]{Fig_TimeStepping_flowchart_v4} 219 \caption[Leapfrog time stepping sequence with split-explicit free surface]{ 220 Sketch of the leapfrog time stepping sequence in \NEMO\ with split-explicit free surface. 221 The latter combined with non-linear free surface requires 222 the dynamical tendency being updated prior tracers tendency to ensure conservation. 223 Note the use of time integrated fluxes issued from the barotropic loop in 224 subsequent calculations of tracer advection and in the continuity equation. 225 Details about the time-splitting scheme can be found in \autoref{subsec:DYN_spg_ts}.} 226 \label{fig:TD_TimeStep_flowchart} 199 227 \end{figure} 200 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>201 228 %} 202 229 203 % ------------------------------------------------------------------------------------------------------------- 204 % The Modified Leapfrog -- Asselin Filter scheme 205 % ------------------------------------------------------------------------------------------------------------- 206 \section{Modified Leapfrog -- Asselin filter scheme} 207 \label{sec:STP_mLF} 208 209 Significant changes have been introduced by \cite{leclair.madec_OM09} in the LF-RA scheme in order to 210 ensure tracer conservation and to allow the use of a much smaller value of the Asselin filter parameter. 230 %% ================================================================================================= 231 \section{Modified LeapFrog -- Robert Asselin filter scheme (LF-RA)} 232 \label{sec:TD_mLF} 233 234 Significant changes have been introduced by \cite{leclair.madec_OM09} in 235 the LF-RA scheme in order to ensure tracer conservation and to 236 allow the use of a much smaller value of the Asselin filter parameter. 211 237 The modifications affect both the forcing and filtering treatments in the LF-RA scheme. 212 238 213 In a classical LF-RA environment, the forcing term is centred in time,214 \ie\ it is time-stepped over a $2 \rdt$ period:239 In a classical LF-RA environment, 240 the forcing term is centred in time, \ie\ it is time-stepped over a $2 \rdt$ period: 215 241 $x^t = x^t + 2 \rdt Q^t$ where $Q$ is the forcing applied to $x$, 216 and the time filter is given by \autoref{eq:STP_asselin} so that $Q$ is redistributed over several time step. 242 and the time filter is given by \autoref{eq:TD_asselin} so that 243 $Q$ is redistributed over several time step. 217 244 In the modified LF-RA environment, these two formulations have been replaced by: 218 245 \begin{gather} 219 \label{eq: STP_forcing}246 \label{eq:TD_forcing} 220 247 x^{t + \rdt} = x^{t - \rdt} + \rdt \lt( Q^{t - \rdt / 2} + Q^{t + \rdt / 2} \rt) \\ 221 \label{eq: STP_RA}248 \label{eq:TD_RA} 222 249 x_F^t = x^t + \gamma \, \lt( x_F^{t - \rdt} - 2 x^t + x^{t + \rdt} \rt) 223 250 - \gamma \, \rdt \, \lt( Q^{t + \rdt / 2} - Q^{t - \rdt / 2} \rt) 224 251 \end{gather} 225 The change in the forcing formulation given by \autoref{eq:STP_forcing} (see \autoref{fig:MLF_forcing}) 226 has a significant effect: 227 the forcing term no longer excites the divergence of odd and even time steps \citep{leclair.madec_OM09}. 252 The change in the forcing formulation given by \autoref{eq:TD_forcing} 253 (see \autoref{fig:TD_MLF_forcing}) has a significant effect: 254 the forcing term no longer excites the divergence of odd and even time steps 255 \citep{leclair.madec_OM09}. 228 256 % forcing seen by the model.... 229 257 This property improves the LF-RA scheme in two aspects. 230 258 First, the LF-RA can now ensure the local and global conservation of tracers. 231 259 Indeed, time filtering is no longer required on the forcing part. 232 The influence of the Asselin filter on the forcing is explicitly removed by adding a new term in the filter233 (last term in \autoref{eq:STP_RA} compared to \autoref{eq:STP_asselin}).260 The influence of the Asselin filter on the forcing is explicitly removed by 261 adding a new term in the filter (last term in \autoref{eq:TD_RA} compared to \autoref{eq:TD_asselin}). 234 262 Since the filtering of the forcing was the source of non-conservation in the classical LF-RA scheme, 235 263 the modified formulation becomes conservative \citep{leclair.madec_OM09}. 236 Second, the LF-RA becomes a truly quasi 237 Indeed, \autoref{eq: STP_forcing} used in combination with a careful treatment of static instability264 Second, the LF-RA becomes a truly quasi-second order scheme. 265 Indeed, \autoref{eq:TD_forcing} used in combination with a careful treatment of static instability 238 266 (\autoref{subsec:ZDF_evd}) and of the TKE physics (\autoref{subsec:ZDF_tke_ene}) 239 267 (the two other main sources of time step divergence), … … 242 270 Note that the forcing is now provided at the middle of a time step: 243 271 $Q^{t + \rdt / 2}$ is the forcing applied over the $[t,t + \rdt]$ time interval. 244 This and the change in the time filter, \autoref{eq: STP_RA},272 This and the change in the time filter, \autoref{eq:TD_RA}, 245 273 allows for an exact evaluation of the contribution due to the forcing term between any two time steps, 246 274 even if separated by only $\rdt$ since the time filter is no longer applied to the forcing term. 247 275 248 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 249 \begin{figure}[!t] 250 \begin{center} 251 \includegraphics[width=\textwidth]{Fig_MLF_forcing} 252 \caption{ 253 \protect\label{fig:MLF_forcing} 254 Illustration of forcing integration methods. 255 (top) ''Traditional'' formulation: 256 the forcing is defined at the same time as the variable to which it is applied 257 (integer value of the time step index) and it is applied over a $2 \rdt$ period. 258 (bottom) modified formulation: 259 the forcing is defined in the middle of the time (integer and a half value of the time step index) and 260 the mean of two successive forcing values ($n - 1 / 2$, $n + 1 / 2$) is applied over a $2 \rdt$ period. 261 } 262 \end{center} 276 \begin{figure} 277 \centering 278 \includegraphics[width=0.66\textwidth]{Fig_MLF_forcing} 279 \caption[Forcing integration methods for modified leapfrog (top and bottom)]{ 280 Illustration of forcing integration methods. 281 (top) ''Traditional'' formulation: 282 the forcing is defined at the same time as the variable to which it is applied 283 (integer value of the time step index) and it is applied over a $2 \rdt$ period. 284 (bottom) modified formulation: 285 the forcing is defined in the middle of the time 286 (integer and a half value of the time step index) and 287 the mean of two successive forcing values ($n - 1 / 2$, $n + 1 / 2$) is applied over 288 a $2 \rdt$ period.} 289 \label{fig:TD_MLF_forcing} 263 290 \end{figure} 264 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 265 266 % ------------------------------------------------------------------------------------------------------------- 267 % Start/Restart strategy 268 % ------------------------------------------------------------------------------------------------------------- 291 292 %% ================================================================================================= 269 293 \section{Start/Restart strategy} 270 \label{sec:STP_rst} 271 272 %--------------------------------------------namrun------------------------------------------- 273 \nlst{namrun} 274 %-------------------------------------------------------------------------------------------------------------- 275 276 The first time step of this three level scheme when starting from initial conditions is a forward step 277 (Euler time integration): 294 \label{sec:TD_rst} 295 296 \begin{listing} 297 \nlst{namrun} 298 \caption{\forcode{&namrun}} 299 \label{lst:namrun} 300 \end{listing} 301 302 The first time step of this three level scheme when starting from initial conditions is 303 a forward step (Euler time integration): 278 304 \[ 279 % \label{eq: DOM_euler}305 % \label{eq:TD_DOM_euler} 280 306 x^1 = x^0 + \rdt \ \text{RHS}^0 281 307 \] 282 This is done simply by keeping the leapfrog environment (\ie\ the \autoref{eq:STP} three level time stepping) but 308 This is done simply by keeping the leapfrog environment 309 (\ie\ the \autoref{eq:TD} three level time stepping) but 283 310 setting all $x^0$ (\textit{before}) and $x^1$ (\textit{now}) fields equal at the first time step and 284 311 using half the value of a leapfrog time step ($2 \rdt$). … … 289 316 running the model for $2N$ time steps in one go, 290 317 or by performing two consecutive experiments of $N$ steps with a restart. 291 This requires saving two time levels and many auxiliary data in the restart files in machine precision. 318 This requires saving two time levels and many auxiliary data in 319 the restart files in machine precision. 292 320 293 321 Note that the time step $\rdt$, is also saved in the restart file. 294 When restarting, if the time step has been changed, or one of the prognostic variables at \textit{before} time step 295 is missing, an Euler time stepping scheme is imposed. A forward initial step can still be enforced by the user by setting 296 the namelist variable \np{nn\_euler}\forcode{=0}. Other options to control the time integration of the model 297 are defined through the \nam{run} namelist variables. 298 %%% 322 When restarting, if the time step has been changed, or 323 one of the prognostic variables at \textit{before} time step is missing, 324 an Euler time stepping scheme is imposed. 325 A forward initial step can still be enforced by the user by 326 setting the namelist variable \np[=0]{nn_euler}{nn\_euler}. 327 Other options to control the time integration of the model are defined through 328 the \nam{run}{run} namelist variables. 329 299 330 \gmcomment{ 300 331 add here how to force the restart to contain only one time step for operational purposes … … 302 333 add also the idea of writing several restart for seasonal forecast : how is it done ? 303 334 304 verify that all namelist para rmeters are truly described335 verify that all namelist parameters are truly described 305 336 306 337 a word on the check of restart ..... 307 338 } 308 %%%309 339 310 340 \gmcomment{ % add a subsection here 311 341 312 %------------------------------------------------------------------------------------------------------------- 313 % Time Domain 314 % ------------------------------------------------------------------------------------------------------------- 342 %% ================================================================================================= 315 343 \subsection{Time domain} 316 \label{subsec:STP_time} 317 %--------------------------------------------namrun------------------------------------------- 318 319 \nlst{namdom} 320 %-------------------------------------------------------------------------------------------------------------- 321 322 Options are defined through the \nam{dom} namelist variables. 344 \label{subsec:TD_time} 345 346 Options are defined through the\nam{dom}{dom} namelist variables. 323 347 \colorbox{yellow}{add here a few word on nit000 and nitend} 324 348 325 349 \colorbox{yellow}{Write documentation on the calendar and the key variable adatrj} 326 350 327 add a description of daymod, and the model calandar (leap-year and co) 328 329 } %% end add 330 331 332 333 %% 351 add a description of daymod, and the model calendar (leap-year and co) 352 353 } %% end add 354 334 355 \gmcomment{ % add implicit in vvl case and Crant-Nicholson scheme 335 356 … … 381 402 \end{flalign*} 382 403 383 %%384 404 } 385 405 386 \biblio 387 388 \pindex 406 \onlyinsubfile{\input{../../global/epilogue}} 389 407 390 408 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3
-
Property
svn:externals
set to
^/utils/figures/SI3 figures
-
Property
svn:externals
set to
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/build
- Property svn:ignore
-
old new 14 14 *.pdf 15 15 *.toc 16 *.xdv 16 17 _minted-*
-
- Property svn:ignore
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/main/chapters.tex
r11171 r11799 1 1 \subfile{../subfiles/todolist} 2 3 \subfile{../subfiles/introduction} % Introduction4 2 5 3 \subfile{../subfiles/chap_model_basics} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles
- Property svn:ignore
-
old new 1 *.aux 2 *.bbl 3 *.blg 4 *.dvi 5 *.fdb* 6 *.fls 7 *.idx 1 *.ind 8 2 *.ilg 9 *.ind10 *.log11 *.maf12 *.mtc*13 *.out14 *.pdf15 *.toc16 _minted-*
-
- Property svn:ignore
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_bdy_agrif.tex
r11015 r11799 9 9 \chapter{BDY and AGRIF with SI$^3$} 10 10 \label{chap:REG} 11 \ minitoc11 \chaptertoc 12 12 13 13 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_domain.tex
r11031 r11799 10 10 \chapter{Time, space and thickness space domain} 11 11 \label{chap:DOM} 12 \ minitoc12 \chaptertoc 13 13 14 14 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_dynamics.tex
r11015 r11799 10 10 \chapter{Ice dynamics} 11 11 \label{chap:DYN} 12 \ minitoc12 \chaptertoc 13 13 14 14 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_interfaces.tex
r11015 r11799 9 9 \chapter{Ice-atmosphere and ice-ocean interfaces} 10 10 \label{chap:INT} 11 \ minitoc11 \chaptertoc 12 12 13 13 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_miscellaneous.tex
r11015 r11799 9 9 \chapter{Miscellaneous topics} 10 10 \label{chap:MIS} 11 \ minitoc11 \chaptertoc 12 12 13 13 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_model_basics.tex
r11043 r11799 9 9 \chapter{Model Basics} 10 10 \label{chap:MB} 11 \ minitoc11 \chaptertoc 12 12 13 13 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_output_diagnostics.tex
r11031 r11799 9 9 \chapter{Output and diagnostics} 10 10 \label{chap:DIA} 11 \ minitoc11 \chaptertoc 12 12 13 13 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_radiative_transfer.tex
r11031 r11799 13 13 \chapter{Radiative transfer} 14 14 \label{chap:RAD} 15 \ minitoc15 \chaptertoc 16 16 17 17 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_ridging_rafting.tex
r11043 r11799 10 10 \chapter{Ridging and rafting} 11 11 \label{chap:RDG} 12 \ minitoc12 \chaptertoc 13 13 14 14 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_single_category_use.tex
r11015 r11799 11 11 12 12 \label{chap:INT} 13 \ minitoc13 \chaptertoc 14 14 15 15 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_thermo.tex
r11031 r11799 9 9 \chapter{Ice thermodynamics} 10 10 \label{chap:THD} 11 \ minitoc11 \chaptertoc 12 12 13 13 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/SI3/subfiles/chap_transport.tex
r11031 r11799 10 10 \chapter{Ice transport} 11 11 \label{chap:TRP} 12 \ minitoc12 \chaptertoc 13 13 14 14 \newpage -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/TOP
-
Property
svn:externals
set to
^/utils/figures/TOP figures
-
Property
svn:externals
set to
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/TOP/build
- Property svn:ignore
-
old new 14 14 *.pdf 15 15 *.toc 16 *.xdv 16 17 _minted-*
-
- Property svn:ignore
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/TOP/main/chapters.tex
r11171 r11799 1 \subfile{../subfiles/introduction}2 1 \subfile{../subfiles/model_description} 3 2 \subfile{../subfiles/model_setup} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/TOP/subfiles
- Property svn:ignore
-
old new 1 *.aux2 *.bbl3 *.blg4 *.dvi5 *.fdb*6 *.fls7 *.idx8 1 *.ilg 9 2 *.ind 10 *.log11 *.maf12 *.mtc*13 *.out14 *.pdf15 *.toc16 _minted-*
-
- Property svn:ignore
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/TOP/subfiles/miscellaneous.tex
r10896 r11799 1 \documentclass[../ ../NEMO/main/NEMO_manual]{subfiles}1 \documentclass[../main/TOP_manual]{subfiles} 2 2 3 3 \begin{document} … … 43 43 \begin{minted}{bash} 44 44 bld::tool::fppkeys key_iomput key_mpp_mpi key_top 45 45 46 46 src::MYBGC::initialization <MYBGCPATH>/initialization 47 47 src::MYBGC::pelagic <MYBGCPATH>/pelagic -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/TOP/subfiles/model_description.tex
r11043 r11799 1 \documentclass[../ ../NEMO/main/NEMO_manual]{subfiles}1 \documentclass[../main/TOP_manual]{subfiles} 2 2 3 3 \newcommand{\cd}{\mathrm{CO_2}} … … 26 26 \end{equation} 27 27 28 where expressions of $D^{lC}$ and $D^{vC}$ depend on the choice for the lateral and vertical subgrid scale parameterizations, see equations 5.10 and 5.11 in \citep{nemo_manual} 28 where expressions of $D^{lC}$ and $D^{vC}$ depend on the choice for the lateral and vertical subgrid scale parameterizations, see equations 5.10 and 5.11 in \citep{nemo_manual} 29 29 30 30 {S(C)} , the first term on the right hand side of \ref{Eq_tracer}; is the SMS - Source Minus Sink - inherent to the tracer. In the case of biological tracer such as phytoplankton, {S(C)} is the balance between phytoplankton growth and its decay through mortality and grazing. In the case of a tracer comprising carbon, {S(C)} accounts for gas exchange, river discharge, flux to the sediments, gravitational sinking and other biological processes. In the case of a radioactive tracer, {S(C)} is simply loss due to radioactive decay. 31 31 32 The second term (within brackets) represents the advection of the tracer in the three directions. It can be interpreted as the budget between the incoming and outgoing tracer fluxes in a volume $T$-cells $b_t= e_{1t}\,e_{2t}\,e_{3t}$ 33 34 The third term represents the change due to lateral diffusion. 32 The second term (within brackets) represents the advection of the tracer in the three directions. It can be interpreted as the budget between the incoming and outgoing tracer fluxes in a volume $T$-cells $b_t= e_{1t}\,e_{2t}\,e_{3t}$ 33 34 The third term represents the change due to lateral diffusion. 35 35 36 36 The fourth term is change due to vertical diffusion, parameterized as eddy diffusion to represent vertical turbulent fluxes : … … 68 68 69 69 The passive tracer transport component shares the same advection/diffusion routines with the dynamics, with specific treatment of some features like the surface boundary conditions, or the positivity of passive tracers concentrations. 70 70 71 71 \subsection{ Advection} 72 72 %------------------------------------------namtrc_adv---------------------------------------------------- … … 80 80 \nlst{namtrc_ldf} 81 81 %------------------------------------------------------------------------------------------------------------- 82 In NEMO v4.0, the passive tracer diffusion has necessarily the same form as the active tracer diffusion, meaning that the numerical scheme must be the same. However the passive tracer mixing coefficient can be chosen as a multiple of the active ones by changing the value of \textit{rn\_ldf\_multi} in namelist \textit{namtrc\_ldf}. The choice of numerical scheme is then set in the \ngn{namtra\_ldf} namelist for the dynamic described in section 5.2 of \citep{nemo_manual}. 82 In NEMO v4.0, the passive tracer diffusion has necessarily the same form as the active tracer diffusion, meaning that the numerical scheme must be the same. However the passive tracer mixing coefficient can be chosen as a multiple of the active ones by changing the value of \textit{rn\_ldf\_multi} in namelist \textit{namtrc\_ldf}. The choice of numerical scheme is then set in the \ngn{namtra\_ldf} namelist for the dynamic described in section 5.2 of \citep{nemo_manual}. 83 83 84 84 85 85 %-----------------We also offers the possibility to increase zonal equatorial diffusion for passive tracers by introducing an enhanced zonal diffusivity coefficent in the equatorial domain which can be defined by the equation below : 86 86 %-----------------\begin{equation} \label{eq:traqsr_iradiance} 87 %-----------------Aht = Aht * rn_fact_lap * \exp( - \max( 0., z -1000 ) / 1000} \quad \text{for $L=1$ to $N$} 87 %-----------------Aht = Aht * rn_fact_lap * \exp( - \max( 0., z -1000 ) / 1000} \quad \text{for $L=1$ to $N$} 88 88 %-----------------\end{equation} 89 89 90 90 \subsection{ Tracer damping} 91 91 92 92 %------------------------------------------namtrc_dmp---------------------------------------------------- 93 93 \nlst{namtrc_dmp} … … 98 98 99 99 \subsection{ Tracer positivity} 100 100 101 101 %------------------------------------------namtrc_rad---------------------------------------------------- 102 102 \nlst{namtrc_rad} … … 160 160 As can be seen in the figure, while the concentration of SF6 continues to rise to the present day, the concentrations of both CFC-11 and CFC-12 have levelled off and declined since around the 1990s. 161 161 These declines have been driven by the Montreal Protocol (effective since August 1989), which has banned the production of CFC-11 and CFC-12 (as well as other CFCs) because of their role in the depletion of 162 stratospheric ozone (O$_{3}$), critical in decreasing the flux of ultraviolet radiation to the Earth's surface. Separate to this role in ozone-depletion, all three chemicals are significantly more potent greenhouse gases 162 stratospheric ozone (O$_{3}$), critical in decreasing the flux of ultraviolet radiation to the Earth's surface. Separate to this role in ozone-depletion, all three chemicals are significantly more potent greenhouse gases 163 163 than CO$_{2}$ (especially SF6), although their relatively low atmospheric concentrations limit their role in climate change. \\ 164 164 … … 168 168 % concentrations increased until around the late 1990s afterwhich they began to decline in 169 169 % response to the Montreal Protocol. 170 % In the case of SF6, release began in the 1950s 170 % In the case of SF6, release began in the 1950s 171 171 % This release began in the 1930s for CFC-11 and CFC-12, and the 1950s for SF6, and 172 % regularly increasing their atmospheric concentration until the 1090s, 2000s for respectively CFC11, CFC12, 172 % regularly increasing their atmospheric concentration until the 1090s, 2000s for respectively CFC11, CFC12, 173 173 % and is still increasing, and SF6 (see Figure \ref{img_cfcatm}). \\ 174 174 … … 177 177 Because they only enter the ocean via surface air-sea exchange, and are almost completely chemically and biologically inert, their distribution within the ocean interior reveals its ventilation via transport and mixing. 178 178 Measuring the dissolved concentrations of the gases -- as well as the mixing ratios between them -- shows circulation pathways within the ocean as well as water mass ages (i.e. the time since last contact with the 179 atmosphere). This feature of the gases has made them valuable across a wide range of oceanographic problems. One use lies in ocean modelling, where they can be used to evaluate the realism of the circulation and 179 atmosphere). This feature of the gases has made them valuable across a wide range of oceanographic problems. One use lies in ocean modelling, where they can be used to evaluate the realism of the circulation and 180 180 ventilation of models, key for understanding the behaviour of wider modelled marine biogeochemistry (e.g. \citep{dutay_2002,palmieri_2015}). \\ 181 181 … … 183 183 184 184 Advection and diffusion of the CFCs in NEMO are calculated by the physical module, OPA, 185 whereas sources and sinks are done by the CFC module within TOP. 186 The only source for CFCs in the ocean is via air-sea gas exchange at its surface, and since CFCs are generally 187 stable within the ocean, we assume that there are no sinks (i.e. no loss processes) within the ocean interior. 185 whereas sources and sinks are done by the CFC module within TOP. 186 The only source for CFCs in the ocean is via air-sea gas exchange at its surface, and since CFCs are generally 187 stable within the ocean, we assume that there are no sinks (i.e. no loss processes) within the ocean interior. 188 188 Consequently, the sinks-minus-sources term for CFCs consists only of their air-sea fluxes, $F_{cfc}$, as 189 189 described in the Ocean Model Inter-comparison Project (OMIP) protocol \citep{orr_2017}: … … 196 196 F_{cfc} = K_{w} \, \cdot \, (C_{sat} - C_{surf}) \, \cdot \, (1 - f_{i}) 197 197 \label{equ_CFC_flux} 198 \end{eqnarray} 199 200 Where $K_{w}$ is the piston velocity (in m~s$^{-1}$), as defined in Equation \ref{equ_Kw}; 201 $C_{sat}$ is the saturation concentration of the CFC tracer, as defined in Equation \ref{equ_C_sat}; 202 $C_{surf}$ is the local surface concentration of the CFC tracer within the model (in mol~m$^{-3}$); 198 \end{eqnarray} 199 200 Where $K_{w}$ is the piston velocity (in m~s$^{-1}$), as defined in Equation \ref{equ_Kw}; 201 $C_{sat}$ is the saturation concentration of the CFC tracer, as defined in Equation \ref{equ_C_sat}; 202 $C_{surf}$ is the local surface concentration of the CFC tracer within the model (in mol~m$^{-3}$); 203 203 and $f_{i}$ is the fractional sea-ice cover of the local ocean (ranging between 0.0 for ice-free ocean, 204 204 through to 1.0 for completely ice-covered ocean with no air-sea exchange). … … 209 209 C_{sat} = Sol \, \cdot \, P_{cfc} 210 210 \label{equ_C_sat} 211 \end{eqnarray} 212 213 Where $Sol$ is the gas solubility in mol~m$^{-3}$~pptv$^{-1}$, as defined in Equation \ref{equ_Sol_CFC}; 211 \end{eqnarray} 212 213 Where $Sol$ is the gas solubility in mol~m$^{-3}$~pptv$^{-1}$, as defined in Equation \ref{equ_Sol_CFC}; 214 214 and $P_{cfc}$ is the atmosphere concentration of the CFC (in parts per trillion by volume, pptv). 215 215 This latter concentration is provided to the model by the historical time-series of \citet{bullister_2017}. 216 This includes bulk atmospheric concentrations of the CFCs for both hemispheres -- this is necessary because of 217 the geographical asymmetry in the production and release of CFCs to the atmosphere. 218 Within the model, hemispheric concentrations are uniform, with the exception of the region between 216 This includes bulk atmospheric concentrations of the CFCs for both hemispheres -- this is necessary because of 217 the geographical asymmetry in the production and release of CFCs to the atmosphere. 218 Within the model, hemispheric concentrations are uniform, with the exception of the region between 219 219 10$^{\circ}$N and 10$^{\circ}$ in which they are linearly interpolated. 220 220 221 The piston velocity $K_{w}$ is a function of 10~m wind speed (in m~s$^{-1}$) and sea surface temperature, 221 The piston velocity $K_{w}$ is a function of 10~m wind speed (in m~s$^{-1}$) and sea surface temperature, 222 222 $T$ (in $^{\circ}$C), and is calculated here following \citet{wanninkhof_1992}: 223 223 … … 225 225 K_{w} = X_{conv} \, \cdot \, a \, \cdot \, u^2 \, \cdot \, \sqrt{ \frac{Sc(T)}{660} } 226 226 \label{equ_Kw} 227 \end{eqnarray} 228 229 Where $X_{conv}$ = $\frac{0.01}{3600}$, a conversion factor that changes the piston velocity 230 from cm~h$^{-1}$ to m~s$^{-1}$; 227 \end{eqnarray} 228 229 Where $X_{conv}$ = $\frac{0.01}{3600}$, a conversion factor that changes the piston velocity 230 from cm~h$^{-1}$ to m~s$^{-1}$; 231 231 $a$ is a constant re-estimated by \citet{wanninkhof_2014} to 0.251 (in $\frac{cm~h^{-1}}{(m~s^{-1})^{2}}$); 232 232 and $u$ is the 10~m wind speed in m~s$^{-1}$ from either an atmosphere model or reanalysis atmospheric forcing. … … 236 236 Sc = a0 + (a1 \, \cdot \, T) + (a2 \, \cdot \, T^2) + (a3 \, \cdot \, T^3) + (a4 \, \cdot \, T^4) 237 237 \label{equ_Sc} 238 \end{eqnarray} 239 240 The solubility, $Sol$, used in Equation \ref{equ_C_sat} is calculated in mol~l$^{-1}$~atm$^{-1}$, 241 and is specific for each gas. 242 It has been experimentally estimated by \citet{warner_1985} as a function of temperature 238 \end{eqnarray} 239 240 The solubility, $Sol$, used in Equation \ref{equ_C_sat} is calculated in mol~l$^{-1}$~atm$^{-1}$, 241 and is specific for each gas. 242 It has been experimentally estimated by \citet{warner_1985} as a function of temperature 243 243 and salinity: 244 244 … … 246 246 % code version that I have to hand, although this might be out of date; in any case, I'dag 247 247 % strongly suggest avoiding the use of the \frac{}{100}, and instead substitute a term that is 248 % "degrees Kelvin divided by 100" (which is weird in itself); and make this term use Celcius 248 % "degrees Kelvin divided by 100" (which is weird in itself); and make this term use Celcius 249 249 % so that you're not using T twice in different ways 250 250 … … 252 252 \ln{(Sol)} = a_1 + \frac{a_2}{ T_{X}} + a_3 \, \cdot \, \ln{ T_{X} } + a_4 \, \cdot \, T_{X}^2 + S \, \cdot \, ( b_1 + b_2 \, \cdot \, T_{X} + b_3 \, \cdot \, T_{X}^2 ) 253 253 \label{equ_Sol_CFC} 254 \end{eqnarray} 254 \end{eqnarray} 255 255 256 256 % \begin{eqnarray} 257 257 % \ln{(Sol)} = a1 + a2 \, \frac{100}{T} + a3 \, \ln{ (\frac{T}{100}) } + a4 \, \frac{T}{100}^2 + S \, ( b1 + b2 \, \frac{T}{100} + b3 \, \frac{T}{100}^2 ) 258 258 % \label{equ_Sol_CFC} 259 % \end{eqnarray} 260 261 Where $T_{X}$ is $\frac{T + 273.16}{100}$, a function of temperature; 259 % \end{eqnarray} 260 261 Where $T_{X}$ is $\frac{T + 273.16}{100}$, a function of temperature; 262 262 and the $a_{x}$ and $b_{x}$ coefficients are specific for each gas (see Table \ref{tab_ref_CFC}). 263 263 This is then converted to mol~m$^{-3}$~pptv$^{-1}$ assuming a constant atmospheric surface pressure of 1~atm. 264 The solubility of CFCs thus decreases with rising $T$ while being relatively insensitive to salinity changes. 264 The solubility of CFCs thus decreases with rising $T$ while being relatively insensitive to salinity changes. 265 265 Consequently, this translates to a pattern of solubility where it is greatest in cold, polar regions (see Figure \ref{img_cfcsol}). 266 266 … … 289 289 \centering 290 290 \begin{tabular}{l l l l l l l l l} 291 \hline 292 Gas & & a1 & a2 & a3 & a4 & b1 & b2 & b3 \\ 291 \hline 292 Gas & & a1 & a2 & a3 & a4 & b1 & b2 & b3 \\ 293 293 \hline 294 294 CFC-11 & & -218.0971 & 298.9702 & 113.8049 & -1.39165 & -0.143566 & 0.091015 & -0.0153924 \\ … … 296 296 SF6 & & -80.0343 & 117.232 & 29.5817 & 0.0 & 0.0335183 & -0.0373942 & 0.00774862 \\ 297 297 \hline 298 \end{tabular} 298 \end{tabular} 299 299 \label{tab_ref_CFC} 300 300 \end{table} … … 306 306 \centering 307 307 \begin{tabular}{l l l l l l l } 308 \hline 309 Gas & & a0 & a1 & a2 & a3 & a4 \\ 308 \hline 309 Gas & & a0 & a1 & a2 & a3 & a4 \\ 310 310 \hline 311 311 CFC-11 & & 3579.2 & -222.63 & 7.5749 & -0.14595 & 0.0011874 \\ … … 313 313 SF6 & & 3177.5 & -200.57 & 6.8865 & -0.13335 & 0.0010877 \\ 314 314 \hline 315 \end{tabular} 315 \end{tabular} 316 316 \label{tab_Sc} 317 317 \end{table} … … 353 353 %---------------------------------------------------------------------------------------------------------- 354 354 355 The C14 package implemented in NEMO by Anne Mouchet models ocean $\Dcq$. It offers several possibilities: $\Dcq$ as a physical tracer of the ocean ventilation (natural $\cq$), assessment of bomb radiocarbon uptake, as well as transient studies of paleo-historical ocean radiocarbon distributions. 355 The C14 package implemented in NEMO by Anne Mouchet models ocean $\Dcq$. It offers several possibilities: $\Dcq$ as a physical tracer of the ocean ventilation (natural $\cq$), assessment of bomb radiocarbon uptake, as well as transient studies of paleo-historical ocean radiocarbon distributions. 356 356 357 357 \subsubsection{Method} … … 368 368 369 369 This simplified approach also neglects the effects of fractionation (e.g., air-sea exchange) and of biological processes. Previous studies by \cite{bacastow_1990} and \cite{joos_1997} resulted in nearly identical $\Dcq$ distributions among experiments considering biology or not. 370 Since observed $\Rq$ ratios are corrected for the isotopic fractionation when converted to the standard $\Dcq$ notation \citep{stuiver_1977} the model results are directly comparable to observations. 370 Since observed $\Rq$ ratios are corrected for the isotopic fractionation when converted to the standard $\Dcq$ notation \citep{stuiver_1977} the model results are directly comparable to observations. 371 371 372 372 Therefore the simplified approach is justified for the purpose of assessing the circulation and ventilation of OGCMs. … … 425 425 %The sensitivity to this parametrization is discussed in section \ref{sec:result}. 426 426 % 427 \item Chemical enhancement (term $b$ in Eq. \ref{eq:wanchem}) may be set on/off by means of the logical variable \CODE{ln\_chemh}. 427 \item Chemical enhancement (term $b$ in Eq. \ref{eq:wanchem}) may be set on/off by means of the logical variable \CODE{ln\_chemh}. 428 428 \end{itemize} 429 429 … … 464 464 \end{figure} 465 465 466 Performing this type of experiment requires that a pre-industrial equilibrium run be performed beforehand (\CODE{ln\_rsttr} should be set to \texttt{.TRUE.}). 466 Performing this type of experiment requires that a pre-industrial equilibrium run be performed beforehand (\CODE{ln\_rsttr} should be set to \texttt{.TRUE.}). 467 467 468 468 An exception to this rule is when wishing to perform a perturbation bomb experiment as was possible with the package \texttt{C14b}. It is still possible to easily set-up that type of transient experiment for which no previous run is needed. In addition to the instructions as given in this section it is however necessary to adapt the \texttt{atmc14.dat} file so that it does no longer contain any negative $\Dcq$ values (Suess effect in the pre-bomb period). … … 476 476 \begin{itemize} 477 477 \item Specify the starting date of the experiment: \CODE{nn\_date0} in \texttt{namelist}. \CODE{nn\_date0} is written as Year0101 where Year may take any positive value (AD). 478 \item Then the parameters \CODE{nn\_rstctl} in \texttt{namelist} (on-line) and \CODE{nn\_rsttr} in \texttt{namelist\_top} (off-line) must be \textbf{set to 0} at the start of the experiment (force the date to \CODE{nn\_date0} for the \textbf{first} experiment year). 478 \item Then the parameters \CODE{nn\_rstctl} in \texttt{namelist} (on-line) and \CODE{nn\_rsttr} in \texttt{namelist\_top} (off-line) must be \textbf{set to 0} at the start of the experiment (force the date to \CODE{nn\_date0} for the \textbf{first} experiment year). 479 479 \item These two parameters (\CODE{nn\_rstctl} and \CODE{nn\_rsttr}) have then to be \textbf{set to 2} for the following years (the date must be read in the restart file). 480 480 \end{itemize} … … 497 497 498 498 The file \texttt{intcal13.14c} \citep{reimer_2013} contains atmospheric $\Dcq$ from 0 to 50 kyr cal BP\footnote{cal BP: number of years before 1950 AD}. 499 The $\cd$ forcing is provided in file \texttt{ByrdEdcCO2.txt}. The content of this file is based on the high resolution record from EPICA Dome C \citep{monnin_2004} for the Holocene and the Transition, and on Byrd Ice Core CO2 Data for 20--90 kyr BP \citep{ahn_2008}. These atmospheric values are reproduced in Fig. \ref{fig:paleo}. Dates in these files are expressed as yr BP. 499 The $\cd$ forcing is provided in file \texttt{ByrdEdcCO2.txt}. The content of this file is based on the high resolution record from EPICA Dome C \citep{monnin_2004} for the Holocene and the Transition, and on Byrd Ice Core CO2 Data for 20--90 kyr BP \citep{ahn_2008}. These atmospheric values are reproduced in Fig. \ref{fig:paleo}. Dates in these files are expressed as yr BP. 500 500 501 501 To ensure that the atmospheric forcing is applied properly as well as that output files contain consistent dates and inventories the experiment should be set up carefully. … … 519 519 Field & Type & Dim & Units & Description \\ \hline 520 520 RC14 & ptrc & 3-D & - & Radiocarbon ratio \\ 521 DeltaC14 & diad & 3-D & \textperthousand & $\Dcq$\\ 521 DeltaC14 & diad & 3-D & \textperthousand & $\Dcq$\\ 522 522 C14Age & diad & 3-D & yr & Radiocarbon age \\ 523 523 RAge & diad & 2-D & yr & Reservoir age\\ 524 524 qtr\_c14 & diad & 2-D & m$^{-2}$ yr$^{-1}$ & Air-to-sea net $\Rq$ flux\\ 525 525 qint\_c14 & diad & 2-D & m$^{-2}$ & Cumulative air-to-sea $\Rq$ flux \\ 526 AtmCO2 & scalar & 0-D & ppm & Global atmospheric $\cd$ \\ 527 AtmC14 & scalar & 0-D & \textperthousand & Global atmospheric $\Dcq$\\ 528 K\_CO2 & scalar & 0-D & cm h$^{-1}$ & Global $\cd$ piston velocity ($ \overline{\kappa_{\cd}}$) \\ 529 K\_C14 & scalar & 0-D &m yr$^{-1}$ & Global $\Rq$ transfer velocity ($ \overline{\kappa_R}$)\\ 526 AtmCO2 & scalar & 0-D & ppm & Global atmospheric $\cd$ \\ 527 AtmC14 & scalar & 0-D & \textperthousand & Global atmospheric $\Dcq$\\ 528 K\_CO2 & scalar & 0-D & cm h$^{-1}$ & Global $\cd$ piston velocity ($ \overline{\kappa_{\cd}}$) \\ 529 K\_C14 & scalar & 0-D &m yr$^{-1}$ & Global $\Rq$ transfer velocity ($ \overline{\kappa_R}$)\\ 530 530 C14Inv & scalar & 0-D & $10^{26}$ atoms & Ocean radiocarbon inventory \\ \hline 531 531 \end{tabular} … … 534 534 \end{table} 535 535 %! Standard ratio: 1.176E-12 ; Avogadro's nbr = 6.022E+23 at/mol ; bomb C14 traditionally reported as 1.E+26 atoms 536 % REAL(wp), PARAMETER :: atomc14=1.176*6.022E-15 ! conversion factor 536 % REAL(wp), PARAMETER :: atomc14=1.176*6.022E-15 ! conversion factor 537 537 % atomc14 * xdicsur * zdum 538 538 539 The radiocarbon age is computed as $(-1/\lambda) \ln{ \left( \Rq \right)}$, with zero age corresponding to $\Rq=1$. 539 The radiocarbon age is computed as $(-1/\lambda) \ln{ \left( \Rq \right)}$, with zero age corresponding to $\Rq=1$. 540 540 541 541 The reservoir age is the age difference between the ocean uppermost layer and the atmosphere. It is usually reported as conventional radiocarbon age; i.e., computed by means of the Libby radiocarbon mean life \cite[8033 yr;][]{stuiver_1977} … … 561 561 \subsection{PISCES biogeochemical model} 562 562 563 PISCES is a biogeochemical model which simulates the lower trophic levels of marine ecosystem (phytoplankton, microzooplankton and mesozooplankton) and the biogeochemical cycles of carbonand of the main nutrients (P, N, Fe, and Si). The model is intended to be used for both regional and global configurations at high or low spatial resolutions as well as for short-term (seasonal, interannual) and long-term (climate change, paleoceanography) analyses. 563 PISCES is a biogeochemical model which simulates the lower trophic levels of marine ecosystem (phytoplankton, microzooplankton and mesozooplankton) and the biogeochemical cycles of carbonand of the main nutrients (P, N, Fe, and Si). The model is intended to be used for both regional and global configurations at high or low spatial resolutions as well as for short-term (seasonal, interannual) and long-term (climate change, paleoceanography) analyses. 564 564 Two versions of PISCES are available in NEMO v4.0 : 565 565 566 PISCES-v2, by setting in namelist\_pisces\_ref \np{ln\_p4z} to true, can be seen as one of the many Monod models \citep{monod_1958}. It assumes a constant Redfield ratio and phytoplankton growth depends on the external concentration in nutrients. There are twenty-four prognostic variables (tracers) including two phytoplankton compartments (diatoms and nanophytoplankton), two zooplankton size-classes (microzooplankton and mesozooplankton) and a description of the carbonate chemistry. Formulations in PISCES-v2 are based on a mixed Monod/Quota formalism: On one hand, stoichiometry of C/N/P is fixed and growth rate of phytoplankton is limited by the external availability in N, P and Si. On the other hand, the iron and silicium quotas are variable and growth rate of phytoplankton is limited by the internal availability in Fe. Various parameterizations can be activated in PISCES-v2, setting for instance the complexity of iron chemistry or the description of particulate organic materials. 566 PISCES-v2, by setting in namelist\_pisces\_ref \np{ln\_p4z} to true, can be seen as one of the many Monod models \citep{monod_1958}. It assumes a constant Redfield ratio and phytoplankton growth depends on the external concentration in nutrients. There are twenty-four prognostic variables (tracers) including two phytoplankton compartments (diatoms and nanophytoplankton), two zooplankton size-classes (microzooplankton and mesozooplankton) and a description of the carbonate chemistry. Formulations in PISCES-v2 are based on a mixed Monod/Quota formalism: On one hand, stoichiometry of C/N/P is fixed and growth rate of phytoplankton is limited by the external availability in N, P and Si. On the other hand, the iron and silicium quotas are variable and growth rate of phytoplankton is limited by the internal availability in Fe. Various parameterizations can be activated in PISCES-v2, setting for instance the complexity of iron chemistry or the description of particulate organic materials. 567 567 568 568 PISCES-QUOTA has been built on the PISCES-v2 model described in \citet{aumont_2015}. PISCES-QUOTA has thirty-nine prognostic compartments. Phytoplankton growth can be controlled by five modeled limiting nutrients: Nitrate and Ammonium, Phosphate, Silicate and Iron. Five living compartments are represented: Three phytoplankton size classes/groups corresponding to picophytoplankton, nanophytoplankton and diatoms, and two zooplankton size classes which are microzooplankton and mesozooplankton. For phytoplankton, the prognostic variables are the carbon, nitrogen, phosphorus, iron, chlorophyll and silicon biomasses (the latter only for diatoms). This means that the N/C, P/C, Fe/C and Chl/C ratios of both phytoplankton groups as well as the Si/C ratio of diatoms are prognostically predicted by the model. Zooplankton are assumed to be strictly homeostatic \citep[e.g.,][]{sterner_2003,woods_2013,meunier_2014}. As a consequence, the C/N/P/Fe ratios of these groups are maintained constant and are not allowed to vary. In PISCES, the Redfield ratios C/N/P are set to 122/16/1 \citep{takahashi_1985} and the -O/C ratio is set to 1.34 \citep{kortzinger_2001}. No silicified zooplankton is assumed. The bacterial pool is not yet explicitly modeled. … … 570 570 There are three non-living compartments: Semi-labile dissolved organic matter, small sinking particles, and large sinking particles. As a consequence of the variable stoichiometric ratios of phytoplankton and of the stoichiometric regulation of zooplankton, elemental ratios in organic matter cannot be supposed constant anymore as that was the case in PISCES-v2. Indeed, the nitrogen, phosphorus, iron, silicon and calcite pools of the particles are now all explicitly modeled. The sinking speed of the particles is not altered by their content in calcite and biogenic silicate (''The ballast effect'', \citep{honjo_1996,armstrong_2001}). The latter particles are assumed to sink at the same speed as the large organic matter particles. All the non-living compartments experience aggregation due to turbulence and differential settling as well as Brownian coagulation for DOM. 571 571 572 572 573 573 \subsection{MY\_TRC interface for coupling external BGC models} 574 574 \label{Mytrc} … … 597 597 598 598 Coupling passive tracers offline with NEMO requires precomputed physical fields from OGCM. Those fields are read from files and interpolated on-the-fly at each model time step 599 At least the following dynamical parameters should be absolutely passed to the transport : ocean velocities, temperature, salinity, mixed layer depth and for ecosystem models like PISCES, sea ice concentration, short wave radiation at the ocean surface, wind speed (or at least, wind stress). 599 At least the following dynamical parameters should be absolutely passed to the transport : ocean velocities, temperature, salinity, mixed layer depth and for ecosystem models like PISCES, sea ice concentration, short wave radiation at the ocean surface, wind speed (or at least, wind stress). 600 600 The so-called offline mode is useful since it has lower computational costs for example to perform very longer simulations - about 3000 years - to reach equilibrium of CO2 sinks for climate-carbon studies. 601 601 … … 603 603 604 604 \begin{itemize} 605 \item \textit{dtadyn.F90} : this module allows to read and compute the dynamical fields at each model time-step 605 \item \textit{dtadyn.F90} : this module allows to read and compute the dynamical fields at each model time-step 606 606 \item \textit{nemogcm.F90} : a degraded version of the main nemogcm.F90 code of NEMO to manage the time-stepping 607 607 \end{itemize} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/TOP/subfiles/model_setup.tex
r11019 r11799 1 \documentclass[../ ../NEMO/main/NEMO_manual]{subfiles}1 \documentclass[../main/TOP_manual]{subfiles} 2 2 3 3 \begin{document} … … 10 10 %------------------------------------------------------------------------------------------------------------- 11 11 12 The usage of TOP is activated 12 The usage of TOP is activated 13 13 14 14 \begin{itemize} … … 19 19 As an example, the user can refer to already available configurations in the code, GYRE\_PISCES being the NEMO biogeochemical demonstrator and GYRE\_BFM to see the required configuration elements to couple with an external biogeochemical model (see also section \S\ref{SMS_models}) . 20 20 21 Note that, since version 4.0, TOP interface core functionalities are activated by means of logical keys and all submodules preprocessing macros from previous versions were removed. 21 Note that, since version 4.0, TOP interface core functionalities are activated by means of logical keys and all submodules preprocessing macros from previous versions were removed. 22 22 23 23 There are only three specific keys remaining in TOP … … 28 28 \end{itemize} 29 29 30 For a remind, the revisited structure of TOP interface now counts for five different modules handled in namelist\_top : 30 For a remind, the revisited structure of TOP interface now counts for five different modules handled in namelist\_top : 31 31 32 32 \begin{itemize} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global
- Property svn:ignore deleted
-
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/ametsoc.bst
r11128 r11799 9 9 %% *** Bibliography style file for ALL AMS Journals...version 1.0 *** 10 10 %% *** Brian Papa - American Meteorological Society *** 11 %% 11 %% 12 12 %% Copyright 1994-2004 Patrick W Daly 13 13 % =============================================================== … … 519 519 duplicate$ empty$ 'skip$ 520 520 { 521 "\href{http://dx.doi.org/" swap$ * "}{ DOI}" *521 "\href{http://dx.doi.org/" swap$ * "}{\aiDoi}" * 522 522 } 523 523 if$ … … 1192 1192 crossref missing$ 1193 1193 { format.in.ed.booktitle "booktitle" output.check 1194 format.publisher.address output 1194 format.publisher.address output 1195 1195 format.bvolume output 1196 1196 format.number.series output -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/annex_D.tex
r11299 r11799 31 31 - flexible. 32 32 33 To satisfy part of these aims, \NEMO is written with a coding standard which is close to the ECMWF rules,33 To satisfy part of these aims, \NEMO\ is written with a coding standard which is close to the ECMWF rules, 34 34 named DOCTOR \citep{gibson_rpt86}. 35 35 These rules present some advantages like: -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/coding_rules.tex
r11433 r11799 1 1 2 2 \chapter{Coding Rules} 3 \label{apdx: coding}4 5 \ minitoc3 \label{apdx:CODING} 4 5 \chaptertoc 6 6 7 7 \newpage … … 13 13 produces fewer bugs and is easier to maintain. 14 14 Therefore, it is essential that the model development follows some rules: 15 15 16 \begin{itemize} 16 17 18 19 20 21 17 \item well planned and designed 18 \item well written 19 \item well documented (both on- and off-line) 20 \item maintainable 21 \item easily portable 22 \item flexible. 22 23 \end{itemize} 23 24 24 To satisfy part of these aims, \NEMO is written with a coding standard which is close to the ECMWF rules,25 named DOCTOR \citep{gibson_rpt86}. 25 To satisfy part of these aims, \NEMO\ is written with a coding standard which is close to the ECMWF rules, 26 named DOCTOR \citep{gibson_rpt86}. 26 27 These rules present some advantages like: 28 27 29 \begin{itemize} 28 \item to provide a well presented program 29 \item to use rules for variable names which allow recognition of their type 30 (integer, real, parameter, local or shared variables, etc. ). 30 \item to provide a well presented program 31 \item to use rules for variable names which allow recognition of their type (integer, real, parameter, local or shared variables, etc. ). 31 32 \end{itemize} 32 33 … … 35 36 \section{Introduction} 36 37 37 This document describes conventions used in \NEMO coding and suggested for its development.38 The objectives are to offer a guide to all readers of the \NEMO code, and to facilitate the work of38 This document describes conventions used in \NEMO\ coding and suggested for its development. 39 The objectives are to offer a guide to all readers of the \NEMO\ code, and to facilitate the work of 39 40 all the developers, including the validation of their developments, and 40 eventually the implementation of these developments within the \NEMO platform.41 eventually the implementation of these developments within the \NEMO\ platform. 41 42 42 43 A first approach of these rules can be found in the code in \path{./src/OCE/module_example} where … … 45 46 46 47 This work is based on the coding conventions in use for the Community Climate System Model 47 \footnote {\href{http://www.cesm.ucar.edu/working_groups/Software/dev_guide/dev_guide/node7.html}{UCAR conventions}}, 48 \footnote {\href{http://www.cesm.ucar.edu/working_groups/Software/dev_guide/dev_guide/node7.html}{UCAR conventions}}, 48 49 the previous version of this document (``FORTRAN coding standard in the OPA System'') and 49 the expertise of the \NEMO System Team.50 the expertise of the \NEMO\ System Team. 50 51 After a general overview below, this document will describe: 51 52 52 53 \begin{itemize} 53 54 55 54 \item The style rules, $i.e.$ the syntax, appearance and naming conventions chosen to improve readability of the code; 55 \item The content rules, $i.e.$ the conventions to improve the reliability of the different parts of the code; 56 \item The package rules to go a step further by improving the reliability of the whole and 56 57 interfaces between routines and modules. 57 58 \end{itemize} … … 59 60 \section{Overview and general conventions} 60 61 61 \NEMO has 3 major components: ocean dynamics (\path{./src/OCE}), sea-ice (\path{./src/ICE}) and62 \NEMO\ has 3 major components: ocean dynamics (\path{./src/OCE}), sea-ice (\path{./src/ICE}) and 62 63 marine biogeochemistry (\path{./src/MBG}). 63 64 %, linear-tangent and adjoint of the dynamics ($TAM$) each of them corresponding to a directory. … … 79 80 80 81 \begin{itemize} 81 82 83 84 \item \path{OBC}, \path{BDY} management of structured and unstructured open boundaries 85 86 87 82 \item \path{SBC} surface module 83 \item \path{IOM} management of the I/O 84 \item \path{NST} interface to AGRIF (nesting model) for dynamics and biogeochemistry 85 \item \path{OBC}, \path{BDY} management of structured and unstructured open boundaries 86 \item \path{C1D} 1D (vertical) configuration for dynamics, sea-ice and biogeochemistry 87 \item \path{OFF} off-line module: passive tracer or biogeochemistry alone 88 \item \path{...} 88 89 \end{itemize} 89 90 … … 142 143 143 144 All FORTRAN keywords are in capital: \forcode{DIMENSION}, \forcode{WRITE}, \forcode{DO}, \forcode{END DO}, 144 \forcode{NAMELIST}, ... All other parts of the \NEMO code will be written in lower case.145 \forcode{NAMELIST}, ... All other parts of the \NEMO\ code will be written in lower case. 145 146 146 147 \subsection{Comments} … … 216 217 \subsection{F90 Standard} 217 218 218 \NEMO software adheres to the \fninety language standard and does not rely on any specific language or219 \NEMO\ software adheres to the \fninety language standard and does not rely on any specific language or 219 220 vendor extensions. 220 221 … … 268 269 For example, zdftke, where ``zdf'' stands for vertical diffusion, and ``tke'' for turbulent kinetic energy. \\ 269 270 Note that by implication multiple modules are not allowed in a single file. 270 The use of common blocks is deprecated in \fortran 90 and their use in \NEMO is strongly discouraged.271 The use of common blocks is deprecated in \fortran 90 and their use in \NEMO\ is strongly discouraged. 271 272 Modules are a better way to declare static data. 272 273 Among the advantages of modules is the ability to freely mix data of various types, and … … 292 293 complex \\ 293 294 \hline 294 public \par or \par module variable & 295 \textbf{m n} \par \textit{but not} \par \textbf{nn\_} & 295 public \par or \par module variable & 296 \textbf{m n} \par \textit{but not} \par \textbf{nn\_} & 296 297 \textbf{a b e f g h o} \textbf{q} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_} & 297 298 \textbf{l} \par \textit{but not} \par \textbf{lp ld ll ln\_} & … … 301 302 \hline 302 303 dummy \par argument & 303 \textbf{k} \par \textit{but not} \par \textbf{kf} & 304 \textbf{p} \par \textit{but not} \par \textbf{pp pf} & 304 \textbf{k} \par \textit{but not} \par \textbf{kf} & 305 \textbf{p} \par \textit{but not} \par \textbf{pp pf} & 305 306 \textbf{ld} & 306 307 \textbf{cd} & … … 309 310 \hline 310 311 local \par variable & 311 \textbf{i} & 312 \textbf{i} & 312 313 \textbf{z} & 313 314 \textbf{ll} & … … 333 334 \hline 334 335 namelist & 335 \textbf{nn\_} & 336 \textbf{nn\_} & 336 337 \textbf{rn\_} & 337 338 \textbf{ln\_} & … … 388 389 Is to be used rather than the \#ifdef abbreviate form since it may have conflicts with some Unix scripts. 389 390 390 Tests on cpp keys included in \NEMO at compilation step:391 Tests on cpp keys included in \NEMO\ at compilation step: 391 392 392 393 \begin{itemize} … … 402 403 \subsection{Configurations} 403 404 404 The configuration defines the domain and the grid on which \NEMO is running.405 The configuration defines the domain and the grid on which \NEMO\ is running. 405 406 It may be useful to associate a CPP key and some variables to a given configuration, although 406 407 the part of the code changed under each of those keys should be minimized. … … 487 488 \subsection{Headers} 488 489 489 Prologues are not used in \NEMO for now, although it may become an interesting tool in combination with490 Prologues are not used in \NEMO\ for now, although it may become an interesting tool in combination with 490 491 ProTeX auto documentation script in the future. 491 492 Rules to code the headers and layout of a module or a routine are illustrated in the example module available with … … 563 564 \subsection{Bounds checking} 564 565 565 \NEMO is able to run when an array bounds checking option is enabled566 \NEMO\ is able to run when an array bounds checking option is enabled 566 567 (provided the cpp key \texttt{key\_vectopt\_loop} is not defined). \\ 567 568 Thus, constructs of the following form are disallowed: … … 606 607 the \texttt{stat=<integer\ variable>} optional argument. \\ 607 608 608 In addition to arrays contained within modules, many routines in \NEMO require local, ``workspace'' arrays to609 In addition to arrays contained within modules, many routines in \NEMO\ require local, ``workspace'' arrays to 609 610 hold the intermediate results of calculations. 610 611 In previous versions of \NEMO, these arrays were declared in such a way as to be automatically allocated on … … 697 698 It is then associated with a sub-array of \texttt{wrk\_3d\_5} once the call to 698 699 \texttt{wrk\_in\_use()} has completed successfully. 699 Note that in F95 (to which \NEMO conforms) it is not possible for either the upper or lower array bounds of700 Note that in F95 (to which \NEMO\ conforms) it is not possible for either the upper or lower array bounds of 700 701 the pointer object to differ from those of the target array. \\ 701 702 … … 710 711 This should enable the developer to choose alternatives for use in the subroutine being worked on. \\ 711 712 712 When compiling \NEMO for production runs,713 When compiling \NEMO\ for production runs, 713 714 the calls to {\texttt{wrk\_in\_use()} / \texttt{wrk\_not\_released()} can be reduced to stubs that just 714 715 return \forcode{.false.} by setting the cpp key \texttt{key\_no\_workspace\_check}. … … 732 733 \subsection{Parallelism using MPI} 733 734 734 \NEMO is written in order to be able to run on one processor, or on one or more using MPI735 \NEMO\ is written in order to be able to run on one processor, or on one or more using MPI 735 736 ($i.e.$ activating the cpp key $key\_mpp\_mpi$). 736 The domain decomposition divides the global domain in cubes (see \NEMO reference manual).737 The domain decomposition divides the global domain in cubes (see \NEMO\ reference manual). 737 738 Whilst coding a new development, the MPI compatibility has to be taken in account 738 739 (see \path{./src/LBC/lib_mpp.F90}) and should be tested. … … 748 749 Below is a list of features to avoid: 749 750 \begin{itemize} 750 \item 751 \forcode{COMMON} block 751 \item \forcode{COMMON} block 752 752 (use the declaration part of \forcode{MODULE} instead) 753 \item 754 \forcode{EQUIVALENCE} 753 \item \forcode{EQUIVALENCE} 755 754 (use \forcode{POINTER} or derived data type instead to form data structure) 756 \item 757 Assigned and computed \forcode{GOTO} 755 \item Assigned and computed \forcode{GOTO} 758 756 (use the \forcode{CASE} construct instead) 759 \item 760 Arithmetic \forcode{IF} statement 757 \item Arithmetic \forcode{IF} statement 761 758 (use the block \forcode{IF}, \forcode{ELSE}, \forcode{ELSEIF}, \forcode{ENDIF} or 762 759 \forcode{SELECT CASE} construct instead) 763 \item 764 Labelled \forcode{DO} construct 760 \item Labelled \forcode{DO} construct 765 761 (use unlabelled \forcode{END DO} instead) 766 \item 767 \forcode{FORMAT} statement 762 \item \forcode{FORMAT} statement 768 763 (use character parameters or 769 764 explicit format- specifiers inside the \forcode{READ} or \forcode{WRITE} statement instead) 770 \item 771 \forcode{GOTO} and \forcode{CONTINUE} statements 765 \item \forcode{GOTO} and \forcode{CONTINUE} statements 772 766 (use \forcode{IF}, \forcode{CASE}, \forcode{DO WHILE}, \forcode{EXIT} or \forcode{CYCLE} statements or 773 767 a contained ?) 774 \item 775 \forcode{PAUSE} 776 \item 777 \forcode{ENTRY} statement: a sub-program must only have one entry point. 778 \item 779 \forcode{RETURN} is obsolete and so not necessary at the end of program units 780 \item 781 \forcode{FUNCTION} statement 782 \item 783 Avoid functions with side effects. 768 \item \forcode{PAUSE} 769 \item \forcode{ENTRY} statement: a sub-program must only have one entry point. 770 \item \forcode{RETURN} is obsolete and so not necessary at the end of program units 771 \item \forcode{FUNCTION} statement 772 \item Avoid functions with side effects. 784 773 \footnote{ 785 774 First, the code is easier to understand, if you can rely on … … 790 779 This is especially important on massive parallel and as well on vector machines. 791 780 } 792 \item 793 \forcode{DATA} and \forcode{BLOCK DATA} 781 \item \forcode{DATA} and \forcode{BLOCK DATA} 794 782 (use initialisers) 795 783 \end{itemize} 796 784 785 %% Imported from introduction 786 %%gm To be put somewhere else .... 787 %%nm We should consider creating a glossary for all this kind of stuff (terms, acronyms and symbols) 788 %% http://en.wikibooks.org/wiki/LaTeX/Glossary 789 %\noindent CPP keys and namelists are used as inputs to the code. 790 791 %\noindent \index{CPP keys} CPP keys 792 793 %Some CPP keys are implemented in the \fortran code to allow code selection at compiling step. 794 %This selection of code at compilation time reduces the reliability of the whole platform since 795 %it changes the code from one set of CPP keys to the other. 796 %It is used only when the addition/suppression of the part of code highly changes the amount of memory at run time. 797 %Usual coding looks like: 798 799 %\begin{forlines} 800 %#if defined key_option1 801 % ! This part of the \fortran code will be active 802 % ! only if key_option1 is activated at compiling step 803 %#endif 804 %\end{forlines} 805 806 %\noindent \index{Namelist} Namelists 807 808 %The namelist allows to input variables (character, logical, real and integer) into the code. 809 %There is one namelist file for each component of \NEMO\ (dynamics, sea-ice, biogeochemistry...) 810 %containing all the \fortran namelists needed. 811 %The implementation in \NEMO\ uses a 2-step process. 812 %For each \fortran namelist, two files are read: 813 814 %\begin{enumerate} 815 %\item 816 % A reference namelist (in \path{./cfgs/SHARED/namelist_ref}) is read first. 817 % This file contains all the namelist variables which are initialised to default values 818 %\item 819 % A configuration namelist (in \path{./cfgs/CFG_NAME/EXP00/namelist_cfg}) is read aferwards. 820 % This file contains only the namelist variables which are changed from default values, and overwrites those. 821 %\end{enumerate} 822 %A template can be found in \path{NEMO/OPA_SRC/module.example}. 823 %The effective namelist, taken in account during the run, is stored at execution time in 824 %an \texttt{output\_namelist\_dyn} (or \texttt{\_ice} or \texttt{\_top}) file. 825 %%gm end 826 827 %%nm: Add some words on the \NEMO\ dependencies 828 %The model is implemented in \fninety, with preprocessing (C pre-processor). 829 %It runs under UNIX. 830 %It is optimized for vector computers and parallelised by domain decomposition with MPI. 831 %All input and output is done in NetCDF (Network Common Data Format) with a optional direct access format for output. 832 %To ensure the clarity and readability of the code it is necessary to follow coding rules. 833 %The coding rules for OPA include conventions for naming variables, 834 %with different starting letters for different types of variables (real, integer, parameter\ldots). 835 %Those rules are briefly presented in \autoref{apdx:coding} and a more complete document is available . 836 837 %The model is organized with a high internal modularity based on physics. 838 %For example, each trend (\ie, a term in the RHS of the prognostic equation) for momentum and tracers 839 %is computed in a dedicated module. 840 %To make it easier for the user to find his way around the code, the module names follow a three-letter rule. 841 %For example, \mdl{traldf} is a module related to the TRAcers equation, computing the Lateral DiFfussion. 842 %The complete list of module names is presented in \autoref{apdx:coding}. %====>>>> to be done ! 843 %Furthermore, modules are organized in a few directories that correspond to their category, 844 %as indicated by the first three letters of their name (\autoref{tab:chapters}). -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/document.tex
r11433 r11799 1 1 2 %% ============================================================================== 3 %% Template structure for reference manual 4 %% ============================================================================== 2 %% ================================================================================================= 3 %% Template structure for reference manuals 4 %% ================================================================================================= 5 5 6 6 %% NEMO release version … … 8 8 9 9 %% Preamble 10 %% ============================================================================== 10 %% ================================================================================================= 11 11 12 12 %% Document layout 13 \documentclass[ twoside = semi, abstract = on]{scrreprt}13 \documentclass[fontsize = 10pt, twoside, abstract]{scrreprt} 14 14 15 %% Load configurations 16 \input{../../global/preamble} 17 18 \dominitoc 15 %% Load manual configuration 16 \input{../../global/prologue} 19 17 20 18 %% End of common preamble between main and sub-files … … 28 26 \renewcommand{\notinsubfile}[1]{#1} 29 27 30 \renewcommand{\biblio}{}31 \renewcommand{\pindex}{}32 33 28 34 29 %% Frontmatter 35 %% ============================================================================== 30 %% ================================================================================================= 36 31 37 %% Disable page numbering temporarily 38 \pagenumbering{gobble} 32 \pagenumbering{gobble} %% Disable page numbering temporarily 39 33 40 34 %% Title page 41 %\input{../../global/frontpage} 42 \input{../../global/frontpage_new} 35 \input{../../global/frontpage} 43 36 44 % \maketitle45 %\emptythanks 37 %% Footer for introductory parts (no header by cleaning default) 38 \ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark} 46 39 47 40 %% Information page (2nd page) 48 41 \input{../../global/info_page} 49 42 50 %% Headings for introductory parts (no header, simple footer) 51 \ofoot{\engine\ Reference Manual}\ifoot{\pagemark} 43 \listoffigures 44 \listoflistings 45 \listoftables 46 47 \clearpage 48 52 49 \pagenumbering{roman} 50 \ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark} 53 51 54 %% Foreword 55 %\input{foreword} 52 \input{introduction} 56 53 57 54 %% Table of Contents 58 55 \tableofcontents 59 %\listoffigures60 %\listoftables61 %\listoflistings62 56 63 57 \clearpage … … 65 59 66 60 %% Mainmatter 67 %% ============================================================================== 61 %% ================================================================================================= 68 62 69 63 %% Headings for document body 70 \lohead{Chap.\ \thechapter\ \leftmark}\rehead{Sect.\ \thesection\ \rightmark}71 \ifoot{Page\ \pagemark\ of \pageref*{LastPage}}72 64 \pagenumbering{arabic} 65 \lohead{Chap.\ \thechapter\ \leftmark} \rehead{Sect.\ \thesection\ \rightmark} 66 \ifoot[]{Page\ \pagemark\ of \pageref*{LastPage}} 73 67 74 68 \include{chapters} … … 76 70 77 71 %% Appendix 78 %% ============================================================================== 72 %% ================================================================================================= 79 73 80 %% Chapter numbering is reset with letters now 81 \appendix 82 74 \appendix %% Chapter numbering with letters by now 75 \lohead{Apdx\ \thechapter\ \leftmark} 83 76 \include{appendices} 84 77 … … 88 81 89 82 %% Backmatter 90 %% ============================================================================== 83 %% ================================================================================================= 91 84 92 %\backmatter %% Chapter numbering off 93 94 %% Bibliography 95 \phantomsection 96 \addcontentsline{toc}{chapter}{Bibliography} 97 \bibliography{../main/bibliography} 98 99 %% Index 100 \clearpage 101 \phantomsection 102 \addcontentsline{toc}{chapter}{Indexes} 103 \printindex[keys] 104 \printindex[modules] 105 \printindex[blocks] 106 \printindex[parameters] 107 \printindex[subroutines] 85 %% Bibliography and indexes 86 \input{../../global/epilogue} 108 87 109 88 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/frontpage.tex
r11433 r11799 1 1 2 \ title{\heading}3 \date{\today}4 \author{\protect\input{thanks}}2 \begin{titlepage} 3 % \newgeometry{hmargin = 1.5cm, vmargin = 3cm} 4 \setlength{\parindent}{0pt} 5 5 6 \pretitle{7 6 \begin{center} 8 \begin{figure}[H] 9 \begin{minipage}[c]{0.35\textwidth} 10 \href{http://www.nemo-ocean.eu}{\includegraphics[width=0.7\textwidth]{logos/NEMO_grey}} 11 \end{minipage} 12 \hfill 13 \begin{minipage}[c]{0.65\textwidth} 14 \centering 15 \large{\em{{N}ucleus for {E}uropean {M}odelling of the {O}cean}} 16 \end{minipage} 17 \end{figure} 18 \vfill 19 \Huge 20 } 21 \posttitle{ 22 \par 7 \begin{minipage}{0.3\textwidth} 8 \includegraphics[height=1.5cm]{logos/NEMO_grey} 9 \end{minipage}\begin{minipage}{0.6\textwidth} 10 \begin{center} 11 \Large\slshape 12 \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean \\ 13 \medskip 14 \hyperref[resources]{\textcolor{black}{ 15 \faWordpress \hspace{0.75cm} \faCodeFork \hspace{0.75cm} 16 \faGithub \hspace{0.75cm} \faCloudDownload \hspace{0.75cm} \faEnvelope 17 } 18 } 19 \end{center} 20 \end{minipage} 23 21 \end{center} 24 \vskip 0.5em 25 } 26 \predate{ 22 23 \spacetop 24 \textcolor{white}{\fontsize{0.8cm}{0.8cm}\selectfont\textbf{\heading}} 25 \ifdef{\subheading}{ 26 \medskip 27 \par 28 \textcolor{white}{\Huge \subheading} 29 }{} 30 \spacedown 31 32 \begin{center} 33 \LARGE Version \version\ -\ \today \\ 34 \medskip 35 \href{http://doi.org/10.5281/zenodo.\zid}{ \includegraphics{{badges/zenodo.\zid}.pdf} } 36 \end{center} 37 27 38 \vfill 28 \begin{center} 29 \large Version \version --- 30 } 31 \postdate{ 32 \par~\\ 33 \href{http://doi.org/10.5281/zenodo.\zid}{\includegraphics{{badges/zenodo.\zid}.pdf}} 34 \end{center} 39 40 \begin{minipage}{\authorswidth} 41 \raggedleft 42 \input{authors} 43 \end{minipage}\hspace{15pt}\begin{minipage}{0.02\linewidth} 44 \rule{1pt}{\rulelenght} 45 \end{minipage}\hspace{ 5pt}\begin{minipage}{\abstractwidth} 46 \begin{abstract} 47 \input{abstract} 48 \end{abstract} 49 \end{minipage} 50 35 51 \vfill 36 \begin{center}37 \href{http://www.cmcc.it}{ \includegraphics[height=0.055\textheight]{logos/CMCC}}38 \hspace{0.5em}39 \href{http://www.cnrs.fr}{ \includegraphics[height=0.055\textheight]{logos/CNRS}}40 \hspace{0.9em}41 \href{http://www.mercator-ocean.fr}{\includegraphics[height=0.055\textheight]{logos/MOI} }42 \hspace{0.45em}43 \href{http://www.metoffice.gov.uk}{ \includegraphics[height=0.055\textheight]{logos/UKMO}}44 \hspace{0.5em}45 \href{http://nerc.ukri.org}{ \includegraphics[height=0.055\textheight]{logos/NERC}} \\46 \large{{\em{C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel}}47 \end{center}48 }49 52 50 \preauthor{51 53 \begin{center} 52 54 \Large 53 \lineskip 0.5em 54 \begin{tabular}[t]{c c c} 55 } 56 \postauthor{ 57 \end{tabular} 58 \par 55 \href{http://www.cmcc.it }{ \includegraphics[height=1cm]{logos/CMCC} } \hspace{0.25cm} 56 \href{http://www.cnrs.fr }{ \includegraphics[height=1cm]{logos/CNRS} } \hspace{0.25cm} 57 \href{http://www.mercator-ocean.fr}{ \includegraphics[height=1cm]{logos/MOI} } \hspace{0.25cm} 58 \href{http://www.metoffice.gov.uk }{ \includegraphics[height=1cm]{logos/UKMO} } \hspace{0.25cm} 59 \href{http://nerc.ukri.org }{ \includegraphics[height=1cm]{logos/NERC} } \\ 60 \medskip 61 \slshape 62 {C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel \\ 59 63 \end{center} 60 }61 64 62 \thanksmarkseries{fnsymbol} 65 \end{titlepage} 66 67 \restoregeometry -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/highlighting.tex
r11310 r11799 2 2 %% ============================================================================== 3 3 4 \usepackage[outputdir=../build ]{minted}4 \usepackage[outputdir=../build, chapter, newfloat]{minted} 5 5 6 6 %% Global highlighting style 7 7 \definecolor{bg}{HTML}{f8f8f8} 8 8 \usemintedstyle{emacs} 9 \setminted{bgcolor=bg, fontsize=\scriptsize, breaklines , frame=leftline}9 \setminted{bgcolor=bg, fontsize=\scriptsize, breaklines} 10 10 \setminted[xml]{style=borland} %% Specific per language 11 11 … … 22 22 23 23 %% File 24 \newmintedfile[forfile]{fortran}{} % \forfile{../namelists/nam...}24 \newmintedfile[forfile]{fortran}{} 25 25 26 26 %% Inline 27 \newmintinline[forcode]{fortran}{bgcolor=, fontsize=auto , frame=lines} % \forcode{...}28 \newmintinline[xmlcode]{xml}{ bgcolor=, fontsize=auto , frame=lines} % \xmlcode{...}29 \newmintinline[snippet]{console}{bgcolor=, fontsize=auto , frame=lines} % \snippet{...}27 \newmintinline[forcode]{fortran}{bgcolor=, fontsize=auto} % \forcode{...} 28 \newmintinline[xmlcode]{xml}{ bgcolor=, fontsize=auto} % \xmlcode{...} 29 \newmintinline[snippet]{console}{bgcolor=, fontsize=auto} % \snippet{...} 30 30 31 31 %% Namelists inclusion 32 32 \newcommand{\nlst}[1]{\forfile{../../../namelists/#1}} 33 -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/index.ist
r11176 r11799 1 1 headings_flag 1 2 heading_prefix "{\\medskip\\hfill\\large\\textsf{\\textbf{" 3 heading_suffix "}}\\hfill}\\medskip\\nopagebreak\n" 4 2 heading_prefix "\\medskip\\hfill\\textnormal{" 3 heading_suffix "}\\hfill\\smallskip\n" 5 4 delim_0 "\\dotfill~" 6 delim_1 "\\dotfill~"7 delim_2 "\\dotfill~"8 -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/info_page.tex
r11433 r11799 2 2 \thispagestyle{plain} 3 3 4 % ================================================================5 % Disclaimer6 % ================================================================4 %% ================================================================ 5 %% Disclaimer 6 %% ================================================================ 7 7 \subsubsection*{Disclaimer} 8 8 … … 11 11 which is a French adaptation of the GNU GPL (\textbf{G}eneral \textbf{P}ublic \textbf{L}icense). 12 12 Anyone may use it freely for research purposes, and is encouraged to 13 communicate back to the \NEMO\team its own developments and improvements.13 communicate back to the development team its own developments and improvements. 14 14 15 15 The model and the present document have been made available as a service to the community. … … 18 18 Users are encouraged to bring them to our attention. 19 19 20 The authors assume no responsibility for problems, errors, or incorrect usage of NEMO.20 The authors assume no responsibility for problems, errors, or incorrect usage of \NEMO. 21 21 22 % ================================================================23 % External resources24 % ================================================================22 %% ================================================================ 23 %% External resources 24 %% ================================================================ 25 25 \subsubsection*{Other resources} 26 \label{resources} 26 27 27 28 Additional information can be found on: … … 44 45 \end{itemize} 45 46 46 % ================================================================47 % Citation48 % ================================================================47 %% ================================================================ 48 %% Citation 49 %% ================================================================ 49 50 \subsubsection*{Citation} 50 51 51 52 Reference for papers and other publications is as follows: 52 53 53 ``{\bfseries \heading}'', 54 %\firstauthor and \secondauthor, 55 {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipslnum} --- ISSN 1288-1619, 56 Institut Pierre-Simon Laplace (IPSL), 57 \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid} 54 \medskip 55 56 \begin{sloppypar} 57 ``{\bfseries \heading}\ifdef{\subheading}{ -- \subheading}{}'', 58 {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipslnum} --- ISSN 1288-1619, 59 Institut Pierre-Simon Laplace (IPSL), 60 \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid} 61 \end{sloppypar} 58 62 59 63 \begin{figure}[b] … … 71 75 \end{minipage} 72 76 \end{figure} 73 74 \end{document} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/new_cmds.tex
r11433 r11799 2 2 %% ============================================================================== 3 3 4 %% Include references and index for compilation of single subfile 5 \newcommand{\mtoc}{\minitoc} 6 \newcommand{\biblio}{ \bibliography{../main/bibliography} } 7 \newcommand{\pindex}{\printindex} 4 %% Same slanted font for NEMO and its core engines 5 \newcommand{\NEMO }{\textsl{NEMO}} 6 \newcommand{\OPA }{\textsl{OPA}} 7 \newcommand{\SIcube}{\textsl{SI$^3$}} 8 \newcommand{\TOP }{\textsl{TOP}} 9 \newcommand{\PISCES}{\textsl{PISCES}} 10 \newcommand{\NEMOVAR}{\textsl{NEMOVAR}} 8 11 9 %% NEMO and Fortran in small capitals 10 \newcommand{\NEMO }{\textsc{nemo}} 11 \newcommand{\SIcube }{\textsc{si$^3$}} 12 \newcommand{\TOP }{\textsc{top}} 12 %% Links for external components 13 \newcommand{\AGRIF}{\href{http://agrif.imag.fr}{AGRIF}} 14 \newcommand{\CICE }{\href{http://github.com/CICE-Consortium/CICE}{CICE}} 15 \newcommand{\OASIS}{\href{http://portal.enes.org/oasis}{OASIS}} 16 \newcommand{\XIOS }{\href{http://forge.ipsl.jussieu.fr/ioserver}{XIOS}} 17 18 %% Fortran in small capitals 13 19 \newcommand{\fortran}{\textsc{Fortran}} 14 20 \newcommand{\fninety}{\textsc{Fortran 90}} … … 49 55 } 50 56 51 %% Macro for link to orcid profile52 \newcommand{\orcid}[1]{ \href{http://orcid.org/#1}{\textcolor{orcidcolor} \aiOrcidSquare}}57 %% Link to orcid profile 58 \newcommand{\orcid}[1]{\href{http://orcid.org/#1}{\textcolor{orcidcolor}\aiOrcidSquare}} 53 59 54 %% Workaround for issue with\listoffigures60 %% Workaround for \listoffigures 55 61 \DeclareRobustCommand{\triad}[6][]{\ensuremath{ {}_{#2}^{#3} { \mathbb{#4}_{#1} }_{#5}^{\,#6} }} 62 63 %% New command for ToC 64 \newcommand{\chaptertoc}[1][Table of contents]{% 65 \thispagestyle{empty} 66 \etocsettocstyle{\addsec*{#1}}{}% 67 \localtableofcontents% 68 \vfill 69 } -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/packages.tex
r11433 r11799 3 3 %% ============================================================================== 4 4 5 %% 'hyperref' pkg is loaded at the end of the preamble 6 \usepackage{natbib} %% bibtex 7 \usepackage{caption} %% caption 8 \usepackage{xcolor} %% colour 9 \usepackage{times} %% font 10 \usepackage{enumitem} %% list 11 \usepackage{amsmath} %% maths 12 \usepackage{minitoc} %% toc 13 \usepackage{subfiles} %% subdocs 14 \usepackage{draftwatermark} %% watermark 15 \usepackage[Bjornstrup]{fncychap} %% headings 5 %% 'hyperref' pkg is loaded at the end of the preamble for higher compatibility 6 7 %% KOMA-script 8 \usepackage[footsepline=0.25pt, headsepline=0.25pt]{scrlayer-scrpage} 9 10 %% customization (layout, header/footer styles & contents, background) 11 \usepackage{draftwatermark} 12 \usepackage[margin = 2cm]{geometry} 13 \usepackage[pages = some]{background} %% 'some' for title page 14 \usepackage[Bjornstrup]{fncychap} 15 16 %% Fonts 16 17 \usepackage{fontspec} 17 %\setmainfont[Ligatures=TeX]{Georgia} 18 %\setsansfont[Ligatures=TeX]{Arial} 18 %% Issue with fontawesome pkg: path to FontAwesome.otf has to be hard-coded 19 19 \defaultfontfeatures{ 20 Path = / home/ntmlod/.local/texlive2019/texmf-dist/fonts/opentype/public/fontawesome/20 Path = /usr/local/texlive/2019/texmf-dist/fonts/opentype/public/fontawesome/ 21 21 } 22 \usepackage{academicons} %% font 23 \usepackage{fontawesome} %% font 24 \usepackage{lastpage} %% label 25 \usepackage[pages = some]{background} %% decoration 26 \usepackage{geometry} %% margin 22 \usepackage{academicons, fontawesome, newtxtext} 27 23 28 %% Extensions in bundle package 29 \usepackage{amssymb, graphicx, tabularx, textcomp} 30 %\usepackage[utf8]{inputenc} %% encoding 31 \usepackage[footsepline=0.25pt, 32 headsepline=0.25pt]{scrlayer-scrpage} %% page layout 24 %% Formatting 25 \usepackage[inline, shortlabels]{enumitem} 26 \usepackage{etoc, tabularx, xcolor} 27 28 %% Graphics 29 \usepackage{caption, graphicx} 30 31 %% Labels 32 \usepackage{lastpage, natbib} 33 34 %% Mathematics 35 \usepackage{amsmath, amssymb, mathtools} 36 37 %% Versatility 38 \usepackage{subfiles} 33 39 34 40 %% Configuration 35 \graphicspath{ {../../figures/} {../../figures/\engine/} } 36 \geometry{showframe} 41 \graphicspath{ {../../../} {../figures/} } 42 43 %% Missing utmr8a font 44 \usepackage{times} -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/latex/global/styles.tex
r11433 r11799 3 3 %% ============================================================================== 4 4 5 \setcolor 6 %\definecolor{ghcolor}{HTML}{000333} 5 %% Colors 6 \setmanualcolor 7 \colorlet{manualcolorshaded}{manualcolor!60} 7 8 \definecolor{orcidcolor}{HTML}{A6CE39} 8 %\definecolor{wpcolor}{HTML}{464646}9 9 10 10 %% Page layout … … 13 13 \addtokomafont{pagefoot}{ \sffamily \footnotesize} 14 14 \addtokomafont{pagenumber}{\sffamily \slshape } 15 \addtokomafont{chapter}{\color{white}} 15 16 \ohead{} \ofoot{} %% Clear defaults 16 17 … … 18 19 \captionsetup{font = footnotesize, justification = justified} 19 20 20 %% Additional fonts21 \ DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}21 %% Footnote 22 \renewcommand{\thefootnote}{\fnsymbol{footnote}} 22 23 23 24 %% Bibliography … … 33 34 \global\let\tikz@ensure@dollar@catcode=\relax 34 35 35 %% Apply engine color for chapter boxes (code from fncychap.sty) 36 %\renewcommand{\DOTI}[1]{ 37 % \nointerlineskip\raggedright 38 % \fboxsep=\myhi 39 % \vskip-1ex 40 % \colorbox[manualcolor]{.85}{\parbox[t]{\mylen}{\CTV\FmTi{#1}}}\par\nobreak 41 % \vskip 40\p@ 42 %} 36 %% First page 37 \backgroundsetup{ 38 firstpage = true, 39 scale = 1, angle = 0, opacity = 1, 40 contents = { 41 \begin{tikzpicture}[remember picture, overlay] 42 \path [fill = manualcolor] (-0.5\paperwidth, 7) rectangle (0.5\paperwidth, 10); 43 \end{tikzpicture} 44 } 45 } 46 47 %% Apply engine color for chapter headings: tweaking snippets from fncychap.sty 48 \renewcommand{\DOCH}{% 49 \settowidth{\py}{\CNoV\thechapter} 50 \addtolength{\py}{-10pt} % Amount of space by which the 51 % % number is shifted right 52 \fboxsep=0pt% 53 \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}% 54 \kern-\py\raise20pt% 55 \hbox{\color{manualcolorshaded}\CNoV\thechapter}\\% 56 } 57 \renewcommand{\DOTI}[1]{% 58 \nointerlineskip\raggedright% 59 \fboxsep=\myhi% 60 \vskip-1ex% 61 \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak% 62 \vskip 40\p@% 63 } 64 \renewcommand{\DOTIS}[1]{% 65 \fboxsep=0pt 66 \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\% 67 \nointerlineskip\raggedright% 68 \fboxsep=\myhi% 69 \vskip-1ex% Remove white 1pt line 70 \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak% 71 \vskip 40\p@% 72 } 73 74 %% Temporary fix 75 \def\set@curr@file#1{% 76 \begingroup 77 \escapechar\m@ne 78 \xdef\@curr@file{\expandafter\string\csname #1\endcsname}% 79 \endgroup 80 } 81 \def\quote@name#1{"\quote@@name#1\@gobble""} 82 \def\quote@@name#1"{#1\quote@@name} 83 \def\unquote@name#1{\quote@@name#1\@gobble"} 43 84 44 85 \makeatother -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/manual_build.sh
r11212 r11799 27 27 28 28 ## Retrieve figures if not already there 29 if [ ! -d latex/figures ]; then30 printf "Downloading of shared figures and logos\n\n"31 svn co https://forge.ipsl.jussieu.fr/nemo/svn/utils/figures latex/figures > /dev/null32 fi29 #if [ ! -d latex/figures ]; then 30 # printf "Downloading of shared figures and logos\n\n" 31 # svn co http://forge.ipsl.jussieu.fr/nemo/svn/utils/figures latex/figures > /dev/null 32 #fi 33 33 34 34 … … 38 38 for model in $models; do 39 39 echo $model 40 clean $model40 # clean $model 41 41 build $model 42 42 printf "\t¤ End of building run\n" … … 45 45 46 46 exit 0 47 -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/namelists/nam_diaharm
r10075 r11799 1 1 !----------------------------------------------------------------------- 2 &nam_diaharm ! Harmonic analysis of tidal constituents ( "key_diaharm")2 &nam_diaharm ! Harmonic analysis of tidal constituents (default: OFF) 3 3 !----------------------------------------------------------------------- 4 nit000_han = 1 ! First time step used for harmonic analysis 5 nitend_han = 75 ! Last time step used for harmonic analysis 6 nstep_han = 15 ! Time step frequency for harmonic analysis 7 tname(1) = 'M2' ! Name of tidal constituents 8 tname(2) = 'K1' 4 ln_diaharm = .false. ! Choose tidal harmonic output or not 5 nit000_han = 1 ! First time step used for harmonic analysis 6 nitend_han = 75 ! Last time step used for harmonic analysis 7 nstep_han = 15 ! Time step frequency for harmonic analysis 8 tname(1) = 'M2' ! Name of tidal constituents 9 tname(2) = 'K1' 9 10 / -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/namelists/nambdy
r11005 r11799 22 22 nn_ice_dta = 0 ! = 0, bdy data are equal to the initial state 23 23 ! ! = 1, bdy data are read in 'bdydata .nc' files 24 rn_ice_tem = 270. ! si3 only: arbitrary temperature of incoming sea ice25 rn_ice_sal = 10. ! si3 only: -- salinity --26 rn_ice_age = 30. ! si3 only: -- age --27 24 ! 28 25 ln_tra_dmp =.false. ! open boudaries conditions for tracers … … 33 30 ln_vol = .false. ! total volume correction (see nn_volctl parameter) 34 31 nn_volctl = 1 ! = 0, the total water flux across open boundaries is zero 35 nb_jpk_bdy = -1 ! number of levels in the bdy data (set < 0 if consistent with planned run)36 32 / -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/namelists/nambdy_dta
r10075 r11799 2 2 &nambdy_dta ! open boundaries - external data (see nam_bdy) 3 3 !----------------------------------------------------------------------- 4 ln_full_vel = .false. ! ??? 5 4 ln_zinterp = .false. ! T if a vertical interpolation is required. Variables gdep[tuv] and e3[tuv] must exist in the file 5 ! ! automatically defined to T if the number of vertical levels in bdy dta /= jpk 6 ln_full_vel = .false. ! T if [uv]3d are "full" velocities and not only its baroclinic components 7 ! ! in this case, baroclinic and barotropic velocities will be recomputed -> [uv]2d not needed 8 ! 6 9 cn_dir = 'bdydta/' ! root directory for the BDY data location 7 10 !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________! … … 16 19 bn_sal = 'amm12_bdyT_tra' , 24 , 'vosaline', .true. , .false., 'daily' , '' , '' , '' 17 20 !* for si3 18 ! bn_a_i = 'amm12_bdyT_ice' , 24 , 'ileadfra', .true. , .false., 'daily' , '' , '' , '' 19 ! bn_h_i = 'amm12_bdyT_ice' , 24 , 'iicethic', .true. , .false., 'daily' , '' , '' , '' 20 ! bn_h_s = 'amm12_bdyT_ice' , 24 , 'isnowthi', .true. , .false., 'daily' , '' , '' , '' 21 bn_a_i = 'amm12_bdyT_ice' , 24. , 'siconc' , .true. , .false., 'daily' , '' , '' , '' 22 bn_h_i = 'amm12_bdyT_ice' , 24. , 'sithic' , .true. , .false., 'daily' , '' , '' , '' 23 bn_h_s = 'amm12_bdyT_ice' , 24. , 'snthic' , .true. , .false., 'daily' , '' , '' , '' 24 bn_t_i = 'NOT USED' , 24. , 'sitemp' , .true. , .false., 'daily' , '' , '' , '' 25 bn_t_s = 'NOT USED' , 24. , 'sntemp' , .true. , .false., 'daily' , '' , '' , '' 26 bn_tsu = 'NOT USED' , 24. , 'sittop' , .true. , .false., 'daily' , '' , '' , '' 27 bn_s_i = 'NOT USED' , 24. , 'sisalt' , .true. , .false., 'daily' , '' , '' , '' 28 ! melt ponds (be careful, bn_aip is the pond concentration (not fraction), so it differs from rn_iceapnd) 29 bn_aip = 'NOT USED' , 24. , 'siapnd' , .true. , .false., 'daily' , '' , '' , '' 30 bn_hip = 'NOT USED' , 24. , 'sihpnd' , .true. , .false., 'daily' , '' , '' , '' 31 ! if bn_t_i etc are "not used", then define arbitrary temperatures and salinity and ponds 32 rn_ice_tem = 270. ! arbitrary temperature of incoming sea ice 33 rn_ice_sal = 10. ! -- salinity -- 34 rn_ice_age = 30. ! -- age -- 35 rn_ice_apnd = 0.2 ! -- pond fraction = a_ip/a_i -- 36 rn_ice_hpnd = 0.05 ! -- pond depth -- 21 37 / -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/namelists/namdia
r11025 r11799 2 2 &namdia ! Diagnostics 3 3 !------------------------------------------------------------------------------ 4 ln_icediachk = .false. ! check online the heat, mass & salt budgets (T) or not (F) 4 ln_icediachk = .false. ! check online the heat, mass & salt budgets at each time step 5 ! ! rate of ice spuriously gained/lost. For ex., rn_icechk=1. <=> 1mm/year, rn_icechk=0.1 <=> 1mm/10years 6 rn_icechk_cel = 1. ! check at any gridcell => stops the code if violated (and writes a file) 7 rn_icechk_glo = 0.1 ! check over the entire ice cover => only prints warnings 5 8 ln_icediahsb = .false. ! output the heat, mass & salt budgets (T) or not (F) 6 9 ln_icectl = .false. ! ice points output for debug (T or F) -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/namelists/namflo
r10445 r11799 1 1 !----------------------------------------------------------------------- 2 &namflo ! float parameters ( "key_float")2 &namflo ! float parameters (default: OFF) 3 3 !----------------------------------------------------------------------- 4 jpnfl = 1 ! total number of floats during the run 5 jpnnewflo = 0 ! number of floats for the restart 6 ln_rstflo = .false. ! float restart (T) or not (F) 7 nn_writefl = 75 ! frequency of writing in float output file 8 nn_stockfl = 5475 ! frequency of creation of the float restart file 9 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 10 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 11 ! ! or computed with Blanke' scheme (F) 12 ln_ariane = .true. ! Input with Ariane tool convention(T) 13 ln_flo_ascii = .true. ! Output with Ariane tool netcdf convention(F) or ascii file (T) 4 ln_floats = .false. ! activate floats or not 5 jpnfl = 1 ! total number of floats during the run 6 jpnnewflo = 0 ! number of floats for the restart 7 ln_rstflo = .false. ! float restart (T) or not (F) 8 nn_writefl = 75 ! frequency of writing in float output file 9 nn_stockfl = 5475 ! frequency of creation of the float restart file 10 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 11 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 12 ! ! or computed with Blanke' scheme (F) 13 ln_ariane = .true. ! Input with Ariane tool convention(T) 14 ln_flo_ascii= .true. ! Output with Ariane tool netcdf convention(F) or ascii file (T) 14 15 / -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/namelists/namhsb
r10075 r11799 2 2 &namhsb ! Heat and salt budgets (default: OFF) 3 3 !----------------------------------------------------------------------- 4 ln_diahsb = .false. ! checkthe heat and salt budgets (T) or not (F)4 ln_diahsb = .false. ! output the heat and salt budgets (T) or not (F) 5 5 / -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/namelists/namini
r11025 r11799 4 4 ln_iceini = .true. ! activate ice initialization (T) or not (F) 5 5 ln_iceini_file = .false. ! netcdf file provided for initialization (T) or not (F) 6 rn_thres_sst = 2.0 ! max delta temp. above Tfreeze with initial ice = (sst - tfreeze) 7 rn_hts_ini_n = 0.3 ! initial real snow thickness (m), North 6 rn_thres_sst = 2.0 ! max temp. above Tfreeze with initial ice = (sst - tfreeze) 7 rn_hti_ini_n = 3.0 ! initial ice thickness (m), North 8 rn_hti_ini_s = 1.0 ! " " South 9 rn_hts_ini_n = 0.3 ! initial snow thickness (m), North 8 10 rn_hts_ini_s = 0.3 ! " " South 9 rn_hti_ini_n = 3.0 ! initial real ice thickness (m), North10 rn_hti_ini_s = 1.0 ! " " South11 11 rn_ati_ini_n = 0.9 ! initial ice concentration (-), North 12 12 rn_ati_ini_s = 0.9 ! " " South 13 13 rn_smi_ini_n = 6.3 ! initial ice salinity (g/kg), North 14 14 rn_smi_ini_s = 6.3 ! " " South 15 rn_tmi_ini_n = 270. ! initial ice /snw temperature(K), North15 rn_tmi_ini_n = 270. ! initial ice temperature (K), North 16 16 rn_tmi_ini_s = 270. ! " " South 17 17 rn_tsu_ini_n = 270. ! initial surface temperature (K), North 18 rn_tsu_ini_s = 270. ! " " South 19 rn_tms_ini_n = 270. ! initial snw temperature (K), North 20 rn_tms_ini_s = 270. ! " " South 21 rn_apd_ini_n = 0.2 ! initial pond fraction (-), North 22 rn_apd_ini_s = 0.2 ! " " South 23 rn_hpd_ini_n = 0.05 ! initial pond depth (m), North 24 rn_hpd_ini_s = 0.05 ! " " South 25 ! ! if ln_iceini_file=T 18 26 sn_hti = 'Ice_initialization' , -12 ,'hti' , .false. , .true., 'yearly' , '' , '', '' 19 27 sn_hts = 'Ice_initialization' , -12 ,'hts' , .false. , .true., 'yearly' , '' , '', '' 20 28 sn_ati = 'Ice_initialization' , -12 ,'ati' , .false. , .true., 'yearly' , '' , '', '' 29 sn_smi = 'Ice_initialization' , -12 ,'smi' , .false. , .true., 'yearly' , '' , '', '' 30 sn_tmi = 'Ice_initialization' , -12 ,'tmi' , .false. , .true., 'yearly' , '' , '', '' 21 31 sn_tsu = 'Ice_initialization' , -12 ,'tsu' , .false. , .true., 'yearly' , '' , '', '' 22 sn_tmi = 'Ice_initialization' , -12 ,'tmi' , .false. , .true., 'yearly' , '' , '', '' 23 sn_smi = 'Ice_initialization' , -12 ,'smi' , .false. , .true., 'yearly' , '' , '', '' 32 sn_tms = 'NOT USED' , -12 ,'tms' , .false. , .true., 'yearly' , '' , '', '' 33 ! melt ponds (be careful, sn_apd is the pond concentration (not fraction), so it differs from rn_apd) 34 sn_apd = 'NOT USED' , -12 ,'apd' , .false. , .true., 'yearly' , '' , '', '' 35 sn_hpd = 'NOT USED' , -12 ,'hpd' , .false. , .true., 'yearly' , '' , '', '' 24 36 cn_dir='./' 25 37 / -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/namelists/nammpp
r10445 r11799 2 2 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 3 3 !----------------------------------------------------------------------- 4 cn_mpi_send = 'I' ! mpi send/recieve type ='S', 'B', or 'I' for standard send,5 ! ! buffer blocking send or immediate non-blocking sends, resp.6 nn_buffer = 0 ! size in bytes of exported buffer ('B' case), 0 no exportation7 4 ln_nnogather = .true. ! activate code to avoid mpi_allgather use at the northfold 8 5 jpni = 0 ! jpni number of processors following i (set automatically if < 1) -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/namelists/namthd_pnd
r11025 r11799 2 2 &namthd_pnd ! Melt ponds 3 3 !------------------------------------------------------------------------------ 4 ln_pnd_H12 = .false. ! activate evolutive melt ponds (from Holland et al 2012) 5 ln_pnd_CST = .false. ! activate constant melt ponds 6 rn_apnd = 0.2 ! prescribed pond fraction, at Tsu=0 degC 7 rn_hpnd = 0.05 ! prescribed pond depth, at Tsu=0 degC 8 ln_pnd_alb = .false. ! melt ponds affect albedo or not 4 ln_pnd = .false. ! activate melt ponds or not 5 ln_pnd_H12 = .false. ! activate evolutive melt ponds (from Holland et al 2012) 6 ln_pnd_CST = .false. ! activate constant melt ponds 7 rn_apnd = 0.2 ! prescribed pond fraction, at Tsu=0 degC 8 rn_hpnd = 0.05 ! prescribed pond depth, at Tsu=0 degC 9 ln_pnd_alb = .false. ! melt ponds affect albedo or not 9 10 / -
NEMO/branches/2019/dev_r11470_HPC_12_mpi3/doc/tools/shr_func.sh
r11212 r11799 2 2 3 3 clean() { 4 ## Not sure if this step is needed, guess latexmk should be able to detect a change5 4 printf "\t¤ Clean previous build" 6 find latex/$1/build -mindepth 1 -prune -not -name $1_manual.pyg -exec rm -rf {} \; 7 8 ## HTML exports 9 #printf ' - possible HTML export' 10 #find latex/$1 -type d -name 'html*' -exec rm -r {} \; 5 find latex/$1/build -mindepth 1 -delete 11 6 12 7 echo … … 15 10 build() { 16 11 printf "\t¤ Generation of the PDF format\n" 17 latexmk -r ./latex/global/latexmkrc \ 18 -cd ./latex/$1/main/$1_manual \ 19 1> /dev/null 12 latexmk -r ./latex/global/latexmk.pl -pdfxe ./latex/$1/main/$1_manual \ 13 # 1> /dev/null 20 14 [ -f ./latex/$1/build/$1_manual.pdf ] && mv ./latex/$1/build/$1_manual.pdf . 21 15 echo 22 16 } 23
Note: See TracChangeset
for help on using the changeset viewer.