Changeset 11353
- Timestamp:
- 2019-07-25T16:55:58+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization
- Files:
-
- 4 deleted
- 22 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/main/appendices.tex
r11263 r11353 4 4 \subfile{../subfiles/annex_C} %% Discrete invariants of the eqs. 5 5 \subfile{../subfiles/annex_iso} %% Isoneutral diffusion using triads 6 \subfile{../subfiles/annex_D } %% Coding rules6 \subfile{../subfiles/annex_DOMAINcfg} %% Brief notes on DOMAINcfg 7 7 8 8 %% Not included -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/main/bibliography.bib
r11263 r11353 188 188 } 189 189 190 @article{ beljaars_QJRMS95, 191 title = "The parametrization of surface fluxes in large-scale models under free convection", 192 pages = "255--270", 193 journal = "Quarterly Journal of the Royal Meteorological Society", 194 volume = "121", 195 number = "522", 196 author = "Beljaars, Anton C. M.", 197 year = "1995", 198 month = "jan", 199 publisher = "Wiley", 200 issn = "00359009", 201 doi = "10.1002/qj.49712152203" 202 } 203 190 204 @article{ bernie.guilyardi.ea_CD07, 191 205 title = "Impact of resolving the diurnal cycle in an … … 386 400 } 387 401 402 @article{ brodeau.barnier.ea_JPO16, 403 title = "Climatologically Significant Effects of Some Approximations in the Bulk Parameterizations of Turbulent Air–Sea Fluxes", 404 pages = "5--28", 405 journal = "Journal of Physical Oceanography", 406 volume = "47", 407 number = "1", 408 author = "Brodeau, Laurent and Barnier, Bernard and Gulev, Sergey K. and Woods, Cian", 409 year = "2016", 410 month = "jan", 411 publisher = "American Meteorological Society", 412 issn = "0022-3670", 413 doi = "10.1175/jpo-d-16-0169.1", 414 } 415 388 416 @article{ brown.campana_MWR78, 389 417 title = "An economical time-differencing system for numerical … … 745 773 } 746 774 775 @article{ edson.jampana.ea_JPO13, 776 title = "On the Exchange of Momentum over the Open Ocean", 777 pages = "1589--1610", 778 journal = "Journal of Physical Oceanography", 779 volume = "43", 780 number = "8", 781 author = "Edson, James B. and Jampana, Venkata and Weller, Robert A. and Bigorre, Sebastien P. and Plueddemann, Albert J. and Fairall, Christopher W. and Miller, Scott D. and Mahrt, Larry and Vickers, Dean and Hersbach, Hans", 782 year = "2013", 783 month = "aug", 784 publisher = "American Meteorological Society", 785 issn = "0022-3670", 786 doi = "10.1175/JPO-D-12-0173.1" 787 } 788 747 789 @article{ egbert.ray_JGR01, 748 790 title = "Estimates of {M2} tidal energy dissipation from … … 819 861 } 820 862 863 @article{ fairall.bradley.ea_JC03, 864 title = "Bulk parameterization of air-sea fluxes: Updates and verification for the COARE algorithm", 865 pages = "571--591", 866 journal = "Journal of Climate", 867 volume = "16", 868 number = "4", 869 author = "Fairall, C. W. and Bradley, E. F. and Hare, J. E. and Grachev, A. A. and Edson, J. B.", 870 year = "2003", 871 publisher = "American Meteorological Society", 872 issn = "08948755", 873 doi = "10.1175/1520-0442(2003)016<0571:BPOASF>2.0.CO;2" 874 } 875 821 876 @phdthesis{ farge-coulombier_phd87, 822 877 title = "Dynamique non-lin\'{e}aire des ondes et des tourbillons … … 871 926 publisher = "UNESCO", 872 927 url = "https://unesdoc.unesco.org/ark:/48223/pf0000059832.locale=en" 928 } 929 930 @article{ foxkemper.ferrari_JPO08, 931 title = "Parameterization of Mixed Layer Eddies. Part I: Theory and Diagnosis", 932 pages = "1145--1165", 933 journal = "Journal of Physical Oceanography", 934 volume = "38", 935 number = "6", 936 author = "B. Fox-Kemper and R. Ferrari and B. Hallberg", 937 year = "2008", 938 month = "jun", 939 publisher = "American Meteorological Society", 940 issn = "1520-0485", 941 doi = "10.1175/2007JPO3792.1" 873 942 } 874 943 … … 1839 1908 author = "F. Lott and G. Madec and J. Verron", 1840 1909 year = "1990" 1910 } 1911 1912 @article{ lupkes.gryanik.ea_JGR12, 1913 author = "L{\"{u}}pkes, Christof and Gryanik, Vladimir M. and Hartmann, J{\"{o}}rg and Andreas, Edgar L.", 1914 doi = "10.1029/2012JD017630", 1915 issn = "01480227", 1916 journal = "Journal of Geophysical Research Atmospheres", 1917 number = "13", 1918 pages = "1--18", 1919 title = "A parametrization, based on sea ice morphology, of the neutral atmospheric drag coefficients for weather prediction and climate models", 1920 volume = "117", 1921 year = "2012" 1922 } 1923 1924 @article{ lupkes.gryanik_JGR15, 1925 author = "L{\"{u}}pkes, Christof and Gryanik, Vladimir M.", 1926 doi = "10.1002/2014JD022418", 1927 issn = "21562202", 1928 journal = "Journal of Geophysical Research", 1929 number = "2", 1930 pages = "552--581", 1931 title = "A stability-dependent parametrization of transfer coefficients formomentum and heat over polar sea ice to be used in climate models", 1932 volume = "120", 1933 year = "2015" 1841 1934 } 1842 1935 … … 2306 2399 } 2307 2400 2401 @article{ qiao.yuan.ea_OD10, 2402 title = "A three-dimensional surface wave–ocean circulation coupled 2403 model and its initial testing", 2404 pages = "1339--1335", 2405 journal = "Ocean Dynamics", 2406 volume = "60", 2407 number = "5", 2408 author = "F. Qiao and Y. Yuan and T. Ezer and C. Xia and 2409 Y. Yang and X. Lu and Z. Song ", 2410 year = "2010", 2411 month = "oct", 2412 publisher = "Springer-Verlag", 2413 issn = "1616-7341", 2414 doi = "10.1007/s10236-010-0326-y" 2415 } 2416 2308 2417 @article{ redi_JPO82, 2309 2418 title = "Oceanic isopycnal mixing by coordinate rotation", … … 2544 2653 } 2545 2654 2655 @article{ smagorinsky_MW63, 2656 title = "General circulation experiments with the primitive equations: I. The basic experiment ", 2657 pages = "99--164", 2658 journal = "Monthly Weather Review", 2659 volume = "91", 2660 number = "3", 2661 author = "J. Smagorinsky", 2662 year = "1963", 2663 month = "mar", 2664 publisher = "American Meteorological Society", 2665 issn = "1520-0493", 2666 doi = "10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2" 2667 } 2668 2546 2669 @article{ song.haidvogel_JCP94, 2547 2670 title = "A semi-implicit ocean circulation model using a … … 2896 3019 } 2897 3020 3021 @article{ white.hoskins.ea_QJRMS05, 3022 title = "Consistent approximate models of the global atmosphere: shallow, deep, 3023 hydrostatic, quasi-hydrostatic and non-hydrostatic", 3024 pages = "2081--2107", 3025 journal = "Quarterly Journal of the Royal Meteorological Society", 3026 volume = "131", 3027 author = "A. A. White and B. J. Hoskins and I. Roulstone and A. Staniforth", 3028 year = "2005", 3029 doi = "10.1256/qj.04.49" 3030 } 3031 2898 3032 @article{ white.adcroft.ea_JCP09, 2899 3033 title = "High-order regridding-remapping schemes for continuous -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_A.tex
r11263 r11353 10 10 11 11 \minitoc 12 13 \vfill 14 \begin{figure}[b] 15 \subsubsection*{Changes record} 16 \begin{tabular}{l||l|m{0.65\linewidth}} 17 Release & Author & Modifications \\ 18 {\em 4.0} & {\em Mike Bell} & {\em review} \\ 19 {\em 3.x} & {\em Gurvan Madec} & {\em original} \\ 20 \end{tabular} 21 \end{figure} 22 12 23 13 24 \newpage … … 29 40 \begin{equation} 30 41 \label{apdx:A_s_slope} 31 \sigma_1 =\frac{1}{e_1 } \;\left. {\frac{\partial z}{\partial i}} \right|_s42 \sigma_1 =\frac{1}{e_1 } \; \left. {\frac{\partial z}{\partial i}} \right|_s 32 43 \quad \text{and} \quad 33 \sigma_2 =\frac{1}{e_2 }\;\left. {\frac{\partial z}{\partial j}} \right|_s 34 \end{equation} 35 36 The chain rule to establish the model equations in the curvilinear $s-$coordinate system is: 44 \sigma_2 =\frac{1}{e_2 } \; \left. {\frac{\partial z}{\partial j}} \right|_s . 45 \end{equation} 46 47 The model fields (e.g. pressure $p$) can be viewed as functions of $(i,j,z,t)$ (e.g. $p(i,j,z,t)$) or as 48 functions of $(i,j,s,t)$ (e.g. $p(i,j,s,t)$). The symbol $\bullet$ will be used to represent any one of 49 these fields. Any ``infinitesimal'' change in $\bullet$ can be written in two forms: 50 \begin{equation} 51 \label{apdx:A_s_infin_changes} 52 \begin{aligned} 53 & \delta \bullet = \delta i \left. \frac{ \partial \bullet }{\partial i} \right|_{j,s,t} 54 + \delta j \left. \frac{ \partial \bullet }{\partial i} \right|_{i,s,t} 55 + \delta s \left. \frac{ \partial \bullet }{\partial s} \right|_{i,j,t} 56 + \delta t \left. \frac{ \partial \bullet }{\partial t} \right|_{i,j,s} , \\ 57 & \delta \bullet = \delta i \left. \frac{ \partial \bullet }{\partial i} \right|_{j,z,t} 58 + \delta j \left. \frac{ \partial \bullet }{\partial i} \right|_{i,z,t} 59 + \delta z \left. \frac{ \partial \bullet }{\partial z} \right|_{i,j,t} 60 + \delta t \left. \frac{ \partial \bullet }{\partial t} \right|_{i,j,z} . 61 \end{aligned} 62 \end{equation} 63 Using the first form and considering a change $\delta i$ with $j, z$ and $t$ held constant, shows that 64 \begin{equation} 65 \label{apdx:A_s_chain_rule} 66 \left. {\frac{\partial \bullet }{\partial i}} \right|_{j,z,t} = 67 \left. {\frac{\partial \bullet }{\partial i}} \right|_{j,s,t} 68 + \left. {\frac{\partial s }{\partial i}} \right|_{j,z,t} \; 69 \left. {\frac{\partial \bullet }{\partial s}} \right|_{i,j,t} . 70 \end{equation} 71 The term $\left. \partial s / \partial i \right|_{j,z,t}$ can be related to the slope of constant $s$ surfaces, 72 (\autoref{apdx:A_s_slope}), by applying the second of (\autoref{apdx:A_s_infin_changes}) with $\bullet$ set to 73 $s$ and $j, t$ held constant 74 \begin{equation} 75 \label{apdx:a_delta_s} 76 \delta s|_{j,t} = 77 \delta i \left. \frac{ \partial s }{\partial i} \right|_{j,z,t} 78 + \delta z \left. \frac{ \partial s }{\partial z} \right|_{i,j,t} . 79 \end{equation} 80 Choosing to look at a direction in the $(i,z)$ plane in which $\delta s = 0$ and using 81 (\autoref{apdx:A_s_slope}) we obtain 82 \begin{equation} 83 \left. \frac{ \partial s }{\partial i} \right|_{j,z,t} = 84 - \left. \frac{ \partial z }{\partial i} \right|_{j,s,t} \; 85 \left. \frac{ \partial s }{\partial z} \right|_{i,j,t} 86 = - \frac{e_1 }{e_3 }\sigma_1 . 87 \label{apdx:a_ds_di_z} 88 \end{equation} 89 Another identity, similar in form to (\autoref{apdx:a_ds_di_z}), can be derived 90 by choosing $\bullet$ to be $s$ and using the second form of (\autoref{apdx:A_s_infin_changes}) to consider 91 changes in which $i , j$ and $s$ are constant. This shows that 92 \begin{equation} 93 \label{apdx:A_w_in_s} 94 w_s = \left. \frac{ \partial z }{\partial t} \right|_{i,j,s} = 95 - \left. \frac{ \partial z }{\partial s} \right|_{i,j,t} 96 \left. \frac{ \partial s }{\partial t} \right|_{i,j,z} 97 = - e_3 \left. \frac{ \partial s }{\partial t} \right|_{i,j,z} . 98 \end{equation} 99 100 In what follows, for brevity, indication of the constancy of the $i, j$ and $t$ indices is 101 usually omitted. Using the arguments outlined above one can show that the chain rules needed to establish 102 the model equations in the curvilinear $s-$coordinate system are: 37 103 \begin{equation} 38 104 \label{apdx:A_s_chain_rule} 39 105 \begin{aligned} 40 106 &\left. {\frac{\partial \bullet }{\partial t}} \right|_z = 41 \left. {\frac{\partial \bullet }{\partial t}} \right|_s 42 -\frac{\partial \bullet }{\partial s}\;\frac{\partial s}{\partial t}\\107 \left. {\frac{\partial \bullet }{\partial t}} \right|_s 108 + \frac{\partial \bullet }{\partial s}\; \frac{\partial s}{\partial t} , \\ 43 109 &\left. {\frac{\partial \bullet }{\partial i}} \right|_z = 44 110 \left. {\frac{\partial \bullet }{\partial i}} \right|_s 45 -\frac{\partial \bullet }{\partial s}\;\frac{\partial s}{\partial i}=46 \left. {\frac{\partial \bullet }{\partial i}} \right|_s 47 -\frac{e_1 }{e_3 }\sigma_1 \frac{\partial \bullet }{\partial s} \\111 +\frac{\partial \bullet }{\partial s}\; \frac{\partial s}{\partial i}= 112 \left. {\frac{\partial \bullet }{\partial i}} \right|_s 113 -\frac{e_1 }{e_3 }\sigma_1 \frac{\partial \bullet }{\partial s} , \\ 48 114 &\left. {\frac{\partial \bullet }{\partial j}} \right|_z = 49 \left. {\frac{\partial \bullet }{\partial j}} \right|_s 50 -\frac{\partial \bullet }{\partial s}\;\frac{\partial s}{\partial j}=51 \left. {\frac{\partial \bullet }{\partial j}} \right|_s 52 - \frac{e_2 }{e_3 }\sigma_2 \frac{\partial \bullet }{\partial s} \\53 &\;\frac{\partial \bullet }{\partial z} \;\; = \frac{1}{e_3 }\frac{\partial \bullet }{\partial s} 115 \left. {\frac{\partial \bullet }{\partial j}} \right|_s 116 + \frac{\partial \bullet }{\partial s}\;\frac{\partial s}{\partial j}= 117 \left. {\frac{\partial \bullet }{\partial j}} \right|_s 118 - \frac{e_2 }{e_3 }\sigma_2 \frac{\partial \bullet }{\partial s} , \\ 119 &\;\frac{\partial \bullet }{\partial z} \;\; = \frac{1}{e_3 }\frac{\partial \bullet }{\partial s} . 54 120 \end{aligned} 55 121 \end{equation} 56 122 57 In particular applying the time derivative chain rule to $z$ provides the expression for $w_s$,58 the vertical velocity of the $s-$surfaces referenced to a fix z-coordinate:59 \begin{equation}60 \label{apdx:A_w_in_s}61 w_s = \left. \frac{\partial z }{\partial t} \right|_s62 = \frac{\partial z}{\partial s} \; \frac{\partial s}{\partial t}63 = e_3 \, \frac{\partial s}{\partial t}64 \end{equation}65 123 66 124 % ================================================================ … … 131 189 \end{subequations} 132 190 133 Here, $w$ is the vertical velocity relative to the $z-$coordinate system. 134 Introducing the dia-surface velocity component, 135 $\omega $, defined as the volume flux across the moving $s$-surfaces per unit horizontal area: 191 Here, $w$ is the vertical velocity relative to the $z-$coordinate system. 192 Using the first form of (\autoref{apdx:A_s_infin_changes}) 193 and the definitions (\autoref{apdx:A_s_slope}) and (\autoref{apdx:A_w_in_s}) for $\sigma_1$, $\sigma_2$ and $w_s$, 194 one can show that the vertical velocity, $w_p$ of a point 195 moving with the horizontal velocity of the fluid along an $s$ surface is given by 196 \begin{equation} 197 \label{apdx:A_w_p} 198 \begin{split} 199 w_p = & \left. \frac{ \partial z }{\partial t} \right|_s 200 + \frac{u}{e_1} \left. \frac{ \partial z }{\partial i} \right|_s 201 + \frac{v}{e_2} \left. \frac{ \partial z }{\partial j} \right|_s \\ 202 = & w_s + u \sigma_1 + v \sigma_2 . 203 \end{split} 204 \end{equation} 205 The vertical velocity across this surface is denoted by 136 206 \begin{equation} 137 207 \label{apdx:A_w_s} 138 \omega = w - w_s - \sigma_1 \,u - \sigma_2 \,v \\ 139 \end{equation} 140 with $w_s$ given by \autoref{apdx:A_w_in_s}, 141 we obtain the expression for the divergence of the velocity in the curvilinear $s-$coordinate system: 142 \begin{subequations} 143 \begin{align*} 144 { 145 \begin{array}{*{20}l} 146 \nabla \cdot {\mathrm {\mathbf U}} 147 &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ 208 \omega = w - w_p = w - ( w_s + \sigma_1 \,u + \sigma_2 \,v ) . 209 \end{equation} 210 Hence 211 \begin{equation} 212 \frac{1}{e_3 } \frac{\partial}{\partial s} \left[ w - u\;\sigma_1 - v\;\sigma_2 \right] = 213 \frac{1}{e_3 } \frac{\partial}{\partial s} \left[ \omega + w_s \right] = 214 \frac{1}{e_3 } \left[ \frac{\partial \omega}{\partial s} 215 + \left. \frac{ \partial }{\partial t} \right|_s \frac{\partial z}{\partial s} \right] = 216 \frac{1}{e_3 } \frac{\partial \omega}{\partial s} + \frac{1}{e_3 } \left. \frac{ \partial e_3}{\partial t} . \right|_s 217 \end{equation} 218 219 Using (\autoref{apdx:A_w_s}) in our expression for $\nabla \cdot {\mathrm {\mathbf U}}$ we obtain 220 our final expression for the divergence of the velocity in the curvilinear $s-$coordinate system: 221 \begin{equation} 222 \nabla \cdot {\mathrm {\mathbf U}} = 223 \frac{1}{e_1 \,e_2 \,e_3 } \left[ 148 224 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 149 225 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] 150 226 + \frac{1}{e_3 } \frac{\partial \omega }{\partial s} 151 + \frac{1}{e_3 } \frac{\partial w_s }{\partial s} \\ \\ 152 &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ 153 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 154 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] 155 + \frac{1}{e_3 } \frac{\partial \omega }{\partial s} 156 + \frac{1}{e_3 } \frac{\partial}{\partial s} \left( e_3 \; \frac{\partial s}{\partial t} \right) \\ \\ 157 &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ 158 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 159 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] 160 + \frac{1}{e_3 } \frac{\partial \omega }{\partial s} 161 + \frac{\partial}{\partial s} \frac{\partial s}{\partial t} 162 + \frac{1}{e_3 } \frac{\partial s}{\partial t} \frac{\partial e_3}{\partial s} \\ \\ 163 &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ 164 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 165 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] 166 + \frac{1}{e_3 } \frac{\partial \omega }{\partial s} 167 + \frac{1}{e_3 } \frac{\partial e_3}{\partial t} 168 \end{array} 169 } 170 \end{align*} 171 \end{subequations} 227 + \frac{1}{e_3 } \left. \frac{\partial e_3}{\partial t} \right|_s . 228 \end{equation} 172 229 173 230 As a result, the continuity equation \autoref{eq:PE_continuity} in the $s-$coordinates is: … … 178 235 {\left. {\frac{\partial (e_2 \,e_3 \,u)}{\partial i}} \right|_s 179 236 + \left. {\frac{\partial (e_1 \,e_3 \,v)}{\partial j}} \right|_s } \right] 180 +\frac{1}{e_3 }\frac{\partial \omega }{\partial s} = 0 181 \end{equation} 182 A additional term has appeared that takeinto account237 +\frac{1}{e_3 }\frac{\partial \omega }{\partial s} = 0 . 238 \end{equation} 239 An additional term has appeared that takes into account 183 240 the contribution of the time variation of the vertical coordinate to the volume budget. 184 241 … … 210 267 + w \;\frac{\partial u}{\partial z} \\ \\ 211 268 &= \left. {\frac{\partial u }{\partial t}} \right|_z 212 - \left. \zeta \right|_z v 213 + \frac{1}{e_1 \,e_2 }\left[ { \left.{ \frac{\partial (e_2 \,v)}{\partial i} }\right|_z 269 - \frac{1}{e_1 \,e_2 }\left[ { \left.{ \frac{\partial (e_2 \,v)}{\partial i} }\right|_z 214 270 -\left.{ \frac{\partial (e_1 \,u)}{\partial j} }\right|_z } \right] \; v 215 271 + \frac{1}{2e_1} \left.{ \frac{\partial (u^2+v^2)}{\partial i} } \right|_z … … 230 286 } \\ \\ 231 287 &= \left. {\frac{\partial u }{\partial t}} \right|_z 232 +\left. \zeta \right|_s \;v288 - \left. \zeta \right|_s \;v 233 289 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s \\ 234 290 &\qquad \qquad \qquad \quad 235 291 + \frac{w}{e_3 } \;\frac{\partial u}{\partial s} 236 -\left[ {\frac{\sigma_1 }{e_3 }\frac{\partial v}{\partial s}292 + \left[ {\frac{\sigma_1 }{e_3 }\frac{\partial v}{\partial s} 237 293 - \frac{\sigma_2 }{e_3 }\frac{\partial u}{\partial s}} \right]\;v 238 294 - \frac{\sigma_1 }{2e_3 }\frac{\partial (u^2+v^2)}{\partial s} \\ \\ 239 295 &= \left. {\frac{\partial u }{\partial t}} \right|_z 240 +\left. \zeta \right|_s \;v296 - \left. \zeta \right|_s \;v 241 297 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s \\ 242 298 &\qquad \qquad \qquad \quad … … 245 301 - \sigma_1 u\frac{\partial u}{\partial s} - \sigma_1 v\frac{\partial v}{\partial s}} \right] \\ \\ 246 302 &= \left. {\frac{\partial u }{\partial t}} \right|_z 247 +\left. \zeta \right|_s \;v303 - \left. \zeta \right|_s \;v 248 304 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s 249 305 + \frac{1}{e_3} \left[ w - \sigma_2 v - \sigma_1 u \right] 250 \; \frac{\partial u}{\partial s} \\306 \; \frac{\partial u}{\partial s} . \\ 251 307 % 252 \intertext{Introducing $\omega$, the dia- a-surface velocity given by (\autoref{apdx:A_w_s}) }308 \intertext{Introducing $\omega$, the dia-s-surface velocity given by (\autoref{apdx:A_w_s}) } 253 309 % 254 310 &= \left. {\frac{\partial u }{\partial t}} \right|_z 255 +\left. \zeta \right|_s \;v311 - \left. \zeta \right|_s \;v 256 312 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s 257 + \frac{1}{e_3 } \left( \omega -w_s \right) \frac{\partial u}{\partial s} \\313 + \frac{1}{e_3 } \left( \omega + w_s \right) \frac{\partial u}{\partial s} \\ 258 314 \end{array} 259 315 } … … 266 322 { 267 323 \begin{array}{*{20}l} 268 w_s\;\frac{\partial u}{\partial s}269 = \frac{\partial s}{\partial t}\; \frac{\partial u }{\partial s}270 = \left. {\frac{\partial u }{\partial t}} \right|_s - \left. {\frac{\partial u }{\partial t}} \right|_z \ quad ,324 \frac{w_s}{e_3} \;\frac{\partial u}{\partial s} 325 = - \left. \frac{\partial s}{\partial t} \right|_z \; \frac{\partial u }{\partial s} 326 = \left. {\frac{\partial u }{\partial t}} \right|_s - \left. {\frac{\partial u }{\partial t}} \right|_z \ . 271 327 \end{array} 272 328 } 273 329 \] 274 leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative,330 This leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative, 275 331 \ie the total $s-$coordinate time derivative : 276 332 \begin{align} … … 278 334 \left. \frac{D u}{D t} \right|_s 279 335 = \left. {\frac{\partial u }{\partial t}} \right|_s 280 +\left. \zeta \right|_s \;v336 - \left. \zeta \right|_s \;v 281 337 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s 282 + \frac{1}{e_3 } \omega \;\frac{\partial u}{\partial s} 338 + \frac{1}{e_3 } \omega \;\frac{\partial u}{\partial s} . 283 339 \end{align} 284 340 Therefore, the vector invariant form of the total time derivative has exactly the same mathematical form in … … 306 362 + \frac{1}{e_3} \frac{\partial \omega}{\partial s} \right] \\ \\ 307 363 &&- \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 308 -u \;\frac{\partial e_1 }{\partial j} \right) \\364 -u \;\frac{\partial e_1 }{\partial j} \right) . \\ 309 365 \end{array} 310 366 } … … 328 384 - e_2 u \;\frac{\partial e_3 }{\partial i} 329 385 - e_1 v \;\frac{\partial e_3 }{\partial j} \right) 330 -\frac{1}{e_3} \frac{\partial \omega}{\partial s} \right] \\ \\386 + \frac{1}{e_3} \frac{\partial \omega}{\partial s} \right] \\ \\ 331 387 && - \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 332 388 -u \;\frac{\partial e_1 }{\partial j} \right) \\ \\ … … 337 393 && - \,u \left[ \frac{1}{e_1 e_2 e_3} \left( \frac{\partial(e_2 e_3 \, u)}{\partial i} 338 394 + \frac{\partial(e_1 e_3 \, v)}{\partial j} \right) 339 -\frac{1}{e_3} \frac{\partial \omega}{\partial s} \right]395 + \frac{1}{e_3} \frac{\partial \omega}{\partial s} \right] 340 396 - \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 341 -u \;\frac{\partial e_1 }{\partial j} \right) \\397 -u \;\frac{\partial e_1 }{\partial j} \right) . \\ 342 398 % 343 399 \intertext {Introducing a more compact form for the divergence of the momentum fluxes, … … 361 417 + \left. \nabla \cdot \left( {{\mathrm {\mathbf U}}\,u} \right) \right|_s 362 418 - \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 363 -u \;\frac{\partial e_1 }{\partial j} \right) 419 -u \;\frac{\partial e_1 }{\partial j} \right). 364 420 \end{flalign} 365 421 which is the total time derivative expressed in the curvilinear $s-$coordinate system. … … 377 433 & =-\frac{1}{\rho_o e_1 }\left[ {\left. {\frac{\partial p}{\partial i}} \right|_s -\frac{e_1 }{e_3 }\sigma_1 \frac{\partial p}{\partial s}} \right] \\ 378 434 & =-\frac{1}{\rho_o \,e_1 }\left. {\frac{\partial p}{\partial i}} \right|_s +\frac{\sigma_1 }{\rho_o \,e_3 }\left( {-g\;\rho \;e_3 } \right) \\ 379 &=-\frac{1}{\rho_o \,e_1 }\left. {\frac{\partial p}{\partial i}} \right|_s -\frac{g\;\rho }{\rho_o }\sigma_1 435 &=-\frac{1}{\rho_o \,e_1 }\left. {\frac{\partial p}{\partial i}} \right|_s -\frac{g\;\rho }{\rho_o }\sigma_1 . 380 436 \end{split} 381 437 \] 382 438 Applying similar manipulation to the second component and 383 replacing $\sigma_1$ and $\sigma_2$ by their expression \autoref{apdx:A_s_slope}, it comes:439 replacing $\sigma_1$ and $\sigma_2$ by their expression \autoref{apdx:A_s_slope}, it becomes: 384 440 \begin{equation} 385 441 \label{apdx:A_grad_p_1} … … 391 447 -\frac{1}{\rho_o \, e_2 }\left. {\frac{\partial p}{\partial j}} \right|_z 392 448 &=-\frac{1}{\rho_o \,e_2 } \left( \left. {\frac{\partial p}{\partial j}} \right|_s 393 + g\;\rho \;\left. {\frac{\partial z}{\partial j}} \right|_s \right) \\449 + g\;\rho \;\left. {\frac{\partial z}{\partial j}} \right|_s \right) . \\ 394 450 \end{split} 395 451 \end{equation} … … 405 461 \[ 406 462 \begin{split} 407 p &= g\; \int_z^\eta \rho \; e_3 \; dk = g\; \int_z^\eta \ left( \rho_o \,d + 1 \right) \; e_3 \; dk \\408 &= g \, \rho_o \; \int_z^\eta d \; e_3 \; dk + g \, \int_z^\eta e_3 \; dk463 p &= g\; \int_z^\eta \rho \; e_3 \; dk = g\; \int_z^\eta \rho_o \left( d + 1 \right) \; e_3 \; dk \\ 464 &= g \, \rho_o \; \int_z^\eta d \; e_3 \; dk + \rho_o g \, \int_z^\eta e_3 \; dk . 409 465 \end{split} 410 466 \] … … 412 468 \begin{equation} 413 469 \label{apdx:A_pressure} 414 p = \rho_o \; p_h' + g \, ( z + \eta)470 p = \rho_o \; p_h' + \rho_o \, g \, ( \eta - z ) 415 471 \end{equation} 416 472 and the hydrostatic pressure balance expressed in terms of $p_h'$ and $d$ is: 417 473 \[ 418 \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 474 \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 . 419 475 \] 420 476 421 477 Substituing \autoref{apdx:A_pressure} in \autoref{apdx:A_grad_p_1} and 422 using the definition of the density anomaly it comes theexpression in two parts:478 using the definition of the density anomaly it becomes an expression in two parts: 423 479 \begin{equation} 424 480 \label{apdx:A_grad_p_2} … … 426 482 -\frac{1}{\rho_o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z 427 483 &=-\frac{1}{e_1 } \left( \left. {\frac{\partial p_h'}{\partial i}} \right|_s 428 + g\; d \;\left. {\frac{\partial z}{\partial i}} \right|_s \right) - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} \\484 + g\; d \;\left. {\frac{\partial z}{\partial i}} \right|_s \right) - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} , \\ 429 485 % 430 486 -\frac{1}{\rho_o \, e_2 }\left. {\frac{\partial p}{\partial j}} \right|_z 431 487 &=-\frac{1}{e_2 } \left( \left. {\frac{\partial p_h'}{\partial j}} \right|_s 432 + g\; d \;\left. {\frac{\partial z}{\partial j}} \right|_s \right) - \frac{g}{e_2 } \frac{\partial \eta}{\partial j} \\488 + g\; d \;\left. {\frac{\partial z}{\partial j}} \right|_s \right) - \frac{g}{e_2 } \frac{\partial \eta}{\partial j} . \\ 433 489 \end{split} 434 490 \end{equation} … … 463 519 - \frac{1}{e_1 } \left( \frac{\partial p_h'}{\partial i} + g\; d \; \frac{\partial z}{\partial i} \right) 464 520 - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} 465 + D_u^{\vect{U}} + F_u^{\vect{U}} 521 + D_u^{\vect{U}} + F_u^{\vect{U}} , 466 522 \end{multline} 467 523 \begin{multline} … … 473 529 - \frac{1}{e_2 } \left( \frac{\partial p_h'}{\partial j} + g\; d \; \frac{\partial z}{\partial j} \right) 474 530 - \frac{g}{e_2 } \frac{\partial \eta}{\partial j} 475 + D_v^{\vect{U}} + F_v^{\vect{U}} 531 + D_v^{\vect{U}} + F_v^{\vect{U}} . 476 532 \end{multline} 477 533 \end{subequations} … … 483 539 \label{apdx:A_PE_dyn_flux_u} 484 540 \frac{1}{e_3} \frac{\partial \left( e_3\,u \right) }{\partial t} = 485 \nabla \cdot \left( {{\mathrm {\mathbf U}}\,u} \right)541 - \nabla \cdot \left( {{\mathrm {\mathbf U}}\,u} \right) 486 542 + \left\{ {f + \frac{1}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 487 543 -u \;\frac{\partial e_1 }{\partial j} \right)} \right\} \,v \\ 488 544 - \frac{1}{e_1 } \left( \frac{\partial p_h'}{\partial i} + g\; d \; \frac{\partial z}{\partial i} \right) 489 545 - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} 490 + D_u^{\vect{U}} + F_u^{\vect{U}} 546 + D_u^{\vect{U}} + F_u^{\vect{U}} , 491 547 \end{multline} 492 548 \begin{multline} … … 494 550 \frac{1}{e_3}\frac{\partial \left( e_3\,v \right) }{\partial t}= 495 551 - \nabla \cdot \left( {{\mathrm {\mathbf U}}\,v} \right) 496 +\left\{ {f + \frac{1}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i}552 - \left\{ {f + \frac{1}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 497 553 -u \;\frac{\partial e_1 }{\partial j} \right)} \right\} \,u \\ 498 554 - \frac{1}{e_2 } \left( \frac{\partial p_h'}{\partial j} + g\; d \; \frac{\partial z}{\partial j} \right) 499 555 - \frac{g}{e_2 } \frac{\partial \eta}{\partial j} 500 + D_v^{\vect{U}} + F_v^{\vect{U}} 556 + D_v^{\vect{U}} + F_v^{\vect{U}} . 501 557 \end{multline} 502 558 \end{subequations} … … 505 561 \begin{equation} 506 562 \label{apdx:A_dyn_zph} 507 \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 563 \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 . 508 564 \end{equation} 509 565 … … 531 587 \left[ \frac{\partial }{\partial i} \left( {e_2 \,e_3 \;Tu} \right) 532 588 + \frac{\partial }{\partial j} \left( {e_1 \,e_3 \;Tv} \right) \right] \\ 533 +\frac{1}{e_3} \frac{\partial }{\partial k} \left( Tw \right)589 - \frac{1}{e_3} \frac{\partial }{\partial k} \left( Tw \right) 534 590 + D^{T} +F^{T} 535 591 \end{multline} 536 592 537 The expression for the advection term is a straight consequence of ( A.4),593 The expression for the advection term is a straight consequence of (\autoref{apdx:A_sco_Continuity}), 538 594 the expression of the 3D divergence in the $s-$coordinates established above. 539 595 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/annex_B.tex
r11263 r11353 53 53 { 54 54 \begin{array}{*{20}l} 55 D^T=& \frac{1}{e_1\,e_2\,e_3 }\;\left[ {\ \ \ \ e_2\,e_3\,A^{lT} \;\left. 56 {\frac{\partial }{\partial i}\left( {\frac{1}{e_1}\;\left. {\frac{\partial T}{\partial i}} \right|_s -\frac{\sigma_1 }{e_3 }\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\ 57 &\qquad \quad \ \ \ +e_1\,e_3\,A^{lT} \;\left. {\frac{\partial }{\partial j}\left( {\frac{1}{e_2 }\;\left. {\frac{\partial T}{\partial j}} \right|_s -\frac{\sigma_2 }{e_3 }\;\frac{\partial T}{\partial s}} \right)} \right|_s \\ 58 &\qquad \quad \ \ \ + e_1\,e_2\,A^{lT} \;\frac{\partial }{\partial s}\left( {-\frac{\sigma_1 }{e_1 }\;\left. {\frac{\partial T}{\partial i}} \right|_s -\frac{\sigma_2 }{e_2 }\;\left. {\frac{\partial T}{\partial j}} \right|_s } \right. 59 \left. {\left. {+\left( {\varepsilon +\sigma_1^2+\sigma_2 ^2} \right)\;\frac{1}{e_3 }\;\frac{\partial T}{\partial s}} \right)\;\;} \right] 55 D^T= \frac{1}{e_1\,e_2\,e_3 } & \left\{ \quad \quad \frac{\partial }{\partial i} \left. \left[ e_2\,e_3 \, A^{lT} 56 \left( \ \frac{1}{e_1}\; \left. \frac{\partial T}{\partial i} \right|_s 57 -\frac{\sigma_1 }{e_3 } \; \frac{\partial T}{\partial s} \right) \right] \right|_s \right. \\ 58 & \quad \ + \ \left. \frac{\partial }{\partial j} \left. \left[ e_1\,e_3 \, A^{lT} 59 \left( \ \frac{1}{e_2 }\; \left. \frac{\partial T}{\partial j} \right|_s 60 -\frac{\sigma_2 }{e_3 } \; \frac{\partial T}{\partial s} \right) \right] \right|_s \right. \\ 61 & \quad \ + \ \left. e_1\,e_2\, \frac{\partial }{\partial s} \left[ A^{lT} \; \left( 62 -\frac{\sigma_1 }{e_1 } \; \left. \frac{\partial T}{\partial i} \right|_s 63 -\frac{\sigma_2 }{e_2 } \; \left. \frac{\partial T}{\partial j} \right|_s 64 +\left( \varepsilon +\sigma_1^2+\sigma_2 ^2 \right) \; \frac{1}{e_3 } \; \frac{\partial T}{\partial s} \right) \; \right] \; \right\} . 60 65 \end{array} 61 66 } 62 67 \end{align*} 63 68 64 Equation\autoref{apdx:B2} is obtained from \autoref{apdx:B1} without any additional assumption.69 \autoref{apdx:B2} is obtained from \autoref{apdx:B1} without any additional assumption. 65 70 Indeed, for the special case $k=z$ and thus $e_3 =1$, 66 71 we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in \autoref{apdx:A} and … … 90 95 { 91 96 \begin{array}{*{20}l} 92 \intertext{Noting that $\frac{1}{e_1} \left. \frac{\partial e_3 }{\partial i} \right|_s = \frac{\partial \sigma_1 }{\partial s}$, itbecomes:}97 \intertext{Noting that $\frac{1}{e_1} \left. \frac{\partial e_3 }{\partial i} \right|_s = \frac{\partial \sigma_1 }{\partial s}$, this becomes:} 93 98 % 94 & =\frac{1}{e_1\,e_2\,e_3 }\left[ {\left. {\;\;\;\frac{\partial }{\partial i}\left( {\frac{e_2\,e_3 }{e_1}\,A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)} \right|_s \left. -\, {e_3 \frac{\partial }{\partial i}\left( {\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\99 D^T & =\frac{1}{e_1\,e_2\,e_3 }\left[ {\left. {\;\;\;\frac{\partial }{\partial i}\left( {\frac{e_2\,e_3 }{e_1}\,A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)} \right|_s \left. -\, {e_3 \frac{\partial }{\partial i}\left( {\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\ 95 100 & \qquad \qquad \quad -e_2 A^{lT}\;\frac{\partial \sigma_1 }{\partial s}\left. {\frac{\partial T}{\partial i}} \right|_s -e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {\frac{e_2 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right) \\ 96 & \qquad \qquad \quad\shoveright{ \left. { +e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial z}} \right)\;\;\;} \right] }\\101 & \qquad \qquad \quad\shoveright{ \left. { +e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\;\;\;} \right] }\\ 97 102 \\ 98 103 &=\frac{1}{e_1 \,e_2 \,e_3 } \left[ {\left. {\;\;\;\frac{\partial }{\partial i} \left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)} \right|_s \left. {-\frac{\partial }{\partial i}\left( {e_2 \,\sigma_1 A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\ 99 104 & \qquad \qquad \quad \left. {+\frac{e_2 \,\sigma_1 }{e_3}A^{lT}\;\frac{\partial T}{\partial s} \;\frac{\partial e_3 }{\partial i}} \right|_s -e_2 A^{lT}\;\frac{\partial \sigma_1 }{\partial s}\left. {\frac{\partial T}{\partial i}} \right|_s \\ 100 105 & \qquad \qquad \quad-e_2 \,\sigma_1 \frac{\partial}{\partial s}\left( {A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 \,\sigma_1 ^2}{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right) \\ 101 & \qquad \qquad \quad\shoveright{ \left. {-\frac{\partial \left( {e_1 \,e_2 \,\sigma_1 } \right)}{\partial s} \left( {\frac{\sigma_1 }{e_3}A^{lT}\;\frac{\partial T}{\partial s}} \right) + \frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\;\;\;} \right]} 106 & \qquad \qquad \quad\shoveright{ \left. {-\frac{\partial \left( {e_1 \,e_2 \,\sigma_1 } \right)}{\partial s} \left( {\frac{\sigma_1 }{e_3}A^{lT}\;\frac{\partial T}{\partial s}} \right) + \frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\;\;\;} \right]} . 102 107 \end{array} 103 108 } \\ … … 105 110 \begin{array}{*{20}l} 106 111 % 107 \intertext{ using the same remark as just above, itbecomes:}112 \intertext{Using the same remark as just above, $D^T$ becomes:} 108 113 % 109 &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ {\left. {\;\;\;\frac{\partial }{\partial i} \left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s -e_2 \,\sigma_1 A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right.\;\;\; \\114 D^T &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ {\left. {\;\;\;\frac{\partial }{\partial i} \left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s -e_2 \,\sigma_1 A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right.\;\;\; \\ 110 115 & \qquad \qquad \quad+\frac{e_1 \,e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}\;\frac{\partial \sigma_1 }{\partial s} - \frac {\sigma_1 }{e_3} A^{lT} \;\frac{\partial \left( {e_1 \,e_2 \,\sigma_1 } \right)}{\partial s}\;\frac{\partial T}{\partial s} \\ 111 116 & \qquad \qquad \quad-e_2 \left( {A^{lT}\;\frac{\partial \sigma_1 }{\partial s}\left. {\frac{\partial T}{\partial i}} \right|_s +\frac{\partial }{\partial s}\left( {\sigma_1 A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)-\frac{\partial \sigma_1 }{\partial s}\;A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right) \\ 112 & \qquad \qquad \quad\shoveright{\left. {+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 \,\sigma_1 ^2}{e_3 }A^{lT}\;\frac{\partial T}{\partial s}+\frac{e_1 \,e_2}{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\;\;\;} \right] }117 & \qquad \qquad \quad\shoveright{\left. {+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 \,\sigma_1 ^2}{e_3 }A^{lT}\;\frac{\partial T}{\partial s}+\frac{e_1 \,e_2}{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\;\;\;} \right] . } 113 118 \end{array} 114 119 } \\ … … 117 122 % 118 123 \intertext{Since the horizontal scale factors do not depend on the vertical coordinate, 119 the last term of the first line and the first term of the lastline cancel, while120 the second line reduces to a single vertical derivative, so it becomes:}124 the two terms on the second line cancel, while 125 the third line reduces to a single vertical derivative, so it becomes:} 121 126 % 122 & =\frac{1}{e_1 \,e_2 \,e_3 }\left[ {\left. {\;\;\;\frac{\partial }{\partial i}\left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s -e_2 \,\sigma_1 \,A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\127 D^T & =\frac{1}{e_1 \,e_2 \,e_3 }\left[ {\left. {\;\;\;\frac{\partial }{\partial i}\left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s -e_2 \,\sigma_1 \,A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\ 123 128 & \qquad \qquad \quad \shoveright{ \left. {+\frac{\partial }{\partial s}\left( {-e_2 \,\sigma_1 \,A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s +A^{lT}\frac{e_1 \,e_2 }{e_3 }\;\left( {\varepsilon +\sigma_1 ^2} \right)\frac{\partial T}{\partial s}} \right)\;\;\;} \right]} \\ 124 129 % 125 \intertext{ in other words, the horizontal/vertical Laplacian operator in the ($i$,$s$) plane takes the following form:}130 \intertext{In other words, the horizontal/vertical Laplacian operator in the ($i$,$s$) plane takes the following form:} 126 131 \end{array} 127 132 } \\ … … 169 174 \left[ {{ 170 175 \begin{array}{*{20}c} 171 {1+a_ 1 ^2} \hfill & {-a_1 a_2 } \hfill & {-a_1} \hfill \\172 {-a_1 a_2 } \hfill & {1+a_2 ^2} \hfill & {-a_2} \hfill \\173 {-a_1 } \hfill & {-a_2} \hfill & {\varepsilon +a_1 ^2+a_2 ^2} \hfill \\176 {1+a_2 ^2 +\varepsilon a_1 ^2} \hfill & {-a_1 a_2 (1-\varepsilon)} \hfill & {-a_1 (1-\varepsilon) } \hfill \\ 177 {-a_1 a_2 (1-\varepsilon) } \hfill & {1+a_1 ^2 +\varepsilon a_2 ^2} \hfill & {-a_2 (1-\varepsilon)} \hfill \\ 178 {-a_1 (1-\varepsilon)} \hfill & {-a_2 (1-\varepsilon)} \hfill & {\varepsilon +a_1 ^2+a_2 ^2} \hfill \\ 174 179 \end{array} 175 180 }} \right] 176 181 \end{equation} 177 where ($a_1$, $a_2$) are the isopycnal slopes in ($\textbf{i}$, $\textbf{j}$) directions, relative to geopotentials: 182 where ($a_1$, $a_2$) are $(-1) \times$ the isopycnal slopes in 183 ($\textbf{i}$, $\textbf{j}$) directions, relative to geopotentials (or 184 equivalently the slopes of the geopotential surfaces in the isopycnal 185 coordinate framework): 178 186 \[ 179 187 a_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1} … … 182 190 \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1} 183 191 \] 184 185 In practice, isopycnal slopes are generally less than $10^{-2}$ in the ocean, 186 so $\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{cox_OM87}: 192 and, as before, $\epsilon = A^{vT} / A^{lT}$. 193 194 In practice, $\epsilon$ is small and isopycnal slopes are generally less than $10^{-2}$ in the ocean, 195 so $\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{cox_OM87}. Keeping leading order terms\footnote{Apart from the (1,0) 196 and (0,1) elements which are set to zero. See \citet{griffies_bk04}, section 14.1.4.1 for a discussion of this point.}: 187 197 \begin{subequations} 188 198 \label{apdx:B4} … … 226 236 The isopycnal diffusion operator \autoref{apdx:B4}, 227 237 \autoref{apdx:B_ldfiso} conserves tracer quantity and dissipates its square. 228 The demonstration of the first property is trivial as \autoref{apdx:B4} is the divergence of fluxes. 229 Let us demonstrate the second one:238 As \autoref{apdx:B4} is the divergence of a flux, the demonstration of the first property is trivial, providing that the flux normal to the boundary is zero 239 (as it is when $A_h$ is zero at the boundary). Let us demonstrate the second one: 230 240 \[ 231 241 \iiint\limits_D T\;\nabla .\left( {\textbf{A}}_{\textbf{I}} \nabla T \right)\,dv … … 246 256 j}-a_2 \frac{\partial T}{\partial k}} \right)^2} 247 257 +\varepsilon \left(\frac{\partial T}{\partial k}\right) ^2\right] \\ 248 & \geq 0 258 & \geq 0 . 249 259 \end{array} 250 260 } … … 275 285 \end{equation} 276 286 277 where ($r_1$, $r_2$) are the isopycnal slopes in ($\textbf{i}$, $\textbf{j}$) directions, 278 relative to $s$-coordinate surfaces: 287 where ($r_1$, $r_2$) are $(-1)\times$ the isopycnal slopes in ($\textbf{i}$, $\textbf{j}$) directions, 288 relative to $s$-coordinate surfaces (or equivalently the slopes of the 289 $s$-coordinate surfaces in the isopycnal coordinate framework): 279 290 \[ 280 291 r_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial s}} \right)^{-1} … … 284 295 \] 285 296 286 To prove \autoref{apdx:B 5} by direct re-expression of \autoref{apdx:B_ldfiso} is straightforward, but laborious.297 To prove \autoref{apdx:B_ldfiso_s} by direct re-expression of \autoref{apdx:B_ldfiso} is straightforward, but laborious. 287 298 An easier way is first to note (by reversing the derivation of \autoref{sec:B_2} from \autoref{sec:B_1} ) that 288 299 the weak-slope operator may be \emph{exactly} reexpressed in non-orthogonal $i,j,\rho$-coordinates as … … 306 317 the (rotated,orthogonal) isoneutral axes to the non-orthogonal $i,j,\rho$-coordinates. 307 318 The further transformation into $i,j,s$-coordinates is exact, whatever the steepness of the $s$-surfaces, 308 in the same way as the transformation of horizontal/vertical Laplacian diffusion in $z$-coordinates ,319 in the same way as the transformation of horizontal/vertical Laplacian diffusion in $z$-coordinates in 309 320 \autoref{sec:B_1} onto $s$-coordinates is exact, however steep the $s$-surfaces. 310 321 … … 316 327 \label{sec:B_3} 317 328 318 The second order momentum diffusion operator (Laplacian) in the $z$-coordinateis found by329 The second order momentum diffusion operator (Laplacian) in $z$-coordinates is found by 319 330 applying \autoref{eq:PE_lap_vector}, the expression for the Laplacian of a vector, 320 331 to the horizontal velocity vector: … … 361 372 \end{align*} 362 373 Using \autoref{eq:PE_div}, the definition of the horizontal divergence, 363 the third compon ant of the second vector is obviously zero and thus :374 the third component of the second vector is obviously zero and thus : 364 375 \[ 365 \Delta {\textbf{U}}_h = \nabla _h \left( \chi \right) - \nabla _h \times \left( \zeta \ right) + \frac {1}{e_3 } \frac {\partial }{\partial k} \left( {\frac {1}{e_3 } \frac{\partial {\textbf{ U}}_h }{\partial k}} \right)376 \Delta {\textbf{U}}_h = \nabla _h \left( \chi \right) - \nabla _h \times \left( \zeta \textbf{k} \right) + \frac {1}{e_3 } \frac {\partial }{\partial k} \left( {\frac {1}{e_3 } \frac{\partial {\textbf{ U}}_h }{\partial k}} \right) . 366 377 \] 367 378 … … 379 390 - \nabla _h \times \left( {A^{lm}\;\zeta \;{\textbf{k}}} \right) 380 391 + \frac{1}{e_3 }\frac{\partial }{\partial k}\left( {\frac{A^{vm}\;}{e_3 } 381 \frac{\partial {\mathrm {\mathbf U}}_h }{\partial k}} \right) \\392 \frac{\partial {\mathrm {\mathbf U}}_h }{\partial k}} \right) , \\ 382 393 \end{equation} 383 394 that is, in expanded form: … … 386 397 & = \frac{1}{e_1} \frac{\partial \left( {A^{lm}\chi } \right)}{\partial i} 387 398 -\frac{1}{e_2} \frac{\partial \left( {A^{lm}\zeta } \right)}{\partial j} 388 +\frac{1}{e_3} \frac{\partial u}{\partial k}\\399 +\frac{1}{e_3} \frac{\partial }{\partial k} \left( \frac{A^{vm}}{e_3} \frac{\partial u}{\partial k} \right) , \\ 389 400 D^{\textbf{U}}_v 390 401 & = \frac{1}{e_2 }\frac{\partial \left( {A^{lm}\chi } \right)}{\partial j} 391 402 +\frac{1}{e_1 }\frac{\partial \left( {A^{lm}\zeta } \right)}{\partial i} 392 +\frac{1}{e_3} \frac{\partial v}{\partial k}403 +\frac{1}{e_3} \frac{\partial }{\partial k} \left( \frac{A^{vm}}{e_3} \frac{\partial v}{\partial k} \right) . 393 404 \end{align*} 394 405 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_ASM.tex
r11263 r11353 8 8 \label{chap:ASM} 9 9 10 Authors: D. Lea, M. Martin, K. Mogensen, A. Weaver, ... % do we keep 10 \minitoc 11 11 12 \minitoc 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} 13 21 14 22 \newpage 15 23 16 24 The ASM code adds the functionality to apply increments to the model variables: temperature, salinity, 17 sea surface height, velocity and sea ice concentration. 25 sea surface height, velocity and sea ice concentration. 18 26 These are read into the model from a NetCDF file which may be produced by separate data assimilation code. 19 27 The code can also output model background fields which are used as an input to data assimilation code. … … 56 64 Typically the increments are spread evenly over the full window. 57 65 In addition, two different weighting functions have been implemented. 58 The first function employs constant weights,66 The first function (namelist option \np{niaufn} = 0) employs constant weights, 59 67 \begin{align} 60 68 \label{eq:F1_i} … … 66 74 0 & {\mathrm if} \; \; \; t_{i} > t_{n} 67 75 \end{array} 68 \right. 76 \right. 69 77 \end{align} 70 78 where $M = m-n$. 71 The second function employs peaked hat-like weights in order to give maximum weight in the centre of the sub-window,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, 72 80 with the weighting reduced linearly to a small value at the window end-points: 73 81 \begin{align} … … 83 91 \right. 84 92 \end{align} 85 where $\alpha^{-1} = \sum_{i=1}^{M/2} 2i$ and $M$ is assumed to be even. 93 where $\alpha^{-1} = \sum_{i=1}^{M/2} 2i$ and $M$ is assumed to be even. 86 94 The weights described by \autoref{eq:F2_i} provide a smoother transition of the analysis trajectory from 87 95 one assimilation cycle to the next than that described by \autoref{eq:F1_i}. … … 92 100 \label{sec:ASM_div_dmp} 93 101 94 The velocity increments may be initialized by the iterative application of a divergence damping operator. 95 In iteration step $n$ new estimates of velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by: 102 It is quite challenging for data assimilation systems to provide non-divergent velocity increments. 103 Applying divergent velocity increments will likely cause spurious vertical velocities in the model. This section describes a method to take velocity increments provided to \NEMO ($u^0_I$ and $v^0_I$) and adjust them by the iterative application of a divergence damping operator. The method is also described in \citet{dobricic.pinardi.ea_OS07}. 104 105 In iteration step $n$ (starting at $n=1$) new estimates of velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by: 106 96 107 \begin{equation} 97 108 \label{eq:asm_dmp} … … 105 116 \right., 106 117 \end{equation} 107 where 118 119 where the divergence is defined as 120 108 121 \[ 109 122 % \label{eq:asm_div} … … 112 125 +\delta_j \left[ {e_{1v}\,e_{3v}\,v^{n-1}_I} \right]} \right). 113 126 \] 114 By the application of \autoref{eq:asm_dmp} and \autoref{eq:asm_dmp} the divergence is filtered in each iteration, 127 128 By the application of \autoref{eq:asm_dmp} the divergence is filtered in each iteration, 115 129 and the vorticity is left unchanged. 116 130 In the presence of coastal boundaries with zero velocity increments perpendicular to the coast … … 122 136 The divergence damping is activated by assigning to \np{nn\_divdmp} in the \textit{nam\_asminc} namelist 123 137 a value greater than zero. 124 By choosing this value to be of the order of 100 the increments in 125 the vertical velocity will be significantly reduced. 138 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. 126 139 127 140 … … 131 144 \label{sec:ASM_details} 132 145 133 Here we show an example \ngn{nam asm} namelist and the header of an example assimilation increments file on146 Here we show an example \ngn{nam\_asminc} namelist and the header of an example assimilation increments file on 134 147 the ORCA2 grid. 135 148 136 %------------------------------------------nam asm-----------------------------------------------------149 %------------------------------------------nam_asminc----------------------------------------------------- 137 150 % 138 151 \nlst{nam_asminc} -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_DIA.tex
r11263 r11353 10 10 \minitoc 11 11 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 12 25 \newpage 13 26 … … 15 28 % Old Model Output 16 29 % ================================================================ 17 \section{ Old model output (default)}30 \section{Model output} 18 31 \label{sec:DIA_io_old} 19 32 … … 1494 1507 \textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested. 1495 1508 In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl} are not working, 1496 and none of the options have been tested with variable volume (\ie \ key{vvl} defined).1509 and none of the options have been tested with variable volume (\ie \np{ln\_linssh}\forcode{ = .true.}). 1497 1510 1498 1511 % ------------------------------------------------------------------------------------------------------------- … … 1930 1943 1931 1944 Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface which is considered. 1932 In the non linear free surface case, \ie \ key{vvl} defined, it is given by1945 In the non linear free surface case, \ie \np{ln\_linssh}\forcode{ = .true.}, it is given by 1933 1946 1934 1947 \[ … … 1969 1982 where $S_o$ and $p_o$ are the initial salinity and pressure, respectively. 1970 1983 1971 Both steric and thermosteric sea level are computed in \mdl{diaar5} which needs the \key{diaar5} defined to 1972 be called. 1984 Both steric and thermosteric sea level are computed in \mdl{diaar5}. 1973 1985 1974 1986 % ------------------------------------------------------------------------------------------------------------- 1975 1987 % Other Diagnostics 1976 1988 % ------------------------------------------------------------------------------------------------------------- 1977 \section[Other diagnostics (\texttt{\textbf{key\_diahth}}, \texttt{\textbf{key\_diaar5}})]1978 {Other diagnostics (\protect\key{diahth}, \protect\key{diaar5})}1989 \section[Other diagnostics] 1990 {Other diagnostics} 1979 1991 \label{sec:DIA_diag_others} 1980 1992 … … 1995 2007 - the depth of the thermocline (maximum of the vertical temperature gradient) (\mdl{diahth}) 1996 2008 1997 % -----------------------------------------------------------1998 % Poleward heat and salt transports1999 % -----------------------------------------------------------2000 2001 \subsection[Poleward heat and salt transports (\textit{diaptr.F90})]2002 {Poleward heat and salt transports (\protect\mdl{diaptr})}2003 2004 %------------------------------------------namptr-----------------------------------------2005 2006 \nlst{namptr}2007 %-----------------------------------------------------------------------------------------2008 2009 The poleward heat and salt transports, their advective and diffusive component,2010 and the meriodional stream function can be computed on-line in \mdl{diaptr} \np{ln\_diaptr} to true2011 (see the \textit{\ngn{namptr} } namelist below).2012 When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian,2013 Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean.2014 The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays,2015 the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:mask_subasins}).2016 2009 2017 2010 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 2034 2027 % CMIP specific diagnostics 2035 2028 % ----------------------------------------------------------- 2036 \subsection[CMIP specific diagnostics (\textit{diaar5.F90} )]2029 \subsection[CMIP specific diagnostics (\textit{diaar5.F90}, \textit{diaptr.F90})] 2037 2030 {CMIP specific diagnostics (\protect\mdl{diaar5})} 2038 2031 2039 A series of diagnostics has been added in the \mdl{diaar5} .2040 They correspondsto outputs that are required for AR5 simulations (CMIP5)2032 A series of diagnostics has been added in the \mdl{diaar5} and \mdl{diaptr}. 2033 In \mdl{diaar5} they correspond to outputs that are required for AR5 simulations (CMIP5) 2041 2034 (see also \autoref{sec:DIA_steric} for one of them). 2042 Activating those outputs requires to define the \key{diaar5} CPP key. 2035 The module \mdl{diaar5} is active when one of the following outputs is required : global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot), global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot), sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 2036 2037 In \mdl{diaptr} when \np{ln\_diaptr}\forcode{ = .true.} 2038 (see the \textit{\ngn{namptr} } namelist below) can be computed on-line the poleward heat and salt transports, their advective and diffusive component, and the meriodional stream function . 2039 When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian, 2040 Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean. 2041 The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays, 2042 the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:mask_subasins}). 2043 2044 %------------------------------------------namptr----------------------------------------- 2045 2046 \nlst{namptr} 2047 %----------------------------------------------------------------------------------------- 2043 2048 2044 2049 % ----------------------------------------------------------- -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_DOM.tex
r11263 r11353 18 18 % - domclo: closed sea and lakes.... management of closea sea area : specific to global configuration, both forced and coupled 19 19 20 \vfill 21 \begin{figure}[b] 22 \subsubsection*{Changes record} 23 \begin{tabular}{m{0.08\linewidth}||m{0.32\linewidth}|m{0.6\linewidth}} 24 Release & Author(s) & Modifications \\ 25 \hline 26 {\em 4.0} & {\em Simon M{\"u}ller \& Andrew Coward} & {\em Compatibility changes for v4.0. Major simplication has moved many of the options to external domain configuration tools. For now this information has been retained in \autoref{apdx:DOMAINcfg} } \\ 27 {\em 3.x} & {\em Sebastien Masson, Gurvan Madec \& Rashid Benshila } & {\em } \\ 28 \end{tabular} 29 \end{figure} 30 20 31 \newpage 21 32 22 33 Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretization \autoref{chap:STP}, 23 we need to choose a discretization on a grid, and numerical algorithms.34 we need to choose a grid for spatial discretization and related numerical algorithms. 24 35 In the present chapter, we provide a general description of the staggered grid used in \NEMO, 25 and other information relevant to the main directory routines as well as the DOM (DOMain) directory.36 and other relevant information about the DOM (DOMain) source-code modules . 26 37 27 38 % ================================================================ … … 55 66 The numerical techniques used to solve the Primitive Equations in this model are based on the traditional, 56 67 centred second-order finite difference approximation. 57 Special attention has been given to the homogeneity of the solution in the three spa cedirections.68 Special attention has been given to the homogeneity of the solution in the three spatial directions. 58 69 The arrangement of variables is the same in all directions. 59 70 It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with vector points $(u, v, w)$ defined in … … 71 82 Each scale factor is defined as the local analytical value provided by \autoref{eq:scale_factors}. 72 83 As a result, the mesh on which partial derivatives $\pd[]{\lambda}$, $\pd[]{\varphi}$ and 73 $\pd[]{z}$ are evaluated i na uniform mesh with a grid size of unity.84 $\pd[]{z}$ are evaluated is a uniform mesh with a grid size of unity. 74 85 Discrete partial derivatives are formulated by the traditional, centred second order finite difference approximation 75 86 while the scale factors are chosen equal to their local analytical value. … … 79 90 the continuous properties (see \autoref{apdx:C}). 80 91 A similar, related remark can be made about the domain size: 81 when needed, an area, volume, or the total ocean depth must be evaluated as the sum of the relevant scale factors92 when needed, an area, volume, or the total ocean depth must be evaluated as the product or sum of the relevant scale factors 82 93 (see \autoref{eq:DOM_bar} in the next section). 83 94 … … 87 98 \begin{tabular}{|p{46pt}|p{56pt}|p{56pt}|p{56pt}|} 88 99 \hline 89 T& $i $ & $j $ & $k $ \\100 t & $i $ & $j $ & $k $ \\ 90 101 \hline 91 102 u & $i + 1/2$ & $j $ & $k $ \\ … … 107 118 \protect\label{tab:cell} 108 119 Location of grid-points as a function of integer or integer and a half value of the column, line or level. 109 This indexing is only used for the writing of the semi -discrete equation .110 In the code, the indexing uses integer values only and has a reverse direction in the vertical120 This indexing is only used for the writing of the semi -discrete equations. 121 In the code, the indexing uses integer values only and is positive downwards in the vertical with $k=1$ at the surface. 111 122 (see \autoref{subsec:DOM_Num_Index}) 112 123 } 113 124 \end{center} 114 125 \end{table} 126 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 127 128 Note that the definition of the scale factors 129 (\ie as the analytical first derivative of the transformation that 130 results in $(\lambda,\varphi,z)$ as a function of $(i,j,k)$) 131 is specific to the \NEMO model \citep{marti.madec.ea_JGR92}. 132 As an example, a scale factor in the $i$ direction is defined locally at a $t$-point, 133 whereas many other models on a C grid choose to define such a scale factor as 134 the distance between the $u$-points on each side of the $t$-point. 135 Relying on an analytical transformation has two advantages: 136 firstly, there is no ambiguity in the scale factors appearing in the discrete equations, 137 since they are first introduced in the continuous equations; 138 secondly, analytical transformations encourage good practice by the definition of smoothly varying grids 139 (rather than allowing the user to set arbitrary jumps in thickness between adjacent layers) \citep{treguier.dukowicz.ea_JGR96}. 140 An example of the effect of such a choice is shown in \autoref{fig:zgr_e3}. 141 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 142 \begin{figure}[!t] 143 \begin{center} 144 \includegraphics[width=\textwidth]{Fig_zgr_e3} 145 \caption{ 146 \protect\label{fig:zgr_e3} 147 Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, 148 and (b) analytically derived grid-point position and scale factors. 149 For both grids here, the same $w$-point depth has been chosen but 150 in (a) the $t$-points are set half way between $w$-points while 151 in (b) they are defined from an analytical function: 152 $z(k) = 5 \, (k - 1/2)^3 - 45 \, (k - 1/2)^2 + 140 \, (k - 1/2) - 150$. 153 Note the resulting difference between the value of the grid-size $\Delta_k$ and 154 those of the scale factor $e_k$. 155 } 156 \end{center} 157 \end{figure} 115 158 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 116 159 … … 132 175 Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at 133 176 a $t$-point has its three components defined at $u$-, $v$- and $w$-points while 134 its Laplacian is defined at $t$-point.177 its Laplacian is defined at the $t$-point. 135 178 These operators have the following discrete forms in the curvilinear $s$-coordinates system: 136 179 \[ … … 171 214 \end{equation} 172 215 173 The vertical average over the whole water column denoted by an overbar becomes for a quantity $q$ which174 is a masked field (i.e. equal to zero inside solid area):216 The vertical average over the whole water column is denoted by an overbar and is for 217 a masked field $q$ (\ie a quantity that is equal to zero inside solid areas): 175 218 \begin{equation} 176 219 \label{eq:DOM_bar} … … 178 221 \end{equation} 179 222 where $H_q$ is the ocean depth, which is the masked sum of the vertical scale factors at $q$ points, 180 $k^b$ and $k^o$ are the bottom and surface $k$-indices, and the symbol $ k^o$ refers to a summation over223 $k^b$ and $k^o$ are the bottom and surface $k$-indices, and the symbol $\sum \limits_k$ refers to a summation over 181 224 all grid points of the same type in the direction indicated by the subscript (here $k$). 182 225 … … 193 236 vector points $(u,v,w)$. 194 237 195 Let $a$ and $b$ be two fields defined on the mesh, with value zero inside continental area.196 Using integration by parts it can be shown that the differencing operators ($\delta_i$, $\delta_j$ and $\delta_k$)238 Let $a$ and $b$ be two fields defined on the mesh, with a value of zero inside continental areas. 239 It can be shown that the differencing operators ($\delta_i$, $\delta_j$ and $\delta_k$) 197 240 are skew-symmetric linear operators, and further that the averaging operators $\overline{\cdots}^{\, i}$, 198 241 $\overline{\cdots}^{\, j}$ and $\overline{\cdots}^{\, k}$) are symmetric linear operators, \ie … … 228 271 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 229 272 230 The array representation used in the \fortran code requires an integer indexing while231 the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is associated with the use of232 integer values for $t$-points and both integer and integer and a half values for all the other points.233 Therefore a specific integer indexing must bedefined for points other than $t$-points273 The array representation used in the \fortran code requires an integer indexing. 274 However, the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is associated with the use of 275 integer values for $t$-points only while all the other points involve integer and a half values. 276 Therefore, a specific integer indexing has been defined for points other than $t$-points 234 277 (\ie velocity and vorticity grid-points). 235 Furthermore, the direction of the vertical indexing has been changed so that the surface level isat $k = 1$.278 Furthermore, the direction of the vertical indexing has been reversed and the surface level set at $k = 1$. 236 279 237 280 % ----------------------------------- … … 253 296 \label{subsec:DOM_Num_Index_vertical} 254 297 255 In the vertical, the chosen indexing requires special attention since the $k$-axis is re-orientated downwardin256 the \fortran code compared to the indexingused in the semi -discrete equations and298 In the vertical, the chosen indexing requires special attention since the direction of the $k$-axis in 299 the \fortran code is the reverse of that used in the semi -discrete equations and 257 300 given in \autoref{subsec:DOM_cell}. 258 The sea surface corresponds to the $w$-level $k = 1$ which is the same index as$t$-level just below301 The sea surface corresponds to the $w$-level $k = 1$, which is the same index as the $t$-level just below 259 302 (\autoref{fig:index_vert}). 260 The last $w$-level ($k = jpk$) either corresponds to the ocean floor or is inside the bathymetry while 261 the last $t$-level is always inside the bathymetry (\autoref{fig:index_vert}). 262 Note that for an increasing $k$ index, a $w$-point and the $t$-point just below have the same $k$ index, 263 in opposition to what is done in the horizontal plane where 264 it is the $t$-point and the nearest velocity points in the direction of the horizontal axis that 265 have the same $i$ or $j$ index 303 The last $w$-level ($k = jpk$) either corresponds to or is below the ocean floor while 304 the last $t$-level is always outside the ocean domain (\autoref{fig:index_vert}). 305 Note that a $w$-point and the directly underlaying $t$-point have a common $k$ index (\ie $t$-points and their 306 nearest $w$-point neighbour in negative index direction), in contrast to the indexing on the horizontal plane where 307 the $t$-point has the same index as the nearest velocity points in the positive direction of the respective horizontal axis index 266 308 (compare the dashed area in \autoref{fig:index_hor} and \autoref{fig:index_vert}). 267 309 Since the scale factors are chosen to be strictly positive, 268 a \textit{minus sign} appears in the \fortran code \textit{beforeall the vertical derivatives} of269 the discrete equations given in this documentation.310 a \textit{minus sign} is included in the \fortran implementations of \textit{all the vertical derivatives} of 311 the discrete equations given in this manual in order to accommodate the opposing vertical index directions in implementation and documentation. 270 312 271 313 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 276 318 \protect\label{fig:index_vert} 277 319 Vertical integer indexing used in the \fortran code. 278 Note that the $k$-axis is orient ated downward.279 The dashed area indicates the cell in which variables contained in arrays have the same$k$-index.320 Note that the $k$-axis is oriented downward. 321 The dashed area indicates the cell in which variables contained in arrays have a common $k$-index. 280 322 } 281 323 \end{center} … … 283 325 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 284 326 327 % ------------------------------------------------------------------------------------------------------------- 328 % Domain configuration 329 % ------------------------------------------------------------------------------------------------------------- 330 \section{Spatial domain configuration} 331 \label{subsec:DOM_config} 332 333 \nlst{namcfg} 334 335 Two typical methods are available to specify the spatial domain 336 configuration; they can be selected using parameter \np{ln\_read\_cfg} 337 parameter in namelist \ngn{namcfg}. 338 339 If \np{ln\_read\_cfg} is set to \forcode{.true.}, the domain-specific parameters 340 and fields are read from a netCDF input file, whose name (without its .nc 341 suffix) can be specified as the value of the \np{cn\_domcfg} parameter in 342 namelist \ngn{namcfg}. 343 344 If \np{ln\_read\_cfg} is set to \forcode{.false.}, the domain-specific 345 parameters and fields can be provided (\eg analytically computed) by subroutines 346 \mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}. These subroutines can be supplied in 347 the \path{MY_SRC} directory of the configuration, and default versions that 348 configure the spatial domain for the GYRE reference configuration are present in 349 the \path{src/OCE/USR} directory. 350 351 In version 4.0 there are no longer any options for reading complex bathmetries and 352 performing a vertical discretization at run-time. Whilst it is occasionally convenient 353 to have a common bathymetry file and, for example, to run similar models with and 354 without partial bottom boxes and/or sigma-coordinates, supporting such choices leads to 355 overly complex code. Worse still is the difficulty of ensuring the model configurations 356 intended to be identical are indeed so when the model domain itself can be altered by runtime 357 selections. The code previously used to perform vertical discretization has be incorporated 358 into an external tool (\path{tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMAINcfg}. 359 360 The next subsections summarise the parameter and fields related to the 361 configuration of the whole model domain. These represent the minimum information 362 that must be provided either via the \np{cn\_domcfg} file or set by code 363 inserted into user-supplied versions of the \mdl{usrdef\_*} subroutines. The 364 requirements are presented in three sections: the domain size 365 (\autoref{subsec:DOM_size}), the horizontal mesh 366 (\autoref{subsec:DOM_hgr}), and the vertical grid 367 (\autoref{subsec:DOM_zgr}). 368 285 369 % ----------------------------------- 286 370 % Domain Size 287 371 % ----------------------------------- 288 \subs ubsection{Domain size}372 \subsection{Domain size} 289 373 \label{subsec:DOM_size} 290 374 291 The total size of the computational domain is set by the parameters \np{jpiglo}, 292 \np{jpjglo} and \np{jpkglo} in the $i$, $j$ and $k$ directions respectively. 293 Parameters $jpi$ and $jpj$ refer to the size of each processor subdomain when 294 the code is run in parallel using domain decomposition (\key{mpp\_mpi} defined, 295 see \autoref{sec:LBC_mpp}). 296 297 % ================================================================ 298 % Domain: List of fields needed 299 % ================================================================ 300 \section{Needed fields} 301 \label{sec:DOM_fields} 302 The ocean mesh (\ie the position of all the scalar and vector points) is defined by the transformation that 303 gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 304 The grid-points are located at integer or integer and a half values of as indicated in \autoref{tab:cell}. 305 The associated scale factors are defined using the analytical first derivative of the transformation 306 \autoref{eq:scale_factors}. 307 Necessary fields for configuration definition are: 308 309 \begin{itemize} 310 \item 311 Geographic position: 312 longitude with \texttt{glamt}, \texttt{glamu}, \texttt{glamv}, \texttt{glamf} and 313 latitude with \texttt{gphit}, \texttt{gphiu}, \texttt{gphiv}, \texttt{gphif} 314 (all respectively at T, U, V and F point) 315 \item 316 Coriolis parameter (if domain not on the sphere): \texttt{ff\_f} and \texttt{ff\_t} 317 (at T and F point) 318 \item 319 Scale factors: 320 \texttt{e1t}, \texttt{e1u}, \texttt{e1v} and \texttt{e1f} (on i direction), 321 \texttt{e2t}, \texttt{e2u}, \texttt{e2v} and \texttt{e2f} (on j direction) and 322 \texttt{ie1e2u\_v}, \texttt{e1e2u}, \texttt{e1e2v}. \\ 323 \texttt{e1e2u}, \texttt{e1e2v} are u and v surfaces (if gridsize reduction in some straits), 324 \texttt{ie1e2u\_v} is to flag set u and v surfaces are neither read nor computed. 325 \end{itemize} 326 327 These fields can be read in an domain input file which name is setted in \np{cn\_domcfg} parameter specified in 328 \ngn{namcfg}. 329 330 \nlst{namcfg} 331 332 Or they can be defined in an analytical way in \path{MY_SRC} directory of the configuration. 333 For Reference Configurations of NEMO input domain files are supplied by NEMO System Team. 334 For analytical definition of input fields two routines are supplied: \mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}. 335 They are an example of GYRE configuration parameters, and they are available in \path{src/OCE/USR} directory, 336 they provide the horizontal and vertical mesh. 337 % ------------------------------------------------------------------------------------------------------------- 338 % Needed fields 339 % ------------------------------------------------------------------------------------------------------------- 340 %\subsection{List of needed fields to build DOMAIN} 341 %\label{subsec:DOM_fields_list} 342 375 The total size of the computational domain is set by the parameters 376 \np{jpiglo}, \np{jpjglo} and \np{jpkglo} for the $i$, $j$ and $k$ 377 directions, respectively. Note, that the variables \forcode{jpi} and \forcode{jpj} 378 refer to the size of each processor subdomain when the code is run in 379 parallel using domain decomposition (\key{mpp\_mpi} defined, see 380 \autoref{sec:LBC_mpp}). 381 382 The name of the configuration is set through parameter \np{cn\_cfg}, 383 and the nominal resolution through parameter \np{nn\_cfg} (unless in 384 the input file both of variables \forcode{ORCA} and \forcode{ORCA_index} 385 are present, in which case \np{cn\_cfg} and \np{nn\_cfg} are set from these 386 values accordingly). 387 388 The global lateral boundary condition type is selected from 8 options 389 using parameter \np{jperio}. See \autoref{sec:LBC_jperio} for 390 details on the available options and the corresponding values for 391 \np{jperio}. 343 392 344 393 % ================================================================ 345 394 % Domain: Horizontal Grid (mesh) 346 395 % ================================================================ 347 \section[Horizontal grid mesh (\textit{domhgr.F90})] 348 {Horizontal grid mesh (\protect\mdl{domhgr})} 349 \label{sec:DOM_hgr} 350 351 % ------------------------------------------------------------------------------------------------------------- 352 % Coordinates and scale factors 353 % ------------------------------------------------------------------------------------------------------------- 354 \subsection{Coordinates and scale factors} 355 \label{subsec:DOM_hgr_coord_e} 356 357 The ocean mesh (\ie the position of all the scalar and vector points) is defined by 358 the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 359 The grid-points are located at integer or integer and a half values of as indicated in \autoref{tab:cell}. 360 The associated scale factors are defined using the analytical first derivative of the transformation 361 \autoref{eq:scale_factors}. 362 These definitions are done in two modules, \mdl{domhgr} and \mdl{domzgr}, 363 which provide the horizontal and vertical meshes, respectively. 364 This section deals with the horizontal mesh parameters. 365 366 In a horizontal plane, the location of all the model grid points is defined from 367 the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$. 368 The horizontal scale factors are calculated using \autoref{eq:scale_factors}. 369 For example, when the longitude and latitude are function of a single value 370 ($i$ and $j$, respectively) (geographical configuration of the mesh), 371 the horizontal mesh definition reduces to define the wanted $\lambda(i)$, $\varphi(j)$, 372 and their derivatives $\lambda'(i) \ \varphi'(j)$ in the \mdl{domhgr} module. 373 The model computes the grid-point positions and scale factors in the horizontal plane as follows: 374 \begin{align*} 375 \lambda_t &\equiv \text{glamt} = \lambda (i ) 376 &\varphi_t &\equiv \text{gphit} = \varphi (j ) \\ 377 \lambda_u &\equiv \text{glamu} = \lambda (i + 1/2) 378 &\varphi_u &\equiv \text{gphiu} = \varphi (j ) \\ 379 \lambda_v &\equiv \text{glamv} = \lambda (i ) 380 &\varphi_v &\equiv \text{gphiv} = \varphi (j + 1/2) \\ 381 \lambda_f &\equiv \text{glamf} = \lambda (i + 1/2) 382 &\varphi_f &\equiv \text{gphif} = \varphi (j + 1/2) \\ 383 e_{1t} &\equiv \text{e1t} = r_a |\lambda'(i ) \; \cos\varphi(j ) | 384 &e_{2t} &\equiv \text{e2t} = r_a |\varphi'(j ) | \\ 385 e_{1u} &\equiv \text{e1t} = r_a |\lambda'(i + 1/2) \; \cos\varphi(j ) | 386 &e_{2u} &\equiv \text{e2t} = r_a |\varphi'(j ) | \\ 387 e_{1v} &\equiv \text{e1t} = r_a |\lambda'(i ) \; \cos\varphi(j + 1/2) | 388 &e_{2v} &\equiv \text{e2t} = r_a |\varphi'(j + 1/2) | \\ 389 e_{1f} &\equiv \text{e1t} = r_a |\lambda'(i + 1/2) \; \cos\varphi(j + 1/2) | 390 &e_{2f} &\equiv \text{e2t} = r_a |\varphi'(j + 1/2) | 391 \end{align*} 392 where the last letter of each computational name indicates the grid point considered and 393 $r_a$ is the earth radius (defined in \mdl{phycst} along with all universal constants). 394 Note that the horizontal position of and scale factors at $w$-points are exactly equal to those of $t$-points, 395 thus no specific arrays are defined at $w$-points. 396 397 Note that the definition of the scale factors 398 (\ie as the analytical first derivative of the transformation that 399 gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$) 400 is specific to the \NEMO model \citep{marti.madec.ea_JGR92}. 401 As an example, $e_{1t}$ is defined locally at a $t$-point, 402 whereas many other models on a C grid choose to define such a scale factor as 403 the distance between the $U$-points on each side of the $t$-point. 404 Relying on an analytical transformation has two advantages: 405 firstly, there is no ambiguity in the scale factors appearing in the discrete equations, 406 since they are first introduced in the continuous equations; 407 secondly, analytical transformations encourage good practice by the definition of smoothly varying grids 408 (rather than allowing the user to set arbitrary jumps in thickness between adjacent layers) \citep{treguier.dukowicz.ea_JGR96}. 409 An example of the effect of such a choice is shown in \autoref{fig:zgr_e3}. 410 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 411 \begin{figure}[!t] 412 \begin{center} 413 \includegraphics[width=\textwidth]{Fig_zgr_e3} 414 \caption{ 415 \protect\label{fig:zgr_e3} 416 Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, 417 and (b) analytically derived grid-point position and scale factors. 418 For both grids here, the same $w$-point depth has been chosen but 419 in (a) the $t$-points are set half way between $w$-points while 420 in (b) they are defined from an analytical function: 421 $z(k) = 5 \, (k - 1/2)^3 - 45 \, (k - 1/2)^2 + 140 \, (k - 1/2) - 150$. 422 Note the resulting difference between the value of the grid-size $\Delta_k$ and 423 those of the scale factor $e_k$. 424 } 425 \end{center} 426 \end{figure} 427 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 428 429 % ------------------------------------------------------------------------------------------------------------- 430 % Choice of horizontal grid 431 % ------------------------------------------------------------------------------------------------------------- 432 \subsection{Choice of horizontal grid} 433 \label{subsec:DOM_hgr_msh_choice} 434 435 % ------------------------------------------------------------------------------------------------------------- 436 % Grid files 437 % ------------------------------------------------------------------------------------------------------------- 438 \subsection{Output grid files} 439 \label{subsec:DOM_hgr_files} 440 441 All the arrays relating to a particular ocean model configuration (grid-point position, scale factors, masks) 442 can be saved in files if \np{nn\_msh} $\not = 0$ (namelist variable in \ngn{namdom}). 443 This can be particularly useful for plots and off-line diagnostics. 444 In some cases, the user may choose to make a local modification of a scale factor in the code. 445 This is the case in global configurations when restricting the width of a specific strait 446 (usually a one-grid-point strait that happens to be too wide due to insufficient model resolution). 447 An example is Gibraltar Strait in the ORCA2 configuration. 448 When such modifications are done, 449 the output grid written when \np{nn\_msh} $\not = 0$ is no more equal to the input grid. 396 \subsection{Horizontal grid mesh (\protect\mdl{domhgr})} 397 \label{subsec:DOM_hgr} 398 399 % ================================================================ 400 % Domain: List of hgr-related fields needed 401 % ================================================================ 402 \subsubsection{Required fields} 403 \label{sec:DOM_hgr_fields} 404 The explicit specification of a range of mesh-related fields are required for the definition of a configuration. These include: 405 406 \begin{Verbatim}[fontsize=\tiny] 407 int jpiglo, jpjglo, jpkglo /* global domain sizes */ 408 int jperio /* lateral global domain b.c. */ 409 double glamt, glamu, glamv, glamf /* geographic longitude (t,u,v and f points respectively) */ 410 double gphit, gphiu, gphiv, gphif /* geographic latitude */ 411 double e1t, e1u, e1v, e1f /* horizontal scale factors */ 412 double e2t, e2u, e2v, e2f /* horizontal scale factors */ 413 \end{Verbatim} 414 415 The values of the geographic longitude and latitude arrays at indices $i,j$ correspond to the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$, evaluated at the values as specified in Table \autoref{tab:cell} for the respective grid-point position. The calculation of the values of the horizontal scale factor arrays in general additionally involves partial derivatives of $\lambda$ and $\varphi$ with respect to $i$ and $j$, evaluated for the same arguments as $\lambda$ and $\varphi$. 416 417 \subsubsection{Optional fields} 418 \begin{Verbatim}[fontsize=\tiny] 419 /* Optional: */ 420 int ORCA, ORCA_index /* configuration name, configuration resolution */ 421 double e1e2u, e1e2v /* U and V surfaces (if grid size reduction in some straits) */ 422 double ff_f, ff_t /* Coriolis parameter (if not on the sphere) */ 423 \end{Verbatim} 424 425 NEMO can support the local reduction of key strait widths by altering individual values of 426 e2u or e1v at the appropriate locations. This is particularly useful for locations such as 427 Gibraltar or Indonesian Throughflow pinch-points (see \autoref{sec:MISC_strait} for 428 illustrated examples). The key is to reduce the faces of $T$-cell (\ie change the value of 429 the horizontal scale factors at $u$- or $v$-point) but not the volume of the cells. Doing 430 otherwise can lead to numerical instability issues. In normal operation the surface areas 431 are computed from $\texttt{e1u} * \texttt{e2u}$ and $\texttt{e1v} * \texttt{e2v}$ but in 432 cases where a gridsize reduction is required, the unaltered surface areas at $u$ and $v$ 433 grid points (\texttt{e1e2u} and \texttt{e1e2v}, respectively) must be read or pre-computed 434 in \mdl{usrdef\_hgr}. If these arrays are present in the \np{cn\_domcfg} file they are 435 read and the internal computation is suppressed. Versions of \mdl{usrdef\_hgr} which set 436 their own values of \texttt{e1e2u} and \texttt{e1e2v} should set the surface-area 437 computation flag: \texttt{ie1e2u\_v} to a non-zero value to suppress their re-computation. 438 439 \smallskip 440 Similar logic applies to the other optional fields: \texttt{ff\_f} and \texttt{ff\_t} 441 which can be used to provide the Coriolis parameter at F- and T-points respectively if the 442 mesh is not on a sphere. If present these fields will be read and used and the normal 443 calculation ($2*\Omega*\sin(\varphi)$) suppressed. Versions of \mdl{usrdef\_hgr} which set 444 their own values of \texttt{ff\_f} and \texttt{ff\_t} should set the Coriolis computation 445 flag: \texttt{iff} to a non-zero value to suppress their re-computation. 446 447 Note that longitudes, latitudes, and scale factors at $w$ points are exactly 448 equal to those of $t$ points, thus no specific arrays are defined at $w$ points. 449 450 450 451 451 % ================================================================ 452 452 % Domain: Vertical Grid (domzgr) 453 453 % ================================================================ 454 \s ection[Vertical grid (\textit{domzgr.F90})]454 \subsection[Vertical grid (\textit{domzgr.F90})] 455 455 {Vertical grid (\protect\mdl{domzgr})} 456 \label{sec:DOM_zgr} 457 %-----------------------------------------nam_zgr & namdom------------------------------------------- 458 % 459 %\nlst{namzgr} 460 461 \nlst{namdom} 456 \label{subsec:DOM_zgr} 457 %-----------------------------------------namdom------------------------------------------- 458 \nlst{namdom} 462 459 %------------------------------------------------------------------------------------------------------------- 463 460 464 Variables are defined through the \ngn{namzgr} and \ngn{namdom} namelists.465 461 In the vertical, the model mesh is determined by four things: 466 (1) the bathymetry given in meters; 467 (2) the number of levels of the model (\jp{jpk}); 468 (3) the analytical transformation $z(i,j,k)$ and the vertical scale factors (derivatives of the transformation); and 469 (4) the masking system, \ie the number of wet model levels at each 470 $(i,j)$ column of points. 462 \begin{enumerate} 463 \item the bathymetry given in meters; 464 \item the number of levels of the model (\jp{jpk}); 465 \item the analytical transformation $z(i,j,k)$ and the vertical scale factors (derivatives of the transformation); and 466 \item the masking system, \ie the number of wet model levels at each 467 $(i,j)$ location of the horizontal grid. 468 \end{enumerate} 471 469 472 470 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 489 487 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 490 488 491 The choice of a vertical coordinate, even if it is made through \ngn{namzgr} namelist parameters, 492 must be done once of all at the beginning of an experiment. 493 It is not intended as an option which can be enabled or disabled in the middle of an experiment. 494 Three main choices are offered (\autoref{fig:z_zps_s_sps}): 495 $z$-coordinate with full step bathymetry (\np{ln\_zco}\forcode{ = .true.}), 496 $z$-coordinate with partial step bathymetry (\np{ln\_zps}\forcode{ = .true.}), 497 or generalized, $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}). 498 Hybridation of the three main coordinates are available: 499 $s-z$ or $s-zps$ coordinate (\autoref{fig:z_zps_s_sps} and \autoref{fig:z_zps_s_sps}). 500 By default a non-linear free surface is used: the coordinate follow the time-variation of the free surface so that 501 the transformation is time dependent: $z(i,j,k,t)$ (\autoref{fig:z_zps_s_sps}). 502 When a linear free surface is assumed (\np{ln\_linssh}\forcode{ = .true.}), 503 the vertical coordinate are fixed in time, but the seawater can move up and down across the $z_0$ surface 504 (in other words, the top of the ocean in not a rigid-lid). 505 The last choice in terms of vertical coordinate concerns the presence (or not) in 506 the model domain of ocean cavities beneath ice shelves. 507 Setting \np{ln\_isfcav} to true allows to manage ocean cavities, otherwise they are filled in. 508 This option is currently only available in $z$- or $zps$-coordinate, 509 and partial step are also applied at the ocean/ice shelf interface. 510 511 Contrary to the horizontal grid, the vertical grid is computed in the code and no provision is made for 512 reading it from a file. 513 The only input file is the bathymetry (in meters) (\ifile{bathy\_meter}) 514 \footnote{ 515 N.B. in full step $z$-coordinate, a \ifile{bathy\_level} file can replace the \ifile{bathy\_meter} file, 516 so that the computation of the number of wet ocean point in each water column is by-passed}. 517 If \np{ln\_isfcav}\forcode{ = .true.}, an extra file input file (\ifile{isf\_draft\_meter}) describing 518 the ice shelf draft (in meters) is needed. 519 520 After reading the bathymetry, the algorithm for vertical grid definition differs between the different options: 521 \begin{description} 522 \item[\textit{zco}] 523 set a reference coordinate transformation $z_0(k)$, and set $z(i,j,k,t) = z_0(k)$. 524 \item[\textit{zps}] 525 set a reference coordinate transformation $z_0(k)$, and calculate the thickness of the deepest level at 526 each $(i,j)$ point using the bathymetry, to obtain the final three-dimensional depth and scale factor arrays. 527 \item[\textit{sco}] 528 smooth the bathymetry to fulfill the hydrostatic consistency criteria and 529 set the three-dimensional transformation. 530 \item[\textit{s-z} and \textit{s-zps}] 531 smooth the bathymetry to fulfill the hydrostatic consistency criteria and 532 set the three-dimensional transformation $z(i,j,k)$, 533 and possibly introduce masking of extra land points to better fit the original bathymetry file. 534 \end{description} 535 %%% 536 \gmcomment{ add the description of the smoothing: envelop topography...} 537 %%% 538 539 Unless a linear free surface is used (\np{ln\_linssh}\forcode{ = .false.}), 540 the arrays describing the grid point depths and vertical scale factors are three set of 541 three dimensional arrays $(i,j,k)$ defined at \textit{before}, \textit{now} and \textit{after} time step. 542 The time at which they are defined is indicated by a suffix: $\_b$, $\_n$, or $\_a$, respectively. 543 They are updated at each model time step using a fixed reference coordinate system which 544 computer names have a $\_0$ suffix. 545 When the linear free surface option is used (\np{ln\_linssh}\forcode{ = .true.}), \textit{before}, 546 \textit{now} and \textit{after} arrays are simply set one for all to their reference counterpart. 547 548 % ------------------------------------------------------------------------------------------------------------- 549 % Meter Bathymetry 550 % ------------------------------------------------------------------------------------------------------------- 551 \subsection{Meter bathymetry} 552 \label{subsec:DOM_bathy} 553 554 Three options are possible for defining the bathymetry, according to the namelist variable \np{nn\_bathy} 555 (found in \ngn{namdom} namelist): 556 \begin{description} 557 \item[\np{nn\_bathy}\forcode{ = 0}]: 558 a flat-bottom domain is defined. 559 The total depth $z_w (jpk)$ is given by the coordinate transformation. 560 The domain can either be a closed basin or a periodic channel depending on the parameter \np{jperio}. 561 \item[\np{nn\_bathy}\forcode{ = -1}]: 562 a domain with a bump of topography one third of the domain width at the central latitude. 563 This is meant for the "EEL-R5" configuration, a periodic or open boundary channel with a seamount. 564 \item[\np{nn\_bathy}\forcode{ = 1}]: 565 read a bathymetry and ice shelf draft (if needed). 566 The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) at 567 each grid point of the model grid. 568 The bathymetry is usually built by interpolating a standard bathymetry product (\eg ETOPO2) onto 569 the horizontal ocean mesh. 570 Defining the bathymetry also defines the coastline: where the bathymetry is zero, 571 no model levels are defined (all levels are masked). 572 573 The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) at 574 each grid point of the model grid. 575 This file is only needed if \np{ln\_isfcav}\forcode{ = .true.}. 576 Defining the ice shelf draft will also define the ice shelf edge and the grounding line position. 577 \end{description} 578 579 When a global ocean is coupled to an atmospheric model it is better to represent all large water bodies 580 (\eg great lakes, Caspian sea...) even if the model resolution does not allow their communication with 581 the rest of the ocean. 582 This is unnecessary when the ocean is forced by fixed atmospheric conditions, 583 so these seas can be removed from the ocean domain. 584 The user has the option to set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}), 585 but the code has to be adapted to the user's configuration. 586 587 % ------------------------------------------------------------------------------------------------------------- 588 % z-coordinate and reference coordinate transformation 589 % ------------------------------------------------------------------------------------------------------------- 590 \subsection[$Z$-coordinate (\forcode{ln_zco = .true.}) and ref. coordinate] 591 {$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and reference coordinate} 592 \label{subsec:DOM_zco} 593 594 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 595 \begin{figure}[!tb] 596 \begin{center} 597 \includegraphics[width=\textwidth]{Fig_zgr} 598 \caption{ 599 \protect\label{fig:zgr} 600 Default vertical mesh for ORCA2: 30 ocean levels (L30). 601 Vertical level functions for (a) T-point depth and (b) the associated scale factor as computed from 602 \autoref{eq:DOM_zgr_ana_1} using \autoref{eq:DOM_zgr_coef} in $z$-coordinate. 603 } 604 \end{center} 605 \end{figure} 606 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 607 608 The reference coordinate transformation $z_0(k)$ defines the arrays $gdept_0$ and $gdepw_0$ for $t$- and $w$-points, 609 respectively. 610 As indicated on \autoref{fig:index_vert} \jp{jpk} is the number of $w$-levels. 611 $gdepw_0(1)$ is the ocean surface. 612 There are at most \jp{jpk}-1 $t$-points inside the ocean, 613 the additional $t$-point at $jk = jpk$ is below the sea floor and is not used. 614 The vertical location of $w$- and $t$-levels is defined from the analytic expression of the depth $z_0(k)$ whose 615 analytical derivative with respect to $k$ provides the vertical scale factors. 616 The user must provide the analytical expression of both $z_0$ and its first derivative with respect to $k$. 617 This is done in routine \mdl{domzgr} through statement functions, 618 using parameters provided in the \ngn{namcfg} namelist. 619 620 It is possible to define a simple regular vertical grid by giving zero stretching (\np{ppacr}\forcode{ = 0}). 621 In that case, the parameters \jp{jpk} (number of $w$-levels) and 622 \np{pphmax} (total ocean depth in meters) fully define the grid. 623 624 For climate-related studies it is often desirable to concentrate the vertical resolution near the ocean surface. 625 The following function is proposed as a standard for a $z$-coordinate (with either full or partial steps): 626 \begin{gather} 627 \label{eq:DOM_zgr_ana_1} 628 z_0 (k) = h_{sur} - h_0 \; k - \; h_1 \; \log \big[ \cosh ((k - h_{th}) / h_{cr}) \big] \\ 629 e_3^0(k) = \lt| - h_0 - h_1 \; \tanh \big[ (k - h_{th}) / h_{cr} \big] \rt| 630 \end{gather} 631 where $k = 1$ to \jp{jpk} for $w$-levels and $k = 1$ to $k = 1$ for $T-$levels. 632 Such an expression allows us to define a nearly uniform vertical location of levels at the ocean top and bottom with 633 a smooth hyperbolic tangent transition in between (\autoref{fig:zgr}). 634 635 If the ice shelf cavities are opened (\np{ln\_isfcav}\forcode{ = .true.}), the definition of $z_0$ is the same. 636 However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to: 637 \begin{equation} 638 \label{eq:DOM_zgr_ana_2} 639 \begin{split} 640 e_3^T(k) &= z_W (k + 1) - z_W (k ) \\ 641 e_3^W(k) &= z_T (k ) - z_T (k - 1) 642 \end{split} 643 \end{equation} 644 This formulation decrease the self-generated circulation into the ice shelf cavity 645 (which can, in extreme case, leads to blow up).\\ 646 647 The most used vertical grid for ORCA2 has $10~m$ ($500~m$) resolution in the surface (bottom) layers and 648 a depth which varies from 0 at the sea surface to a minimum of $-5000~m$. 649 This leads to the following conditions: 650 \begin{equation} 651 \label{eq:DOM_zgr_coef} 652 \begin{array}{ll} 653 e_3 (1 + 1/2) = 10. & z(1 ) = 0. \\ 654 e_3 (jpk - 1/2) = 500. & z(jpk) = -5000. 655 \end{array} 656 \end{equation} 657 658 With the choice of the stretching $h_{cr} = 3$ and the number of levels \jp{jpk}~$= 31$, 659 the four coefficients $h_{sur}$, $h_0$, $h_1$, and $h_{th}$ in 660 \autoref{eq:DOM_zgr_ana_2} have been determined such that 661 \autoref{eq:DOM_zgr_coef} is satisfied, through an optimisation procedure using a bisection method. 662 For the first standard ORCA2 vertical grid this led to the following values: 663 $h_{sur} = 4762.96$, $h_0 = 255.58, h_1 = 245.5813$, and $h_{th} = 21.43336$. 664 The resulting depths and scale factors as a function of the model levels are shown in 665 \autoref{fig:zgr} and given in \autoref{tab:orca_zgr}. 666 Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \ngn{namcfg} namelist. 667 668 Rather than entering parameters $h_{sur}$, $h_0$, and $h_1$ directly, it is possible to recalculate them. 669 In that case the user sets \np{ppsur}~$=$~\np{ppa0}~$=$~\np{ppa1}~$= 999999$., 670 in \ngn{namcfg} namelist, and specifies instead the four following parameters: 489 The choice of a vertical coordinate is made when setting up the configuration; 490 it is not intended to be an option which can be changed in the middle of an 491 experiment. The one exception to this statement being the choice of linear or 492 non-linear free surface. In v4.0 the linear free surface option is implemented 493 as a special case of the non-linear free surface. This is computationally 494 wasteful since it uses the structures for time-varying 3D metrics for fields 495 that (in the linear free surface case) are fixed. However, the linear 496 free-surface is rarely used and implementing it this way means a single configuration 497 file can support both options. 498 499 By default a non-linear free surface is used (\np{ln\_linssh} set to \forcode{ = 500 .false.} in \ngn{namdom}): the coordinate follow the time-variation of the free 501 surface so that the transformation is time dependent: $z(i,j,k,t)$ 502 (\eg \autoref{fig:z_zps_s_sps}f). When a linear free surface is assumed 503 (\np{ln\_linssh} set to \forcode{ = .true.} in \ngn{namdom}), the vertical 504 coordinates are fixed in time, but the seawater can move up and down across the 505 $z_0$ surface (in other words, the top of the ocean in not a rigid lid). 506 507 Note that settings: \np{ln\_zco}, \np{ln\_zps}, \np{ln\_sco} and \np{ln\_isfcav} mentioned 508 in the following sections appear to be namelist options but they are no longer truly 509 namelist options for NEMO. Their value is written to and read from the domain configuration file 510 and they should be treated as fixed parameters for a particular configuration. They are 511 namelist options for the \forcode{DOMAINcfg} tool that can be used to build the 512 configuration file and serve both to provide a record of the choices made whilst building the 513 configuration and to trigger appropriate code blocks within NEMO. 514 These values should not be altered in the \np{cn\_domcfg} file. 515 516 \medskip 517 The decision on these choices must be made when the \np{cn\_domcfg} file is constructed. 518 Three main choices are offered (\autoref{fig:z_zps_s_sps}a-c): 519 671 520 \begin{itemize} 672 \item 673 \np{ppacr}~$= h_{cr}$: stretching factor (nondimensional). 674 The larger \np{ppacr}, the smaller the stretching. 675 Values from $3$ to $10$ are usual. 676 \item 677 \np{ppkth}~$= h_{th}$: is approximately the model level at which maximum stretching occurs 678 (nondimensional, usually of order 1/2 or 2/3 of \jp{jpk}) 679 \item 680 \np{ppdzmin}: minimum thickness for the top layer (in meters). 681 \item 682 \np{pphmax}: total depth of the ocean (meters). 521 \item $z$-coordinate with full step bathymetry (\np{ln\_zco}\forcode{ = .true.}), 522 \item $z$-coordinate with partial step ($zps$) bathymetry (\np{ln\_zps}\forcode{ = .true.}), 523 \item Generalized, $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}). 683 524 \end{itemize} 684 As an example, for the $45$ layers used in the DRAKKAR configuration those parameters are: 685 \jp{jpk}~$= 46$, \np{ppacr}~$= 9$, \np{ppkth}~$= 23.563$, \np{ppdzmin}~$= 6~m$, \np{pphmax}~$= 5750~m$. 686 687 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 688 \begin{table} 689 \begin{center} 690 \begin{tabular}{c||r|r|r|r} 691 \hline 692 \textbf{LEVEL} & \textbf{gdept\_1d} & \textbf{gdepw\_1d} & \textbf{e3t\_1d } & \textbf{e3w\_1d} \\ 693 \hline 694 1 & \textbf{ 5.00} & 0.00 & \textbf{ 10.00} & 10.00 \\ 695 \hline 696 2 & \textbf{ 15.00} & 10.00 & \textbf{ 10.00} & 10.00 \\ 697 \hline 698 3 & \textbf{ 25.00} & 20.00 & \textbf{ 10.00} & 10.00 \\ 699 \hline 700 4 & \textbf{ 35.01} & 30.00 & \textbf{ 10.01} & 10.00 \\ 701 \hline 702 5 & \textbf{ 45.01} & 40.01 & \textbf{ 10.01} & 10.01 \\ 703 \hline 704 6 & \textbf{ 55.03} & 50.02 & \textbf{ 10.02} & 10.02 \\ 705 \hline 706 7 & \textbf{ 65.06} & 60.04 & \textbf{ 10.04} & 10.03 \\ 707 \hline 708 8 & \textbf{ 75.13} & 70.09 & \textbf{ 10.09} & 10.06 \\ 709 \hline 710 9 & \textbf{ 85.25} & 80.18 & \textbf{ 10.17} & 10.12 \\ 711 \hline 712 10 & \textbf{ 95.49} & 90.35 & \textbf{ 10.33} & 10.24 \\ 713 \hline 714 11 & \textbf{ 105.97} & 100.69 & \textbf{ 10.65} & 10.47 \\ 715 \hline 716 12 & \textbf{ 116.90} & 111.36 & \textbf{ 11.27} & 10.91 \\ 717 \hline 718 13 & \textbf{ 128.70} & 122.65 & \textbf{ 12.47} & 11.77 \\ 719 \hline 720 14 & \textbf{ 142.20} & 135.16 & \textbf{ 14.78} & 13.43 \\ 721 \hline 722 15 & \textbf{ 158.96} & 150.03 & \textbf{ 19.23} & 16.65 \\ 723 \hline 724 16 & \textbf{ 181.96} & 169.42 & \textbf{ 27.66} & 22.78 \\ 725 \hline 726 17 & \textbf{ 216.65} & 197.37 & \textbf{ 43.26} & 34.30 \\ 727 \hline 728 18 & \textbf{ 272.48} & 241.13 & \textbf{ 70.88} & 55.21 \\ 729 \hline 730 19 & \textbf{ 364.30} & 312.74 & \textbf{ 116.11} & 90.99 \\ 731 \hline 732 20 & \textbf{ 511.53} & 429.72 & \textbf{ 181.55} & 146.43 \\ 733 \hline 734 21 & \textbf{ 732.20} & 611.89 & \textbf{ 261.03} & 220.35 \\ 735 \hline 736 22 & \textbf{ 1033.22} & 872.87 & \textbf{ 339.39} & 301.42 \\ 737 \hline 738 23 & \textbf{ 1405.70} & 1211.59 & \textbf{ 402.26} & 373.31 \\ 739 \hline 740 24 & \textbf{ 1830.89} & 1612.98 & \textbf{ 444.87} & 426.00 \\ 741 \hline 742 25 & \textbf{ 2289.77} & 2057.13 & \textbf{ 470.55} & 459.47 \\ 743 \hline 744 26 & \textbf{ 2768.24} & 2527.22 & \textbf{ 484.95} & 478.83 \\ 745 \hline 746 27 & \textbf{ 3257.48} & 3011.90 & \textbf{ 492.70} & 489.44 \\ 747 \hline 748 28 & \textbf{ 3752.44} & 3504.46 & \textbf{ 496.78} & 495.07 \\ 749 \hline 750 29 & \textbf{ 4250.40} & 4001.16 & \textbf{ 498.90} & 498.02 \\ 751 \hline 752 30 & \textbf{ 4749.91} & 4500.02 & \textbf{ 500.00} & 499.54 \\ 753 \hline 754 31 & \textbf{ 5250.23} & 5000.00 & \textbf{ 500.56} & 500.33 \\ 755 \hline 756 \end{tabular} 757 \end{center} 758 \caption{ 759 \protect\label{tab:orca_zgr} 760 Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as computed from 761 \autoref{eq:DOM_zgr_ana_2} using the coefficients given in \autoref{eq:DOM_zgr_coef} 762 } 763 \end{table} 764 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 765 766 % ------------------------------------------------------------------------------------------------------------- 767 % z-coordinate with partial step 768 % ------------------------------------------------------------------------------------------------------------- 769 \subsection[$Z$-coordinate with partial step (\forcode{ln_zps = .true.})] 770 {$Z$-coordinate with partial step (\protect\np{ln\_zps}\forcode{ = .true.})} 771 \label{subsec:DOM_zps} 772 %--------------------------------------------namdom------------------------------------------------------- 773 774 \nlst{namdom} 775 %-------------------------------------------------------------------------------------------------------------- 776 777 In $z$-coordinate partial step, 778 the depths of the model levels are defined by the reference analytical function $z_0(k)$ as described in 779 the previous section, \textit{except} in the bottom layer. 780 The thickness of the bottom layer is allowed to vary as a function of geographical location $(\lambda,\varphi)$ to 781 allow a better representation of the bathymetry, especially in the case of small slopes 782 (where the bathymetry varies by less than one level thickness from one grid point to the next). 783 The reference layer thicknesses $e_{3t}^0$ have been defined in the absence of bathymetry. 784 With partial steps, layers from 1 to \jp{jpk}-2 can have a thickness smaller than $e_{3t}(jk)$. 785 The model deepest layer (\jp{jpk}-1) is allowed to have either a smaller or larger thickness than $e_{3t}(jpk)$: 786 the maximum thickness allowed is $2*e_{3t}(jpk - 1)$. 787 This has to be kept in mind when specifying values in \ngn{namdom} namelist, 788 as the maximum depth \np{pphmax} in partial steps: 789 for example, with \np{pphmax}~$= 5750~m$ for the DRAKKAR 45 layer grid, 790 the maximum ocean depth allowed is actually $6000~m$ (the default thickness $e_{3t}(jpk - 1)$ being $250~m$). 791 Two variables in the namdom namelist are used to define the partial step vertical grid. 792 The mimimum water thickness (in meters) allowed for a cell partially filled with bathymetry at level jk is 793 the minimum of \np{rn\_e3zps\_min} (thickness in meters, usually $20~m$) or $e_{3t}(jk)*$\np{rn\_e3zps\_rat} 794 (a fraction, usually 10\%, of the default thickness $e_{3t}(jk)$). 795 796 \gmcomment{ \colorbox{yellow}{Add a figure here of pstep especially at last ocean level } } 797 798 % ------------------------------------------------------------------------------------------------------------- 799 % s-coordinate 800 % ------------------------------------------------------------------------------------------------------------- 801 \subsection[$S$-coordinate (\forcode{ln_sco = .true.})] 802 {$S$-coordinate (\protect\np{ln\_sco}\forcode{ = .true.})} 803 \label{subsec:DOM_sco} 804 %------------------------------------------nam_zgr_sco--------------------------------------------------- 805 % 806 %\nlst{namzgr_sco} 807 %-------------------------------------------------------------------------------------------------------------- 808 Options are defined in \ngn{namzgr\_sco}. 809 In $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model levels are defined from 810 the product of a depth field and either a stretching function or its derivative, respectively: 811 812 \begin{align*} 813 % \label{eq:DOM_sco_ana} 814 z(k) &= h(i,j) \; z_0 (k) \\ 815 e_3(k) &= h(i,j) \; z_0'(k) 816 \end{align*} 817 818 where $h$ is the depth of the last $w$-level ($z_0(k)$) defined at the $t$-point location in the horizontal and 819 $z_0(k)$ is a function which varies from $0$ at the sea surface to $1$ at the ocean bottom. 820 The depth field $h$ is not necessary the ocean depth, 821 since a mixed step-like and bottom-following representation of the topography can be used 822 (\autoref{fig:z_zps_s_sps}) or an envelop bathymetry can be defined (\autoref{fig:z_zps_s_sps}). 823 The namelist parameter \np{rn\_rmax} determines the slope at which 824 the terrain-following coordinate intersects the sea bed and becomes a pseudo z-coordinate. 825 The coordinate can also be hybridised by specifying \np{rn\_sbot\_min} and \np{rn\_sbot\_max} as 826 the minimum and maximum depths at which the terrain-following vertical coordinate is calculated. 827 828 Options for stretching the coordinate are provided as examples, 829 but care must be taken to ensure that the vertical stretch used is appropriate for the application. 830 831 The original default NEMO s-coordinate stretching is available if neither of the other options are specified as true 832 (\np{ln\_s\_SH94}\forcode{ = .false.} and \np{ln\_s\_SF12}\forcode{ = .false.}). 833 This uses a depth independent $\tanh$ function for the stretching \citep{madec.delecluse.ea_JPO96}: 834 835 \[ 836 z = s_{min} + C (s) (H - s_{min}) 837 % \label{eq:SH94_1} 838 \] 839 840 where $s_{min}$ is the depth at which the $s$-coordinate stretching starts and 841 allows a $z$-coordinate to placed on top of the stretched coordinate, 842 and $z$ is the depth (negative down from the asea surface). 843 \begin{gather*} 844 s = - \frac{k}{n - 1} \quad \text{and} \quad 0 \leq k \leq n - 1 845 % \label{eq:DOM_s} 846 \\ 847 % \label{eq:DOM_sco_function} 848 C(s) = \frac{[\tanh(\theta \, (s + b)) - \tanh(\theta \, b)]}{2 \; \sinh(\theta)} 849 \end{gather*} 850 851 A stretching function, 852 modified from the commonly used \citet{song.haidvogel_JCP94} stretching (\np{ln\_s\_SH94}\forcode{ = .true.}), 853 is also available and is more commonly used for shelf seas modelling: 854 855 \[ 856 C(s) = (1 - b) \frac{\sinh(\theta s)}{\sinh(\theta)} 857 + b \frac{\tanh \lt[ \theta \lt(s + \frac{1}{2} \rt) \rt] - \tanh \lt( \frac{\theta}{2} \rt)} 858 { 2 \tanh \lt( \frac{\theta}{2} \rt)} 859 % \label{eq:SH94_2} 860 \] 861 862 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 863 \begin{figure}[!ht] 864 \begin{center} 865 \includegraphics[width=\textwidth]{Fig_sco_function} 866 \caption{ 867 \protect\label{fig:sco_function} 868 Examples of the stretching function applied to a seamount; 869 from left to right: surface, surface and bottom, and bottom intensified resolutions 870 } 871 \end{center} 872 \end{figure} 873 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 874 875 where $H_c$ is the critical depth (\np{rn\_hc}) at which the coordinate transitions from pure $\sigma$ to 876 the stretched coordinate, and $\theta$ (\np{rn\_theta}) and $b$ (\np{rn\_bb}) are the surface and 877 bottom control parameters such that $0 \leqslant \theta \leqslant 20$, and $0 \leqslant b \leqslant 1$. 878 $b$ has been designed to allow surface and/or bottom increase of the vertical resolution 879 (\autoref{fig:sco_function}). 880 881 Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows a fixed surface resolution in 882 an analytical terrain-following stretching \citet{siddorn.furner_OM13}. 883 In this case the a stretching function $\gamma$ is defined such that: 884 885 \begin{equation} 886 z = - \gamma h \quad \text{with} \quad 0 \leq \gamma \leq 1 887 % \label{eq:z} 888 \end{equation} 889 890 The function is defined with respect to $\sigma$, the unstretched terrain-following coordinate: 891 892 \begin{gather*} 893 % \label{eq:DOM_gamma_deriv} 894 \gamma = A \lt( \sigma - \frac{1}{2} (\sigma^2 + f (\sigma)) \rt) 895 + B \lt( \sigma^3 - f (\sigma) \rt) + f (\sigma) \\ 896 \intertext{Where:} 897 % \label{eq:DOM_gamma} 898 f(\sigma) = (\alpha + 2) \sigma^{\alpha + 1} - (\alpha + 1) \sigma^{\alpha + 2} 899 \quad \text{and} \quad \sigma = \frac{k}{n - 1} 900 \end{gather*} 901 902 This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of 903 the user prescribed stretching parameter $\alpha$ (\np{rn\_alpha}) that stretches towards 904 the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and 905 user prescribed surface (\np{rn\_zs}) and bottom depths. 906 The bottom cell depth in this example is given as a function of water depth: 907 908 \[ 909 % \label{eq:DOM_zb} 910 Z_b = h a + b 911 \] 912 913 where the namelist parameters \np{rn\_zb\_a} and \np{rn\_zb\_b} are $a$ and $b$ respectively. 914 915 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 916 \begin{figure}[!ht] 917 \includegraphics[width=\textwidth]{Fig_DOM_compare_coordinates_surface} 918 \caption{ 919 A comparison of the \citet{song.haidvogel_JCP94} $S$-coordinate (solid lines), 920 a 50 level $Z$-coordinate (contoured surfaces) and 921 the \citet{siddorn.furner_OM13} $S$-coordinate (dashed lines) in the surface $100~m$ for 922 a idealised bathymetry that goes from $50~m$ to $5500~m$ depth. 923 For clarity every third coordinate surface is shown. 924 } 925 \label{fig:fig_compare_coordinates_surface} 926 \end{figure} 927 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 928 929 This gives a smooth analytical stretching in computational space that is constrained to 930 given specified surface and bottom grid cell thicknesses in real space. 931 This is not to be confused with the hybrid schemes that 932 superimpose geopotential coordinates on terrain following coordinates thus 933 creating a non-analytical vertical coordinate that 934 therefore may suffer from large gradients in the vertical resolutions. 935 This stretching is less straightforward to implement than the \citet{song.haidvogel_JCP94} stretching, 936 but has the advantage of resolving diurnal processes in deep water and has generally flatter slopes. 937 938 As with the \citet{song.haidvogel_JCP94} stretching the stretch is only applied at depths greater than 939 the critical depth $h_c$. 940 In this example two options are available in depths shallower than $h_c$, 941 with pure sigma being applied if the \np{ln\_sigcrit} is true and pure z-coordinates if it is false 942 (the z-coordinate being equal to the depths of the stretched coordinate at $h_c$). 943 944 Minimising the horizontal slope of the vertical coordinate is important in terrain-following systems as 945 large slopes lead to hydrostatic consistency. 946 A hydrostatic consistency parameter diagnostic following \citet{haney_JPO91} has been implemented, 947 and is output as part of the model mesh file at the start of the run. 948 949 % ------------------------------------------------------------------------------------------------------------- 950 % z*- or s*-coordinate 951 % ------------------------------------------------------------------------------------------------------------- 952 \subsection[\zstar- or \sstar-coordinate (\forcode{ln_linssh = .false.})] 953 {\zstar- or \sstar-coordinate (\protect\np{ln\_linssh}\forcode{ = .false.})} 954 \label{subsec:DOM_zgr_star} 955 956 This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site. 957 958 %gm% key advantage: minimise the diffusion/dispertion associated with advection in response to high frequency surface disturbances 525 526 Additionally, hybrid combinations of the three main coordinates are available: 527 $s-z$ or $s-zps$ coordinate (\autoref{fig:z_zps_s_sps}d and \autoref{fig:z_zps_s_sps}e). 528 529 A further choice related to vertical coordinate concerns the presence (or not) of ocean 530 cavities beneath ice shelves within the model domain. A setting of \np{ln\_isfcav} as 531 \forcode{.true.} indicates that the domain contains ocean cavities, otherwise the top, 532 wet layer of the ocean will always be at the ocean surface. This option is currently only 533 available for $z$- or $zps$-coordinates. In the latter case, partial steps are also applied 534 at the ocean/ice shelf interface. 535 536 Within the model, the arrays describing the grid point depths and vertical scale factors 537 are three set of three dimensional arrays $(i,j,k)$ defined at \textit{before}, 538 \textit{now} and \textit{after} time step. The time at which they are defined is 539 indicated by a suffix: $\_b$, $\_n$, or $\_a$, respectively. They are updated at each 540 model time step. The initial fixed reference coordinate system is held in variable names 541 with a $\_0$ suffix. When the linear free surface option is used 542 (\np{ln\_linssh}\forcode{ = .true.}), \textit{before}, \textit{now} and \textit{after} 543 arrays are initially set to their reference counterpart and remain fixed. 544 545 \subsubsection{Required fields} 546 \label{sec:DOM_zgr_fields} 547 The explicit specification of a range of fields related to the vertical grid are required for the definition of a configuration. These include: 548 549 \begin{Verbatim}[fontsize=\tiny] 550 int ln_zco, ln_zps, ln_sco /* flags for z-coord, z-coord with partial steps and s-coord */ 551 int ln_isfcav /* flag for ice shelf cavities */ 552 double e3t_1d, e3w_1d /* reference vertical scale factors at T and W points */ 553 double e3t_0, e3u_0, e3v_0, e3f_0, e3w_0 /* vertical scale factors 3D coordinate at T,U,V,F and W points */ 554 double e3uw_0, e3vw_0 /* vertical scale factors 3D coordinate at UW and VW points */ 555 int bottom_level, top_level /* last wet T-points, 1st wet T-points (for ice shelf cavities) */ 556 /* For reference: */ 557 float bathy_metry /* bathymetry used in setting top and bottom levels */ 558 \end{Verbatim} 559 560 This set of vertical metrics is sufficient to describe the initial depth and thickness of 561 every gridcell in the model regardless of the choice of vertical coordinate. With constant 562 z-levels, e3 metrics will be uniform across each horizontal level. In the partial step 563 case each e3 at the \np{bottom\_level} (and, possibly, \np{top\_level} if ice cavities are 564 present) may vary from its horizontal neighbours. And, in s-coordinates, variations can 565 occur throughout the water column. With the non-linear free-surface, all the coordinates 566 behave more like the s-coordinate in that variations occurr throughout the water column 567 with displacements related to the sea surface height. These variations are typically much 568 smaller than those arising from bottom fitted coordinates. The values for vertical metrics 569 supplied in the domain configuration file can be considered as those arising from a flat 570 sea surface with zero elevation. 571 572 The \np{bottom\_level} and \np{top\_level} 2D arrays define the \np{bottom\_level} and top 573 wet levels in each grid column. Without ice cavities, \np{top\_level} is essentially a land 574 mask (0 on land; 1 everywhere else). With ice cavities, \np{top\_level} determines the 575 first wet point below the overlying ice shelf. 576 577 959 578 960 579 % ------------------------------------------------------------------------------------------------------------- 961 580 % level bathymetry and mask 962 581 % ------------------------------------------------------------------------------------------------------------- 963 \subs ection{Level bathymetry and mask}582 \subsubsection{Level bathymetry and mask} 964 583 \label{subsec:DOM_msk} 965 584 966 Whatever the vertical coordinate used, the model offers the possibility of representing the bottom topography with 967 steps that follow the face of the model cells (step like topography) \citep{madec.delecluse.ea_JPO96}. 968 The distribution of the steps in the horizontal is defined in a 2D integer array, mbathy, which 969 gives the number of ocean levels (\ie those that are not masked) at each $t$-point. 970 mbathy is computed from the meter bathymetry using the definiton of gdept as the number of $t$-points which 971 gdept $\leq$ bathy. 972 973 Modifications of the model bathymetry are performed in the \textit{bat\_ctl} routine (see \mdl{domzgr} module) after 974 mbathy is computed. 975 Isolated grid points that do not communicate with another ocean point at the same level are eliminated. 976 977 As for the representation of bathymetry, a 2D integer array, misfdep, is created. 978 misfdep defines the level of the first wet $t$-point. 979 All the cells between $k = 1$ and $misfdep(i,j) - 1$ are masked. 980 By default, $misfdep(:,:) = 1$ and no cells are masked. 981 982 In case of ice shelf cavities, modifications of the model bathymetry and ice shelf draft into 983 the cavities are performed in the \textit{zgr\_isf} routine. 984 The compatibility between ice shelf draft and bathymetry is checked. 985 All the locations where the isf cavity is thinnest than \np{rn\_isfhmin} meters are grounded (\ie masked). 986 If only one cell on the water column is opened at $t$-, $u$- or $v$-points, 987 the bathymetry or the ice shelf draft is dug to fit this constrain. 988 If the incompatibility is too strong (need to dig more than 1 cell), the cell is masked. 989 990 From the \textit{mbathy} and \textit{misfdep} array, the mask fields are defined as follows: 585 586 From \np{top\_level} and \np{bottom\_level} fields, the mask fields are defined as follows: 991 587 \begin{alignat*}{2} 992 588 tmask(i,j,k) &= & & 993 589 \begin{cases} 994 0 &\text{if $ k < misfdep(i,j)$} \\995 1 &\text{if $ misfdep(i,j) \leq k \leq mbathy(i,j)$} \\996 0 &\text{if $ k > mbathy(i,j)$}590 0 &\text{if $ k < top\_level(i,j)$} \\ 591 1 &\text{if $bottom\_level(i,j) \leq k \leq top\_level(i,j)$} \\ 592 0 &\text{if $ k > bottom\_level(i,j)$} 997 593 \end{cases} 998 594 \\ … … 1010 606 exactly in the same way as for the bottom boundary. 1011 607 1012 The specification of closed lateral boundaries requires that at least 1013 the first and last rows and columns of the \textit{mbathy} array are set to zero. 1014 In the particular case of an east-west cyclical boundary condition, \textit{mbathy} has its last column equal to 1015 the second one and its first column equal to the last but one (and so too the mask arrays) 1016 (see \autoref{fig:LBC_jperio}). 608 %% The specification of closed lateral boundaries requires that at least 609 %% the first and last rows and columns of the \textit{mbathy} array are set to zero. 610 %% In the particular case of an east-west cyclical boundary condition, \textit{mbathy} has its last column equal to 611 %% the second one and its first column equal to the last but one (and so too the mask arrays) 612 %% (see \autoref{fig:LBC_jperio}). 613 614 615 %------------------------------------------------------------------------------------------------- 616 % Closed seas 617 %------------------------------------------------------------------------------------------------- 618 \subsection{Closed seas} \label{subsec:DOM_closea} 619 620 When a global ocean is coupled to an atmospheric model it is better to represent all large 621 water bodies (\eg great lakes, Caspian sea...) even if the model resolution does not allow 622 their communication with the rest of the ocean. This is unnecessary when the ocean is 623 forced by fixed atmospheric conditions, so these seas can be removed from the ocean 624 domain. The user has the option to set the bathymetry in closed seas to zero (see 625 \autoref{sec:MISC_closea}) and to optionally decide on the fate of any freshwater 626 imbalance over the area. The options are explained in \autoref{sec:MISC_closea} but it 627 should be noted here that a successful use of these options requires appropriate mask 628 fields to be present in the domain configuration file. Among the possibilities are: 629 630 \begin{Verbatim}[fontsize=\tiny] 631 int closea_mask /* non-zero values in closed sea areas for optional masking */ 632 int closea_mask_rnf /* non-zero values in closed sea areas with runoff locations (precip only) */ 633 int closea_mask_emp /* non-zero values in closed sea areas with runoff locations (total emp) */ 634 \end{Verbatim} 635 636 % ------------------------------------------------------------------------------------------------------------- 637 % Grid files 638 % ------------------------------------------------------------------------------------------------------------- 639 \subsection{Output grid files} 640 \label{subsec:DOM_meshmask} 641 642 \nlst{namcfg} 643 644 Most of the arrays relating to a particular ocean model configuration dicussed in this 645 chapter (grid-point position, scale factors) can be saved in a file if namelist parameter 646 \np{ln\_write\_cfg} (namelist \ngn{namcfg}) is set to \forcode{.true.}; the output 647 filename is set thorugh parameter \np{cn\_domcfg\_out}. This is only really useful 648 if the fields are computed in subroutines \mdl{usrdef\_hgr} or \mdl{usrdef\_zgr} and 649 checking or confirmation is required. 650 651 \nlst{namdom} 652 653 Alternatively, all the arrays relating to a particular ocean model configuration 654 (grid-point position, scale factors, depths and masks) can be saved in a file called 655 \texttt{mesh\_mask} if namelist parameter \np{ln\_meshmask} (namelist \ngn{namdom}) is set 656 to \forcode{.true.}. This file contains additional fields that can be useful for 657 post-processing applications 1017 658 1018 659 % ================================================================ … … 1023 664 \label{sec:DTA_tsd} 1024 665 %-----------------------------------------namtsd------------------------------------------- 1025 1026 666 \nlst{namtsd} 1027 667 %------------------------------------------------------------------------------------------ 1028 668 1029 Options are defined in \ngn{namtsd}. 1030 By default, the ocean start from rest (the velocity field is set to zero) and the initialization of temperature and 1031 salinity fields is controlled through the \np{ln\_tsd\_ini} namelist parameter. 669 Basic initial state options are defined in \ngn{namtsd}. By default, the ocean starts 670 from rest (the velocity field is set to zero) and the initialization of temperature and 671 salinity fields is controlled through the \np{ln\_tsd\_init} namelist parameter. 672 1032 673 \begin{description} 1033 \item[\np{ln\_tsd\_init}\forcode{ 1034 use a T and S input files that can be given on the model grid itself or on their native input data grid.1035 In the latter case,1036 the data will be interpolated on-the-fly both in the horizontal and the vertical to the model grid1037 (see \autoref{subsec:SBC_iof}).1038 The information relative to the input files are given in the \np{sn\_tem} and \np{sn\_sal} structures.1039 The computation is done in the \mdl{dtatsd} module. 1040 \item[\np{ln\_tsd\_init}\forcode{ = .false.}] 1041 use constant salinity value of $35.5~psu$ and an analytical profile of temperature1042 (typical of the tropical ocean), see \rou{istate\_t\_s} subroutine called from \mdl{istate} module.674 \item[\np{ln\_tsd\_init}\forcode{= .true.}] 675 Use T and S input files that can be given on the model grid itself or on their native 676 input data grids. In the latter case, the data will be interpolated on-the-fly both in 677 the horizontal and the vertical to the model grid (see \autoref{subsec:SBC_iof}). The 678 information relating to the input files are specified in the \np{sn\_tem} and 679 \np{sn\_sal} structures. The computation is done in the \mdl{dtatsd} module. 680 \item[\np{ln\_tsd\_init}\forcode{= .false.}] 681 Initial values for T and S are set via a user supplied \rou{usr\_def\_istate} routine 682 contained in \mdl{userdef\_istate}. The default version sets horizontally uniform T and 683 profiles as used in the GYRE configuration (see \autoref{sec:CFG_gyre}). 1043 684 \end{description} 1044 685 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_LDF.tex
r11263 r11353 23 23 These three aspects of the lateral diffusion are set through namelist parameters 24 24 (see the \ngn{nam\_traldf} and \ngn{nam\_dynldf} below). 25 Note that this chapter describes the standard implementation of iso-neutral tracer mixing ,26 and Griffies's implementation, which is used if \np{traldf\_grif}\forcode{ = .true.},27 is described in Appdx\autoref{apdx:triad}28 29 %-----------------------------------nam _traldf - nam_dynldf--------------------------------------------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 30 31 31 \nlst{namtra_ldf} … … 34 34 %-------------------------------------------------------------------------------------------------------------- 35 35 36 % ================================================================ 37 % Lateral Mixing Operator 38 % ================================================================ 39 \section[Lateral mixing operators] 40 {Lateral mixing operators} 41 \label{sec:LDF_op} 42 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 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/or 48 momentum (\protect\np{ln\_dynldf\_OFF}\forcode{ = .true.}). The latter option is even recommended if using the 49 UBS advection scheme on momentum (\np{ln\_dynadv\_ubs}\forcode{ = .true.}, 50 see \autoref{subsec:DYN_adv_ubs}) and can be useful for testing purposes. 51 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.} enables 55 a second order diffusion on tracers and momentum respectively. Note that in \NEMO 4, one can not combine 56 Laplacian and Bilaplacian operators for the same variable. 57 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.} enables 61 a fourth order diffusion on tracers and momentum respectively. It is implemented by calling the above Laplacian operator twice. 62 We stress again that from \NEMO 4, the simultaneous use Laplacian and Bilaplacian operators is not allowed. 36 63 37 64 % ================================================================ … … 88 115 %gm% caution I'm not sure the simplification was a good idea! 89 116 90 These slopes are computed once in \rou{ldf slp\_init} when \np{ln\_sco}\forcode{ = .true.}rue,117 These slopes are computed once in \rou{ldf\_slp\_init} when \np{ln\_sco}\forcode{ = .true.}, 91 118 and either \np{ln\_traldf\_hor}\forcode{ = .true.} or \np{ln\_dynldf\_hor}\forcode{ = .true.}. 92 119 … … 145 172 \item[$s$- or hybrid $s$-$z$- coordinate: ] 146 173 in the current release of \NEMO, iso-neutral mixing is only employed for $s$-coordinates if 147 the Griffies scheme is used (\np{ traldf\_grif}\forcode{ = .true.};148 see Appdx\autoref{apdx:triad}).174 the Griffies scheme is used (\np{ln\_traldf\_triad}\forcode{ = .true.}; 175 see \autoref{apdx:triad}). 149 176 In other words, iso-neutral mixing will only be accurately represented with a linear equation of state 150 (\np{ nn\_eos}\forcode{ = 1..2}).177 (\np{ln\_seos}\forcode{ = .true.}). 151 178 In the case of a "true" equation of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:ldfslp_iso} 152 179 will include a pressure dependent part, leading to the wrong evaluation of the neutral slopes. … … 198 225 199 226 This implementation is a rather old one. 200 It is similar to the one proposed by Cox [1987], except for the background horizontal diffusion.201 Indeed, the Coximplementation of isopycnal diffusion in GFDL-type models requires227 It is similar to the one proposed by \citet{cox_OM87}, except for the background horizontal diffusion. 228 Indeed, the \citet{cox_OM87} implementation of isopycnal diffusion in GFDL-type models requires 202 229 a minimum background horizontal diffusion for numerical stability reasons. 203 230 To overcome this problem, several techniques have been proposed in which the numerical schemes of 204 231 the ocean model are modified \citep{weaver.eby_JPO97, griffies.gnanadesikan.ea_JPO98}. 205 Griffies's scheme is now available in \NEMO if \np{ traldf\_grif\_iso} is set true; see Appdx\autoref{apdx:triad}.232 Griffies's scheme is now available in \NEMO if \np{ln\_traldf\_triad}=\forcode{= .true.}; see \autoref{apdx:triad}. 206 233 Here, another strategy is presented \citep{lazar_phd97}: 207 234 a local filtering of the iso-neutral slopes (made on 9 grid-points) prevents the development of … … 242 269 243 270 For numerical stability reasons \citep{cox_OM87, griffies_bk04}, the slopes must also be bounded by 244 $1/100$everywhere.271 the namelist scalar \np{rn\_slpmax} (usually $1/100$) everywhere. 245 272 This constraint is applied in a piecewise linear fashion, increasing from zero at the surface to 246 273 $1/100$ at $70$ metres and thereafter decreasing to zero at the bottom of the ocean 247 274 (the fact that the eddies "feel" the surface motivates this flattening of isopycnals near the surface). 275 \colorbox{yellow}{The way slopes are tapered has be checked. Not sure that this is still what is actually done.} 248 276 249 277 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 298 326 (see \autoref{sec:LBC_coast}). 299 327 300 301 % ================================================================302 % Lateral Mixing Operator303 % ================================================================304 \section[Lateral mixing operators (\textit{traldf.F90})]305 {Lateral mixing operators (\protect\mdl{traldf}, \protect\mdl{traldf})}306 \label{sec:LDF_op}307 308 309 328 310 329 % ================================================================ 311 330 % Lateral Mixing Coefficients 312 331 % ================================================================ 313 \section[Lateral mixing coefficient (\ textit{ldftra.F90}, \textit{ldfdyn.F90})]314 {Lateral mixing coefficient (\protect\ mdl{ldftra}, \protect\mdl{ldfdyn})}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})} 315 334 \label{sec:LDF_coef} 316 335 317 Introducing a space variation in the lateral eddy mixing coefficients changes the model core memory requirement, 318 adding up to four extra three-dimensional arrays for the geopotential or isopycnal second order operator applied to 319 momentum. 320 Six CPP keys control the space variation of eddy coefficients: three for momentum and three for tracer. 321 The three choices allow: 322 a space variation in the three space directions (\key{traldf\_c3d}, \key{dynldf\_c3d}), 323 in the horizontal plane (\key{traldf\_c2d}, \key{dynldf\_c2d}), 324 or in the vertical only (\key{traldf\_c1d}, \key{dynldf\_c1d}). 325 The default option is a constant value over the whole ocean on both momentum and tracers. 326 327 The number of additional arrays that have to be defined and the gridpoint position at which 328 they are defined depend on both the space variation chosen and the type of operator used. 329 The resulting eddy viscosity and diffusivity coefficients can be a function of more than one variable. 330 Changes in the computer code when switching from one option to another have been minimized by 331 introducing the eddy coefficients as statement functions 332 (include file \textit{ldftra\_substitute.h90} and \textit{ldfdyn\_substitute.h90}). 333 The functions are replaced by their actual meaning during the preprocessing step (CPP). 334 The specification of the space variation of the coefficient is made in \mdl{ldftra} and \mdl{ldfdyn}, 335 or more precisely in include files \textit{traldf\_cNd.h90} and \textit{dynldf\_cNd.h90}, with N=1, 2 or 3. 336 The user can modify these include files as he/she wishes. 337 The way the mixing coefficient are set in the reference version can be briefly described as follows: 338 339 \subsubsection{Constant mixing coefficients (default option)} 340 When none of the \key{dynldf\_...} and \key{traldf\_...} keys are defined, 341 a constant value is used over the whole ocean for momentum and tracers, 342 which is specified through the \np{rn\_ahm0} and \np{rn\_aht0} namelist parameters. 343 344 \subsubsection[Vertically varying mixing coefficients (\texttt{\textbf{key\_traldf\_c1d}} and \texttt{\textbf{key\_dynldf\_c1d}})] 345 {Vertically varying mixing coefficients (\protect\key{traldf\_c1d} and \key{dynldf\_c1d})} 346 The 1D option is only available when using the $z$-coordinate with full step. 347 Indeed in all the other types of vertical coordinate, 348 the depth is a 3D function of (\textbf{i},\textbf{j},\textbf{k}) and therefore, 349 introducing depth-dependent mixing coefficients will require 3D arrays. 350 In the 1D option, a hyperbolic variation of the lateral mixing coefficient is introduced in which 351 the surface value is \np{rn\_aht0} (\np{rn\_ahm0}), the bottom value is 1/4 of the surface value, 352 and the transition takes place around z=300~m with a width of 300~m 353 (\ie both the depth and the width of the inflection point are set to 300~m). 354 This profile is hard coded in file \textit{traldf\_c1d.h90}, but can be easily modified by users. 355 356 \subsubsection[Horizontally varying mixing coefficients (\texttt{\textbf{key\_traldf\_c2d}} and \texttt{\textbf{key\_dynldf\_c2d}})] 357 {Horizontally varying mixing coefficients (\protect\key{traldf\_c2d} and \protect\key{dynldf\_c2d})} 358 By default the horizontal variation of the eddy coefficient depends on the local mesh size and 336 The specification of the space variation of the coefficient is made in modules \mdl{ldftra} and \mdl{ldfdyn}. 337 The way the mixing coefficients are set in the reference version can be described as follows: 338 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, 343 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--------------------------------------------------- 349 \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} 364 \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})} 369 370 If constant, mixing coefficients are set thanks to a velocity and a length scales ($U_{scl}$, $L_{scl}$) such that: 371 372 \begin{equation} 373 \label{eq:constantah} 374 A_o^l = \left\{ 375 \begin{aligned} 376 & \frac{1}{2} U_{scl} L_{scl} & \text{for laplacian operator } \\ 377 & \frac{1}{12} U_{scl} L_{scl}^3 & \text{for bilaplacian operator } 378 \end{aligned} 379 \right. 380 \end{equation} 381 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})} 386 387 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, 389 and the transition takes place around z=500~m with a width of 200~m. 390 This profile is hard coded in module \mdl{ldfc1d\_c2d}, but can be easily modified by users. 391 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})} 394 395 In that case, the horizontal variation of the eddy coefficient depends on the local mesh size and 359 396 the type of operator used: 360 397 \begin{equation} … … 362 399 A_l = \left\{ 363 400 \begin{aligned} 364 & \frac{\max(e_1,e_2)}{e_{ max}} A_o^l & \text{for laplacian operator } \\365 & \frac{\max(e_1,e_2)^{3}}{e_{ max}^{3}} A_o^l & \text{for bilaplacian operator }401 & \frac{\max(e_1,e_2)}{e_{ref}} A_o^l & \text{for laplacian operator } \\ 402 & \frac{\max(e_1,e_2)^{3}}{e_{ref}^{3}} A_o^l & \text{for bilaplacian operator } 366 403 \end{aligned} 367 404 \right. 368 405 \end{equation} 369 where $e_{ max}$ is the maximum of $e_1$ and $e_2$ taken over the whole masked ocean domain,370 and $A_o^l$ is the \np{rn\_ahm0} (momentum) or \np{rn\_aht0} (tracer) namelist parameter.406 where $e_{ref}$ is a reference grid size harcoded to a $1^{\circ}$ grid size (\ie $e_{ref}\approx 111 km$), 407 and $A_o^l$ is the user defined mixing coefficient defined according to \autoref{eq:constantah}. 371 408 This variation is intended to reflect the lesser need for subgrid scale eddy mixing where 372 409 the grid size is smaller in the domain. 373 410 It was introduced in the context of the DYNAMO modelling project \citep{willebrand.barnier.ea_PO01}. 374 Note that such a grid scale dependance of mixing coefficients significantly increase the range of stability of375 model configurations presenting large changes in grid pacing such as global ocean models.411 Note that such a grid scale dependance of mixing coefficients significantly increases the range of stability of 412 model configurations presenting large changes in grid spacing such as global ocean models. 376 413 Indeed, in such a case, a constant mixing coefficient can lead to a blow up of the model due to 377 414 large coefficient compare to the smallest grid size (see \autoref{sec:STP_forward_imp}), 378 415 especially when using a bilaplacian operator. 379 416 380 Other formulations can be introduced by the user for a given configuration. 381 For example, in the ORCA2 global ocean model (see Configurations), 382 the laplacian viscosity operator uses \np{rn\_ahm0}~= 4.10$^4$ m$^2$/s poleward of 20$^{\circ}$ north and south and 383 decreases linearly to \np{rn\_aht0}~= 2.10$^3$ m$^2$/s at the equator \citep{madec.delecluse.ea_JPO96, delecluse.madec_icol99}. 384 This modification can be found in routine \rou{ldf\_dyn\_c2d\_orca} defined in \mdl{ldfdyn\_c2d}. 385 Similar modified horizontal variations can be found with the Antarctic or Arctic sub-domain options of 386 ORCA2 and ORCA05 (see \&namcfg namelist). 387 388 \subsubsection[Space varying mixing coefficients (\texttt{\textbf{key\_traldf\_c3d}} and \texttt{\textbf{key\_dynldf\_c3d}})] 389 {Space varying mixing coefficients (\protect\key{traldf\_c3d} and \key{dynldf\_c3d})} 390 391 The 3D space variation of the mixing coefficient is simply the combination of the 1D and 2D cases, 417 \colorbox{yellow}{CASE \np{nn\_aht\_ijk\_t} = 21 to be added} 418 419 \subsection[Mesh size and depth dependent mixing coefficients (\forcode{nn_aht_ijk_t = 30}, \forcode{nn_ahm_ijk_t = 30})] 420 {Mesh size and depth dependent mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{ = 30}, \protect\np{nn\_ahm\_ijk\_t}\forcode{ = 30})} 421 422 The 3D space variation of the mixing coefficient is simply the combination of the 1D and 2D cases above, 392 423 \ie a hyperbolic tangent variation with depth associated with a grid size dependence of 393 424 the magnitude of the coefficient. 394 425 395 \subsubsection{Space and time varying mixing coefficients} 396 397 There is no default specification of space and time varying mixing coefficient. 398 The only case available is specific to the ORCA2 and ORCA05 global ocean configurations. 399 It provides only a tracer mixing coefficient for eddy induced velocity (ORCA2) or both iso-neutral and 400 eddy induced velocity (ORCA05) that depends on the local growth rate of baroclinic instability. 401 This specification is actually used when an ORCA key and both \key{traldf\_eiv} and \key{traldf\_c2d} are defined. 426 \subsection[Velocity dependent mixing coefficients (\forcode{nn_aht_ijk_t = 31}, \forcode{nn_ahm_ijk_t = 31})] 427 {Flow dependent mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{ = 31}, \protect\np{nn\_ahm\_ijk\_t}\forcode{ = 31})} 428 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$): 429 \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 ?} 430 431 \begin{equation} 432 \label{eq:flowah} 433 A_l = \left\{ 434 \begin{aligned} 435 & \frac{1}{12} \lvert U \rvert e & \text{for laplacian operator } \\ 436 & \frac{1}{12} \lvert U \rvert e^3 & \text{for bilaplacian operator } 437 \end{aligned} 438 \right. 439 \end{equation} 440 441 \subsection[Deformation rate dependent viscosities (\forcode{nn_ahm_ijk_t = 32})] 442 {Deformation rate dependent viscosities (\protect\np{nn\_ahm\_ijk\_t}\forcode{ = 32})} 443 444 This option refers to the \citep{smagorinsky_MW63} scheme which is here implemented for momentum only. Smagorinsky chose as a 445 characteristic time scale $T_{smag}$ the deformation rate and for the lengthscale $L_{smag}$ the maximum wavenumber possible on the horizontal grid, e.g.: 446 447 \begin{equation} 448 \label{eq:smag1} 449 \begin{split} 450 T_{smag}^{-1} & = \sqrt{\left( \partial_x u - \partial_y v\right)^2 + \left( \partial_y u + \partial_x v\right)^2 } \\ 451 L_{smag} & = \frac{1}{\pi}\frac{e_1 e_2}{e_1 + e_2} 452 \end{split} 453 \end{equation} 454 455 Introducing a user defined constant $C$ (given in the namelist as \np{rn\_csmc}), one can deduce the mixing coefficients as follows: 456 457 \begin{equation} 458 \label{eq:smag2} 459 A_{smag} = \left\{ 460 \begin{aligned} 461 & C^2 T_{smag}^{-1} L_{smag}^2 & \text{for laplacian operator } \\ 462 & \frac{C^2}{8} T_{smag}^{-1} L_{smag}^4 & \text{for bilaplacian operator } 463 \end{aligned} 464 \right. 465 \end{equation} 466 467 For stability reasons, upper and lower limits are applied on the resulting coefficient (see \autoref{sec:STP_forward_imp}) so that: 468 \begin{equation} 469 \label{eq:smag3} 470 \begin{aligned} 471 & C_{min} \frac{1}{2} \lvert U \rvert e < A_{smag} < C_{max} \frac{e^2}{ 8\rdt} & \text{for laplacian operator } \\ 472 & C_{min} \frac{1}{12} \lvert U \rvert e^3 < A_{smag} < C_{max} \frac{e^4}{64 \rdt} & \text{for bilaplacian operator } 473 \end{aligned} 474 \end{equation} 475 476 where $C_{min}$ and $C_{max}$ are adimensional namelist parameters given by \np{rn\_minfac} and \np{rn\_maxfac} respectively. 477 478 \subsection{About space and time varying mixing coefficients} 402 479 403 480 The following points are relevant when the eddy coefficient varies spatially: … … 412 489 (\autoref{sec:dynldf_properties}). 413 490 414 (3) for isopycnal diffusion on momentum or tracers, an additional purely horizontal background diffusion with415 uniform coefficient can be added by setting a non zero value of \np{rn\_ahmb0} or \np{rn\_ahtb0},416 a background horizontal eddy viscosity or diffusivity coefficient417 (namelist parameters whose default values are $0$).418 However, the technique used to compute the isopycnal slopes is intended to get rid of such a background diffusion,419 since it introduces spurious diapycnal diffusion (see \autoref{sec:LDF_slp}).420 421 (4) when an eddy induced advection term is used (\key{traldf\_eiv}),422 $A^{eiv}$, the eddy induced coefficient has to be defined.423 Its space variations are controlled by the same CPP variable as for the eddy diffusivity coefficient424 (\ie \key{traldf\_cNd}).425 426 (5) the eddy coefficient associated with a biharmonic operator must be set to a \emph{negative} value.427 428 (6) it is possible to use both the laplacian and biharmonic operators concurrently.429 430 (7) it is possible to run without explicit lateral diffusion on momentum431 (\np{ln\_dynldf\_lap}\forcode{ = .?.}\np{ln\_dynldf\_bilap}\forcode{ = .false.}).432 This is recommended when using the UBS advection scheme on momentum (\np{ln\_dynadv\_ubs}\forcode{ = .true.},433 see \autoref{subsec:DYN_adv_ubs}) and can be useful for testing purposes.434 435 491 % ================================================================ 436 492 % Eddy Induced Mixing 437 493 % ================================================================ 438 \section[Eddy induced velocity (\textit{traadv\_eiv.F90}, \textit{ldfeiv.F90})] 439 {Eddy induced velocity (\protect\mdl{traadv\_eiv}, \protect\mdl{ldfeiv})} 494 \section[Eddy induced velocity (\forcode{ln_ldfeiv = .true.})] 495 {Eddy induced velocity (\protect\np{ln\_ldfeiv}\forcode{ = .true.})} 496 440 497 \label{sec:LDF_eiv} 498 499 %--------------------------------------------namtra_eiv--------------------------------------------------- 500 501 \nlst{namtra_eiv} 502 503 %-------------------------------------------------------------------------------------------------------------- 504 441 505 442 506 %%gm from Triad appendix : to be incorporated.... … … 460 524 } 461 525 462 When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined),526 When \citet{gent.mcwilliams_JPO90} diffusion is used (\np{ln\_ldfeiv}\forcode{ = .true.}), 463 527 an eddy induced tracer advection term is added, 464 528 the formulation of which depends on the slopes of iso-neutral surfaces. … … 466 530 \ie \autoref{eq:ldfslp_geo} is used in $z$-coordinates, 467 531 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $s$-coordinates. 468 The eddy induced velocity is given by: 532 533 If isopycnal mixing is used in the standard way, \ie \np{ln\_traldf\_triad}\forcode{ = .false.}, the eddy induced velocity is given by: 469 534 \begin{equation} 470 535 \label{eq:ldfeiv} … … 475 540 \end{split} 476 541 \end{equation} 477 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{rn\_aeiv}, 478 a \textit{nam\_traldf} namelist parameter. 479 The three components of the eddy induced velocity are computed and 480 add to the eulerian velocity in \mdl{traadv\_eiv}. 542 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn\_aei\_ijk\_t} \ngn{namtra\_eiv} namelist parameter. 543 The three components of the eddy induced velocity are computed in \rou{ldf\_eiv\_trp} and 544 added to the eulerian velocity in \rou{tra\_adv} where tracer advection is performed. 481 545 This has been preferred to a separate computation of the advective trends associated with the eiv velocity, 482 546 since it allows us to take advantage of all the advection schemes offered for the tracers … … 488 552 At the surface, lateral and bottom boundaries, the eddy induced velocity, 489 553 and thus the advective eddy fluxes of heat and salt, are set to zero. 554 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). 555 \colorbox{yellow}{CASE \np{nn\_aei\_ijk\_t} = 21 to be added} 556 557 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}. 558 559 % ================================================================ 560 % Mixed layer eddies 561 % ================================================================ 562 \section[Mixed layer eddies (\forcode{ln_mle = .true.})] 563 {Mixed layer eddies (\protect\np{ln\_mle}\forcode{ = .true.})} 564 565 \label{sec:LDF_mle} 566 567 %--------------------------------------------namtra_eiv--------------------------------------------------- 568 569 \nlst{namtra_mle} 570 571 %-------------------------------------------------------------------------------------------------------------- 572 573 If \np{ln\_mle}\forcode{ = .true.} in \ngn{namtra\_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. 574 575 \colorbox{yellow}{TBC} 490 576 491 577 \biblio -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_OBS.tex
r11263 r11353 8 8 \label{chap:OBS} 9 9 10 Authors: D. Lea, M. Martin, K. Mogensen, A. Vidard, A. Weaver, A. Ryan, ... % do we keep that ?11 12 10 \minitoc 13 11 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 14 24 \newpage 15 25 16 The observation and model comparison code (OBS)reads in observation files17 (profile temperature and salinity, sea surface temperature, sea level anomaly, sea ice concentration, and velocity) and calculates an interpolated model equivalent value at the observation location and nearest model time step.26 The observation and model comparison code, the observation operator (OBS), reads in observation files 27 (profile temperature and salinity, sea surface temperature, sea level anomaly, sea ice concentration, and velocity) and calculates an interpolated model equivalent value at the observation location and nearest model time step. 18 28 The resulting data are saved in a ``feedback'' file (or files). 19 29 The code was originally developed for use with the NEMOVAR data assimilation code, 20 30 but can be used for validation or verification of the model or with any other data assimilation system. 21 31 22 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.23 The code is then called again after each time step from \mdl{step}.24 The code is only activated if the namelist logical \np{ln\_diaobs} is set to true.32 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 The code is then called again after each time step from \mdl{step}. 34 The code is only activated if the \ngn{namobs} namelist logical \np{ln\_diaobs} is set to true. 25 35 26 36 For all data types a 2D horizontal interpolator or averager is needed to … … 28 38 For {\em in situ} profiles, a 1D vertical interpolator is needed in addition to 29 39 provide model fields at the observation depths. 30 This now works in a generalised vertical coordinate system. 40 This now works in a generalised vertical coordinate system. 31 41 32 42 Some profile observation types (\eg tropical moored buoys) are made available as daily averaged quantities. … … 36 46 the observation operator code can calculate equivalent night-time average model SST fields by 37 47 setting the namelist value \np{ln\_sstnight} to true. 38 Otherwise the model value from the nearest timestep to the observation time is used.39 40 The code is controlled by the namelist \ textit{namobs}.48 Otherwise (by default) the model value from the nearest time step to the observation time is used. 49 50 The code is controlled by the namelist \ngn{namobs}. 41 51 See the following sections for more details on setting up the namelist. 42 52 43 \autoref{sec:OBS_example} introduces a test example of the observation operator codeincluding53 In \autoref{sec:OBS_example} a test example of the observation operator code is introduced, including 44 54 where to obtain data and how to setup the namelist. 45 \autoref{sec:OBS_details} introduces some more technical details of the different observation types used and 46 also show sa more complete namelist.47 \autoref{sec:OBS_theory} introduces some of the theoretical aspects of the observation operatorincluding55 In \autoref{sec:OBS_details} some more technical details of the different observation types used are introduced, and we 56 also show a more complete namelist. 57 In \autoref{sec:OBS_theory} some of the theoretical aspects of the observation operator are described including 48 58 interpolation methods and running on multiple processors. 49 \autoref{sec:OBS_ooo} describes the offline observation operator code.50 \autoref{sec:OBS_obsutils} introduces some utilities to help workingwith the files produced by the OBS code.59 In \autoref{sec:OBS_sao} the standalone observation operator code is described. 60 In \autoref{sec:OBS_obsutils} we describe some utilities to help work with the files produced by the OBS code. 51 61 52 62 % ================================================================ … … 56 66 \label{sec:OBS_example} 57 67 58 This section describes an example of running the observation operator codeusing59 profile data which can be freely downloaded.60 It shows how to adapt an existing run and build of NEMO to run the observation operator.68 In this section an example of running the observation operator code is described using 69 profile observation data which can be freely downloaded. 70 It shows how to adapt an existing run and build of \NEMO to run the observation operator. Note also the observation operator and the assimilation increments code are run in the \np{ORCA2\_ICE\_OBS} SETTE test. 61 71 62 72 \begin{enumerate} … … 65 75 \item Download some EN4 data from \href{http://www.metoffice.gov.uk/hadobs}{www.metoffice.gov.uk/hadobs}. 66 76 Choose observations which are valid for the period of your test run because 67 the observation operator compares the model and observations for a matching date and time. 68 69 \item Compile the OBSTOOLS code using:77 the observation operator compares the model and observations for a matching date and time. 78 79 \item Compile the OBSTOOLS code in the \np{tools} directory using: 70 80 \begin{cmds} 71 ./maketools -n OBSTOOLS -m [ARCH] .81 ./maketools -n OBSTOOLS -m [ARCH] 72 82 \end{cmds} 73 83 74 \item Convert the EN4 data into feedback format: 84 replacing \np{[ARCH]} with the build architecture file for your machine. Note the tools are checked out from a separate repository under \np{utils/tools}. 85 86 \item Convert the EN4 data into feedback format: 75 87 \begin{cmds} 76 88 enact2fb.exe profiles_01.nc EN.4.1.1.f.profiles.g10.YYYYMM.nc 77 89 \end{cmds} 78 90 79 \item Include the following in the NEMO namelist to run the observation operator on this data:91 \item Include the following in the \NEMO namelist to run the observation operator on this data: 80 92 \end{enumerate} 81 93 … … 87 99 This can be expensive, particularly for large numbers of observations, 88 100 setting \np{ln\_grid\_search\_lookup} allows the use of a lookup table which 89 is saved into an ``xypos``file (or files).101 is saved into an \np{cn\_gridsearch} file (or files). 90 102 This will need to be generated the first time if it does not exist in the run directory. 91 103 However, once produced it will significantly speed up future grid searches. 92 104 Setting \np{ln\_grid\_global} means that the code distributes the observations evenly between processors. 93 105 Alternatively each processor will work with observations located within the model subdomain 94 (see section~\autoref{subsec:OBS_parallel}).106 (see \autoref{subsec:OBS_parallel}). 95 107 96 108 A number of utilities are now provided to plot the feedback files, convert and recombine the files. 97 These are explained in more detail in section~\autoref{sec:OBS_obsutils}.98 Utilit es to convert other input data formats into the feedback format are also described in99 section~\autoref{sec:OBS_obsutils}.109 These are explained in more detail in \autoref{sec:OBS_obsutils}. 110 Utilities to convert other input data formats into the feedback format are also described in 111 \autoref{sec:OBS_obsutils}. 100 112 101 113 \section{Technical details (feedback type observation file headers)} … … 110 122 %------------------------------------------------------------------------------------------------------------- 111 123 112 The observation operator code uses the "feedback"observation file format for all data types.124 The observation operator code uses the feedback observation file format for all data types. 113 125 All the observation files must be in NetCDF format. 114 126 Some example headers (produced using \mbox{\textit{ncdump~-h}}) for profile data, sea level anomaly and 115 127 sea surface temperature are in the following subsections. 116 128 117 \subsection{Profile feedback }129 \subsection{Profile feedback file} 118 130 119 131 \begin{clines} … … 271 283 \end{clines} 272 284 273 \subsection{Sea level anomaly feedback }285 \subsection{Sea level anomaly feedback file} 274 286 275 287 \begin{clines} … … 395 407 \end{clines} 396 408 397 T he mean dynamic topography (MDT) must be provided in a separate file defined on409 To use Sea Level Anomaly (SLA) data the mean dynamic topography (MDT) must be provided in a separate file defined on 398 410 the model grid called \ifile{slaReferenceLevel}. 399 411 The MDT is required in order to produce the model equivalent sea level anomaly from the model sea surface height. … … 417 429 \end{clines} 418 430 419 \subsection{Sea surface temperature feedback }431 \subsection{Sea surface temperature feedback file} 420 432 421 433 \begin{clines} … … 546 558 In those cases the model counterpart should be calculated by averaging the model grid points over 547 559 the same size as the footprint. 548 NEMO therefore has the capability to specify either an interpolation or an averaging549 (for surface observation types only). 560 \NEMO therefore has the capability to specify either an interpolation or an averaging 561 (for surface observation types only). 550 562 551 563 The main namelist option associated with the interpolation/averaging is \np{nn\_2dint}. … … 559 571 \item \np{nn\_2dint}\forcode{ = 4}: Polynomial interpolation 560 572 \item \np{nn\_2dint}\forcode{ = 5}: Radial footprint averaging with diameter specified in the namelist as 561 \np{rn\_ ???\_avglamscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs})573 \np{rn\_[var]\_avglamscl} in degrees or metres (set using \np{ln\_[var]\_fp\_indegs}) 562 574 \item \np{nn\_2dint}\forcode{ = 6}: Rectangular footprint averaging with E/W and N/S size specified in 563 the namelist as \np{rn\_ ???\_avglamscl} and \np{rn\_???\_avgphiscl} in degrees or metres564 (set using \np{ln\_ ???\_fp\_indegs})575 the namelist as \np{rn\_[var]\_avglamscl} and \np{rn\_[var]\_avgphiscl} in degrees or metres 576 (set using \np{ln\_[var]\_fp\_indegs}) 565 577 \end{itemize} 566 The ??? in the last two options indicate these options should be specified for each observation typefor578 Replace \np{[var]} in the last two options with the observation type (sla, sst, sss or sic) for 567 579 which the averaging is to be performed (see namelist example above). 568 580 The \np{nn\_2dint} default option can be overridden for surface observation types using 569 namelist values \np{nn\_2dint\_ ???} where ??? is one of sla,sst,sss,sic.581 namelist values \np{nn\_2dint\_[var]} where \np{[var]} is the observation type. 570 582 571 583 Below is some more detail on the various options for interpolation and averaging available in NEMO. … … 573 585 \subsubsection{Horizontal interpolation} 574 586 575 Consider an observation point ${\mathrm P}$ with with longitude and latitude $({\lambda_{}}_{\mathrm P}, \phi_{\mathrm P})$and587 Consider an observation point ${\mathrm P}$ with longitude and latitude (${\lambda_{}}_{\mathrm P}$, $\phi_{\mathrm P}$) and 576 588 the four nearest neighbouring model grid points ${\mathrm A}$, ${\mathrm B}$, ${\mathrm C}$ and ${\mathrm D}$ with 577 589 longitude and latitude ($\lambda_{\mathrm A}$, $\phi_{\mathrm A}$),($\lambda_{\mathrm B}$, $\phi_{\mathrm B}$) etc. 578 All horizontal interpolation methods implemented in NEMO estimate the value of a model variable $x$ at point $P$ as590 All horizontal interpolation methods implemented in \NEMO estimate the value of a model variable $x$ at point $P$ as 579 591 a weighted linear combination of the values of the model variables at the grid points ${\mathrm A}$, ${\mathrm B}$ etc.: 592 580 593 \begin{align*} 581 {x_{}}_{\mathrm P} & \hspace{-2mm} = \hspace{-2mm} &582 583 584 585 594 {x_{}}_{\mathrm P} = 595 \frac{1}{w} \left( {w_{}}_{\mathrm A} {x_{}}_{\mathrm A} + 596 {w_{}}_{\mathrm B} {x_{}}_{\mathrm B} + 597 {w_{}}_{\mathrm C} {x_{}}_{\mathrm C} + 598 {w_{}}_{\mathrm D} {x_{}}_{\mathrm D} \right) 586 599 \end{align*} 600 587 601 where ${w_{}}_{\mathrm A}$, ${w_{}}_{\mathrm B}$ etc. are the respective weights for the model field at 588 602 points ${\mathrm A}$, ${\mathrm B}$ etc., and $w = {w_{}}_{\mathrm A} + {w_{}}_{\mathrm B} + {w_{}}_{\mathrm C} + {w_{}}_{\mathrm D}$. … … 597 611 For example, the weight given to the field ${x_{}}_{\mathrm A}$ is specified as the product of the distances 598 612 from ${\mathrm P}$ to the other points: 599 \begin{align*} 613 614 \begin{alignat*}{2} 600 615 {w_{}}_{\mathrm A} = s({\mathrm P}, {\mathrm B}) \, s({\mathrm P}, {\mathrm C}) \, s({\mathrm P}, {\mathrm D}) 601 \end{align *}602 where 603 \begin{align*}604 s\left ({\mathrm P}, {\mathrm M} \right ) 605 & \hspace{-2mm} = \hspace{-2mm} &606 \cos^{-1} \! \left\{616 \end{alignat*} 617 618 where 619 620 \begin{alignat*}{2} 621 s\left({\mathrm P}, {\mathrm M} \right) & = & \hspace{0.25em} \cos^{-1} \! \left\{ 607 622 \sin {\phi_{}}_{\mathrm P} \sin {\phi_{}}_{\mathrm M} 608 + \cos {\phi_{}}_{\mathrm P} \cos {\phi_{}}_{\mathrm M} 609 \cos ({\lambda_{}}_{\mathrm M} - {\lambda_{}}_{\mathrm P}) 623 + \cos {\phi_{}}_{\mathrm P} \cos {\phi_{}}_{\mathrm M} 624 \cos ({\lambda_{}}_{\mathrm M} - {\lambda_{}}_{\mathrm P}) 610 625 \right\} 611 \end{align*} 626 \end{alignat*} 627 612 628 and $M$ corresponds to $B$, $C$ or $D$. 613 629 A more stable form of the great-circle distance formula for small distances ($x$ near 1) 614 630 involves the arcsine function (\eg see p.~101 of \citet{daley.barker_bk01}: 615 \begin{align*} 616 s\left( {\mathrm P}, {\mathrm M} \right) & \hspace{-2mm} = \hspace{-2mm} & \sin^{-1} \! \left\{ \sqrt{ 1 - x^2 } \right\} 617 \end{align*} 631 632 \begin{alignat*}{2} 633 s\left( {\mathrm P}, {\mathrm M} \right) = \sin^{-1} \! \left\{ \sqrt{ 1 - x^2 } \right\} 634 \end{alignat*} 635 618 636 where 619 \begin{align*} 620 x & \hspace{-2mm} = \hspace{-2mm} & 621 {a_{}}_{\mathrm M} {a_{}}_{\mathrm P} + {b_{}}_{\mathrm M} {b_{}}_{\mathrm P} + {c_{}}_{\mathrm M} {c_{}}_{\mathrm P} 622 \end{align*} 623 and 624 \begin{align*} 625 {a_{}}_{\mathrm M} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\mathrm M}, \\ 626 {a_{}}_{\mathrm P} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\mathrm P}, \\ 627 {b_{}}_{\mathrm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\mathrm M} \cos {\phi_{}}_{\mathrm M}, \\ 628 {b_{}}_{\mathrm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\mathrm P} \cos {\phi_{}}_{\mathrm P}, \\ 629 {c_{}}_{\mathrm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\mathrm M} \sin {\phi_{}}_{\mathrm M}, \\ 630 {c_{}}_{\mathrm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\mathrm P} \sin {\phi_{}}_{\mathrm P}. 631 \end{align*} 637 638 \begin{alignat*}{2} 639 x = {a_{}}_{\mathrm M} {a_{}}_{\mathrm P} + {b_{}}_{\mathrm M} {b_{}}_{\mathrm P} + {c_{}}_{\mathrm M} {c_{}}_{\mathrm P} 640 \end{alignat*} 641 642 and 643 644 \begin{alignat*}{3} 645 & {a_{}}_{\mathrm M} & = && \quad \sin {\phi_{}}_{\mathrm M}, \\ 646 & {a_{}}_{\mathrm P} & = && \quad \sin {\phi_{}}_{\mathrm P}, \\ 647 & {b_{}}_{\mathrm M} & = && \quad \cos {\phi_{}}_{\mathrm M} \cos {\phi_{}}_{\mathrm M}, \\ 648 & {b_{}}_{\mathrm P} & = && \quad \cos {\phi_{}}_{\mathrm P} \cos {\phi_{}}_{\mathrm P}, \\ 649 & {c_{}}_{\mathrm M} & = && \quad \cos {\phi_{}}_{\mathrm M} \sin {\phi_{}}_{\mathrm M}, \\ 650 & {c_{}}_{\mathrm P} & = && \quad \cos {\phi_{}}_{\mathrm P} \sin {\phi_{}}_{\mathrm P}. 651 \end{alignat*} 632 652 633 653 \item[2.] {\bfseries Great-Circle distance-weighted interpolation with small angle approximation.} 634 654 Similar to the previous interpolation but with the distance $s$ computed as 635 \begin{align *}655 \begin{alignat*}{2} 636 656 s\left( {\mathrm P}, {\mathrm M} \right) 637 & \hspace{-2mm} = \hspace{-2mm} & 638 \sqrt{ \left( {\phi_{}}_{\mathrm M} - {\phi_{}}_{\mathrm P} \right)^{2} 657 & = & \sqrt{ \left( {\phi_{}}_{\mathrm M} - {\phi_{}}_{\mathrm P} \right)^{2} 639 658 + \left( {\lambda_{}}_{\mathrm M} - {\lambda_{}}_{\mathrm P} \right)^{2} 640 659 \cos^{2} {\phi_{}}_{\mathrm M} } 641 \end{align *}660 \end{alignat*} 642 661 where $M$ corresponds to $A$, $B$, $C$ or $D$. 643 662 … … 649 668 a cell with coordinates (0,0), (1,0), (0,1) and (1,1). 650 669 This method is based on the \href{https://github.com/SCRIP-Project/SCRIP}{SCRIP interpolation package}. 651 670 652 671 \end{enumerate} 653 672 … … 658 677 \item The standard grid-searching code is used to find the nearest model grid point to the observation location 659 678 (see next subsection). 660 \item The maximum number of grid points is calculated in the local grid domain for which 661 the averaging is likely need to cover. 662 \item The lats/longs of the grid points surrounding the nearest model grid box are extracted using 663 existing mpi routines. 679 \item The maximum number of grid points required for that observation in each local grid domain is calculated. Some of these points may later turn out to have zero weight depending on the shape of the footprint. 680 \item The longitudes and latitudes of the grid points surrounding the nearest model grid box are extracted using 681 existing MPI routines. 664 682 \item The weights for each grid point associated with each observation are calculated, 665 683 either for radial or rectangular footprints. … … 673 691 674 692 Examples of the weights calculated for an observation with rectangular and radial footprints are shown in 675 Figs.~\autoref{fig:obsavgrec} and~\autoref{fig:obsavgrad}.693 \autoref{fig:obsavgrec} and~\autoref{fig:obsavgrad}. 676 694 677 695 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 696 714 Weights associated with each model grid box (blue lines and numbers) 697 715 for an observation at -170.5\deg{E}, 56.0\deg{N} with a radial footprint with diameter 1\deg. 698 } 716 } 699 717 \end{center} 700 718 \end{figure} … … 704 722 \subsection{Grid search} 705 723 706 For many grids used by the NEMO model, such as the ORCA family, the horizontal grid coordinates $i$ and $j$ are not simple functions of latitude and longitude.724 For many grids used by the \NEMO model, such as the ORCA family, the horizontal grid coordinates $i$ and $j$ are not simple functions of latitude and longitude. 707 725 Therefore, it is not always straightforward to determine the grid points surrounding any given observational position. 708 Before the interpolation can be performed, a search algorithm is then required to determine the corner points of 726 Before the interpolation can be performed, a search algorithm is then required to determine the corner points of 709 727 the quadrilateral cell in which the observation is located. 710 This is the most difficult and time consuming part of the 2D interpolation procedure. 728 This is the most difficult and time consuming part of the 2D interpolation procedure. 711 729 A robust test for determining if an observation falls within a given quadrilateral cell is as follows. 712 730 Let ${\mathrm P}({\lambda_{}}_{\mathrm P} ,{\phi_{}}_{\mathrm P} )$ denote the observation point, 713 731 and let ${\mathrm A}({\lambda_{}}_{\mathrm A} ,{\phi_{}}_{\mathrm A} )$, ${\mathrm B}({\lambda_{}}_{\mathrm B} ,{\phi_{}}_{\mathrm B} )$, 714 732 ${\mathrm C}({\lambda_{}}_{\mathrm C} ,{\phi_{}}_{\mathrm C} )$ and ${\mathrm D}({\lambda_{}}_{\mathrm D} ,{\phi_{}}_{\mathrm D} )$ 715 denote the bottom left, bottom right, top left and top right corner points of the cell, respectively. 716 To determine if P is inside the cell, we verify that the cross-products 733 denote the bottom left, bottom right, top left and top right corner points of the cell, respectively. 734 To determine if P is inside the cell, we verify that the cross-products 717 735 \begin{align*} 718 736 \begin{array}{lllll} … … 750 768 be searched for on a regular grid. 751 769 For each observation position, the closest point on the regular grid of this position is computed and 752 the $i$ and $j$ ranges of this point searched to determine the precise four points surrounding the observation. 770 the $i$ and $j$ ranges of this point searched to determine the precise four points surrounding the observation. 753 771 754 772 \subsection{Parallel aspects of horizontal interpolation} … … 757 775 For horizontal interpolation, there is the basic problem that 758 776 the observations are unevenly distributed on the globe. 759 In numerical models, it is common to divide the model grid into subgrids (or domains) where777 In \NEMO the model grid is divided into subgrids (or domains) where 760 778 each subgrid is executed on a single processing element with explicit message passing for 761 779 exchange of information along the domain boundaries when running on a massively parallel processor (MPP) system. 762 This approach is used by \NEMO. 763 764 For observations there is no natural distribution since the observations are not equally distributed on the globe. 780 781 For observations there is no natural distribution since the observations are not equally distributed on the globe. 765 782 Two options have been made available: 766 783 1) geographical distribution; … … 784 801 the domain of the grid-point parallelization. 785 802 \autoref{fig:obslocal} shows an example of the distribution of the {\em in situ} data on processors with 786 a different colour for each observation on a given processor for a 4 $\times$ 2 decomposition with ORCA2. 803 a different colour for each observation on a given processor for a 4 $\times$ 2 decomposition with ORCA2. 787 804 The grid-point domain decomposition is clearly visible on the plot. 788 805 789 806 The advantage of this approach is that all information needed for horizontal interpolation is available without 790 807 any MPP communication. 791 Of course, this is under the assumption that we areonly using a $2 \times 2$ grid-point stencil for808 This is under the assumption that we are dealing with point observations and only using a $2 \times 2$ grid-point stencil for 792 809 the interpolation (\eg bilinear interpolation). 793 810 For higher order interpolation schemes this is no longer valid. … … 827 844 At the bottom boundary, this is done using the land-ocean mask. 828 845 846 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 829 848 \newpage 830 849 831 850 % ================================================================ 832 % Offline observation operator documentation851 % Standalone observation operator documentation 833 852 % ================================================================ 834 853 835 854 %\usepackage{framed} 836 855 837 \section{ Offline observation operator}838 \label{sec:OBS_ ooo}856 \section{Standalone observation operator} 857 \label{sec:OBS_sao} 839 858 840 859 \subsection{Concept} 841 860 842 The obs oper maps model variables to observation space. 843 It is possible to apply this mapping without running the model. 844 The software which performs this functionality is known as the \textbf{offline obs oper}. 845 The obs oper is divided into three stages. 846 An initialisation phase, an interpolation phase and an output phase. 847 The implementation of which is outlined in the previous sections. 848 During the interpolation phase the offline obs oper populates the model arrays by 849 reading saved model fields from disk. 850 851 There are two ways of exploiting this offline capacity. 861 The observation operator maps model variables to observation space. This is normally done while the model is running, i.e. online, it is possible to apply this mapping offline without running the model with the \textbf{standalone observation operator} (SAO). The process is divided into an initialisation phase, an interpolation phase and an output phase. 862 During the interpolation phase the SAO populates the model arrays by 863 reading saved model fields from disk. The interpolation and the output phases use the same OBS code described in the preceding sections. 864 865 There are two ways of exploiting the standalone capacity. 852 866 The first is to mimic the behaviour of the online system by supplying model fields at 853 867 regular intervals between the start and the end of the run. 854 868 This approach results in a single model counterpart per observation. 855 This kind of usage produces feedback files the same file format as the online obs oper.856 The second is to take advantage of the offline setting in which857 multiple model counterparts can be calculated perobservation.869 This kind of usage produces feedback files the same file format as the online observation operator. 870 The second is to take advantage of the ability to run offline by calculating 871 multiple model counterparts for each observation. 858 872 In this case it is possible to consider all forecasts verifying at the same time. 859 By forecast, I mean any method which produces an estimate of physical reality which is not an observed value. 860 In the case of class 4 files this means forecasts, analyses, persisted analyses and 861 climatological values verifying at the same time. 862 Although the class 4 file format doesn't account for multiple ensemble members or 863 multiple experiments per observation, it is possible to include these components in the same or multiple files. 873 By forecast, we mean any method which produces an estimate of physical reality which is not an observed value. 864 874 865 875 %-------------------------------------------------------------------------------------------------------- 866 % offline_oper.exe876 % sao.exe 867 877 %-------------------------------------------------------------------------------------------------------- 868 878 869 \subsection{Using the offline observation operator}879 \subsection{Using the standalone observation operator} 870 880 871 881 \subsubsection{Building} 872 882 873 In addition to \emph{OPA\_SRC} the offline obs oper requires the inclusion of the \emph{OOO\_SRC} directory.874 \emph{ OOO\_SRC} contains a replacement \mdl{nemo} and \mdl{nemogcm} which883 In addition to \emph{OPA\_SRC} the SAO requires the inclusion of the \emph{SAO\_SRC} directory. 884 \emph{SAO\_SRC} contains a replacement \mdl{nemo} and \mdl{nemogcm} which 875 885 overwrites the resultant \textbf{nemo.exe}. 876 This is the approach taken by \emph{SAS\_SRC} and\emph{OFF\_SRC}.886 Note this a similar approach to that taken by the standalone surface scheme \emph{SAS\_SRC} and the offline TOP model \emph{OFF\_SRC}. 877 887 878 888 %-------------------------------------------------------------------------------------------------------- 879 % Running 889 % Running 880 890 %-------------------------------------------------------------------------------------------------------- 881 891 \subsubsection{Running} 882 892 883 The simplest way to use the executable is to edit and append the \textbf{ooo.nml} namelist to 884 a full NEMO namelist and then to run the executable as if it were nemo.exe. 885 886 \subsubsection{Quick script} 887 888 A useful Python utility to control the namelist options can be found in \textbf{OBSTOOLS/OOO}. 889 The functions which locate model fields and observation files can be manually specified. 890 The package can be installed by appropriate use of the included setup.py script. 891 892 Documentation can be auto-generated by Sphinx by running \emph{make html} in the \textbf{doc} directory. 893 The simplest way to use the executable is to edit and append the \textbf{sao.nml} namelist to 894 a full \NEMO namelist and then to run the executable as if it were nemo.exe. 893 895 894 896 %-------------------------------------------------------------------------------------------------------- 895 897 % Configuration section 896 898 %-------------------------------------------------------------------------------------------------------- 897 \subsection{Configuring the offline observation operator} 898 The observation files and settings understood by \textbf{namobs} have been outlined in the online obs oper section. 899 In addition there are two further namelists wich control the operation of the offline obs oper. 900 \textbf{namooo} which controls the input model fields and \textbf{namcl4} which 901 controls the production of class 4 files. 899 \subsection{Configuring the standalone observation operator} 900 The observation files and settings understood by \ngn{namobs} have been outlined in the online observation operator section. 901 In addition is a further namelist \ngn{namsao} which used to set the input model fields for the SAO 902 902 903 903 \subsubsection{Single field} 904 904 905 In offline mode model arrays are populated at appropriate time steps via input files.906 At present, \textbf{tsn} and \textbf{sshn} are populated by the default read routines. 905 In the SAO the model arrays are populated at appropriate time steps via input files. 906 At present, \textbf{tsn} and \textbf{sshn} are populated by the default read routines. 907 907 These routines will be expanded upon in future versions to allow the specification of any model variable. 908 908 As such, input files must be global versions of the model domain with 909 909 \textbf{votemper}, \textbf{vosaline} and optionally \textbf{sshn} present. 910 910 911 For each field read there must be an entry in the \ textbf{namooo} namelist specifying911 For each field read there must be an entry in the \ngn{namsao} namelist specifying 912 912 the name of the file to read and the index along the \emph{time\_counter}. 913 913 For example, to read the second time counter from a single file the namelist would be. … … 915 915 \begin{forlines} 916 916 !---------------------------------------------------------------------- 917 ! nam ooo Offline obs_oper namelist917 ! namsao Standalone obs_oper namelist 918 918 !---------------------------------------------------------------------- 919 ! ooo_files specifies the files containing the model counterpart920 ! nn_ ooo_idx specifies the time_counter index within the model file921 &nam ooo922 ooo_files = "foo.nc"923 nn_ ooo_idx = 2919 ! sao_files specifies the files containing the model counterpart 920 ! nn_sao_idx specifies the time_counter index within the model file 921 &namsao 922 sao_files = "foo.nc" 923 nn_sao_idx = 2 924 924 / 925 925 \end{forlines} … … 927 927 \subsubsection{Multiple fields per run} 928 928 929 Model field iteration is controlled via \textbf{nn\_ ooo\_freq} which929 Model field iteration is controlled via \textbf{nn\_sao\_freq} which 930 930 specifies the number of model steps at which the next field gets read. 931 931 For example, if 12 hourly fields are to be interpolated in a setup where 288 steps equals 24 hours. … … 933 933 \begin{forlines} 934 934 !---------------------------------------------------------------------- 935 ! nam ooo Offline obs_oper namelist935 ! namsao Standalone obs_oper namelist 936 936 !---------------------------------------------------------------------- 937 ! ooo_files specifies the files containing the model counterpart938 ! nn_ ooo_idx specifies the time_counter index within the model file939 ! nn_ ooo_freq specifies number of time steps between read operations940 &nam ooo941 ooo_files = "foo.nc" "foo.nc"942 nn_ ooo_idx = 1 2943 nn_ ooo_freq = 144937 ! sao_files specifies the files containing the model counterpart 938 ! nn_sao_idx specifies the time_counter index within the model file 939 ! nn_sao_freq specifies number of time steps between read operations 940 &namsao 941 sao_files = "foo.nc" "foo.nc" 942 nn_sao_idx = 1 2 943 nn_sao_freq = 144 944 944 / 945 945 \end{forlines} … … 952 952 %\end{framed} 953 953 954 It is easy to see how a collection of fields taken frona number of files at different indices can be combined at954 A collection of fields taken from a number of files at different indices can be combined at 955 955 a particular frequency in time to generate a pseudo model evolution. 956 As long as all that is needed is a single model counterpart at a regular interval then 957 namooo is all that needs to be edited. 958 However, a far more interesting approach can be taken in which multiple forecasts, analyses, persisted analyses and 959 climatologies are considered against the same set of observations. 960 For this a slightly more complicated approach is needed. 961 It is referred to as \emph{Class 4} since it is the fourth metric defined by the GODAE intercomparison project. 962 963 %-------------------------------------------------------------------------------------------------------- 964 % Class 4 file section 965 %-------------------------------------------------------------------------------------------------------- 966 \subsubsection{Multiple model counterparts per observation a.k.a Class 4} 967 968 A generalisation of feedback files to allow multiple model components per observation. 969 For a single observation, as well as previous forecasts verifying at the same time 970 there are also analyses, persisted analyses and climatologies. 971 972 973 The above namelist performs two basic functions. 974 It organises the fields given in \textbf{namooo} into groups so that observations can be matched up multiple times. 975 It also controls the metadata and the output variable of the class 4 file when a write routine is called. 976 977 %\begin{framed} 978 \textbf{Note: ln\_cl4} must be set to \forcode{.true.} in \textbf{namobs} to use class 4 outputs. 979 %\end{framed} 980 981 \subsubsection{Class 4 naming convention} 982 983 The standard class 4 file naming convention is as follows. 984 985 \noindent 986 \linebreak 987 \textbf{\$\{prefix\}\_\$\{yyyymmdd\}\_\$\{sys\}\_\$\{cfg\}\_\$\{vn\}\_\$\{kind\}\_\$\{nproc\}}.nc 988 989 \noindent 990 \linebreak 991 Much of the namelist is devoted to specifying this convention. 992 The following namelist settings control the elements of the output file names. 993 Each should be specified as a single string of character data. 994 995 \begin{description} 996 \item[cl4\_prefix] 997 Prefix for class 4 files \eg class4 998 \item[cl4\_date] 999 YYYYMMDD validity date 1000 \item[cl4\_sys] 1001 The name of the class 4 model system \eg FOAM 1002 \item[cl4\_cfg] 1003 The name of the class 4 model configuration \eg orca025 1004 \item[cl4\_vn] 1005 The name of the class 4 model version \eg 12.0 1006 \end{description} 1007 1008 \noindent 1009 The kind is specified by the observation type internally to the obs oper. 1010 The processor number is specified internally in NEMO. 1011 1012 \subsubsection{Class 4 file global attributes} 1013 1014 Global attributes necessary to fulfill the class 4 file definition. 1015 These are also useful pieces of information when collaborating with external partners. 1016 1017 \begin{description} 1018 \item[cl4\_contact] 1019 Contact email for class 4 files. 1020 \item[cl4\_inst] 1021 The name of the producers institution. 1022 \item[cl4\_cfg] 1023 The name of the class 4 model configuration \eg orca025 1024 \item[cl4\_vn] 1025 The name of the class 4 model version \eg 12.0 1026 \end{description} 1027 1028 \noindent 1029 The obs\_type, creation date and validity time are specified internally to the obs oper. 1030 1031 \subsubsection{Class 4 model counterpart configuration} 1032 1033 As seen previously it is possible to perform a single sweep of the obs oper and 1034 specify a collection of model fields equally spaced along that sweep. 1035 In the class 4 case the single sweep is replaced with multiple sweeps and 1036 a certain ammount of book keeping is needed to ensure each model counterpart makes its way to 1037 the correct piece of memory in the output files. 1038 1039 \noindent 1040 \linebreak 1041 In terms of book keeping, the offline obs oper needs to know how many full sweeps need to be performed. 1042 This is specified via the \textbf{cl4\_match\_len} variable and 1043 is the total number of model counterparts per observation. 1044 For example, a 3 forecasts plus 3 persistence fields plus an analysis field would be 7 counterparts per observation. 1045 1046 \begin{forlines} 1047 cl4_match_len = 7 1048 \end{forlines} 1049 1050 Then to correctly allocate a class 4 file the forecast axis must be defined. 1051 This is controlled via \textbf{cl4\_fcst\_len}, which in out above example would be 3. 1052 1053 \begin{forlines} 1054 cl4_fcst_len = 3 1055 \end{forlines} 1056 1057 Then for each model field it is necessary to designate what class 4 variable and index along 1058 the forecast dimension the model counterpart should be stored in the output file. 1059 As well as a value for that lead time in hours, this will be useful when interpreting the data afterwards. 1060 1061 \begin{forlines} 1062 cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence" 1063 "persistence" "best_estimate" 1064 cl4_fcst_idx = 1 2 3 1 2 3 1 1065 cl4_leadtime = 12 36 60 1066 \end{forlines} 1067 1068 In terms of files and indices of fields inside each file the class 4 approach makes use of 1069 the \textbf{namooo} namelist. 1070 If our fields are in separate files with a single field per file our example inputs will be specified. 1071 1072 \begin{forlines} 1073 ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc" 1074 nn_ooo_idx = 1 1 1 1 1 1 1 1075 \end{forlines} 1076 1077 When we combine all of the naming conventions, global attributes and i/o instructions the class 4 namelist becomes. 1078 1079 \begin{forlines} 1080 !---------------------------------------------------------------------- 1081 ! namooo Offline obs_oper namelist 1082 !---------------------------------------------------------------------- 1083 ! ooo_files specifies the files containing the model counterpart 1084 ! nn_ooo_idx specifies the time_counter index within the model file 1085 ! nn_ooo_freq specifies number of time steps between read operations 1086 &namooo 1087 ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc" 1088 nn_ooo_idx = 1 1 1 1 1 1 1 1089 / 1090 !---------------------------------------------------------------------- 1091 ! namcl4 Offline obs_oper class 4 namelist 1092 !---------------------------------------------------------------------- 1093 ! 1094 ! Naming convention 1095 ! ----------------- 1096 ! cl4_prefix specifies the output file prefix 1097 ! cl4_date specifies the output file validity date 1098 ! cl4_sys specifies the model counterpart system 1099 ! cl4_cfg specifies the model counterpart configuration 1100 ! cl4_vn specifies the model counterpart version 1101 ! cl4_inst specifies the model counterpart institute 1102 ! cl4_contact specifies the file producers contact details 1103 ! 1104 ! I/O specification 1105 ! ----------------- 1106 ! cl4_vars specifies the names of the output file netcdf variable 1107 ! cl4_fcst_idx specifies output file forecast index 1108 ! cl4_fcst_len specifies forecast axis length 1109 ! cl4_match_len specifies number of unique matches per observation 1110 ! cl4_leadtime specifies the forecast axis lead time 1111 ! 1112 &namcl4 1113 cl4_match_len = 7 1114 cl4_fcst_len = 3 1115 cl4_fcst_idx = 1 2 3 1 2 3 1 1116 cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence" 1117 "persistence" "best_estimate" 1118 cl4_leadtime = 12 36 60 1119 cl4_prefix = "class4" 1120 cl4_date = "20130101" 1121 cl4_vn = "12.0" 1122 cl4_sys = "FOAM" 1123 cl4_cfg = "AMM7" 1124 cl4_contact = "example@example.com" 1125 cl4_inst = "UK Met Office" 1126 / 1127 \end{forlines} 1128 1129 \subsubsection{Climatology interpolation} 1130 1131 The climatological counterpart is generated at the start of the run by 1132 restarting the model from climatology through appropriate use of \textbf{namtsd}. 1133 To override the offline observation operator read routine and to take advantage of the restart settings, 1134 specify the first entry in \textbf{cl4\_vars} as "climatology". 1135 This will then pipe the restart from climatology into the output class 4 file. 1136 As in every other class 4 matchup the input file, input index and output index must be specified. 1137 These can be replaced with dummy data since they are not used but 1138 they must be present to cycle through the matchups correctly. 1139 1140 \subsection{Advanced usage} 1141 1142 In certain cases it may be desirable to include both multiple model fields per observation window with 1143 multiple match ups per observation. 1144 This can be achieved by specifying \textbf{nn\_ooo\_freq} as well as the class 4 settings. 1145 Care must be taken in generating the ooo\_files list such that the files are arranged into 1146 consecutive blocks of single match ups. 1147 For example, 2 forecast fields of 12 hourly data would result in 4 separate read operations but 1148 only 2 write operations, 1 per forecast. 1149 1150 \begin{forlines} 1151 ooo_files = "F1.nc" "F1.nc" "F2.nc" "F2.nc" 1152 ... 1153 cl4_fcst_idx = 1 2 1154 \end{forlines} 1155 1156 The above notation reveals the internal split between match up iterators and file iterators. 1157 This technique has not been used before so experimentation is needed before results can be trusted. 956 If all that is needed is a single model counterpart at a regular interval then 957 the standard SAO is all that is required. 958 However, just to note, it is possible to extend this approach by comparing multiple forecasts, analyses, persisted analyses and 959 climatologies with the same set of observations. 960 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. 1158 961 1159 962 \newpage … … 1162 965 \label{sec:OBS_obsutils} 1163 966 1164 Some tools for viewing and processing of observation and feedback files are provided in1165 the NEMO repository for convenience.1166 These include OBSTOOLS which are a collection of \fortran programs which are helpful to deal with feedback files.967 For convenience some tools for viewing and processing of observation and feedback files are provided in 968 the \NEMO repository. 969 These tools include OBSTOOLS which are a collection of \fortran programs which are helpful to deal with feedback files. 1167 970 They do such tasks as observation file conversion, printing of file contents, 1168 971 some basic statistical analysis of feedback files. 1169 The other tool is an IDL program called dataplot which uses a graphical interface to972 The other main tool is an IDL program called dataplot which uses a graphical interface to 1170 973 visualise observations and feedback files. 1171 974 OBSTOOLS and dataplot are described in more detail below. … … 1173 976 \subsection{Obstools} 1174 977 1175 A series of \fortran utilities is provided with NEMO called OBSTOOLS. 1176 This are helpful in handling observation files and the feedback file output from the NEMO observation operator. 1177 The utilities are as follows 1178 1179 \subsubsection{c4comb} 1180 1181 The program c4comb combines multiple class 4 files produced by individual processors in 1182 an MPI run of NEMO offline obs\_oper into a single class 4 file. 1183 The program is called in the following way: 1184 1185 1186 \footnotesize 1187 \begin{cmds} 1188 c4comb.exe outputfile inputfile1 inputfile2 ... 1189 \end{cmds} 978 A series of \fortran utilities is provided with \NEMO called OBSTOOLS. 979 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 1190 980 1191 981 \subsubsection{corio2fb} 1192 982 1193 983 The program corio2fb converts profile observation files from the Coriolis format to the standard feedback format. 1194 The program is called in the following way: 1195 1196 \footnotesize 984 It is called in the following way: 985 1197 986 \begin{cmds} 1198 987 corio2fb.exe outputfile inputfile1 inputfile2 ... … … 1202 991 1203 992 The program enact2fb converts profile observation files from the ENACT format to the standard feedback format. 1204 The program is called in the following way: 1205 1206 \footnotesize 993 It is called in the following way: 994 1207 995 \begin{cmds} 1208 996 enact2fb.exe outputfile inputfile1 inputfile2 ... … … 1212 1000 1213 1001 The program fbcomb combines multiple feedback files produced by individual processors in 1214 an MPI run of NEMO into a single feedback file. 1215 The program is called in the following way: 1216 1217 \footnotesize 1002 an MPI run of \NEMO into a single feedback file. 1003 It is called in the following way: 1004 1218 1005 \begin{cmds} 1219 1006 fbcomb.exe outputfile inputfile1 inputfile2 ... … … 1223 1010 1224 1011 The program fbmatchup will match observations from two feedback files. 1225 The program is called in the following way: 1226 1227 \footnotesize 1012 It is called in the following way: 1013 1228 1014 \begin{cmds} 1229 1015 fbmatchup.exe outputfile inputfile1 varname1 inputfile2 varname2 ... … … 1234 1020 The program fbprint will print the contents of a feedback file or files to standard output. 1235 1021 Selected information can be output using optional arguments. 1236 The program is called in the following way: 1237 1238 \footnotesize 1022 It is called in the following way: 1023 1239 1024 \begin{cmds} 1240 1025 fbprint.exe [options] inputfile … … 1246 1031 -B Select observations based on QC flags 1247 1032 -u unsorted 1248 -s ID select station ID 1033 -s ID select station ID 1249 1034 -t TYPE select observation type 1250 -v NUM1-NUM2 select variable range to print by number 1035 -v NUM1-NUM2 select variable range to print by number 1251 1036 (default all) 1252 -a NUM1-NUM2 select additional variable range to print by number 1037 -a NUM1-NUM2 select additional variable range to print by number 1253 1038 (default all) 1254 -e NUM1-NUM2 select extra variable range to print by number 1039 -e NUM1-NUM2 select extra variable range to print by number 1255 1040 (default all) 1256 1041 -d output date range … … 1262 1047 1263 1048 The program fbsel will select or subsample observations. 1264 The program is called in the following way: 1265 1266 \footnotesize 1049 It is called in the following way: 1050 1267 1051 \begin{cmds} 1268 1052 fbsel.exe <input filename> <output filename> … … 1272 1056 1273 1057 The program fbstat will output summary statistics in different global areas into a number of files. 1274 The program is called in the following way: 1275 1276 \footnotesize 1058 It is called in the following way: 1059 1277 1060 \begin{cmds} 1278 1061 fbstat.exe [-nmlev] <filenames> … … 1283 1066 The program fbthin will thin the data to 1 degree resolution. 1284 1067 The code could easily be modified to thin to a different resolution. 1285 The program is called in the following way: 1286 1287 \footnotesize 1068 It is called in the following way: 1069 1288 1070 \begin{cmds} 1289 1071 fbthin.exe inputfile outputfile … … 1293 1075 1294 1076 The program sla2fb will convert an AVISO SLA format file to feedback format. 1295 The program is called in the following way: 1296 1297 \footnotesize 1077 It is called in the following way: 1078 1298 1079 \begin{cmds} 1299 1080 sla2fb.exe [-s type] outputfile inputfile1 inputfile2 ... … … 1306 1087 1307 1088 The program vel2fb will convert TAO/PIRATA/RAMA currents files to feedback format. 1308 The program is called in the following way: 1309 1310 \footnotesize 1089 It is called in the following way: 1090 1311 1091 \begin{cmds} 1312 1092 vel2fb.exe outputfile inputfile1 inputfile2 ... … … 1320 1100 1321 1101 An IDL program called dataplot is included which uses a graphical interface to 1322 visualise observations and feedback files. 1102 visualise observations and feedback files. Note a similar package has recently developed in python (also called dataplot) which does some of the same things that the IDL dataplot does. Please contact the authors of the this chapter if you are interested in this. 1103 1323 1104 It is possible to zoom in, plot individual profiles and calculate some basic statistics. 1324 1105 To plot some data run IDL and then: 1325 \footnotesize 1106 1326 1107 \begin{minted}{idl} 1327 1108 IDL> dataplot, "filename" … … 1331 1112 for example multiple feedback files from different processors or from different days, 1332 1113 the easiest method is to use the spawn command to generate a list of files which can then be passed to dataplot. 1333 \footnotesize 1114 1334 1115 \begin{minted}{idl} 1335 1116 IDL> spawn, 'ls profb*.nc', files … … 1350 1131 The plotting colour range can be changed by clicking on the colour bar. 1351 1132 The title of the plot gives some basic information about the date range and depth range shown, 1352 the extreme values, and the mean and rmsvalues.1133 the extreme values, and the mean and RMS values. 1353 1134 It is possible to zoom in using a drag-box. 1354 1135 You may also zoom in or out using the mouse wheel. … … 1362 1143 observation minus background value. 1363 1144 The next group of radio buttons selects the map projection. 1364 This can either be regular l atitude longitude grid, or north or south polar stereographic.1145 This can either be regular longitude latitude grid, or north or south polar stereographic. 1365 1146 The next group of radio buttons will plot bad observations, switch to salinity and 1366 1147 plot density for profile observations. -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_SBC.tex
r11263 r11353 2 2 3 3 \begin{document} 4 % ================================================================ 5 % Chapter —— Surface Boundary Condition (SBC, ISF, ICB) 6 % ================================================================ 7 \chapter{Surface Boundary Condition (SBC, ISF, ICB)} 4 5 % ================================================================ 6 % Chapter —— Surface Boundary Condition (SBC, SAS, ISF, ICB) 7 % ================================================================ 8 \chapter{Surface Boundary Condition (SBC, SAS, ISF, ICB)} 8 9 \label{chap:SBC} 9 10 \minitoc … … 16 17 %-------------------------------------------------------------------------------------------------------------- 17 18 18 The ocean needs six fields as surface boundary condition: 19 The ocean needs seven fields as surface boundary condition: 20 19 21 \begin{itemize} 20 22 \item … … 26 28 \item 27 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)$ 28 32 \end{itemize} 29 plus an optional field: 33 34 Four different ways are available to provide the seven fields to the ocean. They are controlled by 35 namelist \ngn{namsbc} variables: 36 30 37 \begin{itemize} 31 \item the atmospheric pressure at the ocean surface $\left( p_a \right)$ 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.}). 32 47 \end{itemize} 33 48 34 Four different ways to provide the first six fields to the ocean are available which are controlled by35 namelist \ngn{namsbc} variables:36 an analytical formulation (\np{ln\_ana}\forcode{ = .true.}),37 a flux formulation (\np{ln\_flx}\forcode{ = .true.}),38 a bulk formulae formulation (CORE (\np{ln\_blk\_core}\forcode{ = .true.}),39 CLIO (\np{ln\_blk\_clio}\forcode{ = .true.}) bulk formulae) and40 a coupled or mixed forced/coupled formulation (exchanges with a atmospheric model via the OASIS coupler)41 (\np{ln\_cpl} or \np{ln\_mixcpl}\forcode{ = .true.}).42 When used (\ie \np{ln\_apr\_dyn}\forcode{ = .true.}),43 the atmospheric pressure forces both ocean and ice dynamics.44 49 45 50 The frequency at which the forcing fields have to be updated is given by the \np{nn\_fsbc} namelist parameter. 46 When the fields are supplied from data files (flux and bulk formulations), 47 the input fields need not be supplied on the model grid. 48 Instead a file of coordinates and weights can be supplied which maps the data from the supplied grid to 51 52 When the fields are supplied from data files (bulk, flux and mixed formulations), 53 the input fields do not need to be supplied on the model grid. 54 Instead, a file of coordinates and weights can be supplied to map the data from the input fields grid to 49 55 the model points (so called "Interpolation on the Fly", see \autoref{subsec:SBC_iof}). 50 If the Interpolation on the Fly option is used, input data belonging to land points (in the native grid),51 can be masked to avoid spurious results in proximity of the coastsas56 If the "Interpolation on the Fly" option is used, input data belonging to land points (in the native grid) 57 should be masked or filled to avoid spurious results in proximity of the coasts, as 52 58 large sea-land gradients characterize most of the atmospheric variables. 53 59 54 60 In addition, the resulting fields can be further modified using several namelist options. 55 These options control 61 These options control: 62 56 63 \begin{itemize} 57 64 \item 58 65 the rotation of vector components supplied relative to an east-north coordinate system onto 59 the local grid directions in the model; 60 \item 61 the addition of a surface restoring term to observed SST and/or SSS (\np{ln\_ssr}\forcode{ = .true.}); 62 \item 63 the modification of fluxes below ice-covered areas (using observed ice-cover or a sea-ice model) 64 (\np{nn\_ice}\forcode{ = 0..3}); 65 \item 66 the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln\_rnf}\forcode{ = .true.}); 67 \item 68 the addition of isf melting as lateral inflow (parameterisation) or 69 as fluxes applied at the land-ice ocean interface (\np{ln\_isf}) ; 66 the local grid directions in the model, 67 \item 68 the use of a land/sea mask for input fields (\np{nn\_lsm}\forcode{ = .true.}), 69 \item 70 the addition of a surface restoring term to observed SST and/or SSS (\np{ln\_ssr}\forcode{ = .true.}), 71 \item 72 the modification of fluxes below ice-covered areas (using climatological ice-cover or a sea-ice model) 73 (\np{nn\_ice}\forcode{ = 0..3}), 74 \item 75 the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln\_rnf}\forcode{ = .true.}), 76 \item 77 the addition of ice-shelf melting as lateral inflow (parameterisation) or 78 as fluxes applied at the land-ice ocean interface (\np{ln\_isf}\forcode{ = .true.}), 70 79 \item 71 80 the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift 72 (\np{nn\_fwb}\forcode{ = 0..2}); 73 \item 74 the transformation of the solar radiation (if provided as daily mean) into a diurnal cycle 75 (\np{ln\_dm2dc}\forcode{ = .true.}); 76 \item 77 a neutral drag coefficient can be read from an external wave model (\np{ln\_cdgw}\forcode{ = .true.}); 78 \item 79 the Stokes drift rom an external wave model can be accounted (\np{ln\_sdw}\forcode{ = .true.}); 80 \item 81 the Stokes-Coriolis term can be included (\np{ln\_stcor}\forcode{ = .true.}); 82 \item 83 the surface stress felt by the ocean can be modified by surface waves (\np{ln\_tauwoc}\forcode{ = .true.}). 81 (\np{nn\_fwb}\forcode{ = 0..2}), 82 \item 83 the transformation of the solar radiation (if provided as daily mean) into an analytical diurnal cycle 84 (\np{ln\_dm2dc}\forcode{ = .true.}), 85 \item 86 the activation of wave effects from an external wave model (\np{ln\_wave}\forcode{ = .true.}), 87 \item 88 a neutral drag coefficient is read from an external wave model (\np{ln\_cdgw}\forcode{ = .true.}), 89 \item 90 the Stokes drift from an external wave model is accounted for (\np{ln\_sdw}\forcode{ = .true.}), 91 \item 92 the choice of the Stokes drift profile parameterization (\np{nn\_sdrift}\forcode{ = 0..2}), 93 \item 94 the surface stress given to the ocean is modified by surface waves (\np{ln\_tauwoc}\forcode{ = .true.}), 95 \item 96 the surface stress given to the ocean is read from an external wave model (\np{ln\_tauw}\forcode{ = .true.}), 97 \item 98 the Stokes-Coriolis term is included (\np{ln\_stcor}\forcode{ = .true.}), 99 \item 100 the light penetration in the ocean (\np{ln\_traqsr}\forcode{ = .true.} with namelist \ngn{namtra\_qsr}), 101 \item 102 the atmospheric surface pressure gradient effect on ocean and ice dynamics (\np{ln\_apr\_dyn}\forcode{ = .true.} with namelist \ngn{namsbc\_apr}), 103 \item 104 the effect of sea-ice pressure on the ocean (\np{ln\_ice\_embd}\forcode{ = .true.}). 84 105 \end{itemize} 85 106 86 In this chapter, we first discuss where the surface boundary condition appearsin the model equations.87 Then we present the five ways of providing the surface boundary condition,107 In this chapter, we first discuss where the surface boundary conditions appear in the model equations. 108 Then we present the three ways of providing the surface boundary conditions, 88 109 followed by the description of the atmospheric pressure and the river runoff. 89 Next the scheme for interpolation on the fly is described.110 Next, the scheme for interpolation on the fly is described. 90 111 Finally, the different options that further modify the fluxes applied to the ocean are discussed. 91 112 One of these is modification by icebergs (see \autoref{sec:ICB_icebergs}), … … 95 116 96 117 118 97 119 % ================================================================ 98 120 % Surface boundary condition for the ocean 99 121 % ================================================================ 100 122 \section{Surface boundary condition for the ocean} 101 \label{sec:SBC_ general}123 \label{sec:SBC_ocean} 102 124 103 125 The surface ocean stress is the stress exerted by the wind and the sea-ice on the ocean. … … 111 133 The former is the non penetrative part of the heat flux 112 134 (\ie the sum of sensible, latent and long wave heat fluxes plus 113 the heat content of the mass exchange with the atmosphereand sea-ice).135 the heat content of the mass exchange between the ocean and sea-ice). 114 136 It is applied in \mdl{trasbc} module as a surface boundary condition trend of 115 137 the first level temperature time evolution equation 116 (see \autoref{eq:tra_sbc} and \autoref{eq:tra_sbc_lin} in \autoref{subsec:TRA_sbc}). 138 (see \autoref{eq:tra_sbc} and \autoref{eq:tra_sbc_lin} in \autoref{subsec:TRA_sbc}). 117 139 The latter is the penetrative part of the heat flux. 118 It is applied as a 3D trend sof the temperature equation (\mdl{traqsr} module) when140 It is applied as a 3D trend of the temperature equation (\mdl{traqsr} module) when 119 141 \np{ln\_traqsr}\forcode{ = .true.}. 120 142 The way the light penetrates inside the water column is generally a sum of decreasing exponentials … … 124 146 It represents the mass flux exchanged with the atmosphere (evaporation minus precipitation) and 125 147 possibly with the sea-ice and ice shelves (freezing minus melting of ice). 126 It affects boththe ocean in two different ways:127 $(i)$ it changes the volume of the ocean and therefore appears in the sea surface height equation as148 It affects the ocean in two different ways: 149 $(i)$ it changes the volume of the ocean, and therefore appears in the sea surface height equation as %GS: autoref ssh equation to be added 128 150 a volume flux, and 129 151 $(ii)$ it changes the surface temperature and salinity through the heat and salt contents of 130 the mass exchanged with the atmosphere, the sea-ice and the ice shelves.152 the mass exchanged with atmosphere, sea-ice and ice shelves. 131 153 132 154 … … 157 179 the surface currents, temperature and salinity. 158 180 These variables are averaged over \np{nn\_fsbc} time-step (\autoref{tab:ssm}), and 159 it is these averaged fields which are used to computes the surface fluxes at a frequency of \np{nn\_fsbc} time-step.181 these averaged fields are used to compute the surface fluxes at the frequency of \np{nn\_fsbc} time-steps. 160 182 161 183 … … 165 187 \begin{tabular}{|l|l|l|l|} 166 188 \hline 167 Variable description & Model variable & Units & point \\\hline168 i-component of the surface current & ssu\_m & $m.s^{-1}$ & U \\\hline169 j-component of the surface current & ssv\_m & $m.s^{-1}$ & V\\ \hline170 Sea surface temperature & sst\_m & \r{}$K$ & T \\\hline171 Sea surface salinty & sss\_m & $psu$ & T\\ \hline189 Variable description & Model variable & Units & point \\\hline 190 i-component of the surface current & ssu\_m & $m.s^{-1}$ & U \\\hline 191 j-component of the surface current & ssv\_m & $m.s^{-1}$ & V \\ \hline 192 Sea surface temperature & sst\_m & \r{}$K$ & T \\\hline 193 Sea surface salinty & sss\_m & $psu$ & T \\ \hline 172 194 \end{tabular} 173 195 \caption{ 174 196 \protect\label{tab:ssm} 175 197 Ocean variables provided by the ocean to the surface module (SBC). 176 The variable are averaged over nn{\_}fsbc timestep,198 The variable are averaged over \np{nn\_fsbc} time-step, 177 199 \ie the frequency of computation of surface fluxes. 178 200 } … … 184 206 185 207 208 186 209 % ================================================================ 187 210 % Input Data … … 191 214 192 215 A generic interface has been introduced to manage the way input data 193 (2D or 3D fields, like surface forcing or ocean T and S) are specif yin \NEMO.194 This task is a rchieved by \mdl{fldread}.195 The module was designwith four main objectives in mind:216 (2D or 3D fields, like surface forcing or ocean T and S) are specified in \NEMO. 217 This task is achieved by \mdl{fldread}. 218 The module is designed with four main objectives in mind: 196 219 \begin{enumerate} 197 220 \item 198 optionally provide a time interpolation of the input data atmodel time-step, whatever their input frequency is,221 optionally provide a time interpolation of the input data every specified model time-step, whatever their input frequency is, 199 222 and according to the different calendars available in the model. 200 223 \item … … 204 227 \item 205 228 provide a simple user interface and a rather simple developer interface by 206 limiting the number of prerequisite information .207 \end{enumerate} 208 209 As a result s the user haveonly to fill in for each variable a structure in the namelist file to229 limiting the number of prerequisite informations. 230 \end{enumerate} 231 232 As a result, the user has only to fill in for each variable a structure in the namelist file to 210 233 define the input data file and variable names, the frequency of the data (in hours or months), 211 234 whether its is climatological data or not, the period covered by the input file (one year, month, week or day), 212 and three additional parameters for on-the-fly interpolation.235 and three additional parameters for the on-the-fly interpolation. 213 236 When adding a new input variable, the developer has to add the associated structure in the namelist, 214 237 read this information by mirroring the namelist read in \rou{sbc\_blk\_init} for example, … … 220 243 221 244 Note that when an input data is archived on a disc which is accessible directly from the workspace where 222 the code is executed, then the use can set the \np{cn\_dir} to the pathway leading to the data. 223 By default, the data are assumed to have been copied so that cn\_dir='./'. 245 the code is executed, then the user can set the \np{cn\_dir} to the pathway leading to the data. 246 By default, the data are assumed to be in the same directory as the executable, so that cn\_dir='./'. 247 224 248 225 249 % ------------------------------------------------------------------------------------------------------------- … … 238 262 \begin{description} 239 263 \item[File name]: 240 the stem name of the NetCDF file to be open .264 the stem name of the NetCDF file to be opened. 241 265 This stem will be completed automatically by the model, with the addition of a '.nc' at its end and 242 266 by date information and possibly a prefix (when using AGRIF). … … 249 273 \begin{tabular}{|l|c|c|c|} 250 274 \hline 251 & daily or weekLLL & monthly & yearly\\ \hline252 \np{clim}\forcode{ = .false.} & fn\_yYYYYmMMdDD.nc & fn\_yYYYYmMM.nc &fn\_yYYYY.nc \\ \hline253 \np{clim}\forcode{ = .true.} & not possible & fn\_m??.nc & fn\\ \hline275 & daily or weekLL & monthly & yearly \\ \hline 276 \np{clim}\forcode{ = .false.} & fn\_yYYYYmMMdDD.nc & fn\_yYYYYmMM.nc & fn\_yYYYY.nc \\ \hline 277 \np{clim}\forcode{ = .true.} & not possible & fn\_m??.nc & fn \\ \hline 254 278 \end{tabular} 255 279 \end{center} 256 280 \caption{ 257 281 \protect\label{tab:fldread} 258 naming nomenclature for climatological or interannual input file , as a function of the Open/close frequency.282 naming nomenclature for climatological or interannual input file(s), as a function of the open/close frequency. 259 283 The stem name is assumed to be 'fn'. 260 284 For weekly files, the 'LLL' corresponds to the first three letters of the first day of the week … … 263 287 Note that (1) in mpp, if the file is split over each subdomain, the suffix '.nc' is replaced by '\_PPPP.nc', 264 288 where 'PPPP' is the process number coded with 4 digits; 265 (2) when using AGRIF, the prefix '\_N' is added to files, where 'N' 289 (2) when using AGRIF, the prefix '\_N' is added to files, where 'N' is the child grid number. 266 290 } 267 291 \end{table} … … 273 297 Its unit is in hours if it is positive (for example 24 for daily forcing) or in months if negative 274 298 (for example -1 for monthly forcing or -12 for annual forcing). 275 Note that this frequency must reallybe an integer and not a real.276 On some computers, set ing it to '24.' can be interpreted as 240!299 Note that this frequency must REALLY be an integer and not a real. 300 On some computers, setting it to '24.' can be interpreted as 240! 277 301 278 302 \item[Variable name]: … … 285 309 00h00'00'' to 23h59'59". 286 310 If set to 'true', the forcing will have a broken line shape. 287 Records are assumed to be dated the middle of the forcing period.311 Records are assumed to be dated at the middle of the forcing period. 288 312 For example, when using a daily forcing with time interpolation, 289 313 linear interpolation will be performed between mid-day of two consecutive days. … … 292 316 a logical to specify if a input file contains climatological forcing which can be cycle in time, 293 317 or an interannual forcing which will requires additional files if 294 the period covered by the simulation exceed the one of the file.295 See the above thefile naming strategy which impacts the expected name of the file to be opened.318 the period covered by the simulation exceeds the one of the file. 319 See the above file naming strategy which impacts the expected name of the file to be opened. 296 320 297 321 \item[Open/close frequency]: … … 302 326 Files are assumed to contain data from the beginning of the open/close period. 303 327 For example, the first record of a yearly file containing daily data is Jan 1st even if 304 the experiment is not starting at the beginning of the year. 328 the experiment is not starting at the beginning of the year. 305 329 306 330 \item[Others]: … … 315 339 the date of the records read in the input files. 316 340 Following \citet{leclair.madec_OM09}, the date of a time step is set at the middle of the time step. 317 For example, for an experiment starting at 0h00'00" with a one 341 For example, for an experiment starting at 0h00'00" with a one-hour time-step, 318 342 a time interpolation will be performed at the following time: 0h30'00", 1h30'00", 2h30'00", etc. 319 343 However, for forcing data related to the surface module, 320 344 values are not needed at every time-step but at every \np{nn\_fsbc} time-step. 321 345 For example with \np{nn\_fsbc}\forcode{ = 3}, the surface module will be called at time-steps 1, 4, 7, etc. 322 The date used for the time interpolation is thus redefined to be atthe middle of \np{nn\_fsbc} time-step period.346 The date used for the time interpolation is thus redefined to the middle of \np{nn\_fsbc} time-step period. 323 347 In the previous example, this leads to: 1h30'00", 4h30'00", 7h30'00", etc. \\ 324 348 (2) For code readablility and maintenance issues, we don't take into account the NetCDF input file calendar. … … 326 350 user in the record frequency, the open/close frequency and the type of temporal interpolation. 327 351 For example, the first record of a yearly file containing daily data that will be interpolated in time is assumed to 328 bestart Jan 1st at 12h00'00" and end Dec 31st at 12h00'00". \\352 start Jan 1st at 12h00'00" and end Dec 31st at 12h00'00". \\ 329 353 (3) If a time interpolation is requested, the code will pick up the needed data in the previous (next) file when 330 354 interpolating data with the first (last) record of the open/close period. … … 334 358 If the forcing is climatological, Dec and Jan will be keep-up from the same year. 335 359 However, if the forcing is not climatological, at the end of 336 the open/close period the code will automatically close the current file and open the next one.360 the open/close period, the code will automatically close the current file and open the next one. 337 361 Note that, if the experiment is starting (ending) at the beginning (end) of 338 an open/close period we do accept that the previous (next) file is not existing.362 an open/close period, we do accept that the previous (next) file is not existing. 339 363 In this case, the time interpolation will be performed between two identical values. 340 364 For example, when starting an experiment on Jan 1st of year Y with yearly files and daily data to be interpolated, … … 354 378 Interpolation on the Fly allows the user to supply input files required for the surface forcing on 355 379 grids other than the model grid. 356 To do this he or she must supply, in addition to the source data file, a file of weights to be used to380 To do this, he or she must supply, in addition to the source data file(s), a file of weights to be used to 357 381 interpolate from the data grid to the model grid. 358 382 The original development of this code used the SCRIP package 359 383 (freely available \href{http://climate.lanl.gov/Software/SCRIP}{here} under a copyright agreement). 360 In principle, any package can be used to generate the weights, but the variables in384 In principle, any package such as CDO can be used to generate the weights, but the variables in 361 385 the input weights file must have the same names and meanings as assumed by the model. 362 Two methods are currently available: bilinear and bicubic interpolation .386 Two methods are currently available: bilinear and bicubic interpolations. 363 387 Prior to the interpolation, providing a land/sea mask file, the user can decide to remove land points from 364 388 the input file and substitute the corresponding values with the average of the 8 neighbouring points in … … 366 390 Only "sea points" are considered for the averaging. 367 391 The land/sea mask file must be provided in the structure associated with the input variable. 368 The netcdf land/sea mask variable name must be 'LSM' it must have the same horizontal and vertical dimensions of 369 the associated variable and should be equal to 1 over land and 0 elsewhere. 370 The procedure can be recursively applied setting nn\_lsm > 1 in namsbc namelist. 371 Note that nn\_lsm=0 forces the code to not apply the procedure even if a file for land/sea mask is supplied. 372 392 The netcdf land/sea mask variable name must be 'LSM' and must have the same horizontal and vertical dimensions as 393 the associated variables and should be equal to 1 over land and 0 elsewhere. 394 The procedure can be recursively applied by setting nn\_lsm > 1 in namsbc namelist. 395 Note that nn\_lsm=0 forces the code to not apply the procedure, even if a land/sea mask file is supplied. 396 397 398 % ------------------------------------------------------------------------------------------------------------- 399 % Bilinear interpolation 400 % ------------------------------------------------------------------------------------------------------------- 373 401 \subsubsection{Bilinear interpolation} 374 402 \label{subsec:SBC_iof_bilinear} … … 376 404 The input weights file in this case has two sets of variables: 377 405 src01, src02, src03, src04 and wgt01, wgt02, wgt03, wgt04. 378 The "src" variables correspond to the point in the input grid to which the weight "wgt" is to beapplied.406 The "src" variables correspond to the point in the input grid to which the weight "wgt" is applied. 379 407 Each src value is an integer corresponding to the index of a point in the input grid when 380 408 written as a one dimensional array. … … 392 420 and wgt(1) corresponds to variable "wgt01" for example. 393 421 422 423 % ------------------------------------------------------------------------------------------------------------- 424 % Bicubic interpolation 425 % ------------------------------------------------------------------------------------------------------------- 394 426 \subsubsection{Bicubic interpolation} 395 427 \label{subsec:SBC_iof_bicubic} 396 428 397 Again there are two sets of variables: "src" and "wgt".398 But in this case there are 16 of each.429 Again, there are two sets of variables: "src" and "wgt". 430 But in this case, there are 16 of each. 399 431 The symbolic algorithm used to calculate values on the model grid is now: 400 432 … … 402 434 \begin{split} 403 435 f_{m}(i,j) = f_{m}(i,j) +& \sum_{k=1}^{4} {wgt(k)f(idx(src(k)))} 404 + \sum_{k=5}^{8} {wgt(k)\left.\frac{\partial f}{\partial i}\right| _{idx(src(k))} } \\405 +& \sum_{k=9 }^{12} {wgt(k)\left.\frac{\partial f}{\partial j}\right| _{idx(src(k))} }406 + 436 + \sum_{k=5 }^{8 } {wgt(k)\left.\frac{\partial f}{\partial i}\right| _{idx(src(k))} } \\ 437 +& \sum_{k=9 }^{12} {wgt(k)\left.\frac{\partial f}{\partial j}\right| _{idx(src(k))} } 438 + \sum_{k=13}^{16} {wgt(k)\left.\frac{\partial ^2 f}{\partial i \partial j}\right| _{idx(src(k))} } 407 439 \end{split} 408 440 \] 409 441 The gradients here are taken with respect to the horizontal indices and not distances since 410 the spatial dependency has been absorbed into the weights. 411 442 the spatial dependency has been included into the weights. 443 444 445 % ------------------------------------------------------------------------------------------------------------- 446 % Implementation 447 % ------------------------------------------------------------------------------------------------------------- 412 448 \subsubsection{Implementation} 413 449 \label{subsec:SBC_iof_imp} … … 421 457 inspecting a global attribute stored in the weights input file. 422 458 This attribute must be called "ew\_wrap" and be of integer type. 423 If it is negative, the input non-model grid is assumed not to becyclic.459 If it is negative, the input non-model grid is assumed to be not cyclic. 424 460 If zero or greater, then the value represents the number of columns that overlap. 425 461 $E.g.$ if the input grid has columns at longitudes 0, 1, 2, .... , 359, then ew\_wrap should be set to 0; 426 462 if longitudes are 0.5, 2.5, .... , 358.5, 360.5, 362.5, ew\_wrap should be 2. 427 463 If the model does not find attribute ew\_wrap, then a value of -999 is assumed. 428 In this case the \rou{fld\_read} routine defaults ew\_wrap to value 0 and464 In this case, the \rou{fld\_read} routine defaults ew\_wrap to value 0 and 429 465 therefore the grid is assumed to be cyclic with no overlapping columns. 430 (In fact this only matters when bicubic interpolation is required.)466 (In fact, this only matters when bicubic interpolation is required.) 431 467 Note that no testing is done to check the validity in the model, 432 468 since there is no way of knowing the name used for the longitude variable, … … 445 481 or is a copy of one from the first few columns on the opposite side of the grid (cyclical case). 446 482 483 484 % ------------------------------------------------------------------------------------------------------------- 485 % Limitations 486 % ------------------------------------------------------------------------------------------------------------- 447 487 \subsubsection{Limitations} 448 488 \label{subsec:SBC_iof_lim} … … 450 490 \begin{enumerate} 451 491 \item 452 The case where input data grids are not logically rectangular has not been tested.492 The case where input data grids are not logically rectangular (irregular grid case) has not been tested. 453 493 \item 454 494 This code is not guaranteed to produce positive definite answers from positive definite inputs when … … 471 511 (see the directory NEMOGCM/TOOLS/WEIGHTS). 472 512 513 473 514 % ------------------------------------------------------------------------------------------------------------- 474 515 % Standalone Surface Boundary Condition Scheme 475 516 % ------------------------------------------------------------------------------------------------------------- 476 \subsection{Standalone surface boundary condition scheme }477 \label{subsec:SAS _iof}478 479 %---------------------------------------namsbc_ ana--------------------------------------------------517 \subsection{Standalone surface boundary condition scheme (SAS)} 518 \label{subsec:SAS} 519 520 %---------------------------------------namsbc_sas-------------------------------------------------- 480 521 481 522 \nlst{namsbc_sas} 482 523 %-------------------------------------------------------------------------------------------------------------- 483 524 484 In some circumstances it may be useful to avoid calculating the 3D temperature,525 In some circumstances, it may be useful to avoid calculating the 3D temperature, 485 526 salinity and velocity fields and simply read them in from a previous run or receive them from OASIS. 486 527 For example: … … 497 538 Spinup of the iceberg floats 498 539 \item 499 Ocean/sea-ice simulation with both m ediarunning in parallel (\np{ln\_mixcpl}\forcode{ = .true.})540 Ocean/sea-ice simulation with both models running in parallel (\np{ln\_mixcpl}\forcode{ = .true.}) 500 541 \end{itemize} 501 542 502 The Stand Alone Surface scheme provides this utility.543 The Standalone Surface scheme provides this capacity. 503 544 Its options are defined through the \ngn{namsbc\_sas} namelist variables. 504 545 A new copy of the model has to be compiled with a configuration based on ORCA2\_SAS\_LIM. 505 However no namelist parameters need be changed from the settings of the previous run (except perhaps nn{\_}date0).546 However, no namelist parameters need be changed from the settings of the previous run (except perhaps nn{\_}date0). 506 547 In this configuration, a few routines in the standard model are overriden by new versions. 507 548 Routines replaced are: … … 525 566 so calls to restart functions have been removed. 526 567 This also means that the calendar cannot be controlled by time in a restart file, 527 so the user must make surethat nn{\_}date0 in the model namelist is correct for his or her purposes.568 so the user must check that nn{\_}date0 in the model namelist is correct for his or her purposes. 528 569 \item 529 570 \mdl{stpctl}: … … 544 585 velocity arrays at the surface. 545 586 These filenames are supplied in namelist namsbc{\_}sas. 546 Unfortunately because of limitations with the \mdl{iom} module,587 Unfortunately, because of limitations with the \mdl{iom} module, 547 588 the full 3D fields from the mean files have to be read in and interpolated in time, 548 589 before using just the top level. … … 551 592 552 593 553 % Missing the description of the 2 following variables: 554 % ln_3d_uve = .true. ! specify whether we are supplying a 3D u,v and e3 field 555 % ln_read_frq = .false. ! specify whether we must read frq or not 556 557 558 559 % ================================================================ 560 % Analytical formulation (sbcana module) 561 % ================================================================ 562 \section[Analytical formulation (\textit{sbcana.F90})] 563 {Analytical formulation (\protect\mdl{sbcana})} 564 \label{sec:SBC_ana} 565 566 %---------------------------------------namsbc_ana-------------------------------------------------- 567 % 568 %\nlst{namsbc_ana} 569 %-------------------------------------------------------------------------------------------------------------- 570 571 The analytical formulation of the surface boundary condition is the default scheme. 572 In this case, all the six fluxes needed by the ocean are assumed to be uniform in space. 573 They take constant values given in the namelist \ngn{namsbc{\_}ana} by 574 the variables \np{rn\_utau0}, \np{rn\_vtau0}, \np{rn\_qns0}, \np{rn\_qsr0}, and \np{rn\_emp0} 575 ($\textit{emp}=\textit{emp}_S$). 576 The runoff is set to zero. 577 In addition, the wind is allowed to reach its nominal value within a given number of time steps (\np{nn\_tau000}). 578 579 If a user wants to apply a different analytical forcing, 580 the \mdl{sbcana} module can be modified to use another scheme. 581 As an example, the \mdl{sbc\_ana\_gyre} routine provides the analytical forcing for the GYRE configuration 582 (see GYRE configuration manual, in preparation). 594 The user can also choose in the \ngn{namsbc\_sas} namelist to read the mean (nn\_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level using 595 (\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. 596 583 597 584 598 … … 605 619 606 620 621 607 622 % ================================================================ 608 623 % Bulk formulation 609 624 % ================================================================ 610 \section[Bulk formulation {(\textit{sbcblk\{\_core,\_clio\}.F90})}]611 {Bulk formulation {(\protect\mdl{sbcblk\_core}, \protect\mdl{sbcblk\_clio})}}625 \section[Bulk formulation (\textit{sbcblk.F90})] 626 {Bulk formulation (\protect\mdl{sbcblk})} 612 627 \label{sec:SBC_blk} 613 614 In the bulk formulation, the surface boundary condition fields are computed using bulk formulae and atmospheric fields and ocean (and ice) variables. 628 %---------------------------------------namsbc_blk-------------------------------------------------- 629 630 \nlst{namsbc_blk} 631 %-------------------------------------------------------------------------------------------------------------- 632 633 In the bulk formulation, the surface boundary condition fields are computed with bulk formulae using atmospheric fields 634 and ocean (and sea-ice) variables averaged over \np{nn\_fsbc} time-step. 615 635 616 636 The atmospheric fields used depend on the bulk formulae used. 617 Two bulk formulations are available: 618 the CORE and the CLIO bulk formulea. 637 In forced mode, when a sea-ice model is used, a specific bulk formulation is used. 638 Therefore, different bulk formulae are used for the turbulent fluxes computation 639 over the ocean and over sea-ice surface. 640 For the ocean, four bulk formulations are available thanks to the \href{https://brodeau.github.io/aerobulk/}{Aerobulk} package (\citet{brodeau.barnier.ea_JPO16}): 641 the NCAR (formerly named CORE), COARE 3.0, COARE 3.5 and ECMWF bulk formulae. 619 642 The choice is made by setting to true one of the following namelist variable: 620 \np{ln\_core} or \np{ln\_clio}. 621 622 Note: 623 in forced mode, when a sea-ice model is used, a bulk formulation (CLIO or CORE) have to be used. 624 Therefore the two bulk (CLIO and CORE) formulea include the computation of the fluxes over 625 both an ocean and an ice surface. 626 627 % ------------------------------------------------------------------------------------------------------------- 628 % CORE Bulk formulea 629 % ------------------------------------------------------------------------------------------------------------- 630 \subsection[CORE formulea (\textit{sbcblk\_core.F90}, \forcode{ln_core = .true.})] 631 {CORE formulea (\protect\mdl{sbcblk\_core}, \protect\np{ln\_core}\forcode{ = .true.})} 632 \label{subsec:SBC_blk_core} 633 %------------------------------------------namsbc_core---------------------------------------------------- 634 % 635 %\nlst{namsbc_core} 636 %------------------------------------------------------------------------------------------------------------- 637 638 The CORE bulk formulae have been developed by \citet{large.yeager_rpt04}. 639 They have been designed to handle the CORE forcing, a mixture of NCEP reanalysis and satellite data. 640 They use an inertial dissipative method to compute the turbulent transfer coefficients 641 (momentum, sensible heat and evaporation) from the 10 metre wind speed, air temperature and specific humidity. 642 This \citet{large.yeager_rpt04} dataset is available through 643 the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/CORE.html}{GFDL web site}. 644 645 Note that substituting ERA40 to NCEP reanalysis fields does not require changes in the bulk formulea themself. 646 This is the so-called DRAKKAR Forcing Set (DFS) \citep{brodeau.barnier.ea_OM10}. 647 648 Options are defined through the \ngn{namsbc\_core} namelist variables. 649 The required 8 input fields are: 643 \np{ln\_NCAR}, \np{ln\_COARE\_3p0}, \np{ln\_COARE\_3p5} and \np{ln\_ECMWF}. 644 For sea-ice, three possibilities can be selected: 645 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}) parameterizations 646 647 Common options are defined through the \ngn{namsbc\_blk} namelist variables. 648 The required 9 input fields are: 650 649 651 650 %--------------------------------------------------TABLE-------------------------------------------------- 652 651 \begin{table}[htbp] 653 \label{tab: CORE}652 \label{tab:BULK} 654 653 \begin{center} 655 654 \begin{tabular}{|l|c|c|c|} 656 655 \hline 657 Variable desciption & Model variable & Units & point \\ \hline 658 i-component of the 10m air velocity & utau & $m.s^{-1}$ & T \\ \hline 659 j-component of the 10m air velocity & vtau & $m.s^{-1}$ & T \\ \hline 660 10m air temperature & tair & \r{}$K$ & T \\ \hline 661 Specific humidity & humi & \% & T \\ \hline 662 Incoming long wave radiation & qlw & $W.m^{-2}$ & T \\ \hline 663 Incoming short wave radiation & qsr & $W.m^{-2}$ & T \\ \hline 664 Total precipitation (liquid + solid) & precip & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 665 Solid precipitation & snow & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 656 Variable description & Model variable & Units & point \\ \hline 657 i-component of the 10m air velocity & utau & $m.s^{-1}$ & T \\ \hline 658 j-component of the 10m air velocity & vtau & $m.s^{-1}$ & T \\ \hline 659 10m air temperature & tair & \r{}$K$ & T \\ \hline 660 Specific humidity & humi & \% & T \\ \hline 661 Incoming long wave radiation & qlw & $W.m^{-2}$ & T \\ \hline 662 Incoming short wave radiation & qsr & $W.m^{-2}$ & T \\ \hline 663 Total precipitation (liquid + solid) & precip & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 664 Solid precipitation & snow & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 665 Mean sea-level pressure & slp & $hPa$ & T \\ \hline 666 666 \end{tabular} 667 667 \end{center} … … 682 682 \np{rn\_zu}: is the height of wind measurements (m) 683 683 684 Three multiplicative factors are available s:685 \np{rn\_pfac} and \np{rn\_efac} allow sto adjust (if necessary) the global freshwater budget by684 Three multiplicative factors are available: 685 \np{rn\_pfac} and \np{rn\_efac} allow to adjust (if necessary) the global freshwater budget by 686 686 increasing/reducing the precipitations (total and snow) and or evaporation, respectively. 687 687 The third one,\np{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account in 688 688 the calculation of surface wind stress. 689 Its range should be between zero and one, and it is recommended to set it to 0. 690 691 % ------------------------------------------------------------------------------------------------------------- 692 % CLIO Bulk formulea 693 % ------------------------------------------------------------------------------------------------------------- 694 \subsection[CLIO formulea (\textit{sbcblk\_clio.F90}, \forcode{ln_clio = .true.})] 695 {CLIO formulea (\protect\mdl{sbcblk\_clio}, \protect\np{ln\_clio}\forcode{ = .true.})} 696 \label{subsec:SBC_blk_clio} 697 %------------------------------------------namsbc_clio---------------------------------------------------- 698 % 699 %\nlst{namsbc_clio} 700 %------------------------------------------------------------------------------------------------------------- 701 702 The CLIO bulk formulae were developed several years ago for the Louvain-la-neuve coupled ice-ocean model 703 (CLIO, \cite{goosse.deleersnijder.ea_JGR99}). 704 They are simpler bulk formulae. 705 They assume the stress to be known and compute the radiative fluxes from a climatological cloud cover. 706 707 Options are defined through the \ngn{namsbc\_clio} namelist variables. 708 The required 7 input fields are: 709 710 %--------------------------------------------------TABLE-------------------------------------------------- 711 \begin{table}[htbp] 712 \label{tab:CLIO} 713 \begin{center} 714 \begin{tabular}{|l|l|l|l|} 715 \hline 716 Variable desciption & Model variable & Units & point \\ \hline 717 i-component of the ocean stress & utau & $N.m^{-2}$ & U \\ \hline 718 j-component of the ocean stress & vtau & $N.m^{-2}$ & V \\ \hline 719 Wind speed module & vatm & $m.s^{-1}$ & T \\ \hline 720 10m air temperature & tair & \r{}$K$ & T \\ \hline 721 Specific humidity & humi & \% & T \\ \hline 722 Cloud cover & & \% & T \\ \hline 723 Total precipitation (liquid + solid) & precip & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 724 Solid precipitation & snow & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 725 \end{tabular} 726 \end{center} 727 \end{table} 728 %-------------------------------------------------------------------------------------------------------------- 689 Its range must be between zero and one, and it is recommended to set it to 0 at low-resolution (ORCA2 configuration). 729 690 730 691 As for the flux formulation, information about the input data required by the model is provided in 731 the namsbc\_blk\_core or namsbc\_blk\_clio namelist (see \autoref{subsec:SBC_fldread}). 692 the namsbc\_blk namelist (see \autoref{subsec:SBC_fldread}). 693 694 695 % ------------------------------------------------------------------------------------------------------------- 696 % Ocean-Atmosphere Bulk formulae 697 % ------------------------------------------------------------------------------------------------------------- 698 \subsection{Ocean-Atmosphere Bulk formulae} 699 %\subsection[Ocean-Atmosphere Bulk formulae (\textit{sbcblk_algo\{\_ncar,\_coare,\_coare3p5,\_ecmwf}.F90})] 700 \label{subsec:SBC_blk_ocean} 701 702 Four different bulk algorithms are available to compute surface turbulent momentum and heat fluxes over the ocean. 703 COARE 3.0, COARE 3.5 and ECMWF schemes mainly differ by their roughness lenghts computation and consequently 704 their neutral transfer coefficients relationships with neutral wind. 705 \begin{itemize} 706 \item 707 NCAR (\np{ln\_NCAR}\forcode{ = .true.}): 708 The NCAR bulk formulae have been developed by \citet{large.yeager_rpt04}. 709 They have been designed to handle the NCAR forcing, a mixture of NCEP reanalysis and satellite data. 710 They use an inertial dissipative method to compute the turbulent transfer coefficients 711 (momentum, sensible heat and evaporation) from the 10m wind speed, air temperature and specific humidity. 712 This \citet{large.yeager_rpt04} dataset is available through 713 the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/NCAR.html}{GFDL web site}. 714 Note that substituting ERA40 to NCEP reanalysis fields does not require changes in the bulk formulea themself. 715 This is the so-called DRAKKAR Forcing Set (DFS) \citep{brodeau.barnier.ea_OM10}. 716 \item 717 COARE 3.0 (\np{ln\_COARE\_3p0}\forcode{ = .true.}): 718 See \citet{fairall.bradley.ea_JC03} for more details 719 \item 720 COARE 3.5 (\np{ln\_COARE\_3p5}\forcode{ = .true.}): 721 See \citet{edson.jampana.ea_JPO13} for more details 722 \item 723 ECMWF (\np{ln\_ECMWF}\forcode{ = .true.}): 724 Based on \href{https://www.ecmwf.int/node/9221}{IFS (Cy31)} implementation and documentation. 725 Surface roughness lengths needed for the Obukhov length are computed following \citet{beljaars_QJRMS95}. 726 \end{itemize} 727 728 729 % ------------------------------------------------------------------------------------------------------------- 730 % Ice-Atmosphere Bulk formulae 731 % ------------------------------------------------------------------------------------------------------------- 732 \subsection{ Ice-Atmosphere Bulk formulae } 733 \label{subsec:SBC_blk_ice} 734 735 Surface turbulent fluxes between sea-ice and the atmosphere can be computed in three different ways: 736 737 \begin{itemize} 738 \item 739 Constant value (\np{constant\ value}\forcode{ Cd_ice = 1.4e-3 }): 740 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.}): 743 This scheme adds a dependency on edges at leads, melt ponds and flows 744 of the constant neutral air-ice drag. After some approximations, 745 this can be resumed to a dependency on ice concentration (A). 746 This drag coefficient has a parabolic shape (as a function of ice concentration) 747 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 It is theoretically applicable to all ice conditions (not only MIZ). 749 \item 750 \citet{lupkes.gryanik_JGR15} (\np{ln\_Cd\_L15}\forcode{ = .true.}): 751 Alternative turbulent transfer coefficients formulation between sea-ice 752 and atmosphere with distinct momentum and heat coefficients depending 753 on sea-ice concentration and atmospheric stability (no melt-ponds effect for now). 754 The parameterization is adapted from ECHAM6 atmospheric model. 755 Compared to Lupkes2012 scheme, it considers specific skin and form drags 756 to compute neutral transfer coefficients for both heat and momentum fluxes. 757 Atmospheric stability effect on transfer coefficient is also taken into account. 758 \end{itemize} 759 760 732 761 733 762 % ================================================================ … … 743 772 744 773 In the coupled formulation of the surface boundary condition, 745 the fluxes are provided by the OASIS coupler at a frequency which is defined in the OASIS coupler ,774 the fluxes are provided by the OASIS coupler at a frequency which is defined in the OASIS coupler namelist, 746 775 while sea and ice surface temperature, ocean and ice albedo, and ocean currents are sent to 747 776 the atmospheric component. 748 777 749 778 A generalised coupled interface has been developed. 750 It is currently interfaced with OASIS-3-MCT (\key{oasis3}). 779 It is currently interfaced with OASIS-3-MCT versions 1 to 4 (\key{oasis3}). 780 An additional specific CPP key (\key{oa3mct\_v1v2}) is needed for OASIS-3-MCT versions 1 and 2. 751 781 It has been successfully used to interface \NEMO to most of the European atmospheric GCM 752 782 (ARPEGE, ECHAM, ECMWF, HadAM, HadGAM, LMDz), as well as to \href{http://wrf-model.org/}{WRF} 753 783 (Weather Research and Forecasting Model). 754 784 755 Note that in addition to the setting of \np{ln\_cpl} to true, the \key{coupled} have to be defined. 756 The CPP key is mainly used in sea-ice to ensure that the atmospheric fluxes are actually received by 757 the ice-ocean system (no calculation of ice sublimation in coupled mode). 758 When PISCES biogeochemical model (\key{top} and \key{pisces}) is also used in the coupled system, 759 the whole carbon cycle is computed by defining \key{cpl\_carbon\_cycle}. 785 When PISCES biogeochemical model (\key{top}) is also used in the coupled system, 786 the whole carbon cycle is computed. 760 787 In this case, CO$_2$ fluxes will be exchanged between the atmosphere and the ice-ocean system 761 788 (and need to be activated in \ngn{namsbc{\_}cpl} ). … … 763 790 The namelist above allows control of various aspects of the coupling fields (particularly for vectors) and 764 791 now allows for any coupling fields to have multiple sea ice categories (as required by LIM3 and CICE). 765 When indicating a multi-category coupling field in namsbc{\_}cplthe number of categories will be determined by792 When indicating a multi-category coupling field in \ngn{namsbc{\_}cpl}, the number of categories will be determined by 766 793 the number used in the sea ice model. 767 In some limited cases it may be possible to specify single category coupling fields even when794 In some limited cases, it may be possible to specify single category coupling fields even when 768 795 the sea ice model is running with multiple categories - 769 in this case the user should examine the code to be sure the assumptions made are satisfactory. 770 In cases where this is definitely not possible the model should abort with an error message. 771 The new code has been tested using ECHAM with LIM2, and HadGAM3 with CICE but 772 although it will compile with \key{lim3} additional minor code changes may be required to run using LIM3. 796 in this case, the user should examine the code to be sure the assumptions made are satisfactory. 797 In cases where this is definitely not possible, the model should abort with an error message. 798 773 799 774 800 … … 785 811 786 812 The optional atmospheric pressure can be used to force ocean and ice dynamics 787 (\np{ln\_apr\_dyn}\forcode{ = .true.}, \ textit{\ngn{namsbc}} namelist).788 The input atmospheric forcing defined via \np{sn\_apr} structure (\ textit{namsbc\_apr} namelist)813 (\np{ln\_apr\_dyn}\forcode{ = .true.}, \ngn{namsbc} namelist). 814 The input atmospheric forcing defined via \np{sn\_apr} structure (\ngn{namsbc\_apr} namelist) 789 815 can be interpolated in time to the model time step, and even in space when the interpolation on-the-fly is used. 790 816 When used to force the dynamics, the atmospheric pressure is further transformed into … … 796 822 where $P_{atm}$ is the atmospheric pressure and $P_o$ a reference atmospheric pressure. 797 823 A value of $101,000~N/m^2$ is used unless \np{ln\_ref\_apr} is set to true. 798 In this case $P_o$ is set to the value of $P_{atm}$ averaged over the ocean domain,799 \ie the mean value of $\eta_{ib}$ is kept to zero at all time step .824 In this case, $P_o$ is set to the value of $P_{atm}$ averaged over the ocean domain, 825 \ie the mean value of $\eta_{ib}$ is kept to zero at all time steps. 800 826 801 827 The gradient of $\eta_{ib}$ is added to the RHS of the ocean momentum equation (see \mdl{dynspg} for the ocean). 802 828 For sea-ice, the sea surface height, $\eta_m$, which is provided to the sea ice model is set to $\eta - \eta_{ib}$ 803 829 (see \mdl{sbcssr} module). 804 $\eta_{ib}$ can be setin the output.830 $\eta_{ib}$ can be written in the output. 805 831 This can simplify altimetry data and model comparison as 806 832 inverse barometer sea surface height is usually removed from these date prior to their distribution. … … 809 835 the equivalent inverse barometer sea surface height $\eta_{ib}$ can be added to BDY ssh data: 810 836 \np{ln\_apr\_obc} might be set to true. 837 838 811 839 812 840 % ================================================================ … … 835 863 The equilibrium tidal forcing is expressed as a sum over a subset of 836 864 constituents chosen from the set of available tidal constituents 837 defined in file \ rou{SBC/tide.h90} (this comprises the tidal865 defined in file \textit{SBC/tide.h90} (this comprises the tidal 838 866 constituents \textit{M2, N2, 2N2, S2, K2, K1, O1, Q1, P1, M4, Mf, Mm, 839 867 Msqm, Mtm, S1, MU2, NU2, L2}, and \textit{T2}). Individual … … 850 878 discussion about the practical implementation of this term). 851 879 Nevertheless, the complex calculations involved would make this 852 computationally too expensive. 880 computationally too expensive. Here, two options are available: 853 881 $\Pi_{sal}$ generated by an external model can be read in 854 882 (\np{ln\_read\_load=.true.}), or a ``scalar approximation'' can be … … 861 889 errors. Setting both \np{ln\_read\_load} and \np{ln\_scal\_load} to 862 890 \forcode{.false.} removes the SAL contribution. 891 892 863 893 864 894 % ================================================================ … … 944 974 As such the volume of water does not change, but the water is diluted. 945 975 946 For the non-linear free surface case (\key{vvl}), no flux is allowed through the surface.976 For the non-linear free surface case, no flux is allowed through the surface. 947 977 Instead in the surface box (as well as water moving up from the boxes below) a volume of runoff water is added with 948 978 no corresponding heat and salt addition and so as happens in the lower boxes there is a dilution effect. … … 987 1017 %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: 988 1018 989 %} 1019 1020 990 1021 % ================================================================ 991 1022 % Ice shelf melting … … 998 1029 \nlst{namsbc_isf} 999 1030 %-------------------------------------------------------------------------------------------------------- 1031 1000 1032 The namelist variable in \ngn{namsbc}, \np{nn\_isf}, controls the ice shelf representation. 1001 1033 Description and result of sensitivity test to \np{nn\_isf} are presented in \citet{mathiot.jenkins.ea_GMD17}. … … 1003 1035 1004 1036 \begin{description} 1005 \item[\np{nn\_isf}\forcode{ = 1}]: 1037 1038 \item[\np{nn\_isf}\forcode{ = 1}]: 1006 1039 The ice shelf cavity is represented (\np{ln\_isfcav}\forcode{ = .true.} needed). 1007 1040 The fwf and heat flux are depending of the local water properties. 1041 1008 1042 Two different bulk formulae are available: 1009 1043 … … 1060 1094 This formulation has not been extensively tested in NEMO (not recommended). 1061 1095 \end{description} 1062 \item[\np{nn\_isf}\forcode{ = 2}]:1096 \item[\np{nn\_isf}\forcode{ = 2}]: 1063 1097 The ice shelf cavity is not represented. 1064 1098 The fwf and heat flux are computed using the \citet{beckmann.goosse_OM03} parameterisation of isf melting. … … 1067 1101 (\np{sn\_depmin\_isf}) as in (\np{nn\_isf}\forcode{ = 3}). 1068 1102 The effective melting length (\np{sn\_Leff\_isf}) is read from a file. 1069 \item[\np{nn\_isf}\forcode{ = 3}]:1103 \item[\np{nn\_isf}\forcode{ = 3}]: 1070 1104 The ice shelf cavity is not represented. 1071 1105 The fwf (\np{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between … … 1073 1107 the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}). 1074 1108 The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 1075 \item[\np{nn\_isf}\forcode{ = 4}]:1109 \item[\np{nn\_isf}\forcode{ = 4}]: 1076 1110 The ice shelf cavity is opened (\np{ln\_isfcav}\forcode{ = .true.} needed). 1077 1111 However, the fwf is not computed but specified from file \np{sn\_fwfisf}). … … 1108 1142 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1109 1143 1144 1145 1146 % ================================================================ 1147 % Ice sheet coupling 1148 % ================================================================ 1110 1149 \section{Ice sheet coupling} 1111 1150 \label{sec:SBC_iscpl} … … 1114 1153 \nlst{namsbc_iscpl} 1115 1154 %-------------------------------------------------------------------------------------------------------- 1155 1116 1156 Ice sheet/ocean coupling is done through file exchange at the restart step. 1117 1157 At each restart step: 1158 1118 1159 \begin{description} 1119 1160 \item[Step 1]: the ice sheet model send a new bathymetry and ice shelf draft netcdf file. … … 1127 1168 potentially some new wet/dry cells due to the ice sheet dynamics/thermodynamics. 1128 1169 The wetting and drying scheme applied on the restart is very simple and described below for the 6 different possible cases: 1170 1129 1171 \begin{description} 1130 1172 \item[Thin a cell down]: … … 1165 1207 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). 1166 1208 1167 % 1209 1210 1168 1211 % ================================================================ 1169 1212 % Handling of icebergs … … 1196 1239 the geographical box: lonmin,lonmax,latmin,latmax 1197 1240 \item[\np{nn\_test\_icebergs}\forcode{ = -1}] 1198 In this scheme the model reads a calving file supplied in the \np{sn\_icb} parameter.1241 In this scheme, the model reads a calving file supplied in the \np{sn\_icb} parameter. 1199 1242 This should be a file with a field on the configuration grid (typically ORCA) 1200 1243 representing ice accumulation rate at each model point. … … 1234 1277 since its trajectory data may be spread across multiple files. 1235 1278 1236 % ------------------------------------------------------------------------------------------------------------- 1279 1280 1281 % ============================================================================================================= 1237 1282 % Interactions with waves (sbcwave.F90, ln_wave) 1238 % -------------------------------------------------------------------------------------------------------------1283 % ============================================================================================================= 1239 1284 \section[Interactions with waves (\textit{sbcwave.F90}, \texttt{ln\_wave})] 1240 1285 {Interactions with waves (\protect\mdl{sbcwave}, \protect\np{ln\_wave})} … … 1252 1297 1253 1298 Physical processes related to ocean surface waves can be accounted by setting the logical variable 1254 \np{ln\_wave} \forcode{= .true.} in \ngn{namsbc} namelist. In addition, specific flags accounting for1255 different p orcesses should be activated as explained in the following sections.1299 \np{ln\_wave} \forcode{= .true.} in \ngn{namsbc} namelist. In addition, specific flags accounting for 1300 different processes should be activated as explained in the following sections. 1256 1301 1257 1302 Wave fields can be provided either in forced or coupled mode: … … 1265 1310 1266 1311 1267 % ================================================================1312 % ---------------------------------------------------------------- 1268 1313 % Neutral drag coefficient from wave model (ln_cdgw) 1269 1314 1270 % ================================================================1315 % ---------------------------------------------------------------- 1271 1316 \subsection[Neutral drag coefficient from wave model (\texttt{ln\_cdgw})] 1272 1317 {Neutral drag coefficient from wave model (\protect\np{ln\_cdgw})} … … 1275 1320 The neutral surface drag coefficient provided from an external data source (\ie a wave model), 1276 1321 can be used by setting the logical variable \np{ln\_cdgw} \forcode{= .true.} in \ngn{namsbc} namelist. 1277 Then using the routine \rou{ turb\_ncar} and starting from the neutral drag coefficent provided,1322 Then using the routine \rou{sbcblk\_algo\_ncar} and starting from the neutral drag coefficent provided, 1278 1323 the drag coefficient is computed according to the stable/unstable conditions of the 1279 1324 air-sea interface following \citet{large.yeager_rpt04}. 1280 1325 1281 1326 1282 % ================================================================1327 % ---------------------------------------------------------------- 1283 1328 % 3D Stokes Drift (ln_sdw, nn_sdrift) 1284 % ================================================================1329 % ---------------------------------------------------------------- 1285 1330 \subsection[3D Stokes Drift (\texttt{ln\_sdw}, \texttt{nn\_sdrift})] 1286 1331 {3D Stokes Drift (\protect\np{ln\_sdw, nn\_sdrift})} … … 1292 1337 As waves travel, the water particles that make up the waves travel in orbital motions but 1293 1338 without a closed path. Their movement is enhanced at the top of the orbit and slowed slightly 1294 at the bottom so the result is a net forward motion of water particles, referred to as the Stokes drift.1339 at the bottom, so the result is a net forward motion of water particles, referred to as the Stokes drift. 1295 1340 An accurate evaluation of the Stokes drift and the inclusion of related processes may lead to improved 1296 representation of surface physics in ocean general circulation models. 1341 representation of surface physics in ocean general circulation models. %GS: reference needed 1297 1342 The Stokes drift velocity $\mathbf{U}_{st}$ in deep water can be computed from the wave spectrum and may be written as: 1298 1343 … … 1309 1354 $k=\frac{2\pi}{\lambda}$ (being $\lambda$ the wavelength). \\ 1310 1355 1311 In order to evaluate the Stokes drift in a realistic ocean wave field the wave spectral shape is required1356 In order to evaluate the Stokes drift in a realistic ocean wave field, the wave spectral shape is required 1312 1357 and its computation quickly becomes expensive as the 2D spectrum must be integrated for each vertical level. 1313 1358 To simplify, it is customary to use approximations to the full Stokes profile. … … 1339 1384 1340 1385 \item[\np{nn\_sdrift} = 1]: velocity profile based on the Phillips spectrum which is considered to be a 1341 reasonable estimate of the part of the spectrum most contributing to the Stokes drift velocity near the surface1386 reasonable estimate of the part of the spectrum mostly contributing to the Stokes drift velocity near the surface 1342 1387 \citep{breivik.bidlot.ea_OM16}: 1343 1388 … … 1377 1422 1378 1423 1379 % ================================================================1424 % ---------------------------------------------------------------- 1380 1425 % Stokes-Coriolis term (ln_stcor) 1381 % ================================================================1426 % ---------------------------------------------------------------- 1382 1427 \subsection[Stokes-Coriolis term (\texttt{ln\_stcor})] 1383 1428 {Stokes-Coriolis term (\protect\np{ln\_stcor})} … … 1392 1437 1393 1438 1394 % ================================================================1439 % ---------------------------------------------------------------- 1395 1440 % Waves modified stress (ln_tauwoc, ln_tauw) 1396 % ================================================================1397 \subsection[Wave modified s ress (\texttt{ln\_tauwoc}, \texttt{ln\_tauw})]1441 % ---------------------------------------------------------------- 1442 \subsection[Wave modified stress (\texttt{ln\_tauwoc}, \texttt{ln\_tauw})] 1398 1443 {Wave modified sress (\protect\np{ln\_tauwoc, ln\_tauw})} 1399 1444 \label{subsec:SBC_wave_tauw} … … 1402 1447 into the waves \citep{janssen.breivik.ea_rpt13}. Therefore, when waves are growing, momentum and energy is spent and is not 1403 1448 available for forcing the mean circulation, while in the opposite case of a decaying sea 1404 state more momentum is available for forcing the ocean.1405 Only when the sea state is in equilibrium the ocean is forced by the atmospheric stress,1406 but in practice an equilibrium sea state is a fairly rare event.1449 state, more momentum is available for forcing the ocean. 1450 Only when the sea state is in equilibrium, the ocean is forced by the atmospheric stress, 1451 but in practice, an equilibrium sea state is a fairly rare event. 1407 1452 So the atmospheric stress felt by the ocean circulation $\tau_{oc,a}$ can be expressed as: 1408 1453 … … 1434 1479 1435 1480 1481 1436 1482 % ================================================================ 1437 1483 % Miscellanea options … … 1439 1485 \section{Miscellaneous options} 1440 1486 \label{sec:SBC_misc} 1487 1441 1488 1442 1489 % ------------------------------------------------------------------------------------------------------------- … … 1446 1493 {Diurnal cycle (\protect\mdl{sbcdcy})} 1447 1494 \label{subsec:SBC_dcy} 1448 %------------------------------------------namsbc _rnf----------------------------------------------------1495 %------------------------------------------namsbc------------------------------------------------------------- 1449 1496 % 1450 1497 \nlst{namsbc} … … 1468 1515 1469 1516 \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. 1470 Unfortunately high frequency forcing fields are rare, not to say inexistent. 1471 Nevertheless, it is possible to obtain a reasonable diurnal cycle of the SST knowning only short wave flux (SWF) at 1472 high frequency \citep{bernie.guilyardi.ea_CD07}. 1517 %Unfortunately high frequency forcing fields are rare, not to say inexistent. GS: not true anymore ! 1518 Nevertheless, it is possible to obtain a reasonable diurnal cycle of the SST knowning only short wave flux (SWF) at high frequency \citep{bernie.guilyardi.ea_CD07}. 1473 1519 Furthermore, only the knowledge of daily mean value of SWF is needed, 1474 1520 as higher frequency variations can be reconstructed from them, … … 1476 1522 The \cite{bernie.guilyardi.ea_CD07} reconstruction algorithm is available in \NEMO by 1477 1523 setting \np{ln\_dm2dc}\forcode{ = .true.} (a \textit{\ngn{namsbc}} namelist variable) when 1478 using CORE bulk formulea (\np{ln\_blk\_core}\forcode{ = .true.}) or1524 using a bulk formulation (\np{ln\_blk}\forcode{ = .true.}) or 1479 1525 the flux formulation (\np{ln\_flx}\forcode{ = .true.}). 1480 1526 The reconstruction is performed in the \mdl{sbcdcy} module. 1481 1527 The detail of the algoritm used can be found in the appendix~A of \cite{bernie.guilyardi.ea_CD07}. 1482 The algorithm preserve the daily mean incoming SWF as the reconstructed SWF at1528 The algorithm preserves the daily mean incoming SWF as the reconstructed SWF at 1483 1529 a given time step is the mean value of the analytical cycle over this time step (\autoref{fig:SBC_diurnal}). 1484 1530 The use of diurnal cycle reconstruction requires the input SWF to be daily 1485 (\ie a frequency of 24 and a time interpolation set to true in \np{sn\_qsr} namelist parameter).1486 Furthermore, it is recommended to have a least 8 surface module time step per day,1531 (\ie a frequency of 24 hours and a time interpolation set to true in \np{sn\_qsr} namelist parameter). 1532 Furthermore, it is recommended to have a least 8 surface module time steps per day, 1487 1533 that is $\rdt \ nn\_fsbc < 10,800~s = 3~h$. 1488 1534 An example of recontructed SWF is given in \autoref{fig:SBC_dcy} for a 12 reconstructed diurnal cycle, … … 1507 1553 an inconsistency between the scale of the vertical resolution and the forcing acting on that scale. 1508 1554 1555 1509 1556 % ------------------------------------------------------------------------------------------------------------- 1510 1557 % Rotation of vector pairs onto the model grid directions … … 1513 1560 \label{subsec:SBC_rotation} 1514 1561 1515 When using a flux (\np{ln\_flx}\forcode{ = .true.}) or 1516 bulk (\np{ln\_clio}\forcode{ = .true.} or \np{ln\_core}\forcode{ = .true.}) formulation, 1562 When using a flux (\np{ln\_flx}\forcode{ = .true.}) or bulk (\np{ln\_blk}\forcode{ = .true.}) formulation, 1517 1563 pairs of vector components can be rotated from east-north directions onto the local grid directions. 1518 1564 This is particularly useful when interpolation on the fly is used since here any vectors are likely to 1519 1565 be defined relative to a rectilinear grid. 1520 To activate this option a non-empty string is supplied in the rotation pair column of the relevant namelist.1566 To activate this option, a non-empty string is supplied in the rotation pair column of the relevant namelist. 1521 1567 The eastward component must start with "U" and the northward component with "V". 1522 1568 The remaining characters in the strings are used to identify which pair of components go together. … … 1527 1573 The rot\_rep routine from the \mdl{geo2ocean} module is used to perform the rotation. 1528 1574 1575 1529 1576 % ------------------------------------------------------------------------------------------------------------- 1530 1577 % Surface restoring to observed SST and/or SSS … … 1538 1585 %------------------------------------------------------------------------------------------------------------- 1539 1586 1540 IOptions are defined through the \ngn{namsbc\_ssr} namelist variables.1587 Options are defined through the \ngn{namsbc\_ssr} namelist variables. 1541 1588 On forced mode using a flux formulation (\np{ln\_flx}\forcode{ = .true.}), 1542 1589 a feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$: … … 1570 1617 The SSS restoring term should be viewed as a flux correction on freshwater fluxes to 1571 1618 reduce the uncertainties we have on the observed freshwater budget. 1619 1572 1620 1573 1621 % ------------------------------------------------------------------------------------------------------------- … … 1595 1643 This prevents deep convection to occur when trying to reach the freezing point 1596 1644 (and so ice covered area condition) while the SSS is too large. 1597 This manner of managing sea-ice area, just by using siIF case,1645 This manner of managing sea-ice area, just by using a IF case, 1598 1646 is usually referred as the \textit{ice-if} model. 1599 1647 It can be found in the \mdl{sbcice{\_}if} module. … … 1602 1650 This model computes the ice-ocean fluxes, 1603 1651 that are combined with the air-sea fluxes using the ice fraction of each model cell to 1604 provide the surface ocean fluxes.1605 Note that the activation of a sea-ice model is is done by defining a CPP key (\key{lim3} or \key{cice}).1652 provide the surface averaged ocean fluxes. 1653 Note that the activation of a sea-ice model is done by defining a CPP key (\key{si3} or \key{cice}). 1606 1654 The activation automatically overwrites the read value of nn{\_}ice to its appropriate value 1607 (\ie $2$ for LIM-3 or $3$ for CICE).1655 (\ie $2$ for SI3 or $3$ for CICE). 1608 1656 \end{description} 1609 1657 1610 1658 % {Description of Ice-ocean interface to be added here or in LIM 2 and 3 doc ?} 1611 1659 %GS: ocean-ice (SI3) interface is not located in SBC directory anymore, so it should be included in SI3 doc 1660 1661 1662 % ------------------------------------------------------------------------------------------------------------- 1663 % CICE-ocean Interface 1664 % ------------------------------------------------------------------------------------------------------------- 1612 1665 \subsection[Interface to CICE (\textit{sbcice\_cice.F90})] 1613 1666 {Interface to CICE (\protect\mdl{sbcice\_cice})} 1614 1667 \label{subsec:SBC_cice} 1615 1668 1616 It is nowpossible to couple a regional or global NEMO configuration (without AGRIF)1669 It is possible to couple a regional or global NEMO configuration (without AGRIF) 1617 1670 to the CICE sea-ice model by using \key{cice}. 1618 1671 The CICE code can be obtained from \href{http://oceans11.lanl.gov/trac/CICE/}{LANL} and … … 1621 1674 and CICE CPP keys \textbf{ORCA\_GRID}, \textbf{CICE\_IN\_NEMO} and \textbf{coupled} should be used 1622 1675 (seek advice from UKMO if necessary). 1623 Currently the code is only designed to work when using the CORE forcing option for NEMO1676 Currently, the code is only designed to work when using the NCAR forcing option for NEMO %GS: still true ? 1624 1677 (with \textit{calc\_strair}\forcode{ = .true.} and \textit{calc\_Tsfc}\forcode{ = .true.} in the CICE name-list), 1625 1678 or alternatively when NEMO is coupled to the HadGAM3 atmosphere model … … 1641 1694 there is no sea ice. 1642 1695 1696 1643 1697 % ------------------------------------------------------------------------------------------------------------- 1644 1698 % Freshwater budget control … … 1648 1702 \label{subsec:SBC_fwb} 1649 1703 1650 For global ocean simulation it can be useful to introduce a control of the mean sea level in order to1704 For global ocean simulation, it can be useful to introduce a control of the mean sea level in order to 1651 1705 prevent unrealistic drift of the sea surface height due to inaccuracy in the freshwater fluxes. 1652 In \NEMO, two way of controlling the the freshwater budget. 1706 In \NEMO, two way of controlling the freshwater budget are proposed: 1707 1653 1708 \begin{description} 1654 1709 \item[\np{nn\_fwb}\forcode{ = 0}] … … 1657 1712 \item[\np{nn\_fwb}\forcode{ = 1}] 1658 1713 global mean \textit{emp} set to zero at each model time step. 1659 %Note that with a sea-ice model, this technique only control the mean sea level with linear free surface (\key{vvl} not defined) and no mass flux between ocean and ice (as it is implemented in the current ice-ocean coupling). 1714 %GS: comment below still relevant ? 1715 %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). 1660 1716 \item[\np{nn\_fwb}\forcode{ = 2}] 1661 1717 freshwater budget is adjusted from the previous year annual mean budget which … … 1664 1720 the change in the mean sea level at January the first and saved in the \textit{EMPav.dat} file. 1665 1721 \end{description} 1666 1667 1668 1722 1669 1723 % Griffies doc: … … 1674 1728 % The result of the normalization should be a global integrated zero net water input to the ocean-ice system over 1675 1729 % a chosen time scale. 1676 % How often the normalization is done is a matter of choice. In mom4p1, we choose to do so at each model time step,1730 % How often the normalization is done is a matter of choice. In mom4p1, we choose to do so at each model time step, 1677 1731 % so that there is always a zero net input of water to the ocean-ice system. 1678 1732 % Others choose to normalize over an annual cycle, in which case the net imbalance over an annual cycle is used … … 1689 1743 % in ocean-ice models. 1690 1744 1745 1691 1746 \biblio 1692 1747 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_STO.tex
r11263 r11353 8 8 \label{chap:STO} 9 9 10 Authors: P.-A. Bouttier 10 \minitoc 11 11 12 \minitoc 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.1} & {\em C. Levy} & {\em 4.0.1 update} \\ 18 % {\em 3.6} & {\em P.-A. Bouttier} & {\em initial version} \\ 19 % \end{tabular} 20 % \end{figure} 21 22 Authors: \\ 23 C. Levy release 4.0.1 update \\ 24 P.-A. Bouttier release 3.6 inital version 13 25 14 26 \newpage 15 27 16 The stochastic parametrization module aims to explicitly simulate uncertainties in the model. 17 More particularly, \cite{brankart_OM13} has shown that, 18 because of the nonlinearity of the seawater equation of state, unresolved scales represent a major source of 19 uncertainties in the computation of the large scale horizontal density gradient (from T/S large scale fields), 20 and that the impact of these uncertainties can be simulated by 21 random processes representing unresolved T/S fluctuations. 28 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. 22 29 23 The stochastic formulation of the equation of state can be written as:30 As detailed in \cite{brankart_OM13}, the stochastic formulation of the equation of state can be written as: 24 31 \begin{equation} 25 32 \label{eq:eos_sto} … … 27 34 \end{equation} 28 35 where $p_o(z)$ is the reference pressure depending on the depth and, 29 $\Delta T_i$ and $\Delta S_i$ area set of T/S perturbations defined as36 $\Delta T_i$ and $\Delta S_i$ (i=1,m) is a set of T/S perturbations defined as 30 37 the scalar product of the respective local T/S gradients with random walks $\mathbf{\xi}$: 31 38 \begin{equation} … … 33 40 \Delta T_i = \mathbf{\xi}_i \cdot \nabla T \qquad \hbox{and} \qquad \Delta S_i = \mathbf{\xi}_i \cdot \nabla S 34 41 \end{equation} 35 $\mathbf{\xi}_i$ are produced by a first-order autoregressive process es(AR-1) with42 $\mathbf{\xi}_i$ are produced by a first-order autoregressive process (AR-1) with 36 43 a parametrized decorrelation time scale, and horizontal and vertical standard deviations $\sigma_s$. 37 44 $\mathbf{\xi}$ are uncorrelated over the horizontal and fully correlated along the vertical. … … 41 48 \label{sec:STO_the_details} 42 49 43 The starting point of our implementation of stochastic parameterizations in NEMO is to observe that 44 many existing parameterizations are based on autoregressive processes, 50 There are many existing parameterizations based on autoregressive processes, 45 51 which are used as a basic source of randomness to transform a deterministic model into a probabilistic model. 46 A generic approach is thus to add one single new module in NEMO,47 generating processes with appropriate statistics to simulate each kind of uncertaintyin the model52 The generic approach here is to a new STO module, 53 generating processes features with appropriate statistics to simulate these uncertainties in the model 48 54 (see \cite{brankart.candille.ea_GMD15} for more details). 49 55 50 In practice, at e verymodel grid point,56 In practice, at each model grid point, 51 57 independent Gaussian autoregressive processes~$\xi^{(i)},\,i=1,\ldots,m$ are first generated using 52 58 the same basic equation: … … 101 107 \noindent 102 108 In this way, higher order processes can be easily generated recursively using the same piece of code implementing 103 (\autoref{eq:autoreg}), and using succesivelyprocesses from order $0$ to~$n-1$ as~$w^{(i)}$.104 The parameters in (\autoref{eq:ord2})are computed so that this recursive application of105 (\autoref{eq:autoreg})leads to processes with the required standard deviation and correlation timescale,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 of 111 \autoref{eq:autoreg} leads to processes with the required standard deviation and correlation timescale, 106 112 with the additional condition that the $n-1$ first derivatives of the autocorrelation function are equal to 107 zero at~$t=0$, so that the resulting processes become smoother and smoother as $n$ i s increased.113 zero at~$t=0$, so that the resulting processes become smoother and smoother as $n$ increases. 108 114 109 115 Overall, this method provides quite a simple and generic way of generating a wide class of stochastic processes. 110 116 However, this also means that new model parameters are needed to specify each of these stochastic processes. 111 As in any parameterization of lacking physics, a very important issues then to tune these newparameters using117 As in any parameterization, the main issue is to tune the parameters using 112 118 either first principles, model simulations, or real-world observations. 119 The parameters are set by default as described in \cite{brankart_OM13}, which has been shown in the paper 120 to give good results for a global low resolution (2°) NEMO configuration. where this parametrization produces a major effect on the average large-scale circulation, especilally in regions of intense mesoscale activity. 121 The set of parameters will need further investigation to find appropriate values 122 for any other configuration or resolution of the model. 113 123 114 124 \section{Implementation details} 115 125 \label{sec:STO_thech_details} 116 126 117 %---------------------------------------namsbc--------------------------------------------------118 127 119 \nlst{namsto} 120 %-------------------------------------------------------------------------------------------------------------- 128 The code implementing stochastic parametrisation is located in the src/OCE/STO directory. 129 It contains three modules : 130 % \begin{description} 121 131 122 The computer code implementing stochastic parametrisations can be found in the STO directory. 123 It involves three modules : 124 \begin{description} 125 \item[\mdl{stopar}:] 126 define the Stochastic parameters and their time evolution. 127 \item[\mdl{storng}:] 128 a random number generator based on (and includes) the 64-bit KISS (Keep It Simple Stupid) random number generator 129 distributed by George Marsaglia 130 (see \href{https://groups.google.com/forum/#!searchin/comp.lang.fortran/64-bit$20KISS$20RNGs}{here}) 131 \item[\mdl{stopts}:] 132 stochastic parametrisation associated with the non-linearity of the equation of seawater, 133 implementing \autoref{eq:sto_pert} and specific piece of code in 134 the equation of state implementing \autoref{eq:eos_sto}. 135 \end{description} 132 \mdl{stopar} : define the Stochastic parameters and their time evolution 136 133 137 The \mdl{stopar} module has 3 public routines to be called by the model (in our case, NEMO): 134 \mdl{storng} : random number generator based on and including the 64-bit KISS (Keep It Simple Stupid) random number generator distributed by George Marsaglia 138 135 139 The first routine (\rou{sto\_par}) is a direct implementation of (\autoref{eq:autoreg}), 136 \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 state 138 implementing \autoref{eq:eos_sto}. 139 % \end{description} 140 141 The \mdl{stopar} module includes three public routines called in the model: 142 143 (\rou{sto\_par}) is a direct implementation of \autoref{eq:autoreg}, 140 144 applied at each model grid point (in 2D or 3D), and called at each model time step ($k$) to 141 145 update every autoregressive process ($i=1,\ldots,m$). … … 143 147 to introduce a spatial correlation between the stochastic processes. 144 148 145 The second routine (\rou{sto\_par\_init}) is an initialization routine mainly dedicated to 146 the computation of parameters $a^{(i)}, b^{(i)}, c^{(i)}$ for each autoregressive process,149 (\rou{sto\_par\_init}) is the initialization routine computing 150 the values $a^{(i)}, b^{(i)}, c^{(i)}$ for each autoregressive process, 147 151 as a function of the statistical properties required by the model user 148 152 (mean, standard deviation, time correlation, order of the process,\ldots). 153 This routine also includes the initialization (seeding) of the random number generator. 149 154 150 Parameters for the processes can be specified through the following \ngn{namsto} namelist parameters: 155 (\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 of 157 all autoregressive processes to allow creating the file needed for a restart. 158 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 by 161 the initialization routine (\rou{sto\_par\_init}). 162 The simulation will continue exactly as if it was not interrupted only 163 when \np{ln\_rstseed} is set to \forcode{.true.}, 164 \ie when the state of the random number generator is read in the restart file.\\ 165 166 The implementation includes the basics for a few possible stochastic parametrisations including equation of state, lateral diffusion, horizontal pressure gradient, ice strength, trend, tracers dynamics. As for this release, only the stochastic parametrisation of equation of state is fully available and tested. \\ 167 168 Options and parameters \\ 169 170 The \np{ln\_sto\_eos} namelist variable activates stochastic parametrisation of equation of state. By default it set to \forcode{.false.}) and not active. 171 The set of parameters is available in \ngn{namsto} namelist(only the subset for equation of state stochastic parametrisation is listed below): 172 %---------------------------------------namsto-------------------------------------------------- 173 174 \nlst{namsto} 175 %-------------------------------------------------------------------------------------------------------------- 176 177 The variables of stochastic paramtetrisation itself (based on the global 2° experiments as in \cite{brankart_OM13} are: 151 178 \begin{description} 152 179 \item[\np{nn\_sto\_eos}:] number of independent random walks 153 \item[\np{rn\_eos\_stdxy}:] random walk hor z.standard deviation (in grid points)154 \item[\np{rn\_eos\_stdz}:] random walk vert .standard deviation (in grid points)180 \item[\np{rn\_eos\_stdxy}:] random walk horizontal standard deviation (in grid points) 181 \item[\np{rn\_eos\_stdz}:] random walk vertical standard deviation (in grid points) 155 182 \item[\np{rn\_eos\_tcor}:] random walk time correlation (in timesteps) 156 183 \item[\np{nn\_eos\_ord}:] order of autoregressive processes … … 158 185 \item[\np{rn\_eos\_lim}:] limitation factor (default = 3.0) 159 186 \end{description} 160 This routine also includes the initialization (seeding) of the random number generator.161 187 162 The third routine (\rou{sto\_rst\_write}) writes a restart file 163 (which suffix name is given by \np{cn\_storst\_out} namelist parameter) containing the current value of 164 all autoregressive processes to allow restarting a simulation from where it has been interrupted. 165 This file also contains the current state of the random number generator. 166 When \np{ln\_rststo} is set to \forcode{.true.}), 167 the restart file (which suffix name is given by \np{cn\_storst\_in} namelist parameter) is read by 168 the initialization routine (\rou{sto\_par\_init}). 169 The simulation will continue exactly as if it was not interrupted only 170 when \np{ln\_rstseed} is set to \forcode{.true.}, 171 \ie when the state of the random number generator is read in the restart file. 172 188 The first four parameters define the stochastic part of equation of state. 173 189 \biblio 174 190 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_ZDF.tex
r11263 r11353 997 997 % Non-Linear Bottom Friction 998 998 % ------------------------------------------------------------------------------------------------------------- 999 \subsection[Non-linear top/bottom friction (\forcode{ln_no _lin = .true.})]1000 {Non-linear top/bottom friction (\protect\np{ln\_no \_lin}\forcode{ = .true.})}999 \subsection[Non-linear top/bottom friction (\forcode{ln_non_lin = .true.})] 1000 {Non-linear top/bottom friction (\protect\np{ln\_non\_lin}\forcode{ = .true.})} 1001 1001 \label{subsec:ZDF_drg_nonlinear} 1002 1002 … … 1235 1235 \label{subsec:ZDF_swm} 1236 1236 1237 TBC ... 1237 Surface waves produce an enhanced mixing through wave-turbulence interaction. 1238 In addition to breaking waves induced turbulence (\autoref{subsec:ZDF_tke}), 1239 the influence of non-breaking waves can be accounted introducing 1240 wave-induced viscosity and diffusivity as a function of the wave number spectrum. 1241 Following \citet{qiao.yuan.ea_OD10}, a formulation of wave-induced mixing coefficient 1242 is provided as a function of wave amplitude, Stokes Drift and wave-number: 1243 1244 \begin{equation} 1245 \label{eq:Bv} 1246 B_{v} = \alpha {A} {U}_{st} {exp(3kz)} 1247 \end{equation} 1248 1249 Where $B_{v}$ is the wave-induced mixing coefficient, $A$ is the wave amplitude, 1250 ${U}_{st}$ is the Stokes Drift velocity, $k$ is the wave number and $\alpha$ 1251 is a constant which should be determined by observations or 1252 numerical experiments and is set to be 1. 1253 1254 The coefficient $B_{v}$ is then directly added to the vertical viscosity 1255 and diffusivity coefficients. 1256 1257 In order to account for this contribution set: \forcode{ln_zdfswm = .true.}, 1258 then wave interaction has to be activated through \forcode{ln_wave = .true.}, 1259 the Stokes Drift can be evaluated by setting \forcode{ln_sdw = .true.} 1260 (see \autoref{subsec:SBC_wave_sdw}) 1261 and the needed wave fields can be provided either in forcing or coupled mode 1262 (for more information on wave parameters and settings see \autoref{sec:SBC_wave}) 1238 1263 1239 1264 % ================================================================ -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_misc.tex
r11263 r11353 30 30 are much narrow than even a single ocean grid-point. 31 31 32 We describe briefly here the three methods that can be used in \NEMO to handle such improperly resolved straits. 33 The first two consist of opening the strait by hand while ensuring that the mass exchanges through 34 the strait are not too large by either artificially reducing the surface of the strait grid-cells or, 35 locally increasing the lateral friction. 36 In the third one, the strait is closed but exchanges of mass, heat and salt across the land are allowed. 37 Note that such modifications are so specific to a given configuration that no attempt has been made to 38 set them in a generic way. 39 However, examples of how they can be set up is given in the ORCA 2\deg and 0.5\deg configurations. 40 For example, for details of implementation in ORCA2, search: \texttt{IF( cp\_cfg == "orca" .AND. jp\_cfg == 2 )} 32 We describe briefly here the two methods that can be used in \NEMO to handle such 33 improperly resolved straits. The methods consist of opening the strait while ensuring 34 that the mass exchanges through the strait are not too large by either artificially 35 reducing the cross-sectional area of the strait grid-cells or, locally increasing the 36 lateral friction. 41 37 42 38 % ------------------------------------------------------------------------------------------------------------- … … 46 42 \label{subsec:MISC_strait_hand} 47 43 48 $\bullet$ reduced scale factor in the cross-strait direction to a value in better agreement with 49 the true mean width of the strait (\autoref{fig:MISC_strait_hand}). 50 This technique is sometime called "partially open face" or "partially closed cells". 51 The key issue here is only to reduce the faces of $T$-cell 52 (\ie change the value of the horizontal scale factors at $u$- or $v$-point) but not the volume of the $T$-cell. 53 Indeed, reducing the volume of strait $T$-cell can easily produce a numerical instability at 54 that grid point that would require a reduction of the model time step. 55 The changes associated with strait management are done in \mdl{domhgr}, 56 just after the definition or reading of the horizontal scale factors. 57 58 $\bullet$ increase of the viscous boundary layer thickness by local increase of the fmask value at the coast 59 (\autoref{fig:MISC_strait_hand}). 60 This is done in \mdl{dommsk} together with the setting of the coastal value of fmask (see \autoref{sec:LBC_coast}). 44 The first method involves reducing the scale factor in the cross-strait direction to a 45 value in better agreement with the true mean width of the strait 46 (\autoref{fig:MISC_strait_hand}). This technique is sometime called "partially open face" 47 or "partially closed cells". The key issue here is only to reduce the faces of $T$-cell 48 (\ie change the value of the horizontal scale factors at $u$- or $v$-point) but not the 49 volume of the $T$-cell. Indeed, reducing the volume of strait $T$-cell can easily produce 50 a numerical instability at that grid point which would require a reduction of the model 51 time step. Thus to instigate a local change in the width of a Strait requires two steps: 52 53 \begin{itemize} 54 55 \item Add \texttt{e1e2u} and \texttt{e1e2v} arrays to the \np{cn\_domcfg} file. These 2D 56 arrays should contain the products of the unaltered values of: $\texttt{e1u}*\texttt{e2u}$ 57 and $\texttt{e1u}*\texttt{e2v}$ respectively. That is the original surface areas of $u$- 58 and $v$- cells respectively. These areas are usually defined by the corresponding product 59 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. 61 If the model domain is provided by user-supplied code in \mdl{usrdef\_hgr}, then this 62 routine should also return \texttt{e1e2u} and \texttt{e1e2v} and set the integer return 63 argument \texttt{ie1e2u\_v} to a non-zero value. Values other than 0 for this argument 64 will suppress the calculation of the areas. 65 66 \item Change values of \texttt{e2u} or \texttt{e1v} (either in the \np{cn\_domcfg} file or 67 via code in \mdl{usrdef\_hgr}), whereever a Strait reduction is required. The choice of 68 whether to alter \texttt{e2u} or \texttt{e1v} depends. respectively, on whether the 69 Strait in question is North-South orientated (\eg Gibraltar) or East-West orientated (\eg 70 Lombok). 71 72 \end{itemize} 73 74 75 The second method is to increase the viscous boundary layer thickness by a local increase 76 of the fmask value at the coast. This method can also be effective in wider passages. The 77 concept is illustarted in the second part of \autoref{fig:MISC_strait_hand} and changes 78 to specific locations can be coded in \mdl{usrdef\_fmask}. The \forcode{usr_def_fmask} 79 routine is always called after \texttt{fmask} has been defined according to the choice of 80 lateral boundary condition as discussed in \autoref{sec:LBC_coast}. The default version of 81 \mdl{usrdef\_fmask} contains settings specific to ORCA2 and ORCA1 configurations. These are 82 meant as examples only; it is up to the user to verify settings and provide alternatives 83 for their own configurations. The default \forcode{usr_def_fmask} makes no changes to 84 \texttt{fmask} for any other configuration. 61 85 62 86 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 175 199 \subsection{Simple subsetting of input files via NetCDF attributes} 176 200 177 The extended grids for use with the under-shelf ice cavities will result in redundant rows around Antarctica if 178 the ice cavities are not active. 179 A simple mechanism for subsetting input files associated with the extended domains has been implemented to 180 avoid the need to maintain different sets of input fields for use with or without active ice cavities. 181 The existing 'zoom' options are overly complex for this task and marked for deletion anyway. 182 This alternative subsetting operates for the j-direction only and works by optionally looking for and 183 using a global file attribute (named: \np{open\_ocean\_jstart}) to determine the starting j-row for input. 184 The use of this option is best explained with an example: 185 consider an ORCA1 configuration using the extended grid bathymetry and coordinate files: 186 \vspace{-10pt} 187 \ifile{eORCA1\_bathymetry\_v2} 188 \ifile{eORCA1\_coordinates} 189 \noindent These files define a horizontal domain of 362x332. 190 Assuming the first row with open ocean wet points in the non-isf bathymetry for this set is row 42 191 (\fortran indexing) then the formally correct setting for \np{open\_ocean\_jstart} is 41. 192 Using this value as the first row to be read will result in a 362x292 domain which is the same size as 193 the original ORCA1 domain. 194 Thus the extended coordinates and bathymetry files can be used with all the original input files for ORCA1 if 195 the ice cavities are not active (\np{ln\_isfcav = .false.}). 196 Full instructions for achieving this are: 197 198 \noindent Add the new attribute to any input files requiring a j-row offset, i.e: 199 \vspace{-10pt} 201 The extended grids for use with the under-shelf ice cavities will result in redundant rows 202 around Antarctica if the ice cavities are not active. A simple mechanism for subsetting 203 input files associated with the extended domains has been implemented to avoid the need to 204 maintain different sets of input fields for use with or without active ice cavities. This 205 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-row 207 for input. The use of this option is best explained with an example: 208 \medskip 209 210 \noindent Consider an ORCA1 211 configuration using the extended grid domain configuration file: \ifile{eORCA1\_domcfg.nc} 212 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 as 215 the first row to be read will result in a 362x292 domain which is the same size as the 216 original ORCA1 domain. Thus the extended domain configuration file can be used with all 217 the original input files for ORCA1 if the ice cavities are not active (\np{ln\_isfcav = 218 .false.}). Full instructions for achieving this are: 219 220 \begin{itemize} 221 \item Add the new attribute to any input files requiring a j-row offset, i.e: 222 \begin{cmds} 223 ncatted -a open_ocean_jstart,global,a,d,41 eORCA1_domcfg.nc 224 \end{cmds} 225 226 \item Add the logical switch \np{ln\_use\_jattr} to \ngn{namcfg} in the configuration 227 namelist (if it is not already there) and set \np{.true.} 228 \end{itemize} 229 230 \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} value 232 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 a 234 convenient way of achieving this: 235 200 236 \begin{cmds} 201 ncatted -a open_ocean_jstart,global,a,d,41 eORCA1_coordinates.nc 202 ncatted -a open_ocean_jstart,global,a,d,41 eORCA1_bathymetry_v2.nc 237 ncap2 -s 'jpjglo=292' eORCA1_domcfg.nc nORCA1_domcfg.nc 203 238 \end{cmds} 204 205 \noindent Add the logical switch to \ngn{namcfg} in the configuration namelist and set true: 206 %--------------------------------------------namcfg-------------------------------------------------------- 207 208 \nlst{namcfg} 209 %-------------------------------------------------------------------------------------------------------------- 210 211 \noindent Note the j-size of the global domain is the (extended j-size minus \np{open\_ocean\_jstart} + 1 ) and 212 this must match the size of all datasets other than bathymetry and coordinates currently. 213 However the option can be extended to any global, 2D and 3D, netcdf, input field by adding the: 214 \vspace{-10pt} 239 240 The domain configuration file is unique in this respect since it also contains the value 241 of \texttt{jpjglo} that is read and used by the model. Any other global, 2D and 3D, 242 netcdf, input field can be prepared for use in a reduced domain by adding the 243 \texttt{open\_ocean\_jstart} attribute to the file's global attributes. In particular 244 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}. 215 246 \begin{forlines} 216 247 lrowattr=ln_use_jattr 217 248 \end{forlines} 218 optional argument to the appropriate \np{iom\_get} call and the \np{open\_ocean\_jstart} attribute to 219 the corresponding input files. 220 It remains the users responsibility to set \np{jpjdta} and \np{jpjglo} values in 221 the \np{namelist\_cfg} file according to their needs. 222 223 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 224 \begin{figure}[!ht] 225 \begin{center} 226 \includegraphics[width=\textwidth]{Fig_LBC_zoom} 227 \caption{ 228 \protect\label{fig:LBC_zoom} 229 Position of a model domain compared to the data input domain when the zoom functionality is used. 230 } 231 \end{center} 232 \end{figure} 233 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 234 249 250 Currently, only the domain configuration variables make use of this optional argument so 251 this facility is of little practical use except for tests where no other external input 252 files are needed or you wish to use an extended domain configuration with inputs from 253 earlier, non-extended configurations. Alternatively, it should be possible to exclude 254 empty rows for extended domain, forced ocean runs using interpolation on the fly, by 255 adding the optional argument to \texttt{iom\_get} calls for the weights and initial 256 conditions. Experimenting with this remains an exercise for the user. 235 257 236 258 % ================================================================ -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_model_basics.tex
r11263 r11353 32 32 \begin{enumerate} 33 33 \item 34 \textit{spherical earth approximation}: the geopotential surfaces are assumed to be spheres so that 35 gravity (local vertical) is parallel to the earth's radius 34 \textit{spherical Earth approximation}: the geopotential surfaces are assumed to be oblate spheriods 35 that follow the Earth's bulge; these spheroids are approximated by spheres with 36 gravity locally vertical (parallel to the Earth's radius) and independent of latitude 37 \citep[][section 2]{white.hoskins.ea_QJRMS05}. 36 38 \item 37 39 \textit{thin-shell approximation}: the ocean depth is neglected compared to the earth's radius … … 63 65 \nabla \cdot \vect U = 0 64 66 \end{equation} 67 \item 68 \textit{Neglect of additional Coriolis terms}: the Coriolis terms that vary with the cosine of latitude are neglected. 69 These terms may be non-negligible where the Brunt-Vaisala frequency $N$ is small, either in the deep ocean or 70 in the sub-mesoscale motions of the mixed layer, or near the equator \citep[][section 1]{white.hoskins.ea_QJRMS05}. 71 They can be consistently included as part of the ocean dynamics \citep[][section 3(d)]{white.hoskins.ea_QJRMS05} and are 72 retained in the MIT ocean model. 65 73 \end{enumerate} 66 74 67 75 Because the gravitational force is so dominant in the equations of large-scale motions, 68 it is useful to choose an orthogonal set of unit vectors $(i,j,k)$ linked to the earth such that76 it is useful to choose an orthogonal set of unit vectors $(i,j,k)$ linked to the Earth such that 69 77 $k$ is the local upward vector and $(i,j)$ are two vectors orthogonal to $k$, 70 78 \ie tangent to the geopotential surfaces. … … 107 115 an air-sea or ice-sea interface at its top. 108 116 These boundaries can be defined by two surfaces, $z = - H(i,j)$ and $z = \eta(i,j,k,t)$, 109 where $H$ is the depth of the ocean bottom and $\eta$ is the height of the sea surface. 110 Both $H$ and $\eta$ are usually referenced to a given surface, $z = 0$, chosen as a mean sea surface 117 where $H$ is the depth of the ocean bottom and $\eta$ is the height of the sea surface 118 (discretisation can introduce additional artificial ``side-wall'' boundaries). 119 Both $H$ and $\eta$ are referenced to a surface of constant geopotential (\ie a mean sea surface height) on which $z = 0$. 111 120 (\autoref{fig:ocean_bc}). 112 121 Through these two boundaries, the ocean can exchange fluxes of heat, fresh water, salt, and momentum with … … 210 219 The flow is barotropic and the surface moves up and down with gravity as the restoring force. 211 220 The phase speed of such waves is high (some hundreds of metres per second) so that 212 the time step would have to be very short if they were present in the model.221 the time step has to be very short when they are present in the model. 213 222 The latter strategy filters out these waves since the rigid lid approximation implies $\eta = 0$, 214 223 \ie the sea surface is the surface $z = 0$. … … 217 226 The rigid-lid hypothesis is an obsolescent feature in modern OGCMs. 218 227 It has been available until the release 3.1 of \NEMO, and it has been removed in release 3.2 and followings. 219 Only the free surface formulation is now described in th e this document (see the next sub-section).228 Only the free surface formulation is now described in this document (see the next sub-section). 220 229 221 230 % ------------------------------------------------------------------------------------------------------------- … … 237 246 Allowing the air-sea interface to move introduces the external gravity waves (EGWs) as 238 247 a class of solution of the primitive equations. 239 These waves are barotropic because of hydrostatic assumption,and their phase speed is quite high.248 These waves are barotropic (\ie nearly independent of depth) and their phase speed is quite high. 240 249 Their time scale is short with respect to the other processes described by the primitive equations. 241 250 … … 266 275 the implicit scheme \citep{dukowicz.smith_JGR94} or 267 276 the addition of a filtering force in the momentum equation \citep{roullet.madec_JGR00}. 268 With the present release, \NEMO offers the choice between277 With the present release, \NEMO offers the choice between 269 278 an explicit free surface (see \autoref{subsec:DYN_spg_exp}) or 270 279 a split-explicit scheme strongly inspired the one proposed by \citet{shchepetkin.mcwilliams_OM05} … … 338 347 the vertical scale factor is a single function of $k$ as $k$ is parallel to $z$. 339 348 The scalar and vector operators that appear in the primitive equations 340 (\autoref{eq:PE_dyn} to \autoref{eq:PE_eos}) can be written in the tensorial form,349 (\autoref{eq:PE_dyn} to \autoref{eq:PE_eos}) can then be written in the tensorial form, 341 350 invariant in any orthogonal horizontal curvilinear coordinate system transformation: 342 351 \begin{subequations} … … 384 393 \end{gather} 385 394 386 Using the fact that the horizontal scale factors $e_1$ and $e_2$ are independent of $k$ and that395 Using again the fact that the horizontal scale factors $e_1$ and $e_2$ are independent of $k$ and that 387 396 $e_3$ is a function of the single variable $k$, 388 397 $NLT$ the nonlinear term of \autoref{eq:PE_dyn} can be transformed as follows: … … 456 465 & &= &\nabla \cdot (\vect U \, u) - (\nabla \cdot \vect U) \ u 457 466 + \frac{1}{e_1 e_2} \lt( -v^2 \pd[e_2]{i} + u v \, \pd[e_1]{j} \rt) \\ 458 \intertext{as $\nabla \cdot {\vect U} \; = 0$ (incompressibility) it comes:}467 \intertext{as $\nabla \cdot {\vect U} \; = 0$ (incompressibility) it becomes:} 459 468 & &= &\, \nabla \cdot (\vect U \, u) + \frac{1}{e_1 e_2} \lt( v \; \pd[e_2]{i} - u \; \pd[e_1]{j} \rt) (-v) 460 469 \end{alignat*} … … 516 525 % \label{eq:PE_dyn_flux_v} 517 526 \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 \\ 518 +\frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, v)]{i} + \pd[(e_1 \, v \, v)]{j} \rt) \\527 - \frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, v)]{i} + \pd[(e_1 \, v \, v)]{j} \rt) \\ 519 528 - \frac{1}{e_3} \pd[(w \, v)]{k} - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) 520 529 + D_v^{\vect U} + F_v^{\vect U} … … 526 535 p_s = \rho \,g \, \eta 527 536 \] 528 with $\eta$ issolution of \autoref{eq:PE_ssh}.537 and $\eta$ is the solution of \autoref{eq:PE_ssh}. 529 538 530 539 The vertical velocity and the hydrostatic pressure are diagnosed from the following equations: … … 536 545 \] 537 546 where the divergence of the horizontal velocity, $\chi$ is given by \autoref{eq:PE_div_Uh}. 538 \item \textit{tracer equations}: 539 \[ 540 %\label{eq:S} 541 \pd[T]{t} = - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 T \, u)]{i} + \pd[(e_1 T \, v)]{j} \rt] 547 548 \item 549 \textbf{tracer equations}: 550 \begin{equation} 551 \begin{split} 552 \pd[T]{t} = & - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 T \, u)]{i} + \pd[(e_1 T \, v)]{j} \rt] 542 553 - \frac{1}{e_3} \pd[(T \, w)]{k} + D^T + F^T \\ 543 %\label{eq:T} 544 \pd[S]{t} = - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 S \, u)]{i} + \pd[(e_1 S \, v)]{j} \rt] 545 - \frac{1}{e_3} \pd[(S \, w)]{k} + D^S + F^S 546 %\label{eq:rho} 547 \rho = \rho \big( T,S,z(k) \big) 548 \] 554 \pd[S]{t} = & - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 S \, u)]{i} + \pd[(e_1 S \, v)]{j} \rt] 555 - \frac{1}{e_3} \pd[(S \, w)]{k} + D^S + F^S \\ 556 \rho = & \rho \big( T,S,z(k) \big) 557 \end{split} 558 \end{equation} 549 559 \end{itemize} 550 560 … … 575 585 follows the isopycnal surfaces, \eg an isopycnic coordinate. 576 586 577 In order to satisfy two or more constrain s one can even be tempted to mixed these coordinate systems, as in587 In order to satisfy two or more constraints one can even be tempted to mixed these coordinate systems, as in 578 588 HYCOM (mixture of $z$-coordinate at the surface, isopycnic coordinate in the ocean interior and $\sigma$ at 579 589 the ocean bottom) \citep{chassignet.smith.ea_JPO03} or … … 594 604 This so-called \textit{generalised vertical coordinate} \citep{kasahara_MWR74} is in fact 595 605 an Arbitrary Lagrangian--Eulerian (ALE) coordinate. 596 Indeed, choosing an expression for $s$ is an arbitrary choice thatdetermines606 Indeed, one has a great deal of freedom in the choice of expression for $s$. The choice determines 597 607 which part of the vertical velocity (defined from a fixed referential) will cross the levels (Eulerian part) and 598 608 which part will be used to move them (Lagrangian part). … … 601 611 Its most often used implementation is via an ALE algorithm, 602 612 in which a pure lagrangian step is followed by regridding and remapping steps, 603 the lat er step implicitly embedding the vertical advection613 the latter step implicitly embedding the vertical advection 604 614 \citep{hirt.amsden.ea_JCP74, chassignet.smith.ea_JPO03, white.adcroft.ea_JCP09}. 605 615 Here we follow the \citep{kasahara_MWR74} strategy: 606 a regridding step (an update of the vertical coordinate) followed by an eulerian step with616 a regridding step (an update of the vertical coordinate) followed by an Eulerian step with 607 617 an explicit computation of vertical advection relative to the moving s-surfaces. 608 618 609 619 %\gmcomment{ 610 620 %A key point here is that the $s$-coordinate depends on $(i,j)$ ==> horizontal pressure gradient... 611 the generalized vertical coordinates used in ocean modelling are not orthogonal,621 The generalized vertical coordinates used in ocean modelling are not orthogonal, 612 622 which contrasts with many other applications in mathematical physics. 613 623 Hence, it is useful to keep in mind the following properties that may seem odd on initial encounter. … … 615 625 The horizontal velocity in ocean models measures motions in the horizontal plane, 616 626 perpendicular to the local gravitational field. 617 That is, horizontal velocity is mathematically the same regardless the vertical coordinate, be it geopotential,627 That is, horizontal velocity is mathematically the same regardless of the vertical coordinate, be it geopotential, 618 628 isopycnal, pressure, or terrain following. 619 629 The key motivation for maintaining the same horizontal velocity component is that … … 660 670 \[ 661 671 % \label{eq:PE_sco_w} 662 \omega = w - e_3 \, \pd[s]{t}- \sigma_1 \, u - \sigma_2 \, v672 \omega = w - \, \lt. \pd[z]{t} \rt|_s - \sigma_1 \, u - \sigma_2 \, v 663 673 \] 664 674 … … 671 681 % \label{eq:PE_sco_u_vector} 672 682 \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} \\ 673 - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) +g \frac{\rho}{\rho_o} \sigma_1683 - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o} \sigma_1 674 684 + D_u^{\vect U} + F_u^{\vect U} 675 685 \end{multline*} … … 677 687 % \label{eq:PE_sco_v_vector} 678 688 \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} \\ 679 - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) +g \frac{\rho}{\rho_o} \sigma_2689 - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o} \sigma_2 680 690 + D_v^{\vect U} + F_v^{\vect U} 681 691 \end{multline*} … … 687 697 - \frac{1}{e_3} \pd[(\omega \, u)]{k} 688 698 - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) 689 +g \frac{\rho}{\rho_o} \sigma_1 + D_u^{\vect U} + F_u^{\vect U}699 - g \frac{\rho}{\rho_o} \sigma_1 + D_u^{\vect U} + F_u^{\vect U} 690 700 \end{multline*} 691 701 \begin{multline*} … … 695 705 - \frac{1}{e_3} \pd[(\omega \, v)]{k} 696 706 - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) 697 +g \frac{\rho}{\rho_o}\sigma_2 + D_v^{\vect U} + F_v^{\vect U}707 - g \frac{\rho}{\rho_o}\sigma_2 + D_v^{\vect U} + F_v^{\vect U} 698 708 \end{multline*} 699 709 where the relative vorticity, $\zeta$, the surface pressure gradient, … … 750 760 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 751 761 752 In th atcase, the free surface equation is nonlinear, and the variations of volume are fully taken into account.762 In this case, the free surface equation is nonlinear, and the variations of volume are fully taken into account. 753 763 These coordinates systems is presented in a report \citep{levier.treguier.ea_rpt07} available on the \NEMO web site. 754 764 … … 766 776 The position (\zstar) and vertical discretization (\zstar) are expressed as: 767 777 \[ 768 % \label{eq: z-star}778 % \label{eq:PE_z-star} 769 779 H + \zstar = (H + z) / r \quad \text{and} \quad \delta \zstar 770 780 = \delta z / r \quad \text{with} \quad r 771 = \frac{H + \eta}{H} 781 = \frac{H + \eta}{H} . 782 \] 783 Simple re-organisation of the above expressions gives 784 \[ 785 % \label{eq:PE_zstar_2} 786 \zstar = H \lt( \frac{z - \eta}{H + \eta} \rt) . 772 787 \] 773 788 Since the vertical displacement of the free surface is incorporated in the vertical coordinate \zstar, … … 776 791 Also the divergence of the flow field is no longer zero as shown by the continuity equation: 777 792 \[ 778 \pd[r]{t} = \nabla_{\zstar} \cdot \lt( r \; \vect U_h \rt) (r \; w *) = 0793 \pd[r]{t} = \nabla_{\zstar} \cdot \lt( r \; \vect U_h \rt) + \pd[r \; w^*]{\zstar} = 0 . 779 794 \] 780 781 % from MOM4p1 documentation 782 To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate 783 \[ 784 % \label{eq:PE_} 785 \zstar = H \lt( \frac{z - \eta}{H + \eta} \rt) 786 \] 787 788 This coordinate is closely related to the "eta" coordinate used in many atmospheric models 795 This \zstar coordinate is closely related to the "eta" coordinate used in many atmospheric models 789 796 (see Black (1994) for a review of eta coordinate atmospheric models). 790 797 It was originally used in ocean models by Stacey et al. (1995) for studies of tides next to shelves, … … 798 805 These properties greatly reduce difficulties of computing the horizontal pressure gradient relative to 799 806 terrain following sigma models discussed in \autoref{subsec:PE_sco}. 800 Additionally, since \zstarwhen $\eta = 0$,807 Additionally, since $\zstar = z$ when $\eta = 0$, 801 808 no flow is spontaneously generated in an unforced ocean starting from rest, regardless the bottom topography. 802 809 This behaviour is in contrast to the case with "s"-models, where pressure gradient errors in the presence of … … 804 811 depending on the sophistication of the pressure gradient solver. 805 812 The quasi -horizontal nature of the coordinate surfaces also facilitates the implementation of 806 neutral physics parameterizations in \zstar models using the same techniques as in $z$-models813 neutral physics parameterizations in \zstar models using the same techniques as in $z$-models 807 814 (see Chapters 13-16 of \cite{griffies_bk04}) for a discussion of neutral physics in $z$-models, 808 815 as well as \autoref{sec:LDF_slp} in this document for treatment in \NEMO). 809 816 810 The range over which \zstar varies is time independent $-H \leq \zstar \leq 0$.811 Hence, all cells remain nonvanishing, so long as the surface height maintains $\eta > ?H$.817 The range over which \zstar varies is time independent $-H \leq \zstar \leq 0$. 818 Hence, all cells remain nonvanishing, so long as the surface height maintains $\eta > -H$. 812 819 This is a minor constraint relative to that encountered on the surface height when using $s = z$ or $s = z - \eta$. 813 820 814 Because \zstar has a time independent range, all grid cells have static increments ds,815 and the sum of the ver 821 Because \zstar has a time independent range, all grid cells have static increments ds, 822 and the sum of the vertical increments yields the time independent ocean depth. %k ds = H. 816 823 The \zstar coordinate is therefore invisible to undulations of the free surface, 817 824 since it moves along with the free surface. 818 This proper ty means that no spurious vertical transport is induced across surfaces of constant \zstarby825 This property means that no spurious vertical transport is induced across surfaces of constant \zstar by 819 826 the motion of external gravity waves. 820 Such spurious transpor 821 Quite generally, the time independent range for the \zstar coordinate is a very convenient property that822 allows for a nearly arbitrary ver 827 Such spurious transport can be a problem in z-models, especially those with tidal forcing. 828 Quite generally, the time independent range for the \zstar coordinate is a very convenient property that 829 allows for a nearly arbitrary vertical resolution even in the presence of large amplitude fluctuations of 823 830 the surface height, again so long as $\eta > -H$. 824 831 %end MOM doc %%% … … 870 877 \begin{equation} 871 878 \label{eq:PE_p_sco} 872 \nabla p |_z = \nabla p |_s - \ pd[p]{s} \nabla z |_s879 \nabla p |_z = \nabla p |_s - \frac{1}{e_3} \pd[p]{s} \nabla z |_s 873 880 \end{equation} 874 881 875 882 The second term in \autoref{eq:PE_p_sco} depends on the tilt of the coordinate surface and 876 introducesa truncation error that is not present in a $z$-model.883 leads to a truncation error that is not present in a $z$-model. 877 884 In the special case of a $\sigma$-coordinate (i.e. a depth-normalised coordinate system $\sigma = z/H$), 878 885 \citet{haney_JPO91} and \citet{beckmann.haidvogel_JPO93} have given estimates of the magnitude of this truncation error. … … 887 894 However, the definition of the model domain vertical coordinate becomes then a non-trivial thing for 888 895 a realistic bottom topography: 889 a envelope topography is defined in $s$-coordinate on which a full or896 an envelope topography is defined in $s$-coordinate on which a full or 890 897 partial step bottom topography is then applied in order to adjust the model depth to the observed one 891 898 (see \autoref{sec:DOM_zgr}. … … 922 929 923 930 The \ztilde -coordinate has been developed by \citet{leclair.madec_OM11}. 924 It is available in \NEMO since the version 3.4 .931 It is available in \NEMO since the version 3.4 and is more robust in version 4.0 than previously. 925 932 Nevertheless, it is currently not robust enough to be used in all possible configurations. 926 933 Its use is therefore not recommended. … … 934 941 \label{sec:PE_zdf_ldf} 935 942 936 The primitive equations describe the behaviour of a geophysical fluid at space and time scales larger than943 The hydrostatic primitive equations describe the behaviour of a geophysical fluid at space and time scales larger than 937 944 a few kilometres in the horizontal, a few meters in the vertical and a few minutes. 938 945 They are usually solved at larger scales: the specified grid spacing and time step of the numerical model. … … 984 991 All the vertical physics is embedded in the specification of the eddy coefficients. 985 992 They can be assumed to be either constant, or function of the local fluid properties 986 (\eg Richardson number, Brunt-Vais\"{a}l\"{a} frequency ...),993 (\eg Richardson number, Brunt-Vais\"{a}l\"{a} frequency, distance from the boundary ...), 987 994 or computed from a turbulent closure model. 988 995 The choices available in \NEMO are discussed in \autoref{chap:ZDF}). … … 1016 1023 both horizontal and isoneutral operators have no effect on mean (\ie large scale) potential energy whereas 1017 1024 potential energy is a main source of turbulence (through baroclinic instabilities). 1018 \citet{gent.mcwilliams_JPO90} haveproposed a parameterisation of mesoscale eddy-induced turbulence which1025 \citet{gent.mcwilliams_JPO90} proposed a parameterisation of mesoscale eddy-induced turbulence which 1019 1026 associates an eddy-induced velocity to the isoneutral diffusion. 1020 1027 Its mean effect is to reduce the mean potential energy of the ocean. … … 1033 1040 Another approach is becoming more and more popular: 1034 1041 instead of specifying explicitly a sub-grid scale term in the momentum and tracer time evolution equations, 1035 one uses a advective scheme which is diffusive enough to maintain the model stability.1042 one uses an advective scheme which is diffusive enough to maintain the model stability. 1036 1043 It must be emphasised that then, all the sub-grid scale physics is included in the formulation of 1037 1044 the advection scheme. 1038 1045 1039 1046 All these parameterisations of subgrid scale physics have advantages and drawbacks. 1040 The reare not all available in \NEMO. For active tracers (temperature and salinity) the main ones are:1047 They are not all available in \NEMO. For active tracers (temperature and salinity) the main ones are: 1041 1048 Laplacian and bilaplacian operators acting along geopotential or iso-neutral surfaces, 1042 1049 \citet{gent.mcwilliams_JPO90} parameterisation, and various slightly diffusive advection schemes. … … 1141 1148 - \nabla_h \times \big( A^{lm} \, \zeta \; \vect k \big) \\ 1142 1149 &= \lt( \frac{1}{e_1} \pd[ \lt( A^{lm} \chi \rt) ]{i} \rt. 1143 - \frac{1}{e_2 e_3} \pd[ \lt( A^{lm} \; e_3 \zeta \rt) ]{j} 1150 - \frac{1}{e_2 e_3} \pd[ \lt( A^{lm} \; e_3 \zeta \rt) ]{j} , 1144 1151 \frac{1}{e_2} \pd[ \lt( A^{lm} \chi \rt) ]{j} 1145 1152 \lt. + \frac{1}{e_1 e_3} \pd[ \lt( A^{lm} \; e_3 \zeta \rt) ]{i} \rt) … … 1164 1171 a geographical coordinate system \citep{lengaigne.madec.ea_JGR03}. 1165 1172 1166 \subsubsection{ lateral bilaplacian momentum diffusive operator}1173 \subsubsection{Lateral bilaplacian momentum diffusive operator} 1167 1174 1168 1175 As for tracers, the bilaplacian order momentum diffusive operator is a re-entering Laplacian operator with -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/introduction.tex
r11263 r11353 151 151 The coding rules for OPA include conventions for naming variables, 152 152 with different starting letters for different types of variables (real, integer, parameter\ldots). 153 Those rules are briefly presented in \autoref{apdx: D} and a more complete document is available .153 Those rules are briefly presented in \autoref{apdx:coding} and a more complete document is available . 154 154 155 155 The model is organized with a high internal modularity based on physics. … … 158 158 To make it easier for the user to find his way around the code, the module names follow a three-letter rule. 159 159 For example, \mdl{traldf} is a module related to the TRAcers equation, computing the Lateral DiFfussion. 160 %The complete list of module names is presented in \autoref{apdx: D}. %====>>>> to be done !160 %The complete list of module names is presented in \autoref{apdx:coding}. %====>>>> to be done ! 161 161 Furthermore, modules are organized in a few directories that correspond to their category, 162 162 as indicated by the first three letters of their name (\autoref{tab:chapters}). -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/global/document.tex
r11212 r11353 85 85 \include{appendices} 86 86 87 %% Append coding rules for every manual 88 \input{../../global/coding_rules} 89 87 90 88 91 %% Backmatter -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/global/highlighting.tex
r11212 r11353 25 25 26 26 %% Inline 27 \newmintinline[forcode]{fortran}{ fontsize=auto, frame=lines} % \forcode{...}28 \newmintinline[xmlcode]{xml}{ fontsize=auto, frame=lines} % \xmlcode{...}29 \newmintinline[snippet]{console}{ fontsize=auto, frame=lines} % \snippet{...}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{...} 30 30 31 31 %% Namelists inclusion -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/namelists/namobs
r11042 r11353 8 8 ln_sla = .false. ! Logical switch for SLA observations 9 9 ln_sst = .false. ! Logical switch for SST observations 10 ln_sss = .false. ! Logical swit hcfor SSS observations10 ln_sss = .false. ! Logical switch for SSS observations 11 11 ln_sic = .false. ! Logical switch for Sea Ice observations 12 12 ln_vel3d = .false. ! Logical switch for velocity observations -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynzdf.F90
r10364 r11353 170 170 zzws = - zdt * ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) + akzu(ji,jj,jk+1) ) & 171 171 & / ( ze3ua * e3uw_n(ji,jj,jk+1) ) * wumask(ji,jj,jk+1) 172 zWui = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) )173 zWus = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) )172 zWui = ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) ) / ze3ua 173 zWus = ( wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) ) / ze3ua 174 174 zwi(ji,jj,jk) = zzwi + zdt * MIN( zWui, 0._wp ) 175 175 zws(ji,jj,jk) = zzws - zdt * MAX( zWus, 0._wp ) … … 185 185 zzwi = - zdt * ( avm(ji+1,jj,jk ) + avm(ji,jj,jk ) ) / ( ze3ua * e3uw_n(ji,jj,jk ) ) * wumask(ji,jj,jk ) 186 186 zzws = - zdt * ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) ) / ( ze3ua * e3uw_n(ji,jj,jk+1) ) * wumask(ji,jj,jk+1) 187 zWui = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) )188 zWus = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) )187 zWui = ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) ) / ze3ua 188 zWus = ( wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) ) / ze3ua 189 189 zwi(ji,jj,jk) = zzwi + zdt * MIN( zWui, 0._wp ) 190 190 zws(ji,jj,jk) = zzws - zdt * MAX( zWus, 0._wp ) … … 199 199 ze3ua = ( 1._wp - r_vvl ) * e3u_n(ji,jj,1) + r_vvl * e3u_a(ji,jj,1) 200 200 zzws = - zdt * ( avm(ji+1,jj,2) + avm(ji ,jj,2) ) / ( ze3ua * e3uw_n(ji,jj,2) ) * wumask(ji,jj,2) 201 zWus = 0.5_wp * ( wi(ji ,jj,2) + wi(ji+1,jj,2) )201 zWus = ( wi(ji ,jj,2) + wi(ji+1,jj,2) ) / ze3ua 202 202 zws(ji,jj,1 ) = zzws - zdt * MAX( zWus, 0._wp ) 203 203 zwd(ji,jj,1 ) = 1._wp - zzws - zdt * ( MIN( zWus, 0._wp ) ) … … 336 336 zzws = - zdt * ( avm(ji,jj+1,jk+1) + avm(ji,jj,jk+1) + akzv(ji,jj,jk+1) ) & 337 337 & / ( ze3va * e3vw_n(ji,jj,jk+1) ) * wvmask(ji,jj,jk+1) 338 zWvi = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) * wvmask(ji,jj,jk )339 zWvs = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) * wvmask(ji,jj,jk+1)338 zWvi = ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) / ze3va 339 zWvs = ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) / ze3va 340 340 zwi(ji,jj,jk) = zzwi + zdt * MIN( zWvi, 0._wp ) 341 341 zws(ji,jj,jk) = zzws - zdt * MAX( zWvs, 0._wp ) … … 351 351 zzwi = - zdt * ( avm(ji,jj+1,jk ) + avm(ji,jj,jk ) ) / ( ze3va * e3vw_n(ji,jj,jk ) ) * wvmask(ji,jj,jk ) 352 352 zzws = - zdt * ( avm(ji,jj+1,jk+1) + avm(ji,jj,jk+1) ) / ( ze3va * e3vw_n(ji,jj,jk+1) ) * wvmask(ji,jj,jk+1) 353 zWvi = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) * wvmask(ji,jj,jk )354 zWvs = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) * wvmask(ji,jj,jk+1)353 zWvi = ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) / ze3va 354 zWvs = ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) / ze3va 355 355 zwi(ji,jj,jk) = zzwi + zdt * MIN( zWvi, 0._wp ) 356 356 zws(ji,jj,jk) = zzws - zdt * MAX( zWvs, 0._wp ) … … 365 365 ze3va = ( 1._wp - r_vvl ) * e3v_n(ji,jj,1) + r_vvl * e3v_a(ji,jj,1) 366 366 zzws = - zdt * ( avm(ji,jj+1,2) + avm(ji,jj,2) ) / ( ze3va * e3vw_n(ji,jj,2) ) * wvmask(ji,jj,2) 367 zWvs = 0.5_wp * ( wi(ji,jj ,2) + wi(ji,jj+1,2) )367 zWvs = ( wi(ji,jj ,2) + wi(ji,jj+1,2) ) / ze3va 368 368 zws(ji,jj,1 ) = zzws - zdt * MAX( zWvs, 0._wp ) 369 369 zwd(ji,jj,1 ) = 1._wp - zzws - zdt * ( MIN( zWvs, 0._wp ) ) -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/sshwzv.F90
r10907 r11353 284 284 ! 285 285 INTEGER :: ji, jj, jk ! dummy loop indices 286 REAL(wp) :: zCu, zcff, z1_e3 w! local scalars286 REAL(wp) :: zCu, zcff, z1_e3t ! local scalars 287 287 REAL(wp) , PARAMETER :: Cu_min = 0.15_wp ! local parameters 288 288 REAL(wp) , PARAMETER :: Cu_max = 0.27 ! local parameters … … 297 297 IF(lwp) WRITE(numout,*) 'wAimp : Courant number-based partitioning of now vertical velocity ' 298 298 IF(lwp) WRITE(numout,*) '~~~~~ ' 299 wi(:,:,:) = 0._wp 299 300 ENDIF 300 301 ! … … 303 304 DO jj = 2, jpjm1 304 305 DO ji = 2, fs_jpim1 ! vector opt. 305 z1_e3 w = 1._wp / e3w_n(ji,jj,jk)306 Cu_adv(ji,jj,jk) = 2._wp * rdt * ( ( MAX( wn(ji,jj,jk) , 0._wp ) - MIN( wn(ji,jj,jk+1) , 0._wp ) ) 307 & + ( MAX( e2u(ji ,jj)*e3u w_n(ji ,jj,jk)*un(ji ,jj,jk), 0._wp ) - &308 & MIN( e2u(ji-1,jj)*e3u w_n(ji-1,jj,jk)*un(ji-1,jj,jk), 0._wp ) ) &309 & * r1_e1e2t(ji,jj) 310 & + ( MAX( e1v(ji,jj )*e3v w_n(ji,jj ,jk)*vn(ji,jj ,jk), 0._wp ) - &311 & MIN( e1v(ji,jj-1)*e3v w_n(ji,jj-1,jk)*vn(ji,jj-1,jk), 0._wp ) ) &312 & * r1_e1e2t(ji,jj) 313 & ) * z1_e3 w306 z1_e3t = 1._wp / e3t_n(ji,jj,jk) 307 Cu_adv(ji,jj,jk) = 2._wp * rdt * ( ( MAX( wn(ji,jj,jk) , 0._wp ) - MIN( wn(ji,jj,jk+1) , 0._wp ) ) & ! 2*rdt and not r2dt (for restartability) 308 & + ( MAX( e2u(ji ,jj)*e3u_n(ji ,jj,jk)*un(ji ,jj,jk), 0._wp ) - & 309 & MIN( e2u(ji-1,jj)*e3u_n(ji-1,jj,jk)*un(ji-1,jj,jk), 0._wp ) ) & 310 & * r1_e1e2t(ji,jj) & 311 & + ( MAX( e1v(ji,jj )*e3v_n(ji,jj ,jk)*vn(ji,jj ,jk), 0._wp ) - & 312 & MIN( e1v(ji,jj-1)*e3v_n(ji,jj-1,jk)*vn(ji,jj-1,jk), 0._wp ) ) & 313 & * r1_e1e2t(ji,jj) & 314 & ) * z1_e3t 314 315 END DO 315 316 END DO … … 320 321 ! 321 322 IF( MAXVAL( Cu_adv(:,:,:) ) > Cu_min ) THEN ! Quick check if any breaches anywhere 322 DO jk = 1, jpkm1! or scan Courant criterion and partition323 DO jk = jpkm1, 2, -1 ! or scan Courant criterion and partition 323 324 DO jj = 1, jpj ! w where necessary 324 325 DO ji = 1, jpi 325 326 ! 326 zCu = MAX( Cu_adv(ji,jj,jk) , Cu_adv(ji,jj,jk+1) ) 327 zCu = MAX( Cu_adv(ji,jj,jk) , Cu_adv(ji,jj,jk-1) ) 328 ! alt: 329 ! IF ( wn(ji,jj,jk) > 0._wp ) THEN 330 ! zCu = Cu_adv(ji,jj,jk) 331 ! ELSE 332 ! zCu = Cu_adv(ji,jj,jk-1) 333 ! ENDIF 327 334 ! 328 335 IF( zCu <= Cu_min ) THEN !<-- Fully explicit … … 343 350 END DO 344 351 END DO 352 Cu_adv(:,:,1) = 0._wp 345 353 ELSE 346 354 ! Fully explicit everywhere -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/STO/stopar.F90
r11317 r11353 270 270 IF(lwm) WRITE ( numond, namsto ) 271 271 272 IF( .NOT.ln_ rststo) THEN ! no use of stochastic parameterization272 IF( .NOT.ln_sto_eos ) THEN ! no use of stochastic parameterization 273 273 IF(lwp) THEN 274 274 WRITE(numout,*) -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/step.F90
r11223 r11353 198 198 CALL div_hor ( kstp ) ! Horizontal divergence (2nd call in time-split case) 199 199 IF(.NOT.ln_linssh) CALL dom_vvl_sf_nxt( kstp, kcall=2 ) ! after vertical scale factors (update depth average component) 200 ENDIF 201 CALL dyn_zdf ( kstp ) ! vertical diffusion 202 203 IF( ln_dynspg_ts ) THEN 200 204 CALL wzv ( kstp ) ! now cross-level velocity 201 205 IF( ln_zad_Aimp ) CALL wAimp ( kstp ) ! Adaptive-implicit vertical advection partitioning 202 206 ENDIF 203 204 CALL dyn_zdf ( kstp ) ! vertical diffusion205 207 206 208 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Note: See TracChangeset
for help on using the changeset viewer.