Changeset 10419 for NEMO/branches/2018
- Timestamp:
- 2018-12-19T20:46:30+01:00 (5 years ago)
- Location:
- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE
- Files:
-
- 1 deleted
- 73 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/cfgs/SHARED/field_def_nemo-ice.xml
r9943 r10419 29 29 <field id="icemask15" long_name="Ice mask (0 if ice conc. lower than 15%, 1 otherwise)" standard_name="sea_ice_mask15" unit="" /> 30 30 <field id="icepres" long_name="Fraction of time steps with sea ice" standard_name="sea_ice_time_fraction" unit="" /> 31 31 <field id="fasticepres" long_name="Fraction of time steps with landfast ice" standard_name="fast_ice_time_fraction" unit="" /> 32 32 33 <!-- general fields --> 33 34 <field id="icemass" long_name="Sea-ice mass per area" standard_name="sea_ice_amount" unit="kg/m2"/> -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/cfgs/SHARED/field_def_nemo-pisces.xml
r10368 r10419 105 105 <field id="LGW" long_name="Weak ligands concentration" unit="mmol/m3" /> 106 106 <field id="LGW_e3t" long_name="LGW * e3t" unit="mmol/m2" > LGW * e3t </field > 107 <field id="LFe" long_name="Lithogenic iron concentration" unit="mmol/m3" />108 <field id="LFe_e3t" long_name="LFe * e3t" unit="mmol/m2" > LFe * e3t </field >109 107 110 108 <!-- PISCES light : variables available with ln_p2z --> … … 208 206 <field id="SIZEP" long_name="Mean relative size of picophyto." unit="-" grid_ref="grid_T_3D" /> 209 207 <field id="SIZED" long_name="Mean relative size of diatoms" unit="-" grid_ref="grid_T_3D" /> 210 <field id="Fe2" long_name="Iron II concentration" unit="nmol/m3" grid_ref="grid_T_3D" />211 208 <field id="Fe3" long_name="Iron III concentration" unit="nmol/m3" grid_ref="grid_T_3D" /> 212 209 <field id="FeL1" long_name="Complexed Iron concentration with L1" unit="nmol/m3" grid_ref="grid_T_3D" /> 213 <field id="FeL2" long_name="Complexed Iron concentration with L2" unit="nmol/m3" grid_ref="grid_T_3D" />214 <field id="FeP" long_name="Precipitated Iron III" unit="nmol/m3" grid_ref="grid_T_3D" />215 210 <field id="TL1" long_name="Total L1 concentration" unit="nmol/m3" grid_ref="grid_T_3D" /> 216 <field id="TL2" long_name="Total L2 concentration" unit="nmol/m3" grid_ref="grid_T_3D" />217 211 <field id="pdust" long_name="dust concentration" unit="g/m3" /> 218 212 <field id="Totlig" long_name="Total ligand concentation" unit="nmol/m3" grid_ref="grid_T_3D" /> -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/cfgs/SHARED/namelist_ice_ref
r10075 r10419 49 49 &namdyn ! Ice dynamics 50 50 !------------------------------------------------------------------------------ 51 ln_dynFULL = .true. ! dyn.: full ice dynamics (rheology + advection + ridging/rafting + correction) 52 ln_dynRHGADV = .false. ! dyn.: no ridge/raft & no corrections (rheology + advection) 53 ln_dynADV = .false. ! dyn.: only advection w prescribed vel.(rn_uvice + advection) 54 rn_uice = 0.00001 ! prescribed ice u-velocity 55 rn_vice = 0. ! prescribed ice v-velocity 56 rn_ishlat = 2. ! free slip (0) ; partial slip (0-2) ; no slip (2) ; strong slip (>2) 57 ln_landfast = .false. ! landfast ice parameterization (T or F) 58 rn_gamma = 0.15 ! fraction of ocean depth that ice must reach to initiate landfast 59 ! recommended range: [0.1 ; 0.25] 60 rn_icebfr = 10. ! maximum bottom stress per unit area of contact [N/m2] 61 ! a very large value ensures ice velocity=0 even with a small contact area 62 ! recommended range: ?? (should be greater than atm-ice stress => >0.1 N/m2) 63 rn_lfrelax = 1.e-5 ! relaxation time scale to reach static friction [s-1] 51 ln_dynALL = .true. ! dyn.: full ice dynamics (rheology + advection + ridging/rafting + correction) 52 ln_dynRHGADV = .false. ! dyn.: no ridge/raft & no corrections (rheology + advection) 53 ln_dynADV1D = .false. ! dyn.: only advection 1D (Schar & Smolarkiewicz 1996 test case) 54 ln_dynADV2D = .false. ! dyn.: only advection 2D w prescribed vel.(rn_uvice + advection) 55 rn_uice = 0.5 ! prescribed ice u-velocity 56 rn_vice = 0.5 ! prescribed ice v-velocity 57 rn_ishlat = 2. ! lbc : free slip (0) ; partial slip (0-2) ; no slip (2) ; strong slip (>2) 58 ln_landfast_L16 = .false. ! landfast: parameterization from Lemieux 2016 59 ln_landfast_home = .false. ! landfast: parameterization from "home made" 60 rn_depfra = 0.125 ! fraction of ocean depth that ice must reach to initiate landfast 61 ! recommended range: [0.1 ; 0.25] - L16=0.125 - home=0.15 62 rn_icebfr = 15. ! ln_landfast_L16: maximum bottom stress per unit volume [N/m3] 63 ! ln_landfast_home: maximum bottom stress per unit area of contact [N/m2] 64 ! recommended range: ?? L16=15 - home=10 65 rn_lfrelax = 1.e-5 ! relaxation time scale to reach static friction [s-1] 66 rn_tensile = 0.2 ! isotropic tensile strength 64 67 / 65 68 !------------------------------------------------------------------------------ … … 205 208 sn_tmi = 'Ice_initialization' , -12 ,'tmi' , .false. , .true., 'yearly' , '' , '', '' 206 209 sn_smi = 'Ice_initialization' , -12 ,'smi' , .false. , .true., 'yearly' , '' , '', '' 207 cn_dir 210 cn_dir='./' 208 211 / 209 212 !------------------------------------------------------------------------------ -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/cfgs/SHARED/namelist_pisces_ref
r10377 r10419 52 52 wsbio2scale = 5000. ! Big particles length scale of sinking 53 53 ! ! ln_ligand enabled 54 wfep = 0.2 ! FeP sinking speed55 54 ldocp = 1.E-4 ! Phyto ligand production per unit doc 56 55 ldocz = 1.E-4 ! Zoo ligand production per unit doc … … 155 154 excretn = 0.05 ! excretion ratio of phytoplankton 156 155 excretd = 0.05 ! excretion ratio of diatoms 157 ln_newprod = .true. ! Enable new parame. of production (T/F)158 156 bresp = 0.033 ! Basal respiration rate 159 157 chlcnm = 0.033 ! Maximum Chl/C in nanophytoplankton … … 222 220 sigma2 = 0.6 ! Fraction of mesozoo excretion as DOM 223 221 unass2 = 0.3 ! non assimilated fraction of P by mesozoo 224 grazflux = 2.e3 ! flux-feeding rate222 grazflux = 3.e3 ! flux-feeding rate 225 223 / 226 224 !----------------------------------------------------------------------- … … 304 302 &nampisfer ! parameters for iron chemistry 305 303 !----------------------------------------------------------------------- 306 ln_fechem = .false. ! complex iron chemistry ( T/F ) 307 ln_ligvar = .false. ! variable ligand concentration 308 xlam1 = 0.005 ! scavenging rate of Iron 309 xlamdust = 150.0 ! Scavenging rate of dust 310 ligand = 0.7E-9 ! Ligands concentration 311 kfep = 0.01 ! Nanoparticle formation rate constant 304 ln_ligvar = .true. ! variable ligand concentration 305 xlam1 = 0.005 ! scavenging rate of Iron 306 xlamdust = 150.0 ! Scavenging rate of dust 307 ligand = 0.7E-9 ! Ligands concentration 308 kfep = 0.01 ! Nanoparticle formation rate constant 312 309 / 313 310 !----------------------------------------------------------------------- … … 382 379 hratio = 1.e+7 ! Fe to 3He ratio assumed for vent iron supply 383 380 ! ! ln_ligand 384 fep_rats = 1. ! Fep/Fer ratio from sed sources385 fep_rath = 1. ! Fep/Fer ratio from sed hydro sources386 rdustfep = 0.0 ! Fraction of dust that is FeP387 381 lgw_rath = 0.5 ! Weak ligand ratio from sed hydro sources 388 382 / … … 390 384 &nampislig ! Namelist parameters for ligands, nampislig 391 385 !----------------------------------------------------------------------- 392 rfep = 0.001 ! Dissolution rate of FeP393 386 rlgw = 100. ! Lifetime (years) of weak ligands 394 387 rlig = 1.E-4 ! Remin ligand production per unit C -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/cfgs/SPITZ12/EXPREF/namelist_ice_cfg
r9902 r10419 35 35 &namdyn ! Ice dynamics 36 36 !------------------------------------------------------------------------------ 37 ln_landfast = .false. ! landfast ice parameterization (T or F)38 37 / 39 38 !------------------------------------------------------------------------------ -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/PDF_creation.sh
r10146 r10419 2 2 3 3 4 export opts='-shell-escape - interaction=nonstopmode'4 export opts='-shell-escape -pdf' 5 5 model='NEMO' 6 6 7 7 clean() { 8 8 ## Delete latex build files 9 find latex -regextype posix-extended -regex ".*\.(aux|log|maf|mtc|out|toc).*" -exec rm {} \; 9 find latex -regextype posix-extended \ 10 -regex ".*\.(aux|bbl|blg|dvi|fdb|fls|idx|ilg|ind|log|maf|mtc|out|pdf|toc).*" \ 11 -exec rm {} \; 10 12 11 13 ## Remove 'minted' directories … … 18 20 build() { 19 21 cd latex/$1/main 20 21 latex $opts $1'_manual' > /dev/null 22 makeindex -s $1'_manual'.ist $1'_manual' > /dev/null 23 bibtex $1'_manual' > /dev/null 24 #latex $opts $1'_manual' > /dev/null 25 pdflatex $opts $1'_manual' > /dev/null 26 27 mv $1'_manual'.pdf ../../.. 22 latexmk $opts $1'_manual' > /dev/null 23 mv $1'_manual'.pdf ../../.. 28 24 cd - 29 25 } 30 26 31 27 clean 32 build 28 build $model 33 29 34 30 exit 0 -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex
-
Property
svn:ignore
set to
*.aux
*.bbl
*.blg
*.dvi
*.fdb*
*.fls
*.idx
*.ilg
*.ind
*.log
*.maf
*.mtc*
*.out
*.pdf
*.toc
_minted-*
-
Property
svn:ignore
set to
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO
-
Property
svn:ignore
set to
*.aux
*.bbl
*.blg
*.dvi
*.fdb*
*.fls
*.idx
*.ilg
*.ind
*.log
*.maf
*.mtc*
*.out
*.pdf
*.toc
_minted-*
-
Property
svn:ignore
set to
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/main
- Property svn:ignore
-
old new 3 3 *.blg 4 4 *.dvi 5 *.fdb* 6 *.fls 5 7 *.idx 6 8 *.ilg
-
- Property svn:ignore
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/main/NEMO_manual.tex
r10146 r10419 25 25 %% ============================================================================== 26 26 27 %% Trick to include biblio in subfile compilation 28 \newcommand{\biblio}{ 29 \bibliographystyle{../main/ametsoc} 30 \bibliography{../main/NEMO_manual} 31 } 32 27 33 \begin{document} 34 35 %% Trick to include biblio in subfile compilation 36 \def\biblio{} 28 37 29 38 … … 34 43 35 44 \title{ 36 \vspace{-6.0cm}\includegraphics[width=1.1\textwidth]{logo_ALL} \\37 \vspace{ 5.1cm}\includegraphics[width=0.9\textwidth]{NEMO_logo_Black} \\45 %\vspace{-6.0cm}\includegraphics[width=1.1\textwidth]{logo_ALL} \\ 46 %\vspace{ 5.1cm}\includegraphics[width=0.9\textwidth]{NEMO_logo_Black} \\ 38 47 \vspace{ 1.4cm}\rule{345pt}{1.5pt} \\ 39 48 \vspace{0.45cm}{\Huge NEMO ocean engine} \\ … … 71 80 72 81 73 %% Abstract -Foreword82 %% Foreword 74 83 75 \subfile{../subfiles/ abstract_foreword}84 \subfile{../subfiles/foreword} 76 85 77 86 -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles
-
Property
svn:ignore
set to
*.aux
*.bbl
*.blg
*.dvi
*.fdb*
*.fls
*.idx
*.ilg
*.ind
*.log
*.maf
*.mtc*
*.out
*.pdf
*.toc
_minted-*
-
Property
svn:ignore
set to
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/annex_A.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 4 5 % ================================================================ 5 % Chapter ÑAppendix A : Curvilinear s-Coordinate Equations6 % Chapter Appendix A : Curvilinear s-Coordinate Equations 6 7 % ================================================================ 7 8 \chapter{Curvilinear $s-$Coordinate Equations} 8 9 \label{apdx:A} 10 9 11 \minitoc 10 12 11 13 \newpage 12 $\ $\newline % force a new ligne13 14 14 15 % ================================================================ … … 26 27 Let us define a new vertical scale factor by $e_3 = \partial z / \partial s$ (which now depends on $(i,j,z,t)$) and 27 28 the horizontal slope of $s-$surfaces by: 28 \begin{equation} \label{apdx:A_s_slope} 29 \sigma _1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s 30 \quad \text{and} \quad 31 \sigma _2 =\frac{1}{e_2 }\;\left. {\frac{\partial z}{\partial j}} \right|_s 29 \begin{equation} 30 \label{apdx:A_s_slope} 31 \sigma_1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s 32 \quad \text{and} \quad 33 \sigma_2 =\frac{1}{e_2 }\;\left. {\frac{\partial z}{\partial j}} \right|_s 32 34 \end{equation} 33 35 34 36 The chain rule to establish the model equations in the curvilinear $s-$coordinate system is: 35 \begin{equation} \label{apdx:A_s_chain_rule} 36 \begin{aligned} 37 &\left. {\frac{\partial \bullet }{\partial t}} \right|_z = 38 \left. {\frac{\partial \bullet }{\partial t}} \right|_s 37 \begin{equation} 38 \label{apdx:A_s_chain_rule} 39 \begin{aligned} 40 &\left. {\frac{\partial \bullet }{\partial t}} \right|_z = 41 \left. {\frac{\partial \bullet }{\partial t}} \right|_s 39 42 -\frac{\partial \bullet }{\partial s}\;\frac{\partial s}{\partial t} \\ 40 &\left. {\frac{\partial \bullet }{\partial i}} \right|_z =41 \left. {\frac{\partial \bullet }{\partial i}} \right|_s42 43 \left. {\frac{\partial \bullet }{\partial i}} \right|_s 44 -\frac{e_1 }{e_3 }\sigma_1 \frac{\partial \bullet }{\partial s} \\45 &\left. {\frac{\partial \bullet }{\partial j}} \right|_z =46 \left. {\frac{\partial \bullet }{\partial j}} \right|_s 47 48 \left. {\frac{\partial \bullet }{\partial j}} \right|_s 49 - \frac{e_2 }{e_3 }\sigma_2 \frac{\partial \bullet }{\partial s} \\50 &\;\frac{\partial \bullet }{\partial z} \;\; = \frac{1}{e_3 }\frac{\partial \bullet }{\partial s} \\ 51 \end{aligned}43 &\left. {\frac{\partial \bullet }{\partial i}} \right|_z = 44 \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} \\ 48 &\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} 54 \end{aligned} 52 55 \end{equation} 53 56 54 57 In particular applying the time derivative chain rule to $z$ provides the expression for $w_s$, 55 58 the vertical velocity of the $s-$surfaces referenced to a fix z-coordinate: 56 \begin{equation} \label{apdx:A_w_in_s}57 w_s = \left. \frac{\partial z }{\partial t} \right|_s 58 = \frac{\partial z}{\partial s} \; \frac{\partial s}{\partial t} 59 = e_3 \, \frac{\partial s}{\partial t} 60 \end{equation}61 59 \begin{equation} 60 \label{apdx:A_w_in_s} 61 w_s = \left. \frac{\partial z }{\partial t} \right|_s 62 = \frac{\partial z}{\partial s} \; \frac{\partial s}{\partial t} 63 = e_3 \, \frac{\partial s}{\partial t} 64 \end{equation} 62 65 63 66 % ================================================================ … … 72 75 obtain its expression in the curvilinear $s-$coordinate system: 73 76 74 \begin{subequations} 75 \begin{align*} {\begin{array}{*{20}l} 76 \nabla \cdot {\rm {\bf U}} 77 &= \frac{1}{e_1 \,e_2 } \left[ \left. {\frac{\partial (e_2 \,u)}{\partial i}} \right|_z 78 +\left. {\frac{\partial(e_1 \,v)}{\partial j}} \right|_z \right] 79 + \frac{\partial w}{\partial z} \\ 80 \\ 81 & = \frac{1}{e_1 \,e_2 } \left[ 82 \left. \frac{\partial (e_2 \,u)}{\partial i} \right|_s 83 - \frac{e_1 }{e_3 } \sigma _1 \frac{\partial (e_2 \,u)}{\partial s}84 + \left. \frac{\partial (e_1 \,v)}{\partial j} \right|_s85 - \frac{e_2 }{e_3 } \sigma _2 \frac{\partial (e_1 \,v)}{\partial s} \right] 86 + \frac{\partial w}{\partial s} \; \frac{\partial s}{\partial z} \\87 \\88 & = \frac{1}{e_1 \,e_2 } \left[ 89 \left. \frac{\partial (e_2 \,u)}{\partial i} \right|_s 90 91 92 - \sigma_1 \frac{\partial u}{\partial s}93 - \sigma _2 \frac{\partial v}{\partial s} \right]\\94 \\ 95 & = \frac{1}{e_1 \,e_2 \,e_3 } \left[ 96 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s97 -\left. e_2 \,u \frac{\partial e_3 }{\partial i} \right|_s 98 + \left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s99 - \left. e_1 v \frac{\partial e_3 }{\partial j} \right|_s \right] \\ 100 & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad 101 + \frac{1}{e_3 } \left[ \frac{\partial w}{\partial s}102 - \sigma _1 \frac{\partial u}{\partial s} 103 - \sigma _2 \frac{\partial v}{\partial s} \right] \\ 104 % 105 \intertext{Noting that $ 106 \frac{1}{e_1} \left.{ \frac{\partial e_3}{\partial i}} \right|_s107 =\frac{1}{e_1} \left.{ \frac{\partial^2 z}{\partial i\,\partial s}} \right|_s 108 =\frac{\partial}{\partial s} \left( {\frac{1}{e_1 } \left.{ \frac{\partial z}{\partial i} }\right|_s } \right) 109 =\frac{\partial \sigma _1}{\partial s} 110 $ and $ 111 \frac{1}{e_2 }\left. {\frac{\partial e_3 }{\partial j}} \right|_s 112 =\frac{\partial \sigma _2}{\partial s}113 $, it becomes:} 114 % 115 \nabla \cdot {\rm {\bf U}} 116 & = \frac{1}{e_1 \,e_2 \,e_3 } \left[ 117 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 118 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] \\ 119 & \qquad \qquad \qquad \qquad \quad 120 +\frac{1}{e_3 }\left[ {\frac{\partial w}{\partial s}-u\frac{\partial \sigma _1 }{\partial s}-v\frac{\partial \sigma _2 }{\partial s}-\sigma _1 \frac{\partial u}{\partial s}-\sigma _2 \frac{\partial v}{\partial s}} \right] \\121 \\ 122 & = \frac{1}{e_1 \,e_2 \,e_3 } \left[ 123 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 124 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] 125 + \frac{1}{e_3 } \; \frac{\partial}{\partial s} \left[ w - u\;\sigma _1 - v\;\sigma _2 \right]126 \end{array} } 127 \end{align*}77 \begin{subequations} 78 \begin{align*} 79 { 80 \begin{array}{*{20}l} 81 \nabla \cdot {\rm {\bf U}} 82 &= \frac{1}{e_1 \,e_2 } \left[ \left. {\frac{\partial (e_2 \,u)}{\partial i}} \right|_z 83 +\left. {\frac{\partial(e_1 \,v)}{\partial j}} \right|_z \right] 84 + \frac{\partial w}{\partial z} \\ \\ 85 & = \frac{1}{e_1 \,e_2 } \left[ 86 \left. \frac{\partial (e_2 \,u)}{\partial i} \right|_s 87 - \frac{e_1 }{e_3 } \sigma_1 \frac{\partial (e_2 \,u)}{\partial s} 88 + \left. \frac{\partial (e_1 \,v)}{\partial j} \right|_s 89 - \frac{e_2 }{e_3 } \sigma_2 \frac{\partial (e_1 \,v)}{\partial s} \right] 90 + \frac{\partial w}{\partial s} \; \frac{\partial s}{\partial z} \\ \\ 91 & = \frac{1}{e_1 \,e_2 } \left[ 92 \left. \frac{\partial (e_2 \,u)}{\partial i} \right|_s 93 + \left. \frac{\partial (e_1 \,v)}{\partial j} \right|_s \right] 94 + \frac{1}{e_3 }\left[ \frac{\partial w}{\partial s} 95 - \sigma_1 \frac{\partial u}{\partial s} 96 - \sigma_2 \frac{\partial v}{\partial s} \right] \\ \\ 97 & = \frac{1}{e_1 \,e_2 \,e_3 } \left[ 98 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 99 -\left. e_2 \,u \frac{\partial e_3 }{\partial i} \right|_s 100 + \left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s 101 - \left. e_1 v \frac{\partial e_3 }{\partial j} \right|_s \right] \\ 102 & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad 103 + \frac{1}{e_3 } \left[ \frac{\partial w}{\partial s} 104 - \sigma_1 \frac{\partial u}{\partial s} 105 - \sigma_2 \frac{\partial v}{\partial s} \right] \\ 106 % 107 \intertext{Noting that $ 108 \frac{1}{e_1} \left.{ \frac{\partial e_3}{\partial i}} \right|_s 109 =\frac{1}{e_1} \left.{ \frac{\partial^2 z}{\partial i\,\partial s}} \right|_s 110 =\frac{\partial}{\partial s} \left( {\frac{1}{e_1 } \left.{ \frac{\partial z}{\partial i} }\right|_s } \right) 111 =\frac{\partial \sigma_1}{\partial s} 112 $ and $ 113 \frac{1}{e_2 }\left. {\frac{\partial e_3 }{\partial j}} \right|_s 114 =\frac{\partial \sigma_2}{\partial s} 115 $, it becomes:} 116 % 117 \nabla \cdot {\rm {\bf U}} 118 & = \frac{1}{e_1 \,e_2 \,e_3 } \left[ 119 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 120 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] \\ 121 & \qquad \qquad \qquad \qquad \quad 122 +\frac{1}{e_3 }\left[ {\frac{\partial w}{\partial s}-u\frac{\partial \sigma_1 }{\partial s}-v\frac{\partial \sigma_2 }{\partial s}-\sigma_1 \frac{\partial u}{\partial s}-\sigma_2 \frac{\partial v}{\partial s}} \right] \\ 123 \\ 124 & = \frac{1}{e_1 \,e_2 \,e_3 } \left[ 125 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 126 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] 127 + \frac{1}{e_3 } \; \frac{\partial}{\partial s} \left[ w - u\;\sigma_1 - v\;\sigma_2 \right] 128 \end{array} 129 } 130 \end{align*} 128 131 \end{subequations} 129 132 … … 131 134 Introducing the dia-surface velocity component, 132 135 $\omega $, defined as the volume flux across the moving $s$-surfaces per unit horizontal area: 133 \begin{equation} \label{apdx:A_w_s} 134 \omega = w - w_s - \sigma _1 \,u - \sigma _2 \,v \\ 136 \begin{equation} 137 \label{apdx:A_w_s} 138 \omega = w - w_s - \sigma_1 \,u - \sigma_2 \,v \\ 135 139 \end{equation} 136 140 with $w_s$ given by \autoref{apdx:A_w_in_s}, 137 141 we obtain the expression for the divergence of the velocity in the curvilinear $s-$coordinate system: 138 \begin{subequations} 139 \begin{align*} {\begin{array}{*{20}l} 140 \nabla \cdot {\rm {\bf U}} 141 &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ 142 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 143 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] 144 + \frac{1}{e_3 } \frac{\partial \omega }{\partial s} 145 + \frac{1}{e_3 } \frac{\partial w_s }{\partial s} \\ 146 \\ 147 &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ 148 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 149 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right]150 + \frac{1}{e_3 } \frac{\partial \omega }{\partial s} 151 + \frac{1}{e_3 } \frac{\partial}{\partial s} \left( e_3 \; \frac{\partial s}{\partial t} \right) \\ 152 \\153 &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ 154 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 155 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] 156 + \frac{1}{e_3 } \frac{\partial \omega }{\partial s} 157 + \frac{\partial}{\partial s} \frac{\partial s}{\partial t}158 + \frac{1}{e_3 } \frac{\partial s}{\partial t} \frac{\partial e_3}{\partial s}\\159 \\ 160 &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ 161 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 162 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] 163 + \frac{1}{e_3 } \frac{\partial \omega }{\partial s} 164 + \frac{1}{e_3 } \frac{\partial e_3}{\partial t} \\ 165 \end{array} } 166 \end{align*}142 \begin{subequations} 143 \begin{align*} 144 { 145 \begin{array}{*{20}l} 146 \nabla \cdot {\rm {\bf U}} 147 &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ 148 \left. \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s 149 +\left. \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s \right] 150 + \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*} 167 171 \end{subequations} 168 172 169 173 As a result, the continuity equation \autoref{eq:PE_continuity} in the $s-$coordinates is: 170 \begin{equation} \label{apdx:A_sco_Continuity} 171 \frac{1}{e_3 } \frac{\partial e_3}{\partial t} 172 + \frac{1}{e_1 \,e_2 \,e_3 }\left[ 173 {\left. {\frac{\partial (e_2 \,e_3 \,u)}{\partial i}} \right|_s 174 + \left. {\frac{\partial (e_1 \,e_3 \,v)}{\partial j}} \right|_s } \right] 175 +\frac{1}{e_3 }\frac{\partial \omega }{\partial s} = 0 174 \begin{equation} 175 \label{apdx:A_sco_Continuity} 176 \frac{1}{e_3 } \frac{\partial e_3}{\partial t} 177 + \frac{1}{e_1 \,e_2 \,e_3 }\left[ 178 {\left. {\frac{\partial (e_2 \,e_3 \,u)}{\partial i}} \right|_s 179 + \left. {\frac{\partial (e_1 \,e_3 \,v)}{\partial j}} \right|_s } \right] 180 +\frac{1}{e_3 }\frac{\partial \omega }{\partial s} = 0 176 181 \end{equation} 177 182 A additional term has appeared that take into account … … 187 192 Here we only consider the first component of the momentum equation, 188 193 the generalization to the second one being straightforward. 189 190 $\ $\newline % force a new ligne191 194 192 195 $\bullet$ \textbf{Total derivative in vector invariant form} … … 197 200 its expression in the curvilinear $s-$coordinate system: 198 201 199 \begin{subequations} 200 \begin{align*} {\begin{array}{*{20}l} 201 \left. \frac{D u}{D t} \right|_z 202 &= \left. {\frac{\partial u }{\partial t}} \right|_z 203 - \left. \zeta \right|_z v 204 + \frac{1}{2e_1} \left.{ \frac{\partial (u^2+v^2)}{\partial i}} \right|_z 205 + w \;\frac{\partial u}{\partial z} \\ 206 \\ 207 &= \left. {\frac{\partial u }{\partial t}} \right|_z 208 - \left. \zeta \right|_z v 209 + \frac{1}{e_1 \,e_2 }\left[ { \left.{ \frac{\partial (e_2 \,v)}{\partial i} }\right|_z 210 -\left.{ \frac{\partial (e_1 \,u)}{\partial j} }\right|_z } \right] \; v 211 + \frac{1}{2e_1} \left.{ \frac{\partial (u^2+v^2)}{\partial i} } \right|_z 212 + w \;\frac{\partial u}{\partial z} \\ 213 % 214 \intertext{introducing the chain rule (\autoref{apdx:A_s_chain_rule}) } 215 % 216 &= \left. {\frac{\partial u }{\partial t}} \right|_z 217 - \frac{1}{e_1\,e_2}\left[ { \left.{ \frac{\partial (e_2 \,v)}{\partial i} } \right|_s 218 -\left.{ \frac{\partial (e_1 \,u)}{\partial j} } \right|_s } \right. 219 \left. {-\frac{e_1}{e_3}\sigma _1 \frac{\partial (e_2 \,v)}{\partial s} 220 +\frac{e_2}{e_3}\sigma _2 \frac{\partial (e_1 \,u)}{\partial s}} \right] \; v \\ 221 & \qquad \qquad \qquad \qquad 222 { + \frac{1}{2e_1} \left( \left. \frac{\partial (u^2+v^2)}{\partial i} \right|_s 223 - \frac{e_1}{e_3}\sigma _1 \frac{\partial (u^2+v^2)}{\partial s} \right) 224 + \frac{w}{e_3 } \;\frac{\partial u}{\partial s} } \\ 225 \\ 226 &= \left. {\frac{\partial u }{\partial t}} \right|_z 227 + \left. \zeta \right|_s \;v 228 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s \\ 229 &\qquad \qquad \qquad \quad 230 + \frac{w}{e_3 } \;\frac{\partial u}{\partial s} 231 - \left[ {\frac{\sigma _1 }{e_3 }\frac{\partial v}{\partial s} 232 - \frac{\sigma_2 }{e_3 }\frac{\partial u}{\partial s}} \right]\;v 233 - \frac{\sigma _1 }{2e_3 }\frac{\partial (u^2+v^2)}{\partial s} \\ 234 \\ 235 &= \left. {\frac{\partial u }{\partial t}} \right|_z 236 + \left. \zeta \right|_s \;v 237 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s \\ 238 &\qquad \qquad \qquad \quad 239 + \frac{1}{e_3} \left[ {w\frac{\partial u}{\partial s} 240 +\sigma _1 v\frac{\partial v}{\partial s} - \sigma _2 v\frac{\partial u}{\partial s} 241 - \sigma _1 u\frac{\partial u}{\partial s} - \sigma _1 v\frac{\partial v}{\partial s}} \right] \\ 242 \\ 243 &= \left. {\frac{\partial u }{\partial t}} \right|_z 244 + \left. \zeta \right|_s \;v 245 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s 246 + \frac{1}{e_3} \left[ w - \sigma _2 v - \sigma _1 u \right] 247 \; \frac{\partial u}{\partial s} \\ 248 % 249 \intertext{Introducing $\omega$, the dia-a-surface velocity given by (\autoref{apdx:A_w_s}) } 250 % 251 &= \left. {\frac{\partial u }{\partial t}} \right|_z 252 + \left. \zeta \right|_s \;v 253 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s 254 + \frac{1}{e_3 } \left( \omega - w_s \right) \frac{\partial u}{\partial s} \\ 255 \end{array} } 256 \end{align*} 202 \begin{subequations} 203 \begin{align*} 204 { 205 \begin{array}{*{20}l} 206 \left. \frac{D u}{D t} \right|_z 207 &= \left. {\frac{\partial u }{\partial t}} \right|_z 208 - \left. \zeta \right|_z v 209 + \frac{1}{2e_1} \left.{ \frac{\partial (u^2+v^2)}{\partial i}} \right|_z 210 + w \;\frac{\partial u}{\partial z} \\ \\ 211 &= \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 214 -\left.{ \frac{\partial (e_1 \,u)}{\partial j} }\right|_z } \right] \; v 215 + \frac{1}{2e_1} \left.{ \frac{\partial (u^2+v^2)}{\partial i} } \right|_z 216 + w \;\frac{\partial u}{\partial z} \\ 217 % 218 \intertext{introducing the chain rule (\autoref{apdx:A_s_chain_rule}) } 219 % 220 &= \left. {\frac{\partial u }{\partial t}} \right|_z 221 - \frac{1}{e_1\,e_2}\left[ { \left.{ \frac{\partial (e_2 \,v)}{\partial i} } \right|_s 222 -\left.{ \frac{\partial (e_1 \,u)}{\partial j} } \right|_s } \right. 223 \left. {-\frac{e_1}{e_3}\sigma_1 \frac{\partial (e_2 \,v)}{\partial s} 224 +\frac{e_2}{e_3}\sigma_2 \frac{\partial (e_1 \,u)}{\partial s}} \right] \; v \\ 225 & \qquad \qquad \qquad \qquad 226 { 227 + \frac{1}{2e_1} \left( \left. \frac{\partial (u^2+v^2)}{\partial i} \right|_s 228 - \frac{e_1}{e_3}\sigma_1 \frac{\partial (u^2+v^2)}{\partial s} \right) 229 + \frac{w}{e_3 } \;\frac{\partial u}{\partial s} 230 } \\ \\ 231 &= \left. {\frac{\partial u }{\partial t}} \right|_z 232 + \left. \zeta \right|_s \;v 233 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s \\ 234 &\qquad \qquad \qquad \quad 235 + \frac{w}{e_3 } \;\frac{\partial u}{\partial s} 236 - \left[ {\frac{\sigma_1 }{e_3 }\frac{\partial v}{\partial s} 237 - \frac{\sigma_2 }{e_3 }\frac{\partial u}{\partial s}} \right]\;v 238 - \frac{\sigma_1 }{2e_3 }\frac{\partial (u^2+v^2)}{\partial s} \\ \\ 239 &= \left. {\frac{\partial u }{\partial t}} \right|_z 240 + \left. \zeta \right|_s \;v 241 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s \\ 242 &\qquad \qquad \qquad \quad 243 + \frac{1}{e_3} \left[ {w\frac{\partial u}{\partial s} 244 +\sigma_1 v\frac{\partial v}{\partial s} - \sigma_2 v\frac{\partial u}{\partial s} 245 - \sigma_1 u\frac{\partial u}{\partial s} - \sigma_1 v\frac{\partial v}{\partial s}} \right] \\ \\ 246 &= \left. {\frac{\partial u }{\partial t}} \right|_z 247 + \left. \zeta \right|_s \;v 248 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s 249 + \frac{1}{e_3} \left[ w - \sigma_2 v - \sigma_1 u \right] 250 \; \frac{\partial u}{\partial s} \\ 251 % 252 \intertext{Introducing $\omega$, the dia-a-surface velocity given by (\autoref{apdx:A_w_s}) } 253 % 254 &= \left. {\frac{\partial u }{\partial t}} \right|_z 255 + \left. \zeta \right|_s \;v 256 + \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} \\ 258 \end{array} 259 } 260 \end{align*} 257 261 \end{subequations} 258 262 % 259 263 Applying the time derivative chain rule (first equation of (\autoref{apdx:A_s_chain_rule})) to $u$ and 260 264 using (\autoref{apdx:A_w_in_s}) provides the expression of the last term of the right hand side, 261 \begin{equation*} {\begin{array}{*{20}l} 262 w_s \;\frac{\partial u}{\partial s} 263 = \frac{\partial s}{\partial t} \; \frac{\partial u }{\partial s} 264 = \left. {\frac{\partial u }{\partial t}} \right|_s - \left. {\frac{\partial u }{\partial t}} \right|_z \quad , 265 \end{array} } 266 \end{equation*} 265 \[ 266 { 267 \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 , 271 \end{array} 272 } 273 \] 267 274 leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative, 268 275 $i.e.$ the total $s-$coordinate time derivative : 269 \begin{align} \label{apdx:A_sco_Dt_vect} 270 \left. \frac{D u}{D t} \right|_s 271 = \left. {\frac{\partial u }{\partial t}} \right|_s 276 \begin{align} 277 \label{apdx:A_sco_Dt_vect} 278 \left. \frac{D u}{D t} \right|_s 279 = \left. {\frac{\partial u }{\partial t}} \right|_s 272 280 + \left. \zeta \right|_s \;v 273 + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s 274 + \frac{1}{e_3 } \omega \;\frac{\partial u}{\partial s} 281 + \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} 275 283 \end{align} 276 284 Therefore, the vector invariant form of the total time derivative has exactly the same mathematical form in … … 278 286 This is not the case for the flux form as shown in next paragraph. 279 287 280 $\ $\newline % force a new ligne281 282 288 $\bullet$ \textbf{Total derivative in flux form} 283 289 284 290 Let us start from the total time derivative in the curvilinear $s-$coordinate system we have just establish. 285 291 Following the procedure used to establish (\autoref{eq:PE_flux_form}), it can be transformed into : 286 % \begin{subequations}287 \begin{align*} {\begin{array}{*{20}l}288 \left. \frac{D u}{D t} \right|_s &= \left. {\frac{\partial u }{\partial t}} \right|_s 289 & - \zeta \;v290 + \frac{1}{2\;e_1 } \frac{\partial \left( {u^2+v^2} \right)}{\partial i}291 + \frac{1}{e_3} \omega \;\frac{\partial u}{\partial s} \\292 \\ 293 &= \left. {\frac{\partial u }{\partial t}} \right|_s294 &+\frac{1}{e_1\;e_2} \left( \frac{\partial \left( {e_2 \,u\,u } \right)}{\partial i}295 + \frac{\partial \left( {e_1 \,u\,v } \right)}{\partial j} \right) 296 + \frac{1}{e_3 } \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\297 \\298 &&- \,u \left[ \frac{1}{e_1 e_2 } \left( \frac{\partial(e_2 u)}{\partial i}299 300 + \frac{1}{e_3} \frac{\partial \omega}{\partial s} \right]\\301 \\ 302 &&- \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i}303 -u \;\frac{\partial e_1 }{\partial j} \right) \\ 304 \end{array} } 292 % \begin{subequations} 293 \begin{align*} 294 { 295 \begin{array}{*{20}l} 296 \left. \frac{D u}{D t} \right|_s &= \left. {\frac{\partial u }{\partial t}} \right|_s 297 & - \zeta \;v 298 + \frac{1}{2\;e_1 } \frac{\partial \left( {u^2+v^2} \right)}{\partial i} 299 + \frac{1}{e_3} \omega \;\frac{\partial u}{\partial s} \\ \\ 300 &= \left. {\frac{\partial u }{\partial t}} \right|_s 301 &+\frac{1}{e_1\;e_2} \left( \frac{\partial \left( {e_2 \,u\,u } \right)}{\partial i} 302 + \frac{\partial \left( {e_1 \,u\,v } \right)}{\partial j} \right) 303 + \frac{1}{e_3 } \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ \\ 304 &&- \,u \left[ \frac{1}{e_1 e_2 } \left( \frac{\partial(e_2 u)}{\partial i} 305 + \frac{\partial(e_1 v)}{\partial j} \right) 306 + \frac{1}{e_3} \frac{\partial \omega}{\partial s} \right] \\ \\ 307 &&- \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 308 -u \;\frac{\partial e_1 }{\partial j} \right) \\ 309 \end{array} 310 } 305 311 \end{align*} 306 312 % 307 313 Introducing the vertical scale factor inside the horizontal derivative of the first two terms 308 314 ($i.e.$ the horizontal divergence), it becomes : 309 \begin{subequations} 310 \begin{align*} {\begin{array}{*{20}l} 311 %\begin{align*} {\begin{array}{*{20}l} 312 %{\begin{array}{*{20}l} 313 \left. \frac{D u}{D t} \right|_s 314 &= \left. {\frac{\partial u }{\partial t}} \right|_s 315 &+ \frac{1}{e_1\,e_2\,e_3} \left( \frac{\partial( e_2 e_3 \,u^2 )}{\partial i} 316 + \frac{\partial( e_1 e_3 \,u v )}{\partial j} 317 - e_2 u u \frac{\partial e_3}{\partial i} 318 - e_1 u v \frac{\partial e_3 }{\partial j} \right) 319 + \frac{1}{e_3} \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ 320 \\ 321 && - \,u \left[ \frac{1}{e_1 e_2 e_3} \left( \frac{\partial(e_2 e_3 \, u)}{\partial i} 322 + \frac{\partial(e_1 e_3 \, v)}{\partial j} 323 - e_2 u \;\frac{\partial e_3 }{\partial i} 324 - e_1 v \;\frac{\partial e_3 }{\partial j} \right) 325 -\frac{1}{e_3} \frac{\partial \omega}{\partial s} \right] \\ 326 \\ 327 && - \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 328 -u \;\frac{\partial e_1 }{\partial j} \right) \\ 329 \\ 330 &= \left. {\frac{\partial u }{\partial t}} \right|_s 331 &+ \frac{1}{e_1\,e_2\,e_3} \left( \frac{\partial( e_2 e_3 \,u\,u )}{\partial i} 332 + \frac{\partial( e_1 e_3 \,u\,v )}{\partial j} \right) 333 + \frac{1}{e_3 } \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ 334 \\ 335 && - \,u \left[ \frac{1}{e_1 e_2 e_3} \left( \frac{\partial(e_2 e_3 \, u)}{\partial i} 336 + \frac{\partial(e_1 e_3 \, v)}{\partial j} \right) 337 -\frac{1}{e_3} \frac{\partial \omega}{\partial s} \right] 338 - \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 339 -u \;\frac{\partial e_1 }{\partial j} \right) \\ 340 % 341 \intertext {Introducing a more compact form for the divergence of the momentum fluxes, 342 and using (\autoref{apdx:A_sco_Continuity}), the $s-$coordinate continuity equation, 343 it becomes : } 344 % 345 &= \left. {\frac{\partial u }{\partial t}} \right|_s 346 &+ \left. \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) \right|_s 347 + \,u \frac{1}{e_3 } \frac{\partial e_3}{\partial t} 315 \begin{align*} 316 { 317 \begin{array}{*{20}l} 318 % \begin{align*} {\begin{array}{*{20}l} 319 % {\begin{array}{*{20}l} \left. \frac{D u}{D t} \right|_s 320 &= \left. {\frac{\partial u }{\partial t}} \right|_s 321 &+ \frac{1}{e_1\,e_2\,e_3} \left( \frac{\partial( e_2 e_3 \,u^2 )}{\partial i} 322 + \frac{\partial( e_1 e_3 \,u v )}{\partial j} 323 - e_2 u u \frac{\partial e_3}{\partial i} 324 - e_1 u v \frac{\partial e_3 }{\partial j} \right) 325 + \frac{1}{e_3} \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ \\ 326 && - \,u \left[ \frac{1}{e_1 e_2 e_3} \left( \frac{\partial(e_2 e_3 \, u)}{\partial i} 327 + \frac{\partial(e_1 e_3 \, v)}{\partial j} 328 - e_2 u \;\frac{\partial e_3 }{\partial i} 329 - e_1 v \;\frac{\partial e_3 }{\partial j} \right) 330 -\frac{1}{e_3} \frac{\partial \omega}{\partial s} \right] \\ \\ 331 && - \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 332 -u \;\frac{\partial e_1 }{\partial j} \right) \\ \\ 333 &= \left. {\frac{\partial u }{\partial t}} \right|_s 334 &+ \frac{1}{e_1\,e_2\,e_3} \left( \frac{\partial( e_2 e_3 \,u\,u )}{\partial i} 335 + \frac{\partial( e_1 e_3 \,u\,v )}{\partial j} \right) 336 + \frac{1}{e_3 } \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ \\ 337 && - \,u \left[ \frac{1}{e_1 e_2 e_3} \left( \frac{\partial(e_2 e_3 \, u)}{\partial i} 338 + \frac{\partial(e_1 e_3 \, v)}{\partial j} \right) 339 -\frac{1}{e_3} \frac{\partial \omega}{\partial s} \right] 340 - \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 341 -u \;\frac{\partial e_1 }{\partial j} \right) \\ 342 % 343 \intertext {Introducing a more compact form for the divergence of the momentum fluxes, 344 and using (\autoref{apdx:A_sco_Continuity}), the $s-$coordinate continuity equation, 345 it becomes : } 346 % 347 &= \left. {\frac{\partial u }{\partial t}} \right|_s 348 &+ \left. \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) \right|_s 349 + \,u \frac{1}{e_3 } \frac{\partial e_3}{\partial t} 348 350 - \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 349 -u \;\frac{\partial e_1 }{\partial j} \right) \\ 350 \end{array} } 351 -u \;\frac{\partial e_1 }{\partial j} \right) 352 \\ 353 \end{array} 354 } 351 355 \end{align*} 352 \end{subequations}353 356 which leads to the $s-$coordinate flux formulation of the total $s-$coordinate time derivative, 354 357 $i.e.$ the total $s-$coordinate time derivative in flux form: 355 \begin{flalign}\label{apdx:A_sco_Dt_flux} 356 \left. \frac{D u}{D t} \right|_s = \frac{1}{e_3} \left. \frac{\partial ( e_3\,u)}{\partial t} \right|_s 357 + \left. \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) \right|_s 358 - \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 359 -u \;\frac{\partial e_1 }{\partial j} \right) 358 \begin{flalign} 359 \label{apdx:A_sco_Dt_flux} 360 \left. \frac{D u}{D t} \right|_s = \frac{1}{e_3} \left. \frac{\partial ( e_3\,u)}{\partial t} \right|_s 361 + \left. \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) \right|_s 362 - \frac{v}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 363 -u \;\frac{\partial e_1 }{\partial j} \right) 360 364 \end{flalign} 361 365 which is the total time derivative expressed in the curvilinear $s-$coordinate system. … … 365 369 the continuity equation. 366 370 367 $\ $\newline % force a new ligne368 369 371 $\bullet$ \textbf{horizontal pressure gradient} 370 372 371 373 The horizontal pressure gradient term can be transformed as follows: 372 \ begin{equation*}373 \begin{split}374 -\frac{1}{\rho_o \, e_1 }\left. {\frac{\partial p}{\partial i}} \right|_z375 & =-\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] \\376 & =-\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) \\377 &=-\frac{1}{\rho _o \,e_1 }\left. {\frac{\partial p}{\partial i}} \right|_s -\frac{g\;\rho }{\rho _o }\sigma_1378 \end{split}379 \ end{equation*}374 \[ 375 \begin{split} 376 -\frac{1}{\rho_o \, e_1 }\left. {\frac{\partial p}{\partial i}} \right|_z 377 & =-\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 & =-\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 380 \end{split} 381 \] 380 382 Applying similar manipulation to the second component and 381 replacing $\sigma _1$ and $\sigma _2$ by their expression \autoref{apdx:A_s_slope}, it comes: 382 \begin{equation} \label{apdx:A_grad_p_1} 383 \begin{split} 384 -\frac{1}{\rho _o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z 385 &=-\frac{1}{\rho _o \,e_1 } \left( \left. {\frac{\partial p}{\partial i}} \right|_s 386 + g\;\rho \;\left. {\frac{\partial z}{\partial i}} \right|_s \right) \\ 387 % 388 -\frac{1}{\rho _o \, e_2 }\left. {\frac{\partial p}{\partial j}} \right|_z 389 &=-\frac{1}{\rho _o \,e_2 } \left( \left. {\frac{\partial p}{\partial j}} \right|_s 390 + g\;\rho \;\left. {\frac{\partial z}{\partial j}} \right|_s \right) \\ 391 \end{split} 383 replacing $\sigma_1$ and $\sigma_2$ by their expression \autoref{apdx:A_s_slope}, it comes: 384 \begin{equation} 385 \label{apdx:A_grad_p_1} 386 \begin{split} 387 -\frac{1}{\rho_o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z 388 &=-\frac{1}{\rho_o \,e_1 } \left( \left. {\frac{\partial p}{\partial i}} \right|_s 389 + g\;\rho \;\left. {\frac{\partial z}{\partial i}} \right|_s \right) \\ 390 % 391 -\frac{1}{\rho_o \, e_2 }\left. {\frac{\partial p}{\partial j}} \right|_z 392 &=-\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) \\ 394 \end{split} 392 395 \end{equation} 393 396 … … 400 403 and a hydrostatic pressure anomaly, $p_h'$, by $p_h'= g \; \int_z^\eta d \; e_3 \; dk$. 401 404 The pressure is then given by: 402 \ begin{equation*}403 \begin{split}404 p &= g\; \int_z^\eta \rho \; e_3 \; dk = g\; \int_z^\eta \left( \rho_o \, d + 1 \right) \; e_3 \; dk \\405 &= g \, \rho_o \; \int_z^\eta d \; e_3 \; dk + g \, \int_z^\eta e_3 \; dk406 \end{split}407 \ end{equation*}405 \[ 406 \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 \; dk 409 \end{split} 410 \] 408 411 Therefore, $p$ and $p_h'$ are linked through: 409 \begin{equation} \label{apdx:A_pressure} 410 p = \rho_o \; p_h' + g \, ( z + \eta ) 412 \begin{equation} 413 \label{apdx:A_pressure} 414 p = \rho_o \; p_h' + g \, ( z + \eta ) 411 415 \end{equation} 412 416 and the hydrostatic pressure balance expressed in terms of $p_h'$ and $d$ is: 413 \ begin{equation*}414 \frac{\partial p_h'}{\partial k} = - d \, g \, e_3415 \ end{equation*}417 \[ 418 \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 419 \] 416 420 417 421 Substituing \autoref{apdx:A_pressure} in \autoref{apdx:A_grad_p_1} and 418 422 using the definition of the density anomaly it comes the expression in two parts: 419 \begin{equation} \label{apdx:A_grad_p_2} 420 \begin{split} 421 -\frac{1}{\rho _o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z 422 &=-\frac{1}{e_1 } \left( \left. {\frac{\partial p_h'}{\partial i}} \right|_s 423 + g\; d \;\left. {\frac{\partial z}{\partial i}} \right|_s \right) - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} \\ 424 % 425 -\frac{1}{\rho _o \, e_2 }\left. {\frac{\partial p}{\partial j}} \right|_z 426 &=-\frac{1}{e_2 } \left( \left. {\frac{\partial p_h'}{\partial j}} \right|_s 427 + g\; d \;\left. {\frac{\partial z}{\partial j}} \right|_s \right) - \frac{g}{e_2 } \frac{\partial \eta}{\partial j}\\ 428 \end{split} 423 \begin{equation} 424 \label{apdx:A_grad_p_2} 425 \begin{split} 426 -\frac{1}{\rho_o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z 427 &=-\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} \\ 429 % 430 -\frac{1}{\rho_o \, e_2 }\left. {\frac{\partial p}{\partial j}} \right|_z 431 &=-\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}\\ 433 \end{split} 429 434 \end{equation} 430 435 This formulation of the pressure gradient is characterised by the appearance of … … 437 442 and $\eta$ is implicitly included in the computation of $p_h'$ through the upper bound of the vertical integration. 438 443 439 440 $\ $\newline % force a new ligne441 442 444 $\bullet$ \textbf{The other terms of the momentum equation} 443 445 … … 446 448 The form of the lateral physics is discussed in \autoref{apdx:B}. 447 449 448 449 $\ $\newline % force a new ligne450 451 450 $\bullet$ \textbf{Full momentum equation} 452 451 … … 454 453 the vector invariant momentum equation solved by the model has the same mathematical expression as 455 454 the one in a curvilinear $z-$coordinate, except for the pressure gradient term: 456 \begin{subequations} \label{apdx:A_dyn_vect} 457 \begin{multline} \label{apdx:A_PE_dyn_vect_u} 458 \frac{\partial u}{\partial t}= 459 + \left( {\zeta +f} \right)\,v 460 - \frac{1}{2\,e_1} \frac{\partial}{\partial i} \left( u^2+v^2 \right) 461 - \frac{1}{e_3} \omega \frac{\partial u}{\partial k} \\ 462 - \frac{1}{e_1 } \left( \frac{\partial p_h'}{\partial i} + g\; d \; \frac{\partial z}{\partial i} \right) 463 - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} 464 + D_u^{\vect{U}} + F_u^{\vect{U}} 465 \end{multline} 466 \begin{multline} \label{apdx:A_dyn_vect_v} 467 \frac{\partial v}{\partial t}= 468 - \left( {\zeta +f} \right)\,u 469 - \frac{1}{2\,e_2 }\frac{\partial }{\partial j}\left( u^2+v^2 \right) 470 - \frac{1}{e_3 } \omega \frac{\partial v}{\partial k} \\ 471 - \frac{1}{e_2 } \left( \frac{\partial p_h'}{\partial j} + g\; d \; \frac{\partial z}{\partial j} \right) 472 - \frac{g}{e_2 } \frac{\partial \eta}{\partial j} 473 + D_v^{\vect{U}} + F_v^{\vect{U}} 474 \end{multline} 455 \begin{subequations} 456 \label{apdx:A_dyn_vect} 457 \begin{multline} 458 \label{apdx:A_PE_dyn_vect_u} 459 \frac{\partial u}{\partial t}= 460 + \left( {\zeta +f} \right)\,v 461 - \frac{1}{2\,e_1} \frac{\partial}{\partial i} \left( u^2+v^2 \right) 462 - \frac{1}{e_3} \omega \frac{\partial u}{\partial k} \\ 463 - \frac{1}{e_1 } \left( \frac{\partial p_h'}{\partial i} + g\; d \; \frac{\partial z}{\partial i} \right) 464 - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} 465 + D_u^{\vect{U}} + F_u^{\vect{U}} 466 \end{multline} 467 \begin{multline} 468 \label{apdx:A_dyn_vect_v} 469 \frac{\partial v}{\partial t}= 470 - \left( {\zeta +f} \right)\,u 471 - \frac{1}{2\,e_2 }\frac{\partial }{\partial j}\left( u^2+v^2 \right) 472 - \frac{1}{e_3 } \omega \frac{\partial v}{\partial k} \\ 473 - \frac{1}{e_2 } \left( \frac{\partial p_h'}{\partial j} + g\; d \; \frac{\partial z}{\partial j} \right) 474 - \frac{g}{e_2 } \frac{\partial \eta}{\partial j} 475 + D_v^{\vect{U}} + F_v^{\vect{U}} 476 \end{multline} 475 477 \end{subequations} 476 478 whereas the flux form momentum equation differs from it by 477 479 the formulation of both the time derivative and the pressure gradient term: 478 \begin{subequations} \label{apdx:A_dyn_flux} 479 \begin{multline} \label{apdx:A_PE_dyn_flux_u} 480 \frac{1}{e_3} \frac{\partial \left( e_3\,u \right) }{\partial t} = 481 \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) 482 + \left\{ {f + \frac{1}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 483 -u \;\frac{\partial e_1 }{\partial j} \right)} \right\} \,v \\ 484 - \frac{1}{e_1 } \left( \frac{\partial p_h'}{\partial i} + g\; d \; \frac{\partial z}{\partial i} \right) 485 - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} 486 + D_u^{\vect{U}} + F_u^{\vect{U}} 487 \end{multline} 488 \begin{multline} \label{apdx:A_dyn_flux_v} 489 \frac{1}{e_3}\frac{\partial \left( e_3\,v \right) }{\partial t}= 490 - \nabla \cdot \left( {{\rm {\bf U}}\,v} \right) 491 + \left\{ {f + \frac{1}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 492 -u \;\frac{\partial e_1 }{\partial j} \right)} \right\} \,u \\ 493 - \frac{1}{e_2 } \left( \frac{\partial p_h'}{\partial j} + g\; d \; \frac{\partial z}{\partial j} \right) 494 - \frac{g}{e_2 } \frac{\partial \eta}{\partial j} 495 + D_v^{\vect{U}} + F_v^{\vect{U}} 496 \end{multline} 480 \begin{subequations} 481 \label{apdx:A_dyn_flux} 482 \begin{multline} 483 \label{apdx:A_PE_dyn_flux_u} 484 \frac{1}{e_3} \frac{\partial \left( e_3\,u \right) }{\partial t} = 485 \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) 486 + \left\{ {f + \frac{1}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 487 -u \;\frac{\partial e_1 }{\partial j} \right)} \right\} \,v \\ 488 - \frac{1}{e_1 } \left( \frac{\partial p_h'}{\partial i} + g\; d \; \frac{\partial z}{\partial i} \right) 489 - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} 490 + D_u^{\vect{U}} + F_u^{\vect{U}} 491 \end{multline} 492 \begin{multline} 493 \label{apdx:A_dyn_flux_v} 494 \frac{1}{e_3}\frac{\partial \left( e_3\,v \right) }{\partial t}= 495 - \nabla \cdot \left( {{\rm {\bf U}}\,v} \right) 496 + \left\{ {f + \frac{1}{e_1 e_2 }\left( v \;\frac{\partial e_2 }{\partial i} 497 -u \;\frac{\partial e_1 }{\partial j} \right)} \right\} \,u \\ 498 - \frac{1}{e_2 } \left( \frac{\partial p_h'}{\partial j} + g\; d \; \frac{\partial z}{\partial j} \right) 499 - \frac{g}{e_2 } \frac{\partial \eta}{\partial j} 500 + D_v^{\vect{U}} + F_v^{\vect{U}} 501 \end{multline} 497 502 \end{subequations} 498 503 Both formulation share the same hydrostatic pressure balance expressed in terms of 499 504 hydrostatic pressure and density anomalies, $p_h'$ and $d=( \frac{\rho}{\rho_o}-1 )$: 500 \begin{equation} \label{apdx:A_dyn_zph} 501 \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 505 \begin{equation} 506 \label{apdx:A_dyn_zph} 507 \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 502 508 \end{equation} 503 509 … … 519 525 regrouping the time derivative terms in the left hand side : 520 526 521 \begin{multline} \label{apdx:A_tracer} 522 \frac{1}{e_3} \frac{\partial \left( e_3 T \right)}{\partial t} 523 = -\frac{1}{e_1 \,e_2 \,e_3} 524 \left[ \frac{\partial }{\partial i} \left( {e_2 \,e_3 \;Tu} \right) 525 + \frac{\partial }{\partial j} \left( {e_1 \,e_3 \;Tv} \right) \right] \\ 526 + \frac{1}{e_3} \frac{\partial }{\partial k} \left( Tw \right) 527 + D^{T} +F^{T} 527 \begin{multline} 528 \label{apdx:A_tracer} 529 \frac{1}{e_3} \frac{\partial \left( e_3 T \right)}{\partial t} 530 = -\frac{1}{e_1 \,e_2 \,e_3} 531 \left[ \frac{\partial }{\partial i} \left( {e_2 \,e_3 \;Tu} \right) 532 + \frac{\partial }{\partial j} \left( {e_1 \,e_3 \;Tv} \right) \right] \\ 533 + \frac{1}{e_3} \frac{\partial }{\partial k} \left( Tw \right) 534 + D^{T} +F^{T} 528 535 \end{multline} 529 530 536 531 537 The expression for the advection term is a straight consequence of (A.4), 532 538 the expression of the 3D divergence in the $s-$coordinates established above. 533 539 540 \biblio 541 534 542 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/annex_B.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ 4 % Chapter ÑAppendix B : Diffusive Operators5 % Chapter Appendix B : Diffusive Operators 5 6 % ================================================================ 6 7 \chapter{Appendix B : Diffusive Operators} 7 8 \label{apdx:B} 9 8 10 \minitoc 9 11 10 11 12 \newpage 12 $\ $\newline % force a new ligne13 13 14 14 % ================================================================ … … 19 19 20 20 \subsubsection*{In z-coordinates} 21 21 22 In $z$-coordinates, the horizontal/vertical second order tracer diffusion operator is given by: 22 \begin{eqnarray} \label{apdx:B1} 23 &D^T = \frac{1}{e_1 \, e_2} \left[ 24 \left. \frac{\partial}{\partial i} \left( \frac{e_2}{e_1}A^{lT} \;\left. \frac{\partial T}{\partial i} \right|_z \right) \right|_z \right. 25 \left. 26 + \left. \frac{\partial}{\partial j} \left( \frac{e_1}{e_2}A^{lT} \;\left. \frac{\partial T}{\partial j} \right|_z \right) \right|_z \right] 27 + \frac{\partial }{\partial z}\left( {A^{vT} \;\frac{\partial T}{\partial z}} \right) 28 \end{eqnarray} 23 \begin{align} 24 \label{apdx:B1} 25 &D^T = \frac{1}{e_1 \, e_2} \left[ 26 \left. \frac{\partial}{\partial i} \left( \frac{e_2}{e_1}A^{lT} \;\left. \frac{\partial T}{\partial i} \right|_z \right) \right|_z \right. 27 \left. 28 + \left. \frac{\partial}{\partial j} \left( \frac{e_1}{e_2}A^{lT} \;\left. \frac{\partial T}{\partial j} \right|_z \right) \right|_z \right] 29 + \frac{\partial }{\partial z}\left( {A^{vT} \;\frac{\partial T}{\partial z}} \right) 30 \end{align} 29 31 30 32 \subsubsection*{In generalized vertical coordinates} 33 31 34 In $s$-coordinates, we defined the slopes of $s$-surfaces, $\sigma_1$ and $\sigma_2$ by \autoref{apdx:A_s_slope} and 32 35 the vertical/horizontal ratio of diffusion coefficient by $\epsilon = A^{vT} / A^{lT}$. 33 36 The diffusion operator is given by: 34 37 35 \begin{equation} \label{apdx:B2} 36 D^T = \left. \nabla \right|_s \cdot 37 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T \right] \\ 38 \;\;\text{where} \;\Re =\left( {{\begin{array}{*{20}c} 39 1 \hfill & 0 \hfill & {-\sigma _1 } \hfill \\ 40 0 \hfill & 1 \hfill & {-\sigma _2 } \hfill \\ 41 {-\sigma _1 } \hfill & {-\sigma _2 } \hfill & {\varepsilon +\sigma _1 42 ^2+\sigma _2 ^2} \hfill \\ 43 \end{array} }} \right) 38 \begin{equation} 39 \label{apdx:B2} 40 D^T = \left. \nabla \right|_s \cdot 41 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T \right] \\ 42 \;\;\text{where} \;\Re =\left( {{ 43 \begin{array}{*{20}c} 44 1 \hfill & 0 \hfill & {-\sigma_1 } \hfill \\ 45 0 \hfill & 1 \hfill & {-\sigma_2 } \hfill \\ 46 {-\sigma_1 } \hfill & {-\sigma_2 } \hfill & {\varepsilon +\sigma_1 47 ^2+\sigma_2 ^2} \hfill \\ 48 \end{array} 49 }} \right) 44 50 \end{equation} 45 51 or in expanded form: 46 \begin{subequations} 47 \begin{align*} {\begin{array}{*{20}l} 48 D^T=& \frac{1}{e_1\,e_2\,e_3 }\;\left[ {\ \ \ \ e_2\,e_3\,A^{lT} \;\left. 49 {\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. \\ 50 &\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 \\ 51 &\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. 52 \left. {\left. {+\left( {\varepsilon +\sigma _1^2+\sigma _2 ^2} \right)\;\frac{1}{e_3 }\;\frac{\partial T}{\partial s}} \right)\;\;} \right] 53 \end{array} } 52 \begin{align*} 53 { 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] 60 \end{array} 61 } 54 62 \end{align*} 55 \end{subequations}56 63 57 64 Equation \autoref{apdx:B2} is obtained from \autoref{apdx:B1} without any additional assumption. … … 64 71 any loss of generality: 65 72 66 \begin{subequations} 67 \begin{align*} {\begin{array}{*{20}l} 68 D^T&=\frac{1}{e_1\,e_2} \left. {\frac{\partial }{\partial i}\left( {\frac{e_2}{e_1}A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_z } \right)} \right|_z 69 +\frac{\partial }{\partial z}\left( {A^{vT}\;\frac{\partial T}{\partial z}} \right) \\ 70 \\ 71 % 72 &=\frac{1}{e_1\,e_2 }\left[ {\left. {\;\frac{\partial }{\partial i}\left( {\frac{e_2}{e_1}A^{lT}\;\left( {\left. {\frac{\partial T}{\partial i}} \right|_s 73 -\frac{e_1\,\sigma _1 }{e_3 }\frac{\partial T}{\partial s}} \right)} \right)} \right|_s } \right. \\ 74 & \qquad \qquad \left. { -\frac{e_1\,\sigma _1 }{e_3 }\frac{\partial }{\partial s}\left( {\frac{e_2 }{e_1 }A^{lT}\;\left. {\left( {\left. {\frac{\partial T}{\partial i}} \right|_s -\frac{e_1 \,\sigma _1 }{e_3 }\frac{\partial T}{\partial s}} \right)} \right|_s } \right)\;} \right] 75 \shoveright{ +\frac{1}{e_3 }\frac{\partial }{\partial s}\left[ {\frac{A^{vT}}{e_3 }\;\frac{\partial T}{\partial s}} \right]} \qquad \qquad \qquad \\ 76 \\ 77 % 78 &=\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{e_2 }{e_1}A^{lT}\;\frac{\partial e_3 }{\partial i}} \right|_s \left. {\frac{\partial T}{\partial i}} \right|_s } \right. \\ 79 & \qquad \qquad \quad \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 -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) \\ 80 & \qquad \qquad \quad \shoveright{ -e_1 \,\sigma _1 \frac{\partial }{\partial s}\left( {-\frac{e_2 \,\sigma _1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)\;\,\left. {+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\quad} \right] }\\ 81 \end{array} } \\ 82 % 83 {\begin{array}{*{20}l} 84 \intertext{Noting that $\frac{1}{e_1} \left. \frac{\partial e_3 }{\partial i} \right|_s = \frac{\partial \sigma _1 }{\partial s}$, it becomes:} 85 % 86 & =\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. \\ 87 & \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) \\ 88 & \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] }\\ 89 \\ 90 &=\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. \\ 91 & \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 \\ 92 & \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) \\ 93 & \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]} 94 \end{array} } \\ 95 {\begin{array}{*{20}l} 96 % 97 \intertext{using the same remark as just above, it becomes:} 98 % 99 &= \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.\;\;\; \\ 100 & \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} \\ 101 & \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) \\ 102 & \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] } 103 \end{array} } \\ 104 {\begin{array}{*{20}l} 105 % 106 \intertext{Since the horizontal scale factors do not depend on the vertical coordinate, 107 the last term of the first line and the first term of the last line cancel, while 108 the second line reduces to a single vertical derivative, so it becomes:} 109 % 110 & =\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. \\ 111 & \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]} 112 \\ 113 % 114 \intertext{in other words, the horizontal/vertical Laplacian operator in the ($i$,$s$) plane takes the following form:} 115 \end{array} } \\ 116 % 117 {\frac{1}{e_1\,e_2\,e_3}} 118 \left( {{\begin{array}{*{30}c} 119 {\left. {\frac{\partial \left( {e_2 e_3 \bullet } \right)}{\partial i}} \right|_s } \hfill \\ 120 {\frac{\partial \left( {e_1 e_2 \bullet } \right)}{\partial s}} \hfill \\ 121 \end{array}}}\right) 122 \cdot \left[ {A^{lT} 123 \left( {{\begin{array}{*{30}c} 124 {1} \hfill & {-\sigma_1 } \hfill \\ 125 {-\sigma_1} \hfill & {\varepsilon + \sigma_1^2} \hfill \\ 126 \end{array} }} \right) 127 \cdot 128 \left( {{\begin{array}{*{30}c} 129 {\frac{1}{e_1 }\;\left. {\frac{\partial \bullet }{\partial i}} \right|_s } \hfill \\ 130 {\frac{1}{e_3 }\;\frac{\partial \bullet }{\partial s}} \hfill \\ 131 \end{array}}} \right) \left( T \right)} \right] 73 \begin{align*} 74 { 75 \begin{array}{*{20}l} 76 D^T&=\frac{1}{e_1\,e_2} \left. {\frac{\partial }{\partial i}\left( {\frac{e_2}{e_1}A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_z } \right)} \right|_z 77 +\frac{\partial }{\partial z}\left( {A^{vT}\;\frac{\partial T}{\partial z}} \right) \\ \\ 78 % 79 &=\frac{1}{e_1\,e_2 }\left[ {\left. {\;\frac{\partial }{\partial i}\left( {\frac{e_2}{e_1}A^{lT}\;\left( {\left. {\frac{\partial T}{\partial i}} \right|_s 80 -\frac{e_1\,\sigma_1 }{e_3 }\frac{\partial T}{\partial s}} \right)} \right)} \right|_s } \right. \\ 81 & \qquad \qquad \left. { -\frac{e_1\,\sigma_1 }{e_3 }\frac{\partial }{\partial s}\left( {\frac{e_2 }{e_1 }A^{lT}\;\left. {\left( {\left. {\frac{\partial T}{\partial i}} \right|_s -\frac{e_1 \,\sigma_1 }{e_3 }\frac{\partial T}{\partial s}} \right)} \right|_s } \right)\;} \right] 82 \shoveright{ +\frac{1}{e_3 }\frac{\partial }{\partial s}\left[ {\frac{A^{vT}}{e_3 }\;\frac{\partial T}{\partial s}} \right]} \qquad \qquad \qquad \\ \\ 83 % 84 &=\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{e_2 }{e_1}A^{lT}\;\frac{\partial e_3 }{\partial i}} \right|_s \left. {\frac{\partial T}{\partial i}} \right|_s } \right. \\ 85 & \qquad \qquad \quad \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 -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) \\ 86 & \qquad \qquad \quad \shoveright{ -e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {-\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)\;\,\left. {+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\quad} \right] }\\ 87 \end{array} 88 } \\ 89 % 90 { 91 \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}$, it becomes:} 93 % 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. \\ 95 & \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] }\\ 97 \\ 98 &=\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 & \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 & \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]} 102 \end{array} 103 } \\ 104 { 105 \begin{array}{*{20}l} 106 % 107 \intertext{using the same remark as just above, it becomes:} 108 % 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.\;\;\; \\ 110 & \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 & \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] } 113 \end{array} 114 } \\ 115 { 116 \begin{array}{*{20}l} 117 % 118 \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 last line cancel, while 120 the second line reduces to a single vertical derivative, so it becomes:} 121 % 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. \\ 123 & \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 % 125 \intertext{in other words, the horizontal/vertical Laplacian operator in the ($i$,$s$) plane takes the following form:} 126 \end{array} 127 } \\ 128 % 129 {\frac{1}{e_1\,e_2\,e_3}} 130 \left( {{ 131 \begin{array}{*{30}c} 132 {\left. {\frac{\partial \left( {e_2 e_3 \bullet } \right)}{\partial i}} \right|_s } \hfill \\ 133 {\frac{\partial \left( {e_1 e_2 \bullet } \right)}{\partial s}} \hfill \\ 134 \end{array}}} 135 \right) 136 \cdot \left[ {A^{lT} 137 \left( {{ 138 \begin{array}{*{30}c} 139 {1} \hfill & {-\sigma_1 } \hfill \\ 140 {-\sigma_1} \hfill & {\varepsilon + \sigma_1^2} \hfill \\ 141 \end{array} 142 }} \right) 143 \cdot 144 \left( {{ 145 \begin{array}{*{30}c} 146 {\frac{1}{e_1 }\;\left. {\frac{\partial \bullet }{\partial i}} \right|_s } \hfill \\ 147 {\frac{1}{e_3 }\;\frac{\partial \bullet }{\partial s}} \hfill \\ 148 \end{array} 149 }} \right) \left( T \right)} \right] 132 150 \end{align*} 133 \end{subequations} 134 \addtocounter{equation}{-2} 151 %\addtocounter{equation}{-2} 135 152 136 153 % ================================================================ … … 147 164 takes the following form \citep{Redi_JPO82}: 148 165 149 \begin{equation} \label{apdx:B3} 150 \textbf {A}_{\textbf I} = \frac{A^{lT}}{\left( {1+a_1 ^2+a_2 ^2} \right)} 151 \left[ {{\begin{array}{*{20}c} 152 {1+a_1 ^2} \hfill & {-a_1 a_2 } \hfill & {-a_1 } \hfill \\ 153 {-a_1 a_2 } \hfill & {1+a_2 ^2} \hfill & {-a_2 } \hfill \\ 154 {-a_1 } \hfill & {-a_2 } \hfill & {\varepsilon +a_1 ^2+a_2 ^2} \hfill \\ 155 \end{array} }} \right] 166 \begin{equation} 167 \label{apdx:B3} 168 \textbf {A}_{\textbf I} = \frac{A^{lT}}{\left( {1+a_1 ^2+a_2 ^2} \right)} 169 \left[ {{ 170 \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 \\ 174 \end{array} 175 }} \right] 156 176 \end{equation} 157 177 where ($a_1$, $a_2$) are the isopycnal slopes in ($\textbf{i}$, $\textbf{j}$) directions, relative to geopotentials: 158 \ begin{equation*}159 a_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1}160 \qquad , \qquad161 a_2 =\frac{e_3 }{e_2 }\left( {\frac{\partial \rho }{\partial j}}162 \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1}163 \ end{equation*}178 \[ 179 a_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1} 180 \qquad , \qquad 181 a_2 =\frac{e_3 }{e_2 }\left( {\frac{\partial \rho }{\partial j}} 182 \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1} 183 \] 164 184 165 185 In practice, isopycnal slopes are generally less than $10^{-2}$ in the ocean, 166 186 so $\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{Cox1987}: 167 \begin{subequations} \label{apdx:B4} 168 \begin{equation} \label{apdx:B4a} 169 {\textbf{A}_{\textbf{I}}} \approx A^{lT}\;\Re\;\text{where} \;\Re = 170 \left[ {{\begin{array}{*{20}c} 171 1 \hfill & 0 \hfill & {-a_1 } \hfill \\ 172 0 \hfill & 1 \hfill & {-a_2 } \hfill \\ 173 {-a_1 } \hfill & {-a_2 } \hfill & {\varepsilon +a_1 ^2+a_2 ^2} \hfill \\ 174 \end{array} }} \right], 175 \end{equation} 176 and the iso/dianeutral diffusive operator in $z$-coordinates is then 177 \begin{equation}\label{apdx:B4b} 178 D^T = \left. \nabla \right|_z \cdot 179 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_z T \right]. \\ 180 \end{equation} 187 \begin{subequations} 188 \label{apdx:B4} 189 \begin{equation} 190 \label{apdx:B4a} 191 {\textbf{A}_{\textbf{I}}} \approx A^{lT}\;\Re\;\text{where} \;\Re = 192 \left[ {{ 193 \begin{array}{*{20}c} 194 1 \hfill & 0 \hfill & {-a_1 } \hfill \\ 195 0 \hfill & 1 \hfill & {-a_2 } \hfill \\ 196 {-a_1 } \hfill & {-a_2 } \hfill & {\varepsilon +a_1 ^2+a_2 ^2} \hfill \\ 197 \end{array} 198 }} \right], 199 \end{equation} 200 and the iso/dianeutral diffusive operator in $z$-coordinates is then 201 \begin{equation} 202 \label{apdx:B4b} 203 D^T = \left. \nabla \right|_z \cdot 204 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_z T \right]. \\ 205 \end{equation} 181 206 \end{subequations} 182 183 207 184 208 Physically, the full tensor \autoref{apdx:B3} represents strong isoneutral diffusion on a plane parallel to … … 192 216 Written out explicitly, 193 217 194 \begin{multline} \label{apdx:B_ldfiso} 195 D^T=\frac{1}{e_1 e_2 }\left\{ 196 {\;\frac{\partial }{\partial i}\left[ {A_h \left( {\frac{e_2}{e_1}\frac{\partial T}{\partial i}-a_1 \frac{e_2}{e_3}\frac{\partial T}{\partial k}} \right)} \right]} 197 {+\frac{\partial}{\partial j}\left[ {A_h \left( {\frac{e_1}{e_2}\frac{\partial T}{\partial j}-a_2 \frac{e_1}{e_3}\frac{\partial T}{\partial k}} \right)} \right]\;} \right\} \\ 198 \shoveright{+\frac{1}{e_3 }\frac{\partial }{\partial k}\left[ {A_h \left( {-\frac{a_1 }{e_1 }\frac{\partial T}{\partial i}-\frac{a_2 }{e_2 }\frac{\partial T}{\partial j}+\frac{\left( {a_1 ^2+a_2 ^2+\varepsilon} \right)}{e_3 }\frac{\partial T}{\partial k}} \right)} \right]}. \\ 218 \begin{multline} 219 \label{apdx:B_ldfiso} 220 D^T=\frac{1}{e_1 e_2 }\left\{ 221 {\;\frac{\partial }{\partial i}\left[ {A_h \left( {\frac{e_2}{e_1}\frac{\partial T}{\partial i}-a_1 \frac{e_2}{e_3}\frac{\partial T}{\partial k}} \right)} \right]} 222 {+\frac{\partial}{\partial j}\left[ {A_h \left( {\frac{e_1}{e_2}\frac{\partial T}{\partial j}-a_2 \frac{e_1}{e_3}\frac{\partial T}{\partial k}} \right)} \right]\;} \right\} \\ 223 \shoveright{+\frac{1}{e_3 }\frac{\partial }{\partial k}\left[ {A_h \left( {-\frac{a_1 }{e_1 }\frac{\partial T}{\partial i}-\frac{a_2 }{e_2 }\frac{\partial T}{\partial j}+\frac{\left( {a_1 ^2+a_2 ^2+\varepsilon} \right)}{e_3 }\frac{\partial T}{\partial k}} \right)} \right]}. \\ 199 224 \end{multline} 200 201 225 202 226 The isopycnal diffusion operator \autoref{apdx:B4}, … … 204 228 The demonstration of the first property is trivial as \autoref{apdx:B4} is the divergence of fluxes. 205 229 Let us demonstrate the second one: 206 \ begin{equation*}207 \iiint\limits_D T\;\nabla .\left( {\textbf{A}}_{\textbf{I}} \nabla T \right)\,dv208 209 \ end{equation*}230 \[ 231 \iiint\limits_D T\;\nabla .\left( {\textbf{A}}_{\textbf{I}} \nabla T \right)\,dv 232 = -\iiint\limits_D \nabla T\;.\left( {\textbf{A}}_{\textbf{I}} \nabla T \right)\,dv, 233 \] 210 234 and since 211 \begin{subequations} 212 \begin{align*} {\begin{array}{*{20}l} 213 \nabla T\;.\left( {{\rm {\bf A}}_{\rm {\bf I}} \nabla T} 214 \right)&=A^{lT}\left[ {\left( {\frac{\partial T}{\partial i}} \right)^2-2a_1 215 \frac{\partial T}{\partial i}\frac{\partial T}{\partial k}+\left( 216 {\frac{\partial T}{\partial j}} \right)^2} \right. \\ 217 &\qquad \qquad \qquad 218 { \left. -\,{2a_2 \frac{\partial T}{\partial j}\frac{\partial T}{\partial k}+\left( {a_1 ^2+a_2 ^2+\varepsilon} \right)\left( {\frac{\partial T}{\partial k}} \right)^2} \right]} \\ 219 &=A_h \left[ {\left( {\frac{\partial T}{\partial i}-a_1 \frac{\partial 220 T}{\partial k}} \right)^2+\left( {\frac{\partial T}{\partial 221 j}-a_2 \frac{\partial T}{\partial k}} \right)^2} 222 +\varepsilon \left(\frac{\partial T}{\partial k}\right) ^2\right] \\ 223 & \geq 0 224 \end{array} } 235 \begin{align*} 236 { 237 \begin{array}{*{20}l} 238 \nabla T\;.\left( {{\rm {\bf A}}_{\rm {\bf I}} \nabla T} 239 \right)&=A^{lT}\left[ {\left( {\frac{\partial T}{\partial i}} \right)^2-2a_1 240 \frac{\partial T}{\partial i}\frac{\partial T}{\partial k}+\left( 241 {\frac{\partial T}{\partial j}} \right)^2} \right. \\ 242 &\qquad \qquad \qquad 243 { \left. -\,{2a_2 \frac{\partial T}{\partial j}\frac{\partial T}{\partial k}+\left( {a_1 ^2+a_2 ^2+\varepsilon} \right)\left( {\frac{\partial T}{\partial k}} \right)^2} \right]} \\ 244 &=A_h \left[ {\left( {\frac{\partial T}{\partial i}-a_1 \frac{\partial 245 T}{\partial k}} \right)^2+\left( {\frac{\partial T}{\partial 246 j}-a_2 \frac{\partial T}{\partial k}} \right)^2} 247 +\varepsilon \left(\frac{\partial T}{\partial k}\right) ^2\right] \\ 248 & \geq 0 249 \end{array} 250 } 225 251 \end{align*} 226 \end{subequations} 227 \addtocounter{equation}{-1} 252 %\addtocounter{equation}{-1} 228 253 the property becomes obvious. 229 254 … … 236 261 The resulting operator then takes the simple form 237 262 238 \begin{equation} \label{apdx:B_ldfiso_s} 239 D^T = \left. \nabla \right|_s \cdot 240 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T \right] \\ 241 \;\;\text{where} \;\Re =\left( {{\begin{array}{*{20}c} 242 1 \hfill & 0 \hfill & {-r _1 } \hfill \\ 243 0 \hfill & 1 \hfill & {-r _2 } \hfill \\ 244 {-r _1 } \hfill & {-r _2 } \hfill & {\varepsilon +r _1 245 ^2+r _2 ^2} \hfill \\ 246 \end{array} }} \right), 263 \begin{equation} 264 \label{apdx:B_ldfiso_s} 265 D^T = \left. \nabla \right|_s \cdot 266 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T \right] \\ 267 \;\;\text{where} \;\Re =\left( {{ 268 \begin{array}{*{20}c} 269 1 \hfill & 0 \hfill & {-r _1 } \hfill \\ 270 0 \hfill & 1 \hfill & {-r _2 } \hfill \\ 271 {-r _1 } \hfill & {-r _2 } \hfill & {\varepsilon +r _1 272 ^2+r _2 ^2} \hfill \\ 273 \end{array} 274 }} \right), 247 275 \end{equation} 248 276 249 277 where ($r_1$, $r_2$) are the isopycnal slopes in ($\textbf{i}$, $\textbf{j}$) directions, 250 278 relative to $s$-coordinate surfaces: 251 \ begin{equation*}252 r_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial s}} \right)^{-1}253 \qquad , \qquad254 r_2 =\frac{e_3 }{e_2 }\left( {\frac{\partial \rho }{\partial j}}255 \right)\left( {\frac{\partial \rho }{\partial s}} \right)^{-1}.256 \ end{equation*}279 \[ 280 r_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial s}} \right)^{-1} 281 \qquad , \qquad 282 r_2 =\frac{e_3 }{e_2 }\left( {\frac{\partial \rho }{\partial j}} 283 \right)\left( {\frac{\partial \rho }{\partial s}} \right)^{-1}. 284 \] 257 285 258 286 To prove \autoref{apdx:B5} by direct re-expression of \autoref{apdx:B_ldfiso} is straightforward, but laborious. … … 260 288 the weak-slope operator may be \emph{exactly} reexpressed in non-orthogonal $i,j,\rho$-coordinates as 261 289 262 \begin{equation} \label{apdx:B5} 263 D^T = \left. \nabla \right|_\rho \cdot 264 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_\rho T \right] \\ 265 \;\;\text{where} \;\Re =\left( {{\begin{array}{*{20}c} 266 1 \hfill & 0 \hfill &0 \hfill \\ 267 0 \hfill & 1 \hfill & 0 \hfill \\ 268 0 \hfill & 0 \hfill & \varepsilon \hfill \\ 269 \end{array} }} \right). 290 \begin{equation} 291 \label{apdx:B5} 292 D^T = \left. \nabla \right|_\rho \cdot 293 \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_\rho T \right] \\ 294 \;\;\text{where} \;\Re =\left( {{ 295 \begin{array}{*{20}c} 296 1 \hfill & 0 \hfill &0 \hfill \\ 297 0 \hfill & 1 \hfill & 0 \hfill \\ 298 0 \hfill & 0 \hfill & \varepsilon \hfill \\ 299 \end{array} 300 }} \right). 270 301 \end{equation} 271 302 Then direct transformation from $i,j,\rho$-coordinates to $i,j,s$-coordinates gives … … 289 320 to the horizontal velocity vector: 290 321 \begin{align*} 291 \Delta {\textbf{U}}_h 292 &=\nabla \left( {\nabla \cdot {\textbf{U}}_h } \right)- 293 \nabla \times \left( {\nabla \times {\textbf{U}}_h } \right) \\ 294 \\ 295 &=\left( {{\begin{array}{*{20}c} 296 {\frac{1}{e_1 }\frac{\partial \chi }{\partial i}} \hfill \\ 297 {\frac{1}{e_2 }\frac{\partial \chi }{\partial j}} \hfill \\ 298 {\frac{1}{e_3 }\frac{\partial \chi }{\partial k}} \hfill \\ 299 \end{array} }} \right)-\left( {{\begin{array}{*{20}c} 300 {\frac{1}{e_2 }\frac{\partial \zeta }{\partial j}-\frac{1}{e_3 301 }\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial 302 u}{\partial k}} \right)} \hfill \\ 303 {\frac{1}{e_3 }\frac{\partial }{\partial k}\left( {-\frac{1}{e_3 304 }\frac{\partial v}{\partial k}} \right)-\frac{1}{e_1 }\frac{\partial \zeta 305 }{\partial i}} \hfill \\ 306 {\frac{1}{e_1 e_2 }\left[ {\frac{\partial }{\partial i}\left( {\frac{e_2 307 }{e_3 }\frac{\partial u}{\partial k}} \right)-\frac{\partial }{\partial 308 j}\left( {-\frac{e_1 }{e_3 }\frac{\partial v}{\partial k}} \right)} \right]} 309 \hfill \\ 310 \end{array} }} \right) 311 \\ 312 \\ 313 &=\left( {{\begin{array}{*{20}c} 314 {\frac{1}{e_1 }\frac{\partial \chi }{\partial i}-\frac{1}{e_2 }\frac{\partial \zeta }{\partial j}} \\ 315 {\frac{1}{e_2 }\frac{\partial \chi }{\partial j}+\frac{1}{e_1 }\frac{\partial \zeta }{\partial i}} \\ 316 0 \\ 317 \end{array} }} \right) 318 +\frac{1}{e_3 } 319 \left( {{\begin{array}{*{20}c} 320 {\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial u}{\partial k}} \right)} \\ 321 {\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial v}{\partial k}} \right)} \\ 322 {\frac{\partial \chi }{\partial k}-\frac{1}{e_1 e_2 }\left( {\frac{\partial ^2\left( {e_2 \,u} \right)}{\partial i\partial k}+\frac{\partial ^2\left( {e_1 \,v} \right)}{\partial j\partial k}} \right)} \\ 323 \end{array} }} \right) 322 \Delta {\textbf{U}}_h 323 &=\nabla \left( {\nabla \cdot {\textbf{U}}_h } \right)- 324 \nabla \times \left( {\nabla \times {\textbf{U}}_h } \right) \\ \\ 325 &=\left( {{ 326 \begin{array}{*{20}c} 327 {\frac{1}{e_1 }\frac{\partial \chi }{\partial i}} \hfill \\ 328 {\frac{1}{e_2 }\frac{\partial \chi }{\partial j}} \hfill \\ 329 {\frac{1}{e_3 }\frac{\partial \chi }{\partial k}} \hfill \\ 330 \end{array} 331 }} \right) 332 -\left( {{ 333 \begin{array}{*{20}c} 334 {\frac{1}{e_2 }\frac{\partial \zeta }{\partial j}-\frac{1}{e_3 335 }\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial 336 u}{\partial k}} \right)} \hfill \\ 337 {\frac{1}{e_3 }\frac{\partial }{\partial k}\left( {-\frac{1}{e_3 338 }\frac{\partial v}{\partial k}} \right)-\frac{1}{e_1 }\frac{\partial \zeta 339 }{\partial i}} \hfill \\ 340 {\frac{1}{e_1 e_2 }\left[ {\frac{\partial }{\partial i}\left( {\frac{e_2 341 }{e_3 }\frac{\partial u}{\partial k}} \right)-\frac{\partial }{\partial 342 j}\left( {-\frac{e_1 }{e_3 }\frac{\partial v}{\partial k}} \right)} \right]} 343 \hfill \\ 344 \end{array} 345 }} \right) \\ \\ 346 &=\left( {{ 347 \begin{array}{*{20}c} 348 {\frac{1}{e_1 }\frac{\partial \chi }{\partial i}-\frac{1}{e_2 }\frac{\partial \zeta }{\partial j}} \\ 349 {\frac{1}{e_2 }\frac{\partial \chi }{\partial j}+\frac{1}{e_1 }\frac{\partial \zeta }{\partial i}} \\ 350 0 \\ 351 \end{array} 352 }} \right) 353 +\frac{1}{e_3 } 354 \left( {{ 355 \begin{array}{*{20}c} 356 {\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial u}{\partial k}} \right)} \\ 357 {\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial v}{\partial k}} \right)} \\ 358 {\frac{\partial \chi }{\partial k}-\frac{1}{e_1 e_2 }\left( {\frac{\partial ^2\left( {e_2 \,u} \right)}{\partial i\partial k}+\frac{\partial ^2\left( {e_1 \,v} \right)}{\partial j\partial k}} \right)} \\ 359 \end{array} 360 }} \right) 324 361 \end{align*} 325 362 Using \autoref{eq:PE_div}, the definition of the horizontal divergence, 326 363 the third componant of the second vector is obviously zero and thus : 327 \ begin{equation*}328 \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)329 \ end{equation*}364 \[ 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) 366 \] 330 367 331 368 Note that this operator ensures a full separation between … … 335 372 The horizontal/vertical second order (Laplacian type) operator used to diffuse horizontal momentum in 336 373 the $z$-coordinate therefore takes the following form: 337 \begin{equation} \label{apdx:B_Lap_U} 338 {\textbf{D}}^{\textbf{U}} = 339 \nabla _h \left( {A^{lm}\;\chi } \right) 340 - \nabla _h \times \left( {A^{lm}\;\zeta \;{\textbf{k}}} \right) 341 + \frac{1}{e_3 }\frac{\partial }{\partial k}\left( {\frac{A^{vm}\;}{e_3 } 342 \frac{\partial {\rm {\bf U}}_h }{\partial k}} \right) \\ 374 \begin{equation} 375 \label{apdx:B_Lap_U} 376 { 377 \textbf{D}}^{\textbf{U}} = 378 \nabla _h \left( {A^{lm}\;\chi } \right) 379 - \nabla _h \times \left( {A^{lm}\;\zeta \;{\textbf{k}}} \right) 380 + \frac{1}{e_3 }\frac{\partial }{\partial k}\left( {\frac{A^{vm}\;}{e_3 } 381 \frac{\partial {\rm {\bf U}}_h }{\partial k}} \right) \\ 343 382 \end{equation} 344 383 that is, in expanded form: 345 384 \begin{align*} 346 D^{\textbf{U}}_u347 & = \frac{1}{e_1} \frac{\partial \left( {A^{lm}\chi } \right)}{\partial i}348 349 350 D^{\textbf{U}}_v351 & = \frac{1}{e_2 }\frac{\partial \left( {A^{lm}\chi } \right)}{\partial j}352 353 385 D^{\textbf{U}}_u 386 & = \frac{1}{e_1} \frac{\partial \left( {A^{lm}\chi } \right)}{\partial i} 387 -\frac{1}{e_2} \frac{\partial \left( {A^{lm}\zeta } \right)}{\partial j} 388 +\frac{1}{e_3} \frac{\partial u}{\partial k} \\ 389 D^{\textbf{U}}_v 390 & = \frac{1}{e_2 }\frac{\partial \left( {A^{lm}\chi } \right)}{\partial j} 391 +\frac{1}{e_1 }\frac{\partial \left( {A^{lm}\zeta } \right)}{\partial i} 392 +\frac{1}{e_3} \frac{\partial v}{\partial k} 354 393 \end{align*} 355 394 … … 360 399 Generally, \autoref{apdx:B_Lap_U} is used in both $z$- and $s$-coordinate systems, 361 400 that is a Laplacian diffusion is applied on momentum along the coordinate directions. 401 402 \biblio 403 362 404 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/annex_C.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 6 7 \chapter{Discrete Invariants of the Equations} 7 8 \label{apdx:C} 9 8 10 \minitoc 9 11 … … 14 16 15 17 \newpage 16 $\ $\newline % force a new ligne17 18 18 19 % ================================================================ … … 25 26 26 27 fluxes at the faces of a $T$-box: 27 \ begin{equation*}28 U = e_{2u}\,e_{3u}\; u \qquad V = e_{1v}\,e_{3v}\; v \qquad W = e_{1w}\,e_{2w}\; \omega \\ 29 \ end{equation*}28 \[ 29 U = e_{2u}\,e_{3u}\; u \qquad V = e_{1v}\,e_{3v}\; v \qquad W = e_{1w}\,e_{2w}\; \omega 30 \] 30 31 31 32 volume of cells at $u$-, $v$-, and $T$-points: 32 \ begin{equation*}33 b_u = e_{1u}\,e_{2u}\,e_{3u} \qquad b_v = e_{1v}\,e_{2v}\,e_{3v} \qquad b_t = e_{1t}\,e_{2t}\,e_{3t} \\ 34 \ end{equation*}33 \[ 34 b_u = e_{1u}\,e_{2u}\,e_{3u} \qquad b_v = e_{1v}\,e_{2v}\,e_{3v} \qquad b_t = e_{1t}\,e_{2t}\,e_{3t} 35 \] 35 36 36 37 partial derivative notation: $\partial_\bullet = \frac{\partial}{\partial \bullet}$ … … 42 43 ($i.e.$ $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth). 43 44 \begin{flalign*} 44 z(k) = \eta - \int\limits_{\tilde{k}=k}^{\tilde{k}=k_s} e_3(\tilde{k}) \;d\tilde{k}45 = \eta - \int\limits_k^{k_s} e_3 \;d\tilde{k}45 z(k) = \eta - \int\limits_{\tilde{k}=k}^{\tilde{k}=k_s} e_3(\tilde{k}) \;d\tilde{k} 46 = \eta - \int\limits_k^{k_s} e_3 \;d\tilde{k} 46 47 \end{flalign*} 47 48 48 49 Continuity equation with the above notation: 49 \ begin{equation*}50 \frac{1}{e_{3t}} \partial_t (e_{3t})+ \frac{1}{b_t} \biggl\{ \delta_i [U] + \delta_j [V] + \delta_k [W] \biggr\} = 051 \ end{equation*}50 \[ 51 \frac{1}{e_{3t}} \partial_t (e_{3t})+ \frac{1}{b_t} \biggl\{ \delta_i [U] + \delta_j [V] + \delta_k [W] \biggr\} = 0 52 \] 52 53 53 54 A quantity, $Q$ is conserved when its domain averaged time change is zero, that is when: 54 \ begin{equation*}55 \partial_t \left( \int_D{ Q\;dv } \right) =056 \ end{equation*}55 \[ 56 \partial_t \left( \int_D{ Q\;dv } \right) =0 57 \] 57 58 Noting that the coordinate system used .... blah blah 58 \ begin{equation*}59 \partial_t \left( \int_D {Q\;dv} \right) = \int_D { \partial_t \left( e_3 \, Q \right) e_1e_2\;di\,dj\,dk }60 61 \ end{equation*}59 \[ 60 \partial_t \left( \int_D {Q\;dv} \right) = \int_D { \partial_t \left( e_3 \, Q \right) e_1e_2\;di\,dj\,dk } 61 = \int_D { \frac{1}{e_3} \partial_t \left( e_3 \, Q \right) dv } =0 62 \] 62 63 equation of evolution of $Q$ written as 63 64 the time evolution of the vertical content of $Q$ like for tracers, or momentum in flux form, 64 65 the quadratic quantity $\frac{1}{2}Q^2$ is conserved when: 65 66 \begin{flalign*} 66 \partial_t \left( \int_D{ \frac{1}{2} \,Q^2\;dv } \right)67 =& \int_D{ \frac{1}{2} \partial_t \left( \frac{1}{e_3}\left( e_3 \, Q \right)^2 \right) e_1e_2\;di\,dj\,dk } \\68 =& \int_D { Q \;\partial_t\left( e_3 \, Q \right) e_1e_2\;di\,dj\,dk } 69 - \int_D { \frac{1}{2} Q^2 \,\partial_t (e_3) \;e_1e_2\;di\,dj\,dk } \\67 \partial_t \left( \int_D{ \frac{1}{2} \,Q^2\;dv } \right) 68 =& \int_D{ \frac{1}{2} \partial_t \left( \frac{1}{e_3}\left( e_3 \, Q \right)^2 \right) e_1e_2\;di\,dj\,dk } \\ 69 =& \int_D { Q \;\partial_t\left( e_3 \, Q \right) e_1e_2\;di\,dj\,dk } 70 - \int_D { \frac{1}{2} Q^2 \,\partial_t (e_3) \;e_1e_2\;di\,dj\,dk } \\ 70 71 \end{flalign*} 71 72 that is in a more compact form : 72 \begin{flalign} \label{eq:Q2_flux} 73 \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) 74 =& \int_D { \frac{Q}{e_3} \partial_t \left( e_3 \, Q \right) dv } 73 \begin{flalign} 74 \label{eq:Q2_flux} 75 \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) 76 =& \int_D { \frac{Q}{e_3} \partial_t \left( e_3 \, Q \right) dv } 75 77 - \frac{1}{2} \int_D { \frac{Q^2}{e_3} \partial_t (e_3) \;dv } 76 78 \end{flalign} … … 78 80 the quadratic quantity $\frac{1}{2}Q^2$ is conserved when: 79 81 \begin{flalign*} 80 \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right)81 =& \int_D { \frac{1}{2} \partial_t \left( e_3 \, Q^2 \right) \;e_1e_2\;di\,dj\,dk } \\82 =& \int_D { Q \partial_t Q \;e_1e_2e_3\;di\,dj\,dk } 83 + \int_D { \frac{1}{2} Q^2 \, \partial_t e_3 \;e_1e_2\;di\,dj\,dk } \\82 \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) 83 =& \int_D { \frac{1}{2} \partial_t \left( e_3 \, Q^2 \right) \;e_1e_2\;di\,dj\,dk } \\ 84 =& \int_D { Q \partial_t Q \;e_1e_2e_3\;di\,dj\,dk } 85 + \int_D { \frac{1}{2} Q^2 \, \partial_t e_3 \;e_1e_2\;di\,dj\,dk } \\ 84 86 \end{flalign*} 85 87 that is in a more compact form: 86 \begin{flalign} \label{eq:Q2_vect} 87 \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) 88 =& \int_D { Q \,\partial_t Q \;dv } 89 + \frac{1}{2} \int_D { \frac{1}{e_3} Q^2 \partial_t e_3 \;dv } 88 \begin{flalign} 89 \label{eq:Q2_vect} 90 \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) 91 =& \int_D { Q \,\partial_t Q \;dv } 92 + \frac{1}{2} \int_D { \frac{1}{e_3} Q^2 \partial_t e_3 \;dv } 90 93 \end{flalign} 91 92 94 93 95 % ================================================================ … … 97 99 \label{sec:C.1} 98 100 99 100 101 The discretization of pimitive equation in $s$-coordinate ($i.e.$ time and space varying vertical coordinate) 101 102 must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy. 102 103 103 104 104 Let us first establish those constraint in the continuous world. 105 105 The total energy ($i.e.$ kinetic plus potential energies) is conserved: 106 \begin{flalign} \label{eq:Tot_Energy} 106 \begin{flalign} 107 \label{eq:Tot_Energy} 107 108 \partial_t \left( \int_D \left( \frac{1}{2} {\textbf{U}_h}^2 + \rho \, g \, z \right) \;dv \right) = & 0 108 109 \end{flalign} … … 118 119 \autoref{eq:Tot_Energy} for the latter form leads to: 119 120 120 \begin{subequations} \label{eq:E_tot} 121 121 % \label{eq:E_tot} 122 122 advection term (vector invariant form): 123 \begin{equation} \label{eq:E_tot_vect_vor_1} 124 \int\limits_D \zeta \; \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0 \\ 125 \end{equation} 123 \[ 124 % \label{eq:E_tot_vect_vor_1} 125 \int\limits_D \zeta \; \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0 \\ 126 \] 126 127 % 127 \ begin{equation} \label{eq:E_tot_vect_adv_1}128 \int\limits_D \textbf{U}_h \cdot \nabla_h \left( \frac{{\textbf{U}_h}^2}{2} \right) dv129 + \int\limits_D \textbf{U}_h \cdot \nabla_z \textbf{U}_h \;dv 130 - \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv } = 0 \\ 131 \end{equation} 132 128 \[ 129 % \label{eq:E_tot_vect_adv_1} 130 \int\limits_D \textbf{U}_h \cdot \nabla_h \left( \frac{{\textbf{U}_h}^2}{2} \right) dv 131 + \int\limits_D \textbf{U}_h \cdot \nabla_z \textbf{U}_h \;dv 132 - \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv } = 0 133 \] 133 134 advection term (flux form): 134 \begin{equation} \label{eq:E_tot_flux_metric} 135 \int\limits_D \frac{1} {e_1 e_2 } \left( v \,\partial_i e_2 - u \,\partial_j e_1 \right)\; 136 \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0 \\ 137 \end{equation} 138 139 \begin{equation} \label{eq:E_tot_flux_adv} 140 \int\limits_D \textbf{U}_h \cdot \left( {{\begin{array} {*{20}c} 141 \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\ 142 \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\ \end{array}} } \right) \;dv 143 + \frac{1}{2} \int\limits_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3 \;dv } =\;0 \\ 144 \end{equation} 145 135 \[ 136 % \label{eq:E_tot_flux_metric} 137 \int\limits_D \frac{1} {e_1 e_2 } \left( v \,\partial_i e_2 - u \,\partial_j e_1 \right)\; 138 \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0 139 \] 140 \[ 141 % \label{eq:E_tot_flux_adv} 142 \int\limits_D \textbf{U}_h \cdot \left( {{ 143 \begin{array} {*{20}c} 144 \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\ 145 \nabla \cdot \left( \textbf{U}\,v \right) \hfill 146 \end{array}} 147 } \right) \;dv 148 + \frac{1}{2} \int\limits_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3 \;dv } =\;0 149 \] 146 150 coriolis term 147 \ begin{equation} \label{eq:E_tot_cor}148 \int\limits_D f \; \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0 \\ 149 \end{equation} 150 151 \[ 152 % \label{eq:E_tot_cor} 153 \int\limits_D f \; \left( \textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv = 0 154 \] 151 155 pressure gradient: 152 \begin{equation} \label{eq:E_tot_pg_1} 153 - \int\limits_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv 154 = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv 155 + \int\limits_D g\, \rho \; \partial_t z \;dv \\ 156 \end{equation} 156 \[ 157 % \label{eq:E_tot_pg_1} 158 - \int\limits_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv 159 = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv 160 + \int\limits_D g\, \rho \; \partial_t z \;dv 161 \] 162 163 where $\nabla_h = \left. \nabla \right|_k$ is the gradient along the $s$-surfaces. 164 165 blah blah.... 166 167 The prognostic ocean dynamics equation can be summarized as follows: 168 \[ 169 \text{NXT} = \dbinom {\text{VOR} + \text{KEG} + \text {ZAD} } 170 {\text{COR} + \text{ADV} } 171 + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF} 172 \] 173 174 Vector invariant form: 175 % \label{eq:E_tot_vect} 176 \[ 177 % \label{eq:E_tot_vect_vor_2} 178 \int\limits_D \textbf{U}_h \cdot \text{VOR} \;dv = 0 179 \] 180 \[ 181 % \label{eq:E_tot_vect_adv_2} 182 \int\limits_D \textbf{U}_h \cdot \text{KEG} \;dv 183 + \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv 184 - \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv } = 0 185 \] 186 \[ 187 % \label{eq:E_tot_pg_2} 188 - \int\limits_D \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv 189 = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv 190 + \int\limits_D g\, \rho \; \partial_t z \;dv 191 \] 192 193 Flux form: 194 \begin{subequations} 195 \label{eq:E_tot_flux} 196 \[ 197 % \label{eq:E_tot_flux_metric_2} 198 \int\limits_D \textbf{U}_h \cdot \text {COR} \; dv = 0 199 \] 200 \[ 201 % \label{eq:E_tot_flux_adv_2} 202 \int\limits_D \textbf{U}_h \cdot \text{ADV} \;dv 203 + \frac{1}{2} \int\limits_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3 \;dv } =\;0 204 \] 205 \begin{equation} 206 \label{eq:E_tot_pg_3} 207 - \int\limits_D \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv 208 = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv 209 + \int\limits_D g\, \rho \; \partial_t z \;dv 210 \end{equation} 157 211 \end{subequations} 158 159 where $\nabla_h = \left. \nabla \right|_k$ is the gradient along the $s$-surfaces.160 161 blah blah....162 $\ $\newline % force a new ligne163 The prognostic ocean dynamics equation can be summarized as follows:164 \begin{equation*}165 \text{NXT} = \dbinom {\text{VOR} + \text{KEG} + \text {ZAD} }166 {\text{COR} + \text{ADV} }167 + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF}168 \end{equation*}169 $\ $\newline % force a new ligne170 171 Vector invariant form:172 \begin{subequations} \label{eq:E_tot_vect}173 \begin{equation} \label{eq:E_tot_vect_vor_2}174 \int\limits_D \textbf{U}_h \cdot \text{VOR} \;dv = 0 \\175 \end{equation}176 \begin{equation} \label{eq:E_tot_vect_adv_2}177 \int\limits_D \textbf{U}_h \cdot \text{KEG} \;dv178 + \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv179 - \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv } = 0 \\180 \end{equation}181 \begin{equation} \label{eq:E_tot_pg_2}182 - \int\limits_D \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv183 = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv184 + \int\limits_D g\, \rho \; \partial_t z \;dv \\185 \end{equation}186 \end{subequations}187 188 Flux form:189 \begin{subequations} \label{eq:E_tot_flux}190 \begin{equation} \label{eq:E_tot_flux_metric_2}191 \int\limits_D \textbf{U}_h \cdot \text {COR} \; dv = 0 \\192 \end{equation}193 \begin{equation} \label{eq:E_tot_flux_adv_2}194 \int\limits_D \textbf{U}_h \cdot \text{ADV} \;dv195 + \frac{1}{2} \int\limits_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3 \;dv } =\;0 \\196 \end{equation}197 \begin{equation} \label{eq:E_tot_pg_3}198 - \int\limits_D \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv199 = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv200 + \int\limits_D g\, \rho \; \partial_t z \;dv \\201 \end{equation}202 \end{subequations}203 204 205 $\ $\newline % force a new ligne206 207 212 208 213 \autoref{eq:E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE. 209 214 Indeed the left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows: 210 215 \begin{flalign*} 211 \partial_t \left( \int\limits_D { \rho \, g \, z \;dv} \right) 212 &= + \int\limits_D \frac{1}{e_3} \partial_t (e_3\,\rho) \;g\;z\;\;dv213 214 &= - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv215 216 &= + \int\limits_D \rho \,g \left( \textbf {U}_h \cdot \nabla_h z + \omega \frac{1}{e_3} \partial_k z \right) \;dv217 218 &= + \int\limits_D \rho \,g \left( \omega + \partial_t z + \textbf {U}_h \cdot \nabla_h z \right) \;dv &&&\\219 &=+ \int\limits_D g\, \rho \; w \; dv &&&\\216 \partial_t \left( \int\limits_D { \rho \, g \, z \;dv} \right) 217 &= + \int\limits_D \frac{1}{e_3} \partial_t (e_3\,\rho) \;g\;z\;\;dv 218 + \int\limits_D g\, \rho \; \partial_t z \;dv &&&\\ 219 &= - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv 220 + \int\limits_D g\, \rho \; \partial_t z \;dv &&&\\ 221 &= + \int\limits_D \rho \,g \left( \textbf {U}_h \cdot \nabla_h z + \omega \frac{1}{e_3} \partial_k z \right) \;dv 222 + \int\limits_D g\, \rho \; \partial_t z \;dv &&&\\ 223 &= + \int\limits_D \rho \,g \left( \omega + \partial_t z + \textbf {U}_h \cdot \nabla_h z \right) \;dv &&&\\ 224 &=+ \int\limits_D g\, \rho \; w \; dv &&&\\ 220 225 \end{flalign*} 221 226 where the last equality is obtained by noting that the brackets is exactly the expression of $w$, … … 224 229 The left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows: 225 230 \begin{flalign*} 226 - \int\limits_D \left. \nabla p \right|_z & \cdot \textbf{U}_h \;dv 227 = - \int\limits_D \left( \nabla_h p + \rho \, g \nabla_h z \right) \cdot \textbf{U}_h \;dv &&&\\ 228 \allowdisplaybreaks 229 &= - \int\limits_D \nabla_h p \cdot \textbf{U}_h \;dv - \int\limits_D \rho \, g \, \nabla_h z \cdot \textbf{U}_h \;dv &&&\\ 230 \allowdisplaybreaks 231 &= +\int\limits_D p \,\nabla_h \cdot \textbf{U}_h \;dv + \int\limits_D \rho \, g \left( \omega - w + \partial_t z \right) \;dv &&&\\ 232 \allowdisplaybreaks 233 &= -\int\limits_D p \left( \frac{1}{e_3} \partial_t e_3 + \frac{1}{e_3} \partial_k \omega \right) \;dv 234 +\int\limits_D \rho \, g \left( \omega - w + \partial_t z \right) \;dv &&&\\ 235 \allowdisplaybreaks 236 &= -\int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv 237 +\int\limits_D \frac{1}{e_3} \partial_k p\; \omega \;dv 238 +\int\limits_D \rho \, g \left( \omega - w + \partial_t z \right) \;dv &&&\\ 239 &= -\int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv 240 -\int\limits_D \rho \, g \, \omega \;dv 241 +\int\limits_D \rho \, g \left( \omega - w + \partial_t z \right) \;dv &&&\\ 242 &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \; \;dv 243 - \int\limits_D \rho \, g \, w \;dv 244 + \int\limits_D \rho \, g \, \partial_t z \;dv &&&\\ 245 \allowdisplaybreaks 246 \intertext{introducing the hydrostatic balance $\partial_k p=-\rho \,g\,e_3$ in the last term, 247 it becomes:} 248 &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv 249 - \int\limits_D \rho \, g \, w \;dv 250 - \int\limits_D \frac{1}{e_3} \partial_k p\, \partial_t z \;dv &&&\\ 251 &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv 252 - \int\limits_D \rho \, g \, w \;dv 253 + \int\limits_D \,\frac{p}{e_3}\partial_t ( \partial_k z ) dv &&&\\ 254 % 255 &= - \int\limits_D \rho \, g \, w \;dv &&&\\ 256 \end{flalign*} 257 231 - \int\limits_D \left. \nabla p \right|_z & \cdot \textbf{U}_h \;dv 232 = - \int\limits_D \left( \nabla_h p + \rho \, g \nabla_h z \right) \cdot \textbf{U}_h \;dv &&&\\ 233 \allowdisplaybreaks 234 &= - \int\limits_D \nabla_h p \cdot \textbf{U}_h \;dv - \int\limits_D \rho \, g \, \nabla_h z \cdot \textbf{U}_h \;dv &&&\\ 235 \allowdisplaybreaks 236 &= +\int\limits_D p \,\nabla_h \cdot \textbf{U}_h \;dv + \int\limits_D \rho \, g \left( \omega - w + \partial_t z \right) \;dv &&&\\ 237 \allowdisplaybreaks 238 &= -\int\limits_D p \left( \frac{1}{e_3} \partial_t e_3 + \frac{1}{e_3} \partial_k \omega \right) \;dv 239 +\int\limits_D \rho \, g \left( \omega - w + \partial_t z \right) \;dv &&&\\ 240 \allowdisplaybreaks 241 &= -\int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv 242 +\int\limits_D \frac{1}{e_3} \partial_k p\; \omega \;dv 243 +\int\limits_D \rho \, g \left( \omega - w + \partial_t z \right) \;dv &&&\\ 244 &= -\int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv 245 -\int\limits_D \rho \, g \, \omega \;dv 246 +\int\limits_D \rho \, g \left( \omega - w + \partial_t z \right) \;dv &&&\\ 247 &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \; \;dv 248 - \int\limits_D \rho \, g \, w \;dv 249 + \int\limits_D \rho \, g \, \partial_t z \;dv &&&\\ 250 \allowdisplaybreaks 251 \intertext{introducing the hydrostatic balance $\partial_k p=-\rho \,g\,e_3$ in the last term, 252 it becomes:} 253 &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv 254 - \int\limits_D \rho \, g \, w \;dv 255 - \int\limits_D \frac{1}{e_3} \partial_k p\, \partial_t z \;dv &&&\\ 256 &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv 257 - \int\limits_D \rho \, g \, w \;dv 258 + \int\limits_D \,\frac{p}{e_3}\partial_t ( \partial_k z ) dv &&&\\ 259 % 260 &= - \int\limits_D \rho \, g \, w \;dv &&&\\ 261 \end{flalign*} 258 262 259 263 %gm comment … … 262 266 The last equality comes from the following equation, 263 267 \begin{flalign*} 264 \int\limits_D p \frac{1}{e_3} \frac{\partial e_3}{\partial t}\; \;dv 265 = \int\limits_D \rho \, g \, \frac{\partial z }{\partial t} \;dv \quad, \\268 \int\limits_D p \frac{1}{e_3} \frac{\partial e_3}{\partial t}\; \;dv 269 = \int\limits_D \rho \, g \, \frac{\partial z }{\partial t} \;dv \quad, 266 270 \end{flalign*} 267 271 that can be demonstrated as follows: 268 272 269 273 \begin{flalign*} 270 \int\limits_D \rho \, g \, \frac{\partial z }{\partial t} \;dv 271 &= \int\limits_D \rho \, g \, \frac{\partial \eta}{\partial t} \;dv 274 \int\limits_D \rho \, g \, \frac{\partial z }{\partial t} \;dv 275 &= \int\limits_D \rho \, g \, \frac{\partial \eta}{\partial t} \;dv 272 276 - \int\limits_D \rho \, g \, \frac{\partial}{\partial t} \left( \int\limits_k^{k_s} e_3 \;d\tilde{k} \right) \;dv &&&\\ 273 &= \int\limits_D \rho \, g \, \frac{\partial \eta}{\partial t} \;dv 277 &= \int\limits_D \rho \, g \, \frac{\partial \eta}{\partial t} \;dv 274 278 - \int\limits_D \rho \, g \left( \int\limits_k^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k} \right) \;dv &&&\\ 275 % 276 \allowdisplaybreaks 277 \intertext{The second term of the right hand side can be transformed by applying the integration by part rule: 278 $\left[ a\,b \right]_{k_b}^{k_s} = \int_{k_b}^{k_s} a\,\frac{\partial b}{\partial k} \;dk 279 + \int_{k_b}^{k_s} \frac{\partial a}{\partial k} \,b \;dk $ 280 to the following function: $a= \int_k^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k}$ 281 and $b= \int_k^{k_s} \rho \, e_3 \;d\tilde{k}$ 282 (note that $\frac{\partial}{\partial k} \left( \int_k^{k_s} a \;d\tilde{k} \right) = - a$ as $k$ is the lower bound of the integral). 283 This leads to: } 284 \end{flalign*} 285 \begin{flalign*} 286 &\left[ \int\limits_{k}^{k_s} \frac{\partial e_3}{\partial t} \,dk \cdot \int\limits_{k}^{k_s} \rho \, e_3 \,dk \right]_{k_b}^{k_s} 287 =-\int\limits_{k_b}^{k_s} \left( \int\limits_k^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k} \right) \rho \,e_3 \;dk 288 -\int\limits_{k_b}^{k_s} \frac{\partial e_3}{\partial t} \left( \int\limits_k^{k_s} \rho \, e_3 \;d\tilde{k} \right) dk 289 &&&\\ 290 \allowdisplaybreaks 291 \intertext{Noting that $\frac{\partial \eta}{\partial t} 292 = \frac{\partial}{\partial t} \left( \int_{k_b}^{k_s} e_3 \;d\tilde{k} \right) 293 = \int_{k_b}^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k}$ 294 and 295 $p(k) = \int_k^{k_s} \rho \,g \, e_3 \;d\tilde{k} $, 296 but also that $\frac{\partial \eta}{\partial t}$ does not depends on $k$, it comes: 297 } 298 & - \int\limits_{k_b}^{k_s} \rho \, \frac{\partial \eta}{\partial t} \, e_3 \;dk 299 = - \int\limits_{k_b}^{k_s} \left( \int\limits_k^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k} \right) \, \rho \, g e_3\;dk 300 - \int\limits_{k_b}^{k_s} \frac{\partial e_3}{\partial t} \frac{p}{g} \;dk &&&\\ 279 % 280 \allowdisplaybreaks 281 \intertext{The second term of the right hand side can be transformed by applying the integration by part rule: 282 $\left[ a\,b \right]_{k_b}^{k_s} = \int_{k_b}^{k_s} a\,\frac{\partial b}{\partial k} \;dk 283 + \int_{k_b}^{k_s} \frac{\partial a}{\partial k} \,b \;dk $ 284 to the following function: $a= \int_k^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k}$ 285 and $b= \int_k^{k_s} \rho \, e_3 \;d\tilde{k}$ 286 (note that $\frac{\partial}{\partial k} \left( \int_k^{k_s} a \;d\tilde{k} \right) = - a$ as $k$ is the lower bound of the integral). 287 This leads to: } 288 \end{flalign*} 289 \begin{flalign*} 290 &\left[ \int\limits_{k}^{k_s} \frac{\partial e_3}{\partial t} \,dk \cdot \int\limits_{k}^{k_s} \rho \, e_3 \,dk \right]_{k_b}^{k_s} 291 =-\int\limits_{k_b}^{k_s} \left( \int\limits_k^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k} \right) \rho \,e_3 \;dk 292 -\int\limits_{k_b}^{k_s} \frac{\partial e_3}{\partial t} \left( \int\limits_k^{k_s} \rho \, e_3 \;d\tilde{k} \right) dk &&&\\ 293 \allowdisplaybreaks 294 \intertext{Noting that $\frac{\partial \eta}{\partial t} 295 = \frac{\partial}{\partial t} \left( \int_{k_b}^{k_s} e_3 \;d\tilde{k} \right) 296 = \int_{k_b}^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k}$ 297 and 298 $p(k) = \int_k^{k_s} \rho \,g \, e_3 \;d\tilde{k} $, 299 but also that $\frac{\partial \eta}{\partial t}$ does not depends on $k$, it comes: 300 } 301 & - \int\limits_{k_b}^{k_s} \rho \, \frac{\partial \eta}{\partial t} \, e_3 \;dk 302 = - \int\limits_{k_b}^{k_s} \left( \int\limits_k^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k} \right) \, \rho \, g e_3\;dk 303 - \int\limits_{k_b}^{k_s} \frac{\partial e_3}{\partial t} \frac{p}{g} \;dk &&&\\ 301 304 \end{flalign*} 302 305 Mutliplying by $g$ and integrating over the $(i,j)$ domain it becomes: 303 306 \begin{flalign*} 304 \int\limits_D \rho \, g \, \left( \int\limits_k^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k} \right) \;dv305 = \int\limits_D \rho \, g \, \frac{\partial \eta}{\partial t} dv307 \int\limits_D \rho \, g \, \left( \int\limits_k^{k_s} \frac{\partial e_3}{\partial t} \;d\tilde{k} \right) \;dv 308 = \int\limits_D \rho \, g \, \frac{\partial \eta}{\partial t} dv 306 309 - \int\limits_D \frac{p}{e_3}\frac{\partial e_3}{\partial t} \;dv 307 310 \end{flalign*} 308 311 Using this property, we therefore have: 309 312 \begin{flalign*} 310 \int\limits_D \rho \, g \, \frac{\partial z }{\partial t} \;dv 311 &= \int\limits_D \rho \, g \, \frac{\partial \eta}{\partial t} \;dv 313 \int\limits_D \rho \, g \, \frac{\partial z }{\partial t} \;dv 314 &= \int\limits_D \rho \, g \, \frac{\partial \eta}{\partial t} \;dv 312 315 - \left( \int\limits_D \rho \, g \, \frac{\partial \eta}{\partial t} dv 313 314 %315 &=\int\limits_D \frac{p}{e_3} \frac{\partial (e_3\,\rho)}{\partial t}\; \;dv 316 - \int\limits_D \frac{p}{e_3}\frac{\partial e_3}{\partial t} \;dv \right) &&&\\ 317 % 318 &=\int\limits_D \frac{p}{e_3} \frac{\partial (e_3\,\rho)}{\partial t}\; \;dv 316 319 \end{flalign*} 317 320 % end gm comment … … 319 322 % 320 323 321 322 324 % ================================================================ 323 325 % Discrete Total energy Conservation : vector invariant form … … 334 336 The discrete form of the total energy conservation, \autoref{eq:Tot_Energy}, is given by: 335 337 \begin{flalign*} 336 \partial_t \left( \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v + \rho \, g \, z_t \,b_t \biggr\} \right) &=0 \\ 338 \partial_t \left( \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v + \rho \, g \, z_t \,b_t \biggr\} \right) &=0 337 339 \end{flalign*} 338 340 which in vector invariant forms, it leads to: 339 \begin{equation} \label{eq:KE+PE_vect_discrete} \begin{split} 340 \sum\limits_{i,j,k} \biggl\{ u\, \partial_t u \;b_u 341 + v\, \partial_t v \;b_v \biggr\} 342 + \frac{1}{2} \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{e_{3u}}\partial_t e_{3u} \;b_u 343 + \frac{v^2}{e_{3v}}\partial_t e_{3v} \;b_v \biggr\} \\ 344 = - \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}}\partial_t (e_{3t} \rho) \, g \, z_t \;b_t \biggr\} 345 - \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t \biggr\} 346 \end{split} \end{equation} 341 \begin{equation} 342 \label{eq:KE+PE_vect_discrete} 343 \begin{split} 344 \sum\limits_{i,j,k} \biggl\{ u\, \partial_t u \;b_u 345 + v\, \partial_t v \;b_v \biggr\} 346 + \frac{1}{2} \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{e_{3u}}\partial_t e_{3u} \;b_u 347 + \frac{v^2}{e_{3v}}\partial_t e_{3v} \;b_v \biggr\} \\ 348 = - \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}}\partial_t (e_{3t} \rho) \, g \, z_t \;b_t \biggr\} 349 - \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t \biggr\} 350 \end{split} 351 \end{equation} 347 352 348 353 Substituting the discrete expression of the time derivative of the velocity either in vector invariant, … … 365 370 366 371 For the ENE scheme, the two components of the vorticity term are given by: 367 \begin{equation*} 368 - e_3 \, q \;{\textbf{k}}\times {\textbf {U}}_h \equiv 369 \left( {{ \begin{array} {*{20}c} 370 + \frac{1} {e_{1u}} \; 371 \overline {\, q \ \overline {\left( e_{1v}\,e_{3v}\,v \right)}^{\,i+1/2}} ^{\,j} \hfill \\ 372 - \frac{1} {e_{2v}} \; 373 \overline {\, q \ \overline {\left( e_{2u}\,e_{3u}\,u \right)}^{\,j+1/2}} ^{\,i} \hfill \\ 374 \end{array}} } \right) 375 \end{equation*} 372 \[ 373 - e_3 \, q \;{\textbf{k}}\times {\textbf {U}}_h \equiv 374 \left( {{ 375 \begin{array} {*{20}c} 376 + \frac{1} {e_{1u}} \; 377 \overline {\, q \ \overline {\left( e_{1v}\,e_{3v}\,v \right)}^{\,i+1/2}} ^{\,j} \hfill \\ 378 - \frac{1} {e_{2v}} \; 379 \overline {\, q \ \overline {\left( e_{2u}\,e_{3u}\,u \right)}^{\,j+1/2}} ^{\,i} \hfill 380 \end{array} 381 } } \right) 382 \] 376 383 377 384 This formulation does not conserve the enstrophy but it does conserve the total kinetic energy. … … 379 386 averaged over the ocean domain can be transformed as follows: 380 387 \begin{flalign*} 381 &\int\limits_D - \left( e_3 \, q \;\textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv && \\ 382 & \qquad \qquad {\begin{array}{*{20}l} 383 &\equiv \sum\limits_{i,j,k} \biggl\{ 384 \frac{1} {e_{1u}} \overline { \,q\ \overline{ V }^{\,i+1/2}} ^{\,j} \, u \; b_u 385 - \frac{1} {e_{2v}}\overline { \, q\ \overline{ U }^{\,j+1/2}} ^{\,i} \, v \; b_v \; \biggr\} \\ 386 &\equiv \sum\limits_{i,j,k} \biggl\{ 387 \overline { \,q\ \overline{ V }^{\,i+1/2}}^{\,j} \; U 388 - \overline { \,q\ \overline{ U }^{\,j+1/2}}^{\,i} \; V \; \biggr\} \\ 389 &\equiv \sum\limits_{i,j,k} q \ \biggl\{ \overline{ V }^{\,i+1/2}\; \overline{ U }^{\,j+1/2} 390 - \overline{ U }^{\,j+1/2}\; \overline{ V }^{\,i+1/2} \biggr\} \quad \equiv 0 391 \end{array} } 388 &\int\limits_D - \left( e_3 \, q \;\textbf{k} \times \textbf{U}_h \right) \cdot \textbf{U}_h \; dv && \\ 389 & \qquad \qquad 390 { 391 \begin{array}{*{20}l} 392 &\equiv \sum\limits_{i,j,k} \biggl\{ 393 \frac{1} {e_{1u}} \overline { \,q\ \overline{ V }^{\,i+1/2}} ^{\,j} \, u \; b_u 394 - \frac{1} {e_{2v}}\overline { \, q\ \overline{ U }^{\,j+1/2}} ^{\,i} \, v \; b_v \; \biggr\} \\ 395 &\equiv \sum\limits_{i,j,k} \biggl\{ 396 \overline { \,q\ \overline{ V }^{\,i+1/2}}^{\,j} \; U 397 - \overline { \,q\ \overline{ U }^{\,j+1/2}}^{\,i} \; V \; \biggr\} \\ 398 &\equiv \sum\limits_{i,j,k} q \ \biggl\{ \overline{ V }^{\,i+1/2}\; \overline{ U }^{\,j+1/2} 399 - \overline{ U }^{\,j+1/2}\; \overline{ V }^{\,i+1/2} \biggr\} \quad \equiv 0 400 \end{array} 401 } 392 402 \end{flalign*} 393 403 In other words, the domain averaged kinetic energy does not change due to the vorticity term. 394 395 404 396 405 % ------------------------------------------------------------------------------------------------------------- … … 401 410 402 411 With the EEN scheme, the vorticity terms are represented as: 403 \begin{equation} \tag{\ref{eq:dynvor_een}} 404 \left\{ { \begin{aligned} 405 +q\,e_3 \, v &\equiv +\frac{1}{e_{1u} } \sum_{\substack{i_p,\,k_p}} 406 {^{i+1/2-i_p}_j} \mathbb{Q}^{i_p}_{j_p} \left( e_{1v} e_{3v} \ v \right)^{i+i_p-1/2}_{j+j_p} \\ 407 - q\,e_3 \, u &\equiv -\frac{1}{e_{2v} } \sum_{\substack{i_p,\,k_p}} 408 {^i_{j+1/2-j_p}} \mathbb{Q}^{i_p}_{j_p} \left( e_{2u} e_{3u} \ u \right)^{i+i_p}_{j+j_p-1/2} \\ 409 \end{aligned} } \right. 412 \begin{equation} 413 \tag{\ref{eq:dynvor_een}} 414 \left\{ { 415 \begin{aligned} 416 +q\,e_3 \, v &\equiv +\frac{1}{e_{1u} } \sum_{\substack{i_p,\,k_p}} 417 {^{i+1/2-i_p}_j} \mathbb{Q}^{i_p}_{j_p} \left( e_{1v} e_{3v} \ v \right)^{i+i_p-1/2}_{j+j_p} \\ 418 - q\,e_3 \, u &\equiv -\frac{1}{e_{2v} } \sum_{\substack{i_p,\,k_p}} 419 {^i_{j+1/2-j_p}} \mathbb{Q}^{i_p}_{j_p} \left( e_{2u} e_{3u} \ u \right)^{i+i_p}_{j+j_p-1/2} 420 \end{aligned} 421 } \right. 410 422 \end{equation} 411 423 where the indices $i_p$ and $j_p$ take the following value: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 412 424 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 413 \begin{equation} \tag{\ref{eq:Q_triads}} 414 _i^j \mathbb{Q}^{i_p}_{j_p} 415 = \frac{1}{12} \ \left( q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p} \right) 425 \begin{equation} 426 \tag{\ref{eq:Q_triads}} 427 _i^j \mathbb{Q}^{i_p}_{j_p} 428 = \frac{1}{12} \ \left( q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p} \right) 416 429 \end{equation} 417 430 … … 419 432 Indeed, 420 433 \begin{flalign*} 421 &\int\limits_D - \textbf{U}_h \cdot \left( \zeta \;\textbf{k} \times \textbf{U}_h \right) \; dv && \\ 422 \equiv \sum\limits_{i,j,k} & \biggl\{ 423 \left[ \sum_{\substack{i_p,\,k_p}} 424 {^{i+1/2-i_p}_j}\mathbb{Q}^{i_p}_{j_p} \; V^{i+1/2-i_p}_{j+j_p} \right] U^{i+1/2}_{j} % &&\\ 425 - \left[ \sum_{\substack{i_p,\,k_p}} 426 {^i_{j+1/2-j_p}}\mathbb{Q}^{i_p}_{j_p} \; U^{i+i_p}_{j+1/2-j_p} \right] V^{i}_{j+1/2} \biggr\} && \\ 427 \\ 428 \equiv \sum\limits_{i,j,k} & \sum_{\substack{i_p,\,k_p}} \biggl\{ \ \ 429 {^{i+1/2-i_p}_j}\mathbb{Q}^{i_p}_{j_p} \; V^{i+1/2-i_p}_{j+j_p} \, U^{i+1/2}_{j} % &&\\ 430 - {^i_{j+1/2-j_p}}\mathbb{Q}^{i_p}_{j_p} \; U^{i+i_p}_{j+1/2-j_p} \, V^{i}_{j+1/2} \ \; \biggr\} && \\ 431 % 432 \allowdisplaybreaks 433 \intertext{ Expending the summation on $i_p$ and $k_p$, it becomes:} 434 % 435 \equiv \sum\limits_{i,j,k} & \biggl\{ \ \ 436 {^{i+1}_j }\mathbb{Q}^{-1/2}_{+1/2} \;V^{i+1}_{j+1/2} \; U^{\,i+1/2}_{j} 437 - {^i_{j}\quad}\mathbb{Q}^{-1/2}_{+1/2} \; U^{i-1/2}_{j} \; V^{\,i}_{j+1/2} && \\ 438 & + {^{i+1}_j }\mathbb{Q}^{-1/2}_{-1/2} \; V^{i+1}_{j-1/2} \; U^{\,i+1/2}_{j} 439 - {^i_{j+1} }\mathbb{Q}^{-1/2}_{-1/2} \; U^{i-1/2}_{j+1} \; V^{\,i}_{j+1/2} \biggr. && \\ 440 & + {^{i}_j\quad}\mathbb{Q}^{+1/2}_{+1/2} \; V^{i}_{j+1/2} \; U^{\,i+1/2}_{j} 441 - {^i_{j}\quad}\mathbb{Q}^{+1/2}_{+1/2} \; U^{i+1/2}_{j} \; V^{\,i}_{j+1/2} \biggr. && \\ 442 & + {^{i}_j\quad}\mathbb{Q}^{+1/2}_{-1/2} \; V^{i}_{j-1/2} \; U^{\,i+1/2}_{j} 443 - {^i_{j+1} }\mathbb{Q}^{+1/2}_{-1/2} \; U^{i+1/2}_{j+1}\; V^{\,i}_{j+1/2} \ \; \biggr\} && \\ 444 % 445 \allowdisplaybreaks 446 \intertext{The summation is done over all $i$ and $j$ indices, it is therefore possible to introduce 447 a shift of $-1$ either in $i$ or $j$ direction in some of the term of the summation (first term of the 448 first and second lines, second term of the second and fourth lines). By doning so, we can regroup 449 all the terms of the summation by triad at a ($i$,$j$) point. In other words, we regroup all the terms 450 in the neighbourhood that contain a triad at the same ($i$,$j$) indices. It becomes: } 451 \allowdisplaybreaks 452 % 453 \equiv \sum\limits_{i,j,k} & \biggl\{ \ \ 454 {^{i}_j}\mathbb{Q}^{-1/2}_{+1/2} \left[ V^{i}_{j+1/2}\, U^{\,i-1/2}_{j} 455 - U^{i-1/2}_{j} \, V^{\,i}_{j+1/2} \right] && \\ 456 & + {^{i}_j}\mathbb{Q}^{-1/2}_{-1/2} \left[ V^{i}_{j-1/2} \, U^{\,i-1/2}_{j} 457 - U^{i-1/2}_{j} \, V^{\,i}_{j-1/2} \right] \biggr. && \\ 458 & + {^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} \left[ V^{i}_{j+1/2} \, U^{\,i+1/2}_{j} 459 - U^{i+1/2}_{j} \, V^{\,i}_{j+1/2} \right] \biggr. && \\ 460 & + {^{i}_j}\mathbb{Q}^{+1/2}_{-1/2} \left[ V^{i}_{j-1/2} \, U^{\,i+1/2}_{j} 461 - U^{i+1/2}_{j-1} \, V^{\,i}_{j-1/2} \right] \ \; \biggr\} \qquad 462 \equiv \ 0 && 463 \end{flalign*} 464 434 &\int\limits_D - \textbf{U}_h \cdot \left( \zeta \;\textbf{k} \times \textbf{U}_h \right) \; dv && \\ 435 \equiv \sum\limits_{i,j,k} & \biggl\{ 436 \left[ \sum_{\substack{i_p,\,k_p}} 437 {^{i+1/2-i_p}_j}\mathbb{Q}^{i_p}_{j_p} \; V^{i+1/2-i_p}_{j+j_p} \right] U^{i+1/2}_{j} % &&\\ 438 - \left[ \sum_{\substack{i_p,\,k_p}} 439 {^i_{j+1/2-j_p}}\mathbb{Q}^{i_p}_{j_p} \; U^{i+i_p}_{j+1/2-j_p} \right] V^{i}_{j+1/2} \biggr\} && \\ \\ 440 \equiv \sum\limits_{i,j,k} & \sum_{\substack{i_p,\,k_p}} \biggl\{ \ \ 441 {^{i+1/2-i_p}_j}\mathbb{Q}^{i_p}_{j_p} \; V^{i+1/2-i_p}_{j+j_p} \, U^{i+1/2}_{j} % &&\\ 442 - {^i_{j+1/2-j_p}}\mathbb{Q}^{i_p}_{j_p} \; U^{i+i_p}_{j+1/2-j_p} \, V^{i}_{j+1/2} \ \; \biggr\} && \\ 443 % 444 \allowdisplaybreaks 445 \intertext{ Expending the summation on $i_p$ and $k_p$, it becomes:} 446 % 447 \equiv \sum\limits_{i,j,k} & \biggl\{ \ \ 448 {^{i+1}_j }\mathbb{Q}^{-1/2}_{+1/2} \;V^{i+1}_{j+1/2} \; U^{\,i+1/2}_{j} 449 - {^i_{j}\quad}\mathbb{Q}^{-1/2}_{+1/2} \; U^{i-1/2}_{j} \; V^{\,i}_{j+1/2} && \\ 450 & + {^{i+1}_j }\mathbb{Q}^{-1/2}_{-1/2} \; V^{i+1}_{j-1/2} \; U^{\,i+1/2}_{j} 451 - {^i_{j+1} }\mathbb{Q}^{-1/2}_{-1/2} \; U^{i-1/2}_{j+1} \; V^{\,i}_{j+1/2} \biggr. && \\ 452 & + {^{i}_j\quad}\mathbb{Q}^{+1/2}_{+1/2} \; V^{i}_{j+1/2} \; U^{\,i+1/2}_{j} 453 - {^i_{j}\quad}\mathbb{Q}^{+1/2}_{+1/2} \; U^{i+1/2}_{j} \; V^{\,i}_{j+1/2} \biggr. && \\ 454 & + {^{i}_j\quad}\mathbb{Q}^{+1/2}_{-1/2} \; V^{i}_{j-1/2} \; U^{\,i+1/2}_{j} 455 - {^i_{j+1} }\mathbb{Q}^{+1/2}_{-1/2} \; U^{i+1/2}_{j+1}\; V^{\,i}_{j+1/2} \ \; \biggr\} && \\ 456 % 457 \allowdisplaybreaks 458 \intertext{The summation is done over all $i$ and $j$ indices, it is therefore possible to introduce 459 a shift of $-1$ either in $i$ or $j$ direction in some of the term of the summation (first term of the 460 first and second lines, second term of the second and fourth lines). By doning so, we can regroup 461 all the terms of the summation by triad at a ($i$,$j$) point. In other words, we regroup all the terms 462 in the neighbourhood that contain a triad at the same ($i$,$j$) indices. It becomes: } 463 \allowdisplaybreaks 464 % 465 \equiv \sum\limits_{i,j,k} & \biggl\{ \ \ 466 {^{i}_j}\mathbb{Q}^{-1/2}_{+1/2} \left[ V^{i}_{j+1/2}\, U^{\,i-1/2}_{j} 467 - U^{i-1/2}_{j} \, V^{\,i}_{j+1/2} \right] && \\ 468 & + {^{i}_j}\mathbb{Q}^{-1/2}_{-1/2} \left[ V^{i}_{j-1/2} \, U^{\,i-1/2}_{j} 469 - U^{i-1/2}_{j} \, V^{\,i}_{j-1/2} \right] \biggr. && \\ 470 & + {^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} \left[ V^{i}_{j+1/2} \, U^{\,i+1/2}_{j} 471 - U^{i+1/2}_{j} \, V^{\,i}_{j+1/2} \right] \biggr. && \\ 472 & + {^{i}_j}\mathbb{Q}^{+1/2}_{-1/2} \left[ V^{i}_{j-1/2} \, U^{\,i+1/2}_{j} 473 - U^{i+1/2}_{j-1} \, V^{\,i}_{j-1/2} \right] \ \; \biggr\} \qquad 474 \equiv \ 0 && 475 \end{flalign*} 465 476 466 477 % ------------------------------------------------------------------------------------------------------------- … … 471 482 472 483 The change of Kinetic Energy (KE) due to the vertical advection is exactly balanced by the change of KE due to the horizontal gradient of KE~: 473 \ begin{equation*}474 475 = - \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv476 + \frac{1}{2} \int_D { \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv } \\477 \ end{equation*}484 \[ 485 \int_D \textbf{U}_h \cdot \frac{1}{e_3 } \omega \partial_k \textbf{U}_h \;dv 486 = - \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv 487 + \frac{1}{2} \int_D { \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv } 488 \] 478 489 Indeed, using successively \autoref{eq:DOM_di_adj} ($i.e.$ the skew symmetry property of the $\delta$ operator) 479 490 and the continuity equation, then \autoref{eq:DOM_di_adj} again, … … 482 493 applied in the horizontal and vertical directions, it becomes: 483 494 \begin{flalign*} 484 & - \int_D \textbf{U}_h \cdot \text{KEG}\;dv 485 = - \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv &&&\\486 %487 \equiv & - \sum\limits_{i,j,k} \frac{1}{2} \biggl\{ 488 \frac{1} {e_{1u}} \delta_{i+1/2} \left[ \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right] u \ b_u 489 + \frac{1} {e_{2v}} \delta_{j+1/2} \left[ \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right] v \ b_v \biggr\} &&& \\490 %491 \equiv & + \sum\limits_{i,j,k} \frac{1}{2} \left( \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right)\;492 \biggl\{ \delta_{i} \left[ U \right] + \delta_{j} \left[ V \right] \biggr\} &&& \\493 \allowdisplaybreaks494 %495 \equiv & - \sum\limits_{i,j,k} \frac{1}{2}496 \left( \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right) \; 497 498 \allowdisplaybreaks499 %500 \equiv & + \sum\limits_{i,j,k} \frac{1}{2} \delta_{k+1/2} \left[ \overline{ u^2}^{\,i} + \overline{ v^2}^{\,j} \right] \; W 501 502 \allowdisplaybreaks503 %504 \equiv & + \sum\limits_{i,j,k} \frac{1} {2} \left( \overline{\delta_{k+1/2} \left[ u^2 \right]}^{\,i} 505 + \overline{\delta_{k+1/2} \left[ v^2 \right]}^{\,j} \right) \; W 506 507 508 \allowdisplaybreaks509 \intertext{Assuming that $b_u= \overline{b_t}^{\,i+1/2}$ and $b_v= \overline{b_t}^{\,j+1/2}$, or at least that the time510 derivative of these two equations is satisfied, it becomes:}511 %512 \equiv & \sum\limits_{i,j,k} \frac{1} {2}513 \biggl\{ \; \overline{W}^{\,i+1/2}\;\delta_{k+1/2} \left[ u^2 \right] 514 + \overline{W}^{\,j+1/2}\;\delta_{k+1/2} \left[ v^2 \right] \; \biggr\} 515 516 517 \allowdisplaybreaks518 % 519 \equiv & \sum\limits_{i,j,k} 520 \biggl\{ \; \overline{W}^{\,i+1/2}\; \overline {u}^{\,k+1/2}\; \delta_{k+1/2}[ u ] 521 + \overline{W}^{\,j+1/2}\; \overline {v}^{\,k+1/2}\; \delta_{k+1/2}[ v ] \; \biggr\} 522 523 524 %525 \allowdisplaybreaks526 \equiv & \sum\limits_{i,j,k} 527 \biggl\{ \; \frac{1} {b_u } \; \overline { \overline{W}^{\,i+1/2}\,\delta_{k+1/2} \left[ u \right] }^{\,k} \;u\;b_u 528 + \frac{1} {b_v } \; \overline { \overline{W}^{\,j+1/2} \delta_{k+1/2} \left[ v \right] }^{\,k} \;v\;b_v \; \biggr\}529 530 531 %532 \intertext{The first term provides the discrete expression for the vertical advection of momentum (ZAD), 533 while the second term corresponds exactly to \autoref{eq:KE+PE_vect_discrete}, therefore:}534 \equiv& \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv 535 536 \equiv& \int\limits_D \textbf{U}_h \cdot w \partial_k \textbf{U}_h \;dv 537 495 & - \int_D \textbf{U}_h \cdot \text{KEG}\;dv 496 = - \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv &&&\\ 497 % 498 \equiv & - \sum\limits_{i,j,k} \frac{1}{2} \biggl\{ 499 \frac{1} {e_{1u}} \delta_{i+1/2} \left[ \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right] u \ b_u 500 + \frac{1} {e_{2v}} \delta_{j+1/2} \left[ \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right] v \ b_v \biggr\} &&& \\ 501 % 502 \equiv & + \sum\limits_{i,j,k} \frac{1}{2} \left( \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right)\; 503 \biggl\{ \delta_{i} \left[ U \right] + \delta_{j} \left[ V \right] \biggr\} &&& \\ 504 \allowdisplaybreaks 505 % 506 \equiv & - \sum\limits_{i,j,k} \frac{1}{2} 507 \left( \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right) \; 508 \biggl\{ \frac{b_t}{e_{3t}} \partial_t (e_{3t}) + \delta_k \left[ W \right] \biggr\} &&&\\ 509 \allowdisplaybreaks 510 % 511 \equiv & + \sum\limits_{i,j,k} \frac{1}{2} \delta_{k+1/2} \left[ \overline{ u^2}^{\,i} + \overline{ v^2}^{\,j} \right] \; W 512 - \sum\limits_{i,j,k} \frac{1}{2} \left( \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right) \;\partial_t b_t &&& \\ 513 \allowdisplaybreaks 514 % 515 \equiv & + \sum\limits_{i,j,k} \frac{1} {2} \left( \overline{\delta_{k+1/2} \left[ u^2 \right]}^{\,i} 516 + \overline{\delta_{k+1/2} \left[ v^2 \right]}^{\,j} \right) \; W 517 - \sum\limits_{i,j,k} \left( \frac{u^2}{2}\,\partial_t \overline{b_t}^{\,{i+1/2}} 518 + \frac{v^2}{2}\,\partial_t \overline{b_t}^{\,{j+1/2}} \right) &&& \\ 519 \allowdisplaybreaks 520 \intertext{Assuming that $b_u= \overline{b_t}^{\,i+1/2}$ and $b_v= \overline{b_t}^{\,j+1/2}$, or at least that the time 521 derivative of these two equations is satisfied, it becomes:} 522 % 523 \equiv & \sum\limits_{i,j,k} \frac{1} {2} 524 \biggl\{ \; \overline{W}^{\,i+1/2}\;\delta_{k+1/2} \left[ u^2 \right] 525 + \overline{W}^{\,j+1/2}\;\delta_{k+1/2} \left[ v^2 \right] \; \biggr\} 526 - \sum\limits_{i,j,k} \left( \frac{u^2}{2}\,\partial_t b_u 527 + \frac{v^2}{2}\,\partial_t b_v \right) &&& \\ 528 \allowdisplaybreaks 529 % 530 \equiv & \sum\limits_{i,j,k} 531 \biggl\{ \; \overline{W}^{\,i+1/2}\; \overline {u}^{\,k+1/2}\; \delta_{k+1/2}[ u ] 532 + \overline{W}^{\,j+1/2}\; \overline {v}^{\,k+1/2}\; \delta_{k+1/2}[ v ] \; \biggr\} 533 - \sum\limits_{i,j,k} \left( \frac{u^2}{2}\,\partial_t b_u 534 + \frac{v^2}{2}\,\partial_t b_v \right) &&& \\ 535 % 536 \allowdisplaybreaks 537 \equiv & \sum\limits_{i,j,k} 538 \biggl\{ \; \frac{1} {b_u } \; \overline { \overline{W}^{\,i+1/2}\,\delta_{k+1/2} \left[ u \right] }^{\,k} \;u\;b_u 539 + \frac{1} {b_v } \; \overline { \overline{W}^{\,j+1/2} \delta_{k+1/2} \left[ v \right] }^{\,k} \;v\;b_v \; \biggr\} 540 - \sum\limits_{i,j,k} \left( \frac{u^2}{2}\,\partial_t b_u 541 + \frac{v^2}{2}\,\partial_t b_v \right) &&& \\ 542 % 543 \intertext{The first term provides the discrete expression for the vertical advection of momentum (ZAD), 544 while the second term corresponds exactly to \autoref{eq:KE+PE_vect_discrete}, therefore:} 545 \equiv& \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv 546 + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t (e_3) \;dv } &&&\\ 547 \equiv& \int\limits_D \textbf{U}_h \cdot w \partial_k \textbf{U}_h \;dv 548 + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t (e_3) \;dv } &&&\\ 538 549 \end{flalign*} 539 550 … … 544 555 For example KE can also be discretized as $1/2\,({\overline u^{\,i}}^2 + {\overline v^{\,j}}^2)$. 545 556 This leads to the following expression for the vertical advection: 546 \begin{equation*} 547 \frac{1} {e_3 }\; \omega\; \partial_k \textbf{U}_h 548 \equiv \left( {{\begin{array} {*{20}c} 549 \frac{1} {e_{1u}\,e_{2u}\,e_{3u}} \; \overline{\overline {e_{1t}\,e_{2t} \,\omega\;\delta_{k+1/2} 550 \left[ \overline u^{\,i+1/2} \right]}}^{\,i+1/2,k} \hfill \\ 551 \frac{1} {e_{1v}\,e_{2v}\,e_{3v}} \; \overline{\overline {e_{1t}\,e_{2t} \,\omega \;\delta_{k+1/2} 552 \left[ \overline v^{\,j+1/2} \right]}}^{\,j+1/2,k} \hfill \\ 553 \end{array}} } \right) 554 \end{equation*} 557 \[ 558 \frac{1} {e_3 }\; \omega\; \partial_k \textbf{U}_h 559 \equiv \left( {{ 560 \begin{array} {*{20}c} 561 \frac{1} {e_{1u}\,e_{2u}\,e_{3u}} \; \overline{\overline {e_{1t}\,e_{2t} \,\omega\;\delta_{k+1/2} 562 \left[ \overline u^{\,i+1/2} \right]}}^{\,i+1/2,k} \hfill \\ 563 \frac{1} {e_{1v}\,e_{2v}\,e_{3v}} \; \overline{\overline {e_{1t}\,e_{2t} \,\omega \;\delta_{k+1/2} 564 \left[ \overline v^{\,j+1/2} \right]}}^{\,j+1/2,k} \hfill 565 \end{array} 566 } } \right) 567 \] 555 568 a formulation that requires an additional horizontal mean in contrast with the one used in NEMO. 556 569 Nine velocity points have to be used instead of 3. … … 560 573 an extra constraint arises on the time derivative of the volume at $u$- and $v$-points: 561 574 \begin{flalign*} 562 e_{1u}\,e_{2u}\,\partial_t (e_{3u}) =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,i+1/2} \\563 e_{1v}\,e_{2v}\,\partial_t (e_{3v}) =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,j+1/2}575 e_{1u}\,e_{2u}\,\partial_t (e_{3u}) =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,i+1/2} \\ 576 e_{1v}\,e_{2v}\,\partial_t (e_{3v}) =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,j+1/2} 564 577 \end{flalign*} 565 578 which is (over-)satified by defining the vertical scale factor as follows: 566 \begin{flalign} \label{eq:e3u-e3v} 567 e_{3u} = \frac{1}{e_{1u}\,e_{2u}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,i+1/2} \\ 568 e_{3v} = \frac{1}{e_{1v}\,e_{2v}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,j+1/2} 569 \end{flalign} 579 \begin{flalign*} 580 % \label{eq:e3u-e3v} 581 e_{3u} = \frac{1}{e_{1u}\,e_{2u}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,i+1/2} \\ 582 e_{3v} = \frac{1}{e_{1v}\,e_{2v}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,j+1/2} 583 \end{flalign*} 570 584 571 585 Blah blah required on the the step representation of bottom topography..... … … 588 602 the change of KE due to the work of pressure forces is balanced by 589 603 the change of potential energy due to buoyancy forces: 590 \ begin{equation*}591 - \int_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv 592 = - \int_D \nabla \cdot \left( \rho \,\textbf {U} \right) \,g\,z \;dv604 \[ 605 - \int_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv 606 = - \int_D \nabla \cdot \left( \rho \,\textbf {U} \right) \,g\,z \;dv 593 607 + \int_D g\, \rho \; \partial_t (z) \;dv 594 \ end{equation*}608 \] 595 609 596 610 This property can be satisfied in a discrete sense for both $z$- and $s$-coordinates. … … 599 613 the work of pressure forces can be written as: 600 614 \begin{flalign*} 601 &- \int_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv 602 \equiv \sum\limits_{i,j,k} \biggl\{ \; - \frac{1} {e_{1u}} \Bigl( 603 \delta_{i+1/2} [p_t] - g\;\overline \rho^{\,i+1/2}\;\delta_{i+1/2} [z_t] \Bigr) \; u\;b_u 604 && \\& \qquad \qquad \qquad \qquad \qquad \quad \ \,605 - \frac{1} {e_{2v}} \Bigl( 606 \delta_{j+1/2} [p_t] - g\;\overline \rho^{\,j+1/2}\delta_{j+1/2} [z_t] \Bigr) \; v\;b_v \; \biggr\} && \\ 607 %608 \allowdisplaybreaks609 \intertext{Using successively \autoref{eq:DOM_di_adj}, $i.e.$ the skew symmetry property of 610 the $\delta$ operator, \autoref{eq:wzv}, the continuity equation, \autoref{eq:dynhpg_sco}, 611 the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w} $,612 which comes from the definition of $z_t$, it becomes: }613 \allowdisplaybreaks614 %615 \equiv& + \sum\limits_{i,j,k} g \biggl\{ 616 \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t] 617 + \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t] 618 619 %620 \equiv& + \sum\limits_{i,j,k} g \biggl\{ 621 \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t] 622 + \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t] 623 - \left( \frac{b_t}{e_{3t}} \partial_t (e_{3t}) + \delta_k \left[ W \right] \right) \frac{p_t}{g} \biggr\} &&&\\ 624 %625 \equiv& + \sum\limits_{i,j,k} g \biggl\{ 626 \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t] 627 + \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t] 628 + \frac{W}{g}\;\delta_{k+1/2} [p_t] 629 630 %631 \equiv& + \sum\limits_{i,j,k} g \biggl\{ 632 \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t] 633 + \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t] 634 - W\;e_{3w} \overline \rho^{\,k+1/2} 635 636 %637 \equiv& + \sum\limits_{i,j,k} g \biggl\{ 638 \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t] 639 + \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t] 640 + W\; \overline \rho^{\,k+1/2}\;\delta_{k+1/2} [z_t] 641 642 %643 \allowdisplaybreaks644 %645 \equiv& - \sum\limits_{i,j,k} g \; z_t \biggl\{ 646 647 648 + \delta_k \left[ W\; \overline \rho^{\,k+1/2} \right] \biggr\} 649 - \sum\limits_{i,j,k} \biggl\{ p_t\;\partial_t b_t \biggr\} &&&\\650 %651 \equiv& + \sum\limits_{i,j,k} g \; z_t \biggl\{ \partial_t ( e_{3t} \,\rho) \biggr\} \; b_t 652 - \sum\limits_{i,j,k} \biggl\{ p_t\;\partial_t b_t \biggr\} &&&\\653 %615 &- \int_D \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv 616 \equiv \sum\limits_{i,j,k} \biggl\{ \; - \frac{1} {e_{1u}} \Bigl( 617 \delta_{i+1/2} [p_t] - g\;\overline \rho^{\,i+1/2}\;\delta_{i+1/2} [z_t] \Bigr) \; u\;b_u && \\ 618 & \qquad \qquad \qquad \qquad \qquad \quad \ \, 619 - \frac{1} {e_{2v}} \Bigl( 620 \delta_{j+1/2} [p_t] - g\;\overline \rho^{\,j+1/2}\delta_{j+1/2} [z_t] \Bigr) \; v\;b_v \; \biggr\} && \\ 621 % 622 \allowdisplaybreaks 623 \intertext{Using successively \autoref{eq:DOM_di_adj}, $i.e.$ the skew symmetry property of 624 the $\delta$ operator, \autoref{eq:wzv}, the continuity equation, \autoref{eq:dynhpg_sco}, 625 the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w} $, 626 which comes from the definition of $z_t$, it becomes: } 627 \allowdisplaybreaks 628 % 629 \equiv& + \sum\limits_{i,j,k} g \biggl\{ 630 \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t] 631 + \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t] 632 +\Bigl( \delta_i[U] + \delta_j [V] \Bigr)\;\frac{p_t}{g} \biggr\} &&\\ 633 % 634 \equiv& + \sum\limits_{i,j,k} g \biggl\{ 635 \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t] 636 + \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t] 637 - \left( \frac{b_t}{e_{3t}} \partial_t (e_{3t}) + \delta_k \left[ W \right] \right) \frac{p_t}{g} \biggr\} &&&\\ 638 % 639 \equiv& + \sum\limits_{i,j,k} g \biggl\{ 640 \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t] 641 + \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t] 642 + \frac{W}{g}\;\delta_{k+1/2} [p_t] 643 - \frac{p_t}{g}\,\partial_t b_t \biggr\} &&&\\ 644 % 645 \equiv& + \sum\limits_{i,j,k} g \biggl\{ 646 \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t] 647 + \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t] 648 - W\;e_{3w} \overline \rho^{\,k+1/2} 649 - \frac{p_t}{g}\,\partial_t b_t \biggr\} &&&\\ 650 % 651 \equiv& + \sum\limits_{i,j,k} g \biggl\{ 652 \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t] 653 + \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t] 654 + W\; \overline \rho^{\,k+1/2}\;\delta_{k+1/2} [z_t] 655 - \frac{p_t}{g}\,\partial_t b_t \biggr\} &&&\\ 656 % 657 \allowdisplaybreaks 658 % 659 \equiv& - \sum\limits_{i,j,k} g \; z_t \biggl\{ 660 \delta_i \left[ U\; \overline \rho^{\,i+1/2} \right] 661 + \delta_j \left[ V\; \overline \rho^{\,j+1/2} \right] 662 + \delta_k \left[ W\; \overline \rho^{\,k+1/2} \right] \biggr\} 663 - \sum\limits_{i,j,k} \biggl\{ p_t\;\partial_t b_t \biggr\} &&&\\ 664 % 665 \equiv& + \sum\limits_{i,j,k} g \; z_t \biggl\{ \partial_t ( e_{3t} \,\rho) \biggr\} \; b_t 666 - \sum\limits_{i,j,k} \biggl\{ p_t\;\partial_t b_t \biggr\} &&&\\ 667 % 654 668 \end{flalign*} 655 669 The first term is exactly the first term of the right-hand-side of \autoref{eq:KE+PE_vect_discrete}. … … 659 673 In other words, the following property must be satisfied: 660 674 \begin{flalign*} 661 \sum\limits_{i,j,k} \biggl\{ p_t\;\partial_t b_t \biggr\}662 \equiv \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t \biggr\} 675 \sum\limits_{i,j,k} \biggl\{ p_t\;\partial_t b_t \biggr\} 676 \equiv \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t \biggr\} 663 677 \end{flalign*} 664 678 … … 667 681 668 682 \begin{flalign*} 669 \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t \biggr\}670 &\equiv - \sum\limits_{i,j,k} \biggl\{ \delta_k [p_w]\,\partial_t (z_t) \,e_{1t}\,e_{2t} \biggr\} &&&\\671 %672 &\equiv + \sum\limits_{i,j,k} \biggl\{ p_w\, \delta_{k+1/2} [\partial_t (z_t)] \,e_{1t}\,e_{2t} \biggr\} 683 \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t \biggr\} 684 &\equiv - \sum\limits_{i,j,k} \biggl\{ \delta_k [p_w]\,\partial_t (z_t) \,e_{1t}\,e_{2t} \biggr\} &&&\\ 685 % 686 &\equiv + \sum\limits_{i,j,k} \biggl\{ p_w\, \delta_{k+1/2} [\partial_t (z_t)] \,e_{1t}\,e_{2t} \biggr\} 673 687 \equiv + \sum\limits_{i,j,k} \biggl\{ p_w\, \partial_t (e_{3w}) \,e_{1t}\,e_{2t} \biggr\} &&&\\ 674 &\equiv + \sum\limits_{i,j,k} \biggl\{ p_w\, \partial_t (b_w) \biggr\} 675 %676 % & \equiv \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}} \delta_k [p_w]\;\partial_t (z_t) \,b_w \right) \biggr\} &&&\\677 % & \equiv \sum\limits_{i,j,k} \biggl\{ p_w\;\partial_t \left( \delta_k [z_t] \right) e_{1w}\,e_{2w} \biggr\} &&&\\678 % & \equiv \sum\limits_{i,j,k} \biggl\{ p_w\;\partial_t b_w \biggr\} 688 &\equiv + \sum\limits_{i,j,k} \biggl\{ p_w\, \partial_t (b_w) \biggr\} 689 % 690 % & \equiv \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}} \delta_k [p_w]\;\partial_t (z_t) \,b_w \right) \biggr\} &&&\\ 691 % & \equiv \sum\limits_{i,j,k} \biggl\{ p_w\;\partial_t \left( \delta_k [z_t] \right) e_{1w}\,e_{2w} \biggr\} &&&\\ 692 % & \equiv \sum\limits_{i,j,k} \biggl\{ p_w\;\partial_t b_w \biggr\} 679 693 \end{flalign*} 680 694 therefore, the balance to be satisfied is: 681 695 \begin{flalign*} 682 \sum\limits_{i,j,k} \biggl\{ p_t\;\partial_t (b_t) \biggr\} \equiv \sum\limits_{i,j,k} \biggl\{ p_w\, \partial_t (b_w) \biggr\}696 \sum\limits_{i,j,k} \biggl\{ p_t\;\partial_t (b_t) \biggr\} \equiv \sum\limits_{i,j,k} \biggl\{ p_w\, \partial_t (b_w) \biggr\} 683 697 \end{flalign*} 684 698 which is a purely vertical balance: 685 699 \begin{flalign*} 686 \sum\limits_{k} \biggl\{ p_t\;\partial_t (e_{3t}) \biggr\} \equiv \sum\limits_{k} \biggl\{ p_w\, \partial_t (e_{3w}) \biggr\}700 \sum\limits_{k} \biggl\{ p_t\;\partial_t (e_{3t}) \biggr\} \equiv \sum\limits_{k} \biggl\{ p_w\, \partial_t (e_{3w}) \biggr\} 687 701 \end{flalign*} 688 702 Defining $p_w = \overline{p_t}^{\,k+1/2}$ … … 690 704 %gm comment 691 705 \gmcomment{ 692 \begin{flalign*} 693 \sum\limits_{i,j,k} \biggl\{ p_t\;\partial_t b_t \biggr\} &&&\\ 694 % 695 & \equiv \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}} \delta_k [p_w]\;\partial_t (z_t) \,b_w \biggr\} &&&\\ 696 & \equiv \sum\limits_{i,j,k} \biggl\{ p_w\;\partial_t \left( \delta_{k+1/2} [z_t] \right) e_{1w}\,e_{2w} \biggr\} &&&\\ 697 & \equiv \sum\limits_{i,j,k} \biggl\{ p_w\;\partial_t b_w \biggr\} 698 \end{flalign*} 699 700 701 \begin{flalign*} 702 \int\limits_D \rho \, g \, \frac{\partial z }{\partial t} \;dv 703 \equiv& \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t} p \biggr\} \; b_t &&&\\ 704 \equiv& \sum\limits_{i,j,k} \biggl\{ \biggr\} \; b_t &&&\\ 705 \end{flalign*} 706 707 % 708 \begin{flalign*} 709 \equiv& - \int_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv 710 + \int\limits_D g\, \rho \; \frac{\partial z}{\partial t} \;dv &&& \\ 711 \end{flalign*} 712 % 706 \begin{flalign*} 707 \sum\limits_{i,j,k} \biggl\{ p_t\;\partial_t b_t \biggr\} &&&\\ 708 % 709 & \equiv \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}} \delta_k [p_w]\;\partial_t (z_t) \,b_w \biggr\} &&&\\ 710 & \equiv \sum\limits_{i,j,k} \biggl\{ p_w\;\partial_t \left( \delta_{k+1/2} [z_t] \right) e_{1w}\,e_{2w} \biggr\} &&&\\ 711 & \equiv \sum\limits_{i,j,k} \biggl\{ p_w\;\partial_t b_w \biggr\} 712 \end{flalign*} 713 714 \begin{flalign*} 715 \int\limits_D \rho \, g \, \frac{\partial z }{\partial t} \;dv 716 \equiv& \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t} p \biggr\} \; b_t &&&\\ 717 \equiv& \sum\limits_{i,j,k} \biggl\{ \biggr\} \; b_t &&&\\ 718 \end{flalign*} 719 720 % 721 \begin{flalign*} 722 \equiv& - \int_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv 723 + \int\limits_D g\, \rho \; \frac{\partial z}{\partial t} \;dv &&& \\ 724 \end{flalign*} 725 % 713 726 } 714 727 %end gm comment 715 716 728 717 729 Note that this property strongly constrains the discrete expression of both the depth of $T-$points and … … 719 731 Nevertheless, it is almost never satisfied since a linear equation of state is rarely used. 720 732 721 722 723 724 725 726 727 733 % ================================================================ 728 734 % Discrete Total energy Conservation : flux form … … 739 745 The discrete form of the total energy conservation, \autoref{eq:Tot_Energy}, is given by: 740 746 \begin{flalign*} 741 \partial_t \left( \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v + \rho \, g \, z_t \,b_t \biggr\} \right) &=0 \\747 \partial_t \left( \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v + \rho \, g \, z_t \,b_t \biggr\} \right) &=0 \\ 742 748 \end{flalign*} 743 749 which in flux form, it leads to: 744 750 \begin{flalign*} 745 \sum\limits_{i,j,k} \biggl\{ \frac{u }{e_{3u}}\,\frac{\partial (e_{3u}u)}{\partial t} \,b_u746 747 & - \frac{1}{2} \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{e_{3u}}\frac{\partial e_{3u} }{\partial t} \,b_u 748 + \frac{v^2}{e_{3v}}\frac{\partial e_{3v} }{\partial t} \,b_v \biggr\}\\749 &= - \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_3t}\frac{\partial e_{3t} \rho}{\partial t} \, g \, z_t \,b_t \biggr\} 750 - \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\frac{\partial z_t}{\partial t} \,b_t \biggr\}\\751 \sum\limits_{i,j,k} \biggl\{ \frac{u }{e_{3u}}\,\frac{\partial (e_{3u}u)}{\partial t} \,b_u 752 + \frac{v }{e_{3v}}\,\frac{\partial (e_{3v}v)}{\partial t} \,b_v \biggr\} 753 & - \frac{1}{2} \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{e_{3u}}\frac{\partial e_{3u} }{\partial t} \,b_u 754 + \frac{v^2}{e_{3v}}\frac{\partial e_{3v} }{\partial t} \,b_v \biggr\} \\ 755 &= - \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_3t}\frac{\partial e_{3t} \rho}{\partial t} \, g \, z_t \,b_t \biggr\} 756 - \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\frac{\partial z_t}{\partial t} \,b_t \biggr\} \\ 751 757 \end{flalign*} 752 758 … … 771 777 This altered Coriolis parameter is discretised at an f-point. 772 778 It is given by: 773 \ begin{equation*}774 f+\frac{1} {e_1 e_2 } \left( v \frac{\partial e_2 } {\partial i} - u \frac{\partial e_1 } {\partial j}\right)\;775 \equiv \;776 f+\frac{1} {e_{1f}\,e_{2f}} \left( \overline v^{\,i+1/2} \delta_{i+1/2} \left[ e_{2u} \right] 777 778 \ end{equation*}779 \[ 780 f+\frac{1} {e_1 e_2 } \left( v \frac{\partial e_2 } {\partial i} - u \frac{\partial e_1 } {\partial j}\right)\; 781 \equiv \; 782 f+\frac{1} {e_{1f}\,e_{2f}} \left( \overline v^{\,i+1/2} \delta_{i+1/2} \left[ e_{2u} \right] 783 -\overline u^{\,j+1/2} \delta_{j+1/2} \left[ e_{1u} \right] \right) 784 \] 779 785 780 786 Either the ENE or EEN scheme is then applied to obtain the vorticity term in flux form. … … 793 799 Because of the centered second order scheme, it conserves the horizontal kinetic energy, that is: 794 800 795 \begin{equation} \label{eq:C_ADV_KE_flux} 796 - \int_D \textbf{U}_h \cdot \left( {{\begin{array} {*{20}c} 797 \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\ 798 \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\ \end{array}} } \right) \;dv 799 - \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \frac{\partial e_3 }{\partial t} \;dv } =\;0 801 \begin{equation} 802 \label{eq:C_ADV_KE_flux} 803 - \int_D \textbf{U}_h \cdot \left( {{ 804 \begin{array} {*{20}c} 805 \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\ 806 \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\ 807 \end{array} 808 } } \right) \;dv 809 - \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \frac{\partial e_3 }{\partial t} \;dv } =\;0 800 810 \end{equation} 801 811 … … 803 813 ($i.e.$ just the the terms associated with the i-component of the advection): 804 814 \begin{flalign*} 805 & - \int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right) \; dv \\806 %807 \equiv& - \sum\limits_{i,j,k} \biggl\{ \frac{1} {b_u} \biggl( 808 \delta_{i+1/2} \left[ \overline {U}^{\,i} \;\overline u^{\,i} \right]809 + \delta_j \left[ \overline {V}^{\,i+1/2}\;\overline u^{\,j+1/2} \right]810 + \delta_k \left[ \overline {W}^{\,i+1/2}\;\overline u^{\,k+1/2} \right] \biggr) \; \biggr\} \, b_u \;u &&& \\811 %812 \equiv& - \sum\limits_{i,j,k} 813 \biggl\{ 814 815 816 817 818 %819 \equiv& + \sum\limits_{i,j,k}820 \biggl\{ 821 \overline {U}^{\,i}\; \overline u^{\,i} \delta_i \left[ u \right] 822 + \overline {V}^{\,i+1/2}\; \overline u^{\,j+1/2} \delta_{j+1/2} \left[ u \right]823 824 %825 \equiv& + \frac{1}{2} \sum\limits_{i,j,k} \biggl\{ 826 \overline{U}^{\,i} \delta_i \left[ u^2 \right] 827 828 829 %830 \equiv& - \sum\limits_{i,j,k} \frac{1}{2} \bigg\{ 831 832 833 834 %835 \equiv& - \sum\limits_{i,j,k} \frac{1}{2} \overline {u^2}^{\,i} \biggl\{ 836 837 838 839 %840 \equiv& + \sum\limits_{i,j,k} \frac{1}{2} \overline {u^2}^{\,i} 841 815 & - \int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right) \; dv \\ 816 % 817 \equiv& - \sum\limits_{i,j,k} \biggl\{ \frac{1} {b_u} \biggl( 818 \delta_{i+1/2} \left[ \overline {U}^{\,i} \;\overline u^{\,i} \right] 819 + \delta_j \left[ \overline {V}^{\,i+1/2}\;\overline u^{\,j+1/2} \right] 820 + \delta_k \left[ \overline {W}^{\,i+1/2}\;\overline u^{\,k+1/2} \right] \biggr) \; \biggr\} \, b_u \;u &&& \\ 821 % 822 \equiv& - \sum\limits_{i,j,k} 823 \biggl\{ 824 \delta_{i+1/2} \left[ \overline {U}^{\,i}\; \overline u^{\,i} \right] 825 + \delta_j \left[ \overline {V}^{\,i+1/2}\;\overline u^{\,j+1/2} \right] 826 + \delta_k \left[ \overline {W}^{\,i+12}\;\overline u^{\,k+1/2} \right] 827 \; \biggr\} \; u \\ 828 % 829 \equiv& + \sum\limits_{i,j,k} 830 \biggl\{ 831 \overline {U}^{\,i}\; \overline u^{\,i} \delta_i \left[ u \right] 832 + \overline {V}^{\,i+1/2}\; \overline u^{\,j+1/2} \delta_{j+1/2} \left[ u \right] 833 + \overline {W}^{\,i+1/2}\; \overline u^{\,k+1/2} \delta_{k+1/2} \left[ u \right] \biggr\} && \\ 834 % 835 \equiv& + \frac{1}{2} \sum\limits_{i,j,k} \biggl\{ 836 \overline{U}^{\,i} \delta_i \left[ u^2 \right] 837 + \overline{V}^{\,i+1/2} \delta_{j+/2} \left[ u^2 \right] 838 + \overline{W}^{\,i+1/2} \delta_{k+1/2} \left[ u^2 \right] \biggr\} && \\ 839 % 840 \equiv& - \sum\limits_{i,j,k} \frac{1}{2} \bigg\{ 841 U \; \delta_{i+1/2} \left[ \overline {u^2}^{\,i} \right] 842 + V \; \delta_{j+1/2} \left[ \overline {u^2}^{\,i} \right] 843 + W \; \delta_{k+1/2} \left[ \overline {u^2}^{\,i} \right] \biggr\} &&& \\ 844 % 845 \equiv& - \sum\limits_{i,j,k} \frac{1}{2} \overline {u^2}^{\,i} \biggl\{ 846 \delta_{i+1/2} \left[ U \right] 847 + \delta_{j+1/2} \left[ V \right] 848 + \delta_{k+1/2} \left[ W \right] \biggr\} &&& \\ 849 % 850 \equiv& + \sum\limits_{i,j,k} \frac{1}{2} \overline {u^2}^{\,i} 851 \biggl\{ \left( \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t} \right) \; b_t \biggr\} &&& \\ 842 852 \end{flalign*} 843 853 Applying similar manipulation applied to the second term of the scalar product leads to: 844 \begin{equation*} 845 - \int_D \textbf{U}_h \cdot \left( {{\begin{array} {*{20}c} 846 \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\ 847 \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\ \end{array}} } \right) \;dv 848 \equiv + \sum\limits_{i,j,k} \frac{1}{2} \left( \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right) 849 \biggl\{ \left( \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t} \right) \; b_t \biggr\} 850 \end{equation*} 854 \[ 855 - \int_D \textbf{U}_h \cdot \left( {{ 856 \begin{array} {*{20}c} 857 \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\ 858 \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\ 859 \end{array} 860 } } \right) \;dv 861 \equiv + \sum\limits_{i,j,k} \frac{1}{2} \left( \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right) 862 \biggl\{ \left( \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t} \right) \; b_t \biggr\} 863 \] 851 864 which is the discrete form of $ \frac{1}{2} \int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right) \; dv $. 852 865 \autoref{eq:C_ADV_KE_flux} is thus satisfied. 853 854 866 855 867 When the UBS scheme is used to evaluate the flux form momentum advection, … … 857 869 The horizontal kinetic energy is not conserved, but forced to decay ($i.e.$ the scheme is diffusive). 858 870 859 860 861 862 863 864 865 866 867 868 871 % ================================================================ 869 872 % Discrete Enstrophy Conservation … … 872 875 \label{sec:C.4} 873 876 874 875 877 % ------------------------------------------------------------------------------------------------------------- 876 878 % Vorticity Term with ENS scheme … … 880 882 881 883 In the ENS scheme, the vorticity term is descretized as follows: 882 \begin{equation} \tag{\ref{eq:dynvor_ens}} 883 \left\{ \begin{aligned} 884 +\frac{1}{e_{1u}} & \overline{q}^{\,i} & {\overline{ \overline{\left( e_{1v}\,e_{3v}\; v \right) } } }^{\,i, j+1/2} \\ 885 - \frac{1}{e_{2v}} & \overline{q}^{\,j} & {\overline{ \overline{\left( e_{2u}\,e_{3u}\; u \right) } } }^{\,i+1/2, j} 886 \end{aligned} \right. 884 \begin{equation} 885 \tag{\ref{eq:dynvor_ens}} 886 \left\{ 887 \begin{aligned} 888 +\frac{1}{e_{1u}} & \overline{q}^{\,i} & {\overline{ \overline{\left( e_{1v}\,e_{3v}\; v \right) } } }^{\,i, j+1/2} \\ 889 - \frac{1}{e_{2v}} & \overline{q}^{\,j} & {\overline{ \overline{\left( e_{2u}\,e_{3u}\; u \right) } } }^{\,i+1/2, j} 890 \end{aligned} 891 \right. 887 892 \end{equation} 888 893 … … 892 897 ( \autoref{eq:DOM_mi_adj} and \autoref{eq:DOM_di_adj}), 893 898 it can be shown that: 894 \begin{equation} \label{eq:C_1.1} 895 \int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \equiv 0 899 \begin{equation} 900 \label{eq:C_1.1} 901 \int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \equiv 0 896 902 \end{equation} 897 903 where $dv=e_1\,e_2\,e_3 \; di\,dj\,dk$ is the volume element. 898 904 Indeed, using \autoref{eq:dynvor_ens}, 899 905 the discrete form of the right hand side of \autoref{eq:C_1.1} can be transformed as follow: 900 \begin{flalign*} 901 &\int_D q \,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times 902 \left( e_3 \, q \; \textbf{k} \times \textbf{U}_h \right)\; dv \\ 903 % 904 & \qquad {\begin{array}{*{20}l} 905 &\equiv \sum\limits_{i,j,k} 906 q \ \left\{ \delta_{i+1/2} \left[ - \,\overline {q}^{\,i}\; \overline{\overline U }^{\,i,j+1/ 2} \right] 907 - \delta_{j+1/2} \left[ \overline {q}^{\,j}\; \overline{\overline V }^{\,i+1/2, j} \right] \right\} \\ 908 % 909 &\equiv \sum\limits_{i,j,k} 910 \left\{ \delta_i [q] \; \overline{q}^{\,i} \; \overline{ \overline U }^{\,i,j+1/2} 911 + \delta_j [q] \; \overline{q}^{\,j} \; \overline{\overline V }^{\,i+1/2,j} \right\} && \\ 912 % 913 &\equiv \,\frac{1} {2} \sum\limits_{i,j,k} 914 \left\{ \delta_i \left[ q^2 \right] \; \overline{\overline U }^{\,i,j+1/2} 915 + \delta_j \left[ q^2 \right] \; \overline{\overline V }^{\,i+1/2,j} \right\} && \\ 916 % 917 &\equiv - \frac{1} {2} \sum\limits_{i,j,k} q^2 \; 918 \left\{ \delta_{i+1/2} \left[ \overline{\overline{ U }}^{\,i,j+1/2} \right] 919 + \delta_{j+1/2} \left[ \overline{\overline{ V }}^{\,i+1/2,j} \right] \right\} && \\ 920 \end{array} } 921 % 922 \allowdisplaybreaks 923 \intertext{ Since $\overline {\;\cdot \;} $ and $\delta $ operators commute: $\delta_{i+1/2} 924 \left[ {\overline a^{\,i}} \right] = \overline {\delta_i \left[ a \right]}^{\,i+1/2}$, 925 and introducing the horizontal divergence $\chi $, it becomes: } 926 \allowdisplaybreaks 927 % 928 & \qquad {\begin{array}{*{20}l} 929 &\equiv \sum\limits_{i,j,k} - \frac{1} {2} q^2 \; \overline{\overline{ e_{1t}\,e_{2t}\,e_{3t}^{}\, \chi}}^{\,i+1/2,j+1/2} 930 \quad \equiv 0 && 931 \end{array} } 906 \begin{flalign*} 907 &\int_D q \,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times 908 \left( e_3 \, q \; \textbf{k} \times \textbf{U}_h \right)\; dv \\ 909 % 910 & \qquad 911 { 912 \begin{array}{*{20}l} 913 &\equiv \sum\limits_{i,j,k} 914 q \ \left\{ \delta_{i+1/2} \left[ - \,\overline {q}^{\,i}\; \overline{\overline U }^{\,i,j+1/ 2} \right] 915 - \delta_{j+1/2} \left[ \overline {q}^{\,j}\; \overline{\overline V }^{\,i+1/2, j} \right] \right\} \\ 916 % 917 &\equiv \sum\limits_{i,j,k} 918 \left\{ \delta_i [q] \; \overline{q}^{\,i} \; \overline{ \overline U }^{\,i,j+1/2} 919 + \delta_j [q] \; \overline{q}^{\,j} \; \overline{\overline V }^{\,i+1/2,j} \right\} && \\ 920 % 921 &\equiv \,\frac{1} {2} \sum\limits_{i,j,k} 922 \left\{ \delta_i \left[ q^2 \right] \; \overline{\overline U }^{\,i,j+1/2} 923 + \delta_j \left[ q^2 \right] \; \overline{\overline V }^{\,i+1/2,j} \right\} && \\ 924 % 925 &\equiv - \frac{1} {2} \sum\limits_{i,j,k} q^2 \; 926 \left\{ \delta_{i+1/2} \left[ \overline{\overline{ U }}^{\,i,j+1/2} \right] 927 + \delta_{j+1/2} \left[ \overline{\overline{ V }}^{\,i+1/2,j} \right] \right\} && \\ 928 \end{array} 929 } 930 % 931 \allowdisplaybreaks 932 \intertext{ Since $\overline {\;\cdot \;} $ and $\delta $ operators commute: $\delta_{i+1/2} 933 \left[ {\overline a^{\,i}} \right] = \overline {\delta_i \left[ a \right]}^{\,i+1/2}$, 934 and introducing the horizontal divergence $\chi $, it becomes: } 935 \allowdisplaybreaks 936 % 937 & \qquad { 938 \begin{array}{*{20}l} 939 &\equiv \sum\limits_{i,j,k} - \frac{1} {2} q^2 \; \overline{\overline{ e_{1t}\,e_{2t}\,e_{3t}^{}\, \chi}}^{\,i+1/2,j+1/2} 940 \quad \equiv 0 && 941 \end{array} 942 } 932 943 \end{flalign*} 933 944 The later equality is obtain only when the flow is horizontally non-divergent, $i.e.$ $\chi$=$0$. 934 935 945 936 946 % ------------------------------------------------------------------------------------------------------------- … … 941 951 942 952 With the EEN scheme, the vorticity terms are represented as: 943 \begin{equation} \tag{\ref{eq:dynvor_een}} 944 \left\{ { \begin{aligned} 945 +q\,e_3 \, v &\equiv +\frac{1}{e_{1u} } \sum_{\substack{i_p,\,k_p}} 946 {^{i+1/2-i_p}_j} \mathbb{Q}^{i_p}_{j_p} \left( e_{1v} e_{3v} \ v \right)^{i+i_p-1/2}_{j+j_p} \\ 947 - q\,e_3 \, u &\equiv -\frac{1}{e_{2v} } \sum_{\substack{i_p,\,k_p}} 948 {^i_{j+1/2-j_p}} \mathbb{Q}^{i_p}_{j_p} \left( e_{2u} e_{3u} \ u \right)^{i+i_p}_{j+j_p-1/2} \\ 949 \end{aligned} } \right. 953 \begin{equation} 954 \tag{\ref{eq:dynvor_een}} 955 \left\{ { 956 \begin{aligned} 957 +q\,e_3 \, v &\equiv +\frac{1}{e_{1u} } \sum_{\substack{i_p,\,k_p}} 958 {^{i+1/2-i_p}_j} \mathbb{Q}^{i_p}_{j_p} \left( e_{1v} e_{3v} \ v \right)^{i+i_p-1/2}_{j+j_p} \\ 959 - q\,e_3 \, u &\equiv -\frac{1}{e_{2v} } \sum_{\substack{i_p,\,k_p}} 960 {^i_{j+1/2-j_p}} \mathbb{Q}^{i_p}_{j_p} \left( e_{2u} e_{3u} \ u \right)^{i+i_p}_{j+j_p-1/2} \\ 961 \end{aligned} 962 } \right. 950 963 \end{equation} 951 964 where the indices $i_p$ and $k_p$ take the following values: 952 965 $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 953 966 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 954 \begin{equation} \tag{\ref{eq:Q_triads}} 955 _i^j \mathbb{Q}^{i_p}_{j_p} 956 = \frac{1}{12} \ \left( q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p} \right) 967 \begin{equation} 968 \tag{\ref{eq:Q_triads}} 969 _i^j \mathbb{Q}^{i_p}_{j_p} 970 = \frac{1}{12} \ \left( q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p} \right) 957 971 \end{equation} 958 959 972 960 973 This formulation does conserve the potential enstrophy for a horizontally non-divergent flow ($i.e.$ $\chi=0$). … … 965 978 this triad only can be transformed as follow: 966 979 967 \begin{flalign*} 968 &\int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \\ 969 % 970 \equiv& \sum\limits_{i,j,k} 971 {q} \ \biggl\{ \;\; 972 \delta_{i+1/2} \left[ -\, {{^i_j}\mathbb{Q}^{+1/2}_{+1/2} \; U^{i+1/2}_{j}} \right] 973 - \delta_{j+1/2} \left[ {{^i_j}\mathbb{Q}^{+1/2}_{+1/2} \; V^{i}_{j+1/2}} \right] 974 \;\;\biggr\} && \\ 975 % 976 \equiv& \sum\limits_{i,j,k} 977 \biggl\{ \delta_i [q] \ {{^i_j}\mathbb{Q}^{+1/2}_{+1/2} \; U^{i+1/2}_{j}} 978 + \delta_j [q] \ {{^i_j}\mathbb{Q}^{+1/2}_{+1/2} \; V^{i}_{j+1/2}} \biggr\} 979 && \\ 980 % 981 ... & &&\\ 982 &Demonstation \ to \ be \ done... &&\\ 983 ... & &&\\ 984 % 985 \equiv& \frac{1} {2} \sum\limits_{i,j,k} 986 \biggl\{ \delta_i \Bigl[ \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2 \Bigr]\; 987 \overline{\overline {U}}^{\,i,j+1/2} 988 + \delta_j \Bigl[ \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2 \Bigr]\; 989 \overline{\overline {V}}^{\,i+1/2,j} 990 \biggr\} 991 && \\ 992 % 993 \equiv& - \frac{1} {2} \sum\limits_{i,j,k} \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2\; 994 \biggl\{ \delta_{i+1/2} 995 \left[ \overline{\overline {U}}^{\,i,j+1/2} \right] 996 + \delta_{j+1/2} 997 \left[ \overline{\overline {V}}^{\,i+1/2,j} \right] 998 \biggr\} && \\ 999 % 1000 \equiv& \sum\limits_{i,j,k} - \frac{1} {2} \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2 1001 \; \overline{\overline{ b_t^{}\, \chi}}^{\,i+1/2,\,j+1/2} &&\\ 1002 % 1003 \ \ \equiv& \ 0 &&\\ 1004 \end{flalign*} 1005 1006 1007 1008 980 \begin{flalign*} 981 &\int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \\ 982 % 983 \equiv& \sum\limits_{i,j,k} 984 {q} \ \biggl\{ \;\; 985 \delta_{i+1/2} \left[ -\, {{^i_j}\mathbb{Q}^{+1/2}_{+1/2} \; U^{i+1/2}_{j}} \right] 986 - \delta_{j+1/2} \left[ {{^i_j}\mathbb{Q}^{+1/2}_{+1/2} \; V^{i}_{j+1/2}} \right] 987 \;\;\biggr\} && \\ 988 % 989 \equiv& \sum\limits_{i,j,k} 990 \biggl\{ \delta_i [q] \ {{^i_j}\mathbb{Q}^{+1/2}_{+1/2} \; U^{i+1/2}_{j}} 991 + \delta_j [q] \ {{^i_j}\mathbb{Q}^{+1/2}_{+1/2} \; V^{i}_{j+1/2}} \biggr\} 992 && \\ 993 % 994 ... & &&\\ 995 &Demonstation \ to \ be \ done... &&\\ 996 ... & &&\\ 997 % 998 \equiv& \frac{1} {2} \sum\limits_{i,j,k} 999 \biggl\{ \delta_i \Bigl[ \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2 \Bigr]\; 1000 \overline{\overline {U}}^{\,i,j+1/2} 1001 + \delta_j \Bigl[ \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2 \Bigr]\; 1002 \overline{\overline {V}}^{\,i+1/2,j} 1003 \biggr\} 1004 && \\ 1005 % 1006 \equiv& - \frac{1} {2} \sum\limits_{i,j,k} \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2\; 1007 \biggl\{ \delta_{i+1/2} 1008 \left[ \overline{\overline {U}}^{\,i,j+1/2} \right] 1009 + \delta_{j+1/2} 1010 \left[ \overline{\overline {V}}^{\,i+1/2,j} \right] 1011 \biggr\} && \\ 1012 % 1013 \equiv& \sum\limits_{i,j,k} - \frac{1} {2} \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2 1014 \; \overline{\overline{ b_t^{}\, \chi}}^{\,i+1/2,\,j+1/2} &&\\ 1015 % 1016 \ \ \equiv& \ 0 &&\\ 1017 \end{flalign*} 1009 1018 1010 1019 % ================================================================ … … 1013 1022 \section{Conservation properties on tracers} 1014 1023 \label{sec:C.5} 1015 1016 1024 1017 1025 All the numerical schemes used in NEMO are written such that the tracer content is conserved by … … 1032 1040 1033 1041 conservation of a tracer, $T$: 1034 \ begin{equation*}1035 \frac{\partial }{\partial t} \left( \int_D {T\;dv} \right) 1036 = \int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv }=01037 \ end{equation*}1042 \[ 1043 \frac{\partial }{\partial t} \left( \int_D {T\;dv} \right) 1044 = \int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv }=0 1045 \] 1038 1046 1039 1047 conservation of its variance: 1040 \begin{flalign*} 1041 \frac{\partial }{\partial t} \left( \int_D {\frac{1}{2} T^2\;dv} \right) 1042 =& \int_D { \frac{1}{e_3} Q \frac{\partial \left( e_3 \, T \right) }{\partial t} \;dv } 1043 - \frac{1}{2} \int_D { T^2 \frac{1}{e_3} \frac{\partial e_3 }{\partial t} \;dv } 1044 \end{flalign*} 1045 1048 \begin{flalign*} 1049 \frac{\partial }{\partial t} \left( \int_D {\frac{1}{2} T^2\;dv} \right) 1050 =& \int_D { \frac{1}{e_3} Q \frac{\partial \left( e_3 \, T \right) }{\partial t} \;dv } 1051 - \frac{1}{2} \int_D { T^2 \frac{1}{e_3} \frac{\partial e_3 }{\partial t} \;dv } 1052 \end{flalign*} 1046 1053 1047 1054 Whatever the advection scheme considered it conserves of the tracer content as … … 1051 1058 the conservation of the tracer content due to the advection tendency is obtained as follows: 1052 1059 \begin{flalign*} 1053 &\int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv } = - \int_D \nabla \cdot \left( T \textbf{U} \right)\;dv &&&\\1054 &\equiv - \sum\limits_{i,j,k} \biggl\{1055 1056 + \delta_j \left[ V \;\tau_v \right] \right) 1057 1058 %1059 &\equiv - \sum\limits_{i,j,k} \left\{1060 1061 1060 &\int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv } = - \int_D \nabla \cdot \left( T \textbf{U} \right)\;dv &&&\\ 1061 &\equiv - \sum\limits_{i,j,k} \biggl\{ 1062 \frac{1} {b_t} \left( \delta_i \left[ U \;\tau_u \right] 1063 + \delta_j \left[ V \;\tau_v \right] \right) 1064 + \frac{1} {e_{3t}} \delta_k \left[ w\;\tau_w \right] \biggl\} b_t &&&\\ 1065 % 1066 &\equiv - \sum\limits_{i,j,k} \left\{ 1067 \delta_i \left[ U \;\tau_u \right] 1068 + \delta_j \left[ V \;\tau_v \right] 1062 1069 + \delta_k \left[ W \;\tau_w \right] \right\} && \\ 1063 &\equiv 0 &&&1070 &\equiv 0 &&& 1064 1071 \end{flalign*} 1065 1072 … … 1068 1075 It can be demonstarted as follows: 1069 1076 \begin{flalign*} 1070 &\int_D { \frac{1}{e_3} Q \frac{\partial \left( e_3 \, T \right) }{\partial t} \;dv }1071 = - \int\limits_D \tau\;\nabla \cdot \left( T\; \textbf{U} \right)\;dv &&&\\1072 \equiv& - \sum\limits_{i,j,k} T\;1073 1074 1075 1076 1077 \equiv& + \sum\limits_{i,j,k} 1078 \left\{ U \overline T^{\,i+1/2} \,\delta_{i+1/2} \left[ T \right] 1079 1080 1081 \equiv& + \frac{1} {2} \sum\limits_{i,j,k}1082 1083 1084 + W \;\delta_{k+1/2} \left[ T^2 \right] \Bigr\} && \\1085 \equiv& - \frac{1} {2} \sum\limits_{i,j,k} T^21086 1087 1088 1089 \equiv& + \frac{1} {2} \sum\limits_{i,j,k} T^21090 1077 &\int_D { \frac{1}{e_3} Q \frac{\partial \left( e_3 \, T \right) }{\partial t} \;dv } 1078 = - \int\limits_D \tau\;\nabla \cdot \left( T\; \textbf{U} \right)\;dv &&&\\ 1079 \equiv& - \sum\limits_{i,j,k} T\; 1080 \left\{ 1081 \delta_i \left[ U \overline T^{\,i+1/2} \right] 1082 + \delta_j \left[ V \overline T^{\,j+1/2} \right] 1083 + \delta_k \left[ W \overline T^{\,k+1/2} \right] \right\} && \\ 1084 \equiv& + \sum\limits_{i,j,k} 1085 \left\{ U \overline T^{\,i+1/2} \,\delta_{i+1/2} \left[ T \right] 1086 + V \overline T^{\,j+1/2} \;\delta_{j+1/2} \left[ T \right] 1087 + W \overline T^{\,k+1/2}\;\delta_{k+1/2} \left[ T \right] \right\} &&\\ 1088 \equiv& + \frac{1} {2} \sum\limits_{i,j,k} 1089 \Bigl\{ U \;\delta_{i+1/2} \left[ T^2 \right] 1090 + V \;\delta_{j+1/2} \left[ T^2 \right] 1091 + W \;\delta_{k+1/2} \left[ T^2 \right] \Bigr\} && \\ 1092 \equiv& - \frac{1} {2} \sum\limits_{i,j,k} T^2 1093 \Bigl\{ \delta_i \left[ U \right] 1094 + \delta_j \left[ V \right] 1095 + \delta_k \left[ W \right] \Bigr\} &&& \\ 1096 \equiv& + \frac{1} {2} \sum\limits_{i,j,k} T^2 1097 \Bigl\{ \frac{1}{e_{3t}} \frac{\partial e_{3t}\,T }{\partial t} \Bigr\} &&& \\ 1091 1098 \end{flalign*} 1092 1099 which is the discrete form of $ \frac{1}{2} \int_D { T^2 \frac{1}{e_3} \frac{\partial e_3 }{\partial t} \;dv }$. … … 1097 1104 \section{Conservation properties on lateral momentum physics} 1098 1105 \label{sec:dynldf_properties} 1099 1100 1106 1101 1107 The discrete formulation of the horizontal diffusion of momentum ensures … … 1122 1128 The lateral momentum diffusion term conserves the potential vorticity: 1123 1129 \begin{flalign*} 1124 &\int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times 1125 1126 - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right) \Bigr]\;dv \\ 1127 %\end{flalign*}1128 %%%%%%%%%%recheck here.... (gm)1129 %\begin{flalign*}1130 =& \int \limits_D -\frac{1} {e_3 } \textbf{k} \cdot \nabla \times 1131 \Bigl[ \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right) \Bigr]\;dv \\ 1132 %\end{flalign*}1133 %\begin{flalign*}1134 \equiv& \sum\limits_{i,j}1135 1136 1137 1138 \right\} \\ 1139 %1140 \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}1141 %1142 \equiv& \sum\limits_{i,j,k} 1143 1144 1130 &\int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times 1131 \Bigl[ \nabla_h \left( A^{\,lm}\;\chi \right) 1132 - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right) \Bigr]\;dv \\ 1133 % \end{flalign*} 1134 %%%%%%%%%% recheck here.... (gm) 1135 % \begin{flalign*} 1136 =& \int \limits_D -\frac{1} {e_3 } \textbf{k} \cdot \nabla \times 1137 \Bigl[ \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right) \Bigr]\;dv \\ 1138 % \end{flalign*} 1139 % \begin{flalign*} 1140 \equiv& \sum\limits_{i,j} 1141 \left\{ 1142 \delta_{i+1/2} \left[ \frac {e_{2v}} {e_{1v}\,e_{3v}} \delta_i \left[ A_f^{\,lm} e_{3f} \zeta \right] \right] 1143 + \delta_{j+1/2} \left[ \frac {e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ A_f^{\,lm} e_{3f} \zeta \right] \right] 1144 \right\} \\ 1145 % 1146 \intertext{Using \autoref{eq:DOM_di_adj}, it follows:} 1147 % 1148 \equiv& \sum\limits_{i,j,k} 1149 -\,\left\{ 1150 \frac{e_{2v}} {e_{1v}\,e_{3v}} \delta_i \left[ A_f^{\,lm} e_{3f} \zeta \right]\;\delta_i \left[ 1\right] 1145 1151 + \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ A_f^{\,lm} e_{3f} \zeta \right]\;\delta_j \left[ 1\right] 1146 \right\} \quad \equiv 0 1147 \\ 1152 \right\} \quad \equiv 0 1153 \\ 1148 1154 \end{flalign*} 1149 1155 … … 1156 1162 The lateral momentum diffusion term dissipates the horizontal kinetic energy: 1157 1163 %\begin{flalign*} 1158 \ begin{equation*}1159 \begin{split}1160 \int_D \textbf{U}_h \cdot 1161 \left[ \nabla_h \right. & \left. \left( A^{\,lm}\;\chi \right) 1162 1163 \\ %%%1164 \equiv& \sum\limits_{i,j,k} 1165 1166 1167 1168 1169 &\;\; + \left\{1170 \frac{1} {e_{2u}} \delta_{j+1/2} \left[ A_T^{\,lm} \chi \right] 1171 + \frac{1} {e_{1v}\,e_{3v}} \delta_i \left[ A_f^{\,lm} e_{3f} \zeta \right] 1172 \right\} \; e_{1v}\,e_{2u}\,e_{3v} \;v \qquad \\ 1173 \\ %%%1174 \equiv& \sum\limits_{i,j,k} 1175 1176 1177 1178 \Bigl\} 1179 \\ 1180 &\;\; + \Bigl\{1181 1182 1183 \Bigl\} \\ 1184 \\ %%%1185 \equiv& \sum\limits_{i,j,k} 1186 1187 1188 + \delta_j \left[ e_{1v}\,e_{3v} \;v \right] 1189 \Bigr) \; A_T^{\,lm} \chi \\ 1190 &\;\; - \Bigl(1191 1192 - \delta_{j+1/2} \left[ e_{1u} \;u \right] 1193 \Bigr)\; A_f^{\,lm} e_{3f} \zeta \\ 1194 \\ %%%1195 \equiv& \sum\limits_{i,j,k} 1196 1197 - A_f ^{\,lm} \,\zeta^2 \;e_{1f }\,e_{2f }\,e_{3f} 1198 \quad \leq 0 \\1199 \end{split}1200 \ end{equation*}1164 \[ 1165 \begin{split} 1166 \int_D \textbf{U}_h \cdot 1167 \left[ \nabla_h \right. & \left. \left( A^{\,lm}\;\chi \right) 1168 - \nabla_h \times \left( A^{\,lm}\;\zeta \;\textbf{k} \right) \right] \; dv \\ 1169 \\ %%% 1170 \equiv& \sum\limits_{i,j,k} 1171 \left\{ 1172 \frac{1} {e_{1u}} \delta_{i+1/2} \left[ A_T^{\,lm} \chi \right] 1173 - \frac{1} {e_{2u}\,e_{3u}} \delta_j \left[ A_f^{\,lm} e_{3f} \zeta \right] 1174 \right\} \; e_{1u}\,e_{2u}\,e_{3u} \;u \\ 1175 &\;\; + \left\{ 1176 \frac{1} {e_{2u}} \delta_{j+1/2} \left[ A_T^{\,lm} \chi \right] 1177 + \frac{1} {e_{1v}\,e_{3v}} \delta_i \left[ A_f^{\,lm} e_{3f} \zeta \right] 1178 \right\} \; e_{1v}\,e_{2u}\,e_{3v} \;v \qquad \\ 1179 \\ %%% 1180 \equiv& \sum\limits_{i,j,k} 1181 \Bigl\{ 1182 e_{2u}\,e_{3u} \;u\; \delta_{i+1/2} \left[ A_T^{\,lm} \chi \right] 1183 - e_{1u} \;u\; \delta_j \left[ A_f^{\,lm} e_{3f} \zeta \right] 1184 \Bigl\} 1185 \\ 1186 &\;\; + \Bigl\{ 1187 e_{1v}\,e_{3v} \;v\; \delta_{j+1/2} \left[ A_T^{\,lm} \chi \right] 1188 + e_{2v} \;v\; \delta_i \left[ A_f^{\,lm} e_{3f} \zeta \right] 1189 \Bigl\} \\ 1190 \\ %%% 1191 \equiv& \sum\limits_{i,j,k} 1192 - \Bigl( 1193 \delta_i \left[ e_{2u}\,e_{3u} \;u \right] 1194 + \delta_j \left[ e_{1v}\,e_{3v} \;v \right] 1195 \Bigr) \; A_T^{\,lm} \chi \\ 1196 &\;\; - \Bigl( 1197 \delta_{i+1/2} \left[ e_{2v} \;v \right] 1198 - \delta_{j+1/2} \left[ e_{1u} \;u \right] 1199 \Bigr)\; A_f^{\,lm} e_{3f} \zeta \\ 1200 \\ %%% 1201 \equiv& \sum\limits_{i,j,k} 1202 - A_T^{\,lm} \,\chi^2 \;e_{1t}\,e_{2t}\,e_{3t} 1203 - A_f ^{\,lm} \,\zeta^2 \;e_{1f }\,e_{2f }\,e_{3f} 1204 \quad \leq 0 \\ 1205 \end{split} 1206 \] 1201 1207 1202 1208 % ------------------------------------------------------------------------------------------------------------- … … 1208 1214 The lateral momentum diffusion term dissipates the enstrophy when the eddy coefficients are horizontally uniform: 1209 1215 \begin{flalign*} 1210 &\int\limits_D \zeta \; \textbf{k} \cdot \nabla \times 1211 1212 1213 &\quad = A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times 1214 1215 &\quad \equiv A^{\,lm} \sum\limits_{i,j,k} \zeta \;e_{3f} 1216 1217 + \delta_{j+1/2} \left[ \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ e_{3f} \zeta \right] \right] \right\} &&&\\ 1218 %1219 \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}1220 %1221 &\quad \equiv - A^{\,lm} \sum\limits_{i,j,k} 1222 1223 1216 &\int\limits_D \zeta \; \textbf{k} \cdot \nabla \times 1217 \left[ \nabla_h \left( A^{\,lm}\;\chi \right) 1218 - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right) \right]\;dv &&&\\ 1219 &\quad = A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times 1220 \left[ \nabla_h \times \left( \zeta \; \textbf{k} \right) \right]\;dv &&&\\ 1221 &\quad \equiv A^{\,lm} \sum\limits_{i,j,k} \zeta \;e_{3f} 1222 \left\{ \delta_{i+1/2} \left[ \frac{e_{2v}} {e_{1v}\,e_{3v}} \delta_i \left[ e_{3f} \zeta \right] \right] 1223 + \delta_{j+1/2} \left[ \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ e_{3f} \zeta \right] \right] \right\} &&&\\ 1224 % 1225 \intertext{Using \autoref{eq:DOM_di_adj}, it follows:} 1226 % 1227 &\quad \equiv - A^{\,lm} \sum\limits_{i,j,k} 1228 \left\{ \left( \frac{1} {e_{1v}\,e_{3v}} \delta_i \left[ e_{3f} \zeta \right] \right)^2 b_v 1229 + \left( \frac{1} {e_{2u}\,e_{3u}} \delta_j \left[ e_{3f} \zeta \right] \right)^2 b_u \right\} \quad \leq \;0 &&&\\ 1224 1230 \end{flalign*} 1225 1231 … … 1234 1240 The resulting term conserves the $\chi$ and dissipates $\chi^2$ when the eddy coefficients are horizontally uniform. 1235 1241 \begin{flalign*} 1236 & \int\limits_D \nabla_h \cdot 1237 1238 1239 = \int\limits_D \nabla_h \cdot \nabla_h \left( A^{\,lm}\;\chi \right) dv \\1240 %1241 &\equiv \sum\limits_{i,j,k} 1242 1243 + \delta_j \left[ A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2} \left[ \chi \right] \right] \right\} \\ 1244 %1245 \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}1246 %1247 &\equiv \sum\limits_{i,j,k} 1248 - \left\{ \frac{e_{2u}\,e_{3u}} {e_{1u}} A_u^{\,lm} \delta_{i+1/2} \left[ \chi \right] \delta_{i+1/2} \left[ 1 \right] 1249 + \frac{e_{1v}\,e_{3v}} {e_{2v}} A_v^{\,lm} \delta_{j+1/2} \left[ \chi \right] \delta_{j+1/2} \left[ 1 \right] \right\} 1250 \quad \equiv 0 \\ 1242 & \int\limits_D \nabla_h \cdot 1243 \Bigl[ \nabla_h \left( A^{\,lm}\;\chi \right) 1244 - \nabla_h \times \left( A^{\,lm}\;\zeta \;\textbf{k} \right) \Bigr] dv 1245 = \int\limits_D \nabla_h \cdot \nabla_h \left( A^{\,lm}\;\chi \right) dv \\ 1246 % 1247 &\equiv \sum\limits_{i,j,k} 1248 \left\{ \delta_i \left[ A_u^{\,lm} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} \left[ \chi \right] \right] 1249 + \delta_j \left[ A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2} \left[ \chi \right] \right] \right\} \\ 1250 % 1251 \intertext{Using \autoref{eq:DOM_di_adj}, it follows:} 1252 % 1253 &\equiv \sum\limits_{i,j,k} 1254 - \left\{ \frac{e_{2u}\,e_{3u}} {e_{1u}} A_u^{\,lm} \delta_{i+1/2} \left[ \chi \right] \delta_{i+1/2} \left[ 1 \right] 1255 + \frac{e_{1v}\,e_{3v}} {e_{2v}} A_v^{\,lm} \delta_{j+1/2} \left[ \chi \right] \delta_{j+1/2} \left[ 1 \right] \right\} 1256 \quad \equiv 0 1251 1257 \end{flalign*} 1252 1258 … … 1258 1264 1259 1265 \begin{flalign*} 1260 &\int\limits_D \chi \;\nabla_h \cdot 1261 1262 1263 = A^{\,lm} \int\limits_D \chi \;\nabla_h \cdot \nabla_h \left( \chi \right)\; dv \\1264 %1265 &\equiv A^{\,lm} \sum\limits_{i,j,k} \frac{1} {e_{1t}\,e_{2t}\,e_{3t}} \chi 1266 1267 1268 1269 \right\} \; e_{1t}\,e_{2t}\,e_{3t} \\ 1270 %1271 \intertext{Using \autoref{eq:DOM_di_adj}, it turns out to be:}1272 %1273 &\equiv - A^{\,lm} \sum\limits_{i,j,k}1274 1275 + \left( \frac{1} {e_{2v}} \delta_{j+1/2} \left[ \chi \right] \right)^2 b_v \right\}1276 \quad \leq 0 \\ 1266 &\int\limits_D \chi \;\nabla_h \cdot 1267 \left[ \nabla_h \left( A^{\,lm}\;\chi \right) 1268 - \nabla_h \times \left( A^{\,lm}\;\zeta \;\textbf{k} \right) \right]\; dv 1269 = A^{\,lm} \int\limits_D \chi \;\nabla_h \cdot \nabla_h \left( \chi \right)\; dv \\ 1270 % 1271 &\equiv A^{\,lm} \sum\limits_{i,j,k} \frac{1} {e_{1t}\,e_{2t}\,e_{3t}} \chi 1272 \left\{ 1273 \delta_i \left[ \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} \left[ \chi \right] \right] 1274 + \delta_j \left[ \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2} \left[ \chi \right] \right] 1275 \right\} \; e_{1t}\,e_{2t}\,e_{3t} \\ 1276 % 1277 \intertext{Using \autoref{eq:DOM_di_adj}, it turns out to be:} 1278 % 1279 &\equiv - A^{\,lm} \sum\limits_{i,j,k} 1280 \left\{ \left( \frac{1} {e_{1u}} \delta_{i+1/2} \left[ \chi \right] \right)^2 b_u 1281 + \left( \frac{1} {e_{2v}} \delta_{j+1/2} \left[ \chi \right] \right)^2 b_v \right\} 1282 \quad \leq 0 1277 1283 \end{flalign*} 1278 1284 … … 1287 1293 The first two are associated with the conservation of momentum and the dissipation of horizontal kinetic energy: 1288 1294 \begin{align*} 1289 \int\limits_D \frac{1} {e_3 }\; \frac{\partial } {\partial k}1290 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right)\; dv1291 \qquad \quad &= \vec{\textbf{0}} \\ 1292 %1293 \intertext{and}1294 %1295 \int\limits_D 1296 1297 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right)\; dv \quad &\leq 0 \\ 1295 \int\limits_D \frac{1} {e_3 }\; \frac{\partial } {\partial k} 1296 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right)\; dv 1297 \qquad \quad &= \vec{\textbf{0}} 1298 % 1299 \intertext{and} 1300 % 1301 \int\limits_D 1302 \textbf{U}_h \cdot \frac{1} {e_3 }\; \frac{\partial } {\partial k} 1303 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right)\; dv \quad &\leq 0 1298 1304 \end{align*} 1299 1305 … … 1301 1307 The second results from: 1302 1308 \begin{flalign*} 1303 \int\limits_D 1304 1305 1306 \end{flalign*} 1307 \begin{flalign*} 1308 &\equiv \sum\limits_{i,j,k} 1309 \left( 1310 u\; \delta_k \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} \left[ u \right] \right]\; e_{1u}\,e_{2u} 1311 + v\; \delta_k \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} \left[ v \right] \right]\; e_{1v}\,e_{2v} \right) &&&\\ 1312 %1313 \intertext{since the horizontal scale factor does not depend on $k$, it follows:}1314 %1315 &\equiv - \sum\limits_{i,j,k} 1316 \left( \frac{A_u^{\,vm}} {e_{3uw}} \left( \delta_{k+1/2} \left[ u \right] \right)^2\; e_{1u}\,e_{2u} 1317 1318 \quad \leq 0 &&&\\ 1309 \int\limits_D 1310 \textbf{U}_h \cdot \frac{1} {e_3 }\; \frac{\partial } {\partial k} 1311 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right)\;dv &&&\\ 1312 \end{flalign*} 1313 \begin{flalign*} 1314 &\equiv \sum\limits_{i,j,k} 1315 \left( 1316 u\; \delta_k \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} \left[ u \right] \right]\; e_{1u}\,e_{2u} 1317 + v\; \delta_k \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} \left[ v \right] \right]\; e_{1v}\,e_{2v} \right) &&& 1318 % 1319 \intertext{since the horizontal scale factor does not depend on $k$, it follows:} 1320 % 1321 &\equiv - \sum\limits_{i,j,k} 1322 \left( \frac{A_u^{\,vm}} {e_{3uw}} \left( \delta_{k+1/2} \left[ u \right] \right)^2\; e_{1u}\,e_{2u} 1323 + \frac{A_v^{\,vm}} {e_{3vw}} \left( \delta_{k+1/2} \left[ v \right] \right)^2\; e_{1v}\,e_{2v} \right) 1324 \quad \leq 0 &&& 1319 1325 \end{flalign*} 1320 1326 … … 1322 1328 Indeed: 1323 1329 \begin{flalign*} 1324 \int \limits_D 1325 \frac{1} {e_3 } \textbf{k} \cdot \nabla \times 1326 \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k} \left( 1327 \frac{A^{\,vm}} {e_3}\; \frac{\partial \textbf{U}_h } {\partial k} 1328 \right) \right)\; dv &&&\\ 1329 \end{flalign*} 1330 \begin{flalign*} 1331 \equiv \sum\limits_{i,j,k} \frac{1} {e_{3f}}\; \frac{1} {e_{1f}\,e_{2f}}1332 1333 \delta_{i+1/2} 1334 1335 \biggl. 1336 - \delta_{j+1/2} 1337 1338 1339 e_{1f}\,e_{2f}\,e_{3f} \; \equiv 0 && \\ 1330 \int \limits_D 1331 \frac{1} {e_3 } \textbf{k} \cdot \nabla \times 1332 \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k} \left( 1333 \frac{A^{\,vm}} {e_3}\; \frac{\partial \textbf{U}_h } {\partial k} 1334 \right) \right)\; dv &&& 1335 \end{flalign*} 1336 \begin{flalign*} 1337 \equiv \sum\limits_{i,j,k} \frac{1} {e_{3f}}\; \frac{1} {e_{1f}\,e_{2f}} 1338 \bigg\{ \biggr. \quad 1339 \delta_{i+1/2} 1340 &\left( \frac{e_{2v}} {e_{3v}} \delta_k \left[ \frac{1} {e_{3vw}} \delta_{k+1/2} \left[ v \right] \right] \right) &&\\ 1341 \biggl. 1342 - \delta_{j+1/2} 1343 &\left( \frac{e_{1u}} {e_{3u}} \delta_k \left[ \frac{1} {e_{3uw}}\delta_{k+1/2} \left[ u \right] \right] \right) 1344 \biggr\} \; 1345 e_{1f}\,e_{2f}\,e_{3f} \; \equiv 0 && 1340 1346 \end{flalign*} 1341 1347 1342 1348 If the vertical diffusion coefficient is uniform over the whole domain, the enstrophy is dissipated, $i.e.$ 1343 1349 \begin{flalign*} 1344 \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times 1345 1346 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0 &&&\\ 1350 \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times 1351 \left( \frac{1} {e_3}\; \frac{\partial } {\partial k} 1352 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0 &&& 1347 1353 \end{flalign*} 1348 1354 1349 1355 This property is only satisfied in $z$-coordinates: 1350 1356 \begin{flalign*} 1351 \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times 1352 1353 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv &&& \\ 1354 \end{flalign*} 1355 \begin{flalign*} 1356 \equiv \sum\limits_{i,j,k} \zeta \;e_{3f} \;1357 1358 \delta_{i+1/2} 1359 1360 - \delta_{j+1/2} 1361 1362 \left( \frac{e_{1u}} {e_{3u}} \delta_k \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} [u] \right] \right) \biggr\} &&\\ 1363 \end{flalign*} 1364 \begin{flalign*} 1365 \equiv \sum\limits_{i,j,k} \zeta \;e_{3f} 1366 1367 \frac{1} {e_{3v}} \delta_k 1368 &\left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} \left[ \delta_{i+1/2} \left[ e_{2v}\,v \right] \right] \right] &&\\ 1369 \biggl.1370 - \frac{1} {e_{3u}} \delta_k 1371 &\left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} \left[ \delta_{j+1/2} \left[ e_{1u}\,u \right] \right] \right] \biggr\} &&\\ 1357 \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times 1358 \left( \frac{1} {e_3}\; \frac{\partial } {\partial k} 1359 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv &&& 1360 \end{flalign*} 1361 \begin{flalign*} 1362 \equiv \sum\limits_{i,j,k} \zeta \;e_{3f} \; 1363 \biggl\{ \biggr. \quad 1364 \delta_{i+1/2} 1365 &\left( \frac{e_{2v}} {e_{3v}} \delta_k \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2}[v] \right] \right) &&\\ 1366 - \delta_{j+1/2} 1367 &\biggl. 1368 \left( \frac{e_{1u}} {e_{3u}} \delta_k \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} [u] \right] \right) \biggr\} && 1369 \end{flalign*} 1370 \begin{flalign*} 1371 \equiv \sum\limits_{i,j,k} \zeta \;e_{3f} 1372 \biggl\{ \biggr. \quad 1373 \frac{1} {e_{3v}} \delta_k 1374 &\left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} \left[ \delta_{i+1/2} \left[ e_{2v}\,v \right] \right] \right] &&\\ 1375 \biggl. 1376 - \frac{1} {e_{3u}} \delta_k 1377 &\left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} \left[ \delta_{j+1/2} \left[ e_{1u}\,u \right] \right] \right] \biggr\} && 1372 1378 \end{flalign*} 1373 1379 Using the fact that the vertical diffusion coefficients are uniform, … … 1375 1381 $e_{3f} =e_{3u} =e_{3v} =e_{3t} $ and $e_{3w} =e_{3uw} =e_{3vw} $, it follows: 1376 1382 \begin{flalign*} 1377 \equiv A^{\,vm} \sum\limits_{i,j,k} \zeta \;\delta_k 1378 1379 - \delta_{j+1/ 2} \left[ e_{1u}\,u \right] \Bigr] \right] &&&\\ 1380 \end{flalign*} 1381 \begin{flalign*} 1382 \equiv - A^{\,vm} \sum\limits_{i,j,k} \frac{1} {e_{3w}}1383 \left( \delta_{k+1/2} \left[ \zeta \right] \right)^2 \; e_{1f}\,e_{2f} \; \leq 0 &&&\\ 1383 \equiv A^{\,vm} \sum\limits_{i,j,k} \zeta \;\delta_k 1384 \left[ \frac{1} {e_{3w}} \delta_{k+1/2} \Bigl[ \delta_{i+1/2} \left[ e_{2v}\,v \right] 1385 - \delta_{j+1/ 2} \left[ e_{1u}\,u \right] \Bigr] \right] &&& 1386 \end{flalign*} 1387 \begin{flalign*} 1388 \equiv - A^{\,vm} \sum\limits_{i,j,k} \frac{1} {e_{3w}} 1389 \left( \delta_{k+1/2} \left[ \zeta \right] \right)^2 \; e_{1f}\,e_{2f} \; \leq 0 &&& 1384 1390 \end{flalign*} 1385 1391 Similarly, the horizontal divergence is obviously conserved: 1386 1392 1387 1393 \begin{flalign*} 1388 \int\limits_D \nabla \cdot 1389 \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}1390 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0 &&&\\ 1394 \int\limits_D \nabla \cdot 1395 \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k} 1396 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0 &&& 1391 1397 \end{flalign*} 1392 1398 and the square of the horizontal divergence decreases ($i.e.$ the horizontal divergence is dissipated) if … … 1394 1400 1395 1401 \begin{flalign*} 1396 \int\limits_D \chi \;\nabla \cdot 1397 \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}1398 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0 &&&\\ 1402 \int\limits_D \chi \;\nabla \cdot 1403 \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k} 1404 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0 &&& 1399 1405 \end{flalign*} 1400 1406 This property is only satisfied in the $z$-coordinate: 1401 1407 \begin{flalign*} 1402 \int\limits_D \chi \;\nabla \cdot 1403 \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}1404 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv &&&\\ 1405 \end{flalign*} 1406 \begin{flalign*} 1407 \equiv \sum\limits_{i,j,k} \frac{\chi } {e_{1t}\,e_{2t}}1408 1409 \delta_{i+1/2} 1410 &\left( \frac{e_{2u}} {e_{3u}} \delta_k 1411 \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} [u] \right] \right) &&\\ 1412 \Biggl.1413 + \delta_{j+1/2} 1414 &\left( \frac{e_{1v}} {e_{3v}} \delta_k 1415 1416 \Biggr\} \; e_{1t}\,e_{2t}\,e_{3t} &&\\ 1417 \end{flalign*} 1418 1419 \begin{flalign*} 1420 \equiv A^{\,vm} \sum\limits_{i,j,k} \chi \,1421 1422 1423 &\left( 1424 \delta_k \left[ 1425 \frac{1} {e_{3uw}} \delta_{k+1/2} \left[ e_{2u}\,u \right] \right] \right) && \\ 1426 \biggl. 1427 + \delta_{j+1/2} 1428 &\left( \delta_k \left[ 1429 \frac{1} {e_{3vw}} \delta_{k+1/2} \left[ e_{1v}\,v \right] \right] \right) \biggr\} && \\ 1430 \end{flalign*} 1431 1432 \begin{flalign*} 1433 \equiv -A^{\,vm} \sum\limits_{i,j,k} 1434 \frac{\delta_{k+1/2} \left[ \chi \right]} {e_{3w}}\; \biggl\{ 1435 1436 1437 + \delta_{j+1/2} \left[ e_{1v}\,v \right] \Bigr] \biggr\} &&&\\ 1438 \end{flalign*} 1439 1440 \begin{flalign*} 1441 \equiv -A^{\,vm} \sum\limits_{i,j,k}1442 \frac{1} {e_{3w}} \delta_{k+1/2} \left[ \chi \right]\; \delta_{k+1/2} \left[ e_{1t}\,e_{2t} \;\chi \right] &&&\\1443 \end{flalign*} 1444 1445 \begin{flalign*} 1446 \equiv -A^{\,vm} \sum\limits_{i,j,k} 1447 \frac{e_{1t}\,e_{2t}} {e_{3w}}\; \left( \delta_{k+1/2} \left[ \chi \right] \right)^2 \quad \equiv 0 &&&\\ 1408 \int\limits_D \chi \;\nabla \cdot 1409 \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k} 1410 \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv &&& 1411 \end{flalign*} 1412 \begin{flalign*} 1413 \equiv \sum\limits_{i,j,k} \frac{\chi } {e_{1t}\,e_{2t}} 1414 \biggl\{ \Biggr. \quad 1415 \delta_{i+1/2} 1416 &\left( \frac{e_{2u}} {e_{3u}} \delta_k 1417 \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} [u] \right] \right) &&\\ 1418 \Biggl. 1419 + \delta_{j+1/2} 1420 &\left( \frac{e_{1v}} {e_{3v}} \delta_k 1421 \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} [v] \right] \right) 1422 \Biggr\} \; e_{1t}\,e_{2t}\,e_{3t} && 1423 \end{flalign*} 1424 1425 \begin{flalign*} 1426 \equiv A^{\,vm} \sum\limits_{i,j,k} \chi \, 1427 \biggl\{ \biggr. \quad 1428 \delta_{i+1/2} 1429 &\left( 1430 \delta_k \left[ 1431 \frac{1} {e_{3uw}} \delta_{k+1/2} \left[ e_{2u}\,u \right] \right] \right) && \\ 1432 \biggl. 1433 + \delta_{j+1/2} 1434 &\left( \delta_k \left[ 1435 \frac{1} {e_{3vw}} \delta_{k+1/2} \left[ e_{1v}\,v \right] \right] \right) \biggr\} && 1436 \end{flalign*} 1437 1438 \begin{flalign*} 1439 \equiv -A^{\,vm} \sum\limits_{i,j,k} 1440 \frac{\delta_{k+1/2} \left[ \chi \right]} {e_{3w}}\; \biggl\{ 1441 \delta_{k+1/2} \Bigl[ 1442 \delta_{i+1/2} \left[ e_{2u}\,u \right] 1443 + \delta_{j+1/2} \left[ e_{1v}\,v \right] \Bigr] \biggr\} &&& 1444 \end{flalign*} 1445 1446 \begin{flalign*} 1447 \equiv -A^{\,vm} \sum\limits_{i,j,k} 1448 \frac{1} {e_{3w}} \delta_{k+1/2} \left[ \chi \right]\; \delta_{k+1/2} \left[ e_{1t}\,e_{2t} \;\chi \right] &&& 1449 \end{flalign*} 1450 1451 \begin{flalign*} 1452 \equiv -A^{\,vm} \sum\limits_{i,j,k} 1453 \frac{e_{1t}\,e_{2t}} {e_{3w}}\; \left( \delta_{k+1/2} \left[ \chi \right] \right)^2 \quad \equiv 0 &&& 1448 1454 \end{flalign*} 1449 1455 … … 1468 1474 constraint of conservation of tracers: 1469 1475 \begin{flalign*} 1470 &\int\limits_D \nabla \cdot \left( A\;\nabla T \right)\;dv &&&\\ 1471 \\ 1472 &\equiv \sum\limits_{i,j,k} 1473 \biggl\{ \biggr. 1474 \delta_i 1475 \left[ 1476 A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} 1477 \left[ T \right] 1478 \right] 1479 + \delta_j 1480 \left[ 1481 A_v^{\,lT} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2} 1482 \left[ T \right] 1483 \right] 1484 &&\\ & \qquad \qquad \qquad \qquad \qquad \qquad \quad \;\;\; 1485 + \delta_k 1486 \left[ 1487 A_w^{\,vT} \frac{e_{1t}\,e_{2t}} {e_{3t}} \delta_{k+1/2} 1488 \left[ T \right] 1489 \right] 1490 \biggr\} \quad \equiv 0 1491 &&\\ 1476 &\int\limits_D \nabla \cdot \left( A\;\nabla T \right)\;dv &&& \\ \\ 1477 &\equiv \sum\limits_{i,j,k} 1478 \biggl\{ \biggr. 1479 \delta_i 1480 \left[ 1481 A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} 1482 \left[ T \right] 1483 \right] 1484 + \delta_j 1485 \left[ 1486 A_v^{\,lT} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2} 1487 \left[ T \right] 1488 \right] && \\ 1489 & \qquad \qquad \qquad \qquad \qquad \qquad \quad \;\;\; 1490 + \delta_k 1491 \left[ 1492 A_w^{\,vT} \frac{e_{1t}\,e_{2t}} {e_{3t}} \delta_{k+1/2} 1493 \left[ T \right] 1494 \right] 1495 \biggr\} \quad \equiv 0 1496 && 1492 1497 \end{flalign*} 1493 1498 … … 1502 1507 constraint on the dissipation of tracer variance: 1503 1508 \begin{flalign*} 1504 \int\limits_D T\;\nabla & \cdot \left( A\;\nabla T \right)\;dv &&&\\ 1505 &\equiv \sum\limits_{i,j,k} \; T 1506 \biggl\{ \biggr. 1507 \delta_i \left[ A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} \left[T\right] \right] 1508 & + \delta_j \left[ A_v^{\,lT} \frac{e_{1v} \,e_{3v}} {e_{2v}} \delta_{j+1/2} \left[T\right] \right] 1509 \quad&& \\ 1510 \biggl. 1511 &&+ \delta_k \left[A_w^{\,vT}\frac{e_{1t}\,e_{2t}} {e_{3t}}\delta_{k+1/2}\left[T\right]\right] 1512 \biggr\} && 1513 \end{flalign*} 1514 \begin{flalign*} 1515 \equiv - \sum\limits_{i,j,k} 1516 \biggl\{ \biggr. \quad 1517 & A_u^{\,lT} \left( \frac{1} {e_{1u}} \delta_{i+1/2} \left[ T \right] \right)^2 e_{1u}\,e_{2u}\,e_{3u} && \\ 1518 & + A_v^{\,lT} \left( \frac{1} {e_{2v}} \delta_{j+1/2} \left[ T \right] \right)^2 e_{1v}\,e_{2v}\,e_{3v} && \\ \biggl. 1519 & + A_w^{\,vT} \left( \frac{1} {e_{3w}} \delta_{k+1/2} \left[ T \right] \right)^2 e_{1w}\,e_{2w}\,e_{3w} \biggr\} 1520 \quad \leq 0 && \\ 1521 \end{flalign*} 1522 1509 \int\limits_D T\;\nabla & \cdot \left( A\;\nabla T \right)\;dv &&&\\ 1510 &\equiv \sum\limits_{i,j,k} \; T 1511 \biggl\{ \biggr. 1512 \delta_i \left[ A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} \left[T\right] \right] 1513 & + \delta_j \left[ A_v^{\,lT} \frac{e_{1v} \,e_{3v}} {e_{2v}} \delta_{j+1/2} \left[T\right] \right] 1514 \quad&& \\ 1515 \biggl. 1516 &&+ \delta_k \left[A_w^{\,vT}\frac{e_{1t}\,e_{2t}} {e_{3t}}\delta_{k+1/2}\left[T\right]\right] 1517 \biggr\} && 1518 \end{flalign*} 1519 \begin{flalign*} 1520 \equiv - \sum\limits_{i,j,k} 1521 \biggl\{ \biggr. \quad 1522 & A_u^{\,lT} \left( \frac{1} {e_{1u}} \delta_{i+1/2} \left[ T \right] \right)^2 e_{1u}\,e_{2u}\,e_{3u} && \\ 1523 & + A_v^{\,lT} \left( \frac{1} {e_{2v}} \delta_{j+1/2} \left[ T \right] \right)^2 e_{1v}\,e_{2v}\,e_{3v} && \\ \biggl. 1524 & + A_w^{\,vT} \left( \frac{1} {e_{3w}} \delta_{k+1/2} \left[ T \right] \right)^2 e_{1w}\,e_{2w}\,e_{3w} \biggr\} 1525 \quad \leq 0 && 1526 \end{flalign*} 1523 1527 1524 1528 %%%% end of appendix in gm comment 1525 1529 %} 1530 \biblio 1531 1526 1532 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/annex_D.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ 4 % Appendix D ÑCoding Rules5 % Appendix D Coding Rules 5 6 % ================================================================ 6 7 \chapter{Coding Rules} 7 8 \label{apdx:D} 9 8 10 \minitoc 9 11 10 12 \newpage 11 $\ $\newline % force a new ligne12 $\ $\newline % force a new ligne13 14 13 15 14 A "model life" is more than ten years. … … 102 101 - use call to ctl\_stop routine instead of just a STOP. 103 102 104 105 103 \newpage 104 106 105 % ================================================================ 107 106 % Naming Conventions … … 116 115 117 116 %--------------------------------------------------TABLE-------------------------------------------------- 118 \begin{table}[htbp] \label{tab:VarName} 119 \begin{center} 120 \begin{tabular}{|p{45pt}|p{35pt}|p{45pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|} 121 \hline Type \par / Status & integer& real& logical & character & structure & double \par precision& complex \\ 122 \hline 123 public \par or \par module variable& 124 \textbf{m n} \par \textit{but not} \par \textbf{nn\_ np\_}& 125 \textbf{a b e f g h o q r} \par \textbf{t} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_}& 126 \textbf{l} \par \textit{but not} \par \textbf{lp ld} \par \textbf{ ll ln\_}& 127 \textbf{c} \par \textit{but not} \par \textbf{cp cd} \par \textbf{cl cn\_}& 128 \textbf{s} \par \textit{but not} \par \textbf{sd sd} \par \textbf{sl sn\_}& 129 \textbf{d} \par \textit{but not} \par \textbf{dp dd} \par \textbf{dl dn\_}& 130 \textbf{y} \par \textit{but not} \par \textbf{yp yd} \par \textbf{yl yn} \\ 131 \hline 132 dummy \par argument& 133 \textbf{k} \par \textit{but not} \par \textbf{kf}& 134 \textbf{p} \par \textit{but not} \par \textbf{pp pf}& 135 \textbf{ld}& 136 \textbf{cd}& 137 \textbf{sd}& 138 \textbf{dd}& 139 \textbf{yd} \\ 140 \hline 141 local \par variable& 142 \textbf{i}& 143 \textbf{z}& 144 \textbf{ll}& 145 \textbf{cl}& 146 \textbf{sl}& 147 \textbf{dl}& 148 \textbf{yl} \\ 149 \hline 150 loop \par control& 151 \textbf{j} \par \textit{but not} \par \textbf{jp}& 152 & 153 & 154 & 155 & 156 & 157 \\ 158 \hline 159 parameter& 160 \textbf{jp np\_}& 161 \textbf{pp}& 162 \textbf{lp}& 163 \textbf{cp}& 164 \textbf{sp}& 165 \textbf{dp}& 166 \textbf{yp} \\ 167 \hline 168 169 namelist& 170 \textbf{nn\_}& 171 \textbf{rn\_}& 172 \textbf{ln\_}& 173 \textbf{cn\_}& 174 \textbf{sn\_}& 175 \textbf{dn\_}& 176 \textbf{yn\_} 177 \\ 178 \hline 179 CPP \par macro& 180 \textbf{kf}& 181 \textbf{fs} \par & 182 & 183 & 184 & 185 & 186 \\ 187 \hline 188 \end{tabular} 189 \label{tab:tab1} 190 \end{center} 117 \begin{table}[htbp] 118 \label{tab:VarName} 119 \begin{center} 120 \begin{tabular}{|p{45pt}|p{35pt}|p{45pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|} 121 \hline 122 Type \par / Status 123 & integer 124 & real 125 & logical 126 & character 127 & structure 128 & double \par precision 129 & complex \\ 130 \hline 131 public \par or \par module variable 132 & \textbf{m n} \par \textit{but not} \par \textbf{nn\_ np\_} 133 & \textbf{a b e f g h o q r} \par \textbf{t} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_} 134 & \textbf{l} \par \textit{but not} \par \textbf{lp ld} \par \textbf{ ll ln\_} 135 & \textbf{c} \par \textit{but not} \par \textbf{cp cd} \par \textbf{cl cn\_} 136 & \textbf{s} \par \textit{but not} \par \textbf{sd sd} \par \textbf{sl sn\_} 137 & \textbf{d} \par \textit{but not} \par \textbf{dp dd} \par \textbf{dl dn\_} 138 & \textbf{y} \par \textit{but not} \par \textbf{yp yd} \par \textbf{yl yn} \\ 139 \hline 140 dummy \par argument 141 & \textbf{k} \par \textit{but not} \par \textbf{kf} 142 & \textbf{p} \par \textit{but not} \par \textbf{pp pf} 143 & \textbf{ld} 144 & \textbf{cd} 145 & \textbf{sd} 146 & \textbf{dd} 147 & \textbf{yd} \\ 148 \hline 149 local \par variable 150 & \textbf{i} 151 & \textbf{z} 152 & \textbf{ll} 153 & \textbf{cl} 154 & \textbf{sl} 155 & \textbf{dl} 156 & \textbf{yl} \\ 157 \hline 158 loop \par control 159 & \textbf{j} \par \textit{but not} \par \textbf{jp} &&&&&& \\ 160 \hline 161 parameter 162 & \textbf{jp np\_} 163 & \textbf{pp} 164 & \textbf{lp} 165 & \textbf{cp} 166 & \textbf{sp} 167 & \textbf{dp} 168 & \textbf{yp} \\ 169 \hline 170 namelist 171 & \textbf{nn\_} 172 & \textbf{rn\_} 173 & \textbf{ln\_} 174 & \textbf{cn\_} 175 & \textbf{sn\_} 176 & \textbf{dn\_} 177 & \textbf{yn\_} 178 \\ 179 \hline 180 CPP \par macro 181 & \textbf{kf} 182 & \textbf{fs} \par &&&&& \\ 183 \hline 184 \end{tabular} 185 \label{tab:tab1} 186 \end{center} 191 187 \end{table} 192 188 %-------------------------------------------------------------------------------------------------------------- … … 197 193 198 194 \newpage 195 199 196 % ================================================================ 200 197 % The program structure 201 198 % ================================================================ 202 199 %\section{Program structure} 203 % abel{sec:Apdx_D_structure}200 %\label{sec:Apdx_D_structure} 204 201 205 202 %To be done.... 203 \biblio 204 206 205 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/annex_E.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 6 7 \chapter{Note on some algorithms} 7 8 \label{apdx:E} 9 8 10 \minitoc 9 11 10 12 \newpage 11 $\ $\newline % force a new ligne12 13 13 14 This appendix some on going consideration on algorithms used or planned to be used in \NEMO. 14 15 $\ $\newline % force a new ligne16 15 17 16 % ------------------------------------------------------------------------------------------------------------- … … 25 24 It is also known as Cell Averaged QUICK scheme (Quadratic Upstream Interpolation for Convective Kinematics). 26 25 For example, in the $i$-direction: 27 \begin{equation} \label{eq:tra_adv_ubs2} 28 \tau _u^{ubs} = \left\{ \begin{aligned} 29 & \tau _u^{cen4} + \frac{1}{12} \,\tau"_i & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ 30 & \tau _u^{cen4} - \frac{1}{12} \,\tau"_{i+1} & \quad \text{if }\ u_{i+1/2} < 0 31 \end{aligned} \right. 26 \begin{equation} 27 \label{eq:tra_adv_ubs2} 28 \tau_u^{ubs} = \left\{ 29 \begin{aligned} 30 & \tau_u^{cen4} + \frac{1}{12} \,\tau"_i & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ 31 & \tau_u^{cen4} - \frac{1}{12} \,\tau"_{i+1} & \quad \text{if }\ u_{i+1/2} < 0 32 \end{aligned} 33 \right. 32 34 \end{equation} 33 35 or equivalently, the advective flux is 34 \begin{equation} \label{eq:tra_adv_ubs2} 35 U_{i+1/2} \ \tau _u^{ubs} 36 =U_{i+1/2} \ \overline{ T_i - \frac{1}{6}\,\tau"_i }^{\,i+1/2} 37 - \frac{1}{2}\, |U|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i] 36 \begin{equation} 37 \label{eq:tra_adv_ubs2} 38 U_{i+1/2} \ \tau_u^{ubs} 39 =U_{i+1/2} \ \overline{ T_i - \frac{1}{6}\,\tau"_i }^{\,i+1/2} 40 - \frac{1}{2}\, |U|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i] 38 41 \end{equation} 39 42 where $U_{i+1/2} = e_{1u}\,e_{3u}\,u_{i+1/2}$ and 40 $\tau "_i =\delta _i \left[ {\delta_{i+1/2} \left[ \tau \right]} \right]$.43 $\tau "_i =\delta_i \left[ {\delta_{i+1/2} \left[ \tau \right]} \right]$. 41 44 By choosing this expression for $\tau "$ we consider a fourth order approximation of $\partial_i^2$ with 42 45 a constant i-grid spacing ($\Delta i=1$). 43 46 44 47 Alternative choice: introduce the scale factors: 45 $\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta _i \left[ \frac{e_{2u} e_{3u} }{e_{1u} }\delta _{i+1/2}[\tau] \right]$. 46 48 $\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} }\delta_{i+1/2}[\tau] \right]$. 47 49 48 50 This results in a dissipatively dominant (i.e. hyper-diffusive) truncation error … … 76 78 77 79 NB 2: In a forthcoming release four options will be proposed for the vertical component used in the UBS scheme. 78 $\tau 80 $\tau_w^{ubs}$ will be evaluated using either \textit{(a)} a centered $2^{nd}$ order scheme, 79 81 or \textit{(b)} a TVD scheme, or \textit{(c)} an interpolation based on conservative parabolic splines following 80 82 \citet{Shchepetkin_McWilliams_OM05} implementation of UBS in ROMS, or \textit{(d)} an UBS. … … 82 84 83 85 NB 3: It is straight forward to rewrite \autoref{eq:tra_adv_ubs} as follows: 84 \begin{equation} \label{eq:tra_adv_ubs2} 85 \tau _u^{ubs} = \left\{ \begin{aligned} 86 & \tau _u^{cen4} + \frac{1}{12} \tau"_i & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ 87 & \tau _u^{cen4} - \frac{1}{12} \tau"_{i+1} & \quad \text{if }\ u_{i+1/2} < 0 88 \end{aligned} \right. 86 \begin{equation} 87 \label{eq:tra_adv_ubs2} 88 \tau_u^{ubs} = \left\{ 89 \begin{aligned} 90 & \tau_u^{cen4} + \frac{1}{12} \tau"_i & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ 91 & \tau_u^{cen4} - \frac{1}{12} \tau"_{i+1} & \quad \text{if }\ u_{i+1/2} < 0 92 \end{aligned} 93 \right. 89 94 \end{equation} 90 95 or equivalently 91 \begin{equation} \label{eq:tra_adv_ubs2} 92 \begin{split} 93 e_{2u} e_{3u}\,u_{i+1/2} \ \tau _u^{ubs} 94 &= e_{2u} e_{3u}\,u_{i+1/2} \ \overline{ T - \frac{1}{6}\,\tau"_i }^{\,i+1/2} \\ 95 & - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i] 96 \end{split} 96 \begin{equation} 97 \label{eq:tra_adv_ubs2} 98 \begin{split} 99 e_{2u} e_{3u}\,u_{i+1/2} \ \tau_u^{ubs} 100 &= e_{2u} e_{3u}\,u_{i+1/2} \ \overline{ T - \frac{1}{6}\,\tau"_i }^{\,i+1/2} \\ 101 & - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i] 102 \end{split} 97 103 \end{equation} 98 104 \autoref{eq:tra_adv_ubs2} has several advantages. … … 105 111 106 112 laplacian diffusion: 107 \begin{equation} \label{eq:tra_ldf_lap}108 \begin{split}109 D_T^{lT} =\frac{1}{e_{1T} \; e_{2T}\; e_{3T} } &\left[ {\quad \delta _i 110 \left[ {A_u^{lT} \frac{e_{2u} e_{3u} }{e_{1u} }\;\delta _{i+1/2} 111 \left[ T \right]} \right]} \right. 112 \\113 &\ \left. {+\; \delta _j \left[ 114 {A_v^{lT} \left( {\frac{e_{1v} e_{3v} }{e_{2v} }\;\delta _{j+1/2} \left[ T 115 \right]} \right)} \right]\quad } \right]116 \end{split}113 \begin{equation} 114 \label{eq:tra_ldf_lap} 115 \begin{split} 116 D_T^{lT} =\frac{1}{e_{1T} \; e_{2T}\; e_{3T} } &\left[ {\quad \delta_i 117 \left[ {A_u^{lT} \frac{e_{2u} e_{3u} }{e_{1u} }\;\delta_{i+1/2} 118 \left[ T \right]} \right]} \right. \\ 119 &\ \left. {+\; \delta_j \left[ 120 {A_v^{lT} \left( {\frac{e_{1v} e_{3v} }{e_{2v} }\;\delta_{j+1/2} \left[ T 121 \right]} \right)} \right]\quad } \right] 122 \end{split} 117 123 \end{equation} 118 124 119 125 bilaplacian: 120 \begin{equation} \label{eq:tra_ldf_lap} 121 \begin{split} 122 D_T^{lT} =&-\frac{1}{e_{1T} \; e_{2T}\; e_{3T}} \\ 123 & \delta _i \left[ \sqrt{A_u^{lT}}\ \frac{e_{2u}\,e_{3u}}{e_{1u}}\;\delta _{i+1/2} 124 \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}} 125 \delta _i \left[ \sqrt{A_u^{lT}}\ \frac{e_{2u}\,e_{3u}}{e_{1u}}\;\delta _{i+1/2} 126 [T] \right] \right] \right] 127 \end{split} 126 \begin{equation} 127 \label{eq:tra_ldf_lap} 128 \begin{split} 129 D_T^{lT} =&-\frac{1}{e_{1T} \; e_{2T}\; e_{3T}} \\ 130 & \delta_i \left[ \sqrt{A_u^{lT}}\ \frac{e_{2u}\,e_{3u}}{e_{1u}}\;\delta_{i+1/2} 131 \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}} 132 \delta_i \left[ \sqrt{A_u^{lT}}\ \frac{e_{2u}\,e_{3u}}{e_{1u}}\;\delta_{i+1/2} 133 [T] \right] \right] \right] 134 \end{split} 128 135 \end{equation} 129 136 with ${A_u^{lT}}^2 = \frac{1}{12} {e_{1u}}^3\ |u|$, 130 137 $i.e.$ $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$ 131 138 it comes: 132 \begin{equation} \label{eq:tra_ldf_lap} 133 \begin{split} 134 D_T^{lT} =&-\frac{1}{12}\,\frac{1}{e_{1T} \; e_{2T}\; e_{3T}} \\ 135 & \delta _i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}\,|u|\,}\;\delta _{i+1/2} 136 \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}} 137 \delta _i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}\,|u|\,}\;\delta _{i+1/2} 138 [T] \right] \right] \right] 139 \end{split} 139 \begin{equation} 140 \label{eq:tra_ldf_lap} 141 \begin{split} 142 D_T^{lT} =&-\frac{1}{12}\,\frac{1}{e_{1T} \; e_{2T}\; e_{3T}} \\ 143 & \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}\,|u|\,}\;\delta_{i+1/2} 144 \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}} 145 \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}\,|u|\,}\;\delta_{i+1/2} 146 [T] \right] \right] \right] 147 \end{split} 140 148 \end{equation} 141 149 if the velocity is uniform ($i.e.$ $|u|=cst$) then the diffusive flux is 142 \begin{equation} \label{eq:tra_ldf_lap} 143 \begin{split} 144 F_u^{lT} = - \frac{1}{12} 145 e_{2u}\,e_{3u}\,|u| \;\sqrt{ e_{1u}}\,\delta _{i+1/2} 146 \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}} 147 \delta _i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}}\:\delta _{i+1/2} 148 [T] \right] \right] 149 \end{split} 150 \begin{equation} 151 \label{eq:tra_ldf_lap} 152 \begin{split} 153 F_u^{lT} = - \frac{1}{12} 154 e_{2u}\,e_{3u}\,|u| \;\sqrt{ e_{1u}}\,\delta_{i+1/2} 155 \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}} 156 \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}}\:\delta_{i+1/2} 157 [T] \right] \right] 158 \end{split} 150 159 \end{equation} 151 160 beurk.... reverte the logic: starting from the diffusive part of the advective flux it comes: 152 161 153 \begin{equation} \label{eq:tra_adv_ubs2}154 \begin{split}155 F_u^{lT}156 &= - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i]157 \end{split}162 \begin{equation} 163 \label{eq:tra_adv_ubs2} 164 \begin{split} 165 F_u^{lT} &= - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i] 166 \end{split} 158 167 \end{equation} 159 168 if the velocity is uniform ($i.e.$ $|u|=cst$) and 160 choosing $\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta _i \left[ \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right]$169 choosing $\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right]$ 161 170 162 171 sol 1 coefficient at T-point ( add $e_{1u}$ and $e_{1T}$ on both side of first $\delta$): 163 \begin{equation} \label{eq:tra_adv_ubs2}164 \begin{split}165 F_u^{lT}166 &= - \frac{1}{12} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{e_{1T}^3\,|u|}{e_{1T}e_{2T}\,e_{3T}}\,\delta _i \left[ \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right] \right]167 \end{split}172 \begin{equation} 173 \label{eq:tra_adv_ubs2} 174 \begin{split} 175 F_u^{lT} &= - \frac{1}{12} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{e_{1T}^3\,|u|}{e_{1T}e_{2T}\,e_{3T}}\,\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right] \right] 176 \end{split} 168 177 \end{equation} 169 178 which leads to ${A_T^{lT}}^2 = \frac{1}{12} {e_{1T}}^3\ \overline{|u|}^{\,i+1/2}$ 170 179 171 180 sol 2 coefficient at u-point: split $|u|$ into $\sqrt{|u|}$ and $e_{1T}$ into $\sqrt{e_{1u}}$ 172 \begin{equation} \label{eq:tra_adv_ubs2}173 \begin{split}174 F_u^{lT}175 &= - \frac{1}{12} {e_{1u}}^1 \sqrt{e_{1u}|u|} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{1}{e_{2T}\,e_{3T}}\,\delta _i \left[ \sqrt{e_{1u}|u|} \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right] \right] \\176 &= - \frac{1}{12} e_{1u} \sqrt{e_{1u}|u|\,} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{1}{e_{1T}\,e_{2T}\,e_{3T}}\,\delta _i \left[ e_{1u} \sqrt{e_{1u}|u|\,} \frac{e_{2u} e_{3u} }{e_{1u}} \delta_{i+1/2}[\tau] \right] \right]177 \end{split}181 \begin{equation} 182 \label{eq:tra_adv_ubs2} 183 \begin{split} 184 F_u^{lT} &= - \frac{1}{12} {e_{1u}}^1 \sqrt{e_{1u}|u|} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{1}{e_{2T}\,e_{3T}}\,\delta_i \left[ \sqrt{e_{1u}|u|} \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right] \right] \\ 185 &= - \frac{1}{12} e_{1u} \sqrt{e_{1u}|u|\,} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{1}{e_{1T}\,e_{2T}\,e_{3T}}\,\delta_i \left[ e_{1u} \sqrt{e_{1u}|u|\,} \frac{e_{2u} e_{3u} }{e_{1u}} \delta_{i+1/2}[\tau] \right] \right] 186 \end{split} 178 187 \end{equation} 179 188 which leads to ${A_u^{lT}} = \frac{1}{12} {e_{1u}}^3\ |u|$ 180 181 189 182 190 % ------------------------------------------------------------------------------------------------------------- … … 189 197 Given the values of a variable $q$ at successive time step, 190 198 the time derivation and averaging operators at the mid time step are: 191 \begin{subequations} \label{eq:dt_mt} 192 \begin{align} 193 \delta _{t+\rdt/2} [q] &= \ \ \, q^{t+\rdt} - q^{t} \\ 194 \overline q^{\,t+\rdt/2} &= \left\{ q^{t+\rdt} + q^{t} \right\} \; / \; 2 195 \end{align} 196 \end{subequations} 199 \[ 200 % \label{eq:dt_mt} 201 \begin{split} 202 \delta_{t+\rdt/2} [q] &= \ \ \, q^{t+\rdt} - q^{t} \\ 203 \overline q^{\,t+\rdt/2} &= \left\{ q^{t+\rdt} + q^{t} \right\} \; / \; 2 204 \end{split} 205 \] 197 206 As for space operator, 198 207 the adjoint of the derivation and averaging time operators are $\delta_t^*=\delta_{t+\rdt/2}$ and … … 200 209 201 210 The Leap-frog time stepping given by \autoref{eq:DOM_nxt} can be defined as: 202 \begin{equation} \label{eq:LF} 203 \frac{\partial q}{\partial t} 204 \equiv \frac{1}{\rdt} \overline{ \delta _{t+\rdt/2}[q]}^{\,t} 205 = \frac{q^{t+\rdt}-q^{t-\rdt}}{2\rdt} 206 \end{equation} 211 \[ 212 % \label{eq:LF} 213 \frac{\partial q}{\partial t} 214 \equiv \frac{1}{\rdt} \overline{ \delta_{t+\rdt/2}[q]}^{\,t} 215 = \frac{q^{t+\rdt}-q^{t-\rdt}}{2\rdt} 216 \] 207 217 Note that \autoref{chap:LF} shows that the leapfrog time step is $\rdt$, 208 218 not $2\rdt$ as it can be found sometimes in literature. 209 219 The leap-Frog time stepping is a second order centered scheme. 210 220 As such it respects the quadratic invariant in integral forms, $i.e.$ the following continuous property, 211 \begin{equation} \label{eq:Energy} 212 \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt} 213 =\int_{t_0}^{t_1} {\frac{1}{2}\, \frac{\partial q^2}{\partial t} \;dt} 214 = \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right) , 215 \end{equation} 221 \[ 222 % \label{eq:Energy} 223 \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt} 224 =\int_{t_0}^{t_1} {\frac{1}{2}\, \frac{\partial q^2}{\partial t} \;dt} 225 = \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right) , 226 \] 216 227 is satisfied in discrete form. 217 228 Indeed, 218 \begin{equation} \begin{split} 219 \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt} 220 &\equiv \sum\limits_{0}^{N} 221 {\frac{1}{\rdt} q^t \ \overline{ \delta _{t+\rdt/2}[q]}^{\,t} \ \rdt} 222 \equiv \sum\limits_{0}^{N} { q^t \ \overline{ \delta _{t+\rdt/2}[q]}^{\,t} } \\ 223 &\equiv \sum\limits_{0}^{N} { \overline{q}^{\,t+\Delta/2}{ \delta _{t+\rdt/2}[q]}} 224 \equiv \sum\limits_{0}^{N} { \frac{1}{2} \delta _{t+\rdt/2}[q^2] }\\ 225 &\equiv \sum\limits_{0}^{N} { \frac{1}{2} \delta _{t+\rdt/2}[q^2] } 226 \equiv \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right) 227 \end{split} \end{equation} 229 \[ 230 \begin{split} 231 \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt} 232 &\equiv \sum\limits_{0}^{N} 233 {\frac{1}{\rdt} q^t \ \overline{ \delta_{t+\rdt/2}[q]}^{\,t} \ \rdt} 234 \equiv \sum\limits_{0}^{N} { q^t \ \overline{ \delta_{t+\rdt/2}[q]}^{\,t} } \\ 235 &\equiv \sum\limits_{0}^{N} { \overline{q}^{\,t+\Delta/2}{ \delta_{t+\rdt/2}[q]}} 236 \equiv \sum\limits_{0}^{N} { \frac{1}{2} \delta_{t+\rdt/2}[q^2] }\\ 237 &\equiv \sum\limits_{0}^{N} { \frac{1}{2} \delta_{t+\rdt/2}[q^2] } 238 \equiv \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right) 239 \end{split} 240 \] 228 241 NB here pb of boundary condition when applying the adjoint! 229 242 In space, setting to 0 the quantity in land area is sufficient to get rid of the boundary condition 230 243 (equivalently of the boundary value of the integration by part). 231 244 In time this boundary condition is not physical and \textbf{add something here!!!} 232 233 234 235 236 237 245 238 246 % ================================================================ … … 269 277 a derivative in the same direction by considering triads. 270 278 For example in the (\textbf{i},\textbf{k}) plane, the four triads are defined at the $(i,k)$ $T$-point as follows: 271 \begin{equation} \label{eq:Gf_triads} 272 _i^k \mathbb{T}_{i_p}^{k_p} (T) 273 = \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k} \ A_i^k \left( 274 \frac{ \delta_{i + i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} } 275 -\ {_i^k \mathbb{R}_{i_p}^{k_p}} \ \frac{ \delta_{k+k_p} [T^i] }{ {e_{3w}}_{\,i}^{\,k+k_p} } 276 \right) 279 \begin{equation} 280 \label{eq:Gf_triads} 281 _i^k \mathbb{T}_{i_p}^{k_p} (T) 282 = \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k} \ A_i^k \left( 283 \frac{ \delta_{i + i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} } 284 -\ {_i^k \mathbb{R}_{i_p}^{k_p}} \ \frac{ \delta_{k+k_p} [T^i] }{ {e_{3w}}_{\,i}^{\,k+k_p} } 285 \right) 277 286 \end{equation} 278 287 where the indices $i_p$ and $k_p$ define the four triads and take the following value: … … 281 290 $A_i^k$ is the lateral eddy diffusivity coefficient defined at $T$-point, 282 291 and $_i^k \mathbb{R}_{i_p}^{k_p}$ is the slope associated with each triad: 283 \begin{equation} \label{eq:Gf_slopes} 284 _i^k \mathbb{R}_{i_p}^{k_p} 285 =\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}} \ \frac 286 {\left(\alpha / \beta \right)_i^k \ \delta_{i + i_p}[T^k] - \delta_{i + i_p}[S^k] } 287 {\left(\alpha / \beta \right)_i^k \ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] } 292 \begin{equation} 293 \label{eq:Gf_slopes} 294 _i^k \mathbb{R}_{i_p}^{k_p} 295 =\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}} \ \frac 296 {\left(\alpha / \beta \right)_i^k \ \delta_{i + i_p}[T^k] - \delta_{i + i_p}[S^k] } 297 {\left(\alpha / \beta \right)_i^k \ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] } 288 298 \end{equation} 289 299 Note that in \autoref{eq:Gf_slopes} we use the ratio $\alpha / \beta$ instead of … … 296 306 297 307 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 298 \begin{figure}[!ht] \begin{center} 299 \includegraphics[width=0.70\textwidth]{Fig_ISO_triad} 300 \caption{ \protect\label{fig:ISO_triad} 301 Triads used in the Griffies's like iso-neutral diffision scheme for 302 $u$-component (upper panel) and $w$-component (lower panel).} 303 \end{center} 308 \begin{figure}[!ht] 309 \begin{center} 310 \includegraphics[width=0.70\textwidth]{Fig_ISO_triad} 311 \caption{ 312 \protect\label{fig:ISO_triad} 313 Triads used in the Griffies's like iso-neutral diffision scheme for 314 $u$-component (upper panel) and $w$-component (lower panel). 315 } 316 \end{center} 304 317 \end{figure} 305 318 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 307 320 The four iso-neutral fluxes associated with the triads are defined at $T$-point. 308 321 They take the following expression: 309 \begin{flalign} \label{eq:Gf_fluxes} 310 \begin{split} 311 {_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) 312 &= \ \; \qquad \quad { _i^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{1u}}_{\,i+i_p}^{\,k}} \\ 313 {_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (T) 314 &= -\; { _i^k \mathbb{R}_{i_p}^{k_p} } 315 \ \; { _i^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{3w}}_{\,i}^{\,k+k_p}} 316 \end{split} 317 \end{flalign} 322 \begin{flalign*} 323 % \label{eq:Gf_fluxes} 324 \begin{split} 325 {_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) 326 &= \ \; \qquad \quad { _i^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{1u}}_{\,i+i_p}^{\,k}} \\ 327 {_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (T) 328 &= -\; { _i^k \mathbb{R}_{i_p}^{k_p} } 329 \ \; { _i^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{3w}}_{\,i}^{\,k+k_p}} 330 \end{split} 331 \end{flalign*} 318 332 319 333 The resulting iso-neutral fluxes at $u$- and $w$-points are then given by 320 334 the sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:ISO_triad}): 321 \begin{flalign} \label{eq:iso_flux}322 \textbf{F}_{iso}(T) 323 &\equiv \sum_{\substack{i_p,\,k_p}} 324 \begin{pmatrix}325 {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\326 327 {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T) \\328 \end{pmatrix} \notag \\329 &\notag \\330 &\equiv \sum_{\substack{i_p,\,k_p}} 331 \begin{pmatrix}332 && { _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{1u}}_{\,i+1/2}^{\,k} } \\333 334 335 & {_i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{3w}}_{\,i}^{\,k+1/2} } \\336 337 % &\\338 % &\equiv \sum_{\substack{i_p,\,k_p}} 339 % \begin{pmatrix} 340 % \qquad \qquad \qquad 341 % \frac{1}{ {e_{1u}}_{\,i+1/2}^{\,k} } \ \; 342 %{ _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} }(T)\\343 %\\344 % -\frac{1}{ {e_{3w}}_{\,i}^{\,k+1/2} } \ \; 345 % { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \; 346 % {_i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} }(T)\\ 347 % \end{pmatrix} 335 \begin{flalign} 336 \label{eq:iso_flux} 337 \textbf{F}_{iso}(T) 338 &\equiv \sum_{\substack{i_p,\,k_p}} 339 \begin{pmatrix} 340 {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ \\ 341 {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T) 342 \end{pmatrix} 343 \notag \\ 344 & \notag \\ 345 &\equiv \sum_{\substack{i_p,\,k_p}} 346 \begin{pmatrix} 347 && { _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{1u}}_{\,i+1/2}^{\,k} } \\ \\ 348 & -\; { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } 349 & {_i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{3w}}_{\,i}^{\,k+1/2} } 350 \end{pmatrix} % \\ 351 % &\\ 352 % &\equiv \sum_{\substack{i_p,\,k_p}} 353 % \begin{pmatrix} 354 % \qquad \qquad \qquad 355 % \frac{1}{ {e_{1u}}_{\,i+1/2}^{\,k} } \ \; 356 % { _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} }(T)\\ 357 % \\ 358 % -\frac{1}{ {e_{3w}}_{\,i}^{\,k+1/2} } \ \; 359 % { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \; 360 % {_i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} }(T)\\ 361 % \end{pmatrix} 348 362 \end{flalign} 349 363 resulting in a iso-neutral diffusion tendency on temperature given by 350 364 the divergence of the sum of all the four triad fluxes: 351 \begin{equation} \label{eq:Gf_operator} 352 D_l^T = \frac{1}{b_T} \sum_{\substack{i_p,\,k_p}} \left\{ 353 \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right] 354 + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right] \right\} 365 \begin{equation} 366 \label{eq:Gf_operator} 367 D_l^T = \frac{1}{b_T} \sum_{\substack{i_p,\,k_p}} \left\{ 368 \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right] 369 + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right] \right\} 355 370 \end{equation} 356 371 where $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells. … … 361 376 The discretization of the diffusion operator recovers the traditional five-point Laplacian in 362 377 the limit of flat iso-neutral direction: 363 \begin{equation} \label{eq:Gf_property1a} 364 D_l^T = \frac{1}{b_T} \ \delta_{i} 365 \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; \overline{A}^{\,i} \; \delta_{i+1/2}[T] \right] 366 \qquad \text{when} \quad 367 { _i^k \mathbb{R}_{i_p}^{k_p} }=0 368 \end{equation} 378 \[ 379 % \label{eq:Gf_property1a} 380 D_l^T = \frac{1}{b_T} \ \delta_{i} 381 \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; \overline{A}^{\,i} \; \delta_{i+1/2}[T] \right] 382 \qquad \text{when} \quad 383 { _i^k \mathbb{R}_{i_p}^{k_p} }=0 384 \] 369 385 370 386 \item[$\bullet$ implicit treatment in the vertical] … … 374 390 This is of paramount importance since it means that 375 391 the implicit in time algorithm for solving the vertical diffusion equation can be used to evaluate this term. 376 It is a necessity since the vertical eddy diffusivity associated with this term, 377 \begin{equation} 378 \sum_{\substack{i_p, \,k_p}} \left\{ 392 It is a necessity since the vertical eddy diffusivity associated with this term, 393 \[ 394 \sum_{\substack{i_p, \,k_p}} \left\{ 379 395 A_i^k \; \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2 380 \right\} 381 \end{equation} 382 can be quite large.396 \right\} 397 \] 398 can be quite large. 383 399 384 400 \item[$\bullet$ pure iso-neutral operator] 385 401 The iso-neutral flux of locally referenced potential density is zero, $i.e.$ 386 \begin{align} \label{eq:Gf_property2} 387 \begin{matrix} 388 &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} (\rho)} 389 &= &\alpha_i^k &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) 390 &- \ \; \beta _i^k &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (S) & = \ 0 \\ 391 &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)} 392 &= &\alpha_i^k &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (T) 393 &- \ \; \beta _i^k &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (S) &= \ 0 394 \end{matrix} 395 \end{align} 396 This result is trivially obtained using the \autoref{eq:Gf_triads} applied to $T$ and $S$ and 397 the definition of the triads' slopes \autoref{eq:Gf_slopes}. 402 \begin{align*} 403 % \label{eq:Gf_property2} 404 \begin{matrix} 405 &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} (\rho)} 406 &= &\alpha_i^k &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) 407 &- \ \; \beta _i^k &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (S) & = \ 0 \\ 408 &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)} 409 &= &\alpha_i^k &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (T) 410 &- \ \; \beta _i^k &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (S) &= \ 0 411 \end{matrix} 412 \end{align*} 413 This result is trivially obtained using the \autoref{eq:Gf_triads} applied to $T$ and $S$ and 414 the definition of the triads' slopes \autoref{eq:Gf_slopes}. 398 415 399 416 \item[$\bullet$ conservation of tracer] 400 417 The iso-neutral diffusion term conserve the total tracer content, $i.e.$ 401 \begin{equation} \label{eq:Gf_property1} 402 \sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0 403 \end{equation} 418 \[ 419 % \label{eq:Gf_property1} 420 \sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0 421 \] 404 422 This property is trivially satisfied since the iso-neutral diffusive operator is written in flux form. 405 423 406 424 \item[$\bullet$ decrease of tracer variance] 407 425 The iso-neutral diffusion term does not increase the total tracer variance, $i.e.$ 408 \begin{equation} \label{eq:Gf_property1} 409 \sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0 410 \end{equation} 426 \[ 427 % \label{eq:Gf_property1} 428 \sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0 429 \] 411 430 The property is demonstrated in the \autoref{apdx:Gf_operator}. 412 431 It is a key property for a diffusion term. … … 418 437 \item[$\bullet$ self-adjoint operator] 419 438 The iso-neutral diffusion operator is self-adjoint, $i.e.$ 420 \begin{equation} \label{eq:Gf_property1} 421 \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\} 422 \end{equation} 439 \[ 440 % \label{eq:Gf_property1} 441 \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\} 442 \] 423 443 In other word, there is no needs to develop a specific routine from the adjoint of this operator. 424 444 We just have to apply the same routine. … … 427 447 \end{description} 428 448 429 430 $\ $\newline %force an empty line431 449 % ================================================================ 432 450 % Skew flux formulation for Eddy Induced Velocity : … … 443 461 444 462 The eddy induced velocity is given by: 445 \begin{equation} \label{eq:eiv_v} 446 \begin{split} 447 u^* & = - \frac{1}{e_2\,e_{3}} \;\partial_k \left( e_2 \, A_e \; r_i \right) 448 = - \frac{1}{e_3} \;\partial_k \left( A_e \; r_i \right) \\ 449 v^* & = - \frac{1}{e_1\,e_3}\; \partial_k \left( e_1 \, A_e \; r_j \right) 450 = - \frac{1}{e_3} \;\partial_k \left( A_e \; r_j \right) \\ 451 w^* & = \frac{1}{e_1\,e_2}\; \left\{ \partial_i \left( e_2 \, A_e \; r_i \right) 452 + \partial_j \left( e_1 \, A_e \;r_j \right) \right\} \\ 453 \end{split} 463 \begin{equation} 464 \label{eq:eiv_v} 465 \begin{split} 466 u^* & = - \frac{1}{e_2\,e_{3}} \;\partial_k \left( e_2 \, A_e \; r_i \right) 467 = - \frac{1}{e_3} \;\partial_k \left( A_e \; r_i \right) \\ 468 v^* & = - \frac{1}{e_1\,e_3}\; \partial_k \left( e_1 \, A_e \; r_j \right) 469 = - \frac{1}{e_3} \;\partial_k \left( A_e \; r_j \right) \\ 470 w^* & = \frac{1}{e_1\,e_2}\; \left\{ \partial_i \left( e_2 \, A_e \; r_i \right) 471 + \partial_j \left( e_1 \, A_e \;r_j \right) \right\} 472 \end{split} 454 473 \end{equation} 455 474 where $A_{e}$ is the eddy induced velocity coefficient, … … 475 494 %\end{split} 476 495 %\end{equation} 477 \begin{equation} \label{eq:eiv_vd} 478 \textbf{F}_{eiv}^T \equiv \left( \begin{aligned} 479 \sum_{\substack{i_p,\,k_p}} & 480 +{e_{2u}}_{i+1/2-i_p}^{k} \ \ {A_{e}}_{i+1/2-i_p}^{k} 481 \ \ \ { _{i+1/2-i_p}^k \mathbb{R}_{i_p}^{k_p} } \ \ \delta_{k+k_p}[T_{i+1/2-i_p}] \\ 482 \\ 483 \sum_{\substack{i_p,\,k_p}} & 484 - {e_{2u}}_i^{k+1/2-k_p} \ {A_{e}}_i^{k+1/2-k_p} 485 \ \ { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \delta_{i+i_p}[T^{k+1/2-k_p}] \\ 486 \end{aligned} \right) 487 \end{equation} 496 \[ 497 % \label{eq:eiv_vd} 498 \textbf{F}_{eiv}^T \equiv \left( 499 \begin{aligned} 500 \sum_{\substack{i_p,\,k_p}} & 501 +{e_{2u}}_{i+1/2-i_p}^{k} \ \ {A_{e}}_{i+1/2-i_p}^{k} 502 \ \ \ { _{i+1/2-i_p}^k \mathbb{R}_{i_p}^{k_p} } \ \ \delta_{k+k_p}[T_{i+1/2-i_p}] \\ \\ 503 \sum_{\substack{i_p,\,k_p}} & 504 - {e_{2u}}_i^{k+1/2-k_p} \ {A_{e}}_i^{k+1/2-k_p} 505 \ \ { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \delta_{i+i_p}[T^{k+1/2-k_p}] 506 \end{aligned} 507 \right) 508 \] 488 509 489 510 \citep{Griffies_JPO98} introduces another way to implement the eddy induced advection, the so-called skew form. … … 491 512 For example in the (\textbf{i},\textbf{k}) plane, the tracer advective fluxes can be transformed as follows: 492 513 \begin{flalign*} 493 \begin{split} 494 \textbf{F}_{eiv}^T = 495 \begin{pmatrix} 496 {e_{2}\,e_{3}\; u^*} \\ 497 {e_{1}\,e_{2}\; w^*} \\ 498 \end{pmatrix} \; T 499 &= 500 \begin{pmatrix} 501 { - \partial_k \left( e_{2} \, A_{e} \; r_i \right) \; T \;} \\ 502 {+ \partial_i \left( e_{2} \, A_{e} \; r_i \right) \; T \;} \\ 503 \end{pmatrix} \\ 504 &= 505 \begin{pmatrix} 506 { - \partial_k \left( e_{2} \, A_{e} \; r_i \; T \right) \;} \\ 507 {+ \partial_i \left( e_{2} \, A_{e} \; r_i \; T \right) \;} \\ 508 \end{pmatrix} 509 + 510 \begin{pmatrix} 511 {+ e_{2} \, A_{e} \; r_i \; \partial_k T} \\ 512 { - e_{2} \, A_{e} \; r_i \; \partial_i T} \\ 513 \end{pmatrix} 514 \end{split} 514 \begin{split} 515 \textbf{F}_{eiv}^T = 516 \begin{pmatrix} 517 {e_{2}\,e_{3}\; u^*} \\ 518 {e_{1}\,e_{2}\; w^*} 519 \end{pmatrix} 520 \; T 521 &= 522 \begin{pmatrix} 523 { - \partial_k \left( e_{2} \, A_{e} \; r_i \right) \; T \;} \\ 524 {+ \partial_i \left( e_{2} \, A_{e} \; r_i \right) \; T \;} 525 \end{pmatrix} 526 \\ 527 &= 528 \begin{pmatrix} 529 { - \partial_k \left( e_{2} \, A_{e} \; r_i \; T \right) \;} \\ 530 {+ \partial_i \left( e_{2} \, A_{e} \; r_i \; T \right) \;} 531 \end{pmatrix} 532 + 533 \begin{pmatrix} 534 {+ e_{2} \, A_{e} \; r_i \; \partial_k T} \\ 535 { - e_{2} \, A_{e} \; r_i \; \partial_i T} 536 \end{pmatrix} 537 \end{split} 515 538 \end{flalign*} 516 539 and since the eddy induces velocity field is no-divergent, 517 540 we end up with the skew form of the eddy induced advective fluxes: 518 \begin{equation} \label{eq:eiv_skew_continuous} 519 \textbf{F}_{eiv}^T = \begin{pmatrix} 520 {+ e_{2} \, A_{e} \; r_i \; \partial_k T} \\ 521 { - e_{2} \, A_{e} \; r_i \; \partial_i T} \\ 522 \end{pmatrix} 541 \begin{equation} 542 \label{eq:eiv_skew_continuous} 543 \textbf{F}_{eiv}^T = 544 \begin{pmatrix} 545 {+ e_{2} \, A_{e} \; r_i \; \partial_k T} \\ 546 { - e_{2} \, A_{e} \; r_i \; \partial_i T} 547 \end{pmatrix} 523 548 \end{equation} 524 549 The tendency associated with eddy induced velocity is then simply the divergence of … … 528 553 Another interesting property of \autoref{eq:eiv_skew_continuous} form is that when $A=A_e$, 529 554 a simplification occurs in the sum of the iso-neutral diffusion and eddy induced velocity terms: 530 \begin{flalign} \label{eq:eiv_skew+eiv_continuous} 531 \textbf{F}_{iso}^T + \textbf{F}_{eiv}^T &= 532 \begin{pmatrix} 533 + \frac{e_2\,e_3\,}{e_1} A \;\partial_i T - e_2 \, A \; r_i \;\partial_k T \\ 534 - e_2 \, A_{e} \; r_i \;\partial_i T + \frac{e_1\,e_2}{e_3} \, A \; r_i^2 \;\partial_k T \\ 535 \end{pmatrix} 536 + 537 \begin{pmatrix} 538 {+ e_{2} \, A_{e} \; r_i \; \partial_k T} \\ 539 { - e_{2} \, A_{e} \; r_i \; \partial_i T} \\ 540 \end{pmatrix} \\ 541 &= \begin{pmatrix} 542 + \frac{e_2\,e_3\,}{e_1} A \;\partial_i T \\ 543 - 2\; e_2 \, A_{e} \; r_i \;\partial_i T + \frac{e_1\,e_2}{e_3} \, A \; r_i^2 \;\partial_k T \\ 544 \end{pmatrix} 545 \end{flalign} 555 \begin{flalign*} 556 % \label{eq:eiv_skew+eiv_continuous} 557 \textbf{F}_{iso}^T + \textbf{F}_{eiv}^T &= 558 \begin{pmatrix} 559 + \frac{e_2\,e_3\,}{e_1} A \;\partial_i T - e_2 \, A \; r_i \;\partial_k T \\ 560 - e_2 \, A_{e} \; r_i \;\partial_i T + \frac{e_1\,e_2}{e_3} \, A \; r_i^2 \;\partial_k T 561 \end{pmatrix} 562 + 563 \begin{pmatrix} 564 {+ e_{2} \, A_{e} \; r_i \; \partial_k T} \\ 565 { - e_{2} \, A_{e} \; r_i \; \partial_i T} 566 \end{pmatrix} 567 \\ 568 &= 569 \begin{pmatrix} 570 + \frac{e_2\,e_3\,}{e_1} A \;\partial_i T \\ 571 - 2\; e_2 \, A_{e} \; r_i \;\partial_i T + \frac{e_1\,e_2}{e_3} \, A \; r_i^2 \;\partial_k T 572 \end{pmatrix} 573 \end{flalign*} 546 574 The horizontal component reduces to the one use for an horizontal laplacian operator and 547 575 the vertical one keeps the same complexity, but not more. … … 552 580 Using the slopes \autoref{eq:Gf_slopes} and defining $A_e$ at $T$-point($i.e.$ as $A$, 553 581 the eddy diffusivity coefficient), the resulting discret form is given by: 554 \begin{equation} \label{eq:eiv_skew} 555 \textbf{F}_{eiv}^T \equiv \frac{1}{4} \left( \begin{aligned} 556 \sum_{\substack{i_p,\,k_p}} & 557 +{e_{2u}}_{i+1/2-i_p}^{k} \ \ {A_{e}}_{i+1/2-i_p}^{k} 558 \ \ \ { _{i+1/2-i_p}^k \mathbb{R}_{i_p}^{k_p} } \ \ \delta_{k+k_p}[T_{i+1/2-i_p}] \\ 559 \\ 560 \sum_{\substack{i_p,\,k_p}} & 561 - {e_{2u}}_i^{k+1/2-k_p} \ {A_{e}}_i^{k+1/2-k_p} 562 \ \ { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \delta_{i+i_p}[T^{k+1/2-k_p}] \\ 563 \end{aligned} \right) 582 \begin{equation} 583 \label{eq:eiv_skew} 584 \textbf{F}_{eiv}^T \equiv \frac{1}{4} \left( 585 \begin{aligned} 586 \sum_{\substack{i_p,\,k_p}} & 587 +{e_{2u}}_{i+1/2-i_p}^{k} \ \ {A_{e}}_{i+1/2-i_p}^{k} 588 \ \ \ { _{i+1/2-i_p}^k \mathbb{R}_{i_p}^{k_p} } \ \ \delta_{k+k_p}[T_{i+1/2-i_p}] \\ \\ 589 \sum_{\substack{i_p,\,k_p}} & 590 - {e_{2u}}_i^{k+1/2-k_p} \ {A_{e}}_i^{k+1/2-k_p} 591 \ \ { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \delta_{i+i_p}[T^{k+1/2-k_p}] 592 \end{aligned} 593 \right) 564 594 \end{equation} 565 595 Note that \autoref{eq:eiv_skew} is valid in $z$-coordinate with or without partial cells. … … 572 602 $i.e.$ it does not include a diffusive component but is a "pure" advection term. 573 603 574 575 576 577 604 $\ $\newpage %force an empty line 578 605 % ================================================================ … … 587 614 588 615 The continuous property to be demonstrated is: 616 \[ 617 \int_D D_l^T \; T \;dv \leq 0 618 \] 619 The discrete form of its left hand side is obtained using \autoref{eq:iso_flux} 620 589 621 \begin{align*} 590 \int_D D_l^T \; T \;dv \leq 0 591 \end{align*} 592 The discrete form of its left hand side is obtained using \autoref{eq:iso_flux} 593 594 \begin{align*} 595 &\int_D D_l^T \; T \;dv \equiv \sum_{i,k} \left\{ T \ D_l^T \ b_T \right\} \\ 596 &\equiv + \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{ 597 \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right] 598 + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right] \ T \right\} \\ 599 &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{ 600 {_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \ \delta_{i+1/2} [T] 601 + {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \ \delta_{k+1/2} [T] \right\} \\ 602 &\equiv -\sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{ 603 \frac{ _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} (T) }{ {e_{1u}}_{\,i+1/2}^{\,k} } \ \delta_{i+1/2} [T] 604 - { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \; 605 \frac{ _i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} (T) }{ {e_{3w}}_{\,i}^{\,k+1/2} } \ \delta_{k+1/2} [T] 606 \right\} \\ 607 % 608 \allowdisplaybreaks 609 \intertext{ Expending the summation on $i_p$ and $k_p$, it becomes:} 610 % 611 &\equiv -\sum_{i,k} 612 \begin{Bmatrix} 613 &\ \ \Bigl( { _{i+1}^{k} \mathbb{T}_{-1/2}^{-1/2} (T) } 614 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 615 & -\ \ {_{i}^{k+1} \mathbb{R}_{-1/2}^{-1/2}} 616 & {_{i}^{k+1} \mathbb{T}_{-1/2}^{-1/2} (T) } 617 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) 618 & \\ 619 &+\Bigl( \ \;\; { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) } 620 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 621 & -\ \ {_i^{k+1} \mathbb{R}_{+1/2}^{-1/2}} 622 & { _i^{k+1} \mathbb{T}_{+1/2}^{-1/2} (T) } 623 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) 624 & \\ 625 &+\Bigl( { _{i+1}^{k} \mathbb{T}_{-1/2}^{+1/2} (T) } 626 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 627 & -\ \ \ \;\;{_{i}^{k} \mathbb{R}_{-1/2}^{+1/2}} 628 & \ \;\;{_{i}^{k} \mathbb{T}_{-1/2}^{+1/2} (T) } 629 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) 630 & \\ 631 &+\Bigl( \ \;\; { _{i}^{k} \mathbb{T}_{+1/2}^{+1/2} (T) } 632 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 633 & -\ \ \ \;\;{_{i}^{k} \mathbb{R}_{+1/2}^{+1/2}} 634 & \ \;\;{_{i}^{k} \mathbb{T}_{+1/2}^{+1/2} (T) } 635 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) \\ 636 \end{Bmatrix} 637 % 638 \allowdisplaybreaks 639 \intertext{The summation is done over all $i$ and $k$ indices, 622 &\int_D D_l^T \; T \;dv \equiv \sum_{i,k} \left\{ T \ D_l^T \ b_T \right\} \\ 623 &\equiv + \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{ 624 \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right] 625 + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right] \ T \right\} \\ 626 &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{ 627 {_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \ \delta_{i+1/2} [T] 628 + {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \ \delta_{k+1/2} [T] \right\} \\ 629 &\equiv -\sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{ 630 \frac{ _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} (T) }{ {e_{1u}}_{\,i+1/2}^{\,k} } \ \delta_{i+1/2} [T] 631 - { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \; 632 \frac{ _i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} (T) }{ {e_{3w}}_{\,i}^{\,k+1/2} } \ \delta_{k+1/2} [T] 633 \right\} \\ 634 % 635 \allowdisplaybreaks 636 \intertext{ Expending the summation on $i_p$ and $k_p$, it becomes:} 637 % 638 &\equiv -\sum_{i,k} 639 \begin{Bmatrix} 640 &\ \ \Bigl( { _{i+1}^{k} \mathbb{T}_{-1/2}^{-1/2} (T) } 641 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 642 & -\ \ {_{i}^{k+1} \mathbb{R}_{-1/2}^{-1/2}} 643 & {_{i}^{k+1} \mathbb{T}_{-1/2}^{-1/2} (T) } 644 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) 645 & \\ 646 &+\Bigl( \ \;\; { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) } 647 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 648 & -\ \ {_i^{k+1} \mathbb{R}_{+1/2}^{-1/2}} 649 & { _i^{k+1} \mathbb{T}_{+1/2}^{-1/2} (T) } 650 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) 651 & \\ 652 &+\Bigl( { _{i+1}^{k} \mathbb{T}_{-1/2}^{+1/2} (T) } 653 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 654 & -\ \ \ \;\;{_{i}^{k} \mathbb{R}_{-1/2}^{+1/2}} 655 & \ \;\;{_{i}^{k} \mathbb{T}_{-1/2}^{+1/2} (T) } 656 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) 657 & \\ 658 &+\Bigl( \ \;\; { _{i}^{k} \mathbb{T}_{+1/2}^{+1/2} (T) } 659 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 660 & -\ \ \ \;\;{_{i}^{k} \mathbb{R}_{+1/2}^{+1/2}} 661 & \ \;\;{_{i}^{k} \mathbb{T}_{+1/2}^{+1/2} (T) } 662 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) \\ 663 \end{Bmatrix} 664 % 665 \allowdisplaybreaks 666 \intertext{ 667 The summation is done over all $i$ and $k$ indices, 640 668 it is therefore possible to introduce a shift of $-1$ either in $i$ or $k$ direction in order to 641 669 regroup all the terms of the summation by triad at a ($i$,$k$) point. 642 670 In other words, we regroup all the terms in the neighbourhood that contain a triad at the same ($i$,$k$) indices. 643 It becomes: } 644 % 645 &\equiv -\sum_{i,k} 646 \begin{Bmatrix} 647 &\ \ \Bigl( {_i^k \mathbb{T}_{-1/2}^{-1/2} (T) } 648 &\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}} 649 & -\ \ {_i^k \mathbb{R}_{-1/2}^{-1/2}} 650 & {_i^k \mathbb{T}_{-1/2}^{-1/2} (T) } 651 &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}} \Bigr) 652 & \\ 653 &+\Bigl( { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) } 654 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 655 & -\ \ {_i^k \mathbb{R}_{+1/2}^{-1/2}} 656 & { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) } 657 &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}} \Bigr) 658 & \\ 659 &+\Bigl( {_i^k \mathbb{T}_{-1/2}^{+1/2} (T) } 660 &\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}} 661 & -\ \ {_i^k \mathbb{R}_{-1/2}^{+1/2}} 662 & {_i^k \mathbb{T}_{-1/2}^{+1/2} (T) } 663 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) 664 & \\ 665 &+\Bigl( { _i^k \mathbb{T}_{+1/2}^{+1/2} (T) } 666 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 667 & -\ \ {_i^k \mathbb{R}_{+1/2}^{+1/2}} 668 & {_i^k \mathbb{T}_{+1/2}^{+1/2} (T) } 669 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) \\ 670 \end{Bmatrix} \\ 671 % 672 \allowdisplaybreaks 673 \intertext{Then outing in factor the triad in each of the four terms of the summation and 671 It becomes: 672 } 673 % 674 &\equiv -\sum_{i,k} 675 \begin{Bmatrix} 676 &\ \ \Bigl( {_i^k \mathbb{T}_{-1/2}^{-1/2} (T) } 677 &\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}} 678 & -\ \ {_i^k \mathbb{R}_{-1/2}^{-1/2}} 679 & {_i^k \mathbb{T}_{-1/2}^{-1/2} (T) } 680 &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}} \Bigr) 681 & \\ 682 &+\Bigl( { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) } 683 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 684 & -\ \ {_i^k \mathbb{R}_{+1/2}^{-1/2}} 685 & { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) } 686 &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}} \Bigr) 687 & \\ 688 &+\Bigl( {_i^k \mathbb{T}_{-1/2}^{+1/2} (T) } 689 &\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}} 690 & -\ \ {_i^k \mathbb{R}_{-1/2}^{+1/2}} 691 & {_i^k \mathbb{T}_{-1/2}^{+1/2} (T) } 692 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) 693 & \\ 694 &+\Bigl( { _i^k \mathbb{T}_{+1/2}^{+1/2} (T) } 695 &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 696 & -\ \ {_i^k \mathbb{R}_{+1/2}^{+1/2}} 697 & {_i^k \mathbb{T}_{+1/2}^{+1/2} (T) } 698 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr) \\ 699 \end{Bmatrix} \\ 700 % 701 \allowdisplaybreaks 702 \intertext{ 703 Then outing in factor the triad in each of the four terms of the summation and 674 704 substituting the triads by their expression given in \autoref{eq:Gf_triads}. 675 It becomes: } 676 % 677 &\equiv -\sum_{i,k} 678 \begin{Bmatrix} 679 &\ \ \Bigl( \frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}} 680 & -\ \ {_i^k \mathbb{R}_{-1/2}^{-1/2}} 681 &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}} \Bigr)^2 682 & \frac{1}{4} \ {b_u}_{\,i-1/2}^{\,k} \ A_i^k 683 & \\ 684 &+\Bigl( \frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 685 & -\ \ {_i^k \mathbb{R}_{+1/2}^{-1/2}} 686 &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}} \Bigr)^2 687 & \frac{1}{4} \ {b_u}_{\,i+1/2}^{\,k} \ A_i^k 688 & \\ 689 &+\Bigl( \frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}} 690 & -\ \ {_i^k \mathbb{R}_{-1/2}^{+1/2}} 691 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr)^2 692 & \frac{1}{4} \ {b_u}_{\,i-1/2}^{\,k} \ A_i^k 693 & \\ 694 &+\Bigl( \frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 695 & -\ \ {_i^k \mathbb{R}_{+1/2}^{+1/2}} 696 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr)^2 697 & \frac{1}{4} \ {b_u}_{\,i+1/2}^{\,k} \ A_i^k \\ 698 \end{Bmatrix} \\ 699 & \\ 700 % 701 &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{ 702 \begin{matrix} 703 &\Bigl( \frac{ \delta_{i +i_p} [T] }{{e_{1u} }_{\,i+i_p}^{\,k}} 704 & -\ \ {_i^k \mathbb{R}_{i_p}^{k_p}} 705 &\frac{ \delta_{k+k_p} [T] }{{e_{3w}}_{\,i}^{\,k+k_p}} \Bigr)^2 706 & \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k} \ A_i^k \ \ 707 \end{matrix} 708 \right\} 709 \quad \leq 0 705 It becomes: 706 } 707 % 708 &\equiv -\sum_{i,k} 709 \begin{Bmatrix} 710 &\ \ \Bigl( \frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}} 711 & -\ \ {_i^k \mathbb{R}_{-1/2}^{-1/2}} 712 &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}} \Bigr)^2 713 & \frac{1}{4} \ {b_u}_{\,i-1/2}^{\,k} \ A_i^k 714 & \\ 715 &+\Bigl( \frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 716 & -\ \ {_i^k \mathbb{R}_{+1/2}^{-1/2}} 717 &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}} \Bigr)^2 718 & \frac{1}{4} \ {b_u}_{\,i+1/2}^{\,k} \ A_i^k 719 & \\ 720 &+\Bigl( \frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}} 721 & -\ \ {_i^k \mathbb{R}_{-1/2}^{+1/2}} 722 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr)^2 723 & \frac{1}{4} \ {b_u}_{\,i-1/2}^{\,k} \ A_i^k 724 & \\ 725 &+\Bigl( \frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}} 726 & -\ \ {_i^k \mathbb{R}_{+1/2}^{+1/2}} 727 &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}} \Bigr)^2 728 & \frac{1}{4} \ {b_u}_{\,i+1/2}^{\,k} \ A_i^k \\ 729 \end{Bmatrix} 730 \\ 731 & \\ 732 % 733 &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{ 734 \begin{matrix} 735 &\Bigl( \frac{ \delta_{i +i_p} [T] }{{e_{1u} }_{\,i+i_p}^{\,k}} 736 & -\ \ {_i^k \mathbb{R}_{i_p}^{k_p}} 737 &\frac{ \delta_{k+k_p} [T] }{{e_{3w}}_{\,i}^{\,k+k_p}} \Bigr)^2 738 & \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k} \ A_i^k \ \ 739 \end{matrix} 740 \right\} 741 \quad \leq 0 710 742 \end{align*} 711 743 The last inequality is obviously obtained as we succeed in obtaining a negative summation of square quantities. … … 714 746 then the previous demonstration would have let to: 715 747 \begin{align*} 716 \int_D S \; D_l^T \;dv &\equiv \sum_{i,k} \left\{ S \ D_l^T \ b_T \right\} \\ 717 &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{ 718 \left( \frac{ \delta_{i +i_p} [S] }{{e_{1u} }_{\,i+i_p}^{\,k}} 719 - {_i^k \mathbb{R}_{i_p}^{k_p}} 720 \frac{ \delta_{k+k_p} [S] }{{e_{3w}}_{\,i}^{\,k+k_p}} \right) \right. 721 \\ & \qquad \qquad \qquad \ \left. 722 \left( \frac{ \delta_{i +i_p} [T] }{{e_{1u} }_{\,i+i_p}^{\,k}} 723 - {_i^k \mathbb{R}_{i_p}^{k_p}} 724 \frac{ \delta_{k+k_p} [T] }{{e_{3w}}_{\,i}^{\,k+k_p}} \right) 725 \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k} \ A_i^k \ 726 \right\} 727 % 728 \allowdisplaybreaks 729 \intertext{which, by applying the same operation as before but in reverse order, leads to: } 730 % 731 &\equiv \sum_{i,k} \left\{ D_l^S \ T \ b_T \right\} 748 \int_D S \; D_l^T \;dv &\equiv \sum_{i,k} \left\{ S \ D_l^T \ b_T \right\} \\ 749 &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{ 750 \left( \frac{ \delta_{i +i_p} [S] }{{e_{1u} }_{\,i+i_p}^{\,k}} 751 - {_i^k \mathbb{R}_{i_p}^{k_p}} 752 \frac{ \delta_{k+k_p} [S] }{{e_{3w}}_{\,i}^{\,k+k_p}} \right) \right. \\ 753 & \qquad \qquad \qquad \ \left. 754 \left( \frac{ \delta_{i +i_p} [T] }{{e_{1u} }_{\,i+i_p}^{\,k}} 755 - {_i^k \mathbb{R}_{i_p}^{k_p}} 756 \frac{ \delta_{k+k_p} [T] }{{e_{3w}}_{\,i}^{\,k+k_p}} \right) 757 \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k} \ A_i^k \ 758 \right\} 759 % 760 \allowdisplaybreaks 761 \intertext{ 762 which, by applying the same operation as before but in reverse order, leads to: 763 } 764 % 765 &\equiv \sum_{i,k} \left\{ D_l^S \ T \ b_T \right\} 732 766 \end{align*} 733 767 This means that the iso-neutral operator is self-adjoint. 734 768 There is no need to develop a specific to obtain it. 735 769 736 737 738 $\ $\newpage %force an empty line 770 \newpage 771 739 772 % ================================================================ 740 773 % Discrete Invariants of the skew flux formulation … … 743 776 \label{subsec:eiv_skew} 744 777 745 746 778 Demonstration for the conservation of the tracer variance in the (\textbf{i},\textbf{j}) plane. 747 779 … … 750 782 The continuous property to be demonstrated is: 751 783 \begin{align*} 752 \int_D \nabla \cdot \textbf{F}_{eiv}(T) \; T \;dv \equiv 0784 \int_D \nabla \cdot \textbf{F}_{eiv}(T) \; T \;dv \equiv 0 753 785 \end{align*} 754 786 The discrete form of its left hand side is obtained using \autoref{eq:eiv_skew} 755 787 \begin{align*} 756 \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}} \Biggl\{ \;\;757 \delta_i &\left[758 {e_{2u}}_{i+i_p+1/2}^{k} \;\ \ {A_{e}}_{i+i_p+1/2}^{k} 759 \ \ \ { _{i+i_p+1/2}^k \mathbb{R}_{-i_p}^{k_p} } \quad \delta_{k+k_p}[T_{i+i_p+1/2}] 760 \right] \; T_i^k \\761 - \delta_k &\left[ 762 {e_{2u}}_i^{k+k_p+1/2} \ \ {A_{e}}_i^{k+k_p+1/2} 763 \ \ { _i^{k+k_p+1/2} \mathbb{R}_{i_p}^{-k_p} } \ \ \delta_{i+i_p}[T^{k+k_p+1/2}] 764 \right] \; T_i^k \ \Biggr\}788 \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}} \Biggl\{ \;\; 789 \delta_i &\left[ 790 {e_{2u}}_{i+i_p+1/2}^{k} \;\ \ {A_{e}}_{i+i_p+1/2}^{k} 791 \ \ \ { _{i+i_p+1/2}^k \mathbb{R}_{-i_p}^{k_p} } \quad \delta_{k+k_p}[T_{i+i_p+1/2}] 792 \right] \; T_i^k \\ 793 - \delta_k &\left[ 794 {e_{2u}}_i^{k+k_p+1/2} \ \ {A_{e}}_i^{k+k_p+1/2} 795 \ \ { _i^{k+k_p+1/2} \mathbb{R}_{i_p}^{-k_p} } \ \ \delta_{i+i_p}[T^{k+k_p+1/2}] 796 \right] \; T_i^k \ \Biggr\} 765 797 \end{align*} 766 798 apply the adjoint of delta operator, it becomes 767 799 \begin{align*} 768 \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}} \Biggl\{ \;\;769 &\left( 770 {e_{2u}}_{i+i_p+1/2}^{k} \;\ \ {A_{e}}_{i+i_p+1/2}^{k} 771 \ \ \ { _{i+i_p+1/2}^k \mathbb{R}_{-i_p}^{k_p} } \quad \delta_{k+k_p}[T_{i+i_p+1/2}] 772 \right) \; \delta_{i+1/2}[T^{k}] \\773 - &\left( 774 {e_{2u}}_i^{k+k_p+1/2} \ \ {A_{e}}_i^{k+k_p+1/2} 775 \ \ { _i^{k+k_p+1/2} \mathbb{R}_{i_p}^{-k_p} } \ \ \delta_{i+i_p}[T^{k+k_p+1/2}] 776 \right) \; \delta_{k+1/2}[T_{i}] \ \Biggr\}800 \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}} \Biggl\{ \;\; 801 &\left( 802 {e_{2u}}_{i+i_p+1/2}^{k} \;\ \ {A_{e}}_{i+i_p+1/2}^{k} 803 \ \ \ { _{i+i_p+1/2}^k \mathbb{R}_{-i_p}^{k_p} } \quad \delta_{k+k_p}[T_{i+i_p+1/2}] 804 \right) \; \delta_{i+1/2}[T^{k}] \\ 805 - &\left( 806 {e_{2u}}_i^{k+k_p+1/2} \ \ {A_{e}}_i^{k+k_p+1/2} 807 \ \ { _i^{k+k_p+1/2} \mathbb{R}_{i_p}^{-k_p} } \ \ \delta_{i+i_p}[T^{k+k_p+1/2}] 808 \right) \; \delta_{k+1/2}[T_{i}] \ \Biggr\} 777 809 \end{align*} 778 810 Expending the summation on $i_p$ and $k_p$, it becomes: 779 811 \begin{align*} 780 \begin{matrix}781 &\sum\limits_{i,k} \Bigl\{ 782 &+{e_{2u}}_{i+1}^{k} &{A_{e}}_{i+1 }^{k}783 &\ {_{i+1}^k \mathbb{R}_{- 1/2}^{-1/2}} &\delta_{k-1/2}[T_{i+1}] &\delta_{i+1/2}[T^{k}] &\\784 &&+{e_{2u}}_i^{k\ \ \ \:} &{A_{e}}_{i}^{k\ \ \ \:} 785 &\ {\ \ \;_i^k \mathbb{R}_{+1/2}^{-1/2}} &\delta_{k-1/2}[T_{i\ \ \ \;}] &\delta_{i+1/2}[T^{k}] &\\786 &&+{e_{2u}}_{i+1}^{k} &{A_{e}}_{i+1 }^{k} 787 &\ {_{i+1}^k \mathbb{R}_{- 1/2}^{+1/2}} &\delta_{k+1/2}[T_{i+1}] &\delta_{i+1/2}[T^{k}] &\\788 &&+{e_{2u}}_i^{k\ \ \ \:} &{A_{e}}_{i}^{k\ \ \ \:} 812 \begin{matrix} 813 &\sum\limits_{i,k} \Bigl\{ 814 &+{e_{2u}}_{i+1}^{k} &{A_{e}}_{i+1 }^{k} 815 &\ {_{i+1}^k \mathbb{R}_{- 1/2}^{-1/2}} &\delta_{k-1/2}[T_{i+1}] &\delta_{i+1/2}[T^{k}] &\\ 816 &&+{e_{2u}}_i^{k\ \ \ \:} &{A_{e}}_{i}^{k\ \ \ \:} 817 &\ {\ \ \;_i^k \mathbb{R}_{+1/2}^{-1/2}} &\delta_{k-1/2}[T_{i\ \ \ \;}] &\delta_{i+1/2}[T^{k}] &\\ 818 &&+{e_{2u}}_{i+1}^{k} &{A_{e}}_{i+1 }^{k} 819 &\ {_{i+1}^k \mathbb{R}_{- 1/2}^{+1/2}} &\delta_{k+1/2}[T_{i+1}] &\delta_{i+1/2}[T^{k}] &\\ 820 &&+{e_{2u}}_i^{k\ \ \ \:} &{A_{e}}_{i}^{k\ \ \ \:} 789 821 &\ {\ \ \;_i^k \mathbb{R}_{+1/2}^{+1/2}} &\delta_{k+1/2}[T_{i\ \ \ \;}] &\delta_{i+1/2}[T^{k}] &\\ 790 %791 &&-{e_{2u}}_i^{k+1} &{A_{e}}_i^{k+1} 792 &{_i^{k+1} \mathbb{R}_{-1/2}^{- 1/2}} &\delta_{i-1/2}[T^{k+1}] &\delta_{k+1/2}[T_{i}] &\\793 &&-{e_{2u}}_i^{k\ \ \ \:} &{A_{e}}_i^{k\ \ \ \:} 794 &{\ \ \;_i^k \mathbb{R}_{-1/2}^{+1/2}} &\delta_{i-1/2}[T^{k\ \ \ \:}] &\delta_{k+1/2}[T_{i}] &\\795 &&-{e_{2u}}_i^{k+1 } &{A_{e}}_i^{k+1} 796 &{_i^{k+1} \mathbb{R}_{+1/2}^{- 1/2}} &\delta_{i+1/2}[T^{k+1}] &\delta_{k+1/2}[T_{i}] &\\797 &&-{e_{2u}}_i^{k\ \ \ \:} &{A_{e}}_i^{k\ \ \ \:} 798 &{\ \ \;_i^k \mathbb{R}_{+1/2}^{+1/2}} &\delta_{i+1/2}[T^{k\ \ \ \:}] &\delta_{k+1/2}[T_{i}]799 &\Bigr\} \\800 \end{matrix}822 % 823 &&-{e_{2u}}_i^{k+1} &{A_{e}}_i^{k+1} 824 &{_i^{k+1} \mathbb{R}_{-1/2}^{- 1/2}} &\delta_{i-1/2}[T^{k+1}] &\delta_{k+1/2}[T_{i}] &\\ 825 &&-{e_{2u}}_i^{k\ \ \ \:} &{A_{e}}_i^{k\ \ \ \:} 826 &{\ \ \;_i^k \mathbb{R}_{-1/2}^{+1/2}} &\delta_{i-1/2}[T^{k\ \ \ \:}] &\delta_{k+1/2}[T_{i}] &\\ 827 &&-{e_{2u}}_i^{k+1 } &{A_{e}}_i^{k+1} 828 &{_i^{k+1} \mathbb{R}_{+1/2}^{- 1/2}} &\delta_{i+1/2}[T^{k+1}] &\delta_{k+1/2}[T_{i}] &\\ 829 &&-{e_{2u}}_i^{k\ \ \ \:} &{A_{e}}_i^{k\ \ \ \:} 830 &{\ \ \;_i^k \mathbb{R}_{+1/2}^{+1/2}} &\delta_{i+1/2}[T^{k\ \ \ \:}] &\delta_{k+1/2}[T_{i}] 831 &\Bigr\} \\ 832 \end{matrix} 801 833 \end{align*} 802 834 The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{+1/2}}$ are the same but of opposite signs, … … 810 842 $i.e.$ the variance of the tracer is preserved by the discretisation of the skew fluxes. 811 843 844 \biblio 845 812 846 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/annex_iso.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 7 8 {\texorpdfstring{Iso-Neutral Diffusion and\\ Eddy Advection using Triads}{Iso-Neutral Diffusion and Eddy Advection using Triads}} 8 9 \label{apdx:triad} 10 9 11 \minitoc 10 \pagebreak 12 13 \newpage 14 11 15 \section{Choice of \protect\ngn{namtra\_ldf} namelist parameters} 12 16 %-----------------------------------------nam_traldf------------------------------------------------------ … … 59 63 \section{Triad formulation of iso-neutral diffusion} 60 64 \label{sec:iso} 65 61 66 We have implemented into \NEMO a scheme inspired by \citet{Griffies_al_JPO98}, 62 67 but formulated within the \NEMO framework, using scale factors rather than grid-sizes. 63 68 64 69 \subsection{Iso-neutral diffusion operator} 70 65 71 The iso-neutral second order tracer diffusive operator for small angles between 66 72 iso-neutral surfaces and geopotentials is given by \autoref{eq:iso_tensor_1}: 67 \begin{subequations} \label{eq:iso_tensor_1} 73 \begin{subequations} 74 \label{eq:iso_tensor_1} 68 75 \begin{equation} 69 76 D^{lT}=-\Div\vect{f}^{lT}\equiv … … 79 86 \mbox{with}\quad \;\;\Re = 80 87 \begin{pmatrix} 81 82 88 1 & 0 & -r_1 \mystrut \\ 89 0 & 1 & -r_2 \mystrut \\ 83 90 -r_1 & -r_2 & r_1 ^2+r_2 ^2 \mystrut 84 91 \end{pmatrix} … … 88 95 \frac{1}{e_2} \pd[T]{j} \mystrut \\ 89 96 \frac{1}{e_3} \pd[T]{k} \mystrut 90 \end{pmatrix}. 97 \end{pmatrix} 98 . 91 99 \end{equation} 92 100 \end{subequations} … … 99 107 \begin{align*} 100 108 r_1 &=-\frac{e_3 }{e_1 } \left( \frac{\partial \rho }{\partial i} 101 \right)102 \left( {\frac{\partial \rho }{\partial k}} \right)^{-1} \\103 &=-\frac{e_3 }{e_1 } \left( -\alpha\frac{\partial T }{\partial i} +104 \beta\frac{\partial S }{\partial i} \right) \left(105 -\alpha\frac{\partial T }{\partial k} + \beta\frac{\partial S106 }{\partial k} \right)^{-1}109 \right) 110 \left( {\frac{\partial \rho }{\partial k}} \right)^{-1} \\ 111 &=-\frac{e_3 }{e_1 } \left( -\alpha\frac{\partial T }{\partial i} + 112 \beta\frac{\partial S }{\partial i} \right) \left( 113 -\alpha\frac{\partial T }{\partial k} + \beta\frac{\partial S 114 }{\partial k} \right)^{-1} 107 115 \end{align*} 108 116 is the $i$-component of the slope of the iso-neutral surface relative to the computational surface, … … 110 118 111 119 We will find it useful to consider the fluxes per unit area in $i,j,k$ space; we write 112 \ begin{equation}113 \label{eq:Fijk}120 \[ 121 % \label{eq:Fijk} 114 122 \vect{F}_{\mathrm{iso}}=\left(f_1^{lT}e_2e_3, f_2^{lT}e_1e_3, f_3^{lT}e_1e_2\right). 115 \ end{equation}123 \] 116 124 Additionally, we will sometimes write the contributions towards the fluxes $\vect{f}$ and 117 125 $\vect{F}_{\mathrm{iso}}$ from the component $R_{ij}$ of $\Re$ as $f_{ij}$, $F_{\mathrm{iso}\: ij}$, … … 124 132 \label{eq:i13c} 125 133 f_{13}=&+\Alt r_1\frac{1}{e_3}\frac{\partial T}{\partial k},\qquad f_{23}=+\Alt r_2\frac{1}{e_3}\frac{\partial T}{\partial k}\\ 126 \intertext{and in the k-direction resulting from the lateral tracer gradients}134 \intertext{and in the k-direction resulting from the lateral tracer gradients} 127 135 \label{eq:i31c} 128 f_{31}+f_{32}=& \Alt r_1\frac{1}{e_1}\frac{\partial T}{\partial i}+\Alt r_2\frac{1}{e_1}\frac{\partial T}{\partial i}136 f_{31}+f_{32}=& \Alt r_1\frac{1}{e_1}\frac{\partial T}{\partial i}+\Alt r_2\frac{1}{e_1}\frac{\partial T}{\partial i} 129 137 \end{align} 130 138 … … 147 155 148 156 \subsection{Standard discretization} 157 149 158 The straightforward approach to discretize the lateral skew flux 150 159 \autoref{eq:i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995 into OPA, … … 155 164 noting that the $e_{{3}_{i+1/2}^k}$ in the area $e{_{3}}_{i+1/2}^k{e_{2}}_{i+1/2}i^k$ at the $u$-point cancels out with 156 165 the $1/{e_{3}}_{i+1/2}^k$ associated with the vertical tracer gradient, is then \autoref{eq:tra_ldf_iso} 157 \ begin{equation*}166 \[ 158 167 \left(F_u^{13} \right)_{i+\hhalf}^k = \Alts_{i+\hhalf}^k 159 168 {e_{2}}_{i+1/2}^k \overline{\overline 160 169 r_1} ^{\,i,k}\,\overline{\overline{\delta_k T}}^{\,i,k}, 161 \ end{equation*}170 \] 162 171 where 163 \ begin{equation*}172 \[ 164 173 \overline{\overline 165 r_1} ^{\,i,k} = -\frac{{e_{3u}}_{i+1/2}^k}{{e_{1u}}_{i+1/2}^k}174 r_1} ^{\,i,k} = -\frac{{e_{3u}}_{i+1/2}^k}{{e_{1u}}_{i+1/2}^k} 166 175 \frac{\delta_{i+1/2} [\rho]}{\overline{\overline{\delta_k \rho}}^{\,i,k}}, 167 \ end{equation*}176 \] 168 177 and here and in the following we drop the $^{lT}$ superscript from $\Alt$ for simplicity. 169 178 Unfortunately the resulting combination $\overline{\overline{\delta_k\bullet}}^{\,i,k}$ of a $k$ average and … … 177 186 178 187 \subsection{Expression of the skew-flux in terms of triad slopes} 188 179 189 \citep{Griffies_al_JPO98} introduce a different discretization of the off-diagonal terms that 180 190 nicely solves the problem. … … 182 192 % the mean vertical gradient at the $u$-point, 183 193 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 184 \begin{figure}[tb] \begin{center} 194 \begin{figure}[tb] 195 \begin{center} 185 196 \includegraphics[width=1.05\textwidth]{Fig_GRIFF_triad_fluxes} 186 \caption{ \protect\label{fig:ISO_triad} 197 \caption{ 198 \protect\label{fig:ISO_triad} 187 199 (a) Arrangement of triads $S_i$ and tracer gradients to 188 200 give lateral tracer flux from box $i,k$ to $i+1,k$ 189 201 (b) Triads $S'_i$ and tracer gradients to give vertical tracer flux from 190 box $i,k$ to $i,k+1$.} 191 \end{center} \end{figure} 202 box $i,k$ to $i,k+1$. 203 } 204 \end{center} 205 \end{figure} 192 206 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 193 207 They get the skew flux from the products of the vertical gradients at each $w$-point surrounding the $u$-point with … … 200 214 \label{eq:i13} 201 215 \left( F_u^{13} \right)_{i+\frac{1}{2}}^k = \Alts_{i+1}^k a_1 s_1 202 \delta 216 \delta_{k+\frac{1}{2}} \left[ T^{i+1} 203 217 \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}} + \Alts _i^k a_2 s_2 \delta 204 218 _{k+\frac{1}{2}} \left[ T^i 205 219 \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}} \\ 206 +\Alts _{i+1}^k a_3 s_3 \delta_{k-\frac{1}{2}} \left[ T^{i+1}220 +\Alts _{i+1}^k a_3 s_3 \delta_{k-\frac{1}{2}} \left[ T^{i+1} 207 221 \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}} +\Alts _i^k a_4 s_4 \delta 208 222 _{k-\frac{1}{2}} \left[ T^i \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}}, … … 218 232 \label{eq:i31} 219 233 \left( F_w^{31} \right) _i ^{k+\frac{1}{2}} = \Alts_i^{k+1} a_{1}' 220 s_{1}' \delta 221 +\Alts_i^{k+1} a_{2}' s_{2}' \delta _{i+\frac{1}{2}} \left[ T^{k+1} \right]/{e_{3u}}_{i+\frac{1}{2}}^{k+1}\\222 + \Alts_i^k a_{3}' s_{3}' \delta 223 +\Alts_i^k a_{4}' s_{4}' \delta 234 s_{1}' \delta_{i-\frac{1}{2}} \left[ T^{k+1} \right]/{e_{3u}}_{i-\frac{1}{2}}^{k+1} 235 +\Alts_i^{k+1} a_{2}' s_{2}' \delta_{i+\frac{1}{2}} \left[ T^{k+1} \right]/{e_{3u}}_{i+\frac{1}{2}}^{k+1} \\ 236 + \Alts_i^k a_{3}' s_{3}' \delta_{i-\frac{1}{2}} \left[ T^k\right]/{e_{3u}}_{i-\frac{1}{2}}^k 237 +\Alts_i^k a_{4}' s_{4}' \delta_{i+\frac{1}{2}} \left[ T^k \right]/{e_{3u}}_{i+\frac{1}{2}}^k. 224 238 \end{multline} 225 239 … … 242 256 243 257 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 244 \begin{figure}[tb] \begin{center} 258 \begin{figure}[tb] 259 \begin{center} 245 260 \includegraphics[width=0.80\textwidth]{Fig_GRIFF_qcells} 246 \caption{ \protect\label{fig:qcells} 261 \caption{ 262 \protect\label{fig:qcells} 247 263 Triad notation for quarter cells. $T$-cells are inside boxes, 248 264 while the $i+\half,k$ $u$-cell is shaded in green and 249 the $i,k+\half$ $w$-cell is shaded in pink.} 250 \end{center} \end{figure} 265 the $i,k+\half$ $w$-cell is shaded in pink. 266 } 267 \end{center} 268 \end{figure} 251 269 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 252 270 … … 266 284 267 285 \subsection{Full triad fluxes} 286 268 287 A key property of iso-neutral diffusion is that it should not affect the (locally referenced) density. 269 288 In particular there should be no lateral or vertical density flux. … … 275 294 - \left( \Alts_i^{k+1} a_{1} + \Alts_i^{k+1} a_{2} + \Alts_i^k 276 295 a_{3} + \Alts_i^k a_{4} \right) 277 \frac{\delta 296 \frac{\delta_{i+1/2} \left[ T^k\right]}{{e_{1u}}_{\,i+1/2}^{\,k}}, 278 297 \end{equation} 279 298 where the areas $a_i$ are as in \autoref{eq:i13}. … … 306 325 \label{eq:i33} 307 326 \left( F_w^{33} \right) _i^{k+\frac{1}{2}} = 308 327 - \left( \Alts_i^{k+1} a_{1}' s_{1}'^2 309 328 + \Alts_i^{k+1} a_{2}' s_{2}'^2 310 329 + \Alts_i^k a_{3}' s_{3}'^2 … … 318 337 _i^k {\mathbb{F}_w}_{i_p}^{k_p} (T) 319 338 &= \Alts_i^k{\: }_i^k{\mathbb{A}_w}_{i_p}^{k_p} 320 \left(339 \left( 321 340 {_i^k\mathbb{R}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} } 322 341 -\ \left({_i^k\mathbb{R}_{i_p}^{k_p}}\right)^2 \ 323 342 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} } 324 \right) \\343 \right) \\ 325 344 &= - \left(\left.{ }_i^k{\mathbb{A}_w}_{i_p}^{k_p}\right/{ }_i^k{\mathbb{A}_u}_{i_p}^{k_p}\right) 326 {_i^k\mathbb{R}_{i_p}^{k_p}}{\: }_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \label{eq:vertflux-triad2}345 {_i^k\mathbb{R}_{i_p}^{k_p}}{\: }_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \label{eq:vertflux-triad2} 327 346 \end{align} 328 347 may be associated with each triad. … … 338 357 the iso-neutral fluxes at $u$- and $w$-points as sums of the triad fluxes that cross the $u$- and $w$-faces: 339 358 %(\autoref{fig:ISO_triad}): 340 \begin{flalign} \label{eq:iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv 359 \begin{flalign} 360 \label{eq:iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv 341 361 \sum_{\substack{i_p,\,k_p}} 342 362 \begin{pmatrix} 343 {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ 344 \\ 345 {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T) \\ 363 {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ \\ 364 {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T) \\ 346 365 \end{pmatrix}. 347 366 \end{flalign} … … 369 388 \quad {b_T}_{i+i_p+1/2}^k\left(\frac{\partial T}{\partial 370 389 t}T\right)_{i+i_p+1/2}^k \\ 371 \begin{aligned}372 &= -T_{i+i_p-1/2}^k{\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \quad + \quad T_{i+i_p+1/2}^k373 {\;}_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \\374 &={\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], \label{eq:dvar_iso_i}375 \end{aligned}390 \begin{aligned} 391 &= -T_{i+i_p-1/2}^k{\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \quad + \quad T_{i+i_p+1/2}^k 392 {\;}_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \\ 393 &={\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], \label{eq:dvar_iso_i} 394 \end{aligned} 376 395 \end{multline} 377 396 while the vertical flux similarly drives a net rate of change of variance summed over 378 397 the $T$-points $i,k+k_p-\half$ (above) and $i,k+k_p+\half$ (below) of 379 398 \begin{equation} 380 \label{eq:dvar_iso_k}399 \label{eq:dvar_iso_k} 381 400 _i^k{\mathbb{F}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i]. 382 401 \end{equation} … … 385 404 \autoref{eq:latflux-triad} and \autoref{eq:vertflux-triad}, it is 386 405 \begin{multline*} 387 -\Alts_i^k\left \{388 { } _i^k{\mathbb{A}_u}_{i_p}^{k_p}389 \left(390 \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }391 - {_i^k\mathbb{R}_{i_p}^{k_p}} \392 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }\right)\,\delta_{i+ i_p}[T^k] \right.\\393 - \left. { } _i^k{\mathbb{A}_w}_{i_p}^{k_p}394 \left(395 \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }396 -{\:}_i^k\mathbb{R}_{i_p}^{k_p}397 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }398 \right) {\,}_i^k\mathbb{R}_{i_p}^{k_p}\delta_{k+ k_p}[T^i]399 \right \}.406 -\Alts_i^k\left \{ 407 { } _i^k{\mathbb{A}_u}_{i_p}^{k_p} 408 \left( 409 \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} } 410 - {_i^k\mathbb{R}_{i_p}^{k_p}} \ 411 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }\right)\,\delta_{i+ i_p}[T^k] \right.\\ 412 - \left. { } _i^k{\mathbb{A}_w}_{i_p}^{k_p} 413 \left( 414 \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} } 415 -{\:}_i^k\mathbb{R}_{i_p}^{k_p} 416 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} } 417 \right) {\,}_i^k\mathbb{R}_{i_p}^{k_p}\delta_{k+ k_p}[T^i] 418 \right \}. 400 419 \end{multline*} 401 420 The key point is then that if we require $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$ and $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$ to … … 431 450 where, within each triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$, the lateral and vertical fluxes/unit area 432 451 \[ 433 \mathbf{F}=\left(434 \left.{}_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\right/{}_i^k{\mathbb{A}_u}_{i_p}^{k_p},435 \left.{\:}_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)\right/{}_i^k{\mathbb{A}_w}_{i_p}^{k_p}436 \right)452 \mathbf{F}=\left( 453 \left.{}_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\right/{}_i^k{\mathbb{A}_u}_{i_p}^{k_p}, 454 \left.{\:}_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)\right/{}_i^k{\mathbb{A}_w}_{i_p}^{k_p} 455 \right) 437 456 \] 438 457 and the gradient 439 \[\nabla T = \left( 440 \left.\delta_{i+ i_p}[T^k] \right/ {e_{1u}}_{\,i + i_p}^{\,k}, 441 \left.\delta_{k+ k_p}[T^i] \right/ {e_{3w}}_{\,i}^{\,k + k_p} 442 \right) 458 \[ 459 \nabla T = \left( 460 \left.\delta_{i+ i_p}[T^k] \right/ {e_{1u}}_{\,i + i_p}^{\,k}, 461 \left.\delta_{k+ k_p}[T^i] \right/ {e_{3w}}_{\,i}^{\,k + k_p} 462 \right) 443 463 \] 444 464 445 465 \subsection{Triad volumes in Griffes's scheme and in \NEMO} 466 446 467 To complete the discretization we now need only specify the triad volumes $_i^k\mathbb{V}_{i_p}^{k_p}$. 447 468 \citet{Griffies_al_JPO98} identifies these $_i^k\mathbb{V}_{i_p}^{k_p}$ as the volumes of the quarter cells, … … 460 481 \begin{equation} 461 482 \label{eq:lat-normal} 462 -\overline\Alts_{\,i+1/2}^k\;463 \frac{{b_u}_{i+1/2}^k}{{e_{1u}}_{\,i + i_p}^{\,k}}464 \;\frac{\delta_{i+ 1/2}[T^k] }{{e_{1u}}_{\,i + i_p}^{\,k}}465 = -\overline\Alts_{\,i+1/2}^k\;\frac{{e_{1w}}_{\,i + 1/2}^{\,k}\:{e_{1v}}_{\,i + 1/2}^{\,k}\;\delta_{i+ 1/2}[T^k]}{{e_{1u}}_{\,i + 1/2}^{\,k}}.483 -\overline\Alts_{\,i+1/2}^k\; 484 \frac{{b_u}_{i+1/2}^k}{{e_{1u}}_{\,i + i_p}^{\,k}} 485 \;\frac{\delta_{i+ 1/2}[T^k] }{{e_{1u}}_{\,i + i_p}^{\,k}} 486 = -\overline\Alts_{\,i+1/2}^k\;\frac{{e_{1w}}_{\,i + 1/2}^{\,k}\:{e_{1v}}_{\,i + 1/2}^{\,k}\;\delta_{i+ 1/2}[T^k]}{{e_{1u}}_{\,i + 1/2}^{\,k}}. 466 487 \end{equation} 467 488 In fact if the diffusive coefficient is defined at $u$-points, … … 471 492 472 493 \subsection{Summary of the scheme} 494 473 495 The iso-neutral fluxes at $u$- and $w$-points are the sums of the triad fluxes that 474 496 cross the $u$- and $w$-faces \autoref{eq:iso_flux}: 475 \begin{subequations}\label{eq:alltriadflux} 476 \begin{flalign}\label{eq:vect_isoflux} 497 \begin{subequations} 498 % \label{eq:alltriadflux} 499 \begin{flalign*} 500 % \label{eq:vect_isoflux} 477 501 \vect{F}_{\mathrm{iso}}(T) &\equiv 478 502 \sum_{\substack{i_p,\,k_p}} 479 503 \begin{pmatrix} 480 {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ 481 \\ 482 {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T) 504 {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ \\ 505 {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T) 483 506 \end{pmatrix}, 484 \end{flalign }507 \end{flalign*} 485 508 where \autoref{eq:latflux-triad}: 486 509 \begin{align} 487 510 \label{eq:triadfluxu} 488 511 _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) &= - \Alts_i^k{ 489 \:}\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{1u}}_{\,i + i_p}^{\,k}}490 \left(491 \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }492 -\ {_i^k\mathbb{R}_{i_p}^{k_p}} \493 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }494 \right),\\512 \:}\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{1u}}_{\,i + i_p}^{\,k}} 513 \left( 514 \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} } 515 -\ {_i^k\mathbb{R}_{i_p}^{k_p}} \ 516 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} } 517 \right),\\ 495 518 \intertext{and} 496 519 _i^k {\mathbb{F}_w}_{i_p}^{k_p} (T) 497 &= \Alts_i^k{\: }\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{3w}}_{\,i}^{\,k+k_p}}498 \left(499 {_i^k\mathbb{R}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }500 -\ \left({_i^k\mathbb{R}_{i_p}^{k_p}}\right)^2 \501 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }502 \right),\label{eq:triadfluxw}520 &= \Alts_i^k{\: }\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{3w}}_{\,i}^{\,k+k_p}} 521 \left( 522 {_i^k\mathbb{R}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} } 523 -\ \left({_i^k\mathbb{R}_{i_p}^{k_p}}\right)^2 \ 524 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} } 525 \right),\label{eq:triadfluxw} 503 526 \end{align} 504 527 with \autoref{eq:V-NEMO} 505 \ begin{equation}506 \label{eq:V-NEMO2}528 \[ 529 % \label{eq:V-NEMO2} 507 530 _i^k{\mathbb{V}}_{i_p}^{k_p}=\quarter {b_u}_{i+i_p}^k. 508 \ end{equation}531 \] 509 532 \end{subequations} 510 533 511 534 The divergence of the expression \autoref{eq:iso_flux} for the fluxes gives the iso-neutral diffusion tendency at 512 535 each tracer point: 513 \begin{equation} \label{eq:iso_operator} D_l^T = \frac{1}{b_T} 536 \[ 537 % \label{eq:iso_operator} 538 D_l^T = \frac{1}{b_T} 514 539 \sum_{\substack{i_p,\,k_p}} \left\{ \delta_{i} \left[{_{i+1/2-i_p}^k 515 540 {\mathbb{F}_u }_{i_p}^{k_p}} \right] + \delta_{k} \left[ 516 541 {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right] \right\} 517 \ end{equation}542 \] 518 543 where $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells. 519 544 The diffusion scheme satisfies the following six properties: … … 522 547 The discretization of the diffusion operator recovers the traditional five-point Laplacian 523 548 \autoref{eq:lat-normal} in the limit of flat iso-neutral direction: 524 \begin{equation} \label{eq:iso_property0} D_l^T = \frac{1}{b_T} \ 549 \[ 550 % \label{eq:iso_property0} 551 D_l^T = \frac{1}{b_T} \ 525 552 \delta_{i} \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; 526 553 \overline\Alts^{\,i} \; \delta_{i+1/2}[T] \right] \qquad 527 554 \text{when} \quad { _i^k \mathbb{R}_{i_p}^{k_p} }=0 528 \ end{equation}555 \] 529 556 530 557 \item[$\bullet$ implicit treatment in the vertical] … … 534 561 solve the vertical diffusion equation. 535 562 This is necessary since the vertical eddy diffusivity associated with this term, 536 \ begin{equation}563 \[ 537 564 \frac{1}{b_w}\sum_{\substack{i_p, \,k_p}} \left\{ 538 565 {\:}_i^k\mathbb{V}_{i_p}^{k_p} \: \Alts_i^k \: \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2 … … 541 568 {b_u}_{i+i_p}^k\: \Alts_i^k \: \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2 542 569 \right\}, 543 \ end{equation}570 \] 544 571 (where $b_w= e_{1w}\,e_{2w}\,e_{3w}$ is the volume of $w$-cells) can be quite large. 545 572 … … 550 577 \item[$\bullet$ conservation of tracer] 551 578 The iso-neutral diffusion conserves tracer content, $i.e.$ 552 \begin{equation} \label{eq:iso_property1} \sum_{i,j,k} \left\{ D_l^T \ 553 b_T \right\} = 0 554 \end{equation} 579 \[ 580 % \label{eq:iso_property1} 581 \sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0 582 \] 555 583 This property is trivially satisfied since the iso-neutral diffusive operator is written in flux form. 556 584 557 585 \item[$\bullet$ no increase of tracer variance] 558 586 The iso-neutral diffusion does not increase the tracer variance, $i.e.$ 559 \begin{equation} \label{eq:iso_property2} \sum_{i,j,k} \left\{ T \ D_l^T 560 \ b_T \right\} \leq 0 561 \end{equation} 587 \[ 588 % \label{eq:iso_property2} 589 \sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0 590 \] 562 591 The property is demonstrated in \autoref{subsec:variance} above. 563 592 It is a key property for a diffusion term. … … 569 598 \item[$\bullet$ self-adjoint operator] 570 599 The iso-neutral diffusion operator is self-adjoint, $i.e.$ 571 \begin{equation} \label{eq:iso_property3} \sum_{i,j,k} \left\{ S \ D_l^T 572 \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\} 600 \begin{equation} 601 \label{eq:iso_property3} 602 \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\} 573 603 \end{equation} 574 604 In other word, there is no need to develop a specific routine from the adjoint of this operator. … … 578 608 can be found by replacing $\delta[T]$ by $\delta[S]$ in \autoref{eq:dvar_iso_i} and \autoref{eq:dvar_iso_k}. 579 609 This results in a term similar to \autoref{eq:perfect-square}, 580 \begin{equation} 581 \label{eq:TScovar}582 - \Alts_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p}583 \left(584 \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }585 -{\:}_i^k\mathbb{R}_{i_p}^{k_p}586 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }587 \right)588 \left(589 \frac{ \delta_{i+ i_p}[S^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }590 -{\:}_i^k\mathbb{R}_{i_p}^{k_p}591 \frac{ \delta_{k+k_p} [S^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }592 \right).593 \end{equation} 610 \[ 611 % \label{eq:TScovar} 612 - \Alts_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p} 613 \left( 614 \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} } 615 -{\:}_i^k\mathbb{R}_{i_p}^{k_p} 616 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} } 617 \right) 618 \left( 619 \frac{ \delta_{i+ i_p}[S^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} } 620 -{\:}_i^k\mathbb{R}_{i_p}^{k_p} 621 \frac{ \delta_{k+k_p} [S^i] }{{e_{3w}}_{\,i}^{\,k+k_p} } 622 \right). 623 \] 594 624 This is symmetrical in $T $ and $S$, so exactly the same term arises from 595 625 the discretization of this triad's contribution towards the RHS of \autoref{eq:iso_property3}. 596 626 \end{description} 597 627 598 \subsection{Treatment of the triads at the boundaries}\label{sec:iso_bdry} 628 \subsection{Treatment of the triads at the boundaries} 629 \label{sec:iso_bdry} 630 599 631 The triad slope can only be defined where both the grid boxes centred at the end of the arms exist. 600 632 Triads that would poke up through the upper ocean surface into the atmosphere, … … 618 650 For setups with topography without bbl mixing, \np{ln\_botmix\_triad}\forcode{ = .true.} may be necessary. 619 651 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 620 \begin{figure}[h] \begin{center} 652 \begin{figure}[h] 653 \begin{center} 621 654 \includegraphics[width=0.60\textwidth]{Fig_GRIFF_bdry_triads} 622 \caption{ \protect\label{fig:bdry_triads} 655 \caption{ 656 \protect\label{fig:bdry_triads} 623 657 (a) Uppermost model layer $k=1$ with $i,1$ and $i+1,1$ tracer points (black dots), 624 658 and $i+1/2,1$ $u$-point (blue square). … … 627 661 However, the lateral $_{11}$ contributions towards $\triad[u]{i}{1}{F}{1/2}{-1/2}$ and 628 662 $\triad[u]{i+1}{1}{F}{-1/2}{-1/2}$ (yellow line) are still applied, 629 giving diapycnal diffusive fluxes.\newline 663 giving diapycnal diffusive fluxes. 664 \newline 630 665 (b) Both near bottom triad slopes $\triad{i}{k}{R}{1/2}{1/2}$ and 631 666 $\triad{i+1}{k}{R}{-1/2}{1/2}$ are masked when either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, … … 633 668 The associated lateral fluxes (grey-black dashed line) are masked if 634 669 \protect\np{botmix\_triad}\forcode{ = .false.}, but left unmasked, 635 giving bottom mixing, if \protect\np{botmix\_triad}\forcode{ = .true.}} 636 \end{center} \end{figure} 670 giving bottom mixing, if \protect\np{botmix\_triad}\forcode{ = .true.} 671 } 672 \end{center} 673 \end{figure} 637 674 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> 638 675 639 \subsection{ Limiting of the slopes within the interior}\label{sec:limit} 676 \subsection{ Limiting of the slopes within the interior} 677 \label{sec:limit} 678 640 679 As discussed in \autoref{subsec:LDF_slp_iso}, 641 680 iso-neutral slopes relative to geopotentials must be bounded everywhere, … … 647 686 (here the $\sigma_i$ are the slopes of the coordinate surfaces relative to geopotentials) 648 687 \autoref{eq:PE_slopes_eiv} rather than the slope $r_i$ relative to coordinate surfaces, so we require 649 \ begin{equation*}688 \[ 650 689 |\tilde{r}_i|\leq \tilde{r}_\mathrm{max}=0.01. 651 \ end{equation*}690 \] 652 691 and then recalculate the slopes $r_i$ relative to coordinates. 653 692 Each individual triad slope … … 663 702 and so acts to reduce gravitational potential energy. 664 703 665 \subsection{Tapering within the surface mixed layer}\label{sec:taper} 704 \subsection{Tapering within the surface mixed layer} 705 \label{sec:taper} 706 666 707 Additional tapering of the iso-neutral fluxes is necessary within the surface mixed layer. 667 708 When the Griffies triads are used, we offer two options for this. 668 709 669 \subsubsection{Linear slope tapering within the surface mixed layer}\label{sec:lintaper} 710 \subsubsection{Linear slope tapering within the surface mixed layer} 711 \label{sec:lintaper} 712 670 713 This is the option activated by the default choice \np{ln\_triad\_iso}\forcode{ = .false.}. 671 714 Slopes $\tilde{r}_i$ relative to geopotentials are tapered linearly from their value immediately below 672 715 the mixed layer to zero at the surface, as described in option (c) of \autoref{fig:eiv_slp}, to values 673 \begin{subequations} 674 \begin{equation} 675 \label{eq:rmtilde} 676 \rMLt = 677 -\frac{z}{h}\left.\tilde{r}_i\right|_{z=-h}\quad \text{ for } z>-h, 678 \end{equation} 679 and then the $r_i$ relative to vertical coordinate surfaces are appropriately adjusted to 680 \begin{equation} 681 \label{eq:rm} 682 \rML =\rMLt -\sigma_i \quad \text{ for } z>-h. 683 \end{equation} 684 \end{subequations} 716 \begin{equation} 717 \label{eq:rmtilde} 718 \rMLt = -\frac{z}{h}\left.\tilde{r}_i\right|_{z=-h}\quad \text{ for } z>-h, 719 \end{equation} 720 and then the $r_i$ relative to vertical coordinate surfaces are appropriately adjusted to 721 \[ 722 % \label{eq:rm} 723 \rML =\rMLt -\sigma_i \quad \text{ for } z>-h. 724 \] 685 725 Thus the diffusion operator within the mixed layer is given by: 686 \begin{equation} \label{eq:iso_tensor_ML} 687 D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 688 \mbox{with}\quad \;\;\Re =\left( {{\begin{array}{*{20}c} 689 1 \hfill & 0 \hfill & {-\rML[1]}\hfill \\ 690 0 \hfill & 1 \hfill & {-\rML[2]} \hfill \\ 691 {-\rML[1]}\hfill & {-\rML[2]} \hfill & {\rML[1]^2+\rML[2]^2} \hfill 692 \end{array} }} \right) 693 \end{equation} 726 \[ 727 % \label{eq:iso_tensor_ML} 728 D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 729 \mbox{with}\quad \;\;\Re =\left( {{ 730 \begin{array}{*{20}c} 731 1 \hfill & 0 \hfill & {-\rML[1]}\hfill \\ 732 0 \hfill & 1 \hfill & {-\rML[2]} \hfill \\ 733 {-\rML[1]}\hfill & {-\rML[2]} \hfill & {\rML[1]^2+\rML[2]^2} \hfill 734 \end{array} 735 }} \right) 736 \] 694 737 695 738 This slope tapering gives a natural connection between tracer in the mixed-layer and … … 726 769 these basal triad slopes ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ are representative of the thermocline. 727 770 The four basal triads defined in the bottom part of \autoref{fig:MLB_triad} are then 728 \begin{align} 729 {\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p} &= 730 {\:}^{k_{\mathrm{ML}}-k_p-1/2}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}, \label{eq:Rbase} 731 \\ 732 \intertext{with e.g.\ the green triad} 733 {\:}_i{\mathbb{R}_{\mathrm{base}}}_{1/2}^{-1/2}&= 734 {\:}^{k_{\mathrm{ML}}}_i{\mathbb{R}_{\mathrm{base}}}_{\,1/2}^{-1/2}. \notag 735 \end{align} 771 \begin{align*} 772 {\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p} &= 773 {\:}^{k_{\mathrm{ML}}-k_p-1/2}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}, 774 % \label{eq:Rbase} 775 \\ 776 \intertext{with e.g.\ the green triad} 777 {\:}_i{\mathbb{R}_{\mathrm{base}}}_{1/2}^{-1/2}&= 778 {\:}^{k_{\mathrm{ML}}}_i{\mathbb{R}_{\mathrm{base}}}_{\,1/2}^{-1/2}. 779 \end{align*} 736 780 The vertical flux associated with each of these triads passes through 737 781 the $w$-point $i,k_{\mathrm{ML}}-1/2$ lying \emph{below} the $i,k_{\mathrm{ML}}$ tracer point, so it is this depth 738 \ begin{equation}739 \label{eq:zbase}782 \[ 783 % \label{eq:zbase} 740 784 {z_\mathrm{base}}_{\,i}={z_{w}}_{k_\mathrm{ML}-1/2} 741 \ end{equation}785 \] 742 786 one gridbox deeper than the diagnosed ML depth $z_{\mathrm{ML}})$ that sets the $h$ used to taper the slopes in 743 787 \autoref{eq:rmtilde}. … … 747 791 the ratio of the depth of the $w$-point ${z_w}_{k+k_p}$ to ${z_{\mathrm{base}}}_{\,i}$. 748 792 For instance the green triad centred on $i,k$ 749 \begin{align}750 {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,1/2}^{-1/2} &=751 \frac{{z_w}_{k-1/2}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,1/2}^{-1/2} 752 \notag \\ 753 \intertext{and more generally} 754 {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p} &=755 \frac{{z_w}_{k+k_p}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}.\label{eq:RML}756 \end{align}793 \begin{align*} 794 {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,1/2}^{-1/2} &= 795 \frac{{z_w}_{k-1/2}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,1/2}^{-1/2} \\ 796 \intertext{and more generally} 797 {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p} &= 798 \frac{{z_w}_{k+k_p}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}. 799 % \label{eq:RML} 800 \end{align*} 757 801 \end{enumerate} 758 802 … … 760 804 \begin{figure}[h] 761 805 % \fcapside { 762 \caption{\protect\label{fig:MLB_triad} 806 \caption{ 807 \protect\label{fig:MLB_triad} 763 808 Definition of mixed-layer depth and calculation of linearly tapered triads. 764 809 The figure shows a water column at a given $i,j$ (simplified to $i$), with the ocean surface at the top. 765 810 Tracer points are denoted by bullets, and black lines the edges of the tracer cells; 766 $k$ increases upwards. \newline 811 $k$ increases upwards. 812 \newline 767 813 \hspace{5 em} 768 814 We define the mixed-layer by setting the vertical index of the tracer point immediately below the mixed layer, … … 776 822 Triads with different $i_p,k_p$, denoted by different colours, 777 823 (e.g. the green triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.} 778 %}779 {\includegraphics[width=0.60\textwidth]{Fig_GRIFF_MLB_triads}}824 % } 825 \includegraphics[width=0.60\textwidth]{Fig_GRIFF_MLB_triads} 780 826 \end{figure} 781 827 % >>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 783 829 \subsubsection{Additional truncation of skew iso-neutral flux components} 784 830 \label{subsec:Gerdes-taper} 831 785 832 The alternative option is activated by setting \np{ln\_triad\_iso} = true. 786 833 This retains the same tapered slope $\rML$ described above for the calculation of the $_{33}$ term of … … 792 839 \end{equation} 793 840 giving a ML diffusive operator 794 \begin{equation} \label{eq:iso_tensor_ML2} 795 D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 796 \mbox{with}\quad \;\;\Re =\left( {{\begin{array}{*{20}c} 797 1 \hfill & 0 \hfill & {-\rML[1]^*}\hfill \\ 798 0 \hfill & 1 \hfill & {-\rML[2]^*} \hfill \\ 799 {-\rML[1]^*}\hfill & {-\rML[2]^*} \hfill & {\rML[1]^2+\rML[2]^2} \hfill \\ 800 \end{array} }} \right). 801 \end{equation} 841 \[ 842 % \label{eq:iso_tensor_ML2} 843 D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 844 \mbox{with}\quad \;\;\Re =\left( {{ 845 \begin{array}{*{20}c} 846 1 \hfill & 0 \hfill & {-\rML[1]^*}\hfill \\ 847 0 \hfill & 1 \hfill & {-\rML[2]^*} \hfill \\ 848 {-\rML[1]^*}\hfill & {-\rML[2]^*} \hfill & {\rML[1]^2+\rML[2]^2} \hfill \\ 849 \end{array} 850 }} \right). 851 \] 802 852 This operator 803 853 \footnote{ 804 854 To ensure good behaviour where horizontal density gradients are weak, 805 855 we in fact follow \citet{Gerdes1991} and 806 set $\rML^*=\mathrm{sgn}(\tilde{r}_i)\min(|\rMLt^2/\tilde{r}_i|,|\tilde{r}_i|)-\sigma_i$.} 856 set $\rML^*=\mathrm{sgn}(\tilde{r}_i)\min(|\rMLt^2/\tilde{r}_i|,|\tilde{r}_i|)-\sigma_i$. 857 } 807 858 then has the property it gives no vertical density flux, and so does not change the potential energy. 808 859 This approach is similar to multiplying the iso-neutral diffusion coefficient by … … 821 872 % Skew flux formulation for Eddy Induced Velocity : 822 873 % ================================================================ 823 \section{Eddy induced advection formulated as a skew flux}\label{sec:skew-flux} 824 825 \subsection{Continuous skew flux formulation}\label{sec:continuous-skew-flux} 874 \section{Eddy induced advection formulated as a skew flux} 875 \label{sec:skew-flux} 876 877 \subsection{Continuous skew flux formulation} 878 \label{sec:continuous-skew-flux} 826 879 827 880 When Gent and McWilliams's [1990] diffusion is used, an additional advection term is added. … … 833 886 834 887 The eddy induced velocity is given by: 835 \begin{subequations} \label{eq:eiv} 836 \begin{equation}\label{eq:eiv_v} 837 \begin{split} 838 u^* & = - \frac{1}{e_{3}}\; \partial_i\psi_1, \\ 839 v^* & = - \frac{1}{e_{3}}\; \partial_j\psi_2, \\ 840 w^* & = \frac{1}{e_{1}e_{2}}\; \left\{ \partial_i \left( e_{2} \, \psi_1\right) 841 + \partial_j \left( e_{1} \, \psi_2\right) \right\}, 842 \end{split} 843 \end{equation} 844 where the streamfunctions $\psi_i$ are given by 845 \begin{equation} \label{eq:eiv_psi} 846 \begin{split} 847 \psi_1 & = A_{e} \; \tilde{r}_1, \\ 848 \psi_2 & = A_{e} \; \tilde{r}_2, 849 \end{split} 850 \end{equation} 888 \begin{subequations} 889 % \label{eq:eiv} 890 \begin{equation} 891 \label{eq:eiv_v} 892 \begin{split} 893 u^* & = - \frac{1}{e_{3}}\; \partial_i\psi_1, \\ 894 v^* & = - \frac{1}{e_{3}}\; \partial_j\psi_2, \\ 895 w^* & = \frac{1}{e_{1}e_{2}}\; \left\{ \partial_i \left( e_{2} \, \psi_1\right) 896 + \partial_j \left( e_{1} \, \psi_2\right) \right\}, 897 \end{split} 898 \end{equation} 899 where the streamfunctions $\psi_i$ are given by 900 \begin{equation} 901 \label{eq:eiv_psi} 902 \begin{split} 903 \psi_1 & = A_{e} \; \tilde{r}_1, \\ 904 \psi_2 & = A_{e} \; \tilde{r}_2, 905 \end{split} 906 \end{equation} 851 907 \end{subequations} 852 908 with $A_{e}$ the eddy induced velocity coefficient, … … 868 924 the tracer advective fluxes per unit area in $ijk$ space can be transformed as follows: 869 925 \begin{flalign*} 870 \begin{split}871 \textbf{F}_{\mathrm{eiv}}^T =872 \begin{pmatrix}873 {e_{2}\,e_{3}\; u^*}\\874 {e_{1}\,e_{2}\; w^*} \\875 \end{pmatrix} \; T876 &=877 \begin{pmatrix}878 { - \partial_k \left( e_{2} \,\psi_1 \right) \; T \;}\\879 {+ \partial_i \left( e_{2} \, \psi_1 \right) \; T \;} \\880 \end{pmatrix} \\881 &=882 \begin{pmatrix}883 { - \partial_k \left( e_{2} \, \psi_1 \; T \right) \;}\\884 {+ \partial_i \left( e_{2} \,\psi_1 \; T \right) \;} \\885 \end{pmatrix}886 +887 \begin{pmatrix}888 {+ e_{2} \, \psi_1 \; \partial_k T}\\889 { - e_{2} \, \psi_1 \; \partial_i T} \\890 \end{pmatrix}891 \end{split}926 \begin{split} 927 \textbf{F}_{\mathrm{eiv}}^T = 928 \begin{pmatrix} 929 {e_{2}\,e_{3}\; u^*} \\ 930 {e_{1}\,e_{2}\; w^*} 931 \end{pmatrix} \; T 932 &= 933 \begin{pmatrix} 934 { - \partial_k \left( e_{2} \,\psi_1 \right) \; T \;} \\ 935 {+ \partial_i \left( e_{2} \, \psi_1 \right) \; T \;} 936 \end{pmatrix} \\ 937 &= 938 \begin{pmatrix} 939 { - \partial_k \left( e_{2} \, \psi_1 \; T \right) \;} \\ 940 {+ \partial_i \left( e_{2} \,\psi_1 \; T \right) \;} 941 \end{pmatrix} 942 + 943 \begin{pmatrix} 944 {+ e_{2} \, \psi_1 \; \partial_k T} \\ 945 { - e_{2} \, \psi_1 \; \partial_i T} 946 \end{pmatrix} 947 \end{split} 892 948 \end{flalign*} 893 949 and since the eddy induced velocity field is non-divergent, 894 950 we end up with the skew form of the eddy induced advective fluxes per unit area in $ijk$ space: 895 \begin{equation} \label{eq:eiv_skew_ijk} 896 \textbf{F}_\mathrm{eiv}^T = \begin{pmatrix} 897 {+ e_{2} \, \psi_1 \; \partial_k T} \\ 898 { - e_{2} \, \psi_1 \; \partial_i T} \\ 899 \end{pmatrix} 951 \begin{equation} 952 \label{eq:eiv_skew_ijk} 953 \textbf{F}_\mathrm{eiv}^T = 954 \begin{pmatrix} 955 {+ e_{2} \, \psi_1 \; \partial_k T} \\ 956 { - e_{2} \, \psi_1 \; \partial_i T} 957 \end{pmatrix} 900 958 \end{equation} 901 959 The total fluxes per unit physical area are then 902 \begin{equation} \label{eq:eiv_skew_physical}903 \begin{split}904 f^*_1 & = \frac{1}{e_{3}}\; \psi_1 \partial_k T \\905 f^*_2 & = \frac{1}{e_{3}}\; \psi_2\partial_k T \\906 f^*_3 & = -\frac{1}{e_{1}e_{2}}\; \left\{ e_{2} \psi_1 \partial_i T907 + e_{1} \psi_2 \partial_j T \right\}. \\960 \begin{equation} 961 \label{eq:eiv_skew_physical} 962 \begin{split} 963 f^*_1 & = \frac{1}{e_{3}}\; \psi_1 \partial_k T \\ 964 f^*_2 & = \frac{1}{e_{3}}\; \psi_2 \partial_k T \\ 965 f^*_3 & = -\frac{1}{e_{1}e_{2}}\; \left\{ e_{2} \psi_1 \partial_i T + e_{1} \psi_2 \partial_j T \right\}. 908 966 \end{split} 909 967 \end{equation} … … 913 971 The tendency associated with eddy induced velocity is then simply the convergence of the fluxes 914 972 (\autoref{eq:eiv_skew_ijk}, \autoref{eq:eiv_skew_physical}), so 915 \begin{equation} \label{eq:skew_eiv_conv} 916 \frac{\partial T}{\partial t}= -\frac{1}{e_1 \, e_2 \, e_3 } \left[ 917 \frac{\partial}{\partial i} \left( e_2 \psi_1 \partial_k T\right) 918 + \frac{\partial}{\partial j} \left( e_1 \; 919 \psi_2 \partial_k T\right) 920 - \frac{\partial}{\partial k} \left( e_{2} \psi_1 \partial_i T 921 + e_{1} \psi_2 \partial_j T \right) \right] 922 \end{equation} 973 \[ 974 % \label{eq:skew_eiv_conv} 975 \frac{\partial T}{\partial t}= -\frac{1}{e_1 \, e_2 \, e_3 } \left[ 976 \frac{\partial}{\partial i} \left( e_2 \psi_1 \partial_k T\right) 977 + \frac{\partial}{\partial j} \left( e_1 \; 978 \psi_2 \partial_k T\right) 979 - \frac{\partial}{\partial k} \left( e_{2} \psi_1 \partial_i T 980 + e_{1} \psi_2 \partial_j T \right) \right] 981 \] 923 982 It naturally conserves the tracer content, as it is expressed in flux form. 924 983 Since it has the same divergence as the advective form it also preserves the tracer variance. 925 984 926 985 \subsection{Discrete skew flux formulation} 986 927 987 The skew fluxes in (\autoref{eq:eiv_skew_physical}, \autoref{eq:eiv_skew_ijk}), 928 988 like the off-diagonal terms (\autoref{eq:i13c}, \autoref{eq:i31c}) of the small angle diffusion tensor, … … 934 994 defining $A_e$ at $T$-points is then given by: 935 995 936 937 \begin{subequations}\label{eq:allskewflux}938 \begin{flalign }\label{eq:vect_skew_flux}939 \vect{F}_{\mathrm{eiv}}(T) &\equiv940 \ sum_{\substack{i_p,\,k_p}}996 \begin{subequations} 997 % \label{eq:allskewflux} 998 \begin{flalign*} 999 % \label{eq:vect_skew_flux} 1000 \vect{F}_{\mathrm{eiv}}(T) &\equiv \sum_{\substack{i_p,\,k_p}} 941 1001 \begin{pmatrix} 942 {_{i+1/2-i_p}^k {\mathbb{S}_u}_{i_p}^{k_p} } (T) \\ 943 \\ 1002 {_{i+1/2-i_p}^k {\mathbb{S}_u}_{i_p}^{k_p} } (T) \\ \\ 944 1003 {_i^{k+1/2-k_p} {\mathbb{S}_w}_{i_p}^{k_p} } (T) \\ 945 1004 \end{pmatrix}, 946 \end{flalign }1005 \end{flalign*} 947 1006 where the skew flux in the $i$-direction associated with a given triad is (\autoref{eq:latflux-triad}, 948 1007 \autoref{eq:triadfluxu}): … … 950 1009 \label{eq:skewfluxu} 951 1010 _i^k {\mathbb{S}_u}_{i_p}^{k_p} (T) &= + \quarter {A_e}_i^k{ 952 \:}\frac{{b_u}_{i+i_p}^k}{{e_{1u}}_{\,i + i_p}^{\,k}} 953 \ {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}} \ 954 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }, 955 \\ 956 \intertext{and \autoref{eq:triadfluxw} in the $k$-direction, changing the sign 957 to be consistent with \autoref{eq:eiv_skew_ijk}:} 1011 \:}\frac{{b_u}_{i+i_p}^k}{{e_{1u}}_{\,i + i_p}^{\,k}} 1012 \ {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}} \ 1013 \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }, \\ 1014 \intertext{ 1015 and \autoref{eq:triadfluxw} in the $k$-direction, changing the sign 1016 to be consistent with \autoref{eq:eiv_skew_ijk}: 1017 } 958 1018 _i^k {\mathbb{S}_w}_{i_p}^{k_p} (T) 959 &= -\quarter {A_e}_i^k{\: }\frac{{b_u}_{i+i_p}^k}{{e_{3w}}_{\,i}^{\,k+k_p}}960 {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }.\label{eq:skewfluxw}1019 &= -\quarter {A_e}_i^k{\: }\frac{{b_u}_{i+i_p}^k}{{e_{3w}}_{\,i}^{\,k+k_p}} 1020 {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }.\label{eq:skewfluxw} 961 1021 \end{align} 962 1022 \end{subequations} … … 966 1026 967 1027 \subsubsection{No change in tracer variance} 1028 968 1029 The discretization conserves tracer variance, $i.e.$ it does not include a diffusive component but is a `pure' advection term. 969 1030 This can be seen %either from Appendix \autoref{apdx:eiv_skew} or … … 973 1034 summed over the two $T$-points $i+i_p-\half,k$ and $i+i_p+\half,k$, of 974 1035 \begin{equation} 975 \label{eq:dvar_eiv_i}1036 \label{eq:dvar_eiv_i} 976 1037 _i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], 977 1038 \end{equation} … … 979 1040 the $T$-points $i,k+k_p-\half$ (above) and $i,k+k_p+\half$ (below) of 980 1041 \begin{equation} 981 \label{eq:dvar_eiv_k}1042 \label{eq:dvar_eiv_k} 982 1043 _i^k{\mathbb{S}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i]. 983 1044 \end{equation} … … 987 1048 988 1049 \subsubsection{Reduction in gravitational PE} 1050 989 1051 The vertical density flux associated with the vertical skew-flux always has the same sign as 990 1052 the vertical density gradient; … … 999 1061 {\mathbb{S}_w}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k 1000 1062 {\mathbb{S}_w}_{i_p}^{k_p} (S) \right]. \notag \\ 1001 \intertext{Substituting ${\:}_i^k {\mathbb{S}_w}_{i_p}^{k_p}$ from 1002 \autoref{eq:skewfluxw}, gives} 1003 % and separating out 1004 % $\rtriadt{R}=\rtriad{R} + \delta_{i+i_p}[z_T^k]$, 1005 % gives two terms. The 1006 % first $\rtriad{R}$ term (the only term for $z$-coordinates) is: 1007 &=-\quarter g{A_e}_i^k{\: }{b_u}_{i+i_p}^k {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}} 1008 \frac{ -\alpha _i^k\delta_{i+ i_p}[T^k]+ \beta_i^k\delta_{i+ i_p}[S^k]} { {e_{1u}}_{\,i + i_p}^{\,k} } \notag \\ 1009 &=+\quarter g{A_e}_i^k{\: }{b_u}_{i+i_p}^k 1010 \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right) {_i^k\mathbb{R}_{i_p}^{k_p}} 1011 \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}}, 1063 \intertext{Substituting ${\:}_i^k {\mathbb{S}_w}_{i_p}^{k_p}$ from \autoref{eq:skewfluxw}, gives} 1064 % and separating out 1065 % $\rtriadt{R}=\rtriad{R} + \delta_{i+i_p}[z_T^k]$, 1066 % gives two terms. The 1067 % first $\rtriad{R}$ term (the only term for $z$-coordinates) is: 1068 &=-\quarter g{A_e}_i^k{\: }{b_u}_{i+i_p}^k {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}} 1069 \frac{ -\alpha _i^k\delta_{i+ i_p}[T^k]+ \beta_i^k\delta_{i+ i_p}[S^k]} { {e_{1u}}_{\,i + i_p}^{\,k} } \notag \\ 1070 &=+\quarter g{A_e}_i^k{\: }{b_u}_{i+i_p}^k 1071 \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right) {_i^k\mathbb{R}_{i_p}^{k_p}} 1072 \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}}, 1012 1073 \end{align} 1013 1074 using the definition of the triad slope $\rtriad{R}$, \autoref{eq:R} to … … 1018 1079 \begin{multline} 1019 1080 \label{eq:lat_densityPE} 1020 g \delta_{i+i_p}[z_T^k]1021 \left[1022 -\alpha _i^k {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (S)1023 \right] \\1024 = +\quarter g{A_e}_i^k{\: }{b_u}_{i+i_p}^k1025 1026 \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right)1027 \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}},1081 g \delta_{i+i_p}[z_T^k] 1082 \left[ 1083 -\alpha _i^k {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (S) 1084 \right] \\ 1085 = +\quarter g{A_e}_i^k{\: }{b_u}_{i+i_p}^k 1086 \frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}} 1087 \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right) 1088 \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}}, 1028 1089 \end{multline} 1029 1090 (using \autoref{eq:skewfluxu}) and so the total PE change \autoref{eq:vert_densityPE} + 1030 1091 \autoref{eq:lat_densityPE} associated with the triad fluxes is 1031 \begin{multline }1032 \label{eq:tot_densityPE}1092 \begin{multline*} 1093 % \label{eq:tot_densityPE} 1033 1094 g{e_{3w}}_{\,i}^{\,k+k_p}{\mathbb{S}_w}_{i_p}^{k_p} (\rho) + 1034 g\delta_{i+i_p}[z_T^k] {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (\rho) \\1035 = +\quarter g{A_e}_i^k{\: }{b_u}_{i+i_p}^k1036 1037 \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}}.1038 \end{multline }1095 g\delta_{i+i_p}[z_T^k] {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (\rho) \\ 1096 = +\quarter g{A_e}_i^k{\: }{b_u}_{i+i_p}^k 1097 \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right)^2 1098 \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}}. 1099 \end{multline*} 1039 1100 Where the fluid is stable, with $-\alpha_i^k \delta_{k+ k_p}[T^i]+ 1040 1101 \beta_i^k\delta_{k+ k_p}[S^i]<0$, this PE change is negative. 1041 1102 1042 \subsection{Treatment of the triads at the boundaries}\label{sec:skew_bdry} 1103 \subsection{Treatment of the triads at the boundaries} 1104 \label{sec:skew_bdry} 1105 1043 1106 Triad slopes \rtriadt{R} used for the calculation of the eddy-induced skew-fluxes are masked at the boundaries 1044 1107 in exactly the same way as are the triad slopes \rtriad{R} used for the iso-neutral diffusive fluxes, … … 1049 1112 The namelist parameter \np{ln\_botmix\_triad} has no effect on the eddy-induced skew-fluxes. 1050 1113 1051 \subsection{Limiting of the slopes within the interior}\label{sec:limitskew} 1114 \subsection{Limiting of the slopes within the interior} 1115 \label{sec:limitskew} 1116 1052 1117 Presently, the iso-neutral slopes $\tilde{r}_i$ relative to geopotentials are limited to be less than $1/100$, 1053 1118 exactly as in calculating the iso-neutral diffusion, \S \autoref{sec:limit}. 1054 1119 Each individual triad \rtriadt{R} is so limited. 1055 1120 1056 \subsection{Tapering within the surface mixed layer}\label{sec:taperskew} 1121 \subsection{Tapering within the surface mixed layer} 1122 \label{sec:taperskew} 1123 1057 1124 The slopes $\tilde{r}_i$ relative to geopotentials (and thus the individual triads \rtriadt{R}) 1058 1125 are always tapered linearly from their value immediately below the mixed layer to zero at the surface … … 1072 1139 (the horizontal flux convergence is relatively insignificant within the mixed-layer). 1073 1140 1074 \subsection{Streamfunction diagnostics}\label{sec:sfdiag} 1141 \subsection{Streamfunction diagnostics} 1142 \label{sec:sfdiag} 1143 1075 1144 Where the namelist parameter \np{ln\_traldf\_gdia}\forcode{ = .true.}, 1076 1145 diagnosed mean eddy-induced velocities are output. … … 1080 1149 We follow \citep{Griffies_Bk04} and calculate the streamfunction at a given $uw$-point from 1081 1150 the surrounding four triads according to: 1082 \ begin{equation}1083 \label{eq:sfdiagi}1151 \[ 1152 % \label{eq:sfdiagi} 1084 1153 {\psi_1}_{i+1/2}^{k+1/2}={\quarter}\sum_{\substack{i_p,\,k_p}} 1085 1154 {A_e}_{i+1/2-i_p}^{k+1/2-k_p}\:\triadd{i+1/2-i_p}{k+1/2-k_p}{R}{i_p}{k_p}. 1086 \ end{equation}1155 \] 1087 1156 The streamfunction $\psi_1$ is calculated similarly at $vw$ points. 1088 1157 The eddy-induced velocities are then calculated from the straightforward discretisation of \autoref{eq:eiv_v}: 1089 \begin{equation}\label{eq:eiv_v_discrete} 1090 \begin{split} 1091 {u^*}_{i+1/2}^{k} & = - \frac{1}{{e_{3u}}_{i}^{k}}\left({\psi_1}_{i+1/2}^{k+1/2}-{\psi_1}_{i+1/2}^{k+1/2}\right), \\ 1092 {v^*}_{j+1/2}^{k} & = - \frac{1}{{e_{3v}}_{j}^{k}}\left({\psi_2}_{j+1/2}^{k+1/2}-{\psi_2}_{j+1/2}^{k+1/2}\right), \\ 1093 {w^*}_{i,j}^{k+1/2} & = \frac{1}{e_{1t}e_{2t}}\; \left\{ 1094 {e_{2u}}_{i+1/2}^{k+1/2} \,{\psi_1}_{i+1/2}^{k+1/2} - 1095 {e_{2u}}_{i-1/2}^{k+1/2} \,{\psi_1}_{i-1/2}^{k+1/2} \right. + \\ 1096 \phantom{=} & \qquad\qquad\left. {e_{2v}}_{j+1/2}^{k+1/2} \,{\psi_2}_{j+1/2}^{k+1/2} - {e_{2v}}_{j-1/2}^{k+1/2} \,{\psi_2}_{j-1/2}^{k+1/2} \right\}, 1097 \end{split} 1098 \end{equation} 1158 \[ 1159 % \label{eq:eiv_v_discrete} 1160 \begin{split} 1161 {u^*}_{i+1/2}^{k} & = - \frac{1}{{e_{3u}}_{i}^{k}}\left({\psi_1}_{i+1/2}^{k+1/2}-{\psi_1}_{i+1/2}^{k+1/2}\right), \\ 1162 {v^*}_{j+1/2}^{k} & = - \frac{1}{{e_{3v}}_{j}^{k}}\left({\psi_2}_{j+1/2}^{k+1/2}-{\psi_2}_{j+1/2}^{k+1/2}\right), \\ 1163 {w^*}_{i,j}^{k+1/2} & = \frac{1}{e_{1t}e_{2t}}\; \left\{ 1164 {e_{2u}}_{i+1/2}^{k+1/2} \,{\psi_1}_{i+1/2}^{k+1/2} - 1165 {e_{2u}}_{i-1/2}^{k+1/2} \,{\psi_1}_{i-1/2}^{k+1/2} \right. + \\ 1166 \phantom{=} & \qquad\qquad\left. {e_{2v}}_{j+1/2}^{k+1/2} \,{\psi_2}_{j+1/2}^{k+1/2} - {e_{2v}}_{j-1/2}^{k+1/2} \,{\psi_2}_{j-1/2}^{k+1/2} \right\}, 1167 \end{split} 1168 \] 1169 1170 \biblio 1171 1099 1172 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_ASM.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 11 12 \minitoc 12 13 13 14 14 \newpage 15 $\ $\newline % force a new line16 15 17 16 The ASM code adds the functionality to apply increments to the model variables: temperature, salinity, … … 45 44 is corrected by adding the analysis increments for temperature, salinity, horizontal velocity and SSH as 46 45 additional tendency terms to the prognostic equations: 47 \begin{ eqnarray} \label{eq:wa_traj_iau}48 {\bf x}^{a}(t_{i}) = M(t_{i}, t_{0})[{\bf x}^{b}(t_{0})] 49 \; + \; F_{i} \delta \tilde{\bf x}^{a} 50 \end{ eqnarray}46 \begin{align*} 47 % \label{eq:wa_traj_iau} 48 {\bf x}^{a}(t_{i}) = M(t_{i}, t_{0})[{\bf x}^{b}(t_{0})] \; + \; F_{i} \delta \tilde{\bf x}^{a} 49 \end{align*} 51 50 where $F_{i}$ is a weighting function for applying the increments $\delta\tilde{\bf x}^{a}$ defined such that 52 51 $\sum_{i=1}^{N} F_{i}=1$. … … 58 57 In addition, two different weighting functions have been implemented. 59 58 The first function employs constant weights, 60 \begin{eqnarray} \label{eq:F1_i} 61 F^{(1)}_{i} 62 =\left\{ \begin{array}{ll} 63 0 & {\rm if} \; \; \; t_{i} < t_{m} \\ 64 1/M & {\rm if} \; \; \; t_{m} < t_{i} \leq t_{n} \\ 65 0 & {\rm if} \; \; \; t_{i} > t_{n} 66 \end{array} \right. 67 \end{eqnarray} 59 \begin{align} 60 \label{eq:F1_i} 61 F^{(1)}_{i} 62 =\left\{ 63 \begin{array}{ll} 64 0 & {\rm if} \; \; \; t_{i} < t_{m} \\ 65 1/M & {\rm if} \; \; \; t_{m} < t_{i} \leq t_{n} \\ 66 0 & {\rm if} \; \; \; t_{i} > t_{n} 67 \end{array} 68 \right. 69 \end{align} 68 70 where $M = m-n$. 69 71 The second function employs peaked hat-like weights in order to give maximum weight in the centre of the sub-window, 70 72 with the weighting reduced linearly to a small value at the window end-points: 71 \begin{eqnarray} \label{eq:F2_i} 72 F^{(2)}_{i} 73 =\left\{ \begin{array}{ll} 74 0 & {\rm if} \; \; \; t_{i} < t_{m} \\ 75 \alpha \, i & {\rm if} \; \; \; t_{m} \leq t_{i} \leq t_{M/2} \\ 76 \alpha \, (M - i +1) & {\rm if} \; \; \; t_{M/2} < t_{i} \leq t_{n} \\ 77 0 & {\rm if} \; \; \; t_{i} > t_{n} 78 \end{array} \right. 79 \end{eqnarray} 73 \begin{align} 74 \label{eq:F2_i} 75 F^{(2)}_{i} 76 =\left\{ 77 \begin{array}{ll} 78 0 & {\rm if} \; \; \; t_{i} < t_{m} \\ 79 \alpha \, i & {\rm if} \; \; \; t_{m} \leq t_{i} \leq t_{M/2} \\ 80 \alpha \, (M - i +1) & {\rm if} \; \; \; t_{M/2} < t_{i} \leq t_{n} \\ 81 0 & {\rm if} \; \; \; t_{i} > t_{n} 82 \end{array} 83 \right. 84 \end{align} 80 85 where $\alpha^{-1} = \sum_{i=1}^{M/2} 2i$ and $M$ is assumed to be even. 81 86 The weights described by \autoref{eq:F2_i} provide a smoother transition of the analysis trajectory from … … 89 94 The velocity increments may be initialized by the iterative application of a divergence damping operator. 90 95 In iteration step $n$ new estimates of velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by: 91 \begin{equation} \label{eq:asm_dmp} 92 \left\{ \begin{aligned} 93 u^{n}_I = u^{n-1}_I + \frac{1}{e_{1u} } \delta _{i+1/2} \left( {A_D 94 \;\chi^{n-1}_I } \right) \\ 95 \\ 96 v^{n}_I = v^{n-1}_I + \frac{1}{e_{2v} } \delta _{j+1/2} \left( {A_D 97 \;\chi^{n-1}_I } \right) \\ 98 \end{aligned} \right., 96 \begin{equation} 97 \label{eq:asm_dmp} 98 \left\{ 99 \begin{aligned} 100 u^{n}_I = u^{n-1}_I + \frac{1}{e_{1u} } \delta_{i+1/2} \left( {A_D 101 \;\chi^{n-1}_I } \right) \\ \\ 102 v^{n}_I = v^{n-1}_I + \frac{1}{e_{2v} } \delta_{j+1/2} \left( {A_D 103 \;\chi^{n-1}_I } \right) \\ 104 \end{aligned} 105 \right., 99 106 \end{equation} 100 107 where 101 \begin{equation} \label{eq:asm_div} 102 \chi^{n-1}_I = \frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 103 \left( {\delta _i \left[ {e_{2u}\,e_{3u}\,u^{n-1}_I} \right] 104 +\delta _j \left[ {e_{1v}\,e_{3v}\,v^{n-1}_I} \right]} \right). 105 \end{equation} 108 \[ 109 % \label{eq:asm_div} 110 \chi^{n-1}_I = \frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 111 \left( {\delta_i \left[ {e_{2u}\,e_{3u}\,u^{n-1}_I} \right] 112 +\delta_j \left[ {e_{1v}\,e_{3v}\,v^{n-1}_I} \right]} \right). 113 \] 106 114 By the application of \autoref{eq:asm_dmp} and \autoref{eq:asm_dmp} the divergence is filtered in each iteration, 107 115 and the vorticity is left unchanged. … … 169 177 \end{clines} 170 178 179 \biblio 180 171 181 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_CONFIG.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ 4 % Chapter �Configurations5 % Chapter Configurations 5 6 % ================================================================ 6 7 \chapter{Configurations} 7 8 \label{chap:CFG} 9 8 10 \minitoc 9 11 10 12 \newpage 11 $\ $\newline % force a new ligne12 13 13 14 % ================================================================ … … 16 17 \section{Introduction} 17 18 \label{sec:CFG_intro} 18 19 19 20 20 The purpose of this part of the manual is to introduce the \NEMO reference configurations. … … 36 36 \label{sec:CFG_c1d} 37 37 38 $\ $\newline39 38 BE careful: to be re-written according to suppression of jpizoom and jpjzoom !!!! 40 $\ $\newline41 39 42 40 The 1D model option simulates a stand alone water column within the 3D \NEMO system. … … 102 100 \begin{center} 103 101 \includegraphics[width=0.98\textwidth]{Fig_ORCA_NH_mesh} 104 \caption{ \protect\label{fig:MISC_ORCA_msh} 102 \caption{ 103 \protect\label{fig:MISC_ORCA_msh} 105 104 ORCA mesh conception. 106 105 The departure from an isotropic Mercator grid start poleward of 20\degN. … … 108 107 are determined analytically and form the i-lines of the ORCA mesh (pseudo latitudes). 109 108 Then, following \citet{Madec_Imbard_CD96}, the normal to the series of ellipses (red curves) is computed which 110 provides the j-lines of the mesh (pseudo longitudes). } 109 provides the j-lines of the mesh (pseudo longitudes). 110 } 111 111 \end{center} 112 112 \end{figure} … … 133 133 \includegraphics[width=1.0\textwidth]{Fig_ORCA_NH_msh05_e1_e2} 134 134 \includegraphics[width=0.80\textwidth]{Fig_ORCA_aniso} 135 \caption { \protect\label{fig:MISC_ORCA_e1e2} 135 \caption { 136 \protect\label{fig:MISC_ORCA_e1e2} 136 137 \textit{Top}: Horizontal scale factors ($e_1$, $e_2$) and 137 138 \textit{Bottom}: ratio of anisotropy ($e_1 / e_2$) … … 139 140 South of 20\degN a Mercator grid is used ($e_1 = e_2$) so that the anisotropy ratio is 1. 140 141 Poleward of 20\degN, the two "north pole" introduce a weak anisotropy over the ocean areas ($< 1.2$) except in 141 vicinity of Victoria Island (Canadian Arctic Archipelago). } 142 \end{center} \end{figure} 143 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 144 142 vicinity of Victoria Island (Canadian Arctic Archipelago). 143 } 144 \end{center} 145 \end{figure} 146 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 145 147 146 148 The method is applied to Mercator grid ($i.e.$ same zonal and meridional grid spacing) poleward of 20\degN, … … 161 163 \label{subsec:CFG_orca_resolution} 162 164 163 164 165 The NEMO system is provided with five built-in ORCA configurations which differ in the horizontal resolution. 165 166 The value of the resolution is given by the resolution at the Equator expressed in degrees. … … 169 170 (Tab. \autoref{tab:ORCA}). 170 171 171 172 173 174 172 %--------------------------------------------------TABLE-------------------------------------------------- 175 \begin{table}[!t] \begin{center} 176 \begin{tabular}{p{4cm} c c c c} 177 Horizontal Grid & \np{ORCA\_index} & \np{jpiglo} & \np{jpjglo} & \\ 178 \hline \hline 179 \~4\deg & 4 & 92 & 76 & \\ 180 \~2\deg & 2 & 182 & 149 & \\ 181 \~1\deg & 1 & 362 & 292 & \\ 182 \~0.5\deg & 05 & 722 & 511 & \\ 183 \~0.25\deg & 025 & 1442 & 1021 & \\ 184 %\key{orca\_r8} & 8 & 2882 & 2042 & \\ 185 %\key{orca\_r12} & 12 & 4322 & 3062 & \\ 186 \hline \hline 187 \end{tabular} 188 \caption{ \protect\label{tab:ORCA} 189 Domain size of ORCA family configurations. 190 The flag for configurations of ORCA family need to be set in \textit{domain\_cfg} file. } 191 \end{center} 173 \begin{table}[!t] 174 \begin{center} 175 \begin{tabular}{p{4cm} c c c c} 176 Horizontal Grid & \np{ORCA\_index} & \np{jpiglo} & \np{jpjglo} & \\ 177 \hline 178 \hline 179 \~4\deg & 4 & 92 & 76 & \\ 180 \~2\deg & 2 & 182 & 149 & \\ 181 \~1\deg & 1 & 362 & 292 & \\ 182 \~0.5\deg & 05 & 722 & 511 & \\ 183 \~0.25\deg & 025 & 1442 & 1021 & \\ 184 % \key{orca\_r8} & 8 & 2882 & 2042 & \\ 185 % \key{orca\_r12} & 12 & 4322 & 3062 & \\ 186 \hline 187 \hline 188 \end{tabular} 189 \caption{ 190 \protect\label{tab:ORCA} 191 Domain size of ORCA family configurations. 192 The flag for configurations of ORCA family need to be set in \textit{domain\_cfg} file. 193 } 194 \end{center} 192 195 \end{table} 193 196 %-------------------------------------------------------------------------------------------------------------- … … 284 287 \begin{center} 285 288 \includegraphics[width=1.0\textwidth]{Fig_GYRE} 286 \caption{ \protect\label{fig:GYRE} 289 \caption{ 290 \protect\label{fig:GYRE} 287 291 Snapshot of relative vorticity at the surface of the model domain in GYRE R9, R27 and R54. 288 From \citet{Levy_al_OM10}.} 292 From \citet{Levy_al_OM10}. 293 } 289 294 \end{center} 290 295 \end{figure} … … 315 320 Unlike ordinary river points the Baltic inputs also include salinity and temperature data. 316 321 322 \biblio 323 317 324 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_DIA.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 6 7 \chapter{Output and Diagnostics (IOM, DIA, TRD, FLO)} 7 8 \label{chap:DIA} 9 8 10 \minitoc 9 11 10 12 \newpage 11 $\ $\newline % force a new line12 13 13 14 % ================================================================ … … 168 169 See the XML basics section below for more details on XML syntax and rules. 169 170 170 \begin{table} \scriptsize 171 \begin{tabularx}{\textwidth}{|lXl|} \hline 172 variable name & 173 description & 174 example \\ \hline \hline 175 buffer\_size & 176 buffer size used by XIOS to send data from NEMO to XIOS. 177 Larger is more efficient. 178 Note that needed/used buffer sizes are summarized at the end of the job & 179 25000000 \\ \hline 180 buffer\_server\_factor\_size & 181 ratio between NEMO and XIOS buffer size. 182 Should be 2. & 183 2 \\ \hline 184 info\_level & 185 verbosity level (0 to 100) & 186 0 \\ \hline 187 using\_server & 188 activate attached(false) or detached(true) mode & 189 true \\ \hline 190 using\_oasis & 191 XIOS is used with OASIS(true) or not (false) & 192 false \\ \hline 193 oasis\_codes\_id & 194 when using oasis, define the identifier of NEMO in the namcouple. 195 Note that the identifier of XIOS is xios.x & 196 oceanx \\ \hline 197 \end{tabularx} 171 \begin{table} 172 \scriptsize 173 \begin{tabularx}{\textwidth}{|lXl|} 174 \hline 175 variable name & 176 description & 177 example \\ 178 \hline 179 \hline 180 buffer\_size & 181 buffer size used by XIOS to send data from NEMO to XIOS. 182 Larger is more efficient. 183 Note that needed/used buffer sizes are summarized at the end of the job & 184 25000000 \\ 185 \hline 186 buffer\_server\_factor\_size & 187 ratio between NEMO and XIOS buffer size. 188 Should be 2. & 189 2 \\ 190 \hline 191 info\_level & 192 verbosity level (0 to 100) & 193 0 \\ 194 \hline 195 using\_server & 196 activate attached(false) or detached(true) mode & 197 true \\ 198 \hline 199 using\_oasis & 200 XIOS is used with OASIS(true) or not (false) & 201 false \\ 202 \hline 203 oasis\_codes\_id & 204 when using oasis, define the identifier of NEMO in the namcouple. 205 Note that the identifier of XIOS is xios.x & 206 oceanx \\ 207 \hline 208 \end{tabularx} 198 209 \end{table} 199 210 … … 281 292 Each tag family has hierarchy of three flavors (except for context): 282 293 283 \begin{table} \scriptsize 284 \begin{tabular*}{\textwidth}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} \hline 285 flavor & description & 286 example \\ \hline \hline 287 root & declaration of the root element that can contain element groups or elements & 288 \xmlcode{<file_definition ... >} \\ \hline 289 group & declaration of a group element that can contain element groups or elements & 290 \xmlcode{<file_group ... >} \\ \hline 291 element & declaration of an element that can contain elements & 292 \xmlcode{<file ... >} \\ \hline 293 \end{tabular*} 294 \begin{table} 295 \scriptsize 296 \begin{tabular*}{\textwidth}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 297 \hline 298 flavor & description & 299 example \\ 300 \hline 301 \hline 302 root & declaration of the root element that can contain element groups or elements & 303 \xmlcode{<file_definition ... >} \\ 304 \hline 305 group & declaration of a group element that can contain element groups or elements & 306 \xmlcode{<file_group ... >} \\ 307 \hline 308 element & declaration of an element that can contain elements & 309 \xmlcode{<file ... >} \\ 310 \hline 311 \end{tabular*} 294 312 \end{table} 295 313 … … 306 324 In \NEMO, we used the following contexts (that can be defined in any order): 307 325 308 \begin{table} \scriptsize 309 \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} \hline 310 context & description & 311 example \\ \hline \hline 312 context xios & context containing information for XIOS & 313 \xmlcode{<context id="xios" ... >} \\ \hline 314 context nemo & context containing IO information for NEMO (mother grid when using AGRIF) & 315 \xmlcode{<context id="nemo" ... >} \\ \hline 316 context 1\_nemo & context containing IO information for NEMO child grid 1 (when using AGRIF) & 317 \xmlcode{<context id="1_nemo" ... >} \\ \hline 318 context n\_nemo & context containing IO information for NEMO child grid n (when using AGRIF) & 319 \xmlcode{<context id="n_nemo" ... >} \\ \hline 326 \begin{table} 327 \scriptsize 328 \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 329 \hline 330 context & description & 331 example \\ 332 \hline 333 \hline 334 context xios & context containing information for XIOS & 335 \xmlcode{<context id="xios" ... >} \\ 336 \hline 337 context nemo & context containing IO information for NEMO (mother grid when using AGRIF) & 338 \xmlcode{<context id="nemo" ... >} \\ 339 \hline 340 context 1\_nemo & context containing IO information for NEMO child grid 1 (when using AGRIF) & 341 \xmlcode{<context id="1_nemo" ... >} \\ 342 \hline 343 context n\_nemo & context containing IO information for NEMO child grid n (when using AGRIF) & 344 \xmlcode{<context id="n_nemo" ... >} \\ 345 \hline 346 \end{tabular} 347 \end{table} 348 349 \noindent The xios context contains only 1 tag: 350 351 \begin{table} 352 \scriptsize 353 \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 354 \hline 355 context tag & 356 description & 357 example \\ 358 \hline 359 \hline 360 variable\_definition & 361 define variables needed by XIOS. 362 This can be seen as a kind of namelist for XIOS. & 363 \xmlcode{<variable_definition ... >} \\ 364 \hline 320 365 \end{tabular} 321 366 \end{table} 322 367 323 \noindent The xios context contains only 1 tag:324 325 \begin{table} \scriptsize326 \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} \hline327 context tag &328 description &329 example \\ \hline \hline330 variable\_definition &331 define variables needed by XIOS.332 This can be seen as a kind of namelist for XIOS. &333 \xmlcode{<variable_definition ... >} \\ \hline334 \end{tabular}335 \end{table}336 337 368 \noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts 338 369 (that can be defined in any order): 339 370 340 \begin{table} \scriptsize 341 \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} \hline 342 context tag & description & 343 example \\ \hline \hline 344 field\_definition & define all variables that can potentially be outputted & 345 \xmlcode{<field_definition ... >} \\ \hline 346 file\_definition & define the netcdf files to be created and the variables they will contain & 347 \xmlcode{<file_definition ... >} \\ \hline 348 axis\_definition & define vertical axis & 349 \xmlcode{<axis_definition ... >} \\ \hline 350 domain\_definition & define the horizontal grids & 351 \xmlcode{<domain_definition ... >} \\ \hline 352 grid\_definition & define the 2D and 3D grids (association of an axis and a domain) & 353 \xmlcode{<grid_definition ... >} \\ \hline 354 \end{tabular} 371 \begin{table} 372 \scriptsize 373 \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 374 \hline 375 context tag & description & 376 example \\ 377 \hline 378 \hline 379 field\_definition & define all variables that can potentially be outputted & 380 \xmlcode{<field_definition ... >} \\ 381 \hline 382 file\_definition & define the netcdf files to be created and the variables they will contain & 383 \xmlcode{<file_definition ... >} \\ 384 \hline 385 axis\_definition & define vertical axis & 386 \xmlcode{<axis_definition ... >} \\ 387 \hline 388 domain\_definition & define the horizontal grids & 389 \xmlcode{<domain_definition ... >} \\ 390 \hline 391 grid\_definition & define the 2D and 3D grids (association of an axis and a domain) & 392 \xmlcode{<grid_definition ... >} \\ 393 \hline 394 \end{tabular} 355 395 \end{table} 356 396 … … 538 578 the following part of the name and the name\_suffix (that can be inherited) will be automatically replaced by: 539 579 540 \begin{table} \scriptsize 541 \begin{tabularx}{\textwidth}{|lX|} \hline 542 \centering placeholder string & 543 automatically replaced by \\ \hline \hline 544 \centering @expname@ & 545 the experiment name (from cn\_exp in the namelist) \\ \hline 546 \centering @freq@ & 547 output frequency (from attribute output\_freq) \\ \hline 548 \centering @startdate@ & 549 starting date of the simulation (from nn\_date0 in the restart or the namelist). \newline 550 \verb?yyyymmdd? format \\ \hline 551 \centering @startdatefull@ & 552 starting date of the simulation (from nn\_date0 in the restart or the namelist). \newline 553 \verb?yyyymmdd_hh:mm:ss? format \\ \hline 554 \centering @enddate@ & 555 ending date of the simulation (from nn\_date0 and nn\_itend in the namelist). \newline 556 \verb?yyyymmdd? format \\ \hline 557 \centering @enddatefull@ & 558 ending date of the simulation (from nn\_date0 and nn\_itend in the namelist). \newline 559 \verb?yyyymmdd_hh:mm:ss? format \\ \hline 560 \end{tabularx} 580 \begin{table} 581 \scriptsize 582 \begin{tabularx}{\textwidth}{|lX|} 583 \hline 584 \centering placeholder string & 585 automatically replaced by \\ 586 \hline 587 \hline 588 \centering @expname@ & 589 the experiment name (from cn\_exp in the namelist) \\ 590 \hline 591 \centering @freq@ & 592 output frequency (from attribute output\_freq) \\ 593 \hline 594 \centering @startdate@ & 595 starting date of the simulation (from nn\_date0 in the restart or the namelist). 596 \newline 597 \verb?yyyymmdd? format \\ 598 \hline 599 \centering @startdatefull@ & 600 starting date of the simulation (from nn\_date0 in the restart or the namelist). 601 \newline 602 \verb?yyyymmdd_hh:mm:ss? format \\ 603 \hline 604 \centering @enddate@ & 605 ending date of the simulation (from nn\_date0 and nn\_itend in the namelist). 606 \newline 607 \verb?yyyymmdd? format \\ 608 \hline 609 \centering @enddatefull@ & 610 ending date of the simulation (from nn\_date0 and nn\_itend in the namelist). 611 \newline 612 \verb?yyyymmdd_hh:mm:ss? format \\ 613 \hline 614 \end{tabularx} 561 615 \end{table} 562 616 … … 585 639 \\ 586 640 587 \begin{table} \scriptsize 588 \begin{tabularx}{\textwidth}{|X|c|c|c|} \hline 589 tag ids affected by automatic definition of some of their attributes & 590 name attribute & 591 attribute value \\ \hline \hline 592 field\_definition & 593 freq\_op & 594 \np{rn\_rdt} \\ \hline 595 SBC & 596 freq\_op & 597 \np{rn\_rdt} $\times$ \np{nn\_fsbc} \\ \hline 598 ptrc\_T & 599 freq\_op & 600 \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ \hline 601 diad\_T & 602 freq\_op & 603 \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ \hline 604 EqT, EqU, EqW & 605 jbegin, ni, & 606 according to the grid \\ 607 & 608 name\_suffix & 609 \\ \hline 610 TAO, RAMA and PIRATA moorings & 611 zoom\_ibegin, zoom\_jbegin, & 612 according to the grid \\ 613 & 614 name\_suffix & 615 \\ \hline 616 \end{tabularx} 641 \begin{table} 642 \scriptsize 643 \begin{tabularx}{\textwidth}{|X|c|c|c|} 644 \hline 645 tag ids affected by automatic definition of some of their attributes & 646 name attribute & 647 attribute value \\ 648 \hline 649 \hline 650 field\_definition & 651 freq\_op & 652 \np{rn\_rdt} \\ 653 \hline 654 SBC & 655 freq\_op & 656 \np{rn\_rdt} $\times$ \np{nn\_fsbc} \\ 657 \hline 658 ptrc\_T & 659 freq\_op & 660 \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 661 \hline 662 diad\_T & 663 freq\_op & 664 \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 665 \hline 666 EqT, EqU, EqW & 667 jbegin, ni, & 668 according to the grid \\ 669 & 670 name\_suffix & 671 \\ 672 \hline 673 TAO, RAMA and PIRATA moorings & 674 zoom\_ibegin, zoom\_jbegin, & 675 according to the grid \\ 676 & 677 name\_suffix & 678 \\ 679 \hline 680 \end{tabularx} 617 681 \end{table} 618 682 … … 774 838 \subsubsection{Tag list per family} 775 839 776 \begin{table} \scriptsize 777 \begin{tabularx}{\textwidth}{|l|X|X|l|X|} \hline 778 tag name & 779 description & 780 accepted attribute & 781 child of & 782 parent of \\ \hline \hline 783 simulation & 784 this tag is the root tag which encapsulates all the content of the XML file & 785 none & 786 none & 787 context \\ \hline 788 context & 789 encapsulates parts of the XML file dedicated to different codes or different parts of a code & 790 id (''xios'', ''nemo'' or ''n\_nemo'' for the nth AGRIF zoom), src, time\_origin & 791 simulation & 792 all root tags: ... \_definition \\ \hline 793 \end{tabularx} 794 \caption{Context tags} 840 \begin{table} 841 \scriptsize 842 \begin{tabularx}{\textwidth}{|l|X|X|l|X|} 843 \hline 844 tag name & 845 description & 846 accepted attribute & 847 child of & 848 parent of \\ 849 \hline 850 \hline 851 simulation & 852 this tag is the root tag which encapsulates all the content of the XML file & 853 none & 854 none & 855 context \\ 856 \hline 857 context & 858 encapsulates parts of the XML file dedicated to different codes or different parts of a code & 859 id (''xios'', ''nemo'' or ''n\_nemo'' for the nth AGRIF zoom), src, time\_origin & 860 simulation & 861 all root tags: ... \_definition \\ 862 \hline 863 \end{tabularx} 864 \caption{Context tags} 795 865 \end{table} 796 866 797 \begin{table} \scriptsize 798 \begin{tabularx}{\textwidth}{|l|X|X|X|l|} \hline 799 tag name & 800 description & 801 accepted attribute & 802 child of & 803 parent of \\ \hline \hline 804 field\_definition & 805 encapsulates the definition of all the fields that can potentially be outputted & 806 axis\_ref, default\_value, domain\_ref, enabled, grid\_ref, level, operation, prec, src & 807 context & 808 field or field\_group \\ \hline 809 field\_group & 810 encapsulates a group of fields & 811 axis\_ref, default\_value, domain\_ref, enabled, group\_ref, grid\_ref, 812 id, level, operation, prec, src & 813 field\_definition, field\_group, file & 814 field or field\_group \\ \hline 815 field & 816 define a specific field & 817 axis\_ref, default\_value, domain\_ref, enabled, field\_ref, grid\_ref, 818 id, level, long\_name, name, operation, prec, standard\_name, unit & 819 field\_definition, field\_group, file & 820 none \\ \hline 821 \end{tabularx} 822 \caption{Field tags ("\tt{field\_*}")} 867 \begin{table} 868 \scriptsize 869 \begin{tabularx}{\textwidth}{|l|X|X|X|l|} 870 \hline 871 tag name & 872 description & 873 accepted attribute & 874 child of & 875 parent of \\ 876 \hline 877 \hline 878 field\_definition & 879 encapsulates the definition of all the fields that can potentially be outputted & 880 axis\_ref, default\_value, domain\_ref, enabled, grid\_ref, level, operation, prec, src & 881 context & 882 field or field\_group \\ 883 \hline 884 field\_group & 885 encapsulates a group of fields & 886 axis\_ref, default\_value, domain\_ref, enabled, group\_ref, grid\_ref, 887 id, level, operation, prec, src & 888 field\_definition, field\_group, file & 889 field or field\_group \\ 890 \hline 891 field & 892 define a specific field & 893 axis\_ref, default\_value, domain\_ref, enabled, field\_ref, grid\_ref, 894 id, level, long\_name, name, operation, prec, standard\_name, unit & 895 field\_definition, field\_group, file & 896 none \\ 897 \hline 898 \end{tabularx} 899 \caption{Field tags ("\tt{field\_*}")} 823 900 \end{table} 824 901 825 \begin{table} \scriptsize 826 \begin{tabularx}{\textwidth}{|l|X|X|X|l|} \hline 827 tag name & 828 description & 829 accepted attribute & 830 child of & 831 parent of \\ \hline \hline 832 file\_definition & 833 encapsulates the definition of all the files that will be outputted & 834 enabled, min\_digits, name, name\_suffix, output\_level, 835 split\_freq\_format, split\_freq, sync\_freq, type, src & 836 context & 837 file or file\_group \\ \hline 838 file\_group & 839 encapsulates a group of files that will be outputted & 840 enabled, description, id, min\_digits, name, name\_suffix, output\_freq, output\_level, 841 split\_freq\_format, split\_freq, sync\_freq, type, src & 842 file\_definition, file\_group & 843 file or file\_group \\ \hline 844 file & 845 define the contents of a file to be outputted & 846 enabled, description, id, min\_digits, name, name\_suffix, output\_freq, output\_level, 847 split\_freq\_format, split\_freq, sync\_freq, type, src & 848 file\_definition, file\_group & 849 field \\ \hline 850 \end{tabularx} 851 \caption{File tags ("\tt{file\_*}")} 902 \begin{table} 903 \scriptsize 904 \begin{tabularx}{\textwidth}{|l|X|X|X|l|} 905 \hline 906 tag name & 907 description & 908 accepted attribute & 909 child of & 910 parent of \\ 911 \hline 912 \hline 913 file\_definition & 914 encapsulates the definition of all the files that will be outputted & 915 enabled, min\_digits, name, name\_suffix, output\_level, 916 split\_freq\_format, split\_freq, sync\_freq, type, src & 917 context & 918 file or file\_group \\ 919 \hline 920 file\_group & 921 encapsulates a group of files that will be outputted & 922 enabled, description, id, min\_digits, name, name\_suffix, output\_freq, output\_level, 923 split\_freq\_format, split\_freq, sync\_freq, type, src & 924 file\_definition, file\_group & 925 file or file\_group \\ 926 \hline 927 file & 928 define the contents of a file to be outputted & 929 enabled, description, id, min\_digits, name, name\_suffix, output\_freq, output\_level, 930 split\_freq\_format, split\_freq, sync\_freq, type, src & 931 file\_definition, file\_group & 932 field \\ 933 \hline 934 \end{tabularx} 935 \caption{File tags ("\tt{file\_*}")} 852 936 \end{table} 853 937 854 \begin{table} \scriptsize 855 \begin{tabularx}{\textwidth}{|l|X|X|X|X|} \hline 856 tag name & 857 description & 858 accepted attribute & 859 child of & 860 parent of \\ \hline \hline 861 axis\_definition & 862 define all the vertical axis potentially used by the variables & 863 src & 864 context & 865 axis\_group, axis \\ \hline 866 axis\_group & 867 encapsulates a group of vertical axis & 868 id, lon\_name, positive, src, standard\_name, unit, zoom\_begin, zoom\_end, zoom\_size & 869 axis\_definition, axis\_group & 870 axis\_group, axis \\ \hline 871 axis & 872 define a vertical axis & 873 id, lon\_name, positive, src, standard\_name, unit, zoom\_begin, zoom\_end, zoom\_size & 874 axis\_definition, axis\_group & 875 none \\ \hline 876 \end{tabularx} 877 \caption{Axis tags ("\tt{axis\_*}")} 938 \begin{table} 939 \scriptsize 940 \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 941 \hline 942 tag name & 943 description & 944 accepted attribute & 945 child of & 946 parent of \\ 947 \hline 948 \hline 949 axis\_definition & 950 define all the vertical axis potentially used by the variables & 951 src & 952 context & 953 axis\_group, axis \\ 954 \hline 955 axis\_group & 956 encapsulates a group of vertical axis & 957 id, lon\_name, positive, src, standard\_name, unit, zoom\_begin, zoom\_end, zoom\_size & 958 axis\_definition, axis\_group & 959 axis\_group, axis \\ 960 \hline 961 axis & 962 define a vertical axis & 963 id, lon\_name, positive, src, standard\_name, unit, zoom\_begin, zoom\_end, zoom\_size & 964 axis\_definition, axis\_group & 965 none \\ 966 \hline 967 \end{tabularx} 968 \caption{Axis tags ("\tt{axis\_*}")} 878 969 \end{table} 879 970 880 \begin{table} \scriptsize 881 \begin{tabularx}{\textwidth}{|l|X|X|X|X|} \hline 882 tag name & 883 description & 884 accepted attribute & 885 child of & 886 parent of \\ \hline \hline 887 domain\_\-definition & 888 define all the horizontal domains potentially used by the variables & 889 src & 890 context & 891 domain\_\-group, domain \\ \hline 892 domain\_group & 893 encapsulates a group of horizontal domains & 894 id, lon\_name, src, zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj & 895 domain\_\-definition, domain\_group & 896 domain\_\-group, domain \\ \hline 897 domain & 898 define an horizontal domain & 899 id, lon\_name, src, zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj & 900 domain\_\-definition, domain\_group & 901 none \\ \hline 902 \end{tabularx} 903 \caption{Domain tags ("\tt{domain\_*)}"} 971 \begin{table} 972 \scriptsize 973 \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 974 \hline 975 tag name & 976 description & 977 accepted attribute & 978 child of & 979 parent of \\ 980 \hline 981 \hline 982 domain\_\-definition & 983 define all the horizontal domains potentially used by the variables & 984 src & 985 context & 986 domain\_\-group, domain \\ 987 \hline 988 domain\_group & 989 encapsulates a group of horizontal domains & 990 id, lon\_name, src, zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj & 991 domain\_\-definition, domain\_group & 992 domain\_\-group, domain \\ 993 \hline 994 domain & 995 define an horizontal domain & 996 id, lon\_name, src, zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj & 997 domain\_\-definition, domain\_group & 998 none \\ 999 \hline 1000 \end{tabularx} 1001 \caption{Domain tags ("\tt{domain\_*)}"} 904 1002 \end{table} 905 1003 906 \begin{table} \scriptsize 907 \begin{tabularx}{\textwidth}{|l|X|X|X|X|} \hline 908 tag name & 909 description & 910 accepted attribute & 911 child of & 912 parent of \\ \hline \hline 913 grid\_definition & 914 define all the grid (association of a domain and/or an axis) potentially used by the variables & 915 src & 916 context & 917 grid\_group, grid \\ \hline 918 grid\_group & 919 encapsulates a group of grids & 920 id, domain\_ref,axis\_ref & 921 grid\_definition, grid\_group & 922 grid\_group, grid \\ \hline 923 grid & 924 define a grid & 925 id, domain\_ref,axis\_ref & 926 grid\_definition, grid\_group & 927 none \\ \hline 928 \end{tabularx} 929 \caption{Grid tags ("\tt{grid\_*}")} 1004 \begin{table} 1005 \scriptsize 1006 \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 1007 \hline 1008 tag name & 1009 description & 1010 accepted attribute & 1011 child of & 1012 parent of \\ 1013 \hline 1014 \hline 1015 grid\_definition & 1016 define all the grid (association of a domain and/or an axis) potentially used by the variables & 1017 src & 1018 context & 1019 grid\_group, grid \\ 1020 \hline 1021 grid\_group & 1022 encapsulates a group of grids & 1023 id, domain\_ref,axis\_ref & 1024 grid\_definition, grid\_group & 1025 grid\_group, grid \\ 1026 \hline 1027 grid & 1028 define a grid & 1029 id, domain\_ref,axis\_ref & 1030 grid\_definition, grid\_group & 1031 none \\ 1032 \hline 1033 \end{tabularx} 1034 \caption{Grid tags ("\tt{grid\_*}")} 930 1035 \end{table} 931 1036 932 1037 \subsubsection{Attributes list per family} 933 1038 934 \begin{table} \scriptsize 935 \begin{tabularx}{\textwidth}{|l|X|l|l|} \hline 936 attribute name & 937 description & 938 example & 939 accepted by \\ \hline \hline 940 axis\_ref & 941 refers to the id of a vertical axis & 942 axis\_ref="deptht" & 943 field, grid families \\ \hline 944 domain\_ref & 945 refers to the id of a domain & 946 domain\_ref="grid\_T" & 947 field or grid families \\ \hline 948 field\_ref & 949 id of the field we want to add in a file & 950 field\_ref="toce" & 951 field \\ \hline 952 grid\_ref & 953 refers to the id of a grid & 954 grid\_ref="grid\_T\_2D" & 955 field family \\ \hline 956 group\_ref & 957 refer to a group of variables & 958 group\_ref="mooring" & 959 field\_group \\ \hline 960 \end{tabularx} 961 \caption{Reference attributes ("\tt{*\_ref}")} 1039 \begin{table} 1040 \scriptsize 1041 \begin{tabularx}{\textwidth}{|l|X|l|l|} 1042 \hline 1043 attribute name & 1044 description & 1045 example & 1046 accepted by \\ 1047 \hline 1048 \hline 1049 axis\_ref & 1050 refers to the id of a vertical axis & 1051 axis\_ref="deptht" & 1052 field, grid families \\ 1053 \hline 1054 domain\_ref & 1055 refers to the id of a domain & 1056 domain\_ref="grid\_T" & 1057 field or grid families \\ 1058 \hline 1059 field\_ref & 1060 id of the field we want to add in a file & 1061 field\_ref="toce" & 1062 field \\ 1063 \hline 1064 grid\_ref & 1065 refers to the id of a grid & 1066 grid\_ref="grid\_T\_2D" & 1067 field family \\ 1068 \hline 1069 group\_ref & 1070 refer to a group of variables & 1071 group\_ref="mooring" & 1072 field\_group \\ 1073 \hline 1074 \end{tabularx} 1075 \caption{Reference attributes ("\tt{*\_ref}")} 962 1076 \end{table} 963 1077 964 \begin{table} \scriptsize 965 \begin{tabularx}{\textwidth}{|l|X|l|l|} \hline 966 attribute name & 967 description & 968 example & 969 accepted by \\ \hline \hline 970 zoom\_ibegin & 971 starting point along x direction of the zoom. 972 Automatically defined for TAO/RAMA/PIRATA moorings & 973 zoom\_ibegin="1" & 974 domain family \\ \hline 975 zoom\_jbegin & 976 starting point along y direction of the zoom. 977 Automatically defined for TAO/RAMA/PIRATA moorings & 978 zoom\_jbegin="1" & 979 domain family \\ \hline 980 zoom\_ni & 981 zoom extent along x direction & 982 zoom\_ni="1" & 983 domain family \\ \hline 984 zoom\_nj & 985 zoom extent along y direction & 986 zoom\_nj="1" & 987 domain family \\ \hline 988 \end{tabularx} 989 \caption{Domain attributes ("\tt{zoom\_*}")} 1078 \begin{table} 1079 \scriptsize 1080 \begin{tabularx}{\textwidth}{|l|X|l|l|} 1081 \hline 1082 attribute name & 1083 description & 1084 example & 1085 accepted by \\ 1086 \hline 1087 \hline 1088 zoom\_ibegin & 1089 starting point along x direction of the zoom. 1090 Automatically defined for TAO/RAMA/PIRATA moorings & 1091 zoom\_ibegin="1" & 1092 domain family \\ 1093 \hline 1094 zoom\_jbegin & 1095 starting point along y direction of the zoom. 1096 Automatically defined for TAO/RAMA/PIRATA moorings & 1097 zoom\_jbegin="1" & 1098 domain family \\ 1099 \hline 1100 zoom\_ni & 1101 zoom extent along x direction & 1102 zoom\_ni="1" & 1103 domain family \\ 1104 \hline 1105 zoom\_nj & 1106 zoom extent along y direction & 1107 zoom\_nj="1" & 1108 domain family \\ 1109 \hline 1110 \end{tabularx} 1111 \caption{Domain attributes ("\tt{zoom\_*}")} 990 1112 \end{table} 991 1113 992 \begin{table} \scriptsize 993 \begin{tabularx}{\textwidth}{|l|X|l|l|} \hline 994 attribute name & 995 description & 996 example & 997 accepted by \\ \hline \hline 998 min\_digits & 999 specify the minimum of digits used in the core number in the name of the NetCDF file & 1000 min\_digits="4" & 1001 file family \\ \hline 1002 name\_suffix & 1003 suffix to be inserted after the name and before the cpu number and the ''.nc'' termination of a file & 1004 name\_suffix="\_myzoom" & 1005 file family \\ \hline 1006 output\_level & 1007 output priority of variables in a file: 0 (high) to 10 (low). 1008 All variables listed in the file with a level smaller or equal to output\_level will be output. 1009 Other variables won't be output even if they are listed in the file. & 1010 output\_level="10" & 1011 file family \\ \hline 1012 split\_freq & 1013 frequency at which to temporally split output files. 1014 Units can be ts (timestep), y, mo, d, h, mi, s. 1015 Useful for long runs to prevent over-sized output files. & 1016 split\_freq="1mo" & 1017 file family \\ \hline 1018 split\_freq\-\_format & 1019 date format used in the name of temporally split output files. 1020 Can be specified using the following syntaxes: \%y, \%mo, \%d, \%h \%mi and \%s & 1021 split\_freq\_format= "\%y\%mo\%d" & 1022 file family \\ \hline 1023 sync\_freq & 1024 NetCDF file synchronization frequency (update of the time\_counter). 1025 Units can be ts (timestep), y, mo, d, h, mi, s. & 1026 sync\_freq="10d" & 1027 file family \\ \hline 1028 type (1) & 1029 specify if the output files are to be split spatially (multiple\_file) or not (one\_file) & 1030 type="multiple\_file" & 1031 file familly \\ \hline 1032 \end{tabularx} 1033 \caption{File attributes} 1114 \begin{table} 1115 \scriptsize 1116 \begin{tabularx}{\textwidth}{|l|X|l|l|} 1117 \hline 1118 attribute name & 1119 description & 1120 example & 1121 accepted by \\ 1122 \hline 1123 \hline 1124 min\_digits & 1125 specify the minimum of digits used in the core number in the name of the NetCDF file & 1126 min\_digits="4" & 1127 file family \\ 1128 \hline 1129 name\_suffix & 1130 suffix to be inserted after the name and before the cpu number and the ''.nc'' termination of a file & 1131 name\_suffix="\_myzoom" & 1132 file family \\ 1133 \hline 1134 output\_level & 1135 output priority of variables in a file: 0 (high) to 10 (low). 1136 All variables listed in the file with a level smaller or equal to output\_level will be output. 1137 Other variables won't be output even if they are listed in the file. & 1138 output\_level="10" & 1139 file family \\ 1140 \hline 1141 split\_freq & 1142 frequency at which to temporally split output files. 1143 Units can be ts (timestep), y, mo, d, h, mi, s. 1144 Useful for long runs to prevent over-sized output files. & 1145 split\_freq="1mo" & 1146 file family \\ 1147 \hline 1148 split\_freq\-\_format & 1149 date format used in the name of temporally split output files. 1150 Can be specified using the following syntaxes: \%y, \%mo, \%d, \%h \%mi and \%s & 1151 split\_freq\_format= "\%y\%mo\%d" & 1152 file family \\ 1153 \hline 1154 sync\_freq & 1155 NetCDF file synchronization frequency (update of the time\_counter). 1156 Units can be ts (timestep), y, mo, d, h, mi, s. & 1157 sync\_freq="10d" & 1158 file family \\ 1159 \hline 1160 type (1) & 1161 specify if the output files are to be split spatially (multiple\_file) or not (one\_file) & 1162 type="multiple\_file" & 1163 file familly \\ 1164 \hline 1165 \end{tabularx} 1166 \caption{File attributes} 1034 1167 \end{table} 1035 1168 1036 \begin{table} \scriptsize 1037 \begin{tabularx}{\textwidth}{|l|X|l|l|} \hline 1038 attribute name & 1039 description & 1040 example & 1041 accepted by \\ \hline \hline 1042 default\_value & 1043 missing\_value definition & 1044 default\_value="1.e20" & 1045 field family \\ \hline 1046 level & 1047 output priority of a field: 0 (high) to 10 (low) & 1048 level="1" & 1049 field family \\ \hline 1050 operation & 1051 type of temporal operation: average, accumulate, instantaneous, min, max and once & 1052 operation="average" & 1053 field family \\ \hline 1054 output\_freq & 1055 operation frequency. units can be ts (timestep), y, mo, d, h, mi, s. & 1056 output\_freq="1d12h" & 1057 field family \\ \hline 1058 prec & 1059 output precision: real 4 or real 8 & 1060 prec="4" & 1061 field family \\ \hline 1062 long\_name & 1063 define the long\_name attribute in the NetCDF file & 1064 long\_name="Vertical T levels" & 1065 field \\ \hline 1066 standard\_name & 1067 define the standard\_name attribute in the NetCDF file & 1068 standard\_name= "Eastward\_Sea\_Ice\_Transport" & 1069 field \\ \hline 1070 \end{tabularx} 1071 \caption{Field attributes} 1169 \begin{table} 1170 \scriptsize 1171 \begin{tabularx}{\textwidth}{|l|X|l|l|} 1172 \hline 1173 attribute name & 1174 description & 1175 example & 1176 accepted by \\ 1177 \hline 1178 \hline 1179 default\_value & 1180 missing\_value definition & 1181 default\_value="1.e20" & 1182 field family \\ 1183 \hline 1184 level & 1185 output priority of a field: 0 (high) to 10 (low) & 1186 level="1" & 1187 field family \\ 1188 \hline 1189 operation & 1190 type of temporal operation: average, accumulate, instantaneous, min, max and once & 1191 operation="average" & 1192 field family \\ 1193 \hline 1194 output\_freq & 1195 operation frequency. units can be ts (timestep), y, mo, d, h, mi, s. & 1196 output\_freq="1d12h" & 1197 field family \\ 1198 \hline 1199 prec & 1200 output precision: real 4 or real 8 & 1201 prec="4" & 1202 field family \\ 1203 \hline 1204 long\_name & 1205 define the long\_name attribute in the NetCDF file & 1206 long\_name="Vertical T levels" & 1207 field \\ 1208 \hline 1209 standard\_name & 1210 define the standard\_name attribute in the NetCDF file & 1211 standard\_name= "Eastward\_Sea\_Ice\_Transport" & 1212 field \\ 1213 \hline 1214 \end{tabularx} 1215 \caption{Field attributes} 1072 1216 \end{table} 1073 1217 1074 \begin{table} \scriptsize 1075 \begin{tabularx}{\textwidth}{|l|X|X|X|} \hline 1076 attribute name & 1077 description & 1078 example & 1079 accepted by \\ \hline \hline 1080 enabled & 1081 switch on/off the output of a field or a file & 1082 enabled=".true." & 1083 field, file families \\ \hline 1084 description & 1085 just for information, not used & 1086 description="ocean T grid variables" & 1087 all tags \\ \hline 1088 id & 1089 allow to identify a tag & 1090 id="nemo" & 1091 accepted by all tags except simulation \\ \hline 1092 name & 1093 name of a variable or a file. If the name of a file is undefined, its id is used as a name & 1094 name="tos" & 1095 field or file families \\ \hline 1096 positive & 1097 convention used for the orientation of vertival axis (positive downward in \NEMO). & 1098 positive="down" & 1099 axis family \\ \hline 1100 src & 1101 allow to include a file & 1102 src="./field\_def.xml" & 1103 accepted by all tags except simulation \\ \hline 1104 time\_origin & 1105 specify the origin of the time counter & 1106 time\_origin="1900-01-01 00:00:00" & 1107 context \\ \hline 1108 type (2) & 1109 define the type of a variable tag & 1110 type="boolean" & 1111 variable \\ \hline 1112 unit & 1113 unit of a variable or the vertical axis & 1114 unit="m" & 1115 field and axis families \\ \hline 1116 \end{tabularx} 1117 \caption{Miscellaneous attributes} 1218 \begin{table} 1219 \scriptsize 1220 \begin{tabularx}{\textwidth}{|l|X|X|X|} 1221 \hline 1222 attribute name & 1223 description & 1224 example & 1225 accepted by \\ 1226 \hline 1227 \hline 1228 enabled & 1229 switch on/off the output of a field or a file & 1230 enabled=".true." & 1231 field, file families \\ 1232 \hline 1233 description & 1234 just for information, not used & 1235 description="ocean T grid variables" & 1236 all tags \\ 1237 \hline 1238 id & 1239 allow to identify a tag & 1240 id="nemo" & 1241 accepted by all tags except simulation \\ 1242 \hline 1243 name & 1244 name of a variable or a file. If the name of a file is undefined, its id is used as a name & 1245 name="tos" & 1246 field or file families \\ 1247 \hline 1248 positive & 1249 convention used for the orientation of vertival axis (positive downward in \NEMO). & 1250 positive="down" & 1251 axis family \\ 1252 \hline 1253 src & 1254 allow to include a file & 1255 src="./field\_def.xml" & 1256 accepted by all tags except simulation \\ 1257 \hline 1258 time\_origin & 1259 specify the origin of the time counter & 1260 time\_origin="1900-01-01 00:00:00" & 1261 context \\ 1262 \hline 1263 type (2) & 1264 define the type of a variable tag & 1265 type="boolean" & 1266 variable \\ 1267 \hline 1268 unit & 1269 unit of a variable or the vertical axis & 1270 unit="m" & 1271 field and axis families \\ 1272 \hline 1273 \end{tabularx} 1274 \caption{Miscellaneous attributes} 1118 1275 \end{table} 1119 1276 … … 1200 1357 1201 1358 %------------------------------------------TABLE---------------------------------------------------- 1202 \begin{table} \scriptsize \centering 1203 \begin{tabular}{lrrr} 1204 Filename & NetCDF3 & NetCDF4 & Reduction \\ 1205 & filesize & filesize & \% \\ 1206 & (KB) & (KB) & \\ 1207 ORCA2\_restart\_0000.nc & 16420 & 8860 & 47\% \\ 1208 ORCA2\_restart\_0001.nc & 16064 & 11456 & 29\% \\ 1209 ORCA2\_restart\_0002.nc & 16064 & 9744 & 40\% \\ 1210 ORCA2\_restart\_0003.nc & 16420 & 9404 & 43\% \\ 1211 ORCA2\_restart\_0004.nc & 16200 & 5844 & 64\% \\ 1212 ORCA2\_restart\_0005.nc & 15848 & 8172 & 49\% \\ 1213 ORCA2\_restart\_0006.nc & 15848 & 8012 & 50\% \\ 1214 ORCA2\_restart\_0007.nc & 16200 & 5148 & 69\% \\ 1215 ORCA2\_2d\_grid\_T\_0000.nc & 2200 & 1504 & 32\% \\ 1216 ORCA2\_2d\_grid\_T\_0001.nc & 2200 & 1748 & 21\% \\ 1217 ORCA2\_2d\_grid\_T\_0002.nc & 2200 & 1592 & 28\% \\ 1218 ORCA2\_2d\_grid\_T\_0003.nc & 2200 & 1540 & 30\% \\ 1219 ORCA2\_2d\_grid\_T\_0004.nc & 2200 & 1204 & 46\% \\ 1220 ORCA2\_2d\_grid\_T\_0005.nc & 2200 & 1444 & 35\% \\ 1221 ORCA2\_2d\_grid\_T\_0006.nc & 2200 & 1428 & 36\% \\ 1222 ORCA2\_2d\_grid\_T\_0007.nc & 2200 & 1148 & 48\% \\ 1223 ... & ... & ... & ... \\ 1224 ORCA2\_2d\_grid\_W\_0000.nc & 4416 & 2240 & 50\% \\ 1225 ORCA2\_2d\_grid\_W\_0001.nc & 4416 & 2924 & 34\% \\ 1226 ORCA2\_2d\_grid\_W\_0002.nc & 4416 & 2512 & 44\% \\ 1227 ORCA2\_2d\_grid\_W\_0003.nc & 4416 & 2368 & 47\% \\ 1228 ORCA2\_2d\_grid\_W\_0004.nc & 4416 & 1432 & 68\% \\ 1229 ORCA2\_2d\_grid\_W\_0005.nc & 4416 & 1972 & 56\% \\ 1230 ORCA2\_2d\_grid\_W\_0006.nc & 4416 & 2028 & 55\% \\ 1231 ORCA2\_2d\_grid\_W\_0007.nc & 4416 & 1368 & 70\% \\ 1232 \end{tabular} 1233 \caption{ 1234 \protect\label{tab:NC4} 1235 Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression} 1359 \begin{table} 1360 \scriptsize 1361 \centering 1362 \begin{tabular}{lrrr} 1363 Filename & NetCDF3 & NetCDF4 & Reduction \\ 1364 & filesize & filesize & \% \\ 1365 & (KB) & (KB) & \\ 1366 ORCA2\_restart\_0000.nc & 16420 & 8860 & 47\% \\ 1367 ORCA2\_restart\_0001.nc & 16064 & 11456 & 29\% \\ 1368 ORCA2\_restart\_0002.nc & 16064 & 9744 & 40\% \\ 1369 ORCA2\_restart\_0003.nc & 16420 & 9404 & 43\% \\ 1370 ORCA2\_restart\_0004.nc & 16200 & 5844 & 64\% \\ 1371 ORCA2\_restart\_0005.nc & 15848 & 8172 & 49\% \\ 1372 ORCA2\_restart\_0006.nc & 15848 & 8012 & 50\% \\ 1373 ORCA2\_restart\_0007.nc & 16200 & 5148 & 69\% \\ 1374 ORCA2\_2d\_grid\_T\_0000.nc & 2200 & 1504 & 32\% \\ 1375 ORCA2\_2d\_grid\_T\_0001.nc & 2200 & 1748 & 21\% \\ 1376 ORCA2\_2d\_grid\_T\_0002.nc & 2200 & 1592 & 28\% \\ 1377 ORCA2\_2d\_grid\_T\_0003.nc & 2200 & 1540 & 30\% \\ 1378 ORCA2\_2d\_grid\_T\_0004.nc & 2200 & 1204 & 46\% \\ 1379 ORCA2\_2d\_grid\_T\_0005.nc & 2200 & 1444 & 35\% \\ 1380 ORCA2\_2d\_grid\_T\_0006.nc & 2200 & 1428 & 36\% \\ 1381 ORCA2\_2d\_grid\_T\_0007.nc & 2200 & 1148 & 48\% \\ 1382 ... & ... & ... & ... \\ 1383 ORCA2\_2d\_grid\_W\_0000.nc & 4416 & 2240 & 50\% \\ 1384 ORCA2\_2d\_grid\_W\_0001.nc & 4416 & 2924 & 34\% \\ 1385 ORCA2\_2d\_grid\_W\_0002.nc & 4416 & 2512 & 44\% \\ 1386 ORCA2\_2d\_grid\_W\_0003.nc & 4416 & 2368 & 47\% \\ 1387 ORCA2\_2d\_grid\_W\_0004.nc & 4416 & 1432 & 68\% \\ 1388 ORCA2\_2d\_grid\_W\_0005.nc & 4416 & 1972 & 56\% \\ 1389 ORCA2\_2d\_grid\_W\_0006.nc & 4416 & 2028 & 55\% \\ 1390 ORCA2\_2d\_grid\_W\_0007.nc & 4416 & 1368 & 70\% \\ 1391 \end{tabular} 1392 \caption{ 1393 \protect\label{tab:NC4} 1394 Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression 1395 } 1236 1396 \end{table} 1237 1397 %---------------------------------------------------------------------------------------------------- … … 1329 1489 1330 1490 \noindent Example: \\ 1331 \noindent {\scriptsize \texttt{ 1332 100.00000 90.00000 -1.50000 1.00000 0.00000 \\ 1333 102.00000 90.00000 -1.50000 1.00000 0.00000 \\ 1334 104.00000 90.00000 -1.50000 1.00000 0.00000 \\ 1335 106.00000 90.00000 -1.50000 1.00000 0.00000 \\ 1336 108.00000 90.00000 -1.50000 1.00000 0.00000}} \\ 1491 \noindent 1492 {\scriptsize 1493 \texttt{ 1494 100.00000 90.00000 -1.50000 1.00000 0.00000 \\ 1495 102.00000 90.00000 -1.50000 1.00000 0.00000 \\ 1496 104.00000 90.00000 -1.50000 1.00000 0.00000 \\ 1497 106.00000 90.00000 -1.50000 1.00000 0.00000 \\ 1498 108.00000 90.00000 -1.50000 1.00000 0.00000} 1499 } \\ 1337 1500 1338 1501 In the other case (longitude and latitude), input filename is init\_float. … … 1351 1514 1352 1515 \noindent Example: \\ 1353 \noindent {\scriptsize \texttt{ 1354 20.0 0.0 0.0 0 1 1 \\ 1355 -21.0 0.0 0.0 0 1 1 \\ 1356 -22.0 0.0 0.0 0 1 1 \\ 1357 -23.0 0.0 0.0 0 1 1 \\ 1358 -24.0 0.0 0.0 0 1 1 }} \\ 1516 \noindent 1517 {\scriptsize 1518 \texttt{ 1519 20.0 0.0 0.0 0 1 1 \\ 1520 -21.0 0.0 0.0 0 1 1 \\ 1521 -22.0 0.0 0.0 0 1 1 \\ 1522 -23.0 0.0 0.0 0 1 1 \\ 1523 -24.0 0.0 0.0 0 1 1 } 1524 } \\ 1359 1525 1360 1526 \np{jpnfl} is the total number of floats during the run. … … 1426 1592 The Harmonic analysis solve the following equation: 1427 1593 1428 \[h_{i} - A_{0} + \sum^{nb\_ana}_{j=1}[A_{j}cos(\nu_{j}t_{j}-\phi_{j})] = e_{i}\] 1594 \[ 1595 h_{i} - A_{0} + \sum^{nb\_ana}_{j=1}[A_{j}cos(\nu_{j}t_{j}-\phi_{j})] = e_{i} 1596 \] 1429 1597 1430 1598 With $A_{j}$, $\nu_{j}$, $\phi_{j}$, the amplitude, frequency and phase for each wave and $e_{i}$ the error. … … 1432 1600 We can rewrite this equation: 1433 1601 1434 \[h_{i} - A_{0} + \sum^{nb\_ana}_{j=1}[C_{j}cos(\nu_{j}t_{j})+S_{j}sin(\nu_{j}t_{j})] = e_{i}\] 1602 \[ 1603 h_{i} - A_{0} + \sum^{nb\_ana}_{j=1}[C_{j}cos(\nu_{j}t_{j})+S_{j}sin(\nu_{j}t_{j})] = e_{i} 1604 \] 1435 1605 1436 1606 with $A_{j}=\sqrt{C^{2}_{j}+S^{2}_{j}}$ and $\phi_{j}=arctan(S_{j}/C_{j})$. … … 1497 1667 1498 1668 \noindent If nclass $\neq$ 0, the next lines contain the class type and the nclass bounds: \\ 1499 {\scriptsize \texttt{ 1500 long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name \\ 1501 classtype \\ 1502 zbound1 \\ 1503 zbound2 \\ 1504 . \\ 1505 . \\ 1506 nclass-1 \\ 1507 nclass}} 1669 {\scriptsize 1670 \texttt{ 1671 long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name \\ 1672 classtype \\ 1673 zbound1 \\ 1674 zbound2 \\ 1675 . \\ 1676 . \\ 1677 nclass-1 \\ 1678 nclass} 1679 } 1508 1680 1509 1681 \noindent where \texttt{classtype} can be: … … 1527 1699 Examples of two sections, the ACC\_Drake\_Passage with no classes, 1528 1700 and the ATL\_Cuba\_Florida with 4 temperature clases (5 class bounds), are shown: \\ 1529 \noindent {\scriptsize \texttt{ 1530 -68. -54.5 -60. -64.7 00 okstrpond noice ACC\_Drake\_Passage \\ 1531 -80.5 22.5 -80.5 25.5 05 nostrpond noice ATL\_Cuba\_Florida \\ 1532 ztem \\ 1533 -2.0 \\ 1534 4.5 \\ 1535 7.0 \\ 1536 12.0 \\ 1537 40.0}} 1701 \noindent 1702 {\scriptsize 1703 \texttt{ 1704 -68. -54.5 -60. -64.7 00 okstrpond noice ACC\_Drake\_Passage \\ 1705 -80.5 22.5 -80.5 25.5 05 nostrpond noice ATL\_Cuba\_Florida \\ 1706 ztem \\ 1707 -2.0 \\ 1708 4.5 \\ 1709 7.0 \\ 1710 12.0 \\ 1711 40.0} 1712 } 1538 1713 1539 1714 \subsubsection{To read the output files} 1540 1715 1541 1716 The output format is: \\ 1542 {\scriptsize \texttt{ 1543 date, time-step number, section number, \\ 1544 section name, section slope coefficient, class number, \\ 1545 class name, class bound 1 , classe bound2, \\ 1546 transport\_direction1, transport\_direction2, \\ 1547 transport\_total}} \\ 1717 {\scriptsize 1718 \texttt{ 1719 date, time-step number, section number, \\ 1720 section name, section slope coefficient, class number, \\ 1721 class name, class bound 1 , classe bound2, \\ 1722 transport\_direction1, transport\_direction2, \\ 1723 transport\_total} 1724 } \\ 1548 1725 1549 1726 For sections with classes, the first \texttt{nclass-1} lines correspond to the transport for each class and … … 1559 1736 direction: \\ 1560 1737 1561 \begin{table} \scriptsize 1562 \begin{tabular}{|l|l|l|l|l|} \hline 1563 section slope coefficient & section type & direction 1 & direction 2 & total transport 1564 \\ \hline 1565 0. & horizontal & northward & southward & postive: northward 1566 \\ \hline 1567 1000. & vertical & eastward & westward & postive: eastward 1568 \\ \hline 1569 \texttt{$\neq$ 0, $\neq$ 1000.} & diagonal & eastward & westward & postive: eastward 1570 \\ \hline 1571 \end{tabular} 1738 \begin{table} 1739 \scriptsize 1740 \begin{tabular}{|l|l|l|l|l|} 1741 \hline 1742 section slope coefficient & section type & direction 1 & direction 2 & total transport \\ 1743 \hline 1744 0. & horizontal & northward & southward & postive: northward \\ 1745 \hline 1746 1000. & vertical & eastward & westward & postive: eastward \\ 1747 \hline 1748 \texttt{$\neq$ 0, $\neq$ 1000.} & diagonal & eastward & westward & postive: eastward \\ 1749 \hline 1750 \end{tabular} 1572 1751 \end{table} 1573 1752 … … 1609 1788 A non-Boussinesq fluid conserves mass. It satisfies the following relations: 1610 1789 1611 \[ \begin{split} 1612 \mathcal{M} &= \mathcal{V} \;\bar{\rho} \\ 1613 \mathcal{V} &= \mathcal{A} \;\bar{\eta} 1614 \end{split} \label{eq:MV_nBq} 1615 \] 1790 \begin{equation} 1791 \begin{split} 1792 \mathcal{M} &= \mathcal{V} \;\bar{\rho} \\ 1793 \mathcal{V} &= \mathcal{A} \;\bar{\eta} 1794 \end{split} 1795 \label{eq:MV_nBq} 1796 \end{equation} 1616 1797 1617 1798 Temporal changes in total mass is obtained from the density conservation equation: 1618 1799 1619 \[ \frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) 1620 = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface} 1621 \label{eq:Co_nBq} \] 1800 \begin{equation} 1801 \frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) 1802 = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface} 1803 \label{eq:Co_nBq} 1804 \end{equation} 1622 1805 1623 1806 where $\rho$ is the \textit{in situ} density, and \textit{emp} the surface mass exchanges with the other media of … … 1625 1808 Its global averaged leads to the total mass change 1626 1809 1627 \[ \partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}} 1628 \label{eq:Mass_nBq} \] 1810 \begin{equation} 1811 \partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}} 1812 \label{eq:Mass_nBq} 1813 \end{equation} 1629 1814 1630 1815 where $\overline{\textit{emp}} = \int_S \textit{emp}\,ds$ is the net mass flux through the ocean surface. … … 1632 1817 the evolution equation of the mean sea level 1633 1818 1634 \[ \partial_t \bar{\eta} = \frac{\overline{\textit{emp}}}{ \bar{\rho}} 1635 - \frac{\mathcal{V}}{\mathcal{A}} \;\frac{\partial_t \bar{\rho} }{\bar{\rho}} 1636 \label{eq:ssh_nBq} \] 1819 \begin{equation} 1820 \partial_t \bar{\eta} = \frac{\overline{\textit{emp}}}{ \bar{\rho}} 1821 - \frac{\mathcal{V}}{\mathcal{A}} \;\frac{\partial_t \bar{\rho} }{\bar{\rho}} 1822 \label{eq:ssh_nBq} 1823 \end{equation} 1637 1824 1638 1825 The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean. … … 1643 1830 In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into the incompressibility equation: 1644 1831 1645 \[ \frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) 1646 = \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface} 1647 \label{eq:Co_Bq} \] 1832 \[ 1833 \frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) = \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface} 1834 % \label{eq:Co_Bq} 1835 \] 1648 1836 1649 1837 and the global average of this equation now gives the temporal change of the total volume, 1650 1838 1651 \[ \partial_t \mathcal{V} = \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o} 1652 \label{eq:V_Bq} \] 1839 \[ 1840 \partial_t \mathcal{V} = \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o} 1841 % \label{eq:V_Bq} 1842 \] 1653 1843 1654 1844 Only the volume is conserved, not mass, or, more precisely, the mass which is conserved is the Boussinesq mass, … … 1666 1856 $\eta_s$, a spatially uniform variable, as follows: 1667 1857 1668 \[ \mathcal{M}_o = \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A} 1669 \label{eq:M_Bq} \] 1858 \begin{equation} 1859 \mathcal{M}_o = \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A} 1860 \label{eq:M_Bq} 1861 \end{equation} 1670 1862 1671 1863 Any change in $\mathcal{M}$ which cannot be explained by the net mass flux through the ocean surface … … 1675 1867 in \autoref{eq:M_Bq} leads to a very simple form for the steric height: 1676 1868 1677 \[ \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D} 1678 \label{eq:steric_Bq} \] 1869 \begin{equation} 1870 \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D} 1871 \label{eq:steric_Bq} 1872 \end{equation} 1679 1873 1680 1874 The above formulation of the steric height of a Boussinesq ocean requires four remarks. … … 1698 1892 In the non linear free surface case, $i.e.$ \key{vvl} defined, it is given by 1699 1893 1700 \[ \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t} e_{2t} e_{3t} } 1701 { \sum_{i,\,j,\,k} e_{1t} e_{2t} e_{3t} } 1702 \label{eq:discrete_steric_Bq_nfs} \] 1894 \[ 1895 \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t} e_{2t} e_{3t} }{ \sum_{i,\,j,\,k} e_{1t} e_{2t} e_{3t} } 1896 % \label{eq:discrete_steric_Bq_nfs} 1897 \] 1703 1898 1704 1899 whereas in the linear free surface, … … 1706 1901 better approximate the total ocean mass and thus the steric sea level: 1707 1902 1708 \[ \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} d_a\; e_{1t}e_{2t} \eta } 1709 { \sum_{i,\,j,\,k} e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} e_{1t}e_{2t} \eta } 1710 \label{eq:discrete_steric_Bq_fs} \] 1903 \[ 1904 \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} d_a\; e_{1t}e_{2t} \eta } 1905 { \sum_{i,\,j,\,k} e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} e_{1t}e_{2t} \eta } 1906 % \label{eq:discrete_steric_Bq_fs} 1907 \] 1711 1908 1712 1909 The fourth and last remark concerns the effective sea level and the presence of sea-ice. … … 1725 1922 It is given by: 1726 1923 1727 \[ \eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv 1728 \label{eq:thermosteric_Bq} \] 1924 \[ 1925 \eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv 1926 % \label{eq:thermosteric_Bq} 1927 \] 1729 1928 1730 1929 where $S_o$ and $p_o$ are the initial salinity and pressure, respectively. … … 1777 1976 \begin{center} 1778 1977 \includegraphics[width=1.0\textwidth]{Fig_mask_subasins} 1779 \caption{ \protect\label{fig:mask_subasins} 1978 \caption{ 1979 \protect\label{fig:mask_subasins} 1780 1980 Decomposition of the World Ocean (here ORCA2) into sub-basin used in to 1781 1981 compute the heat and salt transports as well as the meridional stream-function: 1782 1982 Atlantic basin (red), Pacific basin (green), Indian basin (bleue), Indo-Pacific basin (bleue+green). 1783 1983 Note that semi-enclosed seas (Red, Med and Baltic seas) as well as Hudson Bay are removed from the sub-basins. 1784 Note also that the Arctic Ocean has been split into Atlantic and Pacific basins along the North fold line.} 1785 \end{center} \end{figure} 1984 Note also that the Arctic Ocean has been split into Atlantic and Pacific basins along the North fold line. 1985 } 1986 \end{center} 1987 \end{figure} 1786 1988 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1787 1989 … … 1835 2037 The advective Courant numbers can be calculated according to 1836 2038 1837 \[ C_u = |u|\frac{\rdt}{e_{1u}}, \quad C_v = |v|\frac{\rdt}{e_{2v}}, \quad C_w = |w|\frac{\rdt}{e_{3w}} 1838 \label{eq:CFL} \] 2039 \[ 2040 C_u = |u|\frac{\rdt}{e_{1u}}, \quad C_v = |v|\frac{\rdt}{e_{2v}}, \quad C_w = |w|\frac{\rdt}{e_{3w}} 2041 % \label{eq:CFL} 2042 \] 1839 2043 1840 2044 in the zonal, meridional and vertical directions respectively. … … 1854 2058 % ================================================================ 1855 2059 2060 \biblio 2061 1856 2062 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_DIU.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 28 29 \end{itemize} 29 30 30 Models are provided for both the warm layer, \md fl{diurnal_bulk}, and the cool skin, \mdl{cool_skin}.31 Models are provided for both the warm layer, \mdl{diurnal\_bulk}, and the cool skin, \mdl{cool\_skin}. 31 32 Foundation SST is not considered as it can be obtained either from the main NEMO model 32 33 ($i.e.$ from the temperature of the top few model levels) or from some other source. … … 61 62 The warm layer is calculated using the model of \citet{Takaya_al_JGR10} (TAKAYA10 model hereafter). 62 63 This is a simple flux based model that is defined by the equations 63 \begin{ eqnarray}64 \begin{align} 64 65 \frac{\partial{\Delta T_{\rm{wl}}}}{\partial{t}}&=&\frac{Q(\nu+1)}{D_T\rho_w c_p 65 66 \nu}-\frac{(\nu+1)ku^*_{w}f(L_a)\Delta T}{D_T\Phi\!\left(\frac{D_T}{L}\right)} \mbox{,} 66 67 \label{eq:ecmwf1} \\ 67 68 L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{eq:ecmwf2} 68 \end{ eqnarray}69 \end{align} 69 70 where $\Delta T_{\rm{wl}}$ is the temperature difference between the top of the warm layer and the depth $D_T=3$\,m at which there is assumed to be no diurnal signal. 70 71 In equation (\autoref{eq:ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion coefficient of water, … … 72 73 $\rho_w$ is the water density, and $L$ is the Monin-Obukhov length. 73 74 The tunable variable $\nu$ is a shape parameter that defines the expected subskin temperature profile via 74 $T(z) =T(0)-\left(\frac{z}{D_T}\right)^\nu\DeltaT_{\rm{wl}}$,75 $T(z) = T(0) - \left( \frac{z}{D_T} \right)^\nu \Delta T_{\rm{wl}}$, 75 76 where $T$ is the absolute temperature and $z\le D_T$ is the depth below the top of the warm layer. 76 77 The influence of wind on TAKAYA10 comes through the magnitude of the friction velocity of the water $u^*_{w}$, … … 80 81 The symbol $Q$ in equation (\autoref{eq:ecmwf1}) is the instantaneous total thermal energy flux into 81 82 the diurnal layer, $i.e.$ 82 \begin{equation} 83 Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,} \label{eq:e_flux_eqn} 84 \end{equation} 83 \[ 84 Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,} 85 % \label{eq:e_flux_eqn} 86 \] 85 87 where $Q_{\rm{h}}$ is the sensible and latent heat flux, $Q_{\rm{lw}}$ is the long wave flux, 86 88 and $Q_{\rm{sol}}$ is the solar flux absorbed within the diurnal warm layer. … … 118 120 The cool skin is modelled using the framework of \citet{Saunders_JAS82} who used a formulation of the near surface temperature difference based upon the heat flux and the friction velocity $u^*_{w}$. 119 121 As the cool skin is so thin (~1\,mm) we ignore the solar flux component to the heat flux and the Saunders equation for the cool skin temperature difference $\Delta T_{\rm{cs}}$ becomes 120 \ begin{equation}121 \label{eq:sunders_eqn}122 \Delta T_{\rm{cs}}=\frac{Q_{\rm{ns}}\delta}{k_t} \mbox{,}123 \ end{equation}122 \[ 123 % \label{eq:sunders_eqn} 124 \Delta T_{\rm{cs}}=\frac{Q_{\rm{ns}}\delta}{k_t} \mbox{,} 125 \] 124 126 where $Q_{\rm{ns}}$ is the, usually negative, non-solar heat flux into the ocean and 125 127 $k_t$ is the thermal conductivity of sea water. … … 136 138 both low and high wind speeds. 137 139 Specifically, 138 \ begin{equation}139 \label{eq:artale_lambda_eqn}140 \lambda = \frac{ 8.64\times10^4 u^*_{w} k_t }{ \rho c_p h \mu \gamma }\mbox{,}141 \ end{equation}140 \[ 141 % \label{eq:artale_lambda_eqn} 142 \lambda = \frac{ 8.64\times10^4 u^*_{w} k_t }{ \rho c_p h \mu \gamma }\mbox{,} 143 \] 142 144 where $h=10$\,m is a reference depth and 143 145 $\gamma$ is a dimensionless function of wind speed $u$: 144 \begin{equation} 145 \label{eq:artale_gamma_eqn} 146 \gamma = \left\{ \begin{matrix} 147 0.2u+0.5\mbox{,} & u \le 7.5\,\mbox{ms}^{-1} \\ 148 1.6u-10\mbox{,} & 7.5 < u < 10\,\mbox{ms}^{-1} \\ 149 6\mbox{,} & \ge 10\,\mbox{ms}^{-1} \\ 150 \end{matrix} 151 \right. 152 \end{equation} 146 \[ 147 % \label{eq:artale_gamma_eqn} 148 \gamma = 149 \begin{cases} 150 0.2u+0.5\mbox{,} & u \le 7.5\,\mbox{ms}^{-1} \\ 151 1.6u-10\mbox{,} & 7.5 < u < 10\,\mbox{ms}^{-1} \\ 152 6\mbox{,} & u \ge 10\,\mbox{ms}^{-1} \\ 153 \end{cases} 154 \] 155 156 \biblio 153 157 154 158 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_DOM.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ 4 % Chapter 2 ———Space and Time Domain (DOM)5 % Chapter 2 Space and Time Domain (DOM) 5 6 % ================================================================ 6 7 \chapter{Space Domain (DOM)} 7 8 \label{chap:DOM} 9 8 10 \minitoc 9 11 … … 16 18 % - domclo: closed sea and lakes.... management of closea sea area : specific to global configuration, both forced and coupled 17 19 18 19 20 \newpage 20 $\ $\newline % force a new line21 21 22 22 Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretization \autoref{chap:STP}, … … 25 25 and other information relevant to the main directory routines as well as the DOM (DOMain) directory. 26 26 27 $\ $\newline % force a new line28 29 27 % ================================================================ 30 28 % Fundamentals of the Discretisation … … 40 38 41 39 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 42 \begin{figure}[!tb] \begin{center} 43 \includegraphics[width=0.90\textwidth]{Fig_cell} 44 \caption{ \protect\label{fig:cell} 45 Arrangement of variables. 46 $t$ indicates scalar points where temperature, salinity, density, pressure and horizontal divergence are defined. 47 ($u$,$v$,$w$) indicates vector points, 48 and $f$ indicates vorticity points where both relative and planetary vorticities are defined} 49 \end{center} \end{figure} 40 \begin{figure}[!tb] 41 \begin{center} 42 \includegraphics[width=0.90\textwidth]{Fig_cell} 43 \caption{ 44 \protect\label{fig:cell} 45 Arrangement of variables. 46 $t$ indicates scalar points where temperature, salinity, density, pressure and 47 horizontal divergence are defined. 48 ($u$,$v$,$w$) indicates vector points, 49 and $f$ indicates vorticity points where both relative and planetary vorticities are defined 50 } 51 \end{center} 52 \end{figure} 50 53 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 51 54 … … 83 86 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 84 87 \begin{table}[!tb] 85 \begin{center} \begin{tabular}{|p{46pt}|p{56pt}|p{56pt}|p{56pt}|} 86 \hline 87 T &$i$ & $j$ & $k$ \\ \hline 88 u & $i+1/2$ & $j$ & $k$ \\ \hline 89 v & $i$ & $j+1/2$ & $k$ \\ \hline 90 w & $i$ & $j$ & $k+1/2$ \\ \hline 91 f & $i+1/2$ & $j+1/2$ & $k$ \\ \hline 92 uw & $i+1/2$ & $j$ & $k+1/2$ \\ \hline 93 vw & $i$ & $j+1/2$ & $k+1/2$ \\ \hline 94 fw & $i+1/2$ & $j+1/2$ & $k+1/2$ \\ \hline 95 \end{tabular} 96 \caption{ \protect\label{tab:cell} 97 Location of grid-points as a function of integer or integer and a half value of the column, line or level. 98 This indexing is only used for the writing of the semi-discrete equation. 99 In the code, the indexing uses integer values only and has a reverse direction in the vertical 100 (see \autoref{subsec:DOM_Num_Index})} 101 \end{center} 88 \begin{center} 89 \begin{tabular}{|p{46pt}|p{56pt}|p{56pt}|p{56pt}|} 90 \hline 91 T &$i$ & $j$ & $k$ \\ \hline 92 u & $i+1/2$ & $j$ & $k$ \\ \hline 93 v & $i$ & $j+1/2$ & $k$ \\ \hline 94 w & $i$ & $j$ & $k+1/2$ \\ \hline 95 f & $i+1/2$ & $j+1/2$ & $k$ \\ \hline 96 uw & $i+1/2$ & $j$ & $k+1/2$ \\ \hline 97 vw & $i$ & $j+1/2$ & $k+1/2$ \\ \hline 98 fw & $i+1/2$ & $j+1/2$ & $k+1/2$ \\ \hline 99 \end{tabular} 100 \caption{ 101 \protect\label{tab:cell} 102 Location of grid-points as a function of integer or integer and a half value of the column, line or level. 103 This indexing is only used for the writing of the semi-discrete equation. 104 In the code, the indexing uses integer values only and has a reverse direction in the vertical 105 (see \autoref{subsec:DOM_Num_Index}) 106 } 107 \end{center} 102 108 \end{table} 103 109 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 111 117 Given the values of a variable $q$ at adjacent points, 112 118 the differencing and averaging operators at the midpoint between them are: 113 \begin{subequations} \label{eq:di_mi} 114 \begin{align} 115 \delta _i [q] &= \ \ q(i+1/2) - q(i-1/2) \\ 116 \overline q^{\,i} &= \left\{ q(i+1/2) + q(i-1/2) \right\} \; / \; 2 117 \end{align} 118 \end{subequations} 119 \[ 120 % \label{eq:di_mi} 121 \begin{split} 122 \delta_i [q] &= \ \ q(i+1/2) - q(i-1/2) \\ 123 \overline q^{\,i} &= \left\{ q(i+1/2) + q(i-1/2) \right\} \; / \; 2 124 \end{split} 125 \] 119 126 120 127 Similar operators are defined with respect to $i+1/2$, $j$, $j+1/2$, $k$, and $k+1/2$. … … 123 130 its Laplacien is defined at $t$-point. 124 131 These operators have the following discrete forms in the curvilinear $s$-coordinate system: 125 \begin{equation} \label{eq:DOM_grad} 126 \nabla q\equiv \frac{1}{e_{1u} } \delta _{i+1/2 } [q] \;\,\mathbf{i} 127 + \frac{1}{e_{2v} } \delta _{j+1/2 } [q] \;\,\mathbf{j} 128 + \frac{1}{e_{3w}} \delta _{k+1/2} [q] \;\,\mathbf{k} 129 \end{equation} 130 \begin{multline} \label{eq:DOM_lap} 131 \Delta q\equiv \frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 132 \;\left( \delta_i \left[ \frac{e_{2u}\,e_{3u}} {e_{1u}} \;\delta_{i+1/2} [q] \right] 133 + \delta_j \left[ \frac{e_{1v}\,e_{3v}} {e_{2v}} \;\delta_{j+1/2} [q] \right] \; \right) \\ 134 +\frac{1}{e_{3t}} \delta_k \left[ \frac{1}{e_{3w} } \;\delta_{k+1/2} [q] \right] 135 \end{multline} 132 \[ 133 % \label{eq:DOM_grad} 134 \nabla q\equiv \frac{1}{e_{1u} } \delta_{i+1/2 } [q] \;\,\mathbf{i} 135 + \frac{1}{e_{2v} } \delta_{j+1/2 } [q] \;\,\mathbf{j} 136 + \frac{1}{e_{3w}} \delta_{k+1/2} [q] \;\,\mathbf{k} 137 \] 138 \begin{multline*} 139 % \label{eq:DOM_lap} 140 \Delta q\equiv \frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 141 \;\left( \delta_i \left[ \frac{e_{2u}\,e_{3u}} {e_{1u}} \;\delta_{i+1/2} [q] \right] 142 + \delta_j \left[ \frac{e_{1v}\,e_{3v}} {e_{2v}} \;\delta_{j+1/2} [q] \right] \; \right) \\ 143 +\frac{1}{e_{3t}} \delta_k \left[ \frac{1}{e_{3w} } \;\delta_{k+1/2} [q] \right] 144 \end{multline*} 136 145 137 146 Following \autoref{eq:PE_curl} and \autoref{eq:PE_div}, a vector ${\rm {\bf A}}=\left( a_1,a_2,a_3\right)$ 138 147 defined at vector points $(u,v,w)$ has its three curl components defined at $vw$-, $uw$, and $f$-points, 139 148 and its divergence defined at $t$-points: 140 \begin{eqnarray} \label{eq:DOM_curl} 141 \nabla \times {\rm{\bf A}}\equiv & 142 \frac{1}{e_{2v}\,e_{3vw} } \ \left( \delta_{j +1/2} \left[e_{3w}\,a_3 \right] -\delta_{k+1/2} \left[e_{2v} \,a_2 \right] \right) &\ \mathbf{i} \\ 143 +& \frac{1}{e_{2u}\,e_{3uw}} \ \left( \delta_{k+1/2} \left[e_{1u}\,a_1 \right] -\delta_{i +1/2} \left[e_{3w}\,a_3 \right] \right) &\ \mathbf{j} \\ 144 +& \frac{1}{e_{1f} \,e_{2f} } \ \left( \delta_{i +1/2} \left[e_{2v}\,a_2 \right] -\delta_{j +1/2} \left[e_{1u}\,a_1 \right] \right) &\ \mathbf{k} 145 \end{eqnarray} 146 \begin{eqnarray} \label{eq:DOM_div} 147 \nabla \cdot \rm{\bf A} \equiv 148 \frac{1}{e_{1t}\,e_{2t}\,e_{3t}} \left( \delta_i \left[e_{2u}\,e_{3u}\,a_1 \right] 149 +\delta_j \left[e_{1v}\,e_{3v}\,a_2 \right] \right)+\frac{1}{e_{3t} }\delta_k \left[a_3 \right] 150 \end{eqnarray} 149 \begin{align*} 150 % \label{eq:DOM_curl} 151 \nabla \times {\rm{\bf A}}\equiv & 152 \frac{1}{e_{2v}\,e_{3vw} } \ \left( \delta_{j +1/2} \left[e_{3w}\,a_3 \right] -\delta_{k+1/2} \left[e_{2v} \,a_2 \right] \right) &\ \mathbf{i} \\ 153 +& \frac{1}{e_{2u}\,e_{3uw}} \ \left( \delta_{k+1/2} \left[e_{1u}\,a_1 \right] -\delta_{i +1/2} \left[e_{3w}\,a_3 \right] \right) &\ \mathbf{j} \\ 154 +& \frac{1}{e_{1f} \,e_{2f} } \ \left( \delta_{i +1/2} \left[e_{2v}\,a_2 \right] -\delta_{j +1/2} \left[e_{1u}\,a_1 \right] \right) &\ \mathbf{k} 155 \end{align*} 156 \begin{align*} 157 % \label{eq:DOM_div} 158 \nabla \cdot \rm{\bf A} \equiv 159 \frac{1}{e_{1t}\,e_{2t}\,e_{3t}} \left( \delta_i \left[e_{2u}\,e_{3u}\,a_1 \right] 160 +\delta_j \left[e_{1v}\,e_{3v}\,a_2 \right] \right)+\frac{1}{e_{3t} }\delta_k \left[a_3 \right] 161 \end{align*} 151 162 152 163 The vertical average over the whole water column denoted by an overbar becomes for a quantity $q$ which 153 164 is a masked field (i.e. equal to zero inside solid area): 154 \begin{equation} \label{eq:DOM_bar} 155 \bar q = \frac{1}{H} \int_{k^b}^{k^o} {q\;e_{3q} \,dk} 156 \equiv \frac{1}{H_q }\sum\limits_k {q\;e_{3q} } 165 \begin{equation} 166 \label{eq:DOM_bar} 167 \bar q = \frac{1}{H} \int_{k^b}^{k^o} {q\;e_{3q} \,dk} 168 \equiv \frac{1}{H_q }\sum\limits_k {q\;e_{3q} } 157 169 \end{equation} 158 170 where $H_q$ is the ocean depth, which is the masked sum of the vertical scale factors at $q$ points, … … 162 174 163 175 In continuous form, the following properties are satisfied: 164 \begin{equation} \label{eq:DOM_curl_grad} 165 \nabla \times \nabla q ={\rm {\bf {0}}} 176 \begin{equation} 177 \label{eq:DOM_curl_grad} 178 \nabla \times \nabla q ={\rm {\bf {0}}} 166 179 \end{equation} 167 \begin{equation} \label{eq:DOM_div_curl} 168 \nabla \cdot \left( {\nabla \times {\rm {\bf A}}} \right)=0 180 \begin{equation} 181 \label{eq:DOM_div_curl} 182 \nabla \cdot \left( {\nabla \times {\rm {\bf A}}} \right)=0 169 183 \end{equation} 170 184 … … 179 193 $\overline{\,\cdot\,}^{\,k}$) are symmetric linear operators, 180 194 $i.e.$ 181 \begin{align} 182 \label{eq:DOM_di_adj}183 \sum\limits_i { a_i \;\delta _i \left[ b \right]} 184 &\equiv -\sum\limits_i {\delta_{i+1/2} \left[ a \right]\;b_{i+1/2} } \\185 \label{eq:DOM_mi_adj}186 \sum\limits_i { a_i \;\overline b^{\,i}} 187 & \equiv \quad \sum\limits_i {\overline a ^{\,i+1/2}\;b_{i+1/2} } 195 \begin{align} 196 \label{eq:DOM_di_adj} 197 \sum\limits_i { a_i \;\delta_i \left[ b \right]} 198 &\equiv -\sum\limits_i {\delta_{i+1/2} \left[ a \right]\;b_{i+1/2} } \\ 199 \label{eq:DOM_mi_adj} 200 \sum\limits_i { a_i \;\overline b^{\,i}} 201 & \equiv \quad \sum\limits_i {\overline a ^{\,i+1/2}\;b_{i+1/2} } 188 202 \end{align} 189 203 … … 200 214 201 215 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 202 \begin{figure}[!tb] \begin{center} 203 \includegraphics[width=0.90\textwidth]{Fig_index_hor} 204 \caption{ \protect\label{fig:index_hor} 205 Horizontal integer indexing used in the \textsc{Fortran} code. 206 The dashed area indicates the cell in which variables contained in arrays have the same $i$- and $j$-indices} 207 \end{center} \end{figure} 216 \begin{figure}[!tb] 217 \begin{center} 218 \includegraphics[width=0.90\textwidth]{Fig_index_hor} 219 \caption{ 220 \protect\label{fig:index_hor} 221 Horizontal integer indexing used in the \textsc{Fortran} code. 222 The dashed area indicates the cell in which variables contained in arrays have the same $i$- and $j$-indices 223 } 224 \end{center} 225 \end{figure} 208 226 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 209 227 … … 249 267 250 268 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 251 \begin{figure}[!pt] \begin{center} 252 \includegraphics[width=.90\textwidth]{Fig_index_vert} 253 \caption{ \protect\label{fig:index_vert} 254 Vertical integer indexing used in the \textsc{Fortran } code. 255 Note that the $k$-axis is orientated downward. 256 The dashed area indicates the cell in which variables contained in arrays have the same $k$-index.} 257 \end{center} \end{figure} 269 \begin{figure}[!pt] 270 \begin{center} 271 \includegraphics[width=.90\textwidth]{Fig_index_vert} 272 \caption{ 273 \protect\label{fig:index_vert} 274 Vertical integer indexing used in the \textsc{Fortran } code. 275 Note that the $k$-axis is orientated downward. 276 The dashed area indicates the cell in which variables contained in arrays have the same $k$-index. 277 } 278 \end{center} 279 \end{figure} 258 280 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 259 281 … … 272 294 the code is run in parallel using domain decomposition (\key{mpp\_mpi} defined, 273 295 see \autoref{sec:LBC_mpp}). 274 275 276 $\ $\newline % force a new line277 296 278 297 % ================================================================ … … 351 370 The model computes the grid-point positions and scale factors in the horizontal plane as follows: 352 371 \begin{flalign*} 353 \lambda_t &\equiv \text{glamt}= \lambda(i) & \varphi_t &\equiv \text{gphit} = \varphi(j)\\354 \lambda_u &\equiv \text{glamu}= \lambda(i+1/2)& \varphi_u &\equiv \text{gphiu}= \varphi(j)\\355 \lambda_v &\equiv \text{glamv}= \lambda(i) & \varphi_v &\equiv \text{gphiv} = \varphi(j+1/2)\\356 \lambda_f &\equiv \text{glamf }= \lambda(i+1/2)& \varphi_f &\equiv \text{gphif }= \varphi(j+1/2) 372 \lambda_t &\equiv \text{glamt}= \lambda(i) & \varphi_t &\equiv \text{gphit} = \varphi(j)\\ 373 \lambda_u &\equiv \text{glamu}= \lambda(i+1/2)& \varphi_u &\equiv \text{gphiu}= \varphi(j)\\ 374 \lambda_v &\equiv \text{glamv}= \lambda(i) & \varphi_v &\equiv \text{gphiv} = \varphi(j+1/2)\\ 375 \lambda_f &\equiv \text{glamf }= \lambda(i+1/2)& \varphi_f &\equiv \text{gphif }= \varphi(j+1/2) 357 376 \end{flalign*} 358 377 \begin{flalign*} 359 e_{1t} &\equiv \text{e1t} = r_a |\lambda'(i) \; \cos\varphi(j) |&360 e_{2t} &\equiv \text{e2t} = r_a |\varphi'(j)| \\361 e_{1u} &\equiv \text{e1t} = r_a |\lambda'(i+1/2) \; \cos\varphi(j) |&362 e_{2u} &\equiv \text{e2t} = r_a |\varphi'(j)|\\363 e_{1v} &\equiv \text{e1t} = r_a |\lambda'(i) \; \cos\varphi(j+1/2) |&364 e_{2v} &\equiv \text{e2t} = r_a |\varphi'(j+1/2)|\\365 e_{1f} &\equiv \text{e1t} = r_a |\lambda'(i+1/2)\; \cos\varphi(j+1/2) |&366 e_{2f} &\equiv \text{e2t} = r_a |\varphi'(j+1/2)|378 e_{1t} &\equiv \text{e1t} = r_a |\lambda'(i) \; \cos\varphi(j) |& 379 e_{2t} &\equiv \text{e2t} = r_a |\varphi'(j)| \\ 380 e_{1u} &\equiv \text{e1t} = r_a |\lambda'(i+1/2) \; \cos\varphi(j) |& 381 e_{2u} &\equiv \text{e2t} = r_a |\varphi'(j)|\\ 382 e_{1v} &\equiv \text{e1t} = r_a |\lambda'(i) \; \cos\varphi(j+1/2) |& 383 e_{2v} &\equiv \text{e2t} = r_a |\varphi'(j+1/2)|\\ 384 e_{1f} &\equiv \text{e1t} = r_a |\lambda'(i+1/2)\; \cos\varphi(j+1/2) |& 385 e_{2f} &\equiv \text{e2t} = r_a |\varphi'(j+1/2)| 367 386 \end{flalign*} 368 387 where the last letter of each computational name indicates the grid point considered and … … 385 404 An example of the effect of such a choice is shown in \autoref{fig:zgr_e3}. 386 405 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 387 \begin{figure}[!t] \begin{center} 388 \includegraphics[width=0.90\textwidth]{Fig_zgr_e3} 389 \caption{ \protect\label{fig:zgr_e3} 390 Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, 391 and (b) analytically derived grid-point position and scale factors. 392 For both grids here, 393 the same $w$-point depth has been chosen but in (a) the $t$-points are set half way between $w$-points while 394 in (b) they are defined from an analytical function: $z(k)=5\,(k-1/2)^3 - 45\,(k-1/2)^2 + 140\,(k-1/2) - 150$. 395 Note the resulting difference between the value of the grid-size $\Delta_k$ and those of the scale factor $e_k$. } 396 \end{center} \end{figure} 406 \begin{figure}[!t] 407 \begin{center} 408 \includegraphics[width=0.90\textwidth]{Fig_zgr_e3} 409 \caption{ 410 \protect\label{fig:zgr_e3} 411 Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical, 412 and (b) analytically derived grid-point position and scale factors. 413 For both grids here, 414 the same $w$-point depth has been chosen but in (a) the $t$-points are set half way between $w$-points while 415 in (b) they are defined from an analytical function: $z(k)=5\,(k-1/2)^3 - 45\,(k-1/2)^2 + 140\,(k-1/2) - 150$. 416 Note the resulting difference between the value of the grid-size $\Delta_k$ and 417 those of the scale factor $e_k$. 418 } 419 \end{center} 420 \end{figure} 397 421 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 398 422 … … 420 444 the output grid written when \np{nn\_msh} $\not= 0$ is no more equal to the input grid. 421 445 422 $\ $\newline % force a new line423 424 446 % ================================================================ 425 447 % Domain: Vertical Grid (domzgr) … … 443 465 444 466 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 445 \begin{figure}[!tb] \begin{center} 446 \includegraphics[width=1.0\textwidth]{Fig_z_zps_s_sps} 447 \caption{ \protect\label{fig:z_zps_s_sps} 448 The ocean bottom as seen by the model: 449 (a) $z$-coordinate with full step, 450 (b) $z$-coordinate with partial step, 451 (c) $s$-coordinate: terrain following representation, 452 (d) hybrid $s-z$ coordinate, 453 (e) hybrid $s-z$ coordinate with partial step, and 454 (f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}\forcode{ = .false.}). 455 Note that the non-linear free surface can be used with any of the 5 coordinates (a) to (e).} 456 \end{center} \end{figure} 467 \begin{figure}[!tb] 468 \begin{center} 469 \includegraphics[width=1.0\textwidth]{Fig_z_zps_s_sps} 470 \caption{ 471 \protect\label{fig:z_zps_s_sps} 472 The ocean bottom as seen by the model: 473 (a) $z$-coordinate with full step, 474 (b) $z$-coordinate with partial step, 475 (c) $s$-coordinate: terrain following representation, 476 (d) hybrid $s-z$ coordinate, 477 (e) hybrid $s-z$ coordinate with partial step, and 478 (f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}\forcode{ = .false.}). 479 Note that the non-linear free surface can be used with any of the 5 coordinates (a) to (e). 480 } 481 \end{center} 482 \end{figure} 457 483 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 458 484 … … 482 508 \footnote{ 483 509 N.B. in full step $z$-coordinate, a \ifile{bathy\_level} file can replace the \ifile{bathy\_meter} file, 484 so that the computation of the number of wet ocean point in each water column is by-passed}. 510 so that the computation of the number of wet ocean point in each water column is by-passed 511 }. 485 512 If \np{ln\_isfcav}\forcode{ = .true.}, 486 513 an extra file input file describing the ice shelf draft (in meters) (\ifile{isf\_draft\_meter}) is needed. … … 563 590 564 591 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 565 \begin{figure}[!tb] \begin{center} 566 \includegraphics[width=0.90\textwidth]{Fig_zgr} 567 \caption{ \protect\label{fig:zgr} 568 Default vertical mesh for ORCA2: 30 ocean levels (L30). 569 Vertical level functions for (a) T-point depth and (b) the associated scale factor as computed from 570 \autoref{eq:DOM_zgr_ana_1} using \autoref{eq:DOM_zgr_coef} in $z$-coordinate.} 571 \end{center} \end{figure} 592 \begin{figure}[!tb] 593 \begin{center} 594 \includegraphics[width=0.90\textwidth]{Fig_zgr} 595 \caption{ 596 \protect\label{fig:zgr} 597 Default vertical mesh for ORCA2: 30 ocean levels (L30). 598 Vertical level functions for (a) T-point depth and (b) the associated scale factor as computed from 599 \autoref{eq:DOM_zgr_ana_1} using \autoref{eq:DOM_zgr_coef} in $z$-coordinate. 600 } 601 \end{center} 602 \end{figure} 572 603 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 573 604 … … 589 620 For climate-related studies it is often desirable to concentrate the vertical resolution near the ocean surface. 590 621 The following function is proposed as a standard for a $z$-coordinate (with either full or partial steps): 591 \begin{equation} \label{eq:DOM_zgr_ana_1} 592 \begin{split} 593 z_0 (k) &= h_{sur} -h_0 \;k-\;h_1 \;\log \left[ {\,\cosh \left( {{(k-h_{th} )} / {h_{cr} }} \right)\,} \right] \\ 594 e_3^0 (k) &= \left| -h_0 -h_1 \;\tanh \left( {{(k-h_{th} )} / {h_{cr} }} \right) \right| 595 \end{split} 622 \begin{equation} 623 \label{eq:DOM_zgr_ana_1} 624 \begin{split} 625 z_0 (k) &= h_{sur} -h_0 \;k-\;h_1 \;\log \left[ {\,\cosh \left( {{(k-h_{th} )} / {h_{cr} }} \right)\,} \right] \\ 626 e_3^0 (k) &= \left| -h_0 -h_1 \;\tanh \left( {{(k-h_{th} )} / {h_{cr} }} \right) \right| 627 \end{split} 596 628 \end{equation} 597 629 where $k=1$ to \jp{jpk} for $w$-levels and $k=1$ to $k=1$ for $T-$levels. … … 601 633 If the ice shelf cavities are opened (\np{ln\_isfcav}\forcode{ = .true.}), the definition of $z_0$ is the same. 602 634 However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to: 603 \begin{equation} \label{eq:DOM_zgr_ana_2} 604 \begin{split} 605 e_3^T(k) &= z_W (k+1) - z_W (k) \\ 606 e_3^W(k) &= z_T (k) - z_T (k-1) \\ 607 \end{split} 635 \begin{equation} 636 \label{eq:DOM_zgr_ana_2} 637 \begin{split} 638 e_3^T(k) &= z_W (k+1) - z_W (k) \\ 639 e_3^W(k) &= z_T (k) - z_T (k-1) \\ 640 \end{split} 608 641 \end{equation} 609 642 This formulation decrease the self-generated circulation into the ice shelf cavity … … 614 647 a depth which varies from 0 at the sea surface to a minimum of $-5000~m$. 615 648 This leads to the following conditions: 616 \begin{equation} \label{eq:DOM_zgr_coef} 617 \begin{split} 618 e_3 (1+1/2) &=10. \\ 619 e_3 (jpk-1/2) &=500. \\ 620 z(1) &=0. \\ 621 z(jpk) &=-5000. \\ 622 \end{split} 649 \begin{equation} 650 \label{eq:DOM_zgr_coef} 651 \begin{split} 652 e_3 (1+1/2) &=10. \\ 653 e_3 (jpk-1/2) &=500. \\ 654 z(1) &=0. \\ 655 z(jpk) &=-5000. \\ 656 \end{split} 623 657 \end{equation} 624 658 … … 654 688 655 689 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 656 \begin{table} \begin{center} \begin{tabular}{c||r|r|r|r} 657 \hline 658 \textbf{LEVEL}& \textbf{gdept\_1d}& \textbf{gdepw\_1d}& \textbf{e3t\_1d }& \textbf{e3w\_1d } \\ \hline 659 1 & \textbf{ 5.00} & 0.00 & \textbf{ 10.00} & 10.00 \\ \hline 660 2 & \textbf{15.00} & 10.00 & \textbf{ 10.00} & 10.00 \\ \hline 661 3 & \textbf{25.00} & 20.00 & \textbf{ 10.00} & 10.00 \\ \hline 662 4 & \textbf{35.01} & 30.00 & \textbf{ 10.01} & 10.00 \\ \hline 663 5 & \textbf{45.01} & 40.01 & \textbf{ 10.01} & 10.01 \\ \hline 664 6 & \textbf{55.03} & 50.02 & \textbf{ 10.02} & 10.02 \\ \hline 665 7 & \textbf{65.06} & 60.04 & \textbf{ 10.04} & 10.03 \\ \hline 666 8 & \textbf{75.13} & 70.09 & \textbf{ 10.09} & 10.06 \\ \hline 667 9 & \textbf{85.25} & 80.18 & \textbf{ 10.17} & 10.12 \\ \hline 668 10 & \textbf{95.49} & 90.35 & \textbf{ 10.33} & 10.24 \\ \hline 669 11 & \textbf{105.97} & 100.69 & \textbf{ 10.65} & 10.47 \\ \hline 670 12 & \textbf{116.90} & 111.36 & \textbf{ 11.27} & 10.91 \\ \hline 671 13 & \textbf{128.70} & 122.65 & \textbf{ 12.47} & 11.77 \\ \hline 672 14 & \textbf{142.20} & 135.16 & \textbf{ 14.78} & 13.43 \\ \hline 673 15 & \textbf{158.96} & 150.03 & \textbf{ 19.23} & 16.65 \\ \hline 674 16 & \textbf{181.96} & 169.42 & \textbf{ 27.66} & 22.78 \\ \hline 675 17 & \textbf{216.65} & 197.37 & \textbf{ 43.26} & 34.30 \\ \hline 676 18 & \textbf{272.48} & 241.13 & \textbf{ 70.88} & 55.21 \\ \hline 677 19 & \textbf{364.30} & 312.74 & \textbf{116.11} & 90.99 \\ \hline 678 20 & \textbf{511.53} & 429.72 & \textbf{181.55} & 146.43 \\ \hline 679 21 & \textbf{732.20} & 611.89 & \textbf{261.03} & 220.35 \\ \hline 680 22 & \textbf{1033.22}& 872.87 & \textbf{339.39} & 301.42 \\ \hline 681 23 & \textbf{1405.70}& 1211.59 & \textbf{402.26} & 373.31 \\ \hline 682 24 & \textbf{1830.89}& 1612.98 & \textbf{444.87} & 426.00 \\ \hline 683 25 & \textbf{2289.77}& 2057.13 & \textbf{470.55} & 459.47 \\ \hline 684 26 & \textbf{2768.24}& 2527.22 & \textbf{484.95} & 478.83 \\ \hline 685 27 & \textbf{3257.48}& 3011.90 & \textbf{492.70} & 489.44 \\ \hline 686 28 & \textbf{3752.44}& 3504.46 & \textbf{496.78} & 495.07 \\ \hline 687 29 & \textbf{4250.40}& 4001.16 & \textbf{498.90} & 498.02 \\ \hline 688 30 & \textbf{4749.91}& 4500.02 & \textbf{500.00} & 499.54 \\ \hline 689 31 & \textbf{5250.23}& 5000.00 & \textbf{500.56} & 500.33 \\ \hline 690 \end{tabular} \end{center} 691 \caption{ \protect\label{tab:orca_zgr} 692 Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as computed from 693 \autoref{eq:DOM_zgr_ana_2} using the coefficients given in \autoref{eq:DOM_zgr_coef}} 690 \begin{table} 691 \begin{center} 692 \begin{tabular}{c||r|r|r|r} 693 \hline 694 \textbf{LEVEL}& \textbf{gdept\_1d}& \textbf{gdepw\_1d}& \textbf{e3t\_1d }& \textbf{e3w\_1d } \\ \hline 695 1 & \textbf{ 5.00} & 0.00 & \textbf{ 10.00} & 10.00 \\ \hline 696 2 & \textbf{15.00} & 10.00 & \textbf{ 10.00} & 10.00 \\ \hline 697 3 & \textbf{25.00} & 20.00 & \textbf{ 10.00} & 10.00 \\ \hline 698 4 & \textbf{35.01} & 30.00 & \textbf{ 10.01} & 10.00 \\ \hline 699 5 & \textbf{45.01} & 40.01 & \textbf{ 10.01} & 10.01 \\ \hline 700 6 & \textbf{55.03} & 50.02 & \textbf{ 10.02} & 10.02 \\ \hline 701 7 & \textbf{65.06} & 60.04 & \textbf{ 10.04} & 10.03 \\ \hline 702 8 & \textbf{75.13} & 70.09 & \textbf{ 10.09} & 10.06 \\ \hline 703 9 & \textbf{85.25} & 80.18 & \textbf{ 10.17} & 10.12 \\ \hline 704 10 & \textbf{95.49} & 90.35 & \textbf{ 10.33} & 10.24 \\ \hline 705 11 & \textbf{105.97} & 100.69 & \textbf{ 10.65} & 10.47 \\ \hline 706 12 & \textbf{116.90} & 111.36 & \textbf{ 11.27} & 10.91 \\ \hline 707 13 & \textbf{128.70} & 122.65 & \textbf{ 12.47} & 11.77 \\ \hline 708 14 & \textbf{142.20} & 135.16 & \textbf{ 14.78} & 13.43 \\ \hline 709 15 & \textbf{158.96} & 150.03 & \textbf{ 19.23} & 16.65 \\ \hline 710 16 & \textbf{181.96} & 169.42 & \textbf{ 27.66} & 22.78 \\ \hline 711 17 & \textbf{216.65} & 197.37 & \textbf{ 43.26} & 34.30 \\ \hline 712 18 & \textbf{272.48} & 241.13 & \textbf{ 70.88} & 55.21 \\ \hline 713 19 & \textbf{364.30} & 312.74 & \textbf{116.11} & 90.99 \\ \hline 714 20 & \textbf{511.53} & 429.72 & \textbf{181.55} & 146.43 \\ \hline 715 21 & \textbf{732.20} & 611.89 & \textbf{261.03} & 220.35 \\ \hline 716 22 & \textbf{1033.22}& 872.87 & \textbf{339.39} & 301.42 \\ \hline 717 23 & \textbf{1405.70}& 1211.59 & \textbf{402.26} & 373.31 \\ \hline 718 24 & \textbf{1830.89}& 1612.98 & \textbf{444.87} & 426.00 \\ \hline 719 25 & \textbf{2289.77}& 2057.13 & \textbf{470.55} & 459.47 \\ \hline 720 26 & \textbf{2768.24}& 2527.22 & \textbf{484.95} & 478.83 \\ \hline 721 27 & \textbf{3257.48}& 3011.90 & \textbf{492.70} & 489.44 \\ \hline 722 28 & \textbf{3752.44}& 3504.46 & \textbf{496.78} & 495.07 \\ \hline 723 29 & \textbf{4250.40}& 4001.16 & \textbf{498.90} & 498.02 \\ \hline 724 30 & \textbf{4749.91}& 4500.02 & \textbf{500.00} & 499.54 \\ \hline 725 31 & \textbf{5250.23}& 5000.00 & \textbf{500.56} & 500.33 \\ \hline 726 \end{tabular} 727 \end{center} 728 \caption{ 729 \protect\label{tab:orca_zgr} 730 Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as computed from 731 \autoref{eq:DOM_zgr_ana_2} using the coefficients given in \autoref{eq:DOM_zgr_coef} 732 } 694 733 \end{table} 695 734 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 739 778 the product of a depth field and either a stretching function or its derivative, respectively: 740 779 741 \begin{equation} \label{eq:DOM_sco_ana} 742 \begin{split} 743 z(k) &= h(i,j) \; z_0(k) \\ 744 e_3(k) &= h(i,j) \; z_0'(k) 745 \end{split} 746 \end{equation} 780 \[ 781 % \label{eq:DOM_sco_ana} 782 \begin{split} 783 z(k) &= h(i,j) \; z_0(k) \\ 784 e_3(k) &= h(i,j) \; z_0'(k) 785 \end{split} 786 \] 747 787 748 788 where $h$ is the depth of the last $w$-level ($z_0(k)$) defined at the $t$-point location in the horizontal and … … 763 803 This uses a depth independent $\tanh$ function for the stretching \citep{Madec_al_JPO96}: 764 804 765 \ begin{equation}805 \[ 766 806 z = s_{min}+C\left(s\right)\left(H-s_{min}\right) 767 \label{eq:SH94_1}768 \ end{equation}807 % \label{eq:SH94_1} 808 \] 769 809 770 810 where $s_{min}$ is the depth at which the $s$-coordinate stretching starts and … … 772 812 and $z$ is the depth (negative down from the asea surface). 773 813 774 \ begin{equation}814 \[ 775 815 s = -\frac{k}{n-1} \quad \text{ and } \quad 0 \leq k \leq n-1 776 \label{eq:DOM_s} 777 \end{equation} 778 779 \begin{equation} \label{eq:DOM_sco_function} 780 \begin{split} 781 C(s) &= \frac{ \left[ \tanh{ \left( \theta \, (s+b) \right)} 782 - \tanh{ \left( \theta \, b \right)} \right]} 783 {2\;\sinh \left( \theta \right)} 784 \end{split} 785 \end{equation} 816 % \label{eq:DOM_s} 817 \] 818 819 \[ 820 % \label{eq:DOM_sco_function} 821 \begin{split} 822 C(s) &= \frac{ \left[ \tanh{ \left( \theta \, (s+b) \right)} 823 - \tanh{ \left( \theta \, b \right)} \right]} 824 {2\;\sinh \left( \theta \right)} 825 \end{split} 826 \] 786 827 787 828 A stretching function, … … 789 830 is also available and is more commonly used for shelf seas modelling: 790 831 791 \ begin{equation}832 \[ 792 833 C\left(s\right) = \left(1 - b \right)\frac{ \sinh\left( \theta s\right)}{\sinh\left(\theta\right)} + \\ 793 834 b\frac{ \tanh \left[ \theta \left(s + \frac{1}{2} \right)\right] - \tanh\left(\frac{\theta}{2}\right)}{ 2\tanh\left (\frac{\theta}{2}\right)} 794 \label{eq:SH94_2} 795 \end{equation} 796 797 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 798 \begin{figure}[!ht] \begin{center} 799 \includegraphics[width=1.0\textwidth]{Fig_sco_function} 800 \caption{ \protect\label{fig:sco_function} 801 Examples of the stretching function applied to a seamount; 802 from left to right: surface, surface and bottom, and bottom intensified resolutions} 803 \end{center} \end{figure} 835 % \label{eq:SH94_2} 836 \] 837 838 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 839 \begin{figure}[!ht] 840 \begin{center} 841 \includegraphics[width=1.0\textwidth]{Fig_sco_function} 842 \caption{ 843 \protect\label{fig:sco_function} 844 Examples of the stretching function applied to a seamount; 845 from left to right: surface, surface and bottom, and bottom intensified resolutions 846 } 847 \end{center} 848 \end{figure} 804 849 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 805 850 … … 815 860 In this case the a stretching function $\gamma$ is defined such that: 816 861 817 \ begin{equation}818 z = -\gamma h \quad \text{ with } \quad 0 \leq \gamma \leq 1819 \label{eq:z}820 \ end{equation}862 \[ 863 z = -\gamma h \quad \text{ with } \quad 0 \leq \gamma \leq 1 864 % \label{eq:z} 865 \] 821 866 822 867 The function is defined with respect to $\sigma$, the unstretched terrain-following coordinate: 823 868 824 \begin{equation} \label{eq:DOM_gamma_deriv} 825 \gamma= A\left(\sigma-\frac{1}{2}\left(\sigma^{2}+f\left(\sigma\right)\right)\right)+B\left(\sigma^{3}-f\left(\sigma\right)\right)+f\left(\sigma\right) 826 \end{equation} 869 \[ 870 % \label{eq:DOM_gamma_deriv} 871 \gamma= A\left(\sigma-\frac{1}{2}\left(\sigma^{2}+f\left(\sigma\right)\right)\right)+B\left(\sigma^{3}-f\left(\sigma\right)\right)+f\left(\sigma\right) 872 \] 827 873 828 874 Where: 829 \begin{equation} \label{eq:DOM_gamma} 830 f\left(\sigma\right)=\left(\alpha+2\right)\sigma^{\alpha+1}-\left(\alpha+1\right)\sigma^{\alpha+2} \quad \text{ and } \quad \sigma = \frac{k}{n-1} 831 \end{equation} 875 \[ 876 % \label{eq:DOM_gamma} 877 f\left(\sigma\right)=\left(\alpha+2\right)\sigma^{\alpha+1}-\left(\alpha+1\right)\sigma^{\alpha+2} \quad \text{ and } \quad \sigma = \frac{k}{n-1} 878 \] 832 879 833 880 This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of … … 837 884 The bottom cell depth in this example is given as a function of water depth: 838 885 839 \begin{equation} \label{eq:DOM_zb} 840 Z_b= h a + b 841 \end{equation} 886 \[ 887 % \label{eq:DOM_zb} 888 Z_b = h a + b 889 \] 842 890 843 891 where the namelist parameters \np{rn\_zb\_a} and \np{rn\_zb\_b} are $a$ and $b$ respectively. … … 851 899 the \citet{Siddorn_Furner_OM12} $S$-coordinate (dashed lines) in 852 900 the surface 100m for a idealised bathymetry that goes from 50m to 5500m depth. 853 For clarity every third coordinate surface is shown.} 854 \label{fig:fig_compare_coordinates_surface} 901 For clarity every third coordinate surface is shown. 902 } 903 \label{fig:fig_compare_coordinates_surface} 855 904 \end{figure} 856 905 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 919 968 From the \textit{mbathy} and \textit{misfdep} array, the mask fields are defined as follows: 920 969 \begin{align*} 921 tmask(i,j,k) &= \begin{cases} \; 0& \text{ if $k < misfdep(i,j) $ } \\922 923 924 umask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i+1,j,k) \\925 vmask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i,j+1,k) \\926 fmask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i+1,j,k) \\927 & \ \ \, * tmask(i,j,k) \ * \ tmask(i+1,j,k) \\928 wmask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i,j,k-1) \text{ with } wmask(i,j,1) = tmask(i,j,1) 970 tmask(i,j,k) &= \begin{cases} \; 0& \text{ if $k < misfdep(i,j) $ } \\ 971 \; 1& \text{ if $misfdep(i,j) \leq k\leq mbathy(i,j)$ } \\ 972 \; 0& \text{ if $k > mbathy(i,j)$ } \end{cases} \\ 973 umask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i+1,j,k) \\ 974 vmask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i,j+1,k) \\ 975 fmask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i+1,j,k) \\ 976 & \ \ \, * tmask(i,j,k) \ * \ tmask(i+1,j,k) \\ 977 wmask(i,j,k) &= \; tmask(i,j,k) \ * \ tmask(i,j,k-1) \text{ with } wmask(i,j,1) = tmask(i,j,1) 929 978 \end{align*} 930 979 … … 965 1014 see \rou{istate\_t\_s} subroutine called from \mdl{istate} module. 966 1015 \end{description} 1016 1017 \biblio 1018 967 1019 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_DYN.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 6 7 \chapter{Ocean Dynamics (DYN)} 7 8 \label{chap:DYN} 9 8 10 \minitoc 9 10 %\vspace{2.cm}11 $\ $\newline %force an empty line12 11 13 12 Using the representation described in \autoref{chap:DOM}, … … 19 18 20 19 The prognostic ocean dynamics equation can be summarized as follows: 21 \ begin{equation*}22 \text{NXT} = \dbinom {\text{VOR} + \text{KEG} + \text {ZAD} }23 24 25 \ end{equation*}20 \[ 21 \text{NXT} = \dbinom {\text{VOR} + \text{KEG} + \text {ZAD} } 22 {\text{COR} + \text{ADV} } 23 + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF} 24 \] 26 25 NXT stands for next, referring to the time-stepping. 27 26 The first group of terms on the rhs of this equation corresponds to the Coriolis and advection terms that … … 57 56 MISC correspond to "extracting tendency terms" or "vorticity balance"?} 58 57 59 $\ $\newline % force a new ligne60 61 58 % ================================================================ 62 59 % Sea Surface Height evolution & Diagnostics variables … … 72 69 73 70 The vorticity is defined at an $f$-point ($i.e.$ corner point) as follows: 74 \begin{equation} \label{eq:divcur_cur} 75 \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta _{i+1/2} \left[ {e_{2v}\;v} \right] 76 -\delta _{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right) 71 \begin{equation} 72 \label{eq:divcur_cur} 73 \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta_{i+1/2} \left[ {e_{2v}\;v} \right] 74 -\delta_{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right) 77 75 \end{equation} 78 76 79 77 The horizontal divergence is defined at a $T$-point. 80 78 It is given by: 81 \begin{equation} \label{eq:divcur_div} 82 \chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 83 \left( {\delta _i \left[ {e_{2u}\,e_{3u}\,u} \right] 84 +\delta _j \left[ {e_{1v}\,e_{3v}\,v} \right]} \right) 85 \end{equation} 79 \[ 80 % \label{eq:divcur_div} 81 \chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 82 \left( {\delta_i \left[ {e_{2u}\,e_{3u}\,u} \right] 83 +\delta_j \left[ {e_{1v}\,e_{3v}\,v} \right]} \right) 84 \] 86 85 87 86 Note that although the vorticity has the same discrete expression in $z$- and $s$-coordinates, … … 106 105 107 106 The sea surface height is given by: 108 \begin{equation} \label{eq:dynspg_ssh} 109 \begin{aligned} 110 \frac{\partial \eta }{\partial t} 111 &\equiv \frac{1}{e_{1t} e_{2t} }\sum\limits_k { \left\{ \delta _i \left[ {e_{2u}\,e_{3u}\;u} \right] 112 +\delta _j \left[ {e_{1v}\,e_{3v}\;v} \right] \right\} } 113 - \frac{\textit{emp}}{\rho _w } \\ 114 &\equiv \sum\limits_k {\chi \ e_{3t}} - \frac{\textit{emp}}{\rho _w } 115 \end{aligned} 107 \begin{equation} 108 \label{eq:dynspg_ssh} 109 \begin{aligned} 110 \frac{\partial \eta }{\partial t} 111 &\equiv \frac{1}{e_{1t} e_{2t} }\sum\limits_k { \left\{ \delta_i \left[ {e_{2u}\,e_{3u}\;u} \right] 112 +\delta_j \left[ {e_{1v}\,e_{3v}\;v} \right] \right\} } 113 - \frac{\textit{emp}}{\rho_w } \\ 114 &\equiv \sum\limits_k {\chi \ e_{3t}} - \frac{\textit{emp}}{\rho_w } 115 \end{aligned} 116 116 \end{equation} 117 117 where \textit{emp} is the surface freshwater budget (evaporation minus precipitation), 118 118 expressed in Kg/m$^2$/s (which is equal to mm/s), 119 and $\rho 119 and $\rho_w$=1,035~Kg/m$^3$ is the reference density of sea water (Boussinesq approximation). 120 120 If river runoff is expressed as a surface freshwater flux (see \autoref{chap:SBC}) then 121 121 \textit{emp} can be written as the evaporation minus precipitation, minus the river runoff. … … 131 131 The vertical velocity is computed by an upward integration of the horizontal divergence starting at the bottom, 132 132 taking into account the change of the thickness of the levels: 133 \begin{equation} \label{eq:wzv} 134 \left\{ \begin{aligned} 135 &\left. w \right|_{k_b-1/2} \quad= 0 \qquad \text{where } k_b \text{ is the level just above the sea floor } \\ 136 &\left. w \right|_{k+1/2} = \left. w \right|_{k-1/2} + \left. e_{3t} \right|_{k}\; \left. \chi \right|_k 137 - \frac{1} {2 \rdt} \left( \left. e_{3t}^{t+1}\right|_{k} - \left. e_{3t}^{t-1}\right|_{k}\right) 138 \end{aligned} \right. 133 \begin{equation} 134 \label{eq:wzv} 135 \left\{ 136 \begin{aligned} 137 &\left. w \right|_{k_b-1/2} \quad= 0 \qquad \text{where } k_b \text{ is the level just above the sea floor } \\ 138 &\left. w \right|_{k+1/2} = \left. w \right|_{k-1/2} + \left. e_{3t} \right|_{k}\; \left. \chi \right|_k 139 - \frac{1} {2 \rdt} \left( \left. e_{3t}^{t+1}\right|_{k} - \left. e_{3t}^{t-1}\right|_{k}\right) 140 \end{aligned} 141 \right. 139 142 \end{equation} 140 143 … … 208 211 but does not conserve the total kinetic energy. 209 212 It is given by: 210 \begin{equation} \label{eq:dynvor_ens} 211 \left\{ 212 \begin{aligned} 213 {+\frac{1}{e_{1u} } } & {\overline {\left( { \frac{\zeta +f}{e_{3f} }} \right)} }^{\,i} 214 & {\overline{\overline {\left( {e_{1v}\,e_{3v}\;v} \right)}} }^{\,i, j+1/2} \\ 215 {- \frac{1}{e_{2v} } } & {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right)} }^{\,j} 216 & {\overline{\overline {\left( {e_{2u}\,e_{3u}\;u} \right)}} }^{\,i+1/2, j} 217 \end{aligned} 218 \right. 213 \begin{equation} 214 \label{eq:dynvor_ens} 215 \left\{ 216 \begin{aligned} 217 {+\frac{1}{e_{1u} } } & {\overline {\left( { \frac{\zeta +f}{e_{3f} }} \right)} }^{\,i} 218 & {\overline{\overline {\left( {e_{1v}\,e_{3v}\;v} \right)}} }^{\,i, j+1/2} \\ 219 {- \frac{1}{e_{2v} } } & {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right)} }^{\,j} 220 & {\overline{\overline {\left( {e_{2u}\,e_{3u}\;u} \right)}} }^{\,i+1/2, j} 221 \end{aligned} 222 \right. 219 223 \end{equation} 220 224 … … 227 231 The kinetic energy conserving scheme (ENE scheme) conserves the global kinetic energy but not the global enstrophy. 228 232 It is given by: 229 \begin{equation} \label{eq:dynvor_ene} 230 \left\{ \begin{aligned} 231 {+\frac{1}{e_{1u}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) 232 \; \overline {\left( {e_{1v}\,e_{3v}\;v} \right)} ^{\,i+1/2}} }^{\,j} } \\ 233 {- \frac{1}{e_{2v}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) 234 \; \overline {\left( {e_{2u}\,e_{3u}\;u} \right)} ^{\,j+1/2}} }^{\,i} } 235 \end{aligned} \right. 233 \begin{equation} 234 \label{eq:dynvor_ene} 235 \left\{ 236 \begin{aligned} 237 {+\frac{1}{e_{1u}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) 238 \; \overline {\left( {e_{1v}\,e_{3v}\;v} \right)} ^{\,i+1/2}} }^{\,j} } \\ 239 {- \frac{1}{e_{2v}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) 240 \; \overline {\left( {e_{2u}\,e_{3u}\;u} \right)} ^{\,j+1/2}} }^{\,i} } 241 \end{aligned} 242 \right. 236 243 \end{equation} 237 244 … … 245 252 It consists of the ENS scheme (\autoref{eq:dynvor_ens}) for the relative vorticity term, 246 253 and of the ENE scheme (\autoref{eq:dynvor_ene}) applied to the planetary vorticity term. 247 \begin{equation} \label{eq:dynvor_mix} 248 \left\{ { \begin{aligned} 249 {+\frac{1}{e_{1u} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^{\,i} 250 \; {\overline{\overline {\left( {e_{1v}\,e_{3v}\;v} \right)}} }^{\,i,j+1/2} -\frac{1}{e_{1u} } 251 \; {\overline {\left( {\frac{f}{e_{3f} }} \right) 252 \;\overline {\left( {e_{1v}\,e_{3v}\;v} \right)} ^{\,i+1/2}} }^{\,j} } \\ 253 {-\frac{1}{e_{2v} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^j 254 \; {\overline{\overline {\left( {e_{2u}\,e_{3u}\;u} \right)}} }^{\,i+1/2,j} +\frac{1}{e_{2v} } 255 \; {\overline {\left( {\frac{f}{e_{3f} }} \right) 256 \;\overline {\left( {e_{2u}\,e_{3u}\;u} \right)} ^{\,j+1/2}} }^{\,i} } \hfill 257 \end{aligned} } \right. 258 \end{equation} 254 \[ 255 % \label{eq:dynvor_mix} 256 \left\{ { 257 \begin{aligned} 258 {+\frac{1}{e_{1u} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^{\,i} 259 \; {\overline{\overline {\left( {e_{1v}\,e_{3v}\;v} \right)}} }^{\,i,j+1/2} -\frac{1}{e_{1u} } 260 \; {\overline {\left( {\frac{f}{e_{3f} }} \right) 261 \;\overline {\left( {e_{1v}\,e_{3v}\;v} \right)} ^{\,i+1/2}} }^{\,j} } \\ 262 {-\frac{1}{e_{2v} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^j 263 \; {\overline{\overline {\left( {e_{2u}\,e_{3u}\;u} \right)}} }^{\,i+1/2,j} +\frac{1}{e_{2v} } 264 \; {\overline {\left( {\frac{f}{e_{3f} }} \right) 265 \;\overline {\left( {e_{2u}\,e_{3u}\;u} \right)} ^{\,j+1/2}} }^{\,i} } \hfill 266 \end{aligned} 267 } \right. 268 \] 259 269 260 270 %------------------------------------------------------------- … … 285 295 for spherical coordinates as described by \citet{Arakawa_Lamb_MWR81} to obtain the EEN scheme. 286 296 First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point: 287 \begin{equation} \label{eq:pot_vor} 288 q = \frac{\zeta +f} {e_{3f} } 289 \end{equation} 297 \[ 298 % \label{eq:pot_vor} 299 q = \frac{\zeta +f} {e_{3f} } 300 \] 290 301 where the relative vorticity is defined by (\autoref{eq:divcur_cur}), 291 302 the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is: 292 \begin{equation} \label{eq:een_e3f} 293 e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2} 303 \begin{equation} 304 \label{eq:een_e3f} 305 e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2} 294 306 \end{equation} 295 307 296 308 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 297 \begin{figure}[!ht] \begin{center} 298 \includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad} 299 \caption{ \protect\label{fig:DYN_een_triad} 300 Triads used in the energy and enstrophy conserving scheme (een) for 301 $u$-component (upper panel) and $v$-component (lower panel).} 302 \end{center} \end{figure} 303 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 309 \begin{figure}[!ht] 310 \begin{center} 311 \includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad} 312 \caption{ 313 \protect\label{fig:DYN_een_triad} 314 Triads used in the energy and enstrophy conserving scheme (een) for 315 $u$-component (upper panel) and $v$-component (lower panel). 316 } 317 \end{center} 318 \end{figure} 319 % >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 304 320 305 321 A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. … … 316 332 the following triad combinations of the neighbouring potential vorticities defined at f-points 317 333 (\autoref{fig:DYN_een_triad}): 318 \begin{equation} \label{eq:Q_triads} 319 _i^j \mathbb{Q}^{i_p}_{j_p} 320 = \frac{1}{12} \ \left( q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p} \right) 334 \begin{equation} 335 \label{eq:Q_triads} 336 _i^j \mathbb{Q}^{i_p}_{j_p} 337 = \frac{1}{12} \ \left( q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p} \right) 321 338 \end{equation} 322 339 where the indices $i_p$ and $k_p$ take the values: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$. 323 340 324 341 Finally, the vorticity terms are represented as: 325 \begin{equation} \label{eq:dynvor_een} 326 \left\{ { 327 \begin{aligned} 328 +q\,e_3 \, v &\equiv +\frac{1}{e_{1u} } \sum_{\substack{i_p,\,k_p}} 329 {^{i+1/2-i_p}_j} \mathbb{Q}^{i_p}_{j_p} \left( e_{1v}\,e_{3v} \;v \right)^{i+1/2-i_p}_{j+j_p} \\ 330 - q\,e_3 \, u &\equiv -\frac{1}{e_{2v} } \sum_{\substack{i_p,\,k_p}} 331 {^i_{j+1/2-j_p}} \mathbb{Q}^{i_p}_{j_p} \left( e_{2u}\,e_{3u} \;u \right)^{i+i_p}_{j+1/2-j_p} \\ 332 \end{aligned} 333 } \right. 342 \begin{equation} 343 \label{eq:dynvor_een} 344 \left\{ { 345 \begin{aligned} 346 +q\,e_3 \, v &\equiv +\frac{1}{e_{1u} } \sum_{\substack{i_p,\,k_p}} 347 {^{i+1/2-i_p}_j} \mathbb{Q}^{i_p}_{j_p} \left( e_{1v}\,e_{3v} \;v \right)^{i+1/2-i_p}_{j+j_p} \\ 348 - q\,e_3 \, u &\equiv -\frac{1}{e_{2v} } \sum_{\substack{i_p,\,k_p}} 349 {^i_{j+1/2-j_p}} \mathbb{Q}^{i_p}_{j_p} \left( e_{2u}\,e_{3u} \;u \right)^{i+i_p}_{j+1/2-j_p} \\ 350 \end{aligned} 351 } \right. 334 352 \end{equation} 335 353 … … 353 371 together with the formulation chosen for the vertical advection (see below), 354 372 conserves the total kinetic energy: 355 \begin{equation} \label{eq:dynkeg} 356 \left\{ \begin{aligned} 357 -\frac{1}{2 \; e_{1u} } & \ \delta _{i+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right] \\ 358 -\frac{1}{2 \; e_{2v} } & \ \delta _{j+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right] 359 \end{aligned} \right. 360 \end{equation} 373 \[ 374 % \label{eq:dynkeg} 375 \left\{ 376 \begin{aligned} 377 -\frac{1}{2 \; e_{1u} } & \ \delta_{i+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right] \\ 378 -\frac{1}{2 \; e_{2v} } & \ \delta_{j+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right] 379 \end{aligned} 380 \right. 381 \] 361 382 362 383 %-------------------------------------------------------------------------------------------------------------- … … 371 392 Indeed, the change of KE due to the vertical advection is exactly balanced by 372 393 the change of KE due to the gradient of KE (see \autoref{apdx:C}). 373 \begin{equation} \label{eq:dynzad} 374 \left\{ \begin{aligned} 375 -\frac{1} {e_{1u}\,e_{2u}\,e_{3u}} &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,i+1/2} \;\delta _{k+1/2} \left[ u \right]\ }^{\,k} \\ 376 -\frac{1} {e_{1v}\,e_{2v}\,e_{3v}} &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,j+1/2} \;\delta _{k+1/2} \left[ u \right]\ }^{\,k} 377 \end{aligned} \right. 378 \end{equation} 394 \[ 395 % \label{eq:dynzad} 396 \left\{ 397 \begin{aligned} 398 -\frac{1} {e_{1u}\,e_{2u}\,e_{3u}} &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,i+1/2} \;\delta_{k+1/2} \left[ u \right]\ }^{\,k} \\ 399 -\frac{1} {e_{1v}\,e_{2v}\,e_{3v}} &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,j+1/2} \;\delta_{k+1/2} \left[ u \right]\ }^{\,k} 400 \end{aligned} 401 \right. 402 \] 379 403 When \np{ln\_dynzad\_zts}\forcode{ = .true.}, 380 404 a split-explicit time stepping with 5 sub-timesteps is used on the vertical advection term. … … 412 436 This altered Coriolis parameter is thus discretised at $f$-points. 413 437 It is given by: 414 \begin{multline} \label{eq:dyncor_metric} 415 f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i} - u\frac{\partial e_1 }{\partial j}} \right) \\ 416 \equiv f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta _{i+1/2} \left[ {e_{2u} } \right] 417 - \overline u ^{j+1/2}\delta _{j+1/2} \left[ {e_{1u} } \right] } \ \right) 418 \end{multline} 438 \begin{multline*} 439 % \label{eq:dyncor_metric} 440 f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i} - u\frac{\partial e_1 }{\partial j}} \right) \\ 441 \equiv f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta_{i+1/2} \left[ {e_{2u} } \right] 442 - \overline u ^{j+1/2}\delta_{j+1/2} \left[ {e_{1u} } \right] } \ \right) 443 \end{multline*} 419 444 420 445 Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) schemes can be used to … … 430 455 431 456 The discrete expression of the advection term is given by: 432 \begin{equation} \label{eq:dynadv} 433 \left\{ 434 \begin{aligned} 435 \frac{1}{e_{1u}\,e_{2u}\,e_{3u}} 436 \left( \delta _{i+1/2} \left[ \overline{e_{2u}\,e_{3u}\;u }^{i } \ u_t \right] 437 + \delta _{j } \left[ \overline{e_{1u}\,e_{3u}\;v }^{i+1/2} \ u_f \right] \right. \ \; \\ 438 \left. + \delta _{k } \left[ \overline{e_{1w}\,e_{2w}\;w}^{i+1/2} \ u_{uw} \right] \right) \\ 439 \\ 440 \frac{1}{e_{1v}\,e_{2v}\,e_{3v}} 441 \left( \delta _{i } \left[ \overline{e_{2u}\,e_{3u }\;u }^{j+1/2} \ v_f \right] 442 + \delta _{j+1/2} \left[ \overline{e_{1u}\,e_{3u }\;v }^{i } \ v_t \right] \right. \ \, \, \\ 443 \left. + \delta _{k } \left[ \overline{e_{1w}\,e_{2w}\;w}^{j+1/2} \ v_{vw} \right] \right) \\ 444 \end{aligned} 445 \right. 446 \end{equation} 457 \[ 458 % \label{eq:dynadv} 459 \left\{ 460 \begin{aligned} 461 \frac{1}{e_{1u}\,e_{2u}\,e_{3u}} 462 \left( \delta_{i+1/2} \left[ \overline{e_{2u}\,e_{3u}\;u }^{i } \ u_t \right] 463 + \delta_{j } \left[ \overline{e_{1u}\,e_{3u}\;v }^{i+1/2} \ u_f \right] \right. \ \; \\ 464 \left. + \delta_{k } \left[ \overline{e_{1w}\,e_{2w}\;w}^{i+1/2} \ u_{uw} \right] \right) \\ 465 \\ 466 \frac{1}{e_{1v}\,e_{2v}\,e_{3v}} 467 \left( \delta_{i } \left[ \overline{e_{2u}\,e_{3u }\;u }^{j+1/2} \ v_f \right] 468 + \delta_{j+1/2} \left[ \overline{e_{1u}\,e_{3u }\;v }^{i } \ v_t \right] \right. \ \, \, \\ 469 \left. + \delta_{k } \left[ \overline{e_{1w}\,e_{2w}\;w}^{j+1/2} \ v_{vw} \right] \right) \\ 470 \end{aligned} 471 \right. 472 \] 447 473 448 474 Two advection schemes are available: … … 462 488 463 489 In the centered $2^{nd}$ order formulation, the velocity is evaluated as the mean of the two neighbouring points: 464 \begin{equation} \label{eq:dynadv_cen2} 465 \left\{ \begin{aligned} 466 u_T^{cen2} &=\overline u^{i } \quad & u_F^{cen2} &=\overline u^{j+1/2} \quad & u_{uw}^{cen2} &=\overline u^{k+1/2} \\ 467 v_F^{cen2} &=\overline v ^{i+1/2} \quad & v_F^{cen2} &=\overline v^j \quad & v_{vw}^{cen2} &=\overline v ^{k+1/2} \\ 468 \end{aligned} \right. 490 \begin{equation} 491 \label{eq:dynadv_cen2} 492 \left\{ 493 \begin{aligned} 494 u_T^{cen2} &=\overline u^{i } \quad & u_F^{cen2} &=\overline u^{j+1/2} \quad & u_{uw}^{cen2} &=\overline u^{k+1/2} \\ 495 v_F^{cen2} &=\overline v ^{i+1/2} \quad & v_F^{cen2} &=\overline v^j \quad & v_{vw}^{cen2} &=\overline v ^{k+1/2} \\ 496 \end{aligned} 497 \right. 469 498 \end{equation} 470 499 … … 484 513 an upstream-biased parabolic interpolation. 485 514 For example, the evaluation of $u_T^{ubs} $ is done as follows: 486 \begin{equation} \label{eq:dynadv_ubs} 487 u_T^{ubs} =\overline u ^i-\;\frac{1}{6} \begin{cases} 488 u"_{i-1/2}& \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i \geqslant 0$ } \\ 489 u"_{i+1/2}& \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i < 0$ } 490 \end{cases} 515 \begin{equation} 516 \label{eq:dynadv_ubs} 517 u_T^{ubs} =\overline u ^i-\;\frac{1}{6} 518 \begin{cases} 519 u"_{i-1/2}& \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i \geqslant 0$ } \\ 520 u"_{i+1/2}& \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i < 0$ } 521 \end{cases} 491 522 \end{equation} 492 where $u"_{i+1/2} =\delta _{i+1/2} \left[ {\delta_i \left[ u \right]} \right]$.523 where $u"_{i+1/2} =\delta_{i+1/2} \left[ {\delta_i \left[ u \right]} \right]$. 493 524 This results in a dissipatively dominant ($i.e.$ hyper-diffusive) truncation error 494 525 \citep{Shchepetkin_McWilliams_OM05}. … … 560 591 561 592 for $k=km$ (surface layer, $jk=1$ in the code) 562 \begin{equation} \label{eq:dynhpg_zco_surf} 563 \left\{ \begin{aligned} 564 \left. \delta _{i+1/2} \left[ p^h \right] \right|_{k=km} 565 &= \frac{1}{2} g \ \left. \delta _{i+1/2} \left[ e_{3w} \ \rho \right] \right|_{k=km} \\ 566 \left. \delta _{j+1/2} \left[ p^h \right] \right|_{k=km} 567 &= \frac{1}{2} g \ \left. \delta _{j+1/2} \left[ e_{3w} \ \rho \right] \right|_{k=km} \\ 568 \end{aligned} \right. 593 \begin{equation} 594 \label{eq:dynhpg_zco_surf} 595 \left\{ 596 \begin{aligned} 597 \left. \delta_{i+1/2} \left[ p^h \right] \right|_{k=km} 598 &= \frac{1}{2} g \ \left. \delta_{i+1/2} \left[ e_{3w} \ \rho \right] \right|_{k=km} \\ 599 \left. \delta_{j+1/2} \left[ p^h \right] \right|_{k=km} 600 &= \frac{1}{2} g \ \left. \delta_{j+1/2} \left[ e_{3w} \ \rho \right] \right|_{k=km} \\ 601 \end{aligned} 602 \right. 569 603 \end{equation} 570 604 571 605 for $1<k<km$ (interior layer) 572 \begin{equation} \label{eq:dynhpg_zco} 573 \left\{ \begin{aligned} 574 \left. \delta _{i+1/2} \left[ p^h \right] \right|_{k} 575 &= \left. \delta _{i+1/2} \left[ p^h \right] \right|_{k-1} 576 + \frac{1}{2}\;g\; \left. \delta _{i+1/2} \left[ e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k} \\ 577 \left. \delta _{j+1/2} \left[ p^h \right] \right|_{k} 578 &= \left. \delta _{j+1/2} \left[ p^h \right] \right|_{k-1} 579 + \frac{1}{2}\;g\; \left. \delta _{j+1/2} \left[ e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k} \\ 580 \end{aligned} \right. 606 \begin{equation} 607 \label{eq:dynhpg_zco} 608 \left\{ 609 \begin{aligned} 610 \left. \delta_{i+1/2} \left[ p^h \right] \right|_{k} 611 &= \left. \delta_{i+1/2} \left[ p^h \right] \right|_{k-1} 612 + \frac{1}{2}\;g\; \left. \delta_{i+1/2} \left[ e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k} \\ 613 \left. \delta_{j+1/2} \left[ p^h \right] \right|_{k} 614 &= \left. \delta_{j+1/2} \left[ p^h \right] \right|_{k-1} 615 + \frac{1}{2}\;g\; \left. \delta_{j+1/2} \left[ e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k} \\ 616 \end{aligned} 617 \right. 581 618 \end{equation} 582 619 … … 620 657 621 658 $\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}\forcode{ = .true.}) 622 \begin{equation} \label{eq:dynhpg_sco} 623 \left\{ \begin{aligned} 624 - \frac{1} {\rho_o \, e_{1u}} \; \delta _{i+1/2} \left[ p^h \right] 625 + \frac{g\; \overline {\rho}^{i+1/2}} {\rho_o \, e_{1u}} \; \delta _{i+1/2} \left[ z_t \right] \\ 626 - \frac{1} {\rho_o \, e_{2v}} \; \delta _{j+1/2} \left[ p^h \right] 627 + \frac{g\; \overline {\rho}^{j+1/2}} {\rho_o \, e_{2v}} \; \delta _{j+1/2} \left[ z_t \right] \\ 628 \end{aligned} \right. 659 \begin{equation} 660 \label{eq:dynhpg_sco} 661 \left\{ 662 \begin{aligned} 663 - \frac{1} {\rho_o \, e_{1u}} \; \delta_{i+1/2} \left[ p^h \right] 664 + \frac{g\; \overline {\rho}^{i+1/2}} {\rho_o \, e_{1u}} \; \delta_{i+1/2} \left[ z_t \right] \\ 665 - \frac{1} {\rho_o \, e_{2v}} \; \delta_{j+1/2} \left[ p^h \right] 666 + \frac{g\; \overline {\rho}^{j+1/2}} {\rho_o \, e_{2v}} \; \delta_{j+1/2} \left[ z_t \right] \\ 667 \end{aligned} 668 \right. 629 669 \end{equation} 630 670 … … 693 733 $\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 694 734 695 \begin{equation} \label{eq:dynhpg_lf} 696 \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 697 -\frac{1}{\rho _o \,e_{1u} }\delta _{i+1/2} \left[ {p_h^t } \right] 735 \begin{equation} 736 \label{eq:dynhpg_lf} 737 \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 738 -\frac{1}{\rho_o \,e_{1u} }\delta_{i+1/2} \left[ {p_h^t } \right] 698 739 \end{equation} 699 740 700 741 $\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 701 \begin{equation} \label{eq:dynhpg_imp} 702 \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 703 -\frac{1}{4\,\rho _o \,e_{1u} } \delta_{i+1/2} \left[ p_h^{t+\rdt} +2\,p_h^t +p_h^{t-\rdt} \right] 742 \begin{equation} 743 \label{eq:dynhpg_imp} 744 \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 745 -\frac{1}{4\,\rho_o \,e_{1u} } \delta_{i+1/2} \left[ p_h^{t+\rdt} +2\,p_h^t +p_h^{t-\rdt} \right] 704 746 \end{equation} 705 747 … … 720 762 so that no additional storage array has to be defined. 721 763 The density used to compute the hydrostatic pressure gradient (whatever the formulation) is evaluated as follows: 722 \begin{equation} \label{eq:rho_flt} 723 \rho^t = \rho( \widetilde{T},\widetilde {S},z_t) 724 \quad \text{with} \quad 725 \widetilde{X} = 1 / 4 \left( X^{t+\rdt} +2 \,X^t + X^{t-\rdt} \right) 726 \end{equation} 764 \[ 765 % \label{eq:rho_flt} 766 \rho^t = \rho( \widetilde{T},\widetilde {S},z_t) 767 \quad \text{with} \quad 768 \widetilde{X} = 1 / 4 \left( X^{t+\rdt} +2 \,X^t + X^{t-\rdt} \right) 769 \] 727 770 728 771 Note that in the semi-implicit case, it is necessary to save the filtered density, … … 739 782 \nlst{namdyn_spg} 740 783 %------------------------------------------------------------------------------------------------------------ 741 742 $\ $\newline %force an empty line743 784 744 785 Options are defined through the \ngn{namdyn\_spg} namelist variables. … … 781 822 The surface pressure gradient, evaluated using a leap-frog scheme ($i.e.$ centered in time), 782 823 is thus simply given by : 783 \begin{equation} \label{eq:dynspg_exp} 784 \left\{ \begin{aligned} 785 - \frac{1}{e_{1u}\,\rho_o} \; \delta _{i+1/2} \left[ \,\rho \,\eta\, \right] \\ 786 - \frac{1}{e_{2v}\,\rho_o} \; \delta _{j+1/2} \left[ \,\rho \,\eta\, \right] 787 \end{aligned} \right. 824 \begin{equation} 825 \label{eq:dynspg_exp} 826 \left\{ 827 \begin{aligned} 828 - \frac{1}{e_{1u}\,\rho_o} \; \delta_{i+1/2} \left[ \,\rho \,\eta\, \right] \\ 829 - \frac{1}{e_{2v}\,\rho_o} \; \delta_{j+1/2} \left[ \,\rho \,\eta\, \right] 830 \end{aligned} 831 \right. 788 832 \end{equation} 789 833 … … 817 861 %%% 818 862 The barotropic mode solves the following equations: 819 \begin{subequations} \label{eq:BT} 820 \begin{equation} \label{eq:BT_dyn} 821 \frac{\partial {\rm \overline{{\bf U}}_h} }{\partial t}= 822 -f\;{\rm {\bf k}}\times {\rm \overline{{\bf U}}_h} 823 -g\nabla _h \eta -\frac{c_b^{\textbf U}}{H+\eta} \rm {\overline{{\bf U}}_h} + \rm {\overline{\bf G}} 824 \end{equation} 825 826 \begin{equation} \label{eq:BT_ssh} 827 \frac{\partial \eta }{\partial t}=-\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right]+P-E 828 \end{equation} 829 \end{subequations} 863 % \begin{subequations} 864 % \label{eq:BT} 865 \begin{equation} 866 \label{eq:BT_dyn} 867 \frac{\partial {\rm \overline{{\bf U}}_h} }{\partial t}= 868 -f\;{\rm {\bf k}}\times {\rm \overline{{\bf U}}_h} 869 -g\nabla _h \eta -\frac{c_b^{\textbf U}}{H+\eta} \rm {\overline{{\bf U}}_h} + \rm {\overline{\bf G}} 870 \end{equation} 871 \[ 872 % \label{eq:BT_ssh} 873 \frac{\partial \eta }{\partial t}=-\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right]+P-E 874 \] 875 % \end{subequations} 830 876 where $\rm {\overline{\bf G}}$ is a forcing term held constant, containing coupling term between modes, 831 877 surface atmospheric forcing as well as slowly varying barotropic terms not explicitly computed to gain efficiency. … … 839 885 840 886 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > 841 \begin{figure}[!t] \begin{center} 842 \includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts} 843 \caption{ \protect\label{fig:DYN_dynspg_ts} 844 Schematic of the split-explicit time stepping scheme for the external and internal modes. 845 Time increases to the right. In this particular exemple, 846 a boxcar averaging window over $nn\_baro$ barotropic time steps is used ($nn\_bt\_flt=1$) and $nn\_baro=5$. 847 Internal mode time steps (which are also the model time steps) are denoted by $t-\rdt$, $t$ and $t+\rdt$. 848 Variables with $k$ superscript refer to instantaneous barotropic variables, 849 $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary (red vertical bars) and 850 secondary weights (blue vertical bars). 851 The former are used to obtain time filtered quantities at $t+\rdt$ while 852 the latter are used to obtain time averaged transports to advect tracers. 853 a) Forward time integration: \protect\np{ln\_bt\_fw}\forcode{ = .true.}, 854 \protect\np{ln\_bt\_av}\forcode{ = .true.}. 855 b) Centred time integration: \protect\np{ln\_bt\_fw}\forcode{ = .false.}, 856 \protect\np{ln\_bt\_av}\forcode{ = .true.}. 857 c) Forward time integration with no time filtering (POM-like scheme): 858 \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .false.}. } 859 \end{center} \end{figure} 887 \begin{figure}[!t] 888 \begin{center} 889 \includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts} 890 \caption{ 891 \protect\label{fig:DYN_dynspg_ts} 892 Schematic of the split-explicit time stepping scheme for the external and internal modes. 893 Time increases to the right. In this particular exemple, 894 a boxcar averaging window over $nn\_baro$ barotropic time steps is used ($nn\_bt\_flt=1$) and $nn\_baro=5$. 895 Internal mode time steps (which are also the model time steps) are denoted by $t-\rdt$, $t$ and $t+\rdt$. 896 Variables with $k$ superscript refer to instantaneous barotropic variables, 897 $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary (red vertical bars) and 898 secondary weights (blue vertical bars). 899 The former are used to obtain time filtered quantities at $t+\rdt$ while 900 the latter are used to obtain time averaged transports to advect tracers. 901 a) Forward time integration: \protect\np{ln\_bt\_fw}\forcode{ = .true.}, 902 \protect\np{ln\_bt\_av}\forcode{ = .true.}. 903 b) Centred time integration: \protect\np{ln\_bt\_fw}\forcode{ = .false.}, 904 \protect\np{ln\_bt\_av}\forcode{ = .true.}. 905 c) Forward time integration with no time filtering (POM-like scheme): 906 \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .false.}. 907 } 908 \end{center} 909 \end{figure} 860 910 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > 861 911 … … 918 968 We have 919 969 920 \begin{equation} \label{eq:DYN_spg_ts_eta} 921 \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) 922 = 2 \rdt \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] 923 \end{equation} 924 \begin{multline} \label{eq:DYN_spg_ts_u} 925 \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1}) \\ 926 = 2\rdt \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n}) 927 - H(\tau) \nabla p_s^{(b)}(\tau,t_{n}) +\textbf{M}(\tau) \right] 928 \end{multline} 970 \[ 971 % \label{eq:DYN_spg_ts_eta} 972 \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) 973 = 2 \rdt \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] 974 \] 975 \begin{multline*} 976 % \label{eq:DYN_spg_ts_u} 977 \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1}) \\ 978 = 2\rdt \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n}) 979 - H(\tau) \nabla p_s^{(b)}(\tau,t_{n}) +\textbf{M}(\tau) \right] 980 \end{multline*} 929 981 \ 930 982 … … 938 990 a single cycle. 939 991 This is also the time that sets the barotropic time steps via 940 \begin{equation} \label{eq:DYN_spg_ts_t} 941 t_n=\tau+n\rdt 942 \end{equation} 992 \[ 993 % \label{eq:DYN_spg_ts_t} 994 t_n=\tau+n\rdt 995 \] 943 996 with $n$ an integer. 944 997 The density scaled surface pressure is evaluated via 945 \begin{equation} \label{eq:DYN_spg_ts_ps} 946 p_s^{(b)}(\tau,t_{n}) = \begin{cases} 947 g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o & \text{non-linear case} \\ 948 g \;\eta_s^{(b)}(\tau,t_{n}) & \text{linear case} 949 \end{cases} 950 \end{equation} 998 \[ 999 % \label{eq:DYN_spg_ts_ps} 1000 p_s^{(b)}(\tau,t_{n}) = 1001 \begin{cases} 1002 g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o & \text{non-linear case} \\ 1003 g \;\eta_s^{(b)}(\tau,t_{n}) & \text{linear case} 1004 \end{cases} 1005 \] 951 1006 To get started, we assume the following initial conditions 952 \ begin{equation} \label{eq:DYN_spg_ts_eta}953 \begin{split}954 \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)}955 \\956 \eta^{(b)}(\tau,t_{n=1}) &= \eta^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0} 957 \end{split}958 \ end{equation}1007 \[ 1008 % \label{eq:DYN_spg_ts_eta} 1009 \begin{split} 1010 \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)} \\ 1011 \eta^{(b)}(\tau,t_{n=1}) &= \eta^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0} 1012 \end{split} 1013 \] 959 1014 with 960 \begin{equation} \label{eq:DYN_spg_ts_etaF} 961 \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\rdt,t_{n}) 962 \end{equation} 1015 \[ 1016 % \label{eq:DYN_spg_ts_etaF} 1017 \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\rdt,t_{n}) 1018 \] 963 1019 the time averaged surface height taken from the previous barotropic cycle. 964 1020 Likewise, 965 \ begin{equation} \label{eq:DYN_spg_ts_u}966 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)} \\ 967 \\968 \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0} 969 \ end{equation}1021 \[ 1022 % \label{eq:DYN_spg_ts_u} 1023 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)} \\ \\ 1024 \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0} 1025 \] 970 1026 with 971 \ begin{equation} \label{eq:DYN_spg_ts_u}972 \overline{\textbf{U}^{(b)}(\tau)}973 974 \ end{equation}1027 \[ 1028 % \label{eq:DYN_spg_ts_u} 1029 \overline{\textbf{U}^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\rdt,t_{n}) 1030 \] 975 1031 the time averaged vertically integrated transport. 976 1032 Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. … … 979 1035 the vertically integrated velocity is time averaged to produce the updated vertically integrated velocity at 980 1036 baroclinic time $\tau + \rdt \tau$ 981 \ begin{equation} \label{eq:DYN_spg_ts_u}982 \textbf{U}(\tau+\rdt) = \overline{\textbf{U}^{(b)}(\tau+\rdt)} 983 984 \ end{equation}1037 \[ 1038 % \label{eq:DYN_spg_ts_u} 1039 \textbf{U}(\tau+\rdt) = \overline{\textbf{U}^{(b)}(\tau+\rdt)} = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) 1040 \] 985 1041 The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using 986 1042 the following form 987 1043 988 \begin{equation} \label{eq:DYN_spg_ts_ssh} 989 \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] 1044 \begin{equation} 1045 \label{eq:DYN_spg_ts_ssh} 1046 \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] 990 1047 \end{equation} 991 1048 … … 1000 1057 its stability and reasonably good maintenance of tracer conservation properties (see ??). 1001 1058 1002 \begin{equation} \label{eq:DYN_spg_ts_sshf} 1003 \eta^{F}(\tau-\Delta) = \overline{\eta^{(b)}(\tau)} 1059 \begin{equation} 1060 \label{eq:DYN_spg_ts_sshf} 1061 \eta^{F}(\tau-\Delta) = \overline{\eta^{(b)}(\tau)} 1004 1062 \end{equation} 1005 1063 Another approach tried was 1006 1064 1007 \begin{equation} \label{eq:DYN_spg_ts_sshf2} 1008 \eta^{F}(\tau-\Delta) = \eta(\tau) 1009 + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\rdt) 1010 + \overline{\eta^{(b)}}(\tau-\rdt) -2 \;\eta(\tau) \right] 1011 \end{equation} 1065 \[ 1066 % \label{eq:DYN_spg_ts_sshf2} 1067 \eta^{F}(\tau-\Delta) = \eta(\tau) 1068 + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\rdt) 1069 + \overline{\eta^{(b)}}(\tau-\rdt) -2 \;\eta(\tau) \right] 1070 \] 1012 1071 1013 1072 which is useful since it isolates all the time filtering aspects into the term multiplied by $\alpha$. … … 1034 1093 %% gm %%======>>>> given here the discrete eqs provided to the solver 1035 1094 \gmcomment{ %%% copy from chap-model basics 1036 \begin{equation} \label{eq:spg_flt} 1037 \frac{\partial {\rm {\bf U}}_h }{\partial t}= {\rm {\bf M}} 1038 - g \nabla \left( \tilde{\rho} \ \eta \right) 1039 - g \ T_c \nabla \left( \widetilde{\rho} \ \partial_t \eta \right) 1040 \end{equation} 1041 where $T_c$, is a parameter with dimensions of time which characterizes the force, 1042 $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, 1043 and $\rm {\bf M}$ represents the collected contributions of the Coriolis, hydrostatic pressure gradient, 1044 non-linear and viscous terms in \autoref{eq:PE_dyn}. 1095 \[ 1096 % \label{eq:spg_flt} 1097 \frac{\partial {\rm {\bf U}}_h }{\partial t}= {\rm {\bf M}} 1098 - g \nabla \left( \tilde{\rho} \ \eta \right) 1099 - g \ T_c \nabla \left( \widetilde{\rho} \ \partial_t \eta \right) 1100 \] 1101 where $T_c$, is a parameter with dimensions of time which characterizes the force, 1102 $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, 1103 and $\rm {\bf M}$ represents the collected contributions of the Coriolis, hydrostatic pressure gradient, 1104 non-linear and viscous terms in \autoref{eq:PE_dyn}. 1045 1105 } %end gmcomment 1046 1106 … … 1091 1151 1092 1152 For lateral iso-level diffusion, the discrete operator is: 1093 \begin{equation} \label{eq:dynldf_lap} 1094 \left\{ \begin{aligned} 1095 D_u^{l{\rm {\bf U}}} =\frac{1}{e_{1u} }\delta _{i+1/2} \left[ {A_T^{lm} 1096 \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta _j \left[ 1097 {A_f^{lm} \;e_{3f} \zeta } \right] \\ 1098 \\ 1099 D_v^{l{\rm {\bf U}}} =\frac{1}{e_{2v} }\delta _{j+1/2} \left[ {A_T^{lm} 1100 \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta _i \left[ 1101 {A_f^{lm} \;e_{3f} \zeta } \right] \\ 1102 \end{aligned} \right. 1153 \begin{equation} 1154 \label{eq:dynldf_lap} 1155 \left\{ 1156 \begin{aligned} 1157 D_u^{l{\rm {\bf U}}} =\frac{1}{e_{1u} }\delta_{i+1/2} \left[ {A_T^{lm} 1158 \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta_j \left[ 1159 {A_f^{lm} \;e_{3f} \zeta } \right] \\ \\ 1160 D_v^{l{\rm {\bf U}}} =\frac{1}{e_{2v} }\delta_{j+1/2} \left[ {A_T^{lm} 1161 \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta_i \left[ 1162 {A_f^{lm} \;e_{3f} \zeta } \right] 1163 \end{aligned} 1164 \right. 1103 1165 \end{equation} 1104 1166 … … 1124 1186 It must be emphasized that this formulation ignores constraints on the stress tensor such as symmetry. 1125 1187 The resulting discrete representation is: 1126 \begin{equation} \label{eq:dyn_ldf_iso} 1127 \begin{split} 1128 D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} } \\ 1129 & \left\{\quad {\delta _{i+1/2} \left[ {A_T^{lm} \left( 1130 {\frac{e_{2t} \; e_{3t} }{e_{1t} } \,\delta _{i}[u] 1131 -e_{2t} \; r_{1t} \,\overline{\overline {\delta _{k+1/2}[u]}}^{\,i,\,k}} 1132 \right)} \right]} \right. 1133 \\ 1134 & \qquad +\ \delta_j \left[ {A_f^{lm} \left( {\frac{e_{1f}\,e_{3f} }{e_{2f} 1135 }\,\delta _{j+1/2} [u] - e_{1f}\, r_{2f} 1136 \,\overline{\overline {\delta _{k+1/2} [u]}} ^{\,j+1/2,\,k}} 1137 \right)} \right] 1138 \\ 1139 &\qquad +\ \delta_k \left[ {A_{uw}^{lm} \left( {-e_{2u} \, r_{1uw} \,\overline{\overline 1140 {\delta_{i+1/2} [u]}}^{\,i+1/2,\,k+1/2} } 1141 \right.} \right. 1142 \\ 1143 & \ \qquad \qquad \qquad \quad\ 1144 - e_{1u} \, r_{2uw} \,\overline{\overline {\delta_{j+1/2} [u]}} ^{\,j,\,k+1/2} 1145 \\ 1146 & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ 1147 +\frac{e_{1u}\, e_{2u} }{e_{3uw} }\,\left( {r_{1uw}^2+r_{2uw}^2} 1148 \right)\,\delta_{k+1/2} [u]} \right)} \right]\;\;\;} \right\} 1149 \\ 1150 \\ 1151 D_v^{l\textbf{V}} &= \frac{1}{e_{1v} \, e_{2v} \, e_{3v} } \\ 1152 & \left\{\quad {\delta _{i+1/2} \left[ {A_f^{lm} \left( 1153 {\frac{e_{2f} \; e_{3f} }{e_{1f} } \,\delta _{i+1/2}[v] 1154 -e_{2f} \; r_{1f} \,\overline{\overline {\delta _{k+1/2}[v]}}^{\,i+1/2,\,k}} 1155 \right)} \right]} \right. 1156 \\ 1157 & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t} 1158 }\,\delta _{j} [v] - e_{1t}\, r_{2t} 1159 \,\overline{\overline {\delta _{k+1/2} [v]}} ^{\,j,\,k}} 1160 \right)} \right] 1161 \\ 1162 & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline 1163 {\delta_{i+1/2} [v]}}^{\,i+1/2,\,k+1/2} }\right.} \right. 1164 \\ 1165 & \ \qquad \qquad \qquad \quad\ 1166 - e_{1v} \, r_{2vw} \,\overline{\overline {\delta_{j+1/2} [v]}} ^{\,j+1/2,\,k+1/2} 1167 \\ 1168 & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ 1169 +\frac{e_{1v}\, e_{2v} }{e_{3vw} }\,\left( {r_{1vw}^2+r_{2vw}^2} 1170 \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\} 1171 \end{split} 1188 \begin{equation} 1189 \label{eq:dyn_ldf_iso} 1190 \begin{split} 1191 D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} } \\ 1192 & \left\{\quad {\delta_{i+1/2} \left[ {A_T^{lm} \left( 1193 {\frac{e_{2t} \; e_{3t} }{e_{1t} } \,\delta_{i}[u] 1194 -e_{2t} \; r_{1t} \,\overline{\overline {\delta_{k+1/2}[u]}}^{\,i,\,k}} 1195 \right)} \right]} \right. \\ 1196 & \qquad +\ \delta_j \left[ {A_f^{lm} \left( {\frac{e_{1f}\,e_{3f} }{e_{2f} 1197 }\,\delta_{j+1/2} [u] - e_{1f}\, r_{2f} 1198 \,\overline{\overline {\delta_{k+1/2} [u]}} ^{\,j+1/2,\,k}} 1199 \right)} \right] \\ 1200 &\qquad +\ \delta_k \left[ {A_{uw}^{lm} \left( {-e_{2u} \, r_{1uw} \,\overline{\overline 1201 {\delta_{i+1/2} [u]}}^{\,i+1/2,\,k+1/2} } 1202 \right.} \right. \\ 1203 & \ \qquad \qquad \qquad \quad\ 1204 - e_{1u} \, r_{2uw} \,\overline{\overline {\delta_{j+1/2} [u]}} ^{\,j,\,k+1/2} \\ 1205 & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ 1206 +\frac{e_{1u}\, e_{2u} }{e_{3uw} }\,\left( {r_{1uw}^2+r_{2uw}^2} 1207 \right)\,\delta_{k+1/2} [u]} \right)} \right]\;\;\;} \right\} \\ \\ 1208 D_v^{l\textbf{V}} &= \frac{1}{e_{1v} \, e_{2v} \, e_{3v} } \\ 1209 & \left\{\quad {\delta_{i+1/2} \left[ {A_f^{lm} \left( 1210 {\frac{e_{2f} \; e_{3f} }{e_{1f} } \,\delta_{i+1/2}[v] 1211 -e_{2f} \; r_{1f} \,\overline{\overline {\delta_{k+1/2}[v]}}^{\,i+1/2,\,k}} 1212 \right)} \right]} \right. \\ 1213 & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t} 1214 }\,\delta_{j} [v] - e_{1t}\, r_{2t} 1215 \,\overline{\overline {\delta_{k+1/2} [v]}} ^{\,j,\,k}} 1216 \right)} \right] \\ 1217 & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline 1218 {\delta_{i+1/2} [v]}}^{\,i+1/2,\,k+1/2} }\right.} \right. \\ 1219 & \ \qquad \qquad \qquad \quad\ 1220 - e_{1v} \, r_{2vw} \,\overline{\overline {\delta_{j+1/2} [v]}} ^{\,j+1/2,\,k+1/2} \\ 1221 & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ 1222 +\frac{e_{1v}\, e_{2v} }{e_{3vw} }\,\left( {r_{1vw}^2+r_{2vw}^2} 1223 \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\} 1224 \end{split} 1172 1225 \end{equation} 1173 1226 where $r_1$ and $r_2$ are the slopes between the surface along which the diffusion operator acts and … … 1211 1264 The formulation of the vertical subgrid scale physics is the same whatever the vertical coordinate is. 1212 1265 The vertical diffusion operators given by \autoref{eq:PE_zdf} take the following semi-discrete space form: 1213 \begin{equation} \label{eq:dynzdf} 1214 \left\{ \begin{aligned} 1215 D_u^{vm} &\equiv \frac{1}{e_{3u}} \ \delta _k \left[ \frac{A_{uw}^{vm} }{e_{3uw} } 1216 \ \delta _{k+1/2} [\,u\,] \right] \\ 1217 \\ 1218 D_v^{vm} &\equiv \frac{1}{e_{3v}} \ \delta _k \left[ \frac{A_{vw}^{vm} }{e_{3vw} } 1219 \ \delta _{k+1/2} [\,v\,] \right] 1220 \end{aligned} \right. 1221 \end{equation} 1266 \[ 1267 % \label{eq:dynzdf} 1268 \left\{ 1269 \begin{aligned} 1270 D_u^{vm} &\equiv \frac{1}{e_{3u}} \ \delta_k \left[ \frac{A_{uw}^{vm} }{e_{3uw} } 1271 \ \delta_{k+1/2} [\,u\,] \right] \\ 1272 \\ 1273 D_v^{vm} &\equiv \frac{1}{e_{3v}} \ \delta_k \left[ \frac{A_{vw}^{vm} }{e_{3vw} } 1274 \ \delta_{k+1/2} [\,v\,] \right] 1275 \end{aligned} 1276 \right. 1277 \] 1222 1278 where $A_{uw}^{vm} $ and $A_{vw}^{vm} $ are the vertical eddy viscosity and diffusivity coefficients. 1223 1279 The way these coefficients are evaluated depends on the vertical physics used (see \autoref{chap:ZDF}). … … 1226 1282 At the surface, the momentum fluxes are prescribed as the boundary condition on 1227 1283 the vertical turbulent momentum fluxes, 1228 \begin{equation} \label{eq:dynzdf_sbc} 1229 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1} 1230 = \frac{1}{\rho _o} \binom{\tau _u}{\tau _v } 1284 \begin{equation} 1285 \label{eq:dynzdf_sbc} 1286 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1} 1287 = \frac{1}{\rho_o} \binom{\tau_u}{\tau_v } 1231 1288 \end{equation} 1232 where $\left( \tau _u ,\tau_v \right)$ are the two components of the wind stress vector in1289 where $\left( \tau_u ,\tau_v \right)$ are the two components of the wind stress vector in 1233 1290 the (\textbf{i},\textbf{j}) coordinate system. 1234 1291 The high mixing coefficients in the surface mixed layer ensure that the surface wind stress is distributed in … … 1286 1343 $\bullet$ vector invariant form or linear free surface 1287 1344 (\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined): 1288 \begin{equation} \label{eq:dynnxt_vec} 1289 \left\{ \begin{aligned} 1290 &u^{t+\rdt} = u_f^{t-\rdt} + 2\rdt \ \text{RHS}_u^t \\ 1291 &u_f^t \;\quad = u^t+\gamma \,\left[ {u_f^{t-\rdt} -2u^t+u^{t+\rdt}} \right] 1292 \end{aligned} \right. 1293 \end{equation} 1345 \[ 1346 % \label{eq:dynnxt_vec} 1347 \left\{ 1348 \begin{aligned} 1349 &u^{t+\rdt} = u_f^{t-\rdt} + 2\rdt \ \text{RHS}_u^t \\ 1350 &u_f^t \;\quad = u^t+\gamma \,\left[ {u_f^{t-\rdt} -2u^t+u^{t+\rdt}} \right] 1351 \end{aligned} 1352 \right. 1353 \] 1294 1354 1295 1355 $\bullet$ flux form and nonlinear free surface 1296 1356 (\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined): 1297 \begin{equation} \label{eq:dynnxt_flux} 1298 \left\{ \begin{aligned} 1299 &\left(e_{3u}\,u\right)^{t+\rdt} = \left(e_{3u}\,u\right)_f^{t-\rdt} + 2\rdt \; e_{3u} \;\text{RHS}_u^t \\ 1300 &\left(e_{3u}\,u\right)_f^t \;\quad = \left(e_{3u}\,u\right)^t 1301 +\gamma \,\left[ {\left(e_{3u}\,u\right)_f^{t-\rdt} -2\left(e_{3u}\,u\right)^t+\left(e_{3u}\,u\right)^{t+\rdt}} \right] 1302 \end{aligned} \right. 1303 \end{equation} 1357 \[ 1358 % \label{eq:dynnxt_flux} 1359 \left\{ 1360 \begin{aligned} 1361 &\left(e_{3u}\,u\right)^{t+\rdt} = \left(e_{3u}\,u\right)_f^{t-\rdt} + 2\rdt \; e_{3u} \;\text{RHS}_u^t \\ 1362 &\left(e_{3u}\,u\right)_f^t \;\quad = \left(e_{3u}\,u\right)^t 1363 +\gamma \,\left[ {\left(e_{3u}\,u\right)_f^{t-\rdt} -2\left(e_{3u}\,u\right)^t+\left(e_{3u}\,u\right)^{t+\rdt}} \right] 1364 \end{aligned} 1365 \right. 1366 \] 1304 1367 where RHS is the right hand side of the momentum equation, 1305 1368 the subscript $f$ denotes filtered values and $\gamma$ is the Asselin coefficient. … … 1314 1377 1315 1378 % ================================================================ 1379 \biblio 1380 1316 1381 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_LBC.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 6 7 \chapter{Lateral Boundary Condition (LBC)} 7 8 \label{chap:LBC} 9 8 10 \minitoc 9 11 10 12 \newpage 11 $\ $\newline % force a new ligne12 13 13 14 14 %gm% add here introduction to this chapter … … 44 44 Evaluating this quantity as, 45 45 46 \begin{equation} \label{eq:lbc_aaaa} 47 \frac{A^{lT} }{e_1 }\frac{\partial T}{\partial i}\equiv \frac{A_u^{lT} 48 }{e_{1u} } \; \delta _{i+1 / 2} \left[ T \right]\;\;mask_u 49 \end{equation} 46 \[ 47 % \label{eq:lbc_aaaa} 48 \frac{A^{lT} }{e_1 }\frac{\partial T}{\partial i}\equiv \frac{A_u^{lT} 49 }{e_{1u} } \; \delta_{i+1 / 2} \left[ T \right]\;\;mask_u 50 \] 50 51 (where mask$_{u}$ is the mask array at a $u$-point) ensures that the heat flux is zero inside land and 51 52 at the boundaries, since mask$_{u}$ is zero at solid boundaries which in this case are defined at $u$-points … … 53 54 54 55 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 55 \begin{figure}[!t] \begin{center} 56 \includegraphics[width=0.90\textwidth]{Fig_LBC_uv} 57 \caption{ \protect\label{fig:LBC_uv} 58 Lateral boundary (thick line) at T-level. 59 The velocity normal to the boundary is set to zero.} 60 \end{center} \end{figure} 56 \begin{figure}[!t] 57 \begin{center} 58 \includegraphics[width=0.90\textwidth]{Fig_LBC_uv} 59 \caption{ 60 \protect\label{fig:LBC_uv} 61 Lateral boundary (thick line) at T-level. 62 The velocity normal to the boundary is set to zero. 63 } 64 \end{center} 65 \end{figure} 61 66 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 62 67 … … 78 83 79 84 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 80 \begin{figure}[!p] \begin{center} 81 \includegraphics[width=0.90\textwidth]{Fig_LBC_shlat} 82 \caption{ \protect\label{fig:LBC_shlat} 83 lateral boundary condition 84 (a) free-slip ($rn\_shlat=0$); 85 (b) no-slip ($rn\_shlat=2$); 86 (c) "partial" free-slip ($0<rn\_shlat<2$) and 87 (d) "strong" no-slip ($2<rn\_shlat$). 88 Implied "ghost" velocity inside land area is display in grey. } 89 \end{center} \end{figure} 85 \begin{figure}[!p] 86 \begin{center} 87 \includegraphics[width=0.90\textwidth]{Fig_LBC_shlat} 88 \caption{ 89 \protect\label{fig:LBC_shlat} 90 lateral boundary condition 91 (a) free-slip ($rn\_shlat=0$); 92 (b) no-slip ($rn\_shlat=2$); 93 (c) "partial" free-slip ($0<rn\_shlat<2$) and 94 (d) "strong" no-slip ($2<rn\_shlat$). 95 Implied "ghost" velocity inside land area is display in grey. 96 } 97 \end{center} 98 \end{figure} 90 99 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 91 100 … … 106 115 Therefore, the vorticity along the coastlines is given by: 107 116 108 \begin{equation*} 109 \zeta \equiv 2 \left(\delta_{i+1/2} \left[e_{2v} v \right] - \delta_{j+1/2} \left[e_{1u} u \right] \right) / \left(e_{1f} e_{2f} \right) \ , 110 \end{equation*} 111 where $u$ and $v$ are masked fields. 112 Setting the mask$_{f}$ array to $2$ along the coastline provides a vorticity field computed with 113 the no-slip boundary condition, simply by multiplying it by the mask$_{f}$ : 114 \begin{equation} \label{eq:lbc_bbbb} 115 \zeta \equiv \frac{1}{e_{1f} {\kern 1pt}e_{2f} }\left( {\delta _{i+1/2} 116 \left[ {e_{2v} \,v} \right]-\delta _{j+1/2} \left[ {e_{1u} \,u} \right]} 117 \right)\;\mbox{mask}_f 118 \end{equation} 117 \[ 118 \zeta \equiv 2 \left(\delta_{i+1/2} \left[e_{2v} v \right] - \delta_{j+1/2} \left[e_{1u} u \right] \right) / \left(e_{1f} e_{2f} \right) \ , 119 \] 120 where $u$ and $v$ are masked fields. 121 Setting the mask$_{f}$ array to $2$ along the coastline provides a vorticity field computed with 122 the no-slip boundary condition, simply by multiplying it by the mask$_{f}$ : 123 \[ 124 % \label{eq:lbc_bbbb} 125 \zeta \equiv \frac{1}{e_{1f} {\kern 1pt}e_{2f} }\left( {\delta_{i+1/2} 126 \left[ {e_{2v} \,v} \right]-\delta_{j+1/2} \left[ {e_{1u} \,u} \right]} 127 \right)\;\mbox{mask}_f 128 \] 119 129 120 130 \item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2):] the tangential velocity at … … 182 192 183 193 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 184 \begin{figure}[!t] \begin{center} 185 \includegraphics[width=1.0\textwidth]{Fig_LBC_jperio} 186 \caption{ \protect\label{fig:LBC_jperio} 187 setting of (a) east-west cyclic (b) symmetric across the equator boundary conditions.} 188 \end{center} \end{figure} 194 \begin{figure}[!t] 195 \begin{center} 196 \includegraphics[width=1.0\textwidth]{Fig_LBC_jperio} 197 \caption{ 198 \protect\label{fig:LBC_jperio} 199 setting of (a) east-west cyclic (b) symmetric across the equator boundary conditions. 200 } 201 \end{center} 202 \end{figure} 189 203 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 190 204 … … 202 216 203 217 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 204 \begin{figure}[!t] \begin{center} 205 \includegraphics[width=0.90\textwidth]{Fig_North_Fold_T} 206 \caption{ \protect\label{fig:North_Fold_T} 207 North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$), 208 as used in ORCA 2, 1/4, and 1/12. 209 Pink shaded area corresponds to the inner domain mask (see text). } 210 \end{center} \end{figure} 218 \begin{figure}[!t] 219 \begin{center} 220 \includegraphics[width=0.90\textwidth]{Fig_North_Fold_T} 221 \caption{ 222 \protect\label{fig:North_Fold_T} 223 North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$), 224 as used in ORCA 2, 1/4, and 1/12. 225 Pink shaded area corresponds to the inner domain mask (see text). 226 } 227 \end{center} 228 \end{figure} 211 229 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 212 230 … … 260 278 261 279 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 262 \begin{figure}[!t] \begin{center} 263 \includegraphics[width=0.90\textwidth]{Fig_mpp} 264 \caption{ \protect\label{fig:mpp} 265 Positioning of a sub-domain when massively parallel processing is used. } 266 \end{center} \end{figure} 280 \begin{figure}[!t] 281 \begin{center} 282 \includegraphics[width=0.90\textwidth]{Fig_mpp} 283 \caption{ 284 \protect\label{fig:mpp} 285 Positioning of a sub-domain when massively parallel processing is used. 286 } 287 \end{center} 288 \end{figure} 267 289 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 268 290 … … 279 301 The whole domain dimensions are named \np{jpiglo}, \np{jpjglo} and \jp{jpk}. 280 302 The relationship between the whole domain and a sub-domain is: 281 \ begin{eqnarray}282 jpi & = & ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci \nonumber \\283 jpj & = & ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj \label{eq:lbc_jpi}284 \ end{eqnarray}303 \[ 304 jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci 305 jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj 306 \] 285 307 where \jp{jpni}, \jp{jpnj} are the number of processors following the i- and j-axis. 286 308 … … 289 311 An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 290 312 a global array (whole domain) by the relationship: 291 \begin{equation} \label{eq:lbc_nimpp} 292 T_{g} (i+nimpp-1,j+njmpp-1,k) = T_{l} (i,j,k), 293 \end{equation} 313 \[ 314 % \label{eq:lbc_nimpp} 315 T_{g} (i+nimpp-1,j+njmpp-1,k) = T_{l} (i,j,k), 316 \] 294 317 with $1 \leq i \leq jpi$, $1 \leq j \leq jpj $ , and $1 \leq k \leq jpk$. 295 318 … … 335 358 336 359 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 337 \begin{figure}[!ht] \begin{center} 338 \includegraphics[width=0.90\textwidth]{Fig_mppini2} 339 \caption { \protect\label{fig:mppini2} 340 Example of Atlantic domain defined for the CLIPPER projet. 341 Initial grid is composed of 773 x 1236 horizontal points. 342 (a) the domain is split onto 9 \time 20 subdomains (jpni=9, jpnj=20). 343 52 subdomains are land areas. 344 (b) 52 subdomains are eliminated (white rectangles) and 345 the resulting number of processors really used during the computation is jpnij=128.} 346 \end{center} \end{figure} 360 \begin{figure}[!ht] 361 \begin{center} 362 \includegraphics[width=0.90\textwidth]{Fig_mppini2} 363 \caption { 364 \protect\label{fig:mppini2} 365 Example of Atlantic domain defined for the CLIPPER projet. 366 Initial grid is composed of 773 x 1236 horizontal points. 367 (a) the domain is split onto 9 \time 20 subdomains (jpni=9, jpnj=20). 368 52 subdomains are land areas. 369 (b) 52 subdomains are eliminated (white rectangles) and 370 the resulting number of processors really used during the computation is jpnij=128. 371 } 372 \end{center} 373 \end{figure} 347 374 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 348 375 … … 400 427 The choice of algorithm is currently as follows: 401 428 402 \mbox{}403 404 429 \begin{itemize} 405 430 \item[0.] No boundary condition applied. … … 410 435 ({\it dynspg\_ts}). 411 436 \end{itemize} 412 413 \mbox{}414 437 415 438 The main choice for the boundary data is to use initial conditions as boundary data … … 445 468 a zone next to the edge of the model domain. 446 469 Given a model prognostic variable $\Phi$ 447 \begin{equation} \label{eq:bdy_frs1} 448 \Phi(d) = \alpha(d)\Phi_{e}(d) + (1-\alpha(d))\Phi_{m}(d)\;\;\;\;\; d=1,N 449 \end{equation} 470 \[ 471 % \label{eq:bdy_frs1} 472 \Phi(d) = \alpha(d)\Phi_{e}(d) + (1-\alpha(d))\Phi_{m}(d)\;\;\;\;\; d=1,N 473 \] 450 474 where $\Phi_{m}$ is the model solution and $\Phi_{e}$ is the specified external field, 451 475 $d$ gives the discrete distance from the model boundary and … … 453 477 It can be shown that this scheme is equivalent to adding a relaxation term to 454 478 the prognostic equation for $\Phi$ of the form: 455 \begin{equation} \label{eq:bdy_frs2} 456 -\frac{1}{\tau}\left(\Phi - \Phi_{e}\right) 457 \end{equation} 479 \[ 480 % \label{eq:bdy_frs2} 481 -\frac{1}{\tau}\left(\Phi - \Phi_{e}\right) 482 \] 458 483 where the relaxation time scale $\tau$ is given by a function of $\alpha$ and the model time step $\Delta t$: 459 \begin{equation} \label{eq:bdy_frs3} 460 \tau = \frac{1-\alpha}{\alpha} \,\rdt 461 \end{equation} 484 \[ 485 % \label{eq:bdy_frs3} 486 \tau = \frac{1-\alpha}{\alpha} \,\rdt 487 \] 462 488 Thus the model solution is completely prescribed by the external conditions at the edge of the model domain and 463 489 is relaxed towards the external conditions over the rest of the FRS zone. … … 466 492 467 493 The function $\alpha$ is specified as a $tanh$ function: 468 \begin{equation} \label{eq:bdy_frs4} 469 \alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right), \quad d=1,N 470 \end{equation} 494 \[ 495 % \label{eq:bdy_frs4} 496 \alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right), \quad d=1,N 497 \] 471 498 The width of the FRS zone is specified in the namelist as \np{nn\_rimwidth}. 472 499 This is typically set to a value between 8 and 10. … … 532 559 533 560 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 534 \begin{figure}[!t] \begin{center} 535 \includegraphics[width=1.0\textwidth]{Fig_LBC_bdy_geom} 536 \caption { \protect\label{fig:LBC_bdy_geom} 537 Example of geometry of unstructured open boundary} 538 \end{center} \end{figure} 561 \begin{figure}[!t] 562 \begin{center} 563 \includegraphics[width=1.0\textwidth]{Fig_LBC_bdy_geom} 564 \caption { 565 \protect\label{fig:LBC_bdy_geom} 566 Example of geometry of unstructured open boundary 567 } 568 \end{center} 569 \end{figure} 539 570 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 540 571 … … 553 584 (and therefore restrictions on the order of the data in the file). 554 585 In particular: 555 556 \mbox{}557 586 558 587 \begin{enumerate} … … 564 593 \end{enumerate} 565 594 566 \mbox{}567 568 595 These restrictions mean that data files used with previous versions of the model may not work with version 3.4. 569 596 A fortran utility {\it bdy\_reorder} exists in the TOOLS directory which … … 571 598 572 599 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 573 \begin{figure}[!t] \begin{center} 574 \includegraphics[width=1.0\textwidth]{Fig_LBC_nc_header} 575 \caption { \protect\label{fig:LBC_nc_header} 576 Example of the header for a \protect\ifile{coordinates.bdy} file} 577 \end{center} \end{figure} 600 \begin{figure}[!t] 601 \begin{center} 602 \includegraphics[width=1.0\textwidth]{Fig_LBC_nc_header} 603 \caption { 604 \protect\label{fig:LBC_nc_header} 605 Example of the header for a \protect\ifile{coordinates.bdy} file 606 } 607 \end{center} 608 \end{figure} 578 609 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 579 610 … … 608 639 To be written.... 609 640 610 611 641 \biblio 612 642 613 643 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_LDF.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 4 5 % ================================================================ 5 % Chapter ———Lateral Ocean Physics (LDF)6 % Chapter Lateral Ocean Physics (LDF) 6 7 % ================================================================ 7 8 \chapter{Lateral Ocean Physics (LDF)} 8 9 \label{chap:LDF} 10 9 11 \minitoc 10 12 11 12 13 \newpage 13 $\ $\newline % force a new ligne14 15 14 16 15 The lateral physics terms in the momentum and tracer equations have been described in \autoref{eq:PE_zdf} and … … 43 42 44 43 %%% 45 \gmcomment{ we should emphasize here that the implementation is a rather old one. 46 Better work can be achieved by using \citet{Griffies_al_JPO98, Griffies_Bk04} iso-neutral scheme. } 44 \gmcomment{ 45 we should emphasize here that the implementation is a rather old one. 46 Better work can be achieved by using \citet{Griffies_al_JPO98, Griffies_Bk04} iso-neutral scheme. 47 } 47 48 48 49 A direction for lateral mixing has to be defined when the desired operator does not act along the model levels. … … 68 69 %gm { Steven : My version is obviously wrong since I'm left with an arbitrary constant which is the local vertical temperature gradient} 69 70 70 \begin{equation} \label{eq:ldfslp_geo} 71 \begin{aligned} 72 r_{1u} &= \frac{e_{3u}}{ \left( e_{1u}\;\overline{\overline{e_{3w}}}^{\,i+1/2,\,k} \right)} 73 \;\delta_{i+1/2}[z_t] 74 &\approx \frac{1}{e_{1u}}\; \delta_{i+1/2}[z_t] \ \ \ 75 \\ 76 r_{2v} &= \frac{e_{3v}}{\left( e_{2v}\;\overline{\overline{e_{3w}}}^{\,j+1/2,\,k} \right)} 77 \;\delta_{j+1/2} [z_t] 78 &\approx \frac{1}{e_{2v}}\; \delta_{j+1/2}[z_t] \ \ \ 79 \\ 80 r_{1w} &= \frac{1}{e_{1w}}\;\overline{\overline{\delta_{i+1/2}[z_t]}}^{\,i,\,k+1/2} 81 &\approx \frac{1}{e_{1w}}\; \delta_{i+1/2}[z_{uw}] 82 \\ 83 r_{2w} &= \frac{1}{e_{2w}}\;\overline{\overline{\delta_{j+1/2}[z_t]}}^{\,j,\,k+1/2} 84 &\approx \frac{1}{e_{2w}}\; \delta_{j+1/2}[z_{vw}] 85 \\ 86 \end{aligned} 71 \begin{equation} 72 \label{eq:ldfslp_geo} 73 \begin{aligned} 74 r_{1u} &= \frac{e_{3u}}{ \left( e_{1u}\;\overline{\overline{e_{3w}}}^{\,i+1/2,\,k} \right)} 75 \;\delta_{i+1/2}[z_t] 76 &\approx \frac{1}{e_{1u}}\; \delta_{i+1/2}[z_t] \ \ \ \\ 77 r_{2v} &= \frac{e_{3v}}{\left( e_{2v}\;\overline{\overline{e_{3w}}}^{\,j+1/2,\,k} \right)} 78 \;\delta_{j+1/2} [z_t] 79 &\approx \frac{1}{e_{2v}}\; \delta_{j+1/2}[z_t] \ \ \ \\ 80 r_{1w} &= \frac{1}{e_{1w}}\;\overline{\overline{\delta_{i+1/2}[z_t]}}^{\,i,\,k+1/2} 81 &\approx \frac{1}{e_{1w}}\; \delta_{i+1/2}[z_{uw}] \\ 82 r_{2w} &= \frac{1}{e_{2w}}\;\overline{\overline{\delta_{j+1/2}[z_t]}}^{\,j,\,k+1/2} 83 &\approx \frac{1}{e_{2w}}\; \delta_{j+1/2}[z_{vw}] 84 \end{aligned} 87 85 \end{equation} 88 86 … … 94 92 \subsection{Slopes for tracer iso-neutral mixing} 95 93 \label{subsec:LDF_slp_iso} 94 96 95 In iso-neutral mixing $r_1$ and $r_2$ are the slopes between the iso-neutral and computational surfaces. 97 96 Their formulation does not depend on the vertical coordinate used. … … 101 100 the three directions to zero leads to the following definition for the neutral slopes: 102 101 103 \begin{equation} \label{eq:ldfslp_iso} 104 \begin{split} 105 r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac{\delta_{i+1/2}[\rho]} 106 {\overline{\overline{\delta_{k+1/2}[\rho]}}^{\,i+1/2,\,k}} 107 \\ 108 r_{2v} &= \frac{e_{3v}}{e_{2v}}\; \frac{\delta_{j+1/2}\left[\rho \right]} 109 {\overline{\overline{\delta_{k+1/2}[\rho]}}^{\,j+1/2,\,k}} 110 \\ 111 r_{1w} &= \frac{e_{3w}}{e_{1w}}\; 112 \frac{\overline{\overline{\delta_{i+1/2}[\rho]}}^{\,i,\,k+1/2}} 113 {\delta_{k+1/2}[\rho]} 114 \\ 115 r_{2w} &= \frac{e_{3w}}{e_{2w}}\; 116 \frac{\overline{\overline{\delta_{j+1/2}[\rho]}}^{\,j,\,k+1/2}} 117 {\delta_{k+1/2}[\rho]} 118 \\ 119 \end{split} 102 \begin{equation} 103 \label{eq:ldfslp_iso} 104 \begin{split} 105 r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac{\delta_{i+1/2}[\rho]} 106 {\overline{\overline{\delta_{k+1/2}[\rho]}}^{\,i+1/2,\,k}} \\ 107 r_{2v} &= \frac{e_{3v}}{e_{2v}}\; \frac{\delta_{j+1/2}\left[\rho \right]} 108 {\overline{\overline{\delta_{k+1/2}[\rho]}}^{\,j+1/2,\,k}} \\ 109 r_{1w} &= \frac{e_{3w}}{e_{1w}}\; 110 \frac{\overline{\overline{\delta_{i+1/2}[\rho]}}^{\,i,\,k+1/2}} 111 {\delta_{k+1/2}[\rho]} \\ 112 r_{2w} &= \frac{e_{3w}}{e_{2w}}\; 113 \frac{\overline{\overline{\delta_{j+1/2}[\rho]}}^{\,j,\,k+1/2}} 114 {\delta_{k+1/2}[\rho]} 115 \end{split} 120 116 \end{equation} 121 117 … … 161 157 locally referenced potential density, we stay in the $T$-$S$ plane and consider the balance between 162 158 the neutral direction diffusive fluxes of potential temperature and salinity: 163 \begin{equation} 164 \alpha \ \textbf{F}(T) = \beta \ \textbf{F}(S)165 \end{equation} 166 %gm{ where vector F is ....}159 \[ 160 \alpha \ \textbf{F}(T) = \beta \ \textbf{F}(S) 161 \] 162 % gm{ where vector F is ....} 167 163 168 164 This constraint leads to the following definition for the slopes: 169 165 170 \begin{equation} \label{eq:ldfslp_iso2} 171 \begin{split} 172 r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac 173 {\alpha_u \;\delta_{i+1/2}[T] - \beta_u \;\delta_{i+1/2}[S]} 174 {\alpha_u \;\overline{\overline{\delta_{k+1/2}[T]}}^{\,i+1/2,\,k} 175 -\beta_u \;\overline{\overline{\delta_{k+1/2}[S]}}^{\,i+1/2,\,k} } 176 \\ 177 r_{2v} &= \frac{e_{3v}}{e_{2v}}\; \frac 178 {\alpha_v \;\delta_{j+1/2}[T] - \beta_v \;\delta_{j+1/2}[S]} 179 {\alpha_v \;\overline{\overline{\delta_{k+1/2}[T]}}^{\,j+1/2,\,k} 180 -\beta_v \;\overline{\overline{\delta_{k+1/2}[S]}}^{\,j+1/2,\,k} } 181 \\ 182 r_{1w} &= \frac{e_{3w}}{e_{1w}}\; \frac 183 {\alpha_w \;\overline{\overline{\delta_{i+1/2}[T]}}^{\,i,\,k+1/2} 184 -\beta_w \;\overline{\overline{\delta_{i+1/2}[S]}}^{\,i,\,k+1/2} } 185 {\alpha_w \;\delta_{k+1/2}[T] - \beta_w \;\delta_{k+1/2}[S]} 186 \\ 187 r_{2w} &= \frac{e_{3w}}{e_{2w}}\; \frac 188 {\alpha_w \;\overline{\overline{\delta_{j+1/2}[T]}}^{\,j,\,k+1/2} 189 -\beta_w \;\overline{\overline{\delta_{j+1/2}[S]}}^{\,j,\,k+1/2} } 190 {\alpha_w \;\delta_{k+1/2}[T] - \beta_w \;\delta_{k+1/2}[S]} 191 \\ 192 \end{split} 193 \end{equation} 166 \[ 167 % \label{eq:ldfslp_iso2} 168 \begin{split} 169 r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac 170 {\alpha_u \;\delta_{i+1/2}[T] - \beta_u \;\delta_{i+1/2}[S]} 171 {\alpha_u \;\overline{\overline{\delta_{k+1/2}[T]}}^{\,i+1/2,\,k} 172 -\beta_u \;\overline{\overline{\delta_{k+1/2}[S]}}^{\,i+1/2,\,k} } \\ 173 r_{2v} &= \frac{e_{3v}}{e_{2v}}\; \frac 174 {\alpha_v \;\delta_{j+1/2}[T] - \beta_v \;\delta_{j+1/2}[S]} 175 {\alpha_v \;\overline{\overline{\delta_{k+1/2}[T]}}^{\,j+1/2,\,k} 176 -\beta_v \;\overline{\overline{\delta_{k+1/2}[S]}}^{\,j+1/2,\,k} } \\ 177 r_{1w} &= \frac{e_{3w}}{e_{1w}}\; \frac 178 {\alpha_w \;\overline{\overline{\delta_{i+1/2}[T]}}^{\,i,\,k+1/2} 179 -\beta_w \;\overline{\overline{\delta_{i+1/2}[S]}}^{\,i,\,k+1/2} } 180 {\alpha_w \;\delta_{k+1/2}[T] - \beta_w \;\delta_{k+1/2}[S]} \\ 181 r_{2w} &= \frac{e_{3w}}{e_{2w}}\; \frac 182 {\alpha_w \;\overline{\overline{\delta_{j+1/2}[T]}}^{\,j,\,k+1/2} 183 -\beta_w \;\overline{\overline{\delta_{j+1/2}[S]}}^{\,j,\,k+1/2} } 184 {\alpha_w \;\delta_{k+1/2}[T] - \beta_w \;\delta_{k+1/2}[S]} \\ 185 \end{split} 186 \] 194 187 where $\alpha$ and $\beta$, the thermal expansion and saline contraction coefficients introduced in 195 188 \autoref{subsec:TRA_bn2}, have to be evaluated at the three velocity points. … … 222 215 223 216 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 224 \begin{figure}[!ht] \begin{center} 225 \includegraphics[width=0.70\textwidth]{Fig_LDF_ZDF1} 226 \caption { \protect\label{fig:LDF_ZDF1} 227 averaging procedure for isopycnal slope computation.} 228 \end{center} \end{figure} 217 \begin{figure}[!ht] 218 \begin{center} 219 \includegraphics[width=0.70\textwidth]{Fig_LDF_ZDF1} 220 \caption { 221 \protect\label{fig:LDF_ZDF1} 222 averaging procedure for isopycnal slope computation. 223 } 224 \end{center} 225 \end{figure} 229 226 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 230 227 … … 253 250 \begin{center} 254 251 \includegraphics[width=0.70\textwidth]{Fig_eiv_slp} 255 \caption { \protect\label{fig:eiv_slp} 252 \caption{ 253 \protect\label{fig:eiv_slp} 256 254 Vertical profile of the slope used for lateral mixing in the mixed layer: 257 255 \textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior, … … 265 263 \textit{(c)} profile of slope actually used in \NEMO: a linear decrease of the slope from 266 264 zero at the surface to its ocean interior value computed just below the mixed layer. 267 Note the huge change in the slope at the base of the mixed layer between \textit{(b)} and \textit{(c)}.} 265 Note the huge change in the slope at the base of the mixed layer between \textit{(b)} and \textit{(c)}. 266 } 268 267 \end{center} 269 268 \end{figure} … … 283 282 $i.e.$ \autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso} : 284 283 285 \begin{equation} \label{eq:ldfslp_dyn} 286 \begin{aligned} 287 &r_{1t}\ \ = \overline{r_{1u}}^{\,i} &&& r_{1f}\ \ &= \overline{r_{1u}}^{\,i+1/2} \\ 288 &r_{2f} \ \ = \overline{r_{2v}}^{\,j+1/2} &&& r_{2t}\ &= \overline{r_{2v}}^{\,j} \\ 289 &r_{1uw} = \overline{r_{1w}}^{\,i+1/2} &&\ \ \text{and} \ \ & r_{1vw}&= \overline{r_{1w}}^{\,j+1/2} \\ 290 &r_{2uw}= \overline{r_{2w}}^{\,j+1/2} &&& r_{2vw}&= \overline{r_{2w}}^{\,j+1/2}\\ 291 \end{aligned} 292 \end{equation} 284 \[ 285 % \label{eq:ldfslp_dyn} 286 \begin{aligned} 287 &r_{1t}\ \ = \overline{r_{1u}}^{\,i} &&& r_{1f}\ \ &= \overline{r_{1u}}^{\,i+1/2} \\ 288 &r_{2f} \ \ = \overline{r_{2v}}^{\,j+1/2} &&& r_{2t}\ &= \overline{r_{2v}}^{\,j} \\ 289 &r_{1uw} = \overline{r_{1w}}^{\,i+1/2} &&\ \ \text{and} \ \ & r_{1vw}&= \overline{r_{1w}}^{\,j+1/2} \\ 290 &r_{2uw}= \overline{r_{2w}}^{\,j+1/2} &&& r_{2vw}&= \overline{r_{2w}}^{\,j+1/2}\\ 291 \end{aligned} 292 \] 293 293 294 294 The major issue remaining is in the specification of the boundary conditions. … … 353 353 By default the horizontal variation of the eddy coefficient depends on the local mesh size and 354 354 the type of operator used: 355 \begin{equation} \label{eq:title} 356 A_l = \left\{ 357 \begin{aligned} 358 & \frac{\max(e_1,e_2)}{e_{max}} A_o^l & \text{for laplacian operator } \\ 359 & \frac{\max(e_1,e_2)^{3}}{e_{max}^{3}} A_o^l & \text{for bilaplacian operator } 360 \end{aligned} \right. 355 \begin{equation} 356 \label{eq:title} 357 A_l = \left\{ 358 \begin{aligned} 359 & \frac{\max(e_1,e_2)}{e_{max}} A_o^l & \text{for laplacian operator } \\ 360 & \frac{\max(e_1,e_2)^{3}}{e_{max}^{3}} A_o^l & \text{for bilaplacian operator } 361 \end{aligned} 362 \right. 361 363 \end{equation} 362 364 where $e_{max}$ is the maximum of $e_1$ and $e_2$ taken over the whole masked ocean domain, … … 393 395 This specification is actually used when an ORCA key and both \key{traldf\_eiv} and \key{traldf\_c2d} are defined. 394 396 395 $\ $\newline % force a new ligne396 397 397 The following points are relevant when the eddy coefficient varies spatially: 398 398 … … 439 439 GM diffusivity $A_e$ are directly set by \np{rn\_aeih\_0} and \np{rn\_aeiv\_0}. 440 440 If 2D-varying coefficients are set with \key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal 441 scale factor according to \autoref{eq:title} \footnote{ 441 scale factor according to \autoref{eq:title} 442 \footnote{ 442 443 Except in global ORCA $0.5^{\circ}$ runs with \key{traldf\_eiv}, 443 444 where $A_l$ is set like $A_e$ but with a minimum vale of $100\;\mathrm{m}^2\;\mathrm{s}^{-1}$ … … 445 446 In idealised setups with \key{traldf\_c2d}, $A_e$ is reduced similarly, but if \key{traldf\_eiv} is set in 446 447 the global configurations with \key{traldf\_c2d}, a horizontally varying $A_e$ is instead set from 447 the Held-Larichev parameterisation \footnote{ 448 the Held-Larichev parameterisation 449 \footnote{ 448 450 In this case, $A_e$ at low latitudes $|\theta|<20^{\circ}$ is further reduced by a factor $|f/f_{20}|$, 449 451 where $f_{20}$ is the value of $f$ at $20^{\circ}$~N … … 458 460 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $s$-coordinates. 459 461 The eddy induced velocity is given by: 460 \begin{equation} \label{eq:ldfeiv} 461 \begin{split} 462 u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\ 463 v^* & = \frac{1}{e_{1u}e_{3v}}\; \delta_k \left[e_{1v} \, A_{vw}^{eiv} \; \overline{r_{2w}}^{\,j+1/2} \right]\\ 464 w^* & = \frac{1}{e_{1w}e_{2w}}\; \left\{ \delta_i \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right] + \delta_j \left[e_{1v} \, A_{vw}^{eiv} \; \overline{r_{2w}}^{\,j+1/2} \right] \right\} \\ 465 \end{split} 462 \begin{equation} 463 \label{eq:ldfeiv} 464 \begin{split} 465 u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\ 466 v^* & = \frac{1}{e_{1u}e_{3v}}\; \delta_k \left[e_{1v} \, A_{vw}^{eiv} \; \overline{r_{2w}}^{\,j+1/2} \right]\\ 467 w^* & = \frac{1}{e_{1w}e_{2w}}\; \left\{ \delta_i \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right] + \delta_j \left[e_{1v} \, A_{vw}^{eiv} \; \overline{r_{2w}}^{\,j+1/2} \right] \right\} \\ 468 \end{split} 466 469 \end{equation} 467 470 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{rn\_aeiv}, … … 479 482 and thus the advective eddy fluxes of heat and salt, are set to zero. 480 483 481 482 484 \biblio 483 485 484 486 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_OBS.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 11 12 \minitoc 12 13 13 14 14 \newpage 15 $\ $\newline % force a new line16 15 17 16 The observation and model comparison code (OBS) reads in observation files … … 573 572 574 573 \subsubsection{Horizontal interpolation} 574 575 575 Consider an observation point ${\rm P}$ with with longitude and latitude $({\lambda_{}}_{\rm P}, \phi_{\rm P})$ and 576 576 the four nearest neighbouring model grid points ${\rm A}$, ${\rm B}$, ${\rm C}$ and ${\rm D}$ with … … 578 578 All horizontal interpolation methods implemented in NEMO estimate the value of a model variable $x$ at point $P$ as 579 579 a weighted linear combination of the values of the model variables at the grid points ${\rm A}$, ${\rm B}$ etc.: 580 \begin{ eqnarray}581 {x_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & 582 \frac{1}{w} \left( {w_{}}_{\rm A} {x_{}}_{\rm A} + 583 {w_{}}_{\rm B} {x_{}}_{\rm B} +584 {w_{}}_{\rm C} {x_{}}_{\rm C} +585 {w_{}}_{\rm D} {x_{}}_{\rm D} \right)586 \end{ eqnarray}580 \begin{align*} 581 {x_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & 582 \frac{1}{w} \left( {w_{}}_{\rm A} {x_{}}_{\rm A} + 583 {w_{}}_{\rm B} {x_{}}_{\rm B} + 584 {w_{}}_{\rm C} {x_{}}_{\rm C} + 585 {w_{}}_{\rm D} {x_{}}_{\rm D} \right) 586 \end{align*} 587 587 where ${w_{}}_{\rm A}$, ${w_{}}_{\rm B}$ etc. are the respective weights for the model field at 588 588 points ${\rm A}$, ${\rm B}$ etc., and $w = {w_{}}_{\rm A} + {w_{}}_{\rm B} + {w_{}}_{\rm C} + {w_{}}_{\rm D}$. … … 597 597 For example, the weight given to the field ${x_{}}_{\rm A}$ is specified as the product of the distances 598 598 from ${\rm P}$ to the other points: 599 \begin{eqnarray} 600 {w_{}}_{\rm A} = s({\rm P}, {\rm B}) \, s({\rm P}, {\rm C}) \, s({\rm P}, {\rm D}) 601 \nonumber 602 \end{eqnarray} 599 \begin{align*} 600 {w_{}}_{\rm A} = s({\rm P}, {\rm B}) \, s({\rm P}, {\rm C}) \, s({\rm P}, {\rm D}) 601 \end{align*} 603 602 where 604 \begin{ eqnarray}605 s\left ({\rm P}, {\rm M} \right )603 \begin{align*} 604 s\left ({\rm P}, {\rm M} \right ) 606 605 & \hspace{-2mm} = \hspace{-2mm} & 607 606 \cos^{-1} \! \left\{ … … 610 609 \cos ({\lambda_{}}_{\rm M} - {\lambda_{}}_{\rm P}) 611 610 \right\} 612 \end{ eqnarray}611 \end{align*} 613 612 and $M$ corresponds to $B$, $C$ or $D$. 614 613 A more stable form of the great-circle distance formula for small distances ($x$ near 1) 615 614 involves the arcsine function ($e.g.$ see p.~101 of \citet{Daley_Barker_Bk01}: 616 \begin{eqnarray} 617 s\left( {\rm P}, {\rm M} \right) 618 & \hspace{-2mm} = \hspace{-2mm} & 619 \sin^{-1} \! \left\{ \sqrt{ 1 - x^2 } \right\} 620 \nonumber 621 \end{eqnarray} 615 \begin{align*} 616 s\left( {\rm P}, {\rm M} \right) & \hspace{-2mm} = \hspace{-2mm} & \sin^{-1} \! \left\{ \sqrt{ 1 - x^2 } \right\} 617 \end{align*} 622 618 where 623 \begin{eqnarray} 624 x & \hspace{-2mm} = \hspace{-2mm} & 625 {a_{}}_{\rm M} {a_{}}_{\rm P} + {b_{}}_{\rm M} {b_{}}_{\rm P} + {c_{}}_{\rm M} {c_{}}_{\rm P} 626 \nonumber 627 \end{eqnarray} 619 \begin{align*} 620 x & \hspace{-2mm} = \hspace{-2mm} & 621 {a_{}}_{\rm M} {a_{}}_{\rm P} + {b_{}}_{\rm M} {b_{}}_{\rm P} + {c_{}}_{\rm M} {c_{}}_{\rm P} 622 \end{align*} 628 623 and 629 \begin{eqnarray} 630 {a_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\rm M}, 631 \nonumber \\ 632 {a_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\rm P}, 633 \nonumber \\ 634 {b_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm M} \cos {\phi_{}}_{\rm M}, 635 \nonumber \\ 636 {b_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm P} \cos {\phi_{}}_{\rm P}, 637 \nonumber \\ 638 {c_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm M} \sin {\phi_{}}_{\rm M}, 639 \nonumber \\ 624 \begin{align*} 625 {a_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\rm M}, \\ 626 {a_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\rm P}, \\ 627 {b_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm M} \cos {\phi_{}}_{\rm M}, \\ 628 {b_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm P} \cos {\phi_{}}_{\rm P}, \\ 629 {c_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm M} \sin {\phi_{}}_{\rm M}, \\ 640 630 {c_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm P} \sin {\phi_{}}_{\rm P}. 641 \nonumber 642 \nonumber 643 \end{eqnarray} 631 \end{align*} 644 632 645 633 \item[2.] {\bf Great-Circle distance-weighted interpolation with small angle approximation.} 646 634 Similar to the previous interpolation but with the distance $s$ computed as 647 \begin{ eqnarray}648 s\left( {\rm P}, {\rm M} \right) 649 & \hspace{-2mm} = \hspace{-2mm} &650 \sqrt{ \left( {\phi_{}}_{\rm M} - {\phi_{}}_{\rm P} \right)^{2}651 + \left( {\lambda_{}}_{\rm M} - {\lambda_{}}_{\rm P} \right)^{2}652 \cos^{2} {\phi_{}}_{\rm M} }653 \end{ eqnarray}635 \begin{align*} 636 s\left( {\rm P}, {\rm M} \right) 637 & \hspace{-2mm} = \hspace{-2mm} & 638 \sqrt{ \left( {\phi_{}}_{\rm M} - {\phi_{}}_{\rm P} \right)^{2} 639 + \left( {\lambda_{}}_{\rm M} - {\lambda_{}}_{\rm P} \right)^{2} 640 \cos^{2} {\phi_{}}_{\rm M} } 641 \end{align*} 654 642 where $M$ corresponds to $A$, $B$, $C$ or $D$. 655 643 … … 688 676 689 677 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 690 \begin{figure} \begin{center} 691 \includegraphics[width=0.90\textwidth]{Fig_OBS_avg_rec} 692 \caption{ \protect\label{fig:obsavgrec} 693 Weights associated with each model grid box (blue lines and numbers) 694 for an observation at -170.5E, 56.0N with a rectangular footprint of 1\deg x 1\deg.} 695 \end{center} \end{figure} 678 \begin{figure} 679 \begin{center} 680 \includegraphics[width=0.90\textwidth]{Fig_OBS_avg_rec} 681 \caption{ 682 \protect\label{fig:obsavgrec} 683 Weights associated with each model grid box (blue lines and numbers) 684 for an observation at -170.5E, 56.0N with a rectangular footprint of 1\deg x 1\deg. 685 } 686 \end{center} 687 \end{figure} 696 688 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 697 689 698 690 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 699 \begin{figure} \begin{center} 700 \includegraphics[width=0.90\textwidth]{Fig_OBS_avg_rad} 701 \caption{ \protect\label{fig:obsavgrad} 702 Weights associated with each model grid box (blue lines and numbers) 703 for an observation at -170.5E, 56.0N with a radial footprint with diameter 1\deg.} 704 \end{center} \end{figure} 691 \begin{figure} 692 \begin{center} 693 \includegraphics[width=0.90\textwidth]{Fig_OBS_avg_rad} 694 \caption{ 695 \protect\label{fig:obsavgrad} 696 Weights associated with each model grid box (blue lines and numbers) 697 for an observation at -170.5E, 56.0N with a radial footprint with diameter 1\deg. 698 } 699 \end{center} 700 \end{figure} 705 701 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 706 702 … … 719 715 denote the bottom left, bottom right, top left and top right corner points of the cell, respectively. 720 716 To determine if P is inside the cell, we verify that the cross-products 721 \begin{ eqnarray}722 \begin{array}{lllll}723 {{\bf r}_{}}_{\rm PA} \times {{\bf r}_{}}_{\rm PC}724 & = & [({\lambda_{}}_{\rm A}\; -\; {\lambda_{}}_{\rm P} )725 ({\phi_{}}_{\rm C} \; -\; {\phi_{}}_{\rm P} )726 - ({\lambda_{}}_{\rm C}\; -\; {\lambda_{}}_{\rm P} )727 ({\phi_{}}_{\rm A} \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\728 {{\bf r}_{}}_{\rm PB} \times {{\bf r}_{}}_{\rm PA}729 & = & [({\lambda_{}}_{\rm B}\; -\; {\lambda_{}}_{\rm P} )730 ({\phi_{}}_{\rm A} \; -\; {\phi_{}}_{\rm P} )731 - ({\lambda_{}}_{\rm A}\; -\; {\lambda_{}}_{\rm P} )732 ({\phi_{}}_{\rm B} \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\733 {{\bf r}_{}}_{\rm PC} \times {{\bf r}_{}}_{\rm PD}734 & = & [({\lambda_{}}_{\rm C}\; -\; {\lambda_{}}_{\rm P} )735 ({\phi_{}}_{\rm D} \; -\; {\phi_{}}_{\rm P} )736 - ({\lambda_{}}_{\rm D}\; -\; {\lambda_{}}_{\rm P} )737 ({\phi_{}}_{\rm C} \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\738 {{\bf r}_{}}_{\rm PD} \times {{\bf r}_{}}_{\rm PB}739 & = & [({\lambda_{}}_{\rm D}\; -\; {\lambda_{}}_{\rm P} )740 ({\phi_{}}_{\rm B} \; -\; {\phi_{}}_{\rm P} )741 - ({\lambda_{}}_{\rm B}\; -\; {\lambda_{}}_{\rm P} )742 ({\phi_{}}_{\rm D} \; - \; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\743 \end{array}744 \label{eq:cross}745 \end{ eqnarray}717 \begin{align*} 718 \begin{array}{lllll} 719 {{\bf r}_{}}_{\rm PA} \times {{\bf r}_{}}_{\rm PC} 720 & = & [({\lambda_{}}_{\rm A}\; -\; {\lambda_{}}_{\rm P} ) 721 ({\phi_{}}_{\rm C} \; -\; {\phi_{}}_{\rm P} ) 722 - ({\lambda_{}}_{\rm C}\; -\; {\lambda_{}}_{\rm P} ) 723 ({\phi_{}}_{\rm A} \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\ 724 {{\bf r}_{}}_{\rm PB} \times {{\bf r}_{}}_{\rm PA} 725 & = & [({\lambda_{}}_{\rm B}\; -\; {\lambda_{}}_{\rm P} ) 726 ({\phi_{}}_{\rm A} \; -\; {\phi_{}}_{\rm P} ) 727 - ({\lambda_{}}_{\rm A}\; -\; {\lambda_{}}_{\rm P} ) 728 ({\phi_{}}_{\rm B} \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\ 729 {{\bf r}_{}}_{\rm PC} \times {{\bf r}_{}}_{\rm PD} 730 & = & [({\lambda_{}}_{\rm C}\; -\; {\lambda_{}}_{\rm P} ) 731 ({\phi_{}}_{\rm D} \; -\; {\phi_{}}_{\rm P} ) 732 - ({\lambda_{}}_{\rm D}\; -\; {\lambda_{}}_{\rm P} ) 733 ({\phi_{}}_{\rm C} \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\ 734 {{\bf r}_{}}_{\rm PD} \times {{\bf r}_{}}_{\rm PB} 735 & = & [({\lambda_{}}_{\rm D}\; -\; {\lambda_{}}_{\rm P} ) 736 ({\phi_{}}_{\rm B} \; -\; {\phi_{}}_{\rm P} ) 737 - ({\lambda_{}}_{\rm B}\; -\; {\lambda_{}}_{\rm P} ) 738 ({\phi_{}}_{\rm D} \; - \; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\ 739 \end{array} 740 % \label{eq:cross} 741 \end{align*} 746 742 point in the opposite direction to the unit normal $\widehat{\bf k}$ 747 743 (i.e., that the coefficients of $\widehat{\bf k}$ are negative), … … 774 770 775 771 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 776 \begin{figure} \begin{center} 777 \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_local} 778 \caption{ \protect\label{fig:obslocal} 779 Example of the distribution of observations with the geographical distribution of observational data.} 780 \end{center} \end{figure} 772 \begin{figure} 773 \begin{center} 774 \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_local} 775 \caption{ 776 \protect\label{fig:obslocal} 777 Example of the distribution of observations with the geographical distribution of observational data. 778 } 779 \end{center} 780 \end{figure} 781 781 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 782 782 … … 799 799 800 800 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 801 \begin{figure} \begin{center} 802 \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_global} 803 \caption{ \protect\label{fig:obsglobal} 804 Example of the distribution of observations with the round-robin distribution of observational data.} 805 \end{center} \end{figure} 801 \begin{figure} 802 \begin{center} 803 \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_global} 804 \caption{ 805 \protect\label{fig:obsglobal} 806 Example of the distribution of observations with the round-robin distribution of observational data. 807 } 808 \end{center} 809 \end{figure} 806 810 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 807 811 … … 1153 1157 This technique has not been used before so experimentation is needed before results can be trusted. 1154 1158 1155 1156 1157 1158 1159 \newpage 1159 1160 … … 1367 1368 1368 1369 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1369 \begin{figure} \begin{center} 1370 %\includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_OBS_dataplot_main} 1371 \includegraphics[width=9cm,angle=-90.]{Fig_OBS_dataplot_main} 1372 \caption{ \protect\label{fig:obsdataplotmain} 1373 Main window of dataplot.} 1374 \end{center} \end{figure} 1370 \begin{figure} 1371 \begin{center} 1372 % \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_OBS_dataplot_main} 1373 \includegraphics[width=9cm,angle=-90.]{Fig_OBS_dataplot_main} 1374 \caption{ 1375 \protect\label{fig:obsdataplotmain} 1376 Main window of dataplot. 1377 } 1378 \end{center} 1379 \end{figure} 1375 1380 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1376 1381 … … 1379 1384 1380 1385 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1381 \begin{figure} \begin{center} 1382 %\includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_OBS_dataplot_prof} 1383 \includegraphics[width=7cm,angle=-90.]{Fig_OBS_dataplot_prof} 1384 \caption{ \protect\label{fig:obsdataplotprofile} 1385 Profile plot from dataplot produced by right clicking on a point in the main window.} 1386 \end{center} \end{figure} 1386 \begin{figure} 1387 \begin{center} 1388 % \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_OBS_dataplot_prof} 1389 \includegraphics[width=7cm,angle=-90.]{Fig_OBS_dataplot_prof} 1390 \caption{ 1391 \protect\label{fig:obsdataplotprofile} 1392 Profile plot from dataplot produced by right clicking on a point in the main window. 1393 } 1394 \end{center} 1395 \end{figure} 1387 1396 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1388 1397 1389 1390 1398 \biblio 1391 1399 1392 1400 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_SBC.tex
r10377 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 9 10 10 11 \newpage 11 $\ $\newline % force a new ligne 12 12 13 %---------------------------------------namsbc-------------------------------------------------- 13 14 14 15 \nlst{namsbc} 15 16 %-------------------------------------------------------------------------------------------------------------- 16 $\ $\newline % force a new ligne17 17 18 18 The ocean needs six fields as surface boundary condition: 19 19 \begin{itemize} 20 20 \item 21 the two components of the surface ocean stress $\left( {\tau _u \;,\;\tau_v} \right)$21 the two components of the surface ocean stress $\left( {\tau_u \;,\;\tau_v} \right)$ 22 22 \item 23 23 the incoming solar and non solar heat fluxes $\left( {Q_{ns} \;,\;Q_{sr} } \right)$ … … 161 161 162 162 %-------------------------------------------------TABLE--------------------------------------------------- 163 \begin{table}[tb] \begin{center} \begin{tabular}{|l|l|l|l|} 164 \hline 165 Variable description & Model variable & Units & point \\ \hline 166 i-component of the surface current & ssu\_m & $m.s^{-1}$ & U \\ \hline 167 j-component of the surface current & ssv\_m & $m.s^{-1}$ & V \\ \hline 168 Sea surface temperature & sst\_m & \r{}$K$ & T \\ \hline 169 Sea surface salinty & sss\_m & $psu$ & T \\ \hline 170 \end{tabular} 171 \caption{ \protect\label{tab:ssm} 172 Ocean variables provided by the ocean to the surface module (SBC). 173 The variable are averaged over nn{\_}fsbc time step, 174 $i.e.$ the frequency of computation of surface fluxes.} 175 \end{center} \end{table} 163 \begin{table}[tb] 164 \begin{center} 165 \begin{tabular}{|l|l|l|l|} 166 \hline 167 Variable description & Model variable & Units & point \\ \hline 168 i-component of the surface current & ssu\_m & $m.s^{-1}$ & U \\ \hline 169 j-component of the surface current & ssv\_m & $m.s^{-1}$ & V \\ \hline 170 Sea surface temperature & sst\_m & \r{}$K$ & T \\ \hline 171 Sea surface salinty & sss\_m & $psu$ & T \\ \hline 172 \end{tabular} 173 \caption{ 174 \protect\label{tab:ssm} 175 Ocean variables provided by the ocean to the surface module (SBC). 176 The variable are averaged over nn{\_}fsbc time step, 177 $i.e.$ the frequency of computation of surface fluxes. 178 } 179 \end{center} 180 \end{table} 176 181 %-------------------------------------------------------------------------------------------------------------- 177 182 … … 239 244 240 245 %--------------------------------------------------TABLE-------------------------------------------------- 241 \begin{table}[htbp] 242 \begin{center} 243 \begin{tabular}{|l|c|c|c|} 244 \hline 245 & daily or weekLLL & monthly & yearly \\ \hline 246 \np{clim}\forcode{ = .false.} & fn\_yYYYYmMMdDD.nc & fn\_yYYYYmMM.nc & fn\_yYYYY.nc \\ \hline 247 \np{clim}\forcode{ = .true.} & not possible & fn\_m??.nc & fn \\ \hline 248 \end{tabular} 249 \end{center} 250 \caption{ \protect\label{tab:fldread} 251 naming nomenclature for climatological or interannual input file, as a function of the Open/close frequency. 252 The stem name is assumed to be 'fn'. 253 For weekly files, the 'LLL' corresponds to the first three letters of the first day of the week 254 ($i.e.$ 'sun','sat','fri','thu','wed','tue','mon'). 255 The 'YYYY', 'MM' and 'DD' should be replaced by the actual year/month/day, always coded with 4 or 2 digits. 256 Note that (1) in mpp, if the file is split over each subdomain, the suffix '.nc' is replaced by '\_PPPP.nc', 257 where 'PPPP' is the process number coded with 4 digits; 258 (2) when using AGRIF, the prefix '\_N' is added to files, where 'N' is the child grid number.} 259 \end{table} 246 \begin{table}[htbp] 247 \begin{center} 248 \begin{tabular}{|l|c|c|c|} 249 \hline 250 & daily or weekLLL & monthly & yearly \\ \hline 251 \np{clim}\forcode{ = .false.} & fn\_yYYYYmMMdDD.nc & fn\_yYYYYmMM.nc & fn\_yYYYY.nc \\ \hline 252 \np{clim}\forcode{ = .true.} & not possible & fn\_m??.nc & fn \\ \hline 253 \end{tabular} 254 \end{center} 255 \caption{ 256 \protect\label{tab:fldread} 257 naming nomenclature for climatological or interannual input file, as a function of the Open/close frequency. 258 The stem name is assumed to be 'fn'. 259 For weekly files, the 'LLL' corresponds to the first three letters of the first day of the week 260 ($i.e.$ 'sun','sat','fri','thu','wed','tue','mon'). 261 The 'YYYY', 'MM' and 'DD' should be replaced by the actual year/month/day, always coded with 4 or 2 digits. 262 Note that (1) in mpp, if the file is split over each subdomain, the suffix '.nc' is replaced by '\_PPPP.nc', 263 where 'PPPP' is the process number coded with 4 digits; 264 (2) when using AGRIF, the prefix '\_N' is added to files, where 'N' is the child grid number. 265 } 266 \end{table} 260 267 %-------------------------------------------------------------------------------------------------------------- 261 268 … … 378 385 379 386 Symbolically, the algorithm used is: 380 \ begin{equation}381 f_{m}(i,j) = f_{m}(i,j) + \sum_{k=1}^{4} {wgt(k)f(idx(src(k)))}382 \ end{equation}387 \[ 388 f_{m}(i,j) = f_{m}(i,j) + \sum_{k=1}^{4} {wgt(k)f(idx(src(k)))} 389 \] 383 390 where function idx() transforms a one dimensional index src(k) into a two dimensional index, 384 391 and wgt(1) corresponds to variable "wgt01" for example. … … 391 398 The symbolic algorithm used to calculate values on the model grid is now: 392 399 393 \begin{equation*} \begin{split} 394 f_{m}(i,j) = f_{m}(i,j) +& \sum_{k=1}^{4} {wgt(k)f(idx(src(k)))} 395 + \sum_{k=5}^{8} {wgt(k)\left.\frac{\partial f}{\partial i}\right| _{idx(src(k))} } \\ 396 +& \sum_{k=9}^{12} {wgt(k)\left.\frac{\partial f}{\partial j}\right| _{idx(src(k))} } 397 + \sum_{k=13}^{16} {wgt(k)\left.\frac{\partial ^2 f}{\partial i \partial j}\right| _{idx(src(k))} } 398 \end{split} 399 \end{equation*} 400 \[ 401 \begin{split} 402 f_{m}(i,j) = f_{m}(i,j) +& \sum_{k=1}^{4} {wgt(k)f(idx(src(k)))} 403 + \sum_{k=5}^{8} {wgt(k)\left.\frac{\partial f}{\partial i}\right| _{idx(src(k))} } \\ 404 +& \sum_{k=9}^{12} {wgt(k)\left.\frac{\partial f}{\partial j}\right| _{idx(src(k))} } 405 + \sum_{k=13}^{16} {wgt(k)\left.\frac{\partial ^2 f}{\partial i \partial j}\right| _{idx(src(k))} } 406 \end{split} 407 \] 400 408 The gradients here are taken with respect to the horizontal indices and not distances since 401 409 the spatial dependency has been absorbed into the weights. … … 638 646 639 647 %--------------------------------------------------TABLE-------------------------------------------------- 640 \begin{table}[htbp] \label{tab:CORE} 641 \begin{center} 642 \begin{tabular}{|l|c|c|c|} 643 \hline 644 Variable desciption & Model variable & Units & point \\ \hline 645 i-component of the 10m air velocity & utau & $m.s^{-1}$ & T \\ \hline 646 j-component of the 10m air velocity & vtau & $m.s^{-1}$ & T \\ \hline 647 10m air temperature & tair & \r{}$K$ & T \\ \hline 648 Specific humidity & humi & \% & T \\ \hline 649 Incoming long wave radiation & qlw & $W.m^{-2}$ & T \\ \hline 650 Incoming short wave radiation & qsr & $W.m^{-2}$ & T \\ \hline 651 Total precipitation (liquid + solid) & precip & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 652 Solid precipitation & snow & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 653 \end{tabular} 654 \end{center} 648 \begin{table}[htbp] 649 \label{tab:CORE} 650 \begin{center} 651 \begin{tabular}{|l|c|c|c|} 652 \hline 653 Variable desciption & Model variable & Units & point \\ \hline 654 i-component of the 10m air velocity & utau & $m.s^{-1}$ & T \\ \hline 655 j-component of the 10m air velocity & vtau & $m.s^{-1}$ & T \\ \hline 656 10m air temperature & tair & \r{}$K$ & T \\ \hline 657 Specific humidity & humi & \% & T \\ \hline 658 Incoming long wave radiation & qlw & $W.m^{-2}$ & T \\ \hline 659 Incoming short wave radiation & qsr & $W.m^{-2}$ & T \\ \hline 660 Total precipitation (liquid + solid) & precip & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 661 Solid precipitation & snow & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 662 \end{tabular} 663 \end{center} 655 664 \end{table} 656 665 %-------------------------------------------------------------------------------------------------------------- … … 695 704 696 705 %--------------------------------------------------TABLE-------------------------------------------------- 697 \begin{table}[htbp] \label{tab:CLIO} 698 \begin{center} 699 \begin{tabular}{|l|l|l|l|} 700 \hline 701 Variable desciption & Model variable & Units & point \\ \hline 702 i-component of the ocean stress & utau & $N.m^{-2}$ & U \\ \hline 703 j-component of the ocean stress & vtau & $N.m^{-2}$ & V \\ \hline 704 Wind speed module & vatm & $m.s^{-1}$ & T \\ \hline 705 10m air temperature & tair & \r{}$K$ & T \\ \hline 706 Specific humidity & humi & \% & T \\ \hline 707 Cloud cover & & \% & T \\ \hline 708 Total precipitation (liquid + solid) & precip & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 709 Solid precipitation & snow & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 710 \end{tabular} 711 \end{center} 706 \begin{table}[htbp] 707 \label{tab:CLIO} 708 \begin{center} 709 \begin{tabular}{|l|l|l|l|} 710 \hline 711 Variable desciption & Model variable & Units & point \\ \hline 712 i-component of the ocean stress & utau & $N.m^{-2}$ & U \\ \hline 713 j-component of the ocean stress & vtau & $N.m^{-2}$ & V \\ \hline 714 Wind speed module & vatm & $m.s^{-1}$ & T \\ \hline 715 10m air temperature & tair & \r{}$K$ & T \\ \hline 716 Specific humidity & humi & \% & T \\ \hline 717 Cloud cover & & \% & T \\ \hline 718 Total precipitation (liquid + solid) & precip & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 719 Solid precipitation & snow & $Kg.m^{-2}.s^{-1}$ & T \\ \hline 720 \end{tabular} 721 \end{center} 712 722 \end{table} 713 723 %-------------------------------------------------------------------------------------------------------------- … … 773 783 When used to force the dynamics, the atmospheric pressure is further transformed into 774 784 an equivalent inverse barometer sea surface height, $\eta_{ib}$, using: 775 \begin{equation} \label{eq:SBC_ssh_ib} 776 \eta_{ib} = - \frac{1}{g\,\rho_o} \left( P_{atm} - P_o \right) 777 \end{equation} 785 \[ 786 % \label{eq:SBC_ssh_ib} 787 \eta_{ib} = - \frac{1}{g\,\rho_o} \left( P_{atm} - P_o \right) 788 \] 778 789 where $P_{atm}$ is the atmospheric pressure and $P_o$ a reference atmospheric pressure. 779 790 A value of $101,000~N/m^2$ is used unless \np{ln\_ref\_apr} is set to true. … … 806 817 is activated if \np{ln\_tide} and \np{ln\_tide\_pot} are both set to \np{.true.} in \ngn{nam\_tide}. 807 818 This translates as an additional barotropic force in the momentum equations \ref{eq:PE_dyn} such that: 808 \begin{equation} \label{eq:PE_dyn_tides} 809 \frac{\partial {\rm {\bf U}}_h }{\partial t}= ... 810 +g\nabla (\Pi_{eq} + \Pi_{sal}) 811 \end{equation} 819 \[ 820 % \label{eq:PE_dyn_tides} 821 \frac{\partial {\rm {\bf U}}_h }{\partial t}= ... 822 +g\nabla (\Pi_{eq} + \Pi_{sal}) 823 \] 812 824 where $\Pi_{eq}$ stands for the equilibrium tidal forcing and $\Pi_{sal}$ a self-attraction and loading term (SAL). 813 825 … … 816 828 For the three types of tidal frequencies it reads: \\ 817 829 Long period tides : 818 \ begin{equation}819 \Pi_{eq}(l)=A_{l}(1+k-h)(\frac{1}{2}-\frac{3}{2}sin^{2}\phi)cos(\omega_{l}t+V_{l})820 \ end{equation}830 \[ 831 \Pi_{eq}(l)=A_{l}(1+k-h)(\frac{1}{2}-\frac{3}{2}sin^{2}\phi)cos(\omega_{l}t+V_{l}) 832 \] 821 833 diurnal tides : 822 \ begin{equation}823 \Pi_{eq}(l)=A_{l}(1+k-h)(sin 2\phi)cos(\omega_{l}t+\lambda+V_{l})824 \ end{equation}834 \[ 835 \Pi_{eq}(l)=A_{l}(1+k-h)(sin 2\phi)cos(\omega_{l}t+\lambda+V_{l}) 836 \] 825 837 Semi-diurnal tides: 826 \ begin{equation}827 \Pi_{eq}(l)=A_{l}(1+k-h)(cos^{2}\phi)cos(\omega_{l}t+2\lambda+V_{l})828 \ end{equation}838 \[ 839 \Pi_{eq}(l)=A_{l}(1+k-h)(cos^{2}\phi)cos(\omega_{l}t+2\lambda+V_{l}) 840 \] 829 841 Here $A_{l}$ is the amplitude, $\omega_{l}$ is the frequency, $\phi$ the latitude, $\lambda$ the longitude, 830 842 $V_{0l}$ a phase shift with respect to Greenwich meridian and $t$ the time. … … 837 849 (\np{ln\_read\_load=.true.}) or use a ``scalar approximation'' (\np{ln\_scal\_load=.true.}). 838 850 In the latter case, it reads:\\ 839 \ begin{equation}840 \Pi_{sal} = \beta \eta841 \ end{equation}851 \[ 852 \Pi_{sal} = \beta \eta 853 \] 842 854 where $\beta$ (\np{rn\_scal\_load}, $\approx0.09$) is a spatially constant scalar, 843 855 often chosen to minimize tidal prediction errors. … … 1207 1219 \label{subsec:SBC_wave_cdgw} 1208 1220 1209 The neutral surface drag coefficient provided from an external data source ($i.e.$ a wave 1210 model), 1221 The neutral surface drag coefficient provided from an external data source ($i.e.$ a wave model), 1211 1222 can be used by setting the logical variable \np{ln\_cdgw} \forcode{= .true.} in \ngn{namsbc} namelist. 1212 1223 Then using the routine \rou{turb\_ncar} and starting from the neutral drag coefficent provided, … … 1231 1242 The Stokes drift velocity $\mathbf{U}_{st}$ in deep water can be computed from the wave spectrum and may be written as: 1232 1243 1233 \begin{equation} \label{eq:sbc_wave_sdw} 1234 \mathbf{U}_{st} = \frac{16{\pi^3}} {g} 1235 \int_0^\infty \int_{-\pi}^{\pi} (cos{\theta},sin{\theta}) {f^3} 1236 \mathrm{S}(f,\theta) \mathrm{e}^{2kz}\,\mathrm{d}\theta {d}f 1237 \end{equation} 1244 \[ 1245 % \label{eq:sbc_wave_sdw} 1246 \mathbf{U}_{st} = \frac{16{\pi^3}} {g} 1247 \int_0^\infty \int_{-\pi}^{\pi} (cos{\theta},sin{\theta}) {f^3} 1248 \mathrm{S}(f,\theta) \mathrm{e}^{2kz}\,\mathrm{d}\theta {d}f 1249 \] 1238 1250 1239 1251 where: ${\theta}$ is the wave direction, $f$ is the wave intrinsic frequency, … … 1255 1267 \citet{Breivik_al_JPO2014}: 1256 1268 1257 \begin{equation} \label{eq:sbc_wave_sdw_0a} 1258 \mathbf{U}_{st} \cong \mathbf{U}_{st |_{z=0}} \frac{\mathrm{e}^{-2k_ez}} {1-8k_ez} 1259 \end{equation} 1269 \[ 1270 % \label{eq:sbc_wave_sdw_0a} 1271 \mathbf{U}_{st} \cong \mathbf{U}_{st |_{z=0}} \frac{\mathrm{e}^{-2k_ez}} {1-8k_ez} 1272 \] 1260 1273 1261 1274 where $k_e$ is the effective wave number which depends on the Stokes transport $T_{st}$ defined as follows: 1262 1275 1263 \begin{equation} \label{eq:sbc_wave_sdw_0b} 1264 k_e = \frac{|\mathbf{U}_{\left.st\right|_{z=0}}|} {|T_{st}|} 1265 \quad \text{and }\ 1266 T_{st} = \frac{1}{16} \bar{\omega} H_s^2 1267 \end{equation} 1276 \[ 1277 % \label{eq:sbc_wave_sdw_0b} 1278 k_e = \frac{|\mathbf{U}_{\left.st\right|_{z=0}}|} {|T_{st}|} 1279 \quad \text{and }\ 1280 T_{st} = \frac{1}{16} \bar{\omega} H_s^2 1281 \] 1268 1282 1269 1283 where $H_s$ is the significant wave height and $\omega$ is the wave frequency. … … 1273 1287 \citep{Breivik_al_OM2016}: 1274 1288 1275 \begin{equation} \label{eq:sbc_wave_sdw_1} 1276 \mathbf{U}_{st} \cong \mathbf{U}_{st |_{z=0}} \Big[exp(2k_pz)-\beta \sqrt{-2 \pi k_pz} 1277 \textit{ erf } \Big(\sqrt{-2 k_pz}\Big)\Big] 1278 \end{equation} 1289 \[ 1290 % \label{eq:sbc_wave_sdw_1} 1291 \mathbf{U}_{st} \cong \mathbf{U}_{st |_{z=0}} \Big[exp(2k_pz)-\beta \sqrt{-2 \pi k_pz} 1292 \textit{ erf } \Big(\sqrt{-2 k_pz}\Big)\Big] 1293 \] 1279 1294 1280 1295 where $erf$ is the complementary error function and $k_p$ is the peak wavenumber. … … 1288 1303 and its effect on the evolution of the sea-surface height ${\eta}$ is considered as follows: 1289 1304 1290 \begin{equation} \label{eq:sbc_wave_eta_sdw} 1291 \frac{\partial{\eta}}{\partial{t}} = 1292 -\nabla_h \int_{-H}^{\eta} (\mathbf{U} + \mathbf{U}_{st}) dz 1293 \end{equation} 1305 \[ 1306 % \label{eq:sbc_wave_eta_sdw} 1307 \frac{\partial{\eta}}{\partial{t}} = 1308 -\nabla_h \int_{-H}^{\eta} (\mathbf{U} + \mathbf{U}_{st}) dz 1309 \] 1294 1310 1295 1311 The tracer advection equation is also modified in order for Eulerian ocean models to properly account … … 1299 1315 can be formulated as follows: 1300 1316 1301 \begin{equation} \label{eq:sbc_wave_tra_sdw} 1302 \frac{\partial{c}}{\partial{t}} = 1303 - (\mathbf{U} + \mathbf{U}_{st}) \cdot \nabla{c} 1304 \end{equation} 1317 \[ 1318 % \label{eq:sbc_wave_tra_sdw} 1319 \frac{\partial{c}}{\partial{t}} = 1320 - (\mathbf{U} + \mathbf{U}_{st}) \cdot \nabla{c} 1321 \] 1305 1322 1306 1323 … … 1333 1350 So the atmospheric stress felt by the ocean circulation $\tau_{oc,a}$ can be expressed as: 1334 1351 1335 \begin{equation} \label{eq:sbc_wave_tauoc} 1336 \tau_{oc,a} = \tau_a - \tau_w 1337 \end{equation} 1352 \[ 1353 % \label{eq:sbc_wave_tauoc} 1354 \tau_{oc,a} = \tau_a - \tau_w 1355 \] 1338 1356 1339 1357 where $\tau_a$ is the atmospheric surface stress; 1340 1358 $\tau_w$ is the atmospheric stress going into the waves defined as: 1341 1359 1342 \begin{equation} \label{eq:sbc_wave_tauw} 1343 \tau_w = \rho g \int {\frac{dk}{c_p} (S_{in}+S_{nl}+S_{diss})} 1344 \end{equation} 1360 \[ 1361 % \label{eq:sbc_wave_tauw} 1362 \tau_w = \rho g \int {\frac{dk}{c_p} (S_{in}+S_{nl}+S_{diss})} 1363 \] 1345 1364 1346 1365 where: $c_p$ is the phase speed of the gravity waves, … … 1375 1394 1376 1395 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1377 \begin{figure}[!t] \begin{center} 1378 \includegraphics[width=0.8\textwidth]{Fig_SBC_diurnal} 1379 \caption{ \protect\label{fig:SBC_diurnal} 1380 Example of recontruction of the diurnal cycle variation of short wave flux from daily mean values. 1381 The reconstructed diurnal cycle (black line) is chosen as 1382 the mean value of the analytical cycle (blue line) over a time step, 1383 not as the mid time step value of the analytically cycle (red square). 1384 From \citet{Bernie_al_CD07}.} 1385 \end{center} \end{figure} 1396 \begin{figure}[!t] 1397 \begin{center} 1398 \includegraphics[width=0.8\textwidth]{Fig_SBC_diurnal} 1399 \caption{ 1400 \protect\label{fig:SBC_diurnal} 1401 Example of recontruction of the diurnal cycle variation of short wave flux from daily mean values. 1402 The reconstructed diurnal cycle (black line) is chosen as 1403 the mean value of the analytical cycle (blue line) over a time step, 1404 not as the mid time step value of the analytically cycle (red square). 1405 From \citet{Bernie_al_CD07}. 1406 } 1407 \end{center} 1408 \end{figure} 1386 1409 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1387 1410 … … 1409 1432 1410 1433 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1411 \begin{figure}[!t] \begin{center} 1412 \includegraphics[width=0.7\textwidth]{Fig_SBC_dcy} 1413 \caption{ \protect\label{fig:SBC_dcy} 1414 Example of recontruction of the diurnal cycle variation of short wave flux from 1415 daily mean values on an ORCA2 grid with a time sampling of 2~hours (from 1am to 11pm). 1416 The display is on (i,j) plane. } 1417 \end{center} \end{figure} 1434 \begin{figure}[!t] 1435 \begin{center} 1436 \includegraphics[width=0.7\textwidth]{Fig_SBC_dcy} 1437 \caption{ 1438 \protect\label{fig:SBC_dcy} 1439 Example of recontruction of the diurnal cycle variation of short wave flux from 1440 daily mean values on an ORCA2 grid with a time sampling of 2~hours (from 1am to 11pm). 1441 The display is on (i,j) plane. 1442 } 1443 \end{center} 1444 \end{figure} 1418 1445 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1419 1446 … … 1455 1482 On forced mode using a flux formulation (\np{ln\_flx}\forcode{ = .true.}), 1456 1483 a feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$: 1457 \begin{equation} \label{eq:sbc_dmp_q} 1458 Q_{ns} = Q_{ns}^o + \frac{dQ}{dT} \left( \left. T \right|_{k=1} - SST_{Obs} \right) 1459 \end{equation} 1484 \[ 1485 % \label{eq:sbc_dmp_q} 1486 Q_{ns} = Q_{ns}^o + \frac{dQ}{dT} \left( \left. T \right|_{k=1} - SST_{Obs} \right) 1487 \] 1460 1488 where SST is a sea surface temperature field (observed or climatological), 1461 1489 $T$ is the model surface layer temperature and … … 1467 1495 Converted into an equivalent freshwater flux, it takes the following expression : 1468 1496 1469 \begin{equation} \label{eq:sbc_dmp_emp} 1470 \textit{emp} = \textit{emp}_o + \gamma_s^{-1} e_{3t} \frac{ \left(\left.S\right|_{k=1}-SSS_{Obs}\right)} 1471 {\left.S\right|_{k=1}} 1497 \begin{equation} 1498 \label{eq:sbc_dmp_emp} 1499 \textit{emp} = \textit{emp}_o + \gamma_s^{-1} e_{3t} \frac{ \left(\left.S\right|_{k=1}-SSS_{Obs}\right)} 1500 {\left.S\right|_{k=1}} 1472 1501 \end{equation} 1473 1502 … … 1599 1628 % in ocean-ice models. 1600 1629 1630 \biblio 1601 1631 1602 1632 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_STO.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 13 14 \newpage 14 15 15 16 16 The stochastic parametrization module aims to explicitly simulate uncertainties in the model. 17 17 More particularly, \cite{Brankart_OM2013} has shown that, … … 23 23 The stochastic formulation of the equation of state can be written as: 24 24 \begin{equation} 25 \label{eq:eos_sto}25 \label{eq:eos_sto} 26 26 \rho = \frac{1}{2} \sum_{i=1}^m\{ \rho[T+\Delta T_i,S+\Delta S_i,p_o(z)] + \rho[T-\Delta T_i,S-\Delta S_i,p_o(z)] \} 27 27 \end{equation} … … 30 30 the scalar product of the respective local T/S gradients with random walks $\mathbf{\xi}$: 31 31 \begin{equation} 32 \label{eq:sto_pert}33 \Delta T_i = \mathbf{\xi}_i \cdot \nabla T \qquad \hbox{and} \qquad \Delta S_i = \mathbf{\xi}_i \cdot \nabla S32 \label{eq:sto_pert} 33 \Delta T_i = \mathbf{\xi}_i \cdot \nabla T \qquad \hbox{and} \qquad \Delta S_i = \mathbf{\xi}_i \cdot \nabla S 34 34 \end{equation} 35 35 $\mathbf{\xi}_i$ are produced by a first-order autoregressive processes (AR-1) with … … 53 53 54 54 \begin{equation} 55 \label{eq:autoreg}56 \xi^{(i)}_{k+1} = a^{(i)} \xi^{(i)}_k + b^{(i)} w^{(i)} + c^{(i)}55 \label{eq:autoreg} 56 \xi^{(i)}_{k+1} = a^{(i)} \xi^{(i)}_k + b^{(i)} w^{(i)} + c^{(i)} 57 57 \end{equation} 58 58 … … 67 67 and the parameters $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by: 68 68 69 \begin{equation} 70 \label{eq:ord1} 71 \left\{ 72 \begin{array}{l} 73 a^{(i)} = \varphi \\ 74 b^{(i)} = \sigma^{(i)} \sqrt{ 1 - \varphi^2 } 75 \qquad\qquad\mbox{with}\qquad\qquad 76 \varphi = \exp \left( - 1 / \tau^{(i)} \right) \\ 77 c^{(i)} = \mu^{(i)} \left( 1 - \varphi \right) \\ 78 \end{array} 79 \right. 80 \end{equation} 69 \[ 70 % \label{eq:ord1} 71 \left\{ 72 \begin{array}{l} 73 a^{(i)} = \varphi \\ 74 b^{(i)} = \sigma^{(i)} \sqrt{ 1 - \varphi^2 } \qquad\qquad\mbox{with}\qquad\qquad \varphi = \exp \left( - 1 / \tau^{(i)} \right) \\ 75 c^{(i)} = \mu^{(i)} \left( 1 - \varphi \right) \\ 76 \end{array} 77 \right. 78 \] 81 79 82 80 \item … … 86 84 and the parameters $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by: 87 85 88 \begin{equation}89 \label{eq:ord2}90 \left\{91 \begin{array}{l}92 a^{(i)} = \varphi \\93 b^{(i)} = \frac{n-1}{2(4n-3)} \sqrt{ 1 - \varphi^2 } 94 \qquad\qquad\mbox{with}\qquad\qquad95 \varphi = \exp \left( - 1 / \tau^{(i)} \right) \\96 c^{(i)} = \mu^{(i)} \left( 1 - \varphi \right) \\97 \end{array}98 \right.99 \end{equation}86 \begin{equation} 87 \label{eq:ord2} 88 \left\{ 89 \begin{array}{l} 90 a^{(i)} = \varphi \\ 91 b^{(i)} = \frac{n-1}{2(4n-3)} \sqrt{ 1 - \varphi^2 } 92 \qquad\qquad\mbox{with}\qquad\qquad 93 \varphi = \exp \left( - 1 / \tau^{(i)} \right) \\ 94 c^{(i)} = \mu^{(i)} \left( 1 - \varphi \right) \\ 95 \end{array} 96 \right. 97 \end{equation} 100 98 101 99 \end{itemize} … … 173 171 $i.e.$ when the state of the random number generator is read in the restart file. 174 172 173 \biblio 175 174 176 175 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_TRA.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 6 7 \chapter{Ocean Tracers (TRA)} 7 8 \label{chap:TRA} 9 8 10 \minitoc 9 11 … … 14 16 15 17 %\newpage 16 \vspace{2.cm}17 %$\ $\newline % force a new ligne18 18 19 19 Using the representation described in \autoref{chap:DOM}, … … 27 27 The two active tracers are potential temperature and salinity. 28 28 Their prognostic equations can be summarized as follows: 29 \ begin{equation*}30 \text{NXT} = \text{ADV}+\text{LDF}+\text{ZDF}+\text{SBC}31 32 \ end{equation*}29 \[ 30 \text{NXT} = \text{ADV}+\text{LDF}+\text{ZDF}+\text{SBC} 31 \ (+\text{QSR})\ (+\text{BBC})\ (+\text{BBL})\ (+\text{DMP}) 32 \] 33 33 34 34 NXT stands for next, referring to the time-stepping. … … 59 59 (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}\forcode{ = .true.}), as described in \autoref{chap:DIA}. 60 60 61 $\ $\newline % force a new ligne62 61 % ================================================================ 63 62 % Tracer Advection … … 74 73 $i.e.$ as the divergence of the advective fluxes. 75 74 Its discrete expression is given by : 76 \begin{equation} \label{eq:tra_adv} 77 ADV_\tau =-\frac{1}{b_t} \left( 78 \;\delta _i \left[ e_{2u}\,e_{3u} \; u\; \tau _u \right] 79 +\delta _j \left[ e_{1v}\,e_{3v} \; v\; \tau _v \right] \; \right) 80 -\frac{1}{e_{3t}} \;\delta _k \left[ w\; \tau _w \right] 75 \begin{equation} 76 \label{eq:tra_adv} 77 ADV_\tau =-\frac{1}{b_t} \left( 78 \;\delta_i \left[ e_{2u}\,e_{3u} \; u\; \tau_u \right] 79 +\delta_j \left[ e_{1v}\,e_{3v} \; v\; \tau_v \right] \; \right) 80 -\frac{1}{e_{3t}} \;\delta_k \left[ w\; \tau_w \right] 81 81 \end{equation} 82 82 where $\tau$ is either T or S, and $b_t= e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells. … … 95 95 \begin{center} 96 96 \includegraphics[width=0.9\textwidth]{Fig_adv_scheme} 97 \caption{ \protect\label{fig:adv_scheme} 97 \caption{ 98 \protect\label{fig:adv_scheme} 98 99 Schematic representation of some ways used to evaluate the tracer value at $u$-point and 99 100 the amount of tracer exchanged between two neighbouring grid points. … … 125 126 the vertical boundary condition is applied at the fixed surface $z=0$ rather than on the moving surface $z=\eta$. 126 127 There is a non-zero advective flux which is set for all advection schemes as 127 $\left. {\tau 128 $\left. {\tau_w } \right|_{k=1/2} =T_{k=1} $, 128 129 $i.e.$ the product of surface velocity (at $z=0$) by the first level tracer value. 129 130 \item[non-linear free surface:] … … 193 194 the two neighbouring $T$-point values. 194 195 For example, in the $i$-direction : 195 \begin{equation} \label{eq:tra_adv_cen2} 196 \tau _u^{cen2} =\overline T ^{i+1/2} 196 \begin{equation} 197 \label{eq:tra_adv_cen2} 198 \tau_u^{cen2} =\overline T ^{i+1/2} 197 199 \end{equation} 198 200 … … 212 214 a $4^{th}$ order interpolation, and thus depend on the four neighbouring $T$-points. 213 215 For example, in the $i$-direction: 214 \begin{equation} \label{eq:tra_adv_cen4}215 \tau _u^{cen4} 216 =\overline{ T - \frac{1}{6}\,\delta_i \left[ \delta_{i+1/2}[T] \,\right] }^{\,i+1/2}216 \begin{equation} 217 \label{eq:tra_adv_cen4} 218 \tau_u^{cen4} =\overline{ T - \frac{1}{6}\,\delta_i \left[ \delta_{i+1/2}[T] \,\right] }^{\,i+1/2} 217 219 \end{equation} 218 220 In the vertical direction (\np{nn\_cen\_v}\forcode{ = 4}), … … 238 240 239 241 At a $T$-grid cell adjacent to a boundary (coastline, bottom and surface), 240 an additional hypothesis must be made to evaluate $\tau 242 an additional hypothesis must be made to evaluate $\tau_u^{cen4}$. 241 243 This hypothesis usually reduces the order of the scheme. 242 244 Here we choose to set the gradient of $T$ across the boundary to zero. … … 258 260 a centred scheme. 259 261 For example, in the $i$-direction : 260 \begin{equation} \label{eq:tra_adv_fct} 261 \begin{split} 262 \tau _u^{ups}&= \begin{cases} 263 T_{i+1} & \text{if $\ u_{i+1/2} < 0$} \hfill \\ 264 T_i & \text{if $\ u_{i+1/2} \geq 0$} \hfill \\ 265 \end{cases} \\ 266 \\ 267 \tau _u^{fct}&=\tau _u^{ups} +c_u \;\left( {\tau _u^{cen} -\tau _u^{ups} } \right) 268 \end{split} 262 \begin{equation} 263 \label{eq:tra_adv_fct} 264 \begin{split} 265 \tau_u^{ups}&= 266 \begin{cases} 267 T_{i+1} & \text{if $\ u_{i+1/2} < 0$} \hfill \\ 268 T_i & \text{if $\ u_{i+1/2} \geq 0$} \hfill \\ 269 \end{cases} 270 \\ \\ 271 \tau_u^{fct}&=\tau_u^{ups} +c_u \;\left( {\tau_u^{cen} -\tau_u^{ups} } \right) 272 \end{split} 269 273 \end{equation} 270 274 where $c_u$ is a flux limiter function taking values between 0 and 1. … … 287 291 288 292 For stability reasons (see \autoref{chap:STP}), 289 $\tau 290 $\tau 293 $\tau_u^{cen}$ is evaluated in (\autoref{eq:tra_adv_fct}) using the \textit{now} tracer while 294 $\tau_u^{ups}$ is evaluated using the \textit{before} tracer. 291 295 In other words, the advective part of the scheme is time stepped with a leap-frog scheme 292 296 while a forward scheme is used for the diffusive part. … … 305 309 two $T$-points (\autoref{fig:adv_scheme}). 306 310 For example, in the $i$-direction : 307 \begin{equation} \label{eq:tra_adv_mus} 308 \tau _u^{mus} = \left\{ \begin{aligned} 309 &\tau _i &+ \frac{1}{2} \;\left( 1-\frac{u_{i+1/2} \;\rdt}{e_{1u}} \right) 310 &\ \widetilde{\partial _i \tau} & \quad \text{if }\;u_{i+1/2} \geqslant 0 \\ 311 &\tau _{i+1/2} &+\frac{1}{2}\;\left( 1+\frac{u_{i+1/2} \;\rdt}{e_{1u} } \right) 312 &\ \widetilde{\partial_{i+1/2} \tau } & \text{if }\;u_{i+1/2} <0 313 \end{aligned} \right. 314 \end{equation} 311 \[ 312 % \label{eq:tra_adv_mus} 313 \tau_u^{mus} = \left\{ 314 \begin{aligned} 315 &\tau_i &+ \frac{1}{2} \;\left( 1-\frac{u_{i+1/2} \;\rdt}{e_{1u}} \right) 316 &\ \widetilde{\partial _i \tau} & \quad \text{if }\;u_{i+1/2} \geqslant 0 \\ 317 &\tau_{i+1/2} &+\frac{1}{2}\;\left( 1+\frac{u_{i+1/2} \;\rdt}{e_{1u} } \right) 318 &\ \widetilde{\partial_{i+1/2} \tau } & \text{if }\;u_{i+1/2} <0 319 \end{aligned} 320 \right. 321 \] 315 322 where $\widetilde{\partial _i \tau}$ is the slope of the tracer on which a limitation is imposed to 316 323 ensure the \textit{positive} character of the scheme. 317 324 318 325 The time stepping is performed using a forward scheme, 319 that is the \textit{before} tracer field is used to evaluate $\tau 326 that is the \textit{before} tracer field is used to evaluate $\tau_u^{mus}$. 320 327 321 328 For an ocean grid point adjacent to land and where the ocean velocity is directed toward land, … … 338 345 It is an upstream-biased third order scheme based on an upstream-biased parabolic interpolation. 339 346 For example, in the $i$-direction: 340 \begin{equation} \label{eq:tra_adv_ubs} 341 \tau _u^{ubs} =\overline T ^{i+1/2}-\;\frac{1}{6} \left\{ 342 \begin{aligned} 343 &\tau"_i & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ 344 &\tau"_{i+1} & \quad \text{if }\ u_{i+1/2} < 0 345 \end{aligned} \right. 347 \begin{equation} 348 \label{eq:tra_adv_ubs} 349 \tau_u^{ubs} =\overline T ^{i+1/2}-\;\frac{1}{6} \left\{ 350 \begin{aligned} 351 &\tau"_i & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ 352 &\tau"_{i+1} & \quad \text{if }\ u_{i+1/2} < 0 353 \end{aligned} 354 \right. 346 355 \end{equation} 347 where $\tau "_i =\delta _i \left[ {\delta_{i+1/2} \left[ \tau \right]} \right]$.356 where $\tau "_i =\delta_i \left[ {\delta_{i+1/2} \left[ \tau \right]} \right]$. 348 357 349 358 This results in a dissipatively dominant (i.e. hyper-diffusive) truncation error … … 373 382 374 383 Note that it is straightforward to rewrite \autoref{eq:tra_adv_ubs} as follows: 375 \begin{equation} \label{eq:traadv_ubs2} 376 \tau _u^{ubs} = \tau _u^{cen4} + \frac{1}{12} \left\{ 377 \begin{aligned} 378 & + \tau"_i & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ 379 & - \tau"_{i+1} & \quad \text{if }\ u_{i+1/2} < 0 380 \end{aligned} \right. 381 \end{equation} 384 \[ 385 \label{eq:traadv_ubs2} 386 \tau_u^{ubs} = \tau_u^{cen4} + \frac{1}{12} \left\{ 387 \begin{aligned} 388 & + \tau"_i & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ 389 & - \tau"_{i+1} & \quad \text{if }\ u_{i+1/2} < 0 390 \end{aligned} 391 \right. 392 \] 382 393 or equivalently 383 \begin{equation} \label{eq:traadv_ubs2b} 384 u_{i+1/2} \ \tau _u^{ubs} 385 =u_{i+1/2} \ \overline{ T - \frac{1}{6}\,\delta _i\left[ \delta_{i+1/2}[T] \,\right] }^{\,i+1/2} 386 - \frac{1}{2} |u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i] 387 \end{equation} 394 \[ 395 % \label{eq:traadv_ubs2b} 396 u_{i+1/2} \ \tau_u^{ubs} 397 =u_{i+1/2} \ \overline{ T - \frac{1}{6}\,\delta_i\left[ \delta_{i+1/2}[T] \,\right] }^{\,i+1/2} 398 - \frac{1}{2} |u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i] 399 \] 388 400 389 401 \autoref{eq:traadv_ubs2} has several advantages. … … 519 531 520 532 The laplacian diffusion operator acting along the model (\textit{i,j})-surfaces is given by: 521 \begin{equation} \label{eq:tra_ldf_lap} 522 D_t^{lT} =\frac{1}{b_t} \left( \; 523 \delta _{i}\left[ A_u^{lT} \; \frac{e_{2u}\,e_{3u}}{e_{1u}} \;\delta _{i+1/2} [T] \right] 524 + \delta _{j}\left[ A_v^{lT} \; \frac{e_{1v}\,e_{3v}}{e_{2v}} \;\delta _{j+1/2} [T] \right] \;\right) 533 \begin{equation} 534 \label{eq:tra_ldf_lap} 535 D_t^{lT} =\frac{1}{b_t} \left( \; 536 \delta_{i}\left[ A_u^{lT} \; \frac{e_{2u}\,e_{3u}}{e_{1u}} \;\delta_{i+1/2} [T] \right] 537 + \delta_{j}\left[ A_v^{lT} \; \frac{e_{1v}\,e_{3v}}{e_{2v}} \;\delta_{j+1/2} [T] \right] \;\right) 525 538 \end{equation} 526 539 where $b_t$=$e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells and … … 554 567 \subsubsection{Standard rotated (bi-)laplacian operator (\protect\mdl{traldf\_iso})} 555 568 \label{subsec:TRA_ldf_iso} 569 556 570 The general form of the second order lateral tracer subgrid scale physics (\autoref{eq:PE_zdf}) 557 571 takes the following semi-discrete space form in $z$- and $s$-coordinates: 558 \begin{equation} \label{eq:tra_ldf_iso} 559 \begin{split} 560 D_T^{lT} = \frac{1}{b_t} & \left\{ \,\;\delta_i \left[ A_u^{lT} \left( 561 \frac{e_{2u}\,e_{3u}}{e_{1u}} \,\delta_{i+1/2}[T] 562 - e_{2u}\;r_{1u} \,\overline{\overline{ \delta_{k+1/2}[T] }}^{\,i+1/2,k} 563 \right) \right] \right. \\ 564 & +\delta_j \left[ A_v^{lT} \left( 565 \frac{e_{1v}\,e_{3v}}{e_{2v}} \,\delta_{j+1/2} [T] 566 - e_{1v}\,r_{2v} \,\overline{\overline{ \delta_{k+1/2} [T] }}^{\,j+1/2,k} 567 \right) \right] \\ 568 & +\delta_k \left[ A_w^{lT} \left( 569 -\;e_{2w}\,r_{1w} \,\overline{\overline{ \delta_{i+1/2} [T] }}^{\,i,k+1/2} 570 \right. \right. \\ 571 & \qquad \qquad \quad 572 - e_{1w}\,r_{2w} \,\overline{\overline{ \delta_{j+1/2} [T] }}^{\,j,k+1/2} \\ 573 & \left. {\left. { \qquad \qquad \ \ \ \left. { 574 +\;\frac{e_{1w}\,e_{2w}}{e_{3w}} \,\left( r_{1w}^2 + r_{2w}^2 \right) 575 \,\delta_{k+1/2} [T] } \right) } \right] \quad } \right\} 576 \end{split} 572 \begin{equation} 573 \label{eq:tra_ldf_iso} 574 \begin{split} 575 D_T^{lT} = \frac{1}{b_t} & \left\{ \,\;\delta_i \left[ A_u^{lT} \left( 576 \frac{e_{2u}\,e_{3u}}{e_{1u}} \,\delta_{i+1/2}[T] 577 - e_{2u}\;r_{1u} \,\overline{\overline{ \delta_{k+1/2}[T] }}^{\,i+1/2,k} 578 \right) \right] \right. \\ 579 & +\delta_j \left[ A_v^{lT} \left( 580 \frac{e_{1v}\,e_{3v}}{e_{2v}} \,\delta_{j+1/2} [T] 581 - e_{1v}\,r_{2v} \,\overline{\overline{ \delta_{k+1/2} [T] }}^{\,j+1/2,k} 582 \right) \right] \\ 583 & +\delta_k \left[ A_w^{lT} \left( 584 -\;e_{2w}\,r_{1w} \,\overline{\overline{ \delta_{i+1/2} [T] }}^{\,i,k+1/2} 585 \right. \right. \\ 586 & \qquad \qquad \quad 587 - e_{1w}\,r_{2w} \,\overline{\overline{ \delta_{j+1/2} [T] }}^{\,j,k+1/2} \\ 588 & \left. {\left. { \qquad \qquad \ \ \ \left. { 589 +\;\frac{e_{1w}\,e_{2w}}{e_{3w}} \,\left( r_{1w}^2 + r_{2w}^2 \right) 590 \,\delta_{k+1/2} [T] } \right) } \right] \quad } \right\} 591 \end{split} 577 592 \end{equation} 578 593 where $b_t$=$e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells, … … 652 667 and is based on a laplacian operator. 653 668 The vertical diffusion operator given by (\autoref{eq:PE_zdf}) takes the following semi-discrete space form: 654 \ begin{equation} \label{eq:tra_zdf}655 \begin{split}656 D^{vT}_T &= \frac{1}{e_{3t}} \; \delta_k \left[ \;\frac{A^{vT}_w}{e_{3w}} \delta_{k+1/2}[T] \;\right] 657 \\658 D^{vS}_T &= \frac{1}{e_{3t}} \; \delta_k \left[ \;\frac{A^{vS}_w}{e_{3w}} \delta_{k+1/2}[S] \;\right] 659 \end{split}660 \ end{equation}669 \[ 670 % \label{eq:tra_zdf} 671 \begin{split} 672 D^{vT}_T &= \frac{1}{e_{3t}} \; \delta_k \left[ \;\frac{A^{vT}_w}{e_{3w}} \delta_{k+1/2}[T] \;\right] \\ 673 D^{vS}_T &= \frac{1}{e_{3t}} \; \delta_k \left[ \;\frac{A^{vS}_w}{e_{3w}} \delta_{k+1/2}[S] \;\right] 674 \end{split} 675 \] 661 676 where $A_w^{vT}$ and $A_w^{vS}$ are the vertical eddy diffusivity coefficients on temperature and salinity, 662 677 respectively. … … 726 741 727 742 The surface boundary condition on temperature and salinity is applied as follows: 728 \begin{equation} \label{eq:tra_sbc} 729 \begin{aligned} 730 &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} } &\overline{ Q_{ns} }^t & \\ 731 & F^S =\frac{ 1 }{\rho _o \, \left. e_{3t} \right|_{k=1} } &\overline{ \textit{sfx} }^t & \\ 732 \end{aligned} 743 \begin{equation} 744 \label{eq:tra_sbc} 745 \begin{aligned} 746 &F^T = \frac{ 1 }{\rho_o \;C_p \,\left. e_{3t} \right|_{k=1} } &\overline{ Q_{ns} }^t & \\ 747 & F^S =\frac{ 1 }{\rho_o \, \left. e_{3t} \right|_{k=1} } &\overline{ \textit{sfx} }^t & \\ 748 \end{aligned} 733 749 \end{equation} 734 750 where $\overline{x }^t$ means that $x$ is averaged over two consecutive time steps ($t-\rdt/2$ and $t+\rdt/2$). … … 741 757 the volume of the first level. 742 758 The resulting surface boundary condition is applied as follows: 743 \begin{equation} \label{eq:tra_sbc_lin} 744 \begin{aligned} 745 &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} } 746 &\overline{ \left( Q_{ns} - \textit{emp}\;C_p\,\left. T \right|_{k=1} \right) }^t & \\ 747 % 748 & F^S =\frac{ 1 }{\rho _o \,\left. e_{3t} \right|_{k=1} } 749 &\overline{ \left( \;\textit{sfx} - \textit{emp} \;\left. S \right|_{k=1} \right) }^t & \\ 750 \end{aligned} 759 \begin{equation} 760 \label{eq:tra_sbc_lin} 761 \begin{aligned} 762 &F^T = \frac{ 1 }{\rho_o \;C_p \,\left. e_{3t} \right|_{k=1} } 763 &\overline{ \left( Q_{ns} - \textit{emp}\;C_p\,\left. T \right|_{k=1} \right) }^t & \\ 764 % 765 & F^S =\frac{ 1 }{\rho_o \,\left. e_{3t} \right|_{k=1} } 766 &\overline{ \left( \;\textit{sfx} - \textit{emp} \;\left. S \right|_{k=1} \right) }^t & \\ 767 \end{aligned} 751 768 \end{equation} 752 769 Note that an exact conservation of heat and salt content is only achieved with non-linear free surface. … … 772 789 the surface boundary condition is modified to take into account only the non-penetrative part of the surface 773 790 heat flux: 774 \begin{equation} \label{eq:PE_qsr} 775 \begin{split} 776 \frac{\partial T}{\partial t} &= {\ldots} + \frac{1}{\rho_o\, C_p \,e_3} \; \frac{\partial I}{\partial k} \\ 777 Q_{ns} &= Q_\text{Total} - Q_{sr} 778 \end{split} 791 \begin{equation} 792 \label{eq:PE_qsr} 793 \begin{split} 794 \frac{\partial T}{\partial t} &= {\ldots} + \frac{1}{\rho_o\, C_p \,e_3} \; \frac{\partial I}{\partial k} \\ 795 Q_{ns} &= Q_\text{Total} - Q_{sr} 796 \end{split} 779 797 \end{equation} 780 798 where $Q_{sr}$ is the penetrative part of the surface heat flux ($i.e.$ the shortwave radiation) and 781 799 $I$ is the downward irradiance ($\left. I \right|_{z=\eta}=Q_{sr}$). 782 800 The additional term in \autoref{eq:PE_qsr} is discretized as follows: 783 \begin{equation} \label{eq:tra_qsr} 784 \frac{1}{\rho_o\, C_p \,e_3} \; \frac{\partial I}{\partial k} \equiv \frac{1}{\rho_o\, C_p\, e_{3t}} \delta_k \left[ I_w \right] 801 \begin{equation} 802 \label{eq:tra_qsr} 803 \frac{1}{\rho_o\, C_p \,e_3} \; \frac{\partial I}{\partial k} \equiv \frac{1}{\rho_o\, C_p\, e_{3t}} \delta_k \left[ I_w \right] 785 804 \end{equation} 786 805 … … 798 817 a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths, 799 818 leading to the following expression \citep{Paulson1977}: 800 \begin{equation} \label{eq:traqsr_iradiance} 801 I(z) = Q_{sr} \left[Re^{-z / \xi_0} + \left( 1-R\right) e^{-z / \xi_1} \right] 802 \end{equation} 819 \[ 820 % \label{eq:traqsr_iradiance} 821 I(z) = Q_{sr} \left[Re^{-z / \xi_0} + \left( 1-R\right) e^{-z / \xi_1} \right] 822 \] 803 823 where $\xi_1$ is the second extinction length scale associated with the shorter wavelengths. 804 824 It is usually chosen to be 23~m by setting the \np{rn\_si0} namelist parameter. … … 857 877 \begin{center} 858 878 \includegraphics[width=1.0\textwidth]{Fig_TRA_Irradiance} 859 \caption{ \protect\label{fig:traqsr_irradiance} 879 \caption{ 880 \protect\label{fig:traqsr_irradiance} 860 881 Penetration profile of the downward solar irradiance calculated by four models. 861 882 Two waveband chlorophyll-independent formulation (blue), … … 883 904 \begin{center} 884 905 \includegraphics[width=1.0\textwidth]{Fig_TRA_geoth} 885 \caption{ \protect\label{fig:geothermal} 906 \caption{ 907 \protect\label{fig:geothermal} 886 908 Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{Emile-Geay_Madec_OS09}. 887 909 It is inferred from the age of the sea floor and the formulae of \citet{Stein_Stein_Nat92}. … … 947 969 When applying sigma-diffusion (\key{trabbl} defined and \np{nn\_bbl\_ldf} set to 1), 948 970 the diffusive flux between two adjacent cells at the ocean floor is given by 949 \begin{equation} \label{eq:tra_bbl_diff} 950 {\rm {\bf F}}_\sigma=A_l^\sigma \; \nabla_\sigma T 951 \end{equation} 971 \[ 972 % \label{eq:tra_bbl_diff} 973 {\rm {\bf F}}_\sigma=A_l^\sigma \; \nabla_\sigma T 974 \] 952 975 with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells, 953 976 and $A_l^\sigma$ the lateral diffusivity in the BBL. 954 977 Following \citet{Beckmann_Doscher1997}, the latter is prescribed with a spatial dependence, 955 978 $i.e.$ in the conditional form 956 \begin{equation} \label{eq:tra_bbl_coef} 957 A_l^\sigma (i,j,t)=\left\{ {\begin{array}{l} 958 A_{bbl} \quad \quad \mbox{if} \quad \nabla_\sigma \rho \cdot \nabla H<0 \\ 959 \\ 960 0\quad \quad \;\,\mbox{otherwise} \\ 961 \end{array}} \right. 979 \begin{equation} 980 \label{eq:tra_bbl_coef} 981 A_l^\sigma (i,j,t)=\left\{ { 982 \begin{array}{l} 983 A_{bbl} \quad \quad \mbox{if} \quad \nabla_\sigma \rho \cdot \nabla H<0 \\ \\ 984 0\quad \quad \;\,\mbox{otherwise} \\ 985 \end{array}} 986 \right. 962 987 \end{equation} 963 988 where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist parameter \np{rn\_ahtbbl} and … … 968 993 In practice, this constraint is applied separately in the two horizontal directions, 969 994 and the density gradient in \autoref{eq:tra_bbl_coef} is evaluated with the log gradient formulation: 970 \begin{equation} \label{eq:tra_bbl_Drho} 971 \nabla_\sigma \rho / \rho = \alpha \,\nabla_\sigma T + \beta \,\nabla_\sigma S 972 \end{equation} 995 \[ 996 % \label{eq:tra_bbl_Drho} 997 \nabla_\sigma \rho / \rho = \alpha \,\nabla_\sigma T + \beta \,\nabla_\sigma S 998 \] 973 999 where $\rho$, $\alpha$ and $\beta$ are functions of $\overline{T}^\sigma$, 974 1000 $\overline{S}^\sigma$ and $\overline{H}^\sigma$, the along bottom mean temperature, salinity and depth, respectively. … … 987 1013 \begin{center} 988 1014 \includegraphics[width=0.7\textwidth]{Fig_BBL_adv} 989 \caption{ \protect\label{fig:bbl} 1015 \caption{ 1016 \protect\label{fig:bbl} 990 1017 Advective/diffusive Bottom Boundary Layer. 991 1018 The BBL parameterisation is activated when $\rho^i_{kup}$ is larger than $\rho^{i+1}_{kdnw}$. … … 1024 1051 For example, the resulting transport of the downslope flow, here in the $i$-direction (\autoref{fig:bbl}), 1025 1052 is simply given by the following expression: 1026 \begin{equation} \label{eq:bbl_Utr} 1027 u^{tr}_{bbl} = \gamma \, g \frac{\Delta \rho}{\rho_o} e_{1u} \; min \left( {e_{3u}}_{kup},{e_{3u}}_{kdwn} \right) 1028 \end{equation} 1053 \[ 1054 % \label{eq:bbl_Utr} 1055 u^{tr}_{bbl} = \gamma \, g \frac{\Delta \rho}{\rho_o} e_{1u} \; min \left( {e_{3u}}_{kup},{e_{3u}}_{kdwn} \right) 1056 \] 1029 1057 where $\gamma$, expressed in seconds, is the coefficient of proportionality provided as \np{rn\_gambbl}, 1030 1058 a namelist parameter, and \textit{kup} and \textit{kdwn} are the vertical index of the higher and lower cells, … … 1043 1071 the downslope flow \autoref{eq:bbl_dw}, the horizontal \autoref{eq:bbl_hor} and 1044 1072 the upward \autoref{eq:bbl_up} return flows as follows: 1045 \begin{align} 1046 \partial_t T^{do}_{kdw} &\equiv \partial_t T^{do}_{kdw}1047 1048 %1049 \partial_t T^{sh}_{kup} &\equiv \partial_t T^{sh}_{kup} 1050 1051 %1052 \intertext{and for $k =kdw-1,\;..., \; kup$ :} 1053 %1054 \partial_t T^{do}_{k} &\equiv \partial_t S^{do}_{k}1055 1073 \begin{align} 1074 \partial_t T^{do}_{kdw} &\equiv \partial_t T^{do}_{kdw} 1075 + \frac{u^{tr}_{bbl}}{{b_t}^{do}_{kdw}} \left( T^{sh}_{kup} - T^{do}_{kdw} \right) \label{eq:bbl_dw} \\ 1076 % 1077 \partial_t T^{sh}_{kup} &\equiv \partial_t T^{sh}_{kup} 1078 + \frac{u^{tr}_{bbl}}{{b_t}^{sh}_{kup}} \left( T^{do}_{kup} - T^{sh}_{kup} \right) \label{eq:bbl_hor} \\ 1079 % 1080 \intertext{and for $k =kdw-1,\;..., \; kup$ :} 1081 % 1082 \partial_t T^{do}_{k} &\equiv \partial_t S^{do}_{k} 1083 + \frac{u^{tr}_{bbl}}{{b_t}^{do}_{k}} \left( T^{do}_{k+1} - T^{sh}_{k} \right) \label{eq:bbl_up} 1056 1084 \end{align} 1057 1085 where $b_t$ is the $T$-cell volume. … … 1071 1099 1072 1100 In some applications it can be useful to add a Newtonian damping term into the temperature and salinity equations: 1073 \begin{equation} \label{eq:tra_dmp} 1074 \begin{split} 1075 \frac{\partial T}{\partial t}=\;\cdots \;-\gamma \,\left( {T-T_o } \right) \\ 1076 \frac{\partial S}{\partial t}=\;\cdots \;-\gamma \,\left( {S-S_o } \right) 1077 \end{split} 1101 \begin{equation} 1102 \label{eq:tra_dmp} 1103 \begin{split} 1104 \frac{\partial T}{\partial t}=\;\cdots \;-\gamma \,\left( {T-T_o } \right) \\ 1105 \frac{\partial S}{\partial t}=\;\cdots \;-\gamma \,\left( {S-S_o } \right) 1106 \end{split} 1078 1107 \end{equation} 1079 1108 where $\gamma$ is the inverse of a time scale, and $T_o$ and $S_o$ are given temperature and salinity fields … … 1173 1202 The general framework for tracer time stepping is a modified leap-frog scheme \citep{Leclair_Madec_OM09}, 1174 1203 $i.e.$ a three level centred time scheme associated with a Asselin time filter (cf. \autoref{sec:STP_mLF}): 1175 \begin{equation} \label{eq:tra_nxt}1176 \begin{aligned}1177 (e_{3t}T)^{t+\rdt} &= (e_{3t}T)_f^{t-\rdt} &+ 2 \, \rdt \,e_{3t}^t\ \text{RHS}^t & \\ 1178 \\1179 (e_{3t}T)_f^t \;\ \quad &= (e_{3t}T)^t \;\quad 1180 1181 & &- \gamma\,\rdt \, \left[ Q^{t+\rdt/2} - Q^{t-\rdt/2} \right] &1182 \end{aligned}1204 \begin{equation} 1205 \label{eq:tra_nxt} 1206 \begin{aligned} 1207 (e_{3t}T)^{t+\rdt} &= (e_{3t}T)_f^{t-\rdt} &+ 2 \, \rdt \,e_{3t}^t\ \text{RHS}^t & \\ \\ 1208 (e_{3t}T)_f^t \;\ \quad &= (e_{3t}T)^t \;\quad 1209 &+\gamma \,\left[ {(e_{3t}T)_f^{t-\rdt} -2(e_{3t}T)^t+(e_{3t}T)^{t+\rdt}} \right] & \\ 1210 & &- \gamma\,\rdt \, \left[ Q^{t+\rdt/2} - Q^{t-\rdt/2} \right] & 1211 \end{aligned} 1183 1212 \end{equation} 1184 1213 where RHS is the right hand side of the temperature equation, the subscript $f$ denotes filtered values, … … 1288 1317 as well as between \textit{absolute} and \textit{practical} salinity. 1289 1318 S-EOS takes the following expression: 1290 \begin{equation} \label{eq:tra_S-EOS} 1319 \[ 1320 % \label{eq:tra_S-EOS} 1291 1321 \begin{split} 1292 1322 d_a(T,S,z) = ( & - a_0 \; ( 1 + 0.5 \; \lambda_1 \; T_a + \mu_1 \; z ) * T_a \\ … … 1295 1325 with \ \ T_a = T-10 \; ; & \; S_a = S-35 \; ;\; \rho_o = 1026~Kg/m^3 1296 1326 \end{split} 1297 \ end{equation}1327 \] 1298 1328 where the computer name of the coefficients as well as their standard value are given in \autoref{tab:SEOS}. 1299 1329 In fact, when choosing S-EOS, various approximation of EOS can be specified simply by changing the associated coefficients. … … 1306 1336 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1307 1337 \begin{table}[!tb] 1308 \begin{center} \begin{tabular}{|p{26pt}|p{72pt}|p{56pt}|p{136pt}|} 1309 \hline 1310 coeff. & computer name & S-EOS & description \\ \hline 1311 $a_0$ & \np{rn\_a0} & 1.6550 $10^{-1}$ & linear thermal expansion coeff. \\ \hline 1312 $b_0$ & \np{rn\_b0} & 7.6554 $10^{-1}$ & linear haline expansion coeff. \\ \hline 1313 $\lambda_1$ & \np{rn\_lambda1}& 5.9520 $10^{-2}$ & cabbeling coeff. in $T^2$ \\ \hline 1314 $\lambda_2$ & \np{rn\_lambda2}& 5.4914 $10^{-4}$ & cabbeling coeff. in $S^2$ \\ \hline 1315 $\nu$ & \np{rn\_nu} & 2.4341 $10^{-3}$ & cabbeling coeff. in $T \, S$ \\ \hline 1316 $\mu_1$ & \np{rn\_mu1} & 1.4970 $10^{-4}$ & thermobaric coeff. in T \\ \hline 1317 $\mu_2$ & \np{rn\_mu2} & 1.1090 $10^{-5}$ & thermobaric coeff. in S \\ \hline 1318 \end{tabular} 1319 \caption{ \protect\label{tab:SEOS} 1320 Standard value of S-EOS coefficients. 1321 } 1322 \end{center} 1338 \begin{center} 1339 \begin{tabular}{|p{26pt}|p{72pt}|p{56pt}|p{136pt}|} 1340 \hline 1341 coeff. & computer name & S-EOS & description \\ \hline 1342 $a_0$ & \np{rn\_a0} & 1.6550 $10^{-1}$ & linear thermal expansion coeff. \\ \hline 1343 $b_0$ & \np{rn\_b0} & 7.6554 $10^{-1}$ & linear haline expansion coeff. \\ \hline 1344 $\lambda_1$ & \np{rn\_lambda1}& 5.9520 $10^{-2}$ & cabbeling coeff. in $T^2$ \\ \hline 1345 $\lambda_2$ & \np{rn\_lambda2}& 5.4914 $10^{-4}$ & cabbeling coeff. in $S^2$ \\ \hline 1346 $\nu$ & \np{rn\_nu} & 2.4341 $10^{-3}$ & cabbeling coeff. in $T \, S$ \\ \hline 1347 $\mu_1$ & \np{rn\_mu1} & 1.4970 $10^{-4}$ & thermobaric coeff. in T \\ \hline 1348 $\mu_2$ & \np{rn\_mu2} & 1.1090 $10^{-5}$ & thermobaric coeff. in S \\ \hline 1349 \end{tabular} 1350 \caption{ 1351 \protect\label{tab:SEOS} 1352 Standard value of S-EOS coefficients. 1353 } 1354 \end{center} 1323 1355 \end{table} 1324 1356 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 1338 1370 (pressure in decibar being approximated by the depth in meters). 1339 1371 The expression for $N^2$ is given by: 1340 \begin{equation} \label{eq:tra_bn2} 1341 N^2 = \frac{g}{e_{3w}} \left( \beta \;\delta_{k+1/2}[S] - \alpha \;\delta_{k+1/2}[T] \right) 1342 \end{equation} 1372 \[ 1373 % \label{eq:tra_bn2} 1374 N^2 = \frac{g}{e_{3w}} \left( \beta \;\delta_{k+1/2}[S] - \alpha \;\delta_{k+1/2}[T] \right) 1375 \] 1343 1376 where $(T,S) = (\Theta, S_A)$ for TEOS10, $= (\theta, S_p)$ for TEOS-80, or $=(T,S)$ for S-EOS, 1344 1377 and, $\alpha$ and $\beta$ are the thermal and haline expansion coefficients. … … 1354 1387 1355 1388 The freezing point of seawater is a function of salinity and pressure \citep{UNESCO1983}: 1356 \begin{equation} \label{eq:tra_eos_fzp}1357 \begin{split}1358 T_f (S,p) = \left( -0.0575 + 1.710523 \;10^{-3} \, \sqrt{S} 1359 1360 - 7.53\,10^{-3} \ \ p1361 1389 \begin{equation} 1390 \label{eq:tra_eos_fzp} 1391 \begin{split} 1392 T_f (S,p) = \left( -0.0575 + 1.710523 \;10^{-3} \, \sqrt{S} - 2.154996 \;10^{-4} \,S \right) \ S \\ 1393 - 7.53\,10^{-3} \ \ p 1394 \end{split} 1362 1395 \end{equation} 1363 1396 … … 1405 1438 \begin{center} 1406 1439 \includegraphics[width=0.9\textwidth]{Fig_partial_step_scheme} 1407 \caption{ \protect\label{fig:Partial_step_scheme} 1440 \caption{ 1441 \protect\label{fig:Partial_step_scheme} 1408 1442 Discretisation of the horizontal difference and average of tracers in the $z$-partial step coordinate 1409 1443 (\protect\np{ln\_zps}\forcode{ = .true.}) in the case $( e3w_k^{i+1} - e3w_k^i )>0$. 1410 1444 A linear interpolation is used to estimate $\widetilde{T}_k^{i+1}$, 1411 1445 the tracer value at the depth of the shallower tracer point of the two adjacent bottom $T$-points. 1412 The horizontal difference is then given by: $\delta 1446 The horizontal difference is then given by: $\delta_{i+1/2} T_k= \widetilde{T}_k^{\,i+1} -T_k^{\,i}$ and 1413 1447 the average by: $\overline{T}_k^{\,i+1/2}= ( \widetilde{T}_k^{\,i+1/2} - T_k^{\,i} ) / 2$. 1414 1448 } … … 1416 1450 \end{figure} 1417 1451 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1418 \begin{equation*} 1419 \widetilde{T}= \left\{ \begin{aligned} 1420 &T^{\,i+1} -\frac{ \left( e_{3w}^{i+1} -e_{3w}^i \right)}{ e_{3w}^{i+1} }\;\delta _k T^{i+1} 1421 && \quad\text{if $\ e_{3w}^{i+1} \geq e_{3w}^i$ } \\ 1422 \\ 1423 &T^{\,i} \ \ \ \,+\frac{ \left( e_{3w}^{i+1} -e_{3w}^i \right) }{e_{3w}^i }\;\delta _k T^{i+1} 1424 && \quad\text{if $\ e_{3w}^{i+1} < e_{3w}^i$ } 1425 \end{aligned} \right. 1426 \end{equation*} 1452 \[ 1453 \widetilde{T}= \left\{ 1454 \begin{aligned} 1455 &T^{\,i+1} -\frac{ \left( e_{3w}^{i+1} -e_{3w}^i \right)}{ e_{3w}^{i+1} }\;\delta_k T^{i+1} 1456 && \quad\text{if $\ e_{3w}^{i+1} \geq e_{3w}^i$ } \\ \\ 1457 &T^{\,i} \ \ \ \,+\frac{ \left( e_{3w}^{i+1} -e_{3w}^i \right) }{e_{3w}^i }\;\delta_k T^{i+1} 1458 && \quad\text{if $\ e_{3w}^{i+1} < e_{3w}^i$ } 1459 \end{aligned} 1460 \right. 1461 \] 1427 1462 and the resulting forms for the horizontal difference and the horizontal average value of $T$ at a $U$-point are: 1428 \begin{equation} \label{eq:zps_hde} 1429 \begin{aligned} 1430 \delta _{i+1/2} T= \begin{cases} 1431 \ \ \ \widetilde {T}\quad\ -T^i & \ \ \quad\quad\text{if $\ e_{3w}^{i+1} \geq e_{3w}^i$ } \\ 1432 \\ 1433 \ \ \ T^{\,i+1}-\widetilde{T} & \ \ \quad\quad\text{if $\ e_{3w}^{i+1} < e_{3w}^i$ } 1434 \end{cases} \\ 1435 \\ 1436 \overline {T}^{\,i+1/2} \ = \begin{cases} 1437 ( \widetilde {T}\ \ \;\,-T^{\,i}) / 2 & \;\ \ \quad\text{if $\ e_{3w}^{i+1} \geq e_{3w}^i$ } \\ 1438 \\ 1439 ( T^{\,i+1}-\widetilde{T} ) / 2 & \;\ \ \quad\text{if $\ e_{3w}^{i+1} < e_{3w}^i$ } 1440 \end{cases} 1441 \end{aligned} 1463 \begin{equation} 1464 \label{eq:zps_hde} 1465 \begin{aligned} 1466 \delta_{i+1/2} T= 1467 \begin{cases} 1468 \ \ \ \widetilde {T}\quad\ -T^i & \ \ \quad\quad\text{if $\ e_{3w}^{i+1} \geq e_{3w}^i$ } \\ \\ 1469 \ \ \ T^{\,i+1}-\widetilde{T} & \ \ \quad\quad\text{if $\ e_{3w}^{i+1} < e_{3w}^i$ } 1470 \end{cases} 1471 \\ \\ 1472 \overline {T}^{\,i+1/2} \ = 1473 \begin{cases} 1474 ( \widetilde {T}\ \ \;\,-T^{\,i}) / 2 & \;\ \ \quad\text{if $\ e_{3w}^{i+1} \geq e_{3w}^i$ } \\ \\ 1475 ( T^{\,i+1}-\widetilde{T} ) / 2 & \;\ \ \quad\text{if $\ e_{3w}^{i+1} < e_{3w}^i$ } 1476 \end{cases} 1477 \end{aligned} 1442 1478 \end{equation} 1443 1479 … … 1449 1485 $T$ and $S$, and the pressure at a $u$-point 1450 1486 (in the equation of state pressure is approximated by depth, see \autoref{subsec:TRA_eos} ): 1451 \begin{equation} \label{eq:zps_hde_rho} 1452 \widetilde{\rho } = \rho ( {\widetilde{T},\widetilde {S},z_u }) 1453 \quad \text{where }\ z_u = \min \left( {z_T^{i+1} ,z_T^i } \right) 1454 \end{equation} 1487 \[ 1488 % \label{eq:zps_hde_rho} 1489 \widetilde{\rho } = \rho ( {\widetilde{T},\widetilde {S},z_u }) 1490 \quad \text{where }\ z_u = \min \left( {z_T^{i+1} ,z_T^i } \right) 1491 \] 1455 1492 1456 1493 This is a much better approximation as the variation of $\rho$ with depth (and thus pressure) … … 1471 1508 \gmcomment{gm : this last remark has to be done} 1472 1509 %%% 1510 1511 \biblio 1512 1473 1513 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_ZDF.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ … … 6 7 \chapter{Vertical Ocean Physics (ZDF)} 7 8 \label{chap:ZDF} 9 8 10 \minitoc 9 11 10 12 %gm% Add here a small introduction to ZDF and naming of the different physics (similar to what have been written for TRA and DYN. 11 13 12 13 14 \newpage 14 $\ $\newline % force a new ligne15 16 15 17 16 % ================================================================ … … 60 59 It is recommended that this option is only used in process studies, not in basin scale simulations. 61 60 Typical values used in this case are: 62 \begin{align*} 63 A_u^{vm} = A_v^{vm} &= 1.2\ 10^{-4}~m^2.s^{-1} \\64 A^{vT} = A^{vS} &= 1.2\ 10^{-5}~m^2.s^{-1}61 \begin{align*} 62 A_u^{vm} = A_v^{vm} &= 1.2\ 10^{-4}~m^2.s^{-1} \\ 63 A^{vT} = A^{vS} &= 1.2\ 10^{-5}~m^2.s^{-1} 65 64 \end{align*} 66 65 … … 69 68 that is $\sim10^{-6}~m^2.s^{-1}$ for momentum, $\sim10^{-7}~m^2.s^{-1}$ for temperature and 70 69 $\sim10^{-9}~m^2.s^{-1}$ for salinity. 71 72 70 73 71 % ------------------------------------------------------------------------------------------------------------- … … 90 88 ($i.e.$ the ratio of stratification to vertical shear). 91 89 Following \citet{Pacanowski_Philander_JPO81}, the following formulation has been implemented: 92 \begin{equation} \label{eq:zdfric} 93 \left\{ \begin{aligned} 94 A^{vT} &= \frac {A_{ric}^{vT}}{\left( 1+a \; Ri \right)^n} + A_b^{vT} \\ 95 A^{vm} &= \frac{A^{vT} }{\left( 1+ a \;Ri \right) } + A_b^{vm} 96 \end{aligned} \right. 97 \end{equation} 90 \[ 91 % \label{eq:zdfric} 92 \left\{ 93 \begin{aligned} 94 A^{vT} &= \frac {A_{ric}^{vT}}{\left( 1+a \; Ri \right)^n} + A_b^{vT} \\ 95 A^{vm} &= \frac{A^{vT} }{\left( 1+ a \;Ri \right) } + A_b^{vm} 96 \end{aligned} 97 \right. 98 \] 98 99 where $Ri = N^2 / \left(\partial_z \textbf{U}_h \right)^2$ is the local Richardson number, 99 100 $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}), … … 111 112 112 113 This depth is assumed proportional to the "depth of frictional influence" that is limited by rotation: 113 \ begin{equation}114 h_{e} = Ek \frac {u^{*}} {f_{0}}115 \ end{equation}114 \[ 115 h_{e} = Ek \frac {u^{*}} {f_{0}} 116 \] 116 117 where, $Ek$ is an empirical parameter, $u^{*}$ is the friction velocity and $f_{0}$ is the Coriolis parameter. 117 118 118 119 In this similarity height relationship, the turbulent friction velocity: 119 \ begin{equation}120 u^{*} = \sqrt \frac {|\tau|} {\rho_o}121 \ end{equation}120 \[ 121 u^{*} = \sqrt \frac {|\tau|} {\rho_o} 122 \] 122 123 is computed from the wind stress vector $|\tau|$ and the reference density $ \rho_o$. 123 124 The final $h_{e}$ is further constrained by the adjustable bounds \np{rn\_mldmin} and \np{rn\_mldmax}. … … 146 147 The time evolution of $\bar{e}$ is the result of the production of $\bar{e}$ through vertical shear, 147 148 its destruction through stratification, its vertical diffusion, and its dissipation of \citet{Kolmogorov1942} type: 148 \begin{equation} \label{eq:zdftke_e} 149 \frac{\partial \bar{e}}{\partial t} = 150 \frac{K_m}{{e_3}^2 }\;\left[ {\left( {\frac{\partial u}{\partial k}} \right)^2 151 +\left( {\frac{\partial v}{\partial k}} \right)^2} \right] 152 -K_\rho\,N^2 153 +\frac{1}{e_3} \;\frac{\partial }{\partial k}\left[ {\frac{A^{vm}}{e_3 } 154 \;\frac{\partial \bar{e}}{\partial k}} \right] 155 - c_\epsilon \;\frac{\bar {e}^{3/2}}{l_\epsilon } 149 \begin{equation} 150 \label{eq:zdftke_e} 151 \frac{\partial \bar{e}}{\partial t} = 152 \frac{K_m}{{e_3}^2 }\;\left[ {\left( {\frac{\partial u}{\partial k}} \right)^2 153 +\left( {\frac{\partial v}{\partial k}} \right)^2} \right] 154 -K_\rho\,N^2 155 +\frac{1}{e_3} \;\frac{\partial }{\partial k}\left[ {\frac{A^{vm}}{e_3 } 156 \;\frac{\partial \bar{e}}{\partial k}} \right] 157 - c_\epsilon \;\frac{\bar {e}^{3/2}}{l_\epsilon } 156 158 \end{equation} 157 \begin{equation} \label{eq:zdftke_kz} 158 \begin{split} 159 K_m &= C_k\ l_k\ \sqrt {\bar{e}\; } \\ 160 K_\rho &= A^{vm} / P_{rt} 161 \end{split} 162 \end{equation} 159 \[ 160 % \label{eq:zdftke_kz} 161 \begin{split} 162 K_m &= C_k\ l_k\ \sqrt {\bar{e}\; } \\ 163 K_\rho &= A^{vm} / P_{rt} 164 \end{split} 165 \] 163 166 where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}), 164 167 $l_{\epsilon }$ and $l_{\kappa }$ are the dissipation and mixing length scales, … … 168 171 They are set through namelist parameters \np{nn\_ediff} and \np{nn\_ediss}. 169 172 $P_{rt}$ can be set to unity or, following \citet{Blanke1993}, be a function of the local Richardson number, $R_i$: 170 \begin{align*} \label{eq:prt} 171 P_{rt} = \begin{cases} 172 \ \ \ 1 & \text{if $\ R_i \leq 0.2$} \\ 173 5\,R_i & \text{if $\ 0.2 \leq R_i \leq 2$} \\ 174 \ \ 10 & \text{if $\ 2 \leq R_i$} 175 \end{cases} 173 \begin{align*} 174 % \label{eq:prt} 175 P_{rt} = 176 \begin{cases} 177 \ \ \ 1 & \text{if $\ R_i \leq 0.2$} \\ 178 5\,R_i & \text{if $\ 0.2 \leq R_i \leq 2$} \\ 179 \ \ 10 & \text{if $\ 2 \leq R_i$} 180 \end{cases} 176 181 \end{align*} 177 182 Options are defined through the \ngn{namzdfy\_tke} namelist variables. … … 195 200 196 201 \subsubsection{Turbulent length scale} 202 197 203 For computational efficiency, the original formulation of the turbulent length scales proposed by 198 204 \citet{Gaspar1990} has been simplified. 199 205 Four formulations are proposed, the choice of which is controlled by the \np{nn\_mxl} namelist parameter. 200 206 The first two are based on the following first order approximation \citep{Blanke1993}: 201 \begin{equation} \label{eq:tke_mxl0_1} 202 l_k = l_\epsilon = \sqrt {2 \bar{e}\; } / N 207 \begin{equation} 208 \label{eq:tke_mxl0_1} 209 l_k = l_\epsilon = \sqrt {2 \bar{e}\; } / N 203 210 \end{equation} 204 211 which is valid in a stable stratified region with constant values of the Brunt-Vais\"{a}l\"{a} frequency. … … 211 218 which add an extra assumption concerning the vertical gradient of the computed length scale. 212 219 So, the length scales are first evaluated as in \autoref{eq:tke_mxl0_1} and then bounded such that: 213 \begin{equation} \label{eq:tke_mxl_constraint} 214 \frac{1}{e_3 }\left| {\frac{\partial l}{\partial k}} \right| \leq 1 215 \qquad \text{with }\ l = l_k = l_\epsilon 220 \begin{equation} 221 \label{eq:tke_mxl_constraint} 222 \frac{1}{e_3 }\left| {\frac{\partial l}{\partial k}} \right| \leq 1 223 \qquad \text{with }\ l = l_k = l_\epsilon 216 224 \end{equation} 217 225 \autoref{eq:tke_mxl_constraint} means that the vertical variations of the length scale cannot be larger than … … 227 235 (and note that here we use numerical indexing): 228 236 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 229 \begin{figure}[!t] \begin{center} 230 \includegraphics[width=1.00\textwidth]{Fig_mixing_length} 231 \caption{ \protect\label{fig:mixing_length} 232 Illustration of the mixing length computation. } 233 \end{center} 237 \begin{figure}[!t] 238 \begin{center} 239 \includegraphics[width=1.00\textwidth]{Fig_mixing_length} 240 \caption{ 241 \protect\label{fig:mixing_length} 242 Illustration of the mixing length computation. 243 } 244 \end{center} 234 245 \end{figure} 235 246 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 236 \begin{equation} \label{eq:tke_mxl2} 237 \begin{aligned} 238 l_{up\ \ }^{(k)} &= \min \left( l^{(k)} \ , \ l_{up}^{(k+1)} + e_{3t}^{(k)}\ \ \ \; \right) 247 \[ 248 % \label{eq:tke_mxl2} 249 \begin{aligned} 250 l_{up\ \ }^{(k)} &= \min \left( l^{(k)} \ , \ l_{up}^{(k+1)} + e_{3t}^{(k)}\ \ \ \; \right) 239 251 \quad &\text{ from $k=1$ to $jpk$ }\ \\ 240 l_{dwn}^{(k)} &= \min \left( l^{(k)} \ , \ l_{dwn}^{(k-1)} + e_{3t}^{(k-1)} \right)252 l_{dwn}^{(k)} &= \min \left( l^{(k)} \ , \ l_{dwn}^{(k-1)} + e_{3t}^{(k-1)} \right) 241 253 \quad &\text{ from $k=jpk$ to $1$ }\ \\ 242 \end{aligned}243 \ end{equation}254 \end{aligned} 255 \] 244 256 where $l^{(k)}$ is computed using \autoref{eq:tke_mxl0_1}, $i.e.$ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$. 245 257 … … 247 259 $ l_k= l_\epsilon = \min \left(\ l_{up} \;,\; l_{dwn}\ \right)$, while in the \np{nn\_mxl}\forcode{ = 3} case, 248 260 the dissipation and mixing turbulent length scales are give as in \citet{Gaspar1990}: 249 \begin{equation} \label{eq:tke_mxl_gaspar} 250 \begin{aligned} 251 & l_k = \sqrt{\ l_{up} \ \ l_{dwn}\ } \\ 252 & l_\epsilon = \min \left(\ l_{up} \;,\; l_{dwn}\ \right) 253 \end{aligned} 254 \end{equation} 261 \[ 262 % \label{eq:tke_mxl_gaspar} 263 \begin{aligned} 264 & l_k = \sqrt{\ l_{up} \ \ l_{dwn}\ } \\ 265 & l_\epsilon = \min \left(\ l_{up} \;,\; l_{dwn}\ \right) 266 \end{aligned} 267 \] 255 268 256 269 At the ocean surface, a non zero length scale is set through the \np{rn\_mxl0} namelist parameter. … … 261 274 $\bar{e}$ reach its minimum value ($1.10^{-6}= C_k\, l_{min} \,\sqrt{\bar{e}_{min}}$ ). 262 275 263 264 276 \subsubsection{Surface wave breaking parameterization} 265 277 %-----------------------------------------------------------------------% 278 266 279 Following \citet{Mellor_Blumberg_JPO04}, the TKE turbulence closure model has been modified to 267 280 include the effect of surface wave breaking energetics. … … 272 285 273 286 Following \citet{Craig_Banner_JPO94}, the boundary condition on surface TKE value is : 274 \begin{equation} \label{eq:ZDF_Esbc} 275 \bar{e}_o = \frac{1}{2}\,\left( 15.8\,\alpha_{CB} \right)^{2/3} \,\frac{|\tau|}{\rho_o} 287 \begin{equation} 288 \label{eq:ZDF_Esbc} 289 \bar{e}_o = \frac{1}{2}\,\left( 15.8\,\alpha_{CB} \right)^{2/3} \,\frac{|\tau|}{\rho_o} 276 290 \end{equation} 277 291 where $\alpha_{CB}$ is the \citet{Craig_Banner_JPO94} constant of proportionality which depends on the ''wave age'', 278 292 ranging from 57 for mature waves to 146 for younger waves \citep{Mellor_Blumberg_JPO04}. 279 293 The boundary condition on the turbulent length scale follows the Charnock's relation: 280 \begin{equation} \label{eq:ZDF_Lsbc} 281 l_o = \kappa \beta \,\frac{|\tau|}{g\,\rho_o} 294 \begin{equation} 295 \label{eq:ZDF_Lsbc} 296 l_o = \kappa \beta \,\frac{|\tau|}{g\,\rho_o} 282 297 \end{equation} 283 298 where $\kappa=0.40$ is the von Karman constant, and $\beta$ is the Charnock's constant. … … 293 308 surface $\bar{e}$ value. 294 309 295 296 310 \subsubsection{Langmuir cells} 297 311 %--------------------------------------% 312 298 313 Langmuir circulations (LC) can be described as ordered large-scale vertical motions in 299 314 the surface layer of the oceans. … … 313 328 By making an analogy with the characteristic convective velocity scale ($e.g.$, \citet{D'Alessio_al_JPO98}), 314 329 $P_{LC}$ is assumed to be : 315 \ begin{equation}330 \[ 316 331 P_{LC}(z) = \frac{w_{LC}^3(z)}{H_{LC}} 317 \ end{equation}332 \] 318 333 where $w_{LC}(z)$ is the vertical velocity profile of LC, and $H_{LC}$ is the LC depth. 319 334 With no information about the wave field, $w_{LC}$ is assumed to be proportional to … … 322 337 $u_s = 0.016 \,|U_{10m}|$. 323 338 Assuming an air density of $\rho_a=1.22 \,Kg/m^3$ and a drag coefficient of 324 $1.5~10^{-3}$ give the expression used of $u_s$ as a function of the module of surface stress}. 339 $1.5~10^{-3}$ give the expression used of $u_s$ as a function of the module of surface stress 340 }. 325 341 For the vertical variation, $w_{LC}$ is assumed to be zero at the surface as well as at 326 342 a finite depth $H_{LC}$ (which is often close to the mixed layer depth), 327 343 and simply varies as a sine function in between (a first-order profile for the Langmuir cell structures). 328 344 The resulting expression for $w_{LC}$ is : 329 \begin{equation} 330 w_{LC} = \begin{cases} 331 c_{LC} \,u_s \,\sin(- \pi\,z / H_{LC} ) & \text{if $-z \leq H_{LC}$} \\ 332 0 & \text{otherwise} 333 \end{cases} 334 \end{equation} 345 \[ 346 w_{LC} = 347 \begin{cases} 348 c_{LC} \,u_s \,\sin(- \pi\,z / H_{LC} ) & \text{if $-z \leq H_{LC}$} \\ 349 0 & \text{otherwise} 350 \end{cases} 351 \] 335 352 where $c_{LC} = 0.15$ has been chosen by \citep{Axell_JGR02} as a good compromise to fit LES data. 336 353 The chosen value yields maximum vertical velocities $w_{LC}$ of the order of a few centimeters per second. … … 341 358 $H_{LC}$ is depth to which a water parcel with kinetic energy due to Stoke drift can reach on its own by 342 359 converting its kinetic energy to potential energy, according to 343 \ begin{equation}360 \[ 344 361 - \int_{-H_{LC}}^0 { N^2\;z \;dz} = \frac{1}{2} u_s^2 345 \end{equation} 346 362 \] 347 363 348 364 \subsubsection{Mixing just below the mixed layer} … … 362 378 swell and waves is parameterized by \autoref{eq:ZDF_Esbc} the standard TKE surface boundary condition, 363 379 plus a depth depend one given by: 364 \begin{equation} \label{eq:ZDF_Ehtau} 365 S = (1-f_i) \; f_r \; e_s \; e^{-z / h_\tau} 380 \begin{equation} 381 \label{eq:ZDF_Ehtau} 382 S = (1-f_i) \; f_r \; e_s \; e^{-z / h_\tau} 366 383 \end{equation} 367 384 where $z$ is the depth, $e_s$ is TKE surface boundary condition, $f_r$ is the fraction of the surface TKE that … … 380 397 They will be removed in the next release. 381 398 382 383 384 399 % from Burchard et al OM 2008 : 385 400 % the most critical process not reproduced by statistical turbulence models is the activity of … … 390 405 % (e.g. Mellor, 1989; Large et al., 1994; Meier, 2001; Axell, 2002; St. Laurent and Garrett, 2002). 391 406 392 393 394 407 % ------------------------------------------------------------------------------------------------------------- 395 408 % TKE discretization considerations … … 399 412 400 413 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 401 \begin{figure}[!t] \begin{center} 402 \includegraphics[width=1.00\textwidth]{Fig_ZDF_TKE_time_scheme} 403 \caption{ \protect\label{fig:TKE_time_scheme} 404 Illustration of the TKE time integration and its links to the momentum and tracer time integration. } 405 \end{center} 414 \begin{figure}[!t] 415 \begin{center} 416 \includegraphics[width=1.00\textwidth]{Fig_ZDF_TKE_time_scheme} 417 \caption{ 418 \protect\label{fig:TKE_time_scheme} 419 Illustration of the TKE time integration and its links to the momentum and tracer time integration. 420 } 421 \end{center} 406 422 \end{figure} 407 423 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 419 435 the vertical momentum diffusion is obtained by multiplying this quantity by $u^t$ and 420 436 summing the result vertically: 421 \begin{equation} \label{eq:energ1} 422 \begin{split} 423 \int_{-H}^{\eta} u^t \,\partial_z &\left( {K_m}^t \,(\partial_z u)^{t+\rdt} \right) \,dz \\ 424 &= \Bigl[ u^t \,{K_m}^t \,(\partial_z u)^{t+\rdt} \Bigr]_{-H}^{\eta} 425 - \int_{-H}^{\eta}{ {K_m}^t \,\partial_z{u^t} \,\partial_z u^{t+\rdt} \,dz } 426 \end{split} 437 \begin{equation} 438 \label{eq:energ1} 439 \begin{split} 440 \int_{-H}^{\eta} u^t \,\partial_z &\left( {K_m}^t \,(\partial_z u)^{t+\rdt} \right) \,dz \\ 441 &= \Bigl[ u^t \,{K_m}^t \,(\partial_z u)^{t+\rdt} \Bigr]_{-H}^{\eta} 442 - \int_{-H}^{\eta}{ {K_m}^t \,\partial_z{u^t} \,\partial_z u^{t+\rdt} \,dz } 443 \end{split} 427 444 \end{equation} 428 445 Here, the vertical diffusion of momentum is discretized backward in time with a coefficient, $K_m$, … … 443 460 The rate of change of potential energy (in 1D for the demonstration) due vertical mixing is obtained by 444 461 multiplying vertical density diffusion tendency by $g\,z$ and and summing the result vertically: 445 \begin{equation} \label{eq:energ2} 446 \begin{split} 447 \int_{-H}^{\eta} g\,z\,\partial_z &\left( {K_\rho}^t \,(\partial_k \rho)^{t+\rdt} \right) \,dz \\ 448 &= \Bigl[ g\,z \,{K_\rho}^t \,(\partial_z \rho)^{t+\rdt} \Bigr]_{-H}^{\eta} 449 - \int_{-H}^{\eta}{ g \,{K_\rho}^t \,(\partial_k \rho)^{t+\rdt} } \,dz \\ 450 &= - \Bigl[ z\,{K_\rho}^t \,(N^2)^{t+\rdt} \Bigr]_{-H}^{\eta} 451 + \int_{-H}^{\eta}{ \rho^{t+\rdt} \, {K_\rho}^t \,(N^2)^{t+\rdt} \,dz } 452 \end{split} 462 \begin{equation} 463 \label{eq:energ2} 464 \begin{split} 465 \int_{-H}^{\eta} g\,z\,\partial_z &\left( {K_\rho}^t \,(\partial_k \rho)^{t+\rdt} \right) \,dz \\ 466 &= \Bigl[ g\,z \,{K_\rho}^t \,(\partial_z \rho)^{t+\rdt} \Bigr]_{-H}^{\eta} 467 - \int_{-H}^{\eta}{ g \,{K_\rho}^t \,(\partial_k \rho)^{t+\rdt} } \,dz \\ 468 &= - \Bigl[ z\,{K_\rho}^t \,(N^2)^{t+\rdt} \Bigr]_{-H}^{\eta} 469 + \int_{-H}^{\eta}{ \rho^{t+\rdt} \, {K_\rho}^t \,(N^2)^{t+\rdt} \,dz } 470 \end{split} 453 471 \end{equation} 454 472 where we use $N^2 = -g \,\partial_k \rho / (e_3 \rho)$. … … 468 486 469 487 The above energetic considerations leads to the following final discrete form for the TKE equation: 470 \begin{equation} \label{eq:zdftke_ene} 471 \begin{split} 472 \frac { (\bar{e})^t - (\bar{e})^{t-\rdt} } {\rdt} \equiv 473 \Biggl\{ \Biggr. 474 &\overline{ \left( \left(\overline{K_m}^{\,i+1/2}\right)^{t-\rdt} \,\frac{\delta_{k+1/2}[u^{t+\rdt}]}{{e_3u}^{t+\rdt} } 475 \ \frac{\delta_{k+1/2}[u^ t ]}{{e_3u}^ t } \right) }^{\,i} \\ 476 +&\overline{ \left( \left(\overline{K_m}^{\,j+1/2}\right)^{t-\rdt} \,\frac{\delta_{k+1/2}[v^{t+\rdt}]}{{e_3v}^{t+\rdt} } 477 \ \frac{\delta_{k+1/2}[v^ t ]}{{e_3v}^ t } \right) }^{\,j} 478 \Biggr. \Biggr\} \\ 479 % 480 - &{K_\rho}^{t-\rdt}\,{(N^2)^t} \\ 481 % 482 +&\frac{1}{{e_3w}^{t+\rdt}} \;\delta_{k+1/2} \left[ {K_m}^{t-\rdt} \,\frac{\delta_{k}[(\bar{e})^{t+\rdt}]} {{e_3w}^{t+\rdt}} \right] \\ 483 % 484 - &c_\epsilon \; \left( \frac{\sqrt{\bar {e}}}{l_\epsilon}\right)^{t-\rdt}\,(\bar {e})^{t+\rdt} 485 \end{split} 488 \begin{equation} 489 \label{eq:zdftke_ene} 490 \begin{split} 491 \frac { (\bar{e})^t - (\bar{e})^{t-\rdt} } {\rdt} \equiv 492 \Biggl\{ \Biggr. 493 &\overline{ \left( \left(\overline{K_m}^{\,i+1/2}\right)^{t-\rdt} \,\frac{\delta_{k+1/2}[u^{t+\rdt}]}{{e_3u}^{t+\rdt} } 494 \ \frac{\delta_{k+1/2}[u^ t ]}{{e_3u}^ t } \right) }^{\,i} \\ 495 +&\overline{ \left( \left(\overline{K_m}^{\,j+1/2}\right)^{t-\rdt} \,\frac{\delta_{k+1/2}[v^{t+\rdt}]}{{e_3v}^{t+\rdt} } 496 \ \frac{\delta_{k+1/2}[v^ t ]}{{e_3v}^ t } \right) }^{\,j} 497 \Biggr. \Biggr\} \\ 498 % 499 - &{K_\rho}^{t-\rdt}\,{(N^2)^t} \\ 500 % 501 +&\frac{1}{{e_3w}^{t+\rdt}} \;\delta_{k+1/2} \left[ {K_m}^{t-\rdt} \,\frac{\delta_{k}[(\bar{e})^{t+\rdt}]} {{e_3w}^{t+\rdt}} \right] \\ 502 % 503 - &c_\epsilon \; \left( \frac{\sqrt{\bar {e}}}{l_\epsilon}\right)^{t-\rdt}\,(\bar {e})^{t+\rdt} 504 \end{split} 486 505 \end{equation} 487 506 where the last two terms in \autoref{eq:zdftke_ene} (vertical diffusion and Kolmogorov dissipation) … … 511 530 $k$-$\omega$ \citep{Wilcox_1988} among others \citep{Umlauf_Burchard_JMS03,Kantha_Carniel_CSR05}). 512 531 The GLS scheme is given by the following set of equations: 513 \begin{equation} \label{eq:zdfgls_e} 514 \frac{\partial \bar{e}}{\partial t} = 515 \frac{K_m}{\sigma_e e_3 }\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2 516 +\left( \frac{\partial v}{\partial k} \right)^2} \right] 517 -K_\rho \,N^2 518 +\frac{1}{e_3}\,\frac{\partial}{\partial k} \left[ \frac{K_m}{e_3}\,\frac{\partial \bar{e}}{\partial k} \right] 519 - \epsilon 532 \begin{equation} 533 \label{eq:zdfgls_e} 534 \frac{\partial \bar{e}}{\partial t} = 535 \frac{K_m}{\sigma_e e_3 }\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2 536 +\left( \frac{\partial v}{\partial k} \right)^2} \right] 537 -K_\rho \,N^2 538 +\frac{1}{e_3}\,\frac{\partial}{\partial k} \left[ \frac{K_m}{e_3}\,\frac{\partial \bar{e}}{\partial k} \right] 539 - \epsilon 520 540 \end{equation} 521 541 522 \begin{equation} \label{eq:zdfgls_psi} 523 \begin{split} 524 \frac{\partial \psi}{\partial t} =& \frac{\psi}{\bar{e}} \left\{ 525 \frac{C_1\,K_m}{\sigma_{\psi} {e_3}}\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2 526 +\left( \frac{\partial v}{\partial k} \right)^2} \right] 527 - C_3 \,K_\rho\,N^2 - C_2 \,\epsilon \,Fw \right\} \\ 528 &+\frac{1}{e_3} \;\frac{\partial }{\partial k}\left[ {\frac{K_m}{e_3 } 529 \;\frac{\partial \psi}{\partial k}} \right]\; 530 \end{split} 531 \end{equation} 532 533 \begin{equation} \label{eq:zdfgls_kz} 534 \begin{split} 535 K_m &= C_{\mu} \ \sqrt {\bar{e}} \ l \\ 536 K_\rho &= C_{\mu'}\ \sqrt {\bar{e}} \ l 537 \end{split} 538 \end{equation} 539 540 \begin{equation} \label{eq:zdfgls_eps} 541 {\epsilon} = C_{0\mu} \,\frac{\bar {e}^{3/2}}{l} \; 542 \end{equation} 542 \[ 543 % \label{eq:zdfgls_psi} 544 \begin{split} 545 \frac{\partial \psi}{\partial t} =& \frac{\psi}{\bar{e}} \left\{ 546 \frac{C_1\,K_m}{\sigma_{\psi} {e_3}}\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2 547 +\left( \frac{\partial v}{\partial k} \right)^2} \right] 548 - C_3 \,K_\rho\,N^2 - C_2 \,\epsilon \,Fw \right\} \\ 549 &+\frac{1}{e_3} \;\frac{\partial }{\partial k}\left[ {\frac{K_m}{e_3 } 550 \;\frac{\partial \psi}{\partial k}} \right]\; 551 \end{split} 552 \] 553 554 \[ 555 % \label{eq:zdfgls_kz} 556 \begin{split} 557 K_m &= C_{\mu} \ \sqrt {\bar{e}} \ l \\ 558 K_\rho &= C_{\mu'}\ \sqrt {\bar{e}} \ l 559 \end{split} 560 \] 561 562 \[ 563 % \label{eq:zdfgls_eps} 564 {\epsilon} = C_{0\mu} \,\frac{\bar {e}^{3/2}}{l} \; 565 \] 543 566 where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}) and 544 567 $\epsilon$ the dissipation rate. … … 549 572 550 573 %--------------------------------------------------TABLE-------------------------------------------------- 551 \begin{table}[htbp] \begin{center} 552 %\begin{tabular}{cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}c} 553 \begin{tabular}{ccccc} 554 & $k-kl$ & $k-\epsilon$ & $k-\omega$ & generic \\ 555 % & \citep{Mellor_Yamada_1982} & \citep{Rodi_1987} & \citep{Wilcox_1988} & \\ 556 \hline \hline 557 \np{nn\_clo} & \textbf{0} & \textbf{1} & \textbf{2} & \textbf{3} \\ 558 \hline 559 $( p , n , m )$ & ( 0 , 1 , 1 ) & ( 3 , 1.5 , -1 ) & ( -1 , 0.5 , -1 ) & ( 2 , 1 , -0.67 ) \\ 560 $\sigma_k$ & 2.44 & 1. & 2. & 0.8 \\ 561 $\sigma_\psi$ & 2.44 & 1.3 & 2. & 1.07 \\ 562 $C_1$ & 0.9 & 1.44 & 0.555 & 1. \\ 563 $C_2$ & 0.5 & 1.92 & 0.833 & 1.22 \\ 564 $C_3$ & 1. & 1. & 1. & 1. \\ 565 $F_{wall}$ & Yes & -- & -- & -- \\ 566 \hline 567 \hline 568 \end{tabular} 569 \caption{ \protect\label{tab:GLS} 570 Set of predefined GLS parameters, or equivalently predefined turbulence models available with 571 \protect\key{zdfgls} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\ngn{namzdf\_gls}.} 572 \end{center} \end{table} 574 \begin{table}[htbp] 575 \begin{center} 576 % \begin{tabular}{cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}c} 577 \begin{tabular}{ccccc} 578 & $k-kl$ & $k-\epsilon$ & $k-\omega$ & generic \\ 579 % & \citep{Mellor_Yamada_1982} & \citep{Rodi_1987} & \citep{Wilcox_1988} & \\ 580 \hline 581 \hline 582 \np{nn\_clo} & \textbf{0} & \textbf{1} & \textbf{2} & \textbf{3} \\ 583 \hline 584 $( p , n , m )$ & ( 0 , 1 , 1 ) & ( 3 , 1.5 , -1 ) & ( -1 , 0.5 , -1 ) & ( 2 , 1 , -0.67 ) \\ 585 $\sigma_k$ & 2.44 & 1. & 2. & 0.8 \\ 586 $\sigma_\psi$ & 2.44 & 1.3 & 2. & 1.07 \\ 587 $C_1$ & 0.9 & 1.44 & 0.555 & 1. \\ 588 $C_2$ & 0.5 & 1.92 & 0.833 & 1.22 \\ 589 $C_3$ & 1. & 1. & 1. & 1. \\ 590 $F_{wall}$ & Yes & -- & -- & -- \\ 591 \hline 592 \hline 593 \end{tabular} 594 \caption{ 595 \protect\label{tab:GLS} 596 Set of predefined GLS parameters, or equivalently predefined turbulence models available with 597 \protect\key{zdfgls} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\ngn{namzdf\_gls}. 598 } 599 \end{center} 600 \end{table} 573 601 %-------------------------------------------------------------------------------------------------------------- 574 602 … … 646 674 647 675 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 648 \begin{figure}[!htb] \begin{center} 649 \includegraphics[width=0.90\textwidth]{Fig_npc} 650 \caption{ \protect\label{fig:npc} 651 Example of an unstable density profile treated by the non penetrative convective adjustment algorithm. 652 $1^{st}$ step: the initial profile is checked from the surface to the bottom. 653 It is found to be unstable between levels 3 and 4. 654 They are mixed. 655 The resulting $\rho$ is still larger than $\rho$(5): levels 3 to 5 are mixed. 656 The resulting $\rho$ is still larger than $\rho$(6): levels 3 to 6 are mixed. 657 The $1^{st}$ step ends since the density profile is then stable below the level 3. 658 $2^{nd}$ step: the new $\rho$ profile is checked following the same procedure as in $1^{st}$ step: 659 levels 2 to 5 are mixed. 660 The new density profile is checked. 661 It is found stable: end of algorithm.} 662 \end{center} \end{figure} 676 \begin{figure}[!htb] 677 \begin{center} 678 \includegraphics[width=0.90\textwidth]{Fig_npc} 679 \caption{ 680 \protect\label{fig:npc} 681 Example of an unstable density profile treated by the non penetrative convective adjustment algorithm. 682 $1^{st}$ step: the initial profile is checked from the surface to the bottom. 683 It is found to be unstable between levels 3 and 4. 684 They are mixed. 685 The resulting $\rho$ is still larger than $\rho$(5): levels 3 to 5 are mixed. 686 The resulting $\rho$ is still larger than $\rho$(6): levels 3 to 6 are mixed. 687 The $1^{st}$ step ends since the density profile is then stable below the level 3. 688 $2^{nd}$ step: the new $\rho$ profile is checked following the same procedure as in $1^{st}$ step: 689 levels 2 to 5 are mixed. 690 The new density profile is checked. 691 It is found stable: end of algorithm. 692 } 693 \end{center} 694 \end{figure} 663 695 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 664 696 … … 781 813 782 814 Diapycnal mixing of S and T are described by diapycnal diffusion coefficients 783 \begin{align*} % \label{eq:zdfddm_Kz} 784 &A^{vT} = A_o^{vT}+A_f^{vT}+A_d^{vT} \\ 785 &A^{vS} = A_o^{vS}+A_f^{vS}+A_d^{vS} 815 \begin{align*} 816 % \label{eq:zdfddm_Kz} 817 &A^{vT} = A_o^{vT}+A_f^{vT}+A_d^{vT} \\ 818 &A^{vS} = A_o^{vS}+A_f^{vS}+A_d^{vS} 786 819 \end{align*} 787 820 where subscript $f$ represents mixing by salt fingering, $d$ by diffusive convection, … … 792 825 To represent mixing of $S$ and $T$ by salt fingering, we adopt the diapycnal diffusivities suggested by Schmitt 793 826 (1981): 794 \begin{align} \label{eq:zdfddm_f} 795 A_f^{vS} &= \begin{cases} 796 \frac{A^{\ast v}}{1+(R_\rho / R_c)^n } &\text{if $R_\rho > 1$ and $N^2>0$ } \\ 797 0 &\text{otherwise} 798 \end{cases} 799 \\ \label{eq:zdfddm_f_T} 800 A_f^{vT} &= 0.7 \ A_f^{vS} / R_\rho 827 \begin{align} 828 \label{eq:zdfddm_f} 829 A_f^{vS} &= 830 \begin{cases} 831 \frac{A^{\ast v}}{1+(R_\rho / R_c)^n } &\text{if $R_\rho > 1$ and $N^2>0$ } \\ 832 0 &\text{otherwise} 833 \end{cases} 834 \\ \label{eq:zdfddm_f_T} 835 A_f^{vT} &= 0.7 \ A_f^{vS} / R_\rho 801 836 \end{align} 802 837 803 838 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 804 \begin{figure}[!t] \begin{center} 805 \includegraphics[width=0.99\textwidth]{Fig_zdfddm} 806 \caption{ \protect\label{fig:zdfddm} 807 From \citet{Merryfield1999} : 808 (a) Diapycnal diffusivities $A_f^{vT}$ and $A_f^{vS}$ for temperature and salt in regions of salt fingering. 809 Heavy curves denote $A^{\ast v} = 10^{-3}~m^2.s^{-1}$ and thin curves $A^{\ast v} = 10^{-4}~m^2.s^{-1}$; 810 (b) diapycnal diffusivities $A_d^{vT}$ and $A_d^{vS}$ for temperature and salt in regions of diffusive convection. 811 Heavy curves denote the Federov parameterisation and thin curves the Kelley parameterisation. 812 The latter is not implemented in \NEMO. } 813 \end{center} \end{figure} 839 \begin{figure}[!t] 840 \begin{center} 841 \includegraphics[width=0.99\textwidth]{Fig_zdfddm} 842 \caption{ 843 \protect\label{fig:zdfddm} 844 From \citet{Merryfield1999} : 845 (a) Diapycnal diffusivities $A_f^{vT}$ and $A_f^{vS}$ for temperature and salt in regions of salt fingering. 846 Heavy curves denote $A^{\ast v} = 10^{-3}~m^2.s^{-1}$ and thin curves $A^{\ast v} = 10^{-4}~m^2.s^{-1}$; 847 (b) diapycnal diffusivities $A_d^{vT}$ and $A_d^{vS}$ for temperature and salt in regions of 848 diffusive convection. 849 Heavy curves denote the Federov parameterisation and thin curves the Kelley parameterisation. 850 The latter is not implemented in \NEMO. 851 } 852 \end{center} 853 \end{figure} 814 854 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 815 855 … … 820 860 To represent mixing of S and T by diffusive layering, the diapycnal diffusivities suggested by 821 861 Federov (1988) is used: 822 \begin{align} \label{eq:zdfddm_d} 823 A_d^{vT} &= \begin{cases} 824 1.3635 \, \exp{\left( 4.6\, \exp{ \left[ -0.54\,( R_{\rho}^{-1} - 1 ) \right] } \right)} 825 &\text{if $0<R_\rho < 1$ and $N^2>0$ } \\ 826 0 &\text{otherwise} 827 \end{cases} 828 \\ \label{eq:zdfddm_d_S} 829 A_d^{vS} &= \begin{cases} 830 A_d^{vT}\ \left( 1.85\,R_{\rho} - 0.85 \right) 831 &\text{if $0.5 \leq R_\rho<1$ and $N^2>0$ } \\ 832 A_d^{vT} \ 0.15 \ R_\rho 833 &\text{if $\ \ 0 < R_\rho<0.5$ and $N^2>0$ } \\ 834 0 &\text{otherwise} 835 \end{cases} 862 \begin{align} 863 % \label{eq:zdfddm_d} 864 A_d^{vT} &= 865 \begin{cases} 866 1.3635 \, \exp{\left( 4.6\, \exp{ \left[ -0.54\,( R_{\rho}^{-1} - 1 ) \right] } \right)} 867 &\text{if $0<R_\rho < 1$ and $N^2>0$ } \\ 868 0 &\text{otherwise} 869 \end{cases} 870 \nonumber \\ 871 \label{eq:zdfddm_d_S} 872 A_d^{vS} &= 873 \begin{cases} 874 A_d^{vT}\ \left( 1.85\,R_{\rho} - 0.85 \right) &\text{if $0.5 \leq R_\rho<1$ and $N^2>0$ } \\ 875 A_d^{vT} \ 0.15 \ R_\rho &\text{if $\ \ 0 < R_\rho<0.5$ and $N^2>0$ } \\ 876 0 &\text{otherwise} 877 \end{cases} 836 878 \end{align} 837 879 … … 863 905 a condition on the vertical diffusive flux. 864 906 For the bottom boundary layer, one has: 865 \begin{equation} \label{eq:zdfbfr_flux} 866 A^{vm} \left( \partial {\textbf U}_h / \partial z \right) = {{\cal F}}_h^{\textbf U} 867 \end{equation} 907 \[ 908 % \label{eq:zdfbfr_flux} 909 A^{vm} \left( \partial {\textbf U}_h / \partial z \right) = {{\cal F}}_h^{\textbf U} 910 \] 868 911 where ${\cal F}_h^{\textbf U}$ is represents the downward flux of horizontal momentum outside 869 912 the logarithmic turbulent boundary layer (thickness of the order of 1~m in the ocean). … … 878 921 bottom model layer. 879 922 To illustrate this, consider the equation for $u$ at $k$, the last ocean level: 880 \begin{equation} \label{eq:zdfbfr_flux2} 881 \frac{\partial u_k}{\partial t} = \frac{1}{e_{3u}} \left[ \frac{A_{uw}^{vm}}{e_{3uw}} \delta_{k+1/2}\;[u] - {\cal F}^u_h \right] \approx - \frac{{\cal F}^u_{h}}{e_{3u}} 923 \begin{equation} 924 \label{eq:zdfbfr_flux2} 925 \frac{\partial u_k}{\partial t} = \frac{1}{e_{3u}} \left[ \frac{A_{uw}^{vm}}{e_{3uw}} \delta_{k+1/2}\;[u] - {\cal F}^u_h \right] \approx - \frac{{\cal F}^u_{h}}{e_{3u}} 882 926 \end{equation} 883 927 If the bottom layer thickness is 200~m, the Ekman transport will be distributed over that depth. … … 897 941 bottom velocities and geometric values to provide the momentum trend due to bottom friction. 898 942 These coefficients are computed in \mdl{zdfbfr} and generally take the form $c_b^{\textbf U}$ where: 899 \begin{equation} \label{eq:zdfbfr_bdef} 900 \frac{\partial {\textbf U_h}}{\partial t} = 943 \begin{equation} 944 \label{eq:zdfbfr_bdef} 945 \frac{\partial {\textbf U_h}}{\partial t} = 901 946 - \frac{{\cal F}^{\textbf U}_{h}}{e_{3u}} = \frac{c_b^{\textbf U}}{e_{3u}} \;{\textbf U}_h^b 902 947 \end{equation} … … 911 956 The linear bottom friction parameterisation (including the special case of a free-slip condition) assumes that 912 957 the bottom friction is proportional to the interior velocity (i.e. the velocity of the last model level): 913 \begin{equation} \label{eq:zdfbfr_linear} 914 {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3} \; \frac{\partial \textbf{U}_h}{\partial k} = r \; \textbf{U}_h^b 915 \end{equation} 958 \[ 959 % \label{eq:zdfbfr_linear} 960 {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3} \; \frac{\partial \textbf{U}_h}{\partial k} = r \; \textbf{U}_h^b 961 \] 916 962 where $r$ is a friction coefficient expressed in ms$^{-1}$. 917 963 This coefficient is generally estimated by setting a typical decay time $\tau$ in the deep ocean, … … 927 973 928 974 For the linear friction case the coefficients defined in the general expression \autoref{eq:zdfbfr_bdef} are: 929 \begin{equation} \label{eq:zdfbfr_linbfr_b} 930 \begin{split} 931 c_b^u &= - r\\ 932 c_b^v &= - r\\ 933 \end{split} 934 \end{equation} 975 \[ 976 % \label{eq:zdfbfr_linbfr_b} 977 \begin{split} 978 c_b^u &= - r\\ 979 c_b^v &= - r\\ 980 \end{split} 981 \] 935 982 When \np{nn\_botfr}\forcode{ = 1}, the value of $r$ used is \np{rn\_bfri1}. 936 983 Setting \np{nn\_botfr}\forcode{ = 0} is equivalent to setting $r=0$ and … … 950 997 951 998 The non-linear bottom friction parameterisation assumes that the bottom friction is quadratic: 952 \begin{equation} \label{eq:zdfbfr_nonlinear} 953 {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3 }\frac{\partial \textbf {U}_h 954 }{\partial k}=C_D \;\sqrt {u_b ^2+v_b ^2+e_b } \;\; \textbf {U}_h^b 955 \end{equation} 999 \[ 1000 % \label{eq:zdfbfr_nonlinear} 1001 {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3 }\frac{\partial \textbf {U}_h 1002 }{\partial k}=C_D \;\sqrt {u_b ^2+v_b ^2+e_b } \;\; \textbf {U}_h^b 1003 \] 956 1004 where $C_D$ is a drag coefficient, and $e_b $ a bottom turbulent kinetic energy due to tides, 957 1005 internal waves breaking and other short time scale currents. … … 965 1013 the bottom friction to the general momentum trend in \mdl{dynbfr}. 966 1014 For the non-linear friction case the terms computed in \mdl{zdfbfr} are: 967 \begin{equation} \label{eq:zdfbfr_nonlinbfr} 968 \begin{split} 969 c_b^u &= - \; C_D\;\left[ u^2 + \left(\bar{\bar{v}}^{i+1,j}\right)^2 + e_b \right]^{1/2}\\ 970 c_b^v &= - \; C_D\;\left[ \left(\bar{\bar{u}}^{i,j+1}\right)^2 + v^2 + e_b \right]^{1/2}\\ 971 \end{split} 972 \end{equation} 1015 \[ 1016 % \label{eq:zdfbfr_nonlinbfr} 1017 \begin{split} 1018 c_b^u &= - \; C_D\;\left[ u^2 + \left(\bar{\bar{v}}^{i+1,j}\right)^2 + e_b \right]^{1/2}\\ 1019 c_b^v &= - \; C_D\;\left[ \left(\bar{\bar{u}}^{i,j+1}\right)^2 + v^2 + e_b \right]^{1/2}\\ 1020 \end{split} 1021 \] 973 1022 974 1023 The coefficients that control the strength of the non-linear bottom friction are initialised as namelist parameters: … … 991 1040 If \np{ln\_loglayer} = .true., $C_D$ is no longer constant but is related to the thickness of 992 1041 the last wet layer in each column by: 993 \ begin{equation}994 C_D = \left ( {\kappa \over {\rm log}\left ( 0.5e_{3t}/rn\_bfrz0 \right ) } \right )^2995 \ end{equation}1042 \[ 1043 C_D = \left ( {\kappa \over {\rm log}\left ( 0.5e_{3t}/rn\_bfrz0 \right ) } \right )^2 1044 \] 996 1045 997 1046 \noindent where $\kappa$ is the von-Karman constant and \np{rn\_bfrz0} is a roughness length provided via … … 1001 1050 the base \np{rn\_bfri2} value and it is not allowed to exceed the value of an additional namelist parameter: 1002 1051 \np{rn\_bfri2\_max}, i.e.: 1003 \ begin{equation}1004 rn\_bfri2 \leq C_D \leq rn\_bfri2\_max1005 \ end{equation}1052 \[ 1053 rn\_bfri2 \leq C_D \leq rn\_bfri2\_max 1054 \] 1006 1055 1007 1056 \noindent Note also that a log-layer enhancement can also be applied to the top boundary friction if … … 1018 1067 bottom friction does not induce numerical instability. 1019 1068 For the purposes of stability analysis, an approximation to \autoref{eq:zdfbfr_flux2} is: 1020 \begin{equation} \label{eq:Eqn_bfrstab} 1021 \begin{split} 1022 \Delta u &= -\frac{{{\cal F}_h}^u}{e_{3u}}\;2 \rdt \\ 1023 &= -\frac{ru}{e_{3u}}\;2\rdt\\ 1024 \end{split} 1069 \begin{equation} 1070 \label{eq:Eqn_bfrstab} 1071 \begin{split} 1072 \Delta u &= -\frac{{{\cal F}_h}^u}{e_{3u}}\;2 \rdt \\ 1073 &= -\frac{ru}{e_{3u}}\;2\rdt\\ 1074 \end{split} 1025 1075 \end{equation} 1026 1076 \noindent where linear bottom friction and a leapfrog timestep have been assumed. 1027 1077 To ensure that the bottom friction cannot reverse the direction of flow it is necessary to have: 1028 \ begin{equation}1029 |\Delta u| < \;|u|1030 \ end{equation}1078 \[ 1079 |\Delta u| < \;|u| 1080 \] 1031 1081 \noindent which, using \autoref{eq:Eqn_bfrstab}, gives: 1032 \ begin{equation}1033 r\frac{2\rdt}{e_{3u}} < 1 \qquad \Rightarrow \qquad r < \frac{e_{3u}}{2\rdt}\\1034 \ end{equation}1082 \[ 1083 r\frac{2\rdt}{e_{3u}} < 1 \qquad \Rightarrow \qquad r < \frac{e_{3u}}{2\rdt}\\ 1084 \] 1035 1085 This same inequality can also be derived in the non-linear bottom friction case if 1036 1086 a velocity of 1 m.s$^{-1}$ is assumed. 1037 1087 Alternatively, this criterion can be rearranged to suggest a minimum bottom box thickness to ensure stability: 1038 \ begin{equation}1039 e_{3u} > 2\;r\;\rdt1040 \ end{equation}1088 \[ 1089 e_{3u} > 2\;r\;\rdt 1090 \] 1041 1091 \noindent which it may be necessary to impose if partial steps are being used. 1042 1092 For example, if $|u| = 1$ m.s$^{-1}$, $rdt = 1800$ s, $r = 10^{-3}$ then $e_{3u}$ should be greater than 3.6 m. … … 1070 1120 the bottom boundary condition is implemented implicitly. 1071 1121 1072 \begin{equation} \label{eq:dynzdf_bfr} 1073 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{mbk} 1074 = \binom{c_{b}^{u}u^{n+1}_{mbk}}{c_{b}^{v}v^{n+1}_{mbk}} 1075 \end{equation} 1122 \[ 1123 % \label{eq:dynzdf_bfr} 1124 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{mbk} 1125 = \binom{c_{b}^{u}u^{n+1}_{mbk}}{c_{b}^{v}v^{n+1}_{mbk}} 1126 \] 1076 1127 1077 1128 where $mbk$ is the layer number of the bottom wet layer. … … 1089 1140 The implementation of the implicit bottom friction in \mdl{dynspg\_ts} is done in two steps as the following: 1090 1141 1091 \begin{equation} \label{eq:dynspg_ts_bfr1} 1092 \frac{\textbf{U}_{med}-\textbf{U}^{m-1}}{2\Delta t}=-g\nabla\eta-f\textbf{k}\times\textbf{U}^{m}+c_{b} 1093 \left(\textbf{U}_{med}-\textbf{U}^{m-1}\right) 1094 \end{equation} 1095 \begin{equation} \label{eq:dynspg_ts_bfr2} 1096 \frac{\textbf{U}^{m+1}-\textbf{U}_{med}}{2\Delta t}=\textbf{T}+ 1097 \left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{U}^{'}\right)- 1098 2\Delta t_{bc}c_{b}\left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{u}_{b}\right) 1099 \end{equation} 1142 \[ 1143 % \label{eq:dynspg_ts_bfr1} 1144 \frac{\textbf{U}_{med}-\textbf{U}^{m-1}}{2\Delta t}=-g\nabla\eta-f\textbf{k}\times\textbf{U}^{m}+c_{b} 1145 \left(\textbf{U}_{med}-\textbf{U}^{m-1}\right) 1146 \] 1147 \[ 1148 \frac{\textbf{U}^{m+1}-\textbf{U}_{med}}{2\Delta t}=\textbf{T}+ 1149 \left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{U}^{'}\right)- 1150 2\Delta t_{bc}c_{b}\left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{u}_{b}\right) 1151 \] 1100 1152 1101 1153 where $\textbf{T}$ is the vertical integrated 3-D momentum trend. … … 1106 1158 the 3-D baroclinic mode. 1107 1159 $\textbf{u}_{b}$ is the bottom layer horizontal velocity. 1108 1109 1110 1111 1160 1112 1161 % ------------------------------------------------------------------------------------------------------------- … … 1157 1206 1158 1207 Otherwise, the implicit formulation takes the form: 1159 \begin{equation} \label{eq:zdfbfr_implicitts} 1160 \bar{U}^{t+ \rdt} = \; \left [ \bar{U}^{t-\rdt}\; + 2 \rdt\;RHS \right ] / \left [ 1 - 2 \rdt \;c_b^{u} / H_e \right ] 1161 \end{equation} 1208 \[ 1209 % \label{eq:zdfbfr_implicitts} 1210 \bar{U}^{t+ \rdt} = \; \left [ \bar{U}^{t-\rdt}\; + 2 \rdt\;RHS \right ] / \left [ 1 - 2 \rdt \;c_b^{u} / H_e \right ] 1211 \] 1162 1212 where $\bar U$ is the barotropic velocity, $H_e$ is the full depth (including sea surface height), 1163 1213 $c_b^u$ is the bottom friction coefficient as calculated in \rou{zdf\_bfr} and 1164 1214 $RHS$ represents all the components to the vertically integrated momentum trend except for 1165 1215 that due to bottom friction. 1166 1167 1168 1169 1216 1170 1217 % ================================================================ … … 1192 1239 $A^{vT}_{tides}$ is expressed as a function of $E(x,y)$, 1193 1240 the energy transfer from barotropic tides to baroclinic tides: 1194 \begin{equation} \label{eq:Ktides} 1195 A^{vT}_{tides} = q \,\Gamma \,\frac{ E(x,y) \, F(z) }{ \rho \, N^2 } 1241 \begin{equation} 1242 \label{eq:Ktides} 1243 A^{vT}_{tides} = q \,\Gamma \,\frac{ E(x,y) \, F(z) }{ \rho \, N^2 } 1196 1244 \end{equation} 1197 1245 where $\Gamma$ is the mixing efficiency, $N$ the Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}), … … 1209 1257 with a vertical scale of $h_o$ (\np{rn\_htmx} namelist parameter, 1210 1258 with a typical value of $500\,m$) \citep{St_Laurent_Nash_DSR04}, 1211 \begin{equation} \label{eq:Fz} 1212 F(i,j,k) = \frac{ e^{ -\frac{H+z}{h_o} } }{ h_o \left( 1- e^{ -\frac{H}{h_o} } \right) } 1213 \end{equation} 1259 \[ 1260 % \label{eq:Fz} 1261 F(i,j,k) = \frac{ e^{ -\frac{H+z}{h_o} } }{ h_o \left( 1- e^{ -\frac{H}{h_o} } \right) } 1262 \] 1214 1263 and is normalized so that vertical integral over the water column is unity. 1215 1264 … … 1234 1283 1235 1284 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1236 \begin{figure}[!t] \begin{center} 1237 \includegraphics[width=0.90\textwidth]{Fig_ZDF_M2_K1_tmx} 1238 \caption{ \protect\label{fig:ZDF_M2_K1_tmx} 1239 (a) M2 and (b) K1 internal wave drag energy from \citet{Carrere_Lyard_GRL03} ($W/m^2$). } 1240 \end{center} \end{figure} 1285 \begin{figure}[!t] 1286 \begin{center} 1287 \includegraphics[width=0.90\textwidth]{Fig_ZDF_M2_K1_tmx} 1288 \caption{ 1289 \protect\label{fig:ZDF_M2_K1_tmx} 1290 (a) M2 and (b) K1 internal wave drag energy from \citet{Carrere_Lyard_GRL03} ($W/m^2$). 1291 } 1292 \end{center} 1293 \end{figure} 1241 1294 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 1242 1295 … … 1268 1321 the energy dissipation proportional to $N^2$ below the core of the thermocline and to $N$ above. 1269 1322 The resulting $F(z)$ is: 1270 \begin{equation} \label{eq:Fz_itf} 1271 F(i,j,k) \sim \left\{ \begin{aligned} 1272 \frac{q\,\Gamma E(i,j) } {\rho N \, \int N dz} \qquad \text{when $\partial_z N < 0$} \\ 1273 \frac{q\,\Gamma E(i,j) } {\rho \, \int N^2 dz} \qquad \text{when $\partial_z N > 0$} 1274 \end{aligned} \right. 1275 \end{equation} 1323 \[ 1324 % \label{eq:Fz_itf} 1325 F(i,j,k) \sim \left\{ 1326 \begin{aligned} 1327 \frac{q\,\Gamma E(i,j) } {\rho N \, \int N dz} \qquad \text{when $\partial_z N < 0$} \\ 1328 \frac{q\,\Gamma E(i,j) } {\rho \, \int N^2 dz} \qquad \text{when $\partial_z N > 0$} 1329 \end{aligned} 1330 \right. 1331 \] 1276 1332 1277 1333 Averaged over the ITF area, the resulting tidal mixing coefficient is $1.5\,cm^2/s$, … … 1283 1339 global coupled GCMs \citep{Koch-Larrouy_al_CD10}. 1284 1340 1285 1286 1341 % ================================================================ 1287 1342 % Internal wave-driven mixing … … 1299 1354 A three-dimensional field of internal wave energy dissipation $\epsilon(x,y,z)$ is first constructed, 1300 1355 and the resulting diffusivity is obtained as 1301 \begin{equation} \label{eq:Kwave} 1302 A^{vT}_{wave} = R_f \,\frac{ \epsilon }{ \rho \, N^2 } 1303 \end{equation} 1356 \[ 1357 % \label{eq:Kwave} 1358 A^{vT}_{wave} = R_f \,\frac{ \epsilon }{ \rho \, N^2 } 1359 \] 1304 1360 where $R_f$ is the mixing efficiency and $\epsilon$ is a specified three dimensional distribution of 1305 1361 the energy available for mixing. … … 1323 1379 (de Lavergne et al., in prep): 1324 1380 \begin{align*} 1325 F_{cri}(i,j,k) &\propto e^{-h_{ab} / h_{cri} }\\1326 F_{pyc}(i,j,k) &\propto N^{n\_p}\\1327 F_{bot}(i,j,k) &\propto N^2 \, e^{- h_{wkb} / h_{bot} }1381 F_{cri}(i,j,k) &\propto e^{-h_{ab} / h_{cri} }\\ 1382 F_{pyc}(i,j,k) &\propto N^{n\_p}\\ 1383 F_{bot}(i,j,k) &\propto N^2 \, e^{- h_{wkb} / h_{bot} } 1328 1384 \end{align*} 1329 1385 In the above formula, $h_{ab}$ denotes the height above bottom, 1330 1386 $h_{wkb}$ denotes the WKB-stretched height above bottom, defined by 1331 \ begin{equation*}1332 h_{wkb} = H \, \frac{ \int_{-H}^{z} N \, dz' } { \int_{-H}^{\eta} N \, dz' } \; ,1333 \ end{equation*}1387 \[ 1388 h_{wkb} = H \, \frac{ \int_{-H}^{z} N \, dz' } { \int_{-H}^{\eta} N \, dz' } \; , 1389 \] 1334 1390 The $n_p$ parameter (given by \np{nn\_zpyc} in \ngn{namzdf\_tmx\_new} namelist) 1335 1391 controls the stratification-dependence of the pycnocline-intensified dissipation. … … 1343 1399 % ================================================================ 1344 1400 1345 1401 \biblio 1346 1402 1347 1403 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_conservation.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 … … 61 62 Let us define as either the relative, planetary and total potential vorticity, i.e. ?, ?, and ?, respectively. 62 63 The continuous formulation of the vorticity term satisfies following integral constraints: 63 \begin{equation} \label{eq:vor_vorticity} 64 \int_D {{\textbf {k}}\cdot \frac{1}{e_3 }\nabla \times \left( {\varsigma 65 \;{\rm {\bf k}}\times {\textbf {U}}_h } \right)\;dv} =0 66 \end{equation} 67 68 \begin{equation} \label{eq:vor_enstrophy} 69 if\quad \chi =0\quad \quad \int\limits_D {\varsigma \;{\textbf{k}}\cdot 70 \frac{1}{e_3 }\nabla \times \left( {\varsigma {\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =-\int\limits_D {\frac{1}{2}\varsigma ^2\,\chi \;dv} 71 =0 72 \end{equation} 73 74 \begin{equation} \label{eq:vor_energy} 75 \int_D {{\textbf{U}}_h \times \left( {\varsigma \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =0 76 \end{equation} 64 \[ 65 % \label{eq:vor_vorticity} 66 \int_D {{\textbf {k}}\cdot \frac{1}{e_3 }\nabla \times \left( {\varsigma 67 \;{\rm {\bf k}}\times {\textbf {U}}_h } \right)\;dv} =0 68 \] 69 70 \[ 71 % \label{eq:vor_enstrophy} 72 if\quad \chi =0\quad \quad \int\limits_D {\varsigma \;{\textbf{k}}\cdot 73 \frac{1}{e_3 }\nabla \times \left( {\varsigma {\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =-\int\limits_D {\frac{1}{2}\varsigma ^2\,\chi \;dv} 74 =0 75 \] 76 77 \[ 78 % \label{eq:vor_energy} 79 \int_D {{\textbf{U}}_h \times \left( {\varsigma \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =0 80 \] 77 81 where $dv = e_1\, e_2\, e_3\, di\, dj\, dk$ is the volume element. 78 82 (II.4.1a) means that $\varsigma $ is conserved. (II.4.1b) is obtained by an integration by part. … … 122 126 potential energy due to buoyancy forces: 123 127 124 \begin{equation} \label{eq:hpg_pe} 125 \int_D {-\frac{1}{\rho _o }\left. {\nabla p^h} \right|_z \cdot {\textbf {U}}_h \;dv} \;=\;\int_D {\nabla .\left( {\rho \,{\textbf{U}}} \right)\;g\;z\;\;dv} 126 \end{equation} 128 \[ 129 % \label{eq:hpg_pe} 130 \int_D {-\frac{1}{\rho_o }\left. {\nabla p^h} \right|_z \cdot {\textbf {U}}_h \;dv} \;=\;\int_D {\nabla .\left( {\rho \,{\textbf{U}}} \right)\;g\;z\;\;dv} 131 \] 127 132 128 133 Using the discrete form given in {\S}~II.2-a and the symmetry or anti-symmetry properties of … … 142 147 In addition, with the rigid-lid approximation, the change of horizontal kinetic energy due to the work of 143 148 surface pressure forces is exactly zero: 144 \begin{equation} \label{eq:spg} 145 \int_D {-\frac{1}{\rho _o }\nabla _h } \left( {p_s } \right)\cdot {\textbf{U}}_h \;dv=0 146 \end{equation} 149 \[ 150 % \label{eq:spg} 151 \int_D {-\frac{1}{\rho_o }\nabla _h } \left( {p_s } \right)\cdot {\textbf{U}}_h \;dv=0 152 \] 147 153 148 154 (II.4.4) is satisfied in discrete form only if … … 159 165 In continuous formulation, the advective terms of the tracer equations conserve the tracer content and 160 166 the quadratic form of the tracer, $i.e.$ 161 \begin{equation} \label{eq:tra_tra2} 162 \int_D {\nabla .\left( {T\;{\textbf{U}}} \right)\;dv} =0 163 \;\text{and} 164 \int_D {T\;\nabla .\left( {T\;{\textbf{U}}} \right)\;dv} =0 165 \end{equation} 167 \[ 168 % \label{eq:tra_tra2} 169 \int_D {\nabla .\left( {T\;{\textbf{U}}} \right)\;dv} =0 170 \;\text{and} 171 \int_D {T\;\nabla .\left( {T\;{\textbf{U}}} \right)\;dv} =0 172 \] 166 173 167 174 The numerical scheme used ({\S}II.2-b) (equations in flux form, second order centred finite differences) satisfies … … 180 187 181 188 The continuous formulation of the horizontal diffusion of momentum satisfies the following integral constraints~: 182 \begin{equation} \label{eq:dynldf_dyn} 183 \int\limits_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left[ {\nabla 184 _h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left( {A^{lm}\;\zeta 185 \;{\rm {\bf k}}} \right)} \right]\;dv} =0 186 \end{equation} 187 188 \begin{equation} \label{eq:dynldf_div} 189 \int\limits_D {\nabla _h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi } 190 \right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)} 191 \right]\;dv} =0 192 \end{equation} 193 194 \begin{equation} \label{eq:dynldf_curl} 195 \int_D {{\rm {\bf U}}_h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi } 196 \right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)} 197 \right]\;dv} \leqslant 0 198 \end{equation} 199 200 \begin{equation} \label{eq:dynldf_curl2} 201 \mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\zeta \;{\rm {\bf k}}\cdot 202 \nabla \times \left[ {\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h 203 \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)} \right]\;dv} 204 \leqslant 0 205 \end{equation} 206 207 \begin{equation} \label{eq:dynldf_div2} 208 \mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\chi \;\nabla _h \cdot \left[ 209 {\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left( 210 {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)} \right]\;dv} \leqslant 0 211 \end{equation} 189 \[ 190 % \label{eq:dynldf_dyn} 191 \int\limits_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left[ {\nabla 192 _h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left( {A^{lm}\;\zeta 193 \;{\rm {\bf k}}} \right)} \right]\;dv} =0 194 \] 195 196 \[ 197 % \label{eq:dynldf_div} 198 \int\limits_D {\nabla _h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi } 199 \right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)} 200 \right]\;dv} =0 201 \] 202 203 \[ 204 % \label{eq:dynldf_curl} 205 \int_D {{\rm {\bf U}}_h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi } 206 \right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)} 207 \right]\;dv} \leqslant 0 208 \] 209 210 \[ 211 % \label{eq:dynldf_curl2} 212 \mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\zeta \;{\rm {\bf k}}\cdot 213 \nabla \times \left[ {\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h 214 \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)} \right]\;dv} 215 \leqslant 0 216 \] 217 218 \[ 219 % \label{eq:dynldf_div2} 220 \mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\chi \;\nabla _h \cdot \left[ 221 {\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left( 222 {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)} \right]\;dv} \leqslant 0 223 \] 212 224 213 225 … … 237 249 conservation of momentum, dissipation of horizontal kinetic energy 238 250 239 \begin{equation} \label{eq:dynzdf_dyn} 240 \begin{aligned} 241 & \int_D {\frac{1}{e_3 }} \frac{\partial }{\partial k}\left( \frac{A^{vm}}{e_3 }\frac{\partial {\textbf{U}}_h }{\partial k} \right) \;dv = \overrightarrow{\textbf{0}} \\ 242 & \int_D \textbf{U}_h \cdot \frac{1}{e_3} \frac{\partial}{\partial k} \left( {\frac{A^{vm}}{e_3 }}{\frac{\partial \textbf{U}_h }{\partial k}} \right) \;dv \leq 0 \\ 243 \end{aligned} 244 \end{equation} 251 \[ 252 % \label{eq:dynzdf_dyn} 253 \begin{aligned} 254 & \int_D {\frac{1}{e_3 }} \frac{\partial }{\partial k}\left( \frac{A^{vm}}{e_3 }\frac{\partial {\textbf{U}}_h }{\partial k} \right) \;dv = \overrightarrow{\textbf{0}} \\ 255 & \int_D \textbf{U}_h \cdot \frac{1}{e_3} \frac{\partial}{\partial k} \left( {\frac{A^{vm}}{e_3 }}{\frac{\partial \textbf{U}_h }{\partial k}} \right) \;dv \leq 0 \\ 256 \end{aligned} 257 \] 245 258 conservation of vorticity, dissipation of enstrophy 246 \begin{equation} \label{eq:dynzdf_vor} 247 \begin{aligned} 248 & \int_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left( {\frac{1}{e_3 249 }\frac{\partial }{\partial k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm 250 {\bf U}}_h }{\partial k}} \right)} \right)\;dv} =0 \\ 251 & \int_D {\zeta \,{\rm {\bf k}}\cdot \nabla \times \left( {\frac{1}{e_3 252 }\frac{\partial }{\partial k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm 253 {\bf U}}_h }{\partial k}} \right)} \right)\;dv} \leq 0 \\ 254 \end{aligned} 255 \end{equation} 259 \[ 260 % \label{eq:dynzdf_vor} 261 \begin{aligned} 262 & \int_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left( {\frac{1}{e_3 263 }\frac{\partial }{\partial k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm 264 {\bf U}}_h }{\partial k}} \right)} \right)\;dv} =0 \\ 265 & \int_D {\zeta \,{\rm {\bf k}}\cdot \nabla \times \left( {\frac{1}{e_3 266 }\frac{\partial }{\partial k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm 267 {\bf U}}_h }{\partial k}} \right)} \right)\;dv} \leq 0 \\ 268 \end{aligned} 269 \] 256 270 conservation of horizontal divergence, dissipation of square of the horizontal divergence 257 \begin{equation} \label{eq:dynzdf_div} 258 \begin{aligned} 259 &\int_D {\nabla \cdot \left( {\frac{1}{e_3 }\frac{\partial }{\partial 260 k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm {\bf U}}_h }{\partial k}} 261 \right)} \right)\;dv} =0 \\ 262 & \int_D {\chi \;\nabla \cdot \left( {\frac{1}{e_3 }\frac{\partial }{\partial 263 k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm {\bf U}}_h }{\partial k}} 264 \right)} \right)\;dv} \leq 0 \\ 265 \end{aligned} 266 \end{equation} 271 \[ 272 % \label{eq:dynzdf_div} 273 \begin{aligned} 274 &\int_D {\nabla \cdot \left( {\frac{1}{e_3 }\frac{\partial }{\partial 275 k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm {\bf U}}_h }{\partial k}} 276 \right)} \right)\;dv} =0 \\ 277 & \int_D {\chi \;\nabla \cdot \left( {\frac{1}{e_3 }\frac{\partial }{\partial 278 k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm {\bf U}}_h }{\partial k}} 279 \right)} \right)\;dv} \leq 0 \\ 280 \end{aligned} 281 \] 267 282 268 283 In discrete form, all these properties are satisfied in $z$-coordinate (see Appendix C). … … 286 301 variance, i.e. 287 302 288 \begin{equation} \label{eq:traldf_t_t2} 289 \begin{aligned} 290 &\int_D \nabla\, \cdot\, \left( A^{lT} \,\Re \,\nabla \,T \right)\;dv = 0 \\ 291 &\int_D \,T\, \nabla\, \cdot\, \left( A^{lT} \,\Re \,\nabla \,T \right)\;dv \leq 0 \\ 292 \end{aligned} 293 \end{equation} 303 \[ 304 % \label{eq:traldf_t_t2} 305 \begin{aligned} 306 &\int_D \nabla\, \cdot\, \left( A^{lT} \,\Re \,\nabla \,T \right)\;dv = 0 \\ 307 &\int_D \,T\, \nabla\, \cdot\, \left( A^{lT} \,\Re \,\nabla \,T \right)\;dv \leq 0 \\ 308 \end{aligned} 309 \] 294 310 295 311 \textbf{* vertical physics: }conservation of tracer, dissipation of tracer variance, $i.e.$ 296 312 297 \begin{equation} \label{eq:trazdf_t_t2} 298 \begin{aligned} 299 & \int_D \frac{1}{e_3 } \frac{\partial }{\partial k}\left( \frac{A^{vT}}{e_3 } \frac{\partial T}{\partial k} \right)\;dv = 0 \\ 300 & \int_D \,T \frac{1}{e_3 } \frac{\partial }{\partial k}\left( \frac{A^{vT}}{e_3 } \frac{\partial T}{\partial k} \right)\;dv \leq 0 \\ 301 \end{aligned} 302 \end{equation} 313 \[ 314 % \label{eq:trazdf_t_t2} 315 \begin{aligned} 316 & \int_D \frac{1}{e_3 } \frac{\partial }{\partial k}\left( \frac{A^{vT}}{e_3 } \frac{\partial T}{\partial k} \right)\;dv = 0 \\ 317 & \int_D \,T \frac{1}{e_3 } \frac{\partial }{\partial k}\left( \frac{A^{vT}}{e_3 } \frac{\partial T}{\partial k} \right)\;dv \leq 0 \\ 318 \end{aligned} 319 \] 303 320 304 321 Using the symmetry or anti-symmetry properties of the mean and difference operators, … … 311 328 It has not been implemented. 312 329 330 \biblio 331 313 332 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_misc.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ 4 % Chapter --- Miscellaneous Topics5 % Chapter --- Miscellaneous Topics 5 6 % ================================================================ 6 7 \chapter{Miscellaneous Topics} 7 8 \label{chap:MISC} 9 8 10 \minitoc 9 11 10 12 \newpage 11 $\ $\newline % force a new ligne12 13 13 14 % ================================================================ … … 64 65 \includegraphics[width=0.80\textwidth]{Fig_Gibraltar} 65 66 \includegraphics[width=0.80\textwidth]{Fig_Gibraltar2} 66 \caption{ \protect\label{fig:MISC_strait_hand} 67 \caption{ 68 \protect\label{fig:MISC_strait_hand} 67 69 Example of the Gibraltar strait defined in a $1^{\circ} \times 1^{\circ}$ mesh. 68 70 \textit{Top}: using partially open cells. … … 73 75 The four fmask parameters along the strait coastlines are set to a value larger than 4, 74 76 $i.e.$ "strong" no-slip case (see \autoref{fig:LBC_shlat}) creating a large viscous boundary layer that 75 allows a reduced transport through the strait.} 77 allows a reduced transport through the strait. 78 } 76 79 \end{center} 77 80 \end{figure} … … 146 149 \begin{center} 147 150 \includegraphics[width=0.90\textwidth]{Fig_LBC_zoom} 148 \caption{ \protect\label{fig:LBC_zoom} 151 \caption{ 152 \protect\label{fig:LBC_zoom} 149 153 Position of a model domain compared to the data input domain when the zoom functionality is used. 150 154 } … … 290 294 291 295 % ================================================================ 296 \biblio 297 292 298 \end{document} 293 294 295 296 -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_model_basics.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ 4 % Chapter 1 ÑModel Basics5 % Chapter 1 Model Basics 5 6 % ================================================================ 6 7 7 8 \chapter{Model Basics} 8 9 \label{chap:PE} 10 9 11 \minitoc 10 12 11 13 \newpage 12 $\ $\newline % force a new ligne13 14 14 15 % ================================================================ … … 62 63 (namely the momentum balance, the hydrostatic equilibrium, the incompressibility equation, 63 64 the heat and salt conservation equations and an equation of state): 64 \begin{subequations} \label{eq:PE} 65 \begin{equation} \label{eq:PE_dyn} 66 \frac{\partial {\rm {\bf U}}_h }{\partial t}= 67 -\left[ {\left( {\nabla \times {\rm {\bf U}}} \right)\times {\rm {\bf U}} 68 +\frac{1}{2}\nabla \left( {{\rm {\bf U}}^2} \right)} \right]_h 69 -f\;{\rm {\bf k}}\times {\rm {\bf U}}_h 70 -\frac{1}{\rho _o }\nabla _h p + {\rm {\bf D}}^{\rm {\bf U}} + {\rm {\bf F}}^{\rm {\bf U}} 65 \begin{subequations} 66 \label{eq:PE} 67 \begin{equation} 68 \label{eq:PE_dyn} 69 \frac{\partial {\rm {\bf U}}_h }{\partial t}= 70 -\left[ {\left( {\nabla \times {\rm {\bf U}}} \right)\times {\rm {\bf U}} 71 +\frac{1}{2}\nabla \left( {{\rm {\bf U}}^2} \right)} \right]_h 72 -f\;{\rm {\bf k}}\times {\rm {\bf U}}_h 73 -\frac{1}{\rho_o }\nabla _h p + {\rm {\bf D}}^{\rm {\bf U}} + {\rm {\bf F}}^{\rm {\bf U}} 71 74 \end{equation} 72 \begin{equation} \label{eq:PE_hydrostatic} 73 \frac{\partial p }{\partial z} = - \rho \ g 75 \begin{equation} 76 \label{eq:PE_hydrostatic} 77 \frac{\partial p }{\partial z} = - \rho \ g 74 78 \end{equation} 75 \begin{equation} \label{eq:PE_continuity} 76 \nabla \cdot {\bf U}= 0 79 \begin{equation} 80 \label{eq:PE_continuity} 81 \nabla \cdot {\bf U}= 0 77 82 \end{equation} 78 \begin{equation} \label{eq:PE_tra_T} 79 \frac{\partial T}{\partial t} = - \nabla \cdot \left( T \ \rm{\bf U} \right) + D^T + F^T 83 \begin{equation} 84 \label{eq:PE_tra_T} 85 \frac{\partial T}{\partial t} = - \nabla \cdot \left( T \ \rm{\bf U} \right) + D^T + F^T 80 86 \end{equation} 81 \begin{equation} \label{eq:PE_tra_S} 82 \frac{\partial S}{\partial t} = - \nabla \cdot \left( S \ \rm{\bf U} \right) + D^S + F^S 87 \begin{equation} 88 \label{eq:PE_tra_S} 89 \frac{\partial S}{\partial t} = - \nabla \cdot \left( S \ \rm{\bf U} \right) + D^S + F^S 83 90 \end{equation} 84 \begin{equation} \label{eq:PE_eos} 85 \rho = \rho \left( T,S,p \right) 91 \begin{equation} 92 \label{eq:PE_eos} 93 \rho = \rho \left( T,S,p \right) 86 94 \end{equation} 87 95 \end{subequations} … … 140 148 \item[Solid earth - ocean interface:] 141 149 heat and salt fluxes through the sea floor are small, except in special areas of little extent. 142 They are usually neglected in the model \footnote{ 150 They are usually neglected in the model 151 \footnote{ 143 152 In fact, it has been shown that the heat flux associated with the solid Earth cooling 144 153 ($i.e.$the geothermal heating) is not negligible for the thermohaline circulation of the world ocean … … 150 159 the bottom velocity is parallel to solid boundaries). This kinematic boundary condition 151 160 can be expressed as: 152 \begin{equation} \label{eq:PE_w_bbc} 161 \begin{equation} 162 \label{eq:PE_w_bbc} 153 163 w = -{\rm {\bf U}}_h \cdot \nabla _h \left( H \right) 154 164 \end{equation} … … 162 172 the kinematic surface condition plus the mass flux of fresh water PE (the precipitation minus evaporation budget) 163 173 leads to: 164 \begin{equation} \label{eq:PE_w_sbc} 174 \[ 175 % \label{eq:PE_w_sbc} 165 176 w = \frac{\partial \eta }{\partial t} 166 177 + \left. {{\rm {\bf U}}_h } \right|_{z=\eta } \cdot \nabla _h \left( \eta \right) 167 178 + P-E 168 \ end{equation}179 \] 169 180 The dynamic boundary condition, neglecting the surface tension (which removes capillary waves from the system) 170 181 leads to the continuity of pressure across the interface $z=\eta$. … … 179 190 180 191 %\newpage 181 %$\ $\newline % force a new ligne182 192 183 193 % ================================================================ … … 199 209 assuming that pressure in decibars can be approximated by depth in meters in (\autoref{eq:PE_eos}). 200 210 The hydrostatic pressure is then given by: 201 \begin{equation} \label{eq:PE_pressure} 202 p_h \left( {i,j,z,t} \right) 203 = \int_{\varsigma =z}^{\varsigma =0} {g\;\rho \left( {T,S,\varsigma} \right)\;d\varsigma } 204 \end{equation} 211 \[ 212 % \label{eq:PE_pressure} 213 p_h \left( {i,j,z,t} \right) 214 = \int_{\varsigma =z}^{\varsigma =0} {g\;\rho \left( {T,S,\varsigma} \right)\;d\varsigma } 215 \] 205 216 Two strategies can be considered for the surface pressure term: 206 217 $(a)$ introduce of a new variable $\eta$, the free-surface elevation, … … 231 242 This variable is solution of a prognostic equation which is established by forming the vertical average of 232 243 the kinematic surface condition (\autoref{eq:PE_w_bbc}): 233 \begin{equation} \label{eq:PE_ssh} 234 \frac{\partial \eta }{\partial t}=-D+P-E 235 \quad \text{where} \ 236 D=\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right] 244 \begin{equation} 245 \label{eq:PE_ssh} 246 \frac{\partial \eta }{\partial t}=-D+P-E 247 \quad \text{where} \ 248 D=\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right] 237 249 \end{equation} 238 250 and using (\autoref{eq:PE_hydrostatic}) the surface pressure is given by: $p_s = \rho \, g \, \eta$. … … 275 287 276 288 %\newpage 277 %$\ $\newline % force a new line278 289 279 290 % ================================================================ … … 318 329 The local deformation of the curvilinear coordinate system is given by $e_1$, $e_2$ and $e_3$, 319 330 the three scale factors: 320 \begin{equation} \label{eq:scale_factors} 331 \begin{equation} 332 \label{eq:scale_factors} 321 333 \begin{aligned} 322 334 e_1 &=\left( {a+z} \right)\;\left[ {\left( {\frac{\partial \lambda}{\partial i}\cos \varphi } \right)^2 … … 346 358 (\autoref{eq:PE_dyn} to \autoref{eq:PE_eos}) can be written in the tensorial form, 347 359 invariant in any orthogonal horizontal curvilinear coordinate system transformation: 348 \begin{subequations} \label{eq:PE_discrete_operators} 349 \begin{equation} \label{eq:PE_grad} 350 \nabla q=\frac{1}{e_1 }\frac{\partial q}{\partial i}\;{\rm {\bf 351 i}}+\frac{1}{e_2 }\frac{\partial q}{\partial j}\;{\rm {\bf j}}+\frac{1}{e_3 352 }\frac{\partial q}{\partial k}\;{\rm {\bf k}} \\ 353 \end{equation} 354 \begin{equation} \label{eq:PE_div} 355 \nabla \cdot {\rm {\bf A}} 356 = \frac{1}{e_1 \; e_2} \left[ 357 \frac{\partial \left(e_2 \; a_1\right)}{\partial i } 358 +\frac{\partial \left(e_1 \; a_2\right)}{\partial j } \right] 359 + \frac{1}{e_3} \left[ \frac{\partial a_3}{\partial k } \right] 360 \end{equation} 361 \begin{equation} \label{eq:PE_curl} 362 \begin{split} 363 \nabla \times \vect{A} = 364 \left[ {\frac{1}{e_2 }\frac{\partial a_3}{\partial j} 365 -\frac{1}{e_3 }\frac{\partial a_2 }{\partial k}} \right] \; \vect{i} 366 &+\left[ {\frac{1}{e_3 }\frac{\partial a_1 }{\partial k} 367 -\frac{1}{e_1 }\frac{\partial a_3 }{\partial i}} \right] \; \vect{j} \\ 368 &+\frac{1}{e_1 e_2 } \left[ {\frac{\partial \left( {e_2 a_2 } \right)}{\partial i} 369 -\frac{\partial \left( {e_1 a_1 } \right)}{\partial j}} \right] \; \vect{k} 370 \end{split} 371 \end{equation} 372 \begin{equation} \label{eq:PE_lap} 373 \Delta q = \nabla \cdot \left( \nabla q \right) 374 \end{equation} 375 \begin{equation} \label{eq:PE_lap_vector} 376 \Delta {\rm {\bf A}} = 377 \nabla \left( \nabla \cdot {\rm {\bf A}} \right) 378 - \nabla \times \left( \nabla \times {\rm {\bf A}} \right) 379 \end{equation} 360 \begin{subequations} 361 % \label{eq:PE_discrete_operators} 362 \begin{equation} 363 \label{eq:PE_grad} 364 \nabla q=\frac{1}{e_1 }\frac{\partial q}{\partial i}\;{\rm {\bf 365 i}}+\frac{1}{e_2 }\frac{\partial q}{\partial j}\;{\rm {\bf j}}+\frac{1}{e_3 366 }\frac{\partial q}{\partial k}\;{\rm {\bf k}} \\ 367 \end{equation} 368 \begin{equation} 369 \label{eq:PE_div} 370 \nabla \cdot {\rm {\bf A}} 371 = \frac{1}{e_1 \; e_2} \left[ 372 \frac{\partial \left(e_2 \; a_1\right)}{\partial i } 373 +\frac{\partial \left(e_1 \; a_2\right)}{\partial j } \right] 374 + \frac{1}{e_3} \left[ \frac{\partial a_3}{\partial k } \right] 375 \end{equation} 376 \begin{equation} 377 \label{eq:PE_curl} 378 \begin{split} 379 \nabla \times \vect{A} = 380 \left[ {\frac{1}{e_2 }\frac{\partial a_3}{\partial j} 381 -\frac{1}{e_3 }\frac{\partial a_2 }{\partial k}} \right] \; \vect{i} 382 &+\left[ {\frac{1}{e_3 }\frac{\partial a_1 }{\partial k} 383 -\frac{1}{e_1 }\frac{\partial a_3 }{\partial i}} \right] \; \vect{j} \\ 384 &+\frac{1}{e_1 e_2 } \left[ {\frac{\partial \left( {e_2 a_2 } \right)}{\partial i} 385 -\frac{\partial \left( {e_1 a_1 } \right)}{\partial j}} \right] \; \vect{k} 386 \end{split} 387 \end{equation} 388 \begin{equation} 389 \label{eq:PE_lap} 390 \Delta q = \nabla \cdot \left( \nabla q \right) 391 \end{equation} 392 \begin{equation} 393 \label{eq:PE_lap_vector} 394 \Delta {\rm {\bf A}} = 395 \nabla \left( \nabla \cdot {\rm {\bf A}} \right) 396 - \nabla \times \left( \nabla \times {\rm {\bf A}} \right) 397 \end{equation} 380 398 \end{subequations} 381 399 where $q$ is a scalar quantity and ${\rm {\bf A}}=(a_1,a_2,a_3)$ a vector in the $(i,j,k)$ coordinate system. … … 392 410 Let us set $\vect U=(u,v,w)={\vect{U}}_h +w\;\vect{k}$, the velocity in the $(i,j,k)$ coordinate system and 393 411 define the relative vorticity $\zeta$ and the divergence of the horizontal velocity field $\chi$, by: 394 \begin{equation} \label{eq:PE_curl_Uh} 395 \zeta =\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 \,v} 396 \right)}{\partial i}-\frac{\partial \left( {e_1 \,u} \right)}{\partial j}} 397 \right] 412 \begin{equation} 413 \label{eq:PE_curl_Uh} 414 \zeta =\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 \,v} 415 \right)}{\partial i}-\frac{\partial \left( {e_1 \,u} \right)}{\partial j}} 416 \right] 398 417 \end{equation} 399 \begin{equation} \label{eq:PE_div_Uh} 400 \chi =\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 \,u} 401 \right)}{\partial i}+\frac{\partial \left( {e_1 \,v} \right)}{\partial j}} 402 \right] 418 \begin{equation} 419 \label{eq:PE_div_Uh} 420 \chi =\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 \,u} 421 \right)}{\partial i}+\frac{\partial \left( {e_1 \,v} \right)}{\partial j}} 422 \right] 403 423 \end{equation} 404 424 … … 407 427 the nonlinear term of \autoref{eq:PE_dyn} can be transformed as follows: 408 428 \begin{flalign*} 409 &\left[ {\left( { \nabla \times {\rm {\bf U}} } \right) \times {\rm {\bf U}}410 +\frac{1}{2} \nabla \left( {{\rm {\bf U}}^2} \right)} \right]_h &429 &\left[ {\left( { \nabla \times {\rm {\bf U}} } \right) \times {\rm {\bf U}} 430 +\frac{1}{2} \nabla \left( {{\rm {\bf U}}^2} \right)} \right]_h & 411 431 \end{flalign*} 412 432 \begin{flalign*} 413 &\qquad=\left( {{\begin{array}{*{20}c} 414 {\left[ { \frac{1}{e_3} \frac{\partial u }{\partial k} 415 -\frac{1}{e_1} \frac{\partial w }{\partial i} } \right] w - \zeta \; v } \\ 416 {\zeta \; u - \left[ { \frac{1}{e_2} \frac{\partial w}{\partial j} 417 -\frac{1}{e_3} \frac{\partial v}{\partial k} } \right] \ w} \\ 418 \end{array} }} \right) 419 +\frac{1}{2} \left( {{\begin{array}{*{20}c} 420 { \frac{1}{e_1} \frac{\partial \left( u^2+v^2+w^2 \right)}{\partial i}} \hfill \\ 421 { \frac{1}{e_2} \frac{\partial \left( u^2+v^2+w^2 \right)}{\partial j}} \hfill \\ 422 \end{array} }} \right) & 433 &\qquad=\left( {{ 434 \begin{array}{*{20}c} 435 {\left[ { \frac{1}{e_3} \frac{\partial u }{\partial k} 436 -\frac{1}{e_1} \frac{\partial w }{\partial i} } \right] w - \zeta \; v } \\ 437 {\zeta \; u - \left[ { \frac{1}{e_2} \frac{\partial w}{\partial j} 438 -\frac{1}{e_3} \frac{\partial v}{\partial k} } \right] \ w} \\ 439 \end{array} 440 }} \right) 441 +\frac{1}{2} \left( {{ 442 \begin{array}{*{20}c} 443 { \frac{1}{e_1} \frac{\partial \left( u^2+v^2+w^2 \right)}{\partial i}} \hfill \\ 444 { \frac{1}{e_2} \frac{\partial \left( u^2+v^2+w^2 \right)}{\partial j}} \hfill \\ 445 \end{array} 446 }} \right) & 423 447 \end{flalign*} 424 448 \begin{flalign*} 425 & \qquad =\left( {{ \begin{array}{*{20}c} 426 {-\zeta \; v} \hfill \\ 427 { \zeta \; u} \hfill \\ 428 \end{array} }} \right) 429 +\frac{1}{2}\left( {{ \begin{array}{*{20}c} 430 {\frac{1}{e_1 }\frac{\partial \left( {u^2+v^2} \right)}{\partial i}} \hfill \\ 431 {\frac{1}{e_2 }\frac{\partial \left( {u^2+v^2} \right)}{\partial j}} \hfill \\ 432 \end{array} }} \right) 433 +\frac{1}{e_3 }\left( {{ \begin{array}{*{20}c} 434 { w \; \frac{\partial u}{\partial k}} \\ 435 { w \; \frac{\partial v}{\partial k}} \\ 436 \end{array} }} \right) 437 -\left( {{ \begin{array}{*{20}c} 438 {\frac{w}{e_1}\frac{\partial w}{\partial i} 439 -\frac{1}{2e_1}\frac{\partial w^2}{\partial i}} \hfill \\ 440 {\frac{w}{e_2}\frac{\partial w}{\partial j} 441 -\frac{1}{2e_2}\frac{\partial w^2}{\partial j}} \hfill \\ 442 \end{array} }} \right) & 449 & \qquad =\left( {{ 450 \begin{array}{*{20}c} 451 {-\zeta \; v} \hfill \\ 452 { \zeta \; u} \hfill \\ 453 \end{array} 454 }} \right) 455 +\frac{1}{2}\left( {{ 456 \begin{array}{*{20}c} 457 {\frac{1}{e_1 }\frac{\partial \left( {u^2+v^2} \right)}{\partial i}} \hfill \\ 458 {\frac{1}{e_2 }\frac{\partial \left( {u^2+v^2} \right)}{\partial j}} \hfill \\ 459 \end{array} 460 }} \right) 461 +\frac{1}{e_3 }\left( {{ 462 \begin{array}{*{20}c} 463 { w \; \frac{\partial u}{\partial k}} \\ 464 { w \; \frac{\partial v}{\partial k}} \\ 465 \end{array} 466 }} \right) 467 -\left( {{ 468 \begin{array}{*{20}c} 469 {\frac{w}{e_1}\frac{\partial w}{\partial i} -\frac{1}{2e_1}\frac{\partial w^2}{\partial i}} \hfill \\ 470 {\frac{w}{e_2}\frac{\partial w}{\partial j} -\frac{1}{2e_2}\frac{\partial w^2}{\partial j}} \hfill \\ 471 \end{array} 472 }} \right) & 443 473 \end{flalign*} 444 474 445 475 The last term of the right hand side is obviously zero, and thus the nonlinear term of 446 476 \autoref{eq:PE_dyn} is written in the $(i,j,k)$ coordinate system: 447 \begin{equation} \label{eq:PE_vector_form} 448 \left[ {\left( { \nabla \times {\rm {\bf U}} } \right) \times {\rm {\bf U}} 449 +\frac{1}{2} \nabla \left( {{\rm {\bf U}}^2} \right)} \right]_h 450 =\zeta 451 \;{\rm {\bf k}}\times {\rm {\bf U}}_h +\frac{1}{2}\nabla _h \left( {{\rm 452 {\bf U}}_h^2 } \right)+\frac{1}{e_3 }w\frac{\partial {\rm {\bf U}}_h 453 }{\partial k} 477 \begin{equation} 478 \label{eq:PE_vector_form} 479 \left[ {\left( { \nabla \times {\rm {\bf U}} } \right) \times {\rm {\bf U}} 480 +\frac{1}{2} \nabla \left( {{\rm {\bf U}}^2} \right)} \right]_h 481 =\zeta 482 \;{\rm {\bf k}}\times {\rm {\bf U}}_h +\frac{1}{2}\nabla _h \left( {{\rm 483 {\bf U}}_h^2 } \right)+\frac{1}{e_3 }w\frac{\partial {\rm {\bf U}}_h 484 }{\partial k} 454 485 \end{equation} 455 486 … … 459 490 For example, the first component of \autoref{eq:PE_vector_form} (the $i$-component) is transformed as follows: 460 491 \begin{flalign*} 461 &{ \begin{array}{*{20}l} 462 \left[ {\left( {\nabla \times \vect{U}} \right)\times \vect{U} 463 +\frac{1}{2}\nabla \left( {\vect{U}}^2 \right)} \right]_i % \\ 464 %\\ 465 = - \zeta \;v 466 + \frac{1}{2\;e_1 } \frac{\partial \left( {u^2+v^2} \right)}{\partial i} 467 + \frac{1}{e_3}w \ \frac{\partial u}{\partial k} \\ 468 \\ 469 \qquad =\frac{1}{e_1 \; e_2} \left( -v\frac{\partial \left( {e_2 \,v} \right)}{\partial i} 470 +v\frac{\partial \left( {e_1 \,u} \right)}{\partial j} \right) 471 +\frac{1}{e_1 e_2 }\left( +e_2 \; u\frac{\partial u}{\partial i} 472 +e_2 \; v\frac{\partial v}{\partial i} \right) 473 +\frac{1}{e_3} \left( w\;\frac{\partial u}{\partial k} \right) \\ 474 \end{array} } & 492 &{ 493 \begin{array}{*{20}l} 494 \left[ {\left( {\nabla \times \vect{U}} \right)\times \vect{U} 495 +\frac{1}{2}\nabla \left( {\vect{U}}^2 \right)} \right]_i % \\ 496 % \\ 497 = - \zeta \;v 498 + \frac{1}{2\;e_1 } \frac{\partial \left( {u^2+v^2} \right)}{\partial i} 499 + \frac{1}{e_3}w \ \frac{\partial u}{\partial k} \\ \\ 500 \qquad =\frac{1}{e_1 \; e_2} \left( -v\frac{\partial \left( {e_2 \,v} \right)}{\partial i} 501 +v\frac{\partial \left( {e_1 \,u} \right)}{\partial j} \right) 502 +\frac{1}{e_1 e_2 }\left( +e_2 \; u\frac{\partial u}{\partial i} 503 +e_2 \; v\frac{\partial v}{\partial i} \right) 504 +\frac{1}{e_3} \left( w\;\frac{\partial u}{\partial k} \right) \\ 505 \end{array} 506 } & 475 507 \end{flalign*} 476 508 \begin{flalign*} 477 &{ \begin{array}{*{20}l} 478 \qquad =\frac{1}{e_1 \; e_2} \left\{ 479 -\left( v^2 \frac{\partial e_2 }{\partial i} 509 &{ 510 \begin{array}{*{20}l} 511 \qquad =\frac{1}{e_1 \; e_2} \left\{ 512 -\left( v^2 \frac{\partial e_2 }{\partial i} 480 513 +e_2 \,v \frac{\partial v }{\partial i} \right) 481 +\left( \frac{\partial \left( {e_1 \,u\,v} \right)}{\partial j}482 -e_1 \,u \frac{\partial v }{\partial j} \right) \right. 483 \\\left. \qquad \qquad \quad484 +\left( \frac{\partial \left( {e_2 u\,u} \right)}{\partial i}514 +\left( \frac{\partial \left( {e_1 \,u\,v} \right)}{\partial j} 515 -e_1 \,u \frac{\partial v }{\partial j} \right) \right. \\ 516 \left. \qquad \qquad \quad 517 +\left( \frac{\partial \left( {e_2 u\,u} \right)}{\partial i} 485 518 -u \frac{\partial \left( {e_2 u} \right)}{\partial i} \right) 486 +e_2 v \frac{\partial v }{\partial i} 487 \right\} 488 +\frac{1}{e_3} \left( 489 \frac{\partial \left( {w\,u} \right) }{\partial k} 490 -u \frac{\partial w }{\partial k} \right) \\ 491 \end{array} } & 519 +e_2 v \frac{\partial v }{\partial i} 520 \right\} 521 +\frac{1}{e_3} \left( 522 \frac{\partial \left( {w\,u} \right) }{\partial k} 523 -u \frac{\partial w }{\partial k} \right) \\ 524 \end{array} 525 } & 492 526 \end{flalign*} 493 527 \begin{flalign*} 494 &{ \begin{array}{*{20}l} 495 \qquad =\frac{1}{e_1 \; e_2} \left( 496 \frac{\partial \left( {e_2 \,u\,u} \right)}{\partial i} 528 & 529 { 530 \begin{array}{*{20}l} 531 \qquad =\frac{1}{e_1 \; e_2} \left( 532 \frac{\partial \left( {e_2 \,u\,u} \right)}{\partial i} 497 533 + \frac{\partial \left( {e_1 \,u\,v} \right)}{\partial j} \right) 498 +\frac{1}{e_3 } \frac{\partial \left( {w\,u } \right)}{\partial k} 499 \\\qquad \qquad \quad500 +\frac{1}{e_1 e_2 } \left( 534 +\frac{1}{e_3 } \frac{\partial \left( {w\,u } \right)}{\partial k} \\ 535 \qquad \qquad \quad 536 +\frac{1}{e_1 e_2 } \left( 501 537 -u \left( \frac{\partial \left( {e_1 v } \right)}{\partial j} 502 538 -v\,\frac{\partial e_1 }{\partial j} \right) 503 539 -u \frac{\partial \left( {e_2 u } \right)}{\partial i} 504 \right) 505 -\frac{1}{e_3 } \frac{\partial w}{\partial k} u 506 +\frac{1}{e_1 e_2 }\left( -v^2\frac{\partial e_2 }{\partial i} \right) 507 \end{array} } & 540 \right) 541 -\frac{1}{e_3 } \frac{\partial w}{\partial k} u 542 +\frac{1}{e_1 e_2 }\left( -v^2\frac{\partial e_2 }{\partial i} \right) 543 \end{array} 544 } & 508 545 \end{flalign*} 509 546 \begin{flalign*} 510 &{ \begin{array}{*{20}l} 511 \qquad = \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) 512 - \left( \nabla \cdot {\rm {\bf U}} \right) \ u 513 +\frac{1}{e_1 e_2 }\left( 547 &{ 548 \begin{array}{*{20}l} 549 \qquad = \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) 550 - \left( \nabla \cdot {\rm {\bf U}} \right) \ u 551 +\frac{1}{e_1 e_2 }\left( 514 552 -v^2 \frac{\partial e_2 }{\partial i} 515 553 +uv \, \frac{\partial e_1 }{\partial j} \right) \\ 516 \end{array} } & 554 \end{array} 555 } & 517 556 \end{flalign*} 518 557 as $\nabla \cdot {\rm {\bf U}}\;=0$ (incompressibility) it comes: 519 558 \begin{flalign*} 520 &{ \begin{array}{*{20}l} 521 \qquad = \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) 522 + \frac{1}{e_1 e_2 } \left( v \; \frac{\partial e_2}{\partial i} 523 -u \; \frac{\partial e_1}{\partial j} \right) \left( -v \right) 524 \end{array} } & 559 &{ 560 \begin{array}{*{20}l} 561 \qquad = \nabla \cdot \left( {{\rm {\bf U}}\,u} \right) 562 + \frac{1}{e_1 e_2 } \left( v \; \frac{\partial e_2}{\partial i} 563 -u \; \frac{\partial e_1}{\partial j} \right) \left( -v \right) 564 \end{array} 565 } & 525 566 \end{flalign*} 526 567 527 568 The flux form of the momentum advection term is therefore given by: 528 \begin{multline} \label{eq:PE_flux_form} 529 \left[ 530 \left( {\nabla \times {\rm {\bf U}}} \right) \times {\rm {\bf U}} 531 +\frac{1}{2} \nabla \left( {{\rm {\bf U}}^2} \right) 532 \right]_h 533 \\ 534 = \nabla \cdot \left( {{\begin{array}{*{20}c} {\rm {\bf U}} \, u \hfill \\ 535 {\rm {\bf U}} \, v \hfill \\ 536 \end{array} }} 537 \right) 538 +\frac{1}{e_1 e_2 } \left( 539 v\frac{\partial e_2}{\partial i} 540 -u\frac{\partial e_1}{\partial j} 541 \right) {\rm {\bf k}} \times {\rm {\bf U}}_h 569 \begin{multline} 570 \label{eq:PE_flux_form} 571 \left[ 572 \left( {\nabla \times {\rm {\bf U}}} \right) \times {\rm {\bf U}} 573 +\frac{1}{2} \nabla \left( {{\rm {\bf U}}^2} \right) 574 \right]_h \\ 575 = \nabla \cdot \left( {{ 576 \begin{array}{*{20}c} 577 {\rm {\bf U}} \, u \hfill \\ 578 {\rm {\bf U}} \, v \hfill \\ 579 \end{array} 580 }} 581 \right) 582 +\frac{1}{e_1 e_2 } \left( 583 v\frac{\partial e_2}{\partial i} 584 -u\frac{\partial e_1}{\partial j} 585 \right) {\rm {\bf k}} \times {\rm {\bf U}}_h 542 586 \end{multline} 543 587 … … 546 590 and the second one is due to the curvilinear nature of the coordinate system used. 547 591 The latter is called the \emph{metric} term and can be viewed as a modification of the Coriolis parameter: 548 \begin{equation} \label{eq:PE_cor+metric} 549 f \to f + \frac{1}{e_1\;e_2} \left( v \frac{\partial e_2}{\partial i} 550 -u \frac{\partial e_1}{\partial j} \right) 551 \end{equation} 592 \[ 593 % \label{eq:PE_cor+metric} 594 f \to f + \frac{1}{e_1\;e_2} \left( v \frac{\partial e_2}{\partial i} 595 -u \frac{\partial e_1}{\partial j} \right) 596 \] 552 597 553 598 Note that in the case of geographical coordinate, … … 555 600 we recover the commonly used modification of the Coriolis parameter $f \to f+(u/a) \tan \varphi$. 556 601 557 558 $\ $\newline % force a new ligne559 560 602 To sum up, the curvilinear $z$-coordinate equations solved by the ocean model can be written in 561 603 the following tensorial formalism: … … 564 606 $\bullet$ \textbf{Vector invariant form of the momentum equations} : 565 607 566 \begin{subequations} \label{eq:PE_dyn_vect} 567 \begin{equation} \label{eq:PE_dyn_vect_u} \begin{split} 568 \frac{\partial u}{\partial t} 569 = + \left( {\zeta +f} \right)\,v 570 - \frac{1}{2\,e_1} \frac{\partial}{\partial i} \left( u^2+v^2 \right) 571 - \frac{1}{e_3 } w \frac{\partial u}{\partial k} & \\ 572 - \frac{1}{e_1 } \frac{\partial}{\partial i} \left( \frac{p_s+p_h }{\rho _o} \right) 573 &+ D_u^{\vect{U}} + F_u^{\vect{U}} \\ 574 \\ 575 \frac{\partial v}{\partial t} = 576 - \left( {\zeta +f} \right)\,u 577 - \frac{1}{2\,e_2 } \frac{\partial }{\partial j}\left( u^2+v^2 \right) 578 - \frac{1}{e_3 } w \frac{\partial v}{\partial k} & \\ 579 - \frac{1}{e_2 } \frac{\partial }{\partial j}\left( \frac{p_s+p_h }{\rho _o} \right) 580 &+ D_v^{\vect{U}} + F_v^{\vect{U}} 581 \end{split} \end{equation} 608 \begin{subequations} 609 \label{eq:PE_dyn_vect} 610 \[ 611 % \label{eq:PE_dyn_vect_u} 612 \begin{split} 613 \frac{\partial u}{\partial t} 614 = + \left( {\zeta +f} \right)\,v 615 - \frac{1}{2\,e_1} \frac{\partial}{\partial i} \left( u^2+v^2 \right) 616 - \frac{1}{e_3 } w \frac{\partial u}{\partial k} & \\ 617 - \frac{1}{e_1 } \frac{\partial}{\partial i} \left( \frac{p_s+p_h }{\rho_o} \right) 618 &+ D_u^{\vect{U}} + F_u^{\vect{U}} \\ \\ 619 \frac{\partial v}{\partial t} = 620 - \left( {\zeta +f} \right)\,u 621 - \frac{1}{2\,e_2 } \frac{\partial }{\partial j}\left( u^2+v^2 \right) 622 - \frac{1}{e_3 } w \frac{\partial v}{\partial k} & \\ 623 - \frac{1}{e_2 } \frac{\partial }{\partial j}\left( \frac{p_s+p_h }{\rho_o} \right) 624 &+ D_v^{\vect{U}} + F_v^{\vect{U}} 625 \end{split} 626 \] 582 627 \end{subequations} 583 628 … … 585 630 \vspace{+10pt} 586 631 $\bullet$ \textbf{flux form of the momentum equations} : 587 \begin{subequations} \label{eq:PE_dyn_flux} 588 \begin{multline} \label{eq:PE_dyn_flux_u} 589 \frac{\partial u}{\partial t}= 590 + \left( { f + \frac{1}{e_1 \; e_2} 591 \left( v \frac{\partial e_2}{\partial i} 592 -u \frac{\partial e_1}{\partial j} \right)} \right) \, v \\ 593 - \frac{1}{e_1 \; e_2} \left( 594 \frac{\partial \left( {e_2 \,u\,u} \right)}{\partial i} 632 \begin{subequations} 633 % \label{eq:PE_dyn_flux} 634 \begin{multline*} 635 % \label{eq:PE_dyn_flux_u} 636 \frac{\partial u}{\partial t}= 637 + \left( { f + \frac{1}{e_1 \; e_2} 638 \left( v \frac{\partial e_2}{\partial i} 639 -u \frac{\partial e_1}{\partial j} \right)} \right) \, v \\ 640 - \frac{1}{e_1 \; e_2} \left( 641 \frac{\partial \left( {e_2 \,u\,u} \right)}{\partial i} 595 642 + \frac{\partial \left( {e_1 \,v\,u} \right)}{\partial j} \right) 596 - \frac{1}{e_3 }\frac{\partial \left( { w\,u} \right)}{\partial k} \\ 597 - \frac{1}{e_1 }\frac{\partial}{\partial i}\left( \frac{p_s+p_h }{\rho _o} \right) 598 + D_u^{\vect{U}} + F_u^{\vect{U}} 599 \end{multline} 600 \begin{multline} \label{eq:PE_dyn_flux_v} 601 \frac{\partial v}{\partial t}= 602 - \left( { f + \frac{1}{e_1 \; e_2} 603 \left( v \frac{\partial e_2}{\partial i} 604 -u \frac{\partial e_1}{\partial j} \right)} \right) \, u \\ 605 \frac{1}{e_1 \; e_2} \left( 606 \frac{\partial \left( {e_2 \,u\,v} \right)}{\partial i} 643 - \frac{1}{e_3 }\frac{\partial \left( { w\,u} \right)}{\partial k} \\ 644 - \frac{1}{e_1 }\frac{\partial}{\partial i}\left( \frac{p_s+p_h }{\rho_o} \right) 645 + D_u^{\vect{U}} + F_u^{\vect{U}} 646 \end{multline*} 647 \begin{multline*} 648 % \label{eq:PE_dyn_flux_v} 649 \frac{\partial v}{\partial t}= 650 - \left( { f + \frac{1}{e_1 \; e_2} 651 \left( v \frac{\partial e_2}{\partial i} 652 -u \frac{\partial e_1}{\partial j} \right)} \right) \, u \\ 653 \frac{1}{e_1 \; e_2} \left( 654 \frac{\partial \left( {e_2 \,u\,v} \right)}{\partial i} 607 655 + \frac{\partial \left( {e_1 \,v\,v} \right)}{\partial j} \right) 608 609 - \frac{1}{e_2 }\frac{\partial }{\partial j}\left( \frac{p_s+p_h }{\rho_o} \right)610 + D_v^{\vect{U}} + F_v^{\vect{U}} 611 \end{multline}656 - \frac{1}{e_3 } \frac{\partial \left( { w\,v} \right)}{\partial k} \\ 657 - \frac{1}{e_2 }\frac{\partial }{\partial j}\left( \frac{p_s+p_h }{\rho_o} \right) 658 + D_v^{\vect{U}} + F_v^{\vect{U}} 659 \end{multline*} 612 660 \end{subequations} 613 661 where $\zeta$, the relative vorticity, is given by \autoref{eq:PE_curl_Uh} and 614 662 $p_s $, the surface pressure, is given by: 615 \begin{equation} \label{eq:PE_spg} 616 p_s = \rho \,g \,\eta 617 \end{equation} 663 \[ 664 % \label{eq:PE_spg} 665 p_s = \rho \,g \,\eta 666 \] 618 667 with $\eta$ is solution of \autoref{eq:PE_ssh}. 619 668 620 669 The vertical velocity and the hydrostatic pressure are diagnosed from the following equations: 621 \begin{equation} \label{eq:w_diag} 622 \frac{\partial w}{\partial k}=-\chi \;e_3 623 \end{equation} 624 \begin{equation} \label{eq:hp_diag} 625 \frac{\partial p_h }{\partial k}=-\rho \;g\;e_3 626 \end{equation} 670 \[ 671 % \label{eq:w_diag} 672 \frac{\partial w}{\partial k}=-\chi \;e_3 673 \] 674 \[ 675 % \label{eq:hp_diag} 676 \frac{\partial p_h }{\partial k}=-\rho \;g\;e_3 677 \] 627 678 where the divergence of the horizontal velocity, $\chi$ is given by \autoref{eq:PE_div_Uh}. 628 679 629 680 \vspace{+10pt} 630 681 $\bullet$ \textit{tracer equations} : 631 \begin{equation} \label{eq:S} 632 \frac{\partial T}{\partial t} = 633 -\frac{1}{e_1 e_2 }\left[ { \frac{\partial \left( {e_2 T\,u} \right)}{\partial i} 634 +\frac{\partial \left( {e_1 T\,v} \right)}{\partial j}} \right] 635 -\frac{1}{e_3 }\frac{\partial \left( {T\,w} \right)}{\partial k} + D^T + F^T 636 \end{equation} 637 \begin{equation} \label{eq:T} 638 \frac{\partial S}{\partial t} = 639 -\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 S\,u} \right)}{\partial i} 640 +\frac{\partial \left( {e_1 S\,v} \right)}{\partial j}} \right] 641 -\frac{1}{e_3 }\frac{\partial \left( {S\,w} \right)}{\partial k} + D^S + F^S 642 \end{equation} 643 \begin{equation} \label{eq:rho} 644 \rho =\rho \left( {T,S,z(k)} \right) 645 \end{equation} 682 \[ 683 % \label{eq:S} 684 \frac{\partial T}{\partial t} = 685 -\frac{1}{e_1 e_2 }\left[ { \frac{\partial \left( {e_2 T\,u} \right)}{\partial i} 686 +\frac{\partial \left( {e_1 T\,v} \right)}{\partial j}} \right] 687 -\frac{1}{e_3 }\frac{\partial \left( {T\,w} \right)}{\partial k} + D^T + F^T 688 \] 689 \[ 690 % \label{eq:T} 691 \frac{\partial S}{\partial t} = 692 -\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 S\,u} \right)}{\partial i} 693 +\frac{\partial \left( {e_1 S\,v} \right)}{\partial j}} \right] 694 -\frac{1}{e_3 }\frac{\partial \left( {S\,w} \right)}{\partial k} + D^S + F^S 695 \] 696 \[ 697 % \label{eq:rho} 698 \rho =\rho \left( {T,S,z(k)} \right) 699 \] 646 700 647 701 The expression of \textbf{D}$^{U}$, $D^{S}$ and $D^{T}$ depends on the subgrid scale parameterisation used. … … 652 706 653 707 \newpage 654 $\ $\newline % force a new ligne 708 655 709 % ================================================================ 656 710 % Curvilinear generalised vertical coordinate System … … 680 734 In fact one is totally free to choose any space and time vertical coordinate by 681 735 introducing an arbitrary vertical coordinate : 682 \begin{equation} \label{eq:PE_s} 683 s=s(i,j,k,t) 736 \begin{equation} 737 \label{eq:PE_s} 738 s=s(i,j,k,t) 684 739 \end{equation} 685 740 with the restriction that the above equation gives a single-valued monotonic relationship between $s$ and $k$, … … 750 805 Let us define the vertical scale factor by $e_3=\partial_s z$ ($e_3$ is now a function of $(i,j,k,t)$ ), 751 806 and the slopes in the (\textbf{i},\textbf{j}) directions between $s-$ and $z-$surfaces by: 752 \begin{equation} \label{eq:PE_sco_slope} 753 \sigma _1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s 754 \quad \text{, and } \quad 755 \sigma _2 =\frac{1}{e_2 }\;\left. {\frac{\partial z}{\partial j}} \right|_s 807 \begin{equation} 808 \label{eq:PE_sco_slope} 809 \sigma_1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s 810 \quad \text{, and } \quad 811 \sigma_2 =\frac{1}{e_2 }\;\left. {\frac{\partial z}{\partial j}} \right|_s 756 812 \end{equation} 757 813 We also introduce $\omega $, a dia-surface velocity component, defined as the velocity 758 814 relative to the moving $s$-surfaces and normal to them: 759 \begin{equation} \label{eq:PE_sco_w} 760 \omega = w - e_3 \, \frac{\partial s}{\partial t} - \sigma _1 \,u - \sigma _2 \,v \\ 761 \end{equation} 815 \[ 816 % \label{eq:PE_sco_w} 817 \omega = w - e_3 \, \frac{\partial s}{\partial t} - \sigma_1 \,u - \sigma_2 \,v \\ 818 \] 762 819 763 820 The equations solved by the ocean model \autoref{eq:PE} in $s-$coordinate can be written as follows … … 766 823 \vspace{0.5cm} 767 824 $\bullet$ Vector invariant form of the momentum equation : 768 \begin{multline} \label{eq:PE_sco_u_vector} 769 \frac{\partial u }{\partial t}= 770 + \left( {\zeta +f} \right)\,v 771 - \frac{1}{2\,e_1} \frac{\partial}{\partial i} \left( u^2+v^2 \right) 772 - \frac{1}{e_3} \omega \frac{\partial u}{\partial k} \\ 773 - \frac{1}{e_1} \frac{\partial}{\partial i} \left( \frac{p_s + p_h}{\rho _o} \right) 774 + g\frac{\rho }{\rho _o}\sigma _1 775 + D_u^{\vect{U}} + F_u^{\vect{U}} \quad 776 \end{multline} 777 \begin{multline} \label{eq:PE_sco_v_vector} 778 \frac{\partial v }{\partial t}= 779 - \left( {\zeta +f} \right)\,u 780 - \frac{1}{2\,e_2 }\frac{\partial }{\partial j}\left( u^2+v^2 \right) 781 - \frac{1}{e_3 } \omega \frac{\partial v}{\partial k} \\ 782 - \frac{1}{e_2 }\frac{\partial }{\partial j}\left( \frac{p_s+p_h }{\rho _o} \right) 783 + g\frac{\rho }{\rho _o }\sigma _2 784 + D_v^{\vect{U}} + F_v^{\vect{U}} \quad 785 \end{multline} 825 \begin{multline*} 826 % \label{eq:PE_sco_u_vector} 827 \frac{\partial u }{\partial t}= 828 + \left( {\zeta +f} \right)\,v 829 - \frac{1}{2\,e_1} \frac{\partial}{\partial i} \left( u^2+v^2 \right) 830 - \frac{1}{e_3} \omega \frac{\partial u}{\partial k} \\ 831 - \frac{1}{e_1} \frac{\partial}{\partial i} \left( \frac{p_s + p_h}{\rho_o} \right) 832 + g\frac{\rho }{\rho_o}\sigma_1 833 + D_u^{\vect{U}} + F_u^{\vect{U}} \quad 834 \end{multline*} 835 \begin{multline*} 836 % \label{eq:PE_sco_v_vector} 837 \frac{\partial v }{\partial t}= 838 - \left( {\zeta +f} \right)\,u 839 - \frac{1}{2\,e_2 }\frac{\partial }{\partial j}\left( u^2+v^2 \right) 840 - \frac{1}{e_3 } \omega \frac{\partial v}{\partial k} \\ 841 - \frac{1}{e_2 }\frac{\partial }{\partial j}\left( \frac{p_s+p_h }{\rho_o} \right) 842 + g\frac{\rho }{\rho_o }\sigma_2 843 + D_v^{\vect{U}} + F_v^{\vect{U}} \quad 844 \end{multline*} 786 845 787 846 \vspace{0.5cm} 788 847 $\bullet$ Flux form of the momentum equation : 789 \begin{multline} \label{eq:PE_sco_u_flux} 790 \frac{1}{e_3} \frac{\partial \left( e_3\,u \right) }{\partial t}= 791 + \left( { f + \frac{1}{e_1 \; e_2 } 792 \left( v \frac{\partial e_2}{\partial i} 793 -u \frac{\partial e_1}{\partial j} \right)} \right) \, v \\ 794 - \frac{1}{e_1 \; e_2 \; e_3 } \left( 795 \frac{\partial \left( {e_2 \, e_3 \, u\,u} \right)}{\partial i} 796 + \frac{\partial \left( {e_1 \, e_3 \, v\,u} \right)}{\partial j} \right) 797 - \frac{1}{e_3 }\frac{\partial \left( { \omega\,u} \right)}{\partial k} \\ 798 - \frac{1}{e_1} \frac{\partial}{\partial i} \left( \frac{p_s + p_h}{\rho _o} \right) 799 + g\frac{\rho }{\rho _o}\sigma _1 800 + D_u^{\vect{U}} + F_u^{\vect{U}} \quad 801 \end{multline} 802 \begin{multline} \label{eq:PE_sco_v_flux} 803 \frac{1}{e_3} \frac{\partial \left( e_3\,v \right) }{\partial t}= 804 - \left( { f + \frac{1}{e_1 \; e_2} 805 \left( v \frac{\partial e_2}{\partial i} 806 -u \frac{\partial e_1}{\partial j} \right)} \right) \, u \\ 807 - \frac{1}{e_1 \; e_2 \; e_3 } \left( 808 \frac{\partial \left( {e_2 \; e_3 \,u\,v} \right)}{\partial i} 809 + \frac{\partial \left( {e_1 \; e_3 \,v\,v} \right)}{\partial j} \right) 810 - \frac{1}{e_3 } \frac{\partial \left( { \omega\,v} \right)}{\partial k} \\ 811 - \frac{1}{e_2 }\frac{\partial }{\partial j}\left( \frac{p_s+p_h }{\rho _o} \right) 812 + g\frac{\rho }{\rho _o }\sigma _2 813 + D_v^{\vect{U}} + F_v^{\vect{U}} \quad 814 \end{multline} 848 \begin{multline*} 849 % \label{eq:PE_sco_u_flux} 850 \frac{1}{e_3} \frac{\partial \left( e_3\,u \right) }{\partial t}= 851 + \left( { f + \frac{1}{e_1 \; e_2 } 852 \left( v \frac{\partial e_2}{\partial i} 853 -u \frac{\partial e_1}{\partial j} \right)} \right) \, v \\ 854 - \frac{1}{e_1 \; e_2 \; e_3 } \left( 855 \frac{\partial \left( {e_2 \, e_3 \, u\,u} \right)}{\partial i} 856 + \frac{\partial \left( {e_1 \, e_3 \, v\,u} \right)}{\partial j} \right) 857 - \frac{1}{e_3 }\frac{\partial \left( { \omega\,u} \right)}{\partial k} \\ 858 - \frac{1}{e_1} \frac{\partial}{\partial i} \left( \frac{p_s + p_h}{\rho_o} \right) 859 + g\frac{\rho }{\rho_o}\sigma_1 860 + D_u^{\vect{U}} + F_u^{\vect{U}} \quad 861 \end{multline*} 862 \begin{multline*} 863 % \label{eq:PE_sco_v_flux} 864 \frac{1}{e_3} \frac{\partial \left( e_3\,v \right) }{\partial t}= 865 - \left( { f + \frac{1}{e_1 \; e_2} 866 \left( v \frac{\partial e_2}{\partial i} 867 -u \frac{\partial e_1}{\partial j} \right)} \right) \, u \\ 868 - \frac{1}{e_1 \; e_2 \; e_3 } \left( 869 \frac{\partial \left( {e_2 \; e_3 \,u\,v} \right)}{\partial i} 870 + \frac{\partial \left( {e_1 \; e_3 \,v\,v} \right)}{\partial j} \right) 871 - \frac{1}{e_3 } \frac{\partial \left( { \omega\,v} \right)}{\partial k} \\ 872 - \frac{1}{e_2 }\frac{\partial }{\partial j}\left( \frac{p_s+p_h }{\rho_o} \right) 873 + g\frac{\rho }{\rho_o }\sigma_2 874 + D_v^{\vect{U}} + F_v^{\vect{U}} \quad 875 \end{multline*} 815 876 816 877 where the relative vorticity, \textit{$\zeta $}, the surface pressure gradient, … … 818 879 they do not represent exactly the same quantities. 819 880 $\omega$ is provided by the continuity equation (see \autoref{apdx:A}): 820 \begin{equation} \label{eq:PE_sco_continuity} 821 \frac{\partial e_3}{\partial t} + e_3 \; \chi + \frac{\partial \omega }{\partial s} = 0 822 \qquad \text{with }\;\; 823 \chi =\frac{1}{e_1 e_2 e_3 }\left[ {\frac{\partial \left( {e_2 e_3 \,u} 824 \right)}{\partial i}+\frac{\partial \left( {e_1 e_3 \,v} \right)}{\partial 825 j}} \right] 826 \end{equation} 881 \[ 882 % \label{eq:PE_sco_continuity} 883 \frac{\partial e_3}{\partial t} + e_3 \; \chi + \frac{\partial \omega }{\partial s} = 0 884 \qquad \text{with }\;\; 885 \chi =\frac{1}{e_1 e_2 e_3 }\left[ {\frac{\partial \left( {e_2 e_3 \,u} 886 \right)}{\partial i}+\frac{\partial \left( {e_1 e_3 \,v} \right)}{\partial 887 j}} \right] 888 \] 827 889 828 890 \vspace{0.5cm} 829 891 $\bullet$ tracer equations: 830 \begin{multline} \label{eq:PE_sco_t} 831 \frac{1}{e_3} \frac{\partial \left( e_3\,T \right) }{\partial t}= 832 -\frac{1}{e_1 e_2 e_3 }\left[ {\frac{\partial \left( {e_2 e_3\,u\,T} \right)}{\partial i} 833 +\frac{\partial \left( {e_1 e_3\,v\,T} \right)}{\partial j}} \right] \\ 834 -\frac{1}{e_3 }\frac{\partial \left( {T\,\omega } \right)}{\partial k} + D^T + F^S \qquad 835 \end{multline} 836 837 \begin{multline} \label{eq:PE_sco_s} 838 \frac{1}{e_3} \frac{\partial \left( e_3\,S \right) }{\partial t}= 839 -\frac{1}{e_1 e_2 e_3 }\left[ {\frac{\partial \left( {e_2 e_3\,u\,S} \right)}{\partial i} 840 +\frac{\partial \left( {e_1 e_3\,v\,S} \right)}{\partial j}} \right] \\ 841 -\frac{1}{e_3 }\frac{\partial \left( {S\,\omega } \right)}{\partial k} + D^S + F^S \qquad 842 \end{multline} 892 \begin{multline*} 893 % \label{eq:PE_sco_t} 894 \frac{1}{e_3} \frac{\partial \left( e_3\,T \right) }{\partial t}= 895 -\frac{1}{e_1 e_2 e_3 }\left[ {\frac{\partial \left( {e_2 e_3\,u\,T} \right)}{\partial i} 896 +\frac{\partial \left( {e_1 e_3\,v\,T} \right)}{\partial j}} \right] \\ 897 -\frac{1}{e_3 }\frac{\partial \left( {T\,\omega } \right)}{\partial k} + D^T + F^S \qquad 898 \end{multline*} 899 900 \begin{multline*} 901 % \label{eq:PE_sco_s} 902 \frac{1}{e_3} \frac{\partial \left( e_3\,S \right) }{\partial t}= 903 -\frac{1}{e_1 e_2 e_3 }\left[ {\frac{\partial \left( {e_2 e_3\,u\,S} \right)}{\partial i} 904 +\frac{\partial \left( {e_1 e_3\,v\,S} \right)}{\partial j}} \right] \\ 905 -\frac{1}{e_3 }\frac{\partial \left( {S\,\omega } \right)}{\partial k} + D^S + F^S \qquad 906 \end{multline*} 843 907 844 908 The equation of state has the same expression as in $z$-coordinate, … … 889 953 The major points are summarized here. 890 954 The position ( \textit{z*}) and vertical discretization (\textit{z*}) are expressed as: 891 \begin{equation} \label{eq:z-star} 892 H + \textit{z*} = (H + z) / r \quad \text{and} \ \delta \textit{z*} = \delta z / r \quad \text{with} \ r = \frac{H+\eta} {H} 893 \end{equation} 955 \[ 956 % \label{eq:z-star} 957 H + \textit{z*} = (H + z) / r \quad \text{and} \ \delta \textit{z*} = \delta z / r \quad \text{with} \ r = \frac{H+\eta} {H} 958 \] 894 959 Since the vertical displacement of the free surface is incorporated in the vertical coordinate \textit{z*}, 895 960 the upper and lower boundaries are at fixed \textit{z*} position, 896 961 $\textit{z*} = 0$ and $\textit{z*} = -H$ respectively. 897 962 Also the divergence of the flow field is no longer zero as shown by the continuity equation: 898 \ begin{equation*}899 \frac{\partial r}{\partial t} = \nabla_{\textit{z*}} \cdot \left( r \; \rm{\bf U}_h \right)900 901 \ end{equation*}963 \[ 964 \frac{\partial r}{\partial t} = \nabla_{\textit{z*}} \cdot \left( r \; \rm{\bf U}_h \right) 965 \left( r \; w\textit{*} \right) = 0 966 \] 902 967 %} 903 968 … … 906 971 907 972 To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate 908 \begin{equation} \label{eq:PE_} 909 z^\star = H \left( \frac{z-\eta}{H+\eta} \right) 910 \end{equation} 973 \[ 974 % \label{eq:PE_} 975 z^\star = H \left( \frac{z-\eta}{H+\eta} \right) 976 \] 911 977 912 978 This coordinate is closely related to the "eta" coordinate used in many atmospheric models … … 937 1003 938 1004 Because $z^\star$ has a time independent range, all grid cells have static increments ds, 939 and the sum of the ver tical increments yields the time independent ocean depth. % ·k ds = H.1005 and the sum of the ver tical increments yields the time independent ocean depth. %k ds = H. 940 1006 The $z^\star$ coordinate is therefore invisible to undulations of the free surface, 941 1007 since it moves along with the free surface. … … 951 1017 952 1018 953 \newpage 1019 \newpage 1020 954 1021 % ------------------------------------------------------------------------------------------------------------- 955 1022 % Terrain following coordinate System … … 994 1061 The horizontal pressure force in $s$-coordinate consists of two terms (see \autoref{apdx:A}), 995 1062 996 \begin{equation} \label{eq:PE_p_sco} 997 \left. {\nabla p} \right|_z =\left. {\nabla p} \right|_s -\frac{\partial 998 p}{\partial s}\left. {\nabla z} \right|_s 1063 \begin{equation} 1064 \label{eq:PE_p_sco} 1065 \left. {\nabla p} \right|_z =\left. {\nabla p} \right|_s -\frac{\partial 1066 p}{\partial s}\left. {\nabla z} \right|_s 999 1067 \end{equation} 1000 1068 … … 1041 1109 1042 1110 1043 \newpage 1111 \newpage 1112 1044 1113 % ------------------------------------------------------------------------------------------------------------- 1045 1114 % Curvilinear z-tilde coordinate System … … 1055 1124 1056 1125 \newpage 1126 1057 1127 % ================================================================ 1058 1128 % Subgrid Scale Physics … … 1097 1167 while an accurate consideration of the details of turbulent motions is simply impractical. 1098 1168 The resulting vertical momentum and tracer diffusive operators are of second order: 1099 \begin{equation} \label{eq:PE_zdf} 1100 \begin{split} 1101 {\vect{D}}^{v \vect{U}} &=\frac{\partial }{\partial z}\left( {A^{vm}\frac{\partial {\vect{U}}_h }{\partial z}} \right) \ , \\ 1102 D^{vT} &= \frac{\partial }{\partial z}\left( {A^{vT}\frac{\partial T}{\partial z}} \right) \ , 1103 \quad 1104 D^{vS}=\frac{\partial }{\partial z}\left( {A^{vT}\frac{\partial S}{\partial z}} \right) 1105 \end{split} 1169 \begin{equation} 1170 \label{eq:PE_zdf} 1171 \begin{split} 1172 {\vect{D}}^{v \vect{U}} &=\frac{\partial }{\partial z}\left( {A^{vm}\frac{\partial {\vect{U}}_h }{\partial z}} \right) \ , \\ 1173 D^{vT} &= \frac{\partial }{\partial z}\left( {A^{vT}\frac{\partial T}{\partial z}} \right) \ , 1174 \quad 1175 D^{vS}=\frac{\partial }{\partial z}\left( {A^{vT}\frac{\partial S}{\partial z}} \right) 1176 \end{split} 1106 1177 \end{equation} 1107 1178 where $A^{vm}$ and $A^{vT}$ are the vertical eddy viscosity and diffusivity coefficients, respectively. … … 1173 1244 1174 1245 The lateral Laplacian tracer diffusive operator is defined by (see \autoref{apdx:B}): 1175 \begin{equation} \label{eq:PE_iso_tensor} 1176 D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 1177 \mbox{with}\quad \;\;\Re =\left( {{\begin{array}{*{20}c} 1178 1 \hfill & 0 \hfill & {-r_1 } \hfill \\ 1179 0 \hfill & 1 \hfill & {-r_2 } \hfill \\ 1180 {-r_1 } \hfill & {-r_2 } \hfill & {r_1 ^2+r_2 ^2} \hfill \\ 1181 \end{array} }} \right) 1246 \begin{equation} 1247 \label{eq:PE_iso_tensor} 1248 D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 1249 \mbox{with}\quad \;\;\Re =\left( {{ 1250 \begin{array}{*{20}c} 1251 1 \hfill & 0 \hfill & {-r_1 } \hfill \\ 1252 0 \hfill & 1 \hfill & {-r_2 } \hfill \\ 1253 {-r_1 } \hfill & {-r_2 } \hfill & {r_1 ^2+r_2 ^2} \hfill \\ 1254 \end{array} 1255 }} \right) 1182 1256 \end{equation} 1183 1257 where $r_1 \;\mbox{and}\;r_2 $ are the slopes between the surface along which the diffusive operator acts and … … 1197 1271 For \textit{geopotential} diffusion, 1198 1272 $r_1$ and $r_2 $ are the slopes between the geopotential and computational surfaces: 1199 they are equal to $\sigma _1$ and $\sigma_2$, respectively (see \autoref{eq:PE_sco_slope}).1273 they are equal to $\sigma_1$ and $\sigma_2$, respectively (see \autoref{eq:PE_sco_slope}). 1200 1274 1201 1275 For \textit{isoneutral} diffusion $r_1$ and $r_2$ are the slopes between the isoneutral and computational surfaces. 1202 1276 Therefore, they are different quantities, but have similar expressions in $z$- and $s$-coordinates. 1203 1277 In $z$-coordinates: 1204 \begin{equation} \label{eq:PE_iso_slopes} 1205 r_1 =\frac{e_3 }{e_1 } \left( \pd[\rho]{i} \right) \left( \pd[\rho]{k} \right)^{-1} \, \quad 1206 r_2 =\frac{e_3 }{e_2 } \left( \pd[\rho]{j} \right) \left( \pd[\rho]{k} \right)^{-1} \, 1278 \begin{equation} 1279 \label{eq:PE_iso_slopes} 1280 r_1 =\frac{e_3 }{e_1 } \left( \pd[\rho]{i} \right) \left( \pd[\rho]{k} \right)^{-1} \, \quad 1281 r_2 =\frac{e_3 }{e_2 } \left( \pd[\rho]{j} \right) \left( \pd[\rho]{k} \right)^{-1} \, 1207 1282 \end{equation} 1208 1283 while in $s$-coordinates $\pd[]{k}$ is replaced by $\pd[]{s}$. … … 1211 1286 When the \textit{eddy induced velocity} parametrisation (eiv) \citep{Gent1990} is used, 1212 1287 an additional tracer advection is introduced in combination with the isoneutral diffusion of tracers: 1213 \begin{equation} \label{eq:PE_iso+eiv} 1214 D^{lT}=\nabla \cdot \left( {A^{lT}\;\Re \;\nabla T} \right) 1215 +\nabla \cdot \left( {{\vect{U}}^\ast \,T} \right) 1216 \end{equation} 1288 \[ 1289 % \label{eq:PE_iso+eiv} 1290 D^{lT}=\nabla \cdot \left( {A^{lT}\;\Re \;\nabla T} \right) 1291 +\nabla \cdot \left( {{\vect{U}}^\ast \,T} \right) 1292 \] 1217 1293 where ${\vect{U}}^\ast =\left( {u^\ast ,v^\ast ,w^\ast } \right)$ is a non-divergent, 1218 1294 eddy-induced transport velocity. This velocity field is defined by: 1219 \begin{equation} \label{eq:PE_eiv} 1220 \begin{split} 1221 u^\ast &= +\frac{1}{e_3 }\frac{\partial }{\partial k}\left[ {A^{eiv}\;\tilde{r}_1 } \right] \\ 1222 v^\ast &= +\frac{1}{e_3 }\frac{\partial }{\partial k}\left[ {A^{eiv}\;\tilde{r}_2 } \right] \\ 1223 w^\ast &= -\frac{1}{e_1 e_2 }\left[ 1224 \frac{\partial }{\partial i}\left( {A^{eiv}\;e_2\,\tilde{r}_1 } \right) 1225 +\frac{\partial }{\partial j}\left( {A^{eiv}\;e_1\,\tilde{r}_2 } \right) \right] 1226 \end{split} 1227 \end{equation} 1295 \[ 1296 % \label{eq:PE_eiv} 1297 \begin{split} 1298 u^\ast &= +\frac{1}{e_3 }\frac{\partial }{\partial k}\left[ {A^{eiv}\;\tilde{r}_1 } \right] \\ 1299 v^\ast &= +\frac{1}{e_3 }\frac{\partial }{\partial k}\left[ {A^{eiv}\;\tilde{r}_2 } \right] \\ 1300 w^\ast &= -\frac{1}{e_1 e_2 }\left[ 1301 \frac{\partial }{\partial i}\left( {A^{eiv}\;e_2\,\tilde{r}_1 } \right) 1302 +\frac{\partial }{\partial j}\left( {A^{eiv}\;e_1\,\tilde{r}_2 } \right) \right] 1303 \end{split} 1304 \] 1228 1305 where $A^{eiv}$ is the eddy induced velocity coefficient 1229 1306 (or equivalently the isoneutral thickness diffusivity coefficient), 1230 1307 and $\tilde{r}_1$ and $\tilde{r}_2$ are the slopes between isoneutral and \emph{geopotential} surfaces. 1231 1308 Their values are thus independent of the vertical coordinate, but their expression depends on the coordinate: 1232 \begin{align} \label{eq:PE_slopes_eiv} 1233 \tilde{r}_n = \begin{cases} 1234 r_n & \text{in $z$-coordinate} \\ 1235 r_n + \sigma_n & \text{in \textit{z*} and $s$-coordinates} 1236 \end{cases} 1237 \quad \text{where } n=1,2 1309 \begin{align} 1310 \label{eq:PE_slopes_eiv} 1311 \tilde{r}_n = 1312 \begin{cases} 1313 r_n & \text{in $z$-coordinate} \\ 1314 r_n + \sigma_n & \text{in \textit{z*} and $s$-coordinates} 1315 \end{cases} 1316 \quad \text{where } n=1,2 1238 1317 \end{align} 1239 1318 … … 1246 1325 1247 1326 The lateral bilaplacian tracer diffusive operator is defined by: 1248 \begin{equation} \label{eq:PE_bilapT} 1249 D^{lT}= - \Delta \left( \;\Delta T \right) 1250 \qquad \text{where} \;\; \Delta \bullet = \nabla \left( {\sqrt{B^{lT}\,}\;\Re \;\nabla \bullet} \right) 1251 \end{equation} 1327 \[ 1328 % \label{eq:PE_bilapT} 1329 D^{lT}= - \Delta \left( \;\Delta T \right) 1330 \qquad \text{where} \;\; \Delta \bullet = \nabla \left( {\sqrt{B^{lT}\,}\;\Re \;\nabla \bullet} \right) 1331 \] 1252 1332 It is the Laplacian operator given by \autoref{eq:PE_iso_tensor} applied twice with 1253 1333 the harmonic eddy diffusion coefficient set to the square root of the biharmonic one. … … 1258 1338 The Laplacian momentum diffusive operator along $z$- or $s$-surfaces is found by 1259 1339 applying \autoref{eq:PE_lap_vector} to the horizontal velocity vector (see \autoref{apdx:B}): 1260 \begin{equation} \label{eq:PE_lapU} 1261 \begin{split} 1262 {\rm {\bf D}}^{l{\rm {\bf U}}} 1263 &= \quad \ \nabla _h \left( {A^{lm}\chi } \right) 1264 \ - \ \nabla _h \times \left( {A^{lm}\,\zeta \;{\rm {\bf k}}} \right) \\ 1265 &= \left( \begin{aligned} 1266 \frac{1}{e_1 } \frac{\partial \left( A^{lm} \chi \right)}{\partial i} 1267 &-\frac{1}{e_2 e_3}\frac{\partial \left( {A^{lm} \;e_3 \zeta} \right)}{\partial j} \\ 1268 \frac{1}{e_2 }\frac{\partial \left( {A^{lm} \chi } \right)}{\partial j} 1269 &+\frac{1}{e_1 e_3}\frac{\partial \left( {A^{lm} \;e_3 \zeta} \right)}{\partial i} 1270 \end{aligned} \right) 1271 \end{split} 1272 \end{equation} 1340 \[ 1341 % \label{eq:PE_lapU} 1342 \begin{split} 1343 {\rm {\bf D}}^{l{\rm {\bf U}}} 1344 &= \quad \ \nabla _h \left( {A^{lm}\chi } \right) 1345 \ - \ \nabla _h \times \left( {A^{lm}\,\zeta \;{\rm {\bf k}}} \right) \\ 1346 &= \left( 1347 \begin{aligned} 1348 \frac{1}{e_1 } \frac{\partial \left( A^{lm} \chi \right)}{\partial i} 1349 &-\frac{1}{e_2 e_3}\frac{\partial \left( {A^{lm} \;e_3 \zeta} \right)}{\partial j} \\ 1350 \frac{1}{e_2 }\frac{\partial \left( {A^{lm} \chi } \right)}{\partial j} 1351 &+\frac{1}{e_1 e_3}\frac{\partial \left( {A^{lm} \;e_3 \zeta} \right)}{\partial i} 1352 \end{aligned} 1353 \right) 1354 \end{split} 1355 \] 1273 1356 1274 1357 Such a formulation ensures a complete separation between the vorticity and horizontal divergence fields … … 1278 1361 ($i.e.$ geopotential diffusion in $s-$coordinates or isoneutral diffusion in both $z$- and $s$-coordinates), 1279 1362 the $u$ and $v-$fields are considered as independent scalar fields, so that the diffusive operator is given by: 1280 \begin{equation} \label{eq:PE_lapU_iso} 1281 \begin{split} 1282 D_u^{l{\rm {\bf U}}} &= \nabla .\left( {A^{lm} \;\Re \;\nabla u} \right) \\ 1283 D_v^{l{\rm {\bf U}}} &= \nabla .\left( {A^{lm} \;\Re \;\nabla v} \right) 1284 \end{split} 1285 \end{equation} 1363 \[ 1364 % \label{eq:PE_lapU_iso} 1365 \begin{split} 1366 D_u^{l{\rm {\bf U}}} &= \nabla .\left( {A^{lm} \;\Re \;\nabla u} \right) \\ 1367 D_v^{l{\rm {\bf U}}} &= \nabla .\left( {A^{lm} \;\Re \;\nabla v} \right) 1368 \end{split} 1369 \] 1286 1370 where $\Re$ is given by \autoref{eq:PE_iso_tensor}. 1287 1371 It is the same expression as those used for diffusive operator on tracers. … … 1297 1381 Nevertheless it is currently not available in the iso-neutral case. 1298 1382 1383 \biblio 1384 1299 1385 \end{document} 1300 1386 -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 % ================================================================ 4 % Chapter 1 ———Model Basics5 % Chapter 1 Model Basics 5 6 % ================================================================ 6 7 % ================================================================ … … 20 21 21 22 \colorbox{yellow}{ end of to be updated} 22 \newline23 23 24 24 % from MOM4p1 documentation 25 25 26 26 To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate 27 \begin{equation} \label{eq:PE_} 28 z^\star = H \left( \frac{z-\eta}{H+\eta} \right) 29 \end{equation} 27 \[ 28 % \label{eq:PE_} 29 z^\star = H \left( \frac{z-\eta}{H+\eta} \right) 30 \] 30 31 31 32 This coordinate is closely related to the "eta" coordinate used in many atmospheric models … … 65 66 the surface height, again so long as $\eta > -H$. 66 67 67 68 69 68 %%% 70 69 % essai update time splitting... 71 70 %%% 72 71 73 74 72 % ================================================================ 75 73 % Surface Pressure Gradient and Sea Surface Height … … 79 77 %-----------------------------------------nam_dynspg---------------------------------------------------- 80 78 81 \nlst{nam_dynspg}79 %\nlst{nam_dynspg} 82 80 %------------------------------------------------------------------------------------------------------------ 83 81 Options are defined through the \ngn{nam\_dynspg} namelist variables. … … 105 103 describe the external gravity waves (typically a few ten seconds). 106 104 The sea surface height is given by: 107 \begin{equation} \label{eq:dynspg_ssh} 108 \frac{\partial \eta }{\partial t}\equiv \frac{\text{EMP}}{\rho _w }+\frac{1}{e_{1T} 109 e_{2T} }\sum\limits_k {\left( {\delta _i \left[ {e_{2u} e_{3u} u} 110 \right]+\delta _j \left[ {e_{1v} e_{3v} v} \right]} \right)} 105 \begin{equation} 106 \label{eq:dynspg_ssh} 107 \frac{\partial \eta }{\partial t}\equiv \frac{\text{EMP}}{\rho_w }+\frac{1}{e_{1T} 108 e_{2T} }\sum\limits_k {\left( {\delta_i \left[ {e_{2u} e_{3u} u} 109 \right]+\delta_j \left[ {e_{1v} e_{3v} v} \right]} \right)} 111 110 \end{equation} 112 111 113 112 where EMP is the surface freshwater budget (evaporation minus precipitation, and minus river runoffs 114 113 (if the later are introduced as a surface freshwater flux, see \autoref{chap:SBC}) expressed in $Kg.m^{-2}.s^{-1}$, 115 and $\rho 114 and $\rho_w =1,000\,Kg.m^{-3}$ is the volumic mass of pure water. 116 115 The sea-surface height is evaluated using a leapfrog scheme in combination with an Asselin time filter, 117 116 i.e. the velocity appearing in (\autoref{eq:dynspg_ssh}) is centred in time (\textit{now} velocity). 118 117 119 118 The surface pressure gradient, also evaluated using a leap-frog scheme, is then simply given by: 120 \begin{equation} \label{eq:dynspg_exp} 121 \left\{ \begin{aligned} 122 - \frac{1} {e_{1u}} \; \delta _{i+1/2} \left[ \,\eta\, \right] \\ 123 \\ 124 - \frac{1} {e_{2v}} \; \delta _{j+1/2} \left[ \,\eta\, \right] 125 \end{aligned} \right. 119 \begin{equation} 120 \label{eq:dynspg_exp} 121 \left\{ 122 \begin{aligned} 123 - \frac{1} {e_{1u}} \; \delta_{i+1/2} \left[ \,\eta\, \right] \\ \\ 124 - \frac{1} {e_{2v}} \; \delta_{j+1/2} \left[ \,\eta\, \right] 125 \end{aligned} 126 \right. 126 127 \end{equation} 127 128 128 Consistent with the linearization, a $\left. \rho \right|_{k=1} / \rho 129 Consistent with the linearization, a $\left. \rho \right|_{k=1} / \rho_o$ factor is omitted in 129 130 (\autoref{eq:dynspg_exp}). 130 131 … … 144 145 145 146 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > 146 \begin{figure}[!t] \begin{center} 147 \includegraphics[width=0.90\textwidth]{Fig_DYN_dynspg_ts} 148 \caption{ \protect\label{fig:DYN_dynspg_ts} 149 Schematic of the split-explicit time stepping scheme for the barotropic and baroclinic modes, 150 after \citet{Griffies2004}. 151 Time increases to the right. 152 Baroclinic time steps are denoted by $t-\Delta t$, $t, t+\Delta t$, and $t+2\Delta t$. 153 The curved line represents a leap-frog time step, 154 and the smaller barotropic time steps $N \Delta t=2\Delta t$ are denoted by the zig-zag line. 155 The vertically integrated forcing \textbf{M}(t) computed at 156 baroclinic time step t represents the interaction between the barotropic and baroclinic motions. 157 While keeping the total depth, tracer, and freshwater forcing fields fixed, 158 a leap-frog integration carries the surface height and vertically integrated velocity from 159 t to $t+2 \Delta t$ using N barotropic time steps of length $\Delta t$. 160 Time averaging the barotropic fields over the N+1 time steps (endpoints included) 161 centers the vertically integrated velocity at the baroclinic timestep $t+\Delta t$. 162 A baroclinic leap-frog time step carries the surface height to $t+\Delta t$ using the convergence of 163 the time averaged vertically integrated velocity taken from baroclinic time step t. } 164 \end{center} 147 \begin{figure}[!t] 148 \begin{center} 149 \includegraphics[width=0.90\textwidth]{Fig_DYN_dynspg_ts} 150 \caption{ 151 \protect\label{fig:DYN_dynspg_ts} 152 Schematic of the split-explicit time stepping scheme for the barotropic and baroclinic modes, 153 after \citet{Griffies2004}. 154 Time increases to the right. 155 Baroclinic time steps are denoted by $t-\Delta t$, $t, t+\Delta t$, and $t+2\Delta t$. 156 The curved line represents a leap-frog time step, 157 and the smaller barotropic time steps $N \Delta t=2\Delta t$ are denoted by the zig-zag line. 158 The vertically integrated forcing \textbf{M}(t) computed at 159 baroclinic time step t represents the interaction between the barotropic and baroclinic motions. 160 While keeping the total depth, tracer, and freshwater forcing fields fixed, 161 a leap-frog integration carries the surface height and vertically integrated velocity from 162 t to $t+2 \Delta t$ using N barotropic time steps of length $\Delta t$. 163 Time averaging the barotropic fields over the N+1 time steps (endpoints included) 164 centers the vertically integrated velocity at the baroclinic timestep $t+\Delta t$. 165 A baroclinic leap-frog time step carries the surface height to $t+\Delta t$ using the convergence of 166 the time averaged vertically integrated velocity taken from baroclinic time step t. 167 } 168 \end{center} 165 169 \end{figure} 166 170 %> > > > > > > > > > > > > > > > > > > > > > > > > > > > … … 178 182 the small barotropic time step $\Delta t$. 179 183 We have 180 \begin{equation} \label{eq:DYN_spg_ts_eta} 181 \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) 182 = 2 \Delta t \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] 183 \end{equation} 184 \begin{multline} \label{eq:DYN_spg_ts_u} 185 \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1}) \\ 186 = 2\Delta t \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n}) 187 - H(\tau) \nabla p_s^{(b)}(\tau,t_{n}) +\textbf{M}(\tau) \right] 188 \end{multline} 184 \[ 185 % \label{eq:DYN_spg_ts_eta} 186 \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) 187 = 2 \Delta t \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] 188 \] 189 \begin{multline*} 190 % \label{eq:DYN_spg_ts_u} 191 \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1}) \\ 192 = 2\Delta t \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n}) 193 - H(\tau) \nabla p_s^{(b)}(\tau,t_{n}) +\textbf{M}(\tau) \right] 194 \end{multline*} 189 195 \ 190 196 … … 197 203 the duration of the barotropic time stepping over a single cycle. 198 204 This is also the time that sets the barotropic time steps via 199 \begin{equation} \label{eq:DYN_spg_ts_t} 200 t_n=\tau+n\Delta t 201 \end{equation} 205 \[ 206 % \label{eq:DYN_spg_ts_t} 207 t_n=\tau+n\Delta t 208 \] 202 209 with $n$ an integer. 203 210 The density scaled surface pressure is evaluated via 204 \begin{equation} \label{eq:DYN_spg_ts_ps} 205 p_s^{(b)}(\tau,t_{n}) = \begin{cases} 206 g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o & \text{non-linear case} \\ 207 g \;\eta_s^{(b)}(\tau,t_{n}) & \text{linear case} 208 \end{cases} 209 \end{equation} 211 \[ 212 % \label{eq:DYN_spg_ts_ps} 213 p_s^{(b)}(\tau,t_{n}) = 214 \begin{cases} 215 g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o & \text{non-linear case} \\ 216 g \;\eta_s^{(b)}(\tau,t_{n}) & \text{linear case} 217 \end{cases} 218 \] 210 219 To get started, we assume the following initial conditions 211 \ begin{equation} \label{eq:DYN_spg_ts_eta}212 \begin{split}213 \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)}214 \\215 \eta^{(b)}(\tau,t_{n=1}) &= \eta^{(b)}(\tau,t_{n=0}) + \Delta t \ \text{RHS}_{n=0} 216 \end{split}217 \ end{equation}220 \[ 221 % \label{eq:DYN_spg_ts_eta} 222 \begin{split} 223 \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)} \\ 224 \eta^{(b)}(\tau,t_{n=1}) &= \eta^{(b)}(\tau,t_{n=0}) + \Delta t \ \text{RHS}_{n=0} 225 \end{split} 226 \] 218 227 with 219 \begin{equation} \label{eq:DYN_spg_ts_etaF} 220 \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\Delta t,t_{n}) 221 \end{equation} 228 \[ 229 % \label{eq:DYN_spg_ts_etaF} 230 \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\Delta t,t_{n}) 231 \] 222 232 the time averaged surface height taken from the previous barotropic cycle. 223 233 Likewise, 224 \ begin{equation} \label{eq:DYN_spg_ts_u}225 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)} \\ 226 \\227 \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \Delta t \ \text{RHS}_{n=0} 228 \ end{equation}234 \[ 235 % \label{eq:DYN_spg_ts_u} 236 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)} \\ \\ 237 \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \Delta t \ \text{RHS}_{n=0} 238 \] 229 239 with 230 \ begin{equation} \label{eq:DYN_spg_ts_u}231 \overline{\textbf{U}^{(b)}(\tau)}232 233 \ end{equation}240 \[ 241 % \label{eq:DYN_spg_ts_u} 242 \overline{\textbf{U}^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\Delta t,t_{n}) 243 \] 234 244 the time averaged vertically integrated transport. 235 245 Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. … … 237 247 Upon reaching $t_{n=N} = \tau + 2\Delta \tau$ , the vertically integrated velocity is time averaged to 238 248 produce the updated vertically integrated velocity at baroclinic time $\tau + \Delta \tau$ 239 \begin{equation} \label{eq:DYN_spg_ts_u} 240 \textbf{U}(\tau+\Delta t) = \overline{\textbf{U}^{(b)}(\tau+\Delta t)} 241 = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) 242 \end{equation} 249 \[ 250 % \label{eq:DYN_spg_ts_u} 251 \textbf{U}(\tau+\Delta t) = \overline{\textbf{U}^{(b)}(\tau+\Delta t)} 252 = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) 253 \] 243 254 The surface height on the new baroclinic time step is then determined via 244 255 a baroclinic leap-frog using the following form 245 \begin{equation} \label{eq:DYN_spg_ts_ssh} 246 \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\Delta t \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] 256 \begin{equation} 257 \label{eq:DYN_spg_ts_ssh} 258 \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\Delta t \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] 247 259 \end{equation} 248 260 … … 257 269 reasonably good maintenance of tracer conservation properties (see ??) 258 270 259 \begin{equation} \label{eq:DYN_spg_ts_sshf} 260 \eta^{F}(\tau-\Delta) = \overline{\eta^{(b)}(\tau)} 271 \begin{equation} 272 \label{eq:DYN_spg_ts_sshf} 273 \eta^{F}(\tau-\Delta) = \overline{\eta^{(b)}(\tau)} 261 274 \end{equation} 262 275 Another approach tried was 263 276 264 \begin{equation} \label{eq:DYN_spg_ts_sshf2} 265 \eta^{F}(\tau-\Delta) = \eta(\tau) 266 + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\Delta t) 267 + \overline{\eta^{(b)}}(\tau-\Delta t) -2 \;\eta(\tau) \right] 268 \end{equation} 277 \[ 278 % \label{eq:DYN_spg_ts_sshf2} 279 \eta^{F}(\tau-\Delta) = \eta(\tau) 280 + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\Delta t) 281 + \overline{\eta^{(b)}}(\tau-\Delta t) -2 \;\eta(\tau) \right] 282 \] 269 283 270 284 which is useful since it isolates all the time filtering aspects into the term multiplied by $\alpha$. … … 274 288 be more conservative, and so is recommended. 275 289 276 277 278 279 280 290 %------------------------------------------------------------- 281 291 % Filtered formulation … … 304 314 In particular, this means that in filtered case, the matrix to be inverted has to be recomputed at each time-step. 305 315 316 \biblio 306 317 307 318 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/chap_time_domain.tex
r10368 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 4 5 % ================================================================ 5 % Chapter 2 ———Time Domain (step.F90)6 % Chapter 2 Time Domain (step.F90) 6 7 % ================================================================ 7 8 \chapter{Time Domain (STP) } 8 9 \label{chap:STP} 10 9 11 \minitoc 10 12 11 13 % Missing things: 12 14 % - daymod: definition of the time domain (nit000, nitend andd the calendar) 13 14 15 15 16 \gmcomment{STEVEN :maybe a picture of the directory structure in the introduction which could be referred to here, … … 17 18 %%%% 18 19 19 20 20 \newpage 21 $\ $\newline % force a new ligne22 23 21 24 22 Having defined the continuous equations in \autoref{chap:PE}, we need now to choose a time discretization, … … 28 26 the consequences for the order in which the equations are solved. 29 27 30 $\ $\newline % force a new ligne31 28 % ================================================================ 32 29 % Time Discretisation … … 36 33 37 34 The time stepping used in \NEMO is a three level scheme that can be represented as follows: 38 \begin{equation} \label{eq:STP} 39 x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \ \text{RHS}_x^{t-\rdt,\,t,\,t+\rdt} 35 \begin{equation} 36 \label{eq:STP} 37 x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \ \text{RHS}_x^{t-\rdt,\,t,\,t+\rdt} 40 38 \end{equation} 41 39 where $x$ stands for $u$, $v$, $T$ or $S$; … … 85 83 This filter, first designed by \citet{Robert_JMSJ66} and more comprehensively studied by \citet{Asselin_MWR72}, 86 84 is a kind of laplacian diffusion in time that mixes odd and even time steps: 87 \begin{equation} \label{eq:STP_asselin} 88 x_F^t = x^t + \gamma \, \left[ x_F^{t-\rdt} - 2 x^t + x^{t+\rdt} \right] 85 \begin{equation} 86 \label{eq:STP_asselin} 87 x_F^t = x^t + \gamma \, \left[ x_F^{t-\rdt} - 2 x^t + x^{t+\rdt} \right] 89 88 \end{equation} 90 89 where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin coefficient. … … 111 110 For a tendancy $D_x$, representing a diffusion term or a restoring term to a tracer climatology 112 111 (when present, see \autoref{sec:TRA_dmp}), a forward time differencing scheme is used : 113 \begin{equation} \label{eq:STP_euler} 112 \[ 113 % \label{eq:STP_euler} 114 114 x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \ {D_x}^{t-\rdt} 115 \ end{equation}115 \] 116 116 117 117 This is diffusive in time and conditionally stable. 118 118 The conditions for stability of second and fourth order horizontal diffusion schemes are \citep{Griffies_Bk04}: 119 \begin{equation} \label{eq:STP_euler_stability} 120 A^h < \left\{ 121 \begin{aligned} 122 &\frac{e^2}{ 8 \; \rdt } &&\quad \text{laplacian diffusion} \\ 123 &\frac{e^4}{64 \; \rdt } &&\quad \text{bilaplacian diffusion} 124 \end{aligned} 125 \right. 119 \begin{equation} 120 \label{eq:STP_euler_stability} 121 A^h < \left\{ 122 \begin{aligned} 123 &\frac{e^2}{ 8 \; \rdt } &&\quad \text{laplacian diffusion} \\ 124 &\frac{e^4}{64 \; \rdt } &&\quad \text{bilaplacian diffusion} 125 \end{aligned} 126 \right. 126 127 \end{equation} 127 128 where $e$ is the smallest grid size in the two horizontal directions and $A^h$ is the mixing coefficient. … … 138 139 the stability criterion is reduced by a factor of $N$. 139 140 The computation is performed as follows: 140 \begin{equation} \label{eq:STP_ts} 141 \begin{split} 142 & x_\ast ^{t-\rdt} = x^{t-\rdt} \\ 143 & x_\ast ^{t-\rdt+L\frac{2\rdt}{N}}=x_\ast ^{t-\rdt+\left( {L-1} 144 \right)\frac{2\rdt}{N}}+\frac{2\rdt}{N}\;\text{DF}^{t-\rdt+\left( {L-1} \right)\frac{2\rdt}{N}} 145 \quad \text{for $L=1$ to $N$} \\ 146 & x^{t+\rdt} = x_\ast^{t+\rdt} 147 \end{split} 148 \end{equation} 141 \[ 142 % \label{eq:STP_ts} 143 \begin{split} 144 & x_\ast ^{t-\rdt} = x^{t-\rdt} \\ 145 & x_\ast ^{t-\rdt+L\frac{2\rdt}{N}}=x_\ast ^{t-\rdt+\left( {L-1} 146 \right)\frac{2\rdt}{N}}+\frac{2\rdt}{N}\;\text{DF}^{t-\rdt+\left( {L-1} \right)\frac{2\rdt}{N}} 147 \quad \text{for $L=1$ to $N$} \\ 148 & x^{t+\rdt} = x_\ast^{t+\rdt} 149 \end{split} 150 \] 149 151 with DF a vertical diffusion term. 150 152 The number of fractional time steps, $N$, is given by setting \np{nn\_zdfexp}, (namelist parameter). 151 153 The scheme $(b)$ is unconditionally stable but diffusive. It can be written as follows: 152 \begin{equation} \label{eq:STP_imp} 153 x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \ \text{RHS}_x^{t+\rdt} 154 \begin{equation} 155 \label{eq:STP_imp} 156 x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \ \text{RHS}_x^{t+\rdt} 154 157 \end{equation} 155 158 … … 161 164 but it becomes attractive since a value of 3 or more is needed for N in the forward time differencing scheme. 162 165 For example, the finite difference approximation of the temperature equation is: 163 \begin{equation} \label{eq:STP_imp_zdf} 164 \frac{T(k)^{t+1}-T(k)^{t-1}}{2\;\rdt}\equiv \text{RHS}+\frac{1}{e_{3t} }\delta 165 _k \left[ {\frac{A_w^{vT} }{e_{3w} }\delta _{k+1/2} \left[ {T^{t+1}} \right]} 166 \right] 167 \end{equation} 166 \[ 167 % \label{eq:STP_imp_zdf} 168 \frac{T(k)^{t+1}-T(k)^{t-1}}{2\;\rdt}\equiv \text{RHS}+\frac{1}{e_{3t} }\delta 169 _k \left[ {\frac{A_w^{vT} }{e_{3w} }\delta_{k+1/2} \left[ {T^{t+1}} \right]} 170 \right] 171 \] 168 172 where RHS is the right hand side of the equation except for the vertical diffusion term. 169 173 We rewrite \autoref{eq:STP_imp} as: 170 \begin{equation} \label{eq:STP_imp_mat} 171 -c(k+1)\;T^{t+1}(k+1) + d(k)\;T^{t+1}(k) - \;c(k)\;T^{t+1}(k-1) \equiv b(k) 174 \begin{equation} 175 \label{eq:STP_imp_mat} 176 -c(k+1)\;T^{t+1}(k+1) + d(k)\;T^{t+1}(k) - \;c(k)\;T^{t+1}(k-1) \equiv b(k) 172 177 \end{equation} 173 178 where 174 \begin{align*} 175 c(k) &= A_w^{vT} (k) \, / \, e_{3w} (k) \\176 d(k) &= e_{3t} (k) \, / \, (2\rdt) + c_k + c_{k+1} \\177 b(k) &= e_{3t} (k) \; \left( T^{t-1}(k) \, / \, (2\rdt) + \text{RHS} \right)179 \begin{align*} 180 c(k) &= A_w^{vT} (k) \, / \, e_{3w} (k) \\ 181 d(k) &= e_{3t} (k) \, / \, (2\rdt) + c_k + c_{k+1} \\ 182 b(k) &= e_{3t} (k) \; \left( T^{t-1}(k) \, / \, (2\rdt) + \text{RHS} \right) 178 183 \end{align*} 179 184 … … 199 204 \begin{center} 200 205 \includegraphics[width=0.7\textwidth]{Fig_TimeStepping_flowchart} 201 \caption{ \protect\label{fig:TimeStep_flowchart} 206 \caption{ 207 \protect\label{fig:TimeStep_flowchart} 202 208 Sketch of the leapfrog time stepping sequence in \NEMO from \citet{Leclair_Madec_OM09}. 203 209 The use of a semi-implicit computation of the hydrostatic pressure gradient requires the tracer equation to … … 208 214 (see \autoref{sec:DYN_spg}). 209 215 } 210 \end{center} \end{figure} 216 \end{center} 217 \end{figure} 211 218 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 212 219 %} … … 226 233 and the time filter is given by \autoref{eq:STP_asselin} so that $Q$ is redistributed over several time step. 227 234 In the modified LF-RA environment, these two formulations have been replaced by: 228 \begin{align} 229 x^{t+\rdt} &= x^{t-\rdt} + \rdt \left( Q^{t-\rdt/2} + Q^{t+\rdt/2} \right) \label{eq:STP_forcing} \\230 %231 x_F^t &= x^t + \gamma \, \left[ x_F^{t-\rdt} - 2 x^t + x^{t+\rdt} \right] 235 \begin{align} 236 x^{t+\rdt} &= x^{t-\rdt} + \rdt \left( Q^{t-\rdt/2} + Q^{t+\rdt/2} \right) \label{eq:STP_forcing} \\ 237 % 238 x_F^t &= x^t + \gamma \, \left[ x_F^{t-\rdt} - 2 x^t + x^{t+\rdt} \right] 232 239 - \gamma\,\rdt \, \left[ Q^{t+\rdt/2} - Q^{t-\rdt/2} \right] \label{eq:STP_RA} 233 240 \end{align} … … 259 266 \begin{center} 260 267 \includegraphics[width=0.90\textwidth]{Fig_MLF_forcing} 261 \caption{ \protect\label{fig:MLF_forcing} 268 \caption{ 269 \protect\label{fig:MLF_forcing} 262 270 Illustration of forcing integration methods. 263 271 (top) ''Traditional'' formulation: … … 284 292 The first time step of this three level scheme when starting from initial conditions is a forward step 285 293 (Euler time integration): 286 \begin{equation} \label{eq:DOM_euler} 287 x^1 = x^0 + \rdt \ \text{RHS}^0 288 \end{equation} 294 \[ 295 % \label{eq:DOM_euler} 296 x^1 = x^0 + \rdt \ \text{RHS}^0 297 \] 289 298 This is done simply by keeping the leapfrog environment ($i.e.$ the \autoref{eq:STP} three level time stepping) but 290 299 setting all $x^0$ (\textit{before}) and $x^{1}$ (\textit{now}) fields equal at the first time step and … … 301 310 (see \autoref{subsec:DYN_hpg_imp}), an extra three-dimensional field has to 302 311 be added to the restart file to ensure an exact restartability. 303 This is done optionally via the 312 This is done optionally via the \np{nn\_dynhpg\_rst} namelist parameter, 304 313 so that the size of the restart file can be reduced when restartability is not a key issue 305 314 (operational oceanography or in ensemble simulations for seasonal forecasting). … … 307 316 Note the size of the time step used, $\rdt$, is also saved in the restart file. 308 317 When restarting, if the the time step has been changed, a restart using an Euler time stepping scheme is imposed. 309 Options are defined through the 318 Options are defined through the \ngn{namrun} namelist variables. 310 319 %%% 311 320 \gmcomment{ … … 351 360 352 361 \begin{flalign*} 353 &\frac{\left( e_{3t}\,T \right)_k^{t+1}-\left( e_{3t}\,T \right)_k^{t-1}}{2\rdt}354 \equiv \text{RHS}+ \delta _k \left[ {\frac{A_w^{vt} }{e_{3w}^{t+1} }\delta _{k+1/2} \left[ {T^{t+1}} \right]} 355 \right] \\356 &\left( e_{3t}\,T \right)_k^{t+1}-\left( e_{3t}\,T \right)_k^{t-1}357 \equiv {2\rdt} \ \text{RHS}+ {2\rdt} \ \delta _k \left[ {\frac{A_w^{vt} }{e_{3w}^{t+1} }\delta _{k+1/2} \left[ {T^{t+1}} \right]} 358 \right] \\359 &\left( e_{3t}\,T \right)_k^{t+1}-\left( e_{3t}\,T \right)_k^{t-1}360 \equiv 2\rdt \ \text{RHS}361 + 2\rdt \ \left\{ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k+1/2} [ T_{k+1}^{t+1} - T_k ^{t+1} ]362 363 &\\364 &\left( e_{3t}\,T \right)_k^{t+1}365 - {2\rdt} \ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k+1/2} T_{k+1}^{t+1} 366 + {2\rdt} \ \left\{ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k+1/2} 367 368 - {2\rdt} \ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k-1/2} T_{k-1}^{t+1} \\369 &\equiv \left( e_{3t}\,T \right)_k^{t-1} + {2\rdt} \ \text{RHS} \\370 % 362 &\frac{\left( e_{3t}\,T \right)_k^{t+1}-\left( e_{3t}\,T \right)_k^{t-1}}{2\rdt} 363 \equiv \text{RHS}+ \delta_k \left[ {\frac{A_w^{vt} }{e_{3w}^{t+1} }\delta_{k+1/2} \left[ {T^{t+1}} \right]} 364 \right] \\ 365 &\left( e_{3t}\,T \right)_k^{t+1}-\left( e_{3t}\,T \right)_k^{t-1} 366 \equiv {2\rdt} \ \text{RHS}+ {2\rdt} \ \delta_k \left[ {\frac{A_w^{vt} }{e_{3w}^{t+1} }\delta_{k+1/2} \left[ {T^{t+1}} \right]} 367 \right] \\ 368 &\left( e_{3t}\,T \right)_k^{t+1}-\left( e_{3t}\,T \right)_k^{t-1} 369 \equiv 2\rdt \ \text{RHS} 370 + 2\rdt \ \left\{ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k+1/2} [ T_{k+1}^{t+1} - T_k ^{t+1} ] 371 - \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k-1/2} [ T_k ^{t+1} - T_{k-1}^{t+1} ] \right\} \\ 372 &\\ 373 &\left( e_{3t}\,T \right)_k^{t+1} 374 - {2\rdt} \ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k+1/2} T_{k+1}^{t+1} 375 + {2\rdt} \ \left\{ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k+1/2} 376 + \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k-1/2} \right\} T_{k }^{t+1} 377 - {2\rdt} \ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k-1/2} T_{k-1}^{t+1} \\ 378 &\equiv \left( e_{3t}\,T \right)_k^{t-1} + {2\rdt} \ \text{RHS} \\ 379 % 371 380 \end{flalign*} 372 381 373 382 \begin{flalign*} 374 \allowdisplaybreaks375 \intertext{ Tracer case }376 %377 & \qquad \qquad \quad - {2\rdt} \ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k+1/2} 378 379 &+ {2\rdt} \ \biggl\{ (e_{3t})_{k }^{t+1} \bigg. + \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k+1/2} 380 381 & \qquad \qquad \qquad \qquad \qquad \quad \ \ - {2\rdt} \ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k-1/2} \quad \ \ T_{k-1}^{t+1} 382 \ \equiv \ \left( e_{3t}\,T \right)_k^{t-1} + {2\rdt} \ \text{RHS} \\383 %383 \allowdisplaybreaks 384 \intertext{ Tracer case } 385 % 386 & \qquad \qquad \quad - {2\rdt} \ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k+1/2} 387 \qquad \qquad \qquad \qquad T_{k+1}^{t+1} \\ 388 &+ {2\rdt} \ \biggl\{ (e_{3t})_{k }^{t+1} \bigg. + \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k+1/2} 389 + \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k-1/2} \bigg. \biggr\} \ \ \ T_{k }^{t+1} &&\\ 390 & \qquad \qquad \qquad \qquad \qquad \quad \ \ - {2\rdt} \ \left[ \frac{A_w^{vt}}{e_{3w}^{t+1}} \right]_{k-1/2} \quad \ \ T_{k-1}^{t+1} 391 \ \equiv \ \left( e_{3t}\,T \right)_k^{t-1} + {2\rdt} \ \text{RHS} \\ 392 % 384 393 \end{flalign*} 385 394 \begin{flalign*} 386 \allowdisplaybreaks387 \intertext{ Tracer content case }388 %389 & - {2\rdt} \ & \frac{(A_w^{vt})_{k+1/2}} {(e_{3w})_{k+1/2}^{t+1}\;(e_{3t})_{k+1}^{t+1}} && \ \left( e_{3t}\,T \right)_{k+1}^{t+1} &\\390 & + {2\rdt} \ \left[ 1 \right.+ & \frac{(A_w^{vt})_{k+1/2}} {(e_{3w})_{k+1/2}^{t+1}\;(e_{3t})_k^{t+1}} 391 392 & - {2\rdt} \ & \frac{(A_w^{vt})_{k -1/2}} {(e_{3w})_{k -1/2}^{t+1}\;(e_{3t})_{k-1}^{t+1}} &\ \left( e_{3t}\,T \right)_{k-1}^{t+1} 393 \equiv \left( e_{3t}\,T \right)_k^{t-1} + {2\rdt} \ \text{RHS} &395 \allowdisplaybreaks 396 \intertext{ Tracer content case } 397 % 398 & - {2\rdt} \ & \frac{(A_w^{vt})_{k+1/2}} {(e_{3w})_{k+1/2}^{t+1}\;(e_{3t})_{k+1}^{t+1}} && \ \left( e_{3t}\,T \right)_{k+1}^{t+1} &\\ 399 & + {2\rdt} \ \left[ 1 \right.+ & \frac{(A_w^{vt})_{k+1/2}} {(e_{3w})_{k+1/2}^{t+1}\;(e_{3t})_k^{t+1}} 400 + & \frac{(A_w^{vt})_{k -1/2}} {(e_{3w})_{k -1/2}^{t+1}\;(e_{3t})_k^{t+1}} \left. \right] & \left( e_{3t}\,T \right)_{k }^{t+1} &\\ 401 & - {2\rdt} \ & \frac{(A_w^{vt})_{k -1/2}} {(e_{3w})_{k -1/2}^{t+1}\;(e_{3t})_{k-1}^{t+1}} &\ \left( e_{3t}\,T \right)_{k-1}^{t+1} 402 \equiv \left( e_{3t}\,T \right)_k^{t-1} + {2\rdt} \ \text{RHS} & 394 403 \end{flalign*} 395 404 … … 397 406 } 398 407 %% 408 \biblio 409 399 410 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/NEMO/subfiles/introduction.tex
r10377 r10419 1 \documentclass[../tex_main/NEMO_manual]{subfiles} 1 \documentclass[../main/NEMO_manual]{subfiles} 2 2 3 \begin{document} 3 4 … … 9 10 10 11 The Nucleus for European Modelling of the Ocean (\NEMO) is a framework of ocean related engines, 11 namely OPA \footnote{OPA = Oc\'{e}an PArall\'{e}lis\'{e}} for the ocean dynamics and thermodynamics,12 LIM \footnote{LIM = Louvain la-neuve Ice Model} for the sea-ice dynamics and thermodynamics,13 TOP \footnote{TOP = Tracer in the Ocean Paradigm} for the biogeochemistry (both transport (TRP) and sources14 minus sinks (LOBSTER \footnote{LOBSTER = Lodyc Ocean Biogeochemical SysTem for Ecosystem and Resources},15 PISCES \footnote{PISCES = Pelagic Interactions Scheme for Carbon and Ecosystem Studies})).12 namely OPA \footnote{OPA = Oc\'{e}an PArall\'{e}lis\'{e}} for the ocean dynamics and thermodynamics, 13 LIM \footnote{LIM = Louvain la-neuve Ice Model} for the sea-ice dynamics and thermodynamics, 14 TOP \footnote{TOP = Tracer in the Ocean Paradigm} for the biogeochemistry (both transport (TRP) and sources 15 minus sinks (LOBSTER \footnote{LOBSTER = Lodyc Ocean Biogeochemical SysTem for Ecosystem and Resources}, 16 PISCES \footnote{PISCES = Pelagic Interactions Scheme for Carbon and Ecosystem Studies})). 16 17 It is intended to be a flexible tool for studying the ocean and its interactions with the other components of 17 18 the earth climate system (atmosphere, sea-ice, biogeochemical tracers, ...) over … … 316 317 317 318 319 \biblio 320 318 321 \end{document} -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/SI3
-
Property
svn:ignore
set to
*.aux
*.bbl
*.blg
*.dvi
*.fdb*
*.fls
*.idx
*.ilg
*.ind
*.log
*.maf
*.mtc*
*.out
*.pdf
*.toc
_minted-*
-
Property
svn:ignore
set to
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/SI3/Figures
-
Property
svn:ignore
set to
*.aux
*.bbl
*.blg
*.dvi
*.fdb*
*.fls
*.idx
*.ilg
*.ind
*.log
*.maf
*.mtc*
*.out
*.pdf
*.toc
_minted-*
-
Property
svn:ignore
set to
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/SI3/Figures/drafts
-
Property
svn:ignore
set to
*.aux
*.bbl
*.blg
*.dvi
*.fdb*
*.fls
*.idx
*.ilg
*.ind
*.log
*.maf
*.mtc*
*.out
*.pdf
*.toc
_minted-*
-
Property
svn:ignore
set to
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/SI3/Figures/scripts
-
Property
svn:ignore
set to
*.aux
*.bbl
*.blg
*.dvi
*.fdb*
*.fls
*.idx
*.ilg
*.ind
*.log
*.maf
*.mtc*
*.out
*.pdf
*.toc
_minted-*
-
Property
svn:ignore
set to
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/SI3/namelists
-
Property
svn:ignore
set to
*.aux
*.bbl
*.blg
*.dvi
*.fdb*
*.fls
*.idx
*.ilg
*.ind
*.log
*.maf
*.mtc*
*.out
*.pdf
*.toc
_minted-*
-
Property
svn:ignore
set to
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/SI3/tex_main
- Property svn:ignore
-
old new 3 3 *.blg 4 4 *.dvi 5 *.fdb* 6 *.fls 5 7 *.idx 6 8 *.ilg
-
- Property svn:ignore
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/SI3/tex_sub
-
Property
svn:ignore
set to
*.aux
*.bbl
*.blg
*.dvi
*.fdb*
*.fls
*.idx
*.ilg
*.ind
*.log
*.maf
*.mtc*
*.out
*.pdf
*.toc
_minted-*
-
Property
svn:ignore
set to
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/latex/TOP
-
Property
svn:ignore
set to
*.aux
*.bbl
*.blg
*.dvi
*.fdb*
*.fls
*.idx
*.ilg
*.ind
*.log
*.maf
*.mtc*
*.out
*.pdf
*.toc
_minted-*
-
Property
svn:ignore
set to
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/ice.F90
r10292 r10419 129 129 ! !!** ice-dynamics namelist (namdyn) ** 130 130 REAL(wp), PUBLIC :: rn_ishlat !: lateral boundary condition for sea-ice 131 LOGICAL , PUBLIC :: ln_landfast !: landfast ice parameterization (T or F) 132 REAL(wp), PUBLIC :: rn_gamma !: fraction of ocean depth that ice must reach to initiate landfast ice 133 REAL(wp), PUBLIC :: rn_icebfr !: maximum bottom stress per unit area of contact (landfast ice) 134 REAL(wp), PUBLIC :: rn_lfrelax !: relaxation time scale (s-1) to reach static friction (landfast ice) 135 ! 136 ! !!** ice-rheology namelist (namrhg) ** 131 LOGICAL , PUBLIC :: ln_landfast_L16 !: landfast ice parameterizationfrom lemieux2016 132 LOGICAL , PUBLIC :: ln_landfast_home !: landfast ice parameterizationfrom home made 133 REAL(wp), PUBLIC :: rn_depfra !: fraction of ocean depth that ice must reach to initiate landfast ice 134 REAL(wp), PUBLIC :: rn_icebfr !: maximum bottom stress per unit area of contact (lemieux2016) or per unit volume (home) 135 REAL(wp), PUBLIC :: rn_lfrelax !: relaxation time scale (s-1) to reach static friction 136 REAL(wp), PUBLIC :: rn_tensile !: isotropic tensile strength 137 ! 138 ! !!** ice-ridging/rafting namelist (namdyn_rdgrft) ** 139 REAL(wp), PUBLIC :: rn_crhg !: determines changes in ice strength (also used for landfast param) 140 ! 141 ! !!** ice-rheology namelist (namdyn_rhg) ** 137 142 LOGICAL , PUBLIC :: ln_aEVP !: using adaptive EVP (T or F) 138 143 REAL(wp), PUBLIC :: rn_creepl !: creep limit : has to be under 1.0e-9 … … 140 145 INTEGER , PUBLIC :: nn_nevp !: number of iterations for subcycling 141 146 REAL(wp), PUBLIC :: rn_relast !: ratio => telast/rdt_ice (1/3 or 1/9 depending on nb of subcycling nevp) 147 ! 148 ! !!** ice-advection namelist (namdyn_adv) ** 149 LOGICAL , PUBLIC :: ln_adv_Pra !: Prather advection scheme 150 LOGICAL , PUBLIC :: ln_adv_UMx !: Ultimate-Macho advection scheme 142 151 ! 143 152 ! !!** ice-surface forcing namelist (namforcing) ** … … 325 334 !! * Old values of global variables 326 335 !!---------------------------------------------------------------------- 327 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: v_s_b, v_i_b, h_s_b, h_i_b !: snow and ice volumes/thickness328 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i_b, sv_i_b, oa_i_b !:329 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: e_s_b !: snow heat content330 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: e_i_b !: ice temperatures331 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: u_ice_b, v_ice_b !: ice velocity332 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: at_i_b !: ice concentration (total)336 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: v_s_b, v_i_b, h_s_b, h_i_b, h_ip_b !: snow and ice volumes/thickness 337 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i_b, sv_i_b, oa_i_b !: 338 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: e_s_b !: snow heat content 339 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: e_i_b !: ice temperatures 340 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: u_ice_b, v_ice_b !: ice velocity 341 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: at_i_b !: ice concentration (total) 333 342 334 343 !!---------------------------------------------------------------------- … … 434 443 ! * Old values of global variables 435 444 ii = ii + 1 436 ALLOCATE( v_s_b (jpi,jpj,jpl) , v_i_b (jpi,jpj,jpl) , h_s_b(jpi,jpj,jpl) , h_i_b(jpi,jpj,jpl) ,&437 & a_i_b (jpi,jpj,jpl) , sv_i_b(jpi,jpj,jpl) , e_i_b(jpi,jpj,nlay_i,jpl) , e_s_b(jpi,jpj,nlay_s,jpl) , &445 ALLOCATE( v_s_b (jpi,jpj,jpl) , v_i_b (jpi,jpj,jpl) , h_s_b(jpi,jpj,jpl) , h_i_b(jpi,jpj,jpl), h_ip_b(jpi,jpj,jpl), & 446 & a_i_b (jpi,jpj,jpl) , sv_i_b(jpi,jpj,jpl) , e_i_b(jpi,jpj,nlay_i,jpl) , e_s_b(jpi,jpj,nlay_s,jpl) , & 438 447 & oa_i_b(jpi,jpj,jpl) , STAT=ierr(ii) ) 439 448 -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icectl.F90
r10314 r10419 197 197 198 198 ! heat flux 199 zhfx = glob_sum( 'icectl', ( qt_atm_oi - qt_oce_ai - diag_heat - diag_trp_ei - diag_trp_es & 200 ! & - SUM( qevap_ice * a_i_b, dim=3 ) & !!clem: I think this line must be commented (but need check) 201 & ) * e1e2t ) * zconv 199 zhfx = glob_sum( 'icectl', ( qt_atm_oi - qt_oce_ai - diag_heat ) * e1e2t ) * zconv 202 200 203 201 ! set threshold values and calculate the ice area (+epsi10 to set a threshold > 0 when there is no ice) -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn.F90
r10170 r10419 21 21 USE icecor ! sea-ice: corrections 22 22 USE icevar ! sea-ice: operations 23 USE icectl ! sea-ice: control prints 23 24 ! 24 25 USE in_out_manager ! I/O manager … … 37 38 INTEGER :: nice_dyn ! choice of the type of dynamics 38 39 ! ! associated indices: 39 INTEGER, PARAMETER :: np_dyn FULL= 1 ! full ice dynamics (rheology + advection + ridging/rafting + correction)40 INTEGER, PARAMETER :: np_dynALL = 1 ! full ice dynamics (rheology + advection + ridging/rafting + correction) 40 41 INTEGER, PARAMETER :: np_dynRHGADV = 2 ! pure dynamics (rheology + advection) 41 INTEGER, PARAMETER :: np_dynADV = 3 ! only advection w prescribed vel.(rn_uvice + advection) 42 INTEGER, PARAMETER :: np_dynADV1D = 3 ! only advection 1D - test case from Schar & Smolarkiewicz 1996 43 INTEGER, PARAMETER :: np_dynADV2D = 4 ! only advection 2D w prescribed vel.(rn_uvice + advection) 42 44 ! 43 45 ! ** namelist (namdyn) ** 44 LOGICAL :: ln_dynFULL ! full ice dynamics (rheology + advection + ridging/rafting + correction) 45 LOGICAL :: ln_dynRHGADV ! no ridge/raft & no corrections (rheology + advection) 46 LOGICAL :: ln_dynADV ! only advection w prescribed vel.(rn_uvice + advection) 47 REAL(wp) :: rn_uice ! prescribed u-vel (case np_dynADV) 48 REAL(wp) :: rn_vice ! prescribed v-vel (case np_dynADV) 46 LOGICAL :: ln_dynALL ! full ice dynamics (rheology + advection + ridging/rafting + correction) 47 LOGICAL :: ln_dynRHGADV ! no ridge/raft & no corrections (rheology + advection) 48 LOGICAL :: ln_dynADV1D ! only advection in 1D w ice convergence (test case from Schar & Smolarkiewicz 1996) 49 LOGICAL :: ln_dynADV2D ! only advection in 2D w prescribed vel. (rn_uvice + advection) 50 REAL(wp) :: rn_uice ! prescribed u-vel (case np_dynADV1D & np_dynADV2D) 51 REAL(wp) :: rn_vice ! prescribed v-vel (case np_dynADV1D & np_dynADV2D) 49 52 50 53 !! * Substitutions … … 53 56 !! NEMO/ICE 4.0 , NEMO Consortium (2018) 54 57 !! $Id$ 55 !! Software governed by the CeCILL licen se (see./LICENSE)58 !! Software governed by the CeCILL licence (./LICENSE) 56 59 !!---------------------------------------------------------------------- 57 60 CONTAINS … … 71 74 INTEGER, INTENT(in) :: kt ! ice time step 72 75 !! 73 INTEGER :: ji, jj, jl ! dummy loop indices 74 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zhmax 76 INTEGER :: ji, jj, jl ! dummy loop indices 77 REAL(wp) :: zcoefu, zcoefv 78 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zhi_max, zhs_max, zhip_max 79 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdivu_i 75 80 !!-------------------------------------------------------------------- 76 81 ! 77 IF( ln_timing ) CALL timing_start('icedyn') 82 ! controls 83 IF( ln_timing ) CALL timing_start('icedyn') ! timing 84 IF( ln_icediachk ) CALL ice_cons_hsm(0, 'icedyn', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 78 85 ! 79 86 IF( kt == nit000 .AND. lwp ) THEN … … 82 89 WRITE(numout,*)'~~~~~~~' 83 90 ENDIF 84 85 91 ! 86 IF( ln_landfast ) THEN !-- Landfast ice parameterization: define max bottom friction92 IF( ln_landfast_home ) THEN !-- Landfast ice parameterization 87 93 tau_icebfr(:,:) = 0._wp 88 94 DO jl = 1, jpl 89 WHERE( h_i(:,:,jl) > ht_n(:,:) * rn_gamma ) tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr 90 END DO 91 IF( iom_use('tau_icebfr') ) CALL iom_put( 'tau_icebfr', tau_icebfr ) 92 ENDIF 93 94 zhmax(:,:,:) = h_i_b(:,:,:) !-- Record max of the surrounding 9-pts ice thick. (for CALL Hbig) 95 WHERE( h_i_b(:,:,jl) > ht_n(:,:) * rn_depfra ) tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr 96 END DO 97 ENDIF 98 ! 99 ! !-- Record max of the surrounding 9-pts ice thick. (for CALL Hbig) 95 100 DO jl = 1, jpl 96 101 DO jj = 2, jpjm1 102 DO ji = fs_2, fs_jpim1 103 zhip_max(ji,jj,jl) = MAX( epsi20, h_ip_b(ji,jj,jl), h_ip_b(ji+1,jj ,jl), h_ip_b(ji ,jj+1,jl), & 104 & h_ip_b(ji-1,jj ,jl), h_ip_b(ji ,jj-1,jl), & 105 & h_ip_b(ji+1,jj+1,jl), h_ip_b(ji-1,jj-1,jl), & 106 & h_ip_b(ji+1,jj-1,jl), h_ip_b(ji-1,jj+1,jl) ) 107 zhi_max (ji,jj,jl) = MAX( epsi20, h_i_b (ji,jj,jl), h_i_b (ji+1,jj ,jl), h_i_b (ji ,jj+1,jl), & 108 & h_i_b (ji-1,jj ,jl), h_i_b (ji ,jj-1,jl), & 109 & h_i_b (ji+1,jj+1,jl), h_i_b (ji-1,jj-1,jl), & 110 & h_i_b (ji+1,jj-1,jl), h_i_b (ji-1,jj+1,jl) ) 111 zhs_max (ji,jj,jl) = MAX( epsi20, h_s_b (ji,jj,jl), h_s_b (ji+1,jj ,jl), h_s_b (ji ,jj+1,jl), & 112 & h_s_b (ji-1,jj ,jl), h_s_b (ji ,jj-1,jl), & 113 & h_s_b (ji+1,jj+1,jl), h_s_b (ji-1,jj-1,jl), & 114 & h_s_b (ji+1,jj-1,jl), h_s_b (ji-1,jj+1,jl) ) 115 END DO 116 END DO 117 END DO 118 CALL lbc_lnk_multi( 'icedyn', zhi_max(:,:,:), 'T', 1., zhs_max(:,:,:), 'T', 1., zhip_max(:,:,:), 'T', 1. ) 119 ! 120 ! 121 SELECT CASE( nice_dyn ) !-- Set which dynamics is running 122 123 CASE ( np_dynALL ) !== all dynamical processes ==! 124 CALL ice_dyn_rhg ( kt ) ! -- rheology 125 CALL ice_dyn_adv ( kt ) ; CALL Hbig( zhi_max, zhs_max, zhip_max ) ! -- advection of ice + correction on ice thickness 126 CALL ice_dyn_rdgrft( kt ) ! -- ridging/rafting 127 CALL ice_cor ( kt , 1 ) ! -- Corrections 128 129 CASE ( np_dynRHGADV ) !== no ridge/raft & no corrections ==! 130 CALL ice_dyn_rhg ( kt ) ! -- rheology 131 CALL ice_dyn_adv ( kt ) ; CALL Hbig( zhi_max, zhs_max, zhip_max ) ! -- advection of ice + correction on ice thickness 132 CALL Hpiling ! -- simple pile-up (replaces ridging/rafting) 133 134 CASE ( np_dynADV1D ) !== pure advection ==! (1D) 135 ALLOCATE( zdivu_i(jpi,jpj) ) 136 ! --- monotonicity test from Schar & Smolarkiewicz 1996 --- ! 137 ! CFL = 0.5 at a distance from the bound of 1/6 of the basin length 138 ! Then for dx = 2m and dt = 1s => rn_uice = u (1/6th) = 1m/s 139 DO jj = 1, jpj 140 DO ji = 1, jpi 141 zcoefu = ( REAL(jpiglo+1)*0.5 - REAL(ji+nimpp-1) ) / ( REAL(jpiglo+1)*0.5 - 1. ) 142 zcoefv = ( REAL(jpjglo+1)*0.5 - REAL(jj+njmpp-1) ) / ( REAL(jpjglo+1)*0.5 - 1. ) 143 u_ice(ji,jj) = rn_uice * 1.5 * SIGN( 1., zcoefu ) * ABS( zcoefu ) * umask(ji,jj,1) 144 v_ice(ji,jj) = rn_vice * 1.5 * SIGN( 1., zcoefv ) * ABS( zcoefv ) * vmask(ji,jj,1) 145 END DO 146 END DO 147 ! --- 148 CALL ice_dyn_adv ( kt ) ! -- advection of ice + correction on ice thickness 149 150 ! diagnostics: divergence at T points 151 DO jj = 2, jpjm1 97 152 DO ji = 2, jpim1 98 !!gm use of MAXVAL here is very probably less efficient than expending the 9 values 99 zhmax(ji,jj,jl) = MAX( epsi20, MAXVAL( h_i_b(ji-1:ji+1,jj-1:jj+1,jl) ) ) 100 END DO 101 END DO 102 END DO 103 CALL lbc_lnk( 'icedyn', zhmax(:,:,:), 'T', 1. ) 104 ! 105 ! 106 SELECT CASE( nice_dyn ) !-- Set which dynamics is running 107 108 CASE ( np_dynFULL ) !== all dynamical processes ==! 109 CALL ice_dyn_rhg ( kt ) ! -- rheology 110 CALL ice_dyn_adv ( kt ) ; CALL Hbig( zhmax ) ! -- advection of ice + correction on ice thickness 111 CALL ice_dyn_rdgrft( kt ) ! -- ridging/rafting 112 CALL ice_cor ( kt , 1 ) ! -- Corrections 113 114 CASE ( np_dynRHGADV ) !== no ridge/raft & no corrections ==! 115 CALL ice_dyn_rhg ( kt ) ! -- rheology 116 CALL ice_dyn_adv ( kt ) ! -- advection of ice 117 CALL Hpiling ! -- simple pile-up (replaces ridging/rafting) 118 119 CASE ( np_dynADV ) !== pure advection ==! (prescribed velocities) 153 zdivu_i(ji,jj) = ( e2u(ji,jj) * u_ice(ji,jj) - e2u(ji-1,jj) * u_ice(ji-1,jj) & 154 & + e1v(ji,jj) * v_ice(ji,jj) - e1v(ji,jj-1) * v_ice(ji,jj-1) ) * r1_e1e2t(ji,jj) 155 END DO 156 END DO 157 CALL lbc_lnk( 'icedyn', zdivu_i, 'T', 1. ) 158 IF( iom_use('icediv') ) CALL iom_put( "icediv" , zdivu_i(:,:) ) 159 160 DEALLOCATE( zdivu_i ) 161 162 CASE ( np_dynADV2D ) !== pure advection ==! (2D w prescribed velocities) 163 ALLOCATE( zdivu_i(jpi,jpj) ) 120 164 u_ice(:,:) = rn_uice * umask(:,:,1) 121 165 v_ice(:,:) = rn_vice * vmask(:,:,1) 122 !!CALL RANDOM_NUMBER(u_ice(:,:)) 123 !!CALL RANDOM_NUMBER(v_ice(:,:)) 124 CALL ice_dyn_adv ( kt ) ! -- advection of ice 166 !CALL RANDOM_NUMBER(u_ice(:,:)) ; u_ice(:,:) = u_ice(:,:) * 0.1 + rn_uice * 0.9 * umask(:,:,1) 167 !CALL RANDOM_NUMBER(v_ice(:,:)) ; v_ice(:,:) = v_ice(:,:) * 0.1 + rn_vice * 0.9 * vmask(:,:,1) 168 ! --- 169 CALL ice_dyn_adv ( kt ) ; CALL Hbig( zhi_max, zhs_max, zhip_max ) ! -- advection of ice + correction on ice thickness 170 171 ! diagnostics: divergence at T points 172 DO jj = 2, jpjm1 173 DO ji = 2, jpim1 174 zdivu_i(ji,jj) = ( e2u(ji,jj) * u_ice(ji,jj) - e2u(ji-1,jj) * u_ice(ji-1,jj) & 175 & + e1v(ji,jj) * v_ice(ji,jj) - e1v(ji,jj-1) * v_ice(ji,jj-1) ) * r1_e1e2t(ji,jj) 176 END DO 177 END DO 178 CALL lbc_lnk( 'icedyn', zdivu_i, 'T', 1. ) 179 IF( iom_use('icediv') ) CALL iom_put( "icediv" , zdivu_i(:,:) ) 180 181 DEALLOCATE( zdivu_i ) 125 182 126 183 END SELECT 127 ! 128 IF( ln_timing ) CALL timing_stop('icedyn') 184 ! 185 ! controls 186 IF( ln_icediachk ) CALL ice_cons_hsm(1, 'icedyn', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 187 IF( ln_timing ) CALL timing_stop ('icedyn') ! timing 129 188 ! 130 189 END SUBROUTINE ice_dyn 131 190 132 191 133 SUBROUTINE Hbig( ph max )192 SUBROUTINE Hbig( phi_max, phs_max, phip_max ) 134 193 !!------------------------------------------------------------------- 135 194 !! *** ROUTINE Hbig *** 136 195 !! 137 196 !! ** Purpose : Thickness correction in case advection scheme creates 138 !! abnormally tick ice 139 !! 140 !! ** Method : 1- check whether ice thickness resulting from advection is 141 !! larger than the surrounding 9-points before advection 142 !! and reduce it if a) divergence or b) convergence & at_i>0.8 143 !! 2- bound ice thickness with hi_max (99m) 197 !! abnormally tick ice or snow 198 !! 199 !! ** Method : 1- check whether ice thickness is larger than the surrounding 9-points 200 !! (before advection) and reduce it by adapting ice concentration 201 !! 2- check whether snow thickness is larger than the surrounding 9-points 202 !! (before advection) and reduce it by sending the excess in the ocean 203 !! 3- check whether snow load deplets the snow-ice interface below sea level$ 204 !! and reduce it by sending the excess in the ocean 205 !! 4- correct pond fraction to avoid a_ip > a_i 144 206 !! 145 207 !! ** input : Max thickness of the surrounding 9-points 146 208 !!------------------------------------------------------------------- 147 REAL(wp), DIMENSION(:,:,:), INTENT(in) :: ph max ! max ice thick from surrounding 9-pts209 REAL(wp), DIMENSION(:,:,:), INTENT(in) :: phi_max, phs_max, phip_max ! max ice thick from surrounding 9-pts 148 210 ! 149 211 INTEGER :: ji, jj, jl ! dummy loop indices 150 REAL(wp) :: zh , zdv212 REAL(wp) :: zhip, zhi, zhs, zvs_excess, zfra 151 213 !!------------------------------------------------------------------- 152 214 ! … … 156 218 DO jj = 1, jpj 157 219 DO ji = 1, jpi 158 IF ( v_i(ji,jj,jl) > 0._wp ) THEN !-- bound to hmax220 IF ( v_i(ji,jj,jl) > 0._wp ) THEN 159 221 ! 160 zh = v_i (ji,jj,jl) / a_i(ji,jj,jl) 161 zdv = v_i(ji,jj,jl) - v_i_b(ji,jj,jl) 162 ! 163 IF ( ( zdv > 0.0 .AND. zh > phmax(ji,jj,jl) .AND. at_i_b(ji,jj) < 0.80 ) .OR. & 164 & ( zdv <= 0.0 .AND. zh > phmax(ji,jj,jl) ) ) THEN 165 a_i (ji,jj,jl) = v_i(ji,jj,jl) / MIN( phmax(ji,jj,jl), hi_max(jpl) ) !-- bound h_i to hi_max (99 m) 222 ! ! -- check h_ip -- ! 223 ! if h_ip is larger than the surrounding 9 pts => reduce h_ip and increase a_ip 224 IF( ln_pnd_H12 .AND. v_ip(ji,jj,jl) > 0._wp ) THEN 225 zhip = v_ip(ji,jj,jl) / MAX( epsi20, a_ip(ji,jj,jl) ) 226 IF( zhip > phip_max(ji,jj,jl) .AND. a_ip(ji,jj,jl) < 0.15 ) THEN 227 a_ip(ji,jj,jl) = v_ip(ji,jj,jl) / phip_max(ji,jj,jl) 228 ENDIF 166 229 ENDIF 167 230 ! 231 ! ! -- check h_i -- ! 232 ! if h_i is larger than the surrounding 9 pts => reduce h_i and increase a_i 233 zhi = v_i(ji,jj,jl) / a_i(ji,jj,jl) 234 IF( zhi > phi_max(ji,jj,jl) .AND. a_i(ji,jj,jl) < 0.15 ) THEN 235 a_i(ji,jj,jl) = v_i(ji,jj,jl) / MIN( phi_max(ji,jj,jl), hi_max(jpl) ) !-- bound h_i to hi_max (99 m) 236 ENDIF 237 ! 238 ! ! -- check h_s -- ! 239 ! if h_s is larger than the surrounding 9 pts => put the snow excess in the ocean 240 zhs = v_s(ji,jj,jl) / a_i(ji,jj,jl) 241 IF( v_s(ji,jj,jl) > 0._wp .AND. zhs > phs_max(ji,jj,jl) .AND. a_i(ji,jj,jl) < 0.15 ) THEN 242 zfra = a_i(ji,jj,jl) * phs_max(ji,jj,jl) / MAX( v_s(ji,jj,jl), epsi20 ) 243 ! 244 wfx_res(ji,jj) = wfx_res(ji,jj) + ( v_s(ji,jj,jl) - a_i(ji,jj,jl) * phs_max(ji,jj,jl) ) * rhos * r1_rdtice 245 hfx_res(ji,jj) = hfx_res(ji,jj) - SUM( e_s(ji,jj,1:nlay_s,jl) ) * ( 1._wp - zfra ) * r1_rdtice ! W.m-2 <0 246 ! 247 e_s(ji,jj,1:nlay_s,jl) = e_s(ji,jj,1:nlay_s,jl) * zfra 248 v_s(ji,jj,jl) = a_i(ji,jj,jl) * phs_max(ji,jj,jl) 249 ENDIF 250 ! 251 ! ! -- check snow load -- ! 252 ! if snow load makes snow-ice interface to deplet below the ocean surface => put the snow excess in the ocean 253 ! this correction is crucial because of the call to routine icecor afterwards which imposes a mini of ice thick. (rn_himin) 254 ! this imposed mini can artificially make the snow very thick (if concentration decreases drastically) 255 zvs_excess = MAX( 0._wp, v_s(ji,jj,jl) - v_i(ji,jj,jl) * (rau0-rhoi) * r1_rhos ) 256 IF( zvs_excess > 0._wp ) THEN 257 zfra = zvs_excess / MAX( v_s(ji,jj,jl), epsi20 ) 258 wfx_res(ji,jj) = wfx_res(ji,jj) + zvs_excess * rhos * r1_rdtice 259 hfx_res(ji,jj) = hfx_res(ji,jj) - SUM( e_s(ji,jj,1:nlay_s,jl) ) * ( 1._wp - zfra ) * r1_rdtice ! W.m-2 <0 260 ! 261 e_s(ji,jj,1:nlay_s,jl) = e_s(ji,jj,1:nlay_s,jl) * zfra 262 v_s(ji,jj,jl) = v_s(ji,jj,jl) - zvs_excess 263 ENDIF 264 168 265 ENDIF 169 266 END DO … … 215 312 INTEGER :: ios, ioptio ! Local integer output status for namelist read 216 313 !! 217 NAMELIST/namdyn/ ln_dyn FULL, ln_dynRHGADV, ln_dynADV, rn_uice, rn_vice, &218 & rn_ishlat ,&219 & ln_landfast , rn_gamma , rn_icebfr, rn_lfrelax314 NAMELIST/namdyn/ ln_dynALL, ln_dynRHGADV, ln_dynADV1D, ln_dynADV2D, rn_uice, rn_vice, & 315 & rn_ishlat , & 316 & ln_landfast_L16, ln_landfast_home, rn_depfra, rn_icebfr, rn_lfrelax, rn_tensile 220 317 !!------------------------------------------------------------------- 221 318 ! … … 233 330 WRITE(numout,*) '~~~~~~~~~~~~' 234 331 WRITE(numout,*) ' Namelist namdyn:' 235 WRITE(numout,*) ' Full ice dynamics (rhg + adv + ridge/raft + corr) ln_dynFULL = ', ln_dynFULL 236 WRITE(numout,*) ' No ridge/raft & No cor (rhg + adv) ln_dynRHGADV = ', ln_dynRHGADV 237 WRITE(numout,*) ' Advection only (rn_uvice + adv) ln_dynADV = ', ln_dynADV 238 WRITE(numout,*) ' with prescribed velocity given by (u,v)_ice = (rn_uice,rn_vice) = (', rn_uice,',', rn_vice,')' 239 WRITE(numout,*) ' lateral boundary condition for sea ice dynamics rn_ishlat = ', rn_ishlat 240 WRITE(numout,*) ' Landfast: param (T or F) ln_landfast = ', ln_landfast 241 WRITE(numout,*) ' fraction of ocean depth that ice must reach rn_gamma = ', rn_gamma 242 WRITE(numout,*) ' maximum bottom stress per unit area of contact rn_icebfr = ', rn_icebfr 243 WRITE(numout,*) ' relax time scale (s-1) to reach static friction rn_lfrelax = ', rn_lfrelax 332 WRITE(numout,*) ' Full ice dynamics (rhg + adv + ridge/raft + corr) ln_dynALL = ', ln_dynALL 333 WRITE(numout,*) ' No ridge/raft & No cor (rhg + adv) ln_dynRHGADV = ', ln_dynRHGADV 334 WRITE(numout,*) ' Advection 1D only (Schar & Smolarkiewicz 1996) ln_dynADV1D = ', ln_dynADV1D 335 WRITE(numout,*) ' Advection 2D only (rn_uvice + adv) ln_dynADV2D = ', ln_dynADV2D 336 WRITE(numout,*) ' with prescribed velocity given by (u,v)_ice = (rn_uice,rn_vice) = (', rn_uice,',', rn_vice,')' 337 WRITE(numout,*) ' lateral boundary condition for sea ice dynamics rn_ishlat = ', rn_ishlat 338 WRITE(numout,*) ' Landfast: param from Lemieux 2016 ln_landfast_L16 = ', ln_landfast_L16 339 WRITE(numout,*) ' Landfast: param from home made ln_landfast_home= ', ln_landfast_home 340 WRITE(numout,*) ' fraction of ocean depth that ice must reach rn_depfra = ', rn_depfra 341 WRITE(numout,*) ' maximum bottom stress per unit area of contact rn_icebfr = ', rn_icebfr 342 WRITE(numout,*) ' relax time scale (s-1) to reach static friction rn_lfrelax = ', rn_lfrelax 343 WRITE(numout,*) ' isotropic tensile strength rn_tensile = ', rn_tensile 244 344 WRITE(numout,*) 245 345 ENDIF … … 247 347 ioptio = 0 248 348 ! !--- full dynamics (rheology + advection + ridging/rafting + correction) 249 IF( ln_dyn FULL ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynFULL; ENDIF349 IF( ln_dynALL ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynALL ; ENDIF 250 350 ! !--- dynamics without ridging/rafting and corr (rheology + advection) 251 351 IF( ln_dynRHGADV ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynRHGADV ; ENDIF 252 ! !--- advection only with prescribed ice velocities (from namelist) 253 IF( ln_dynADV ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynADV ; ENDIF 352 ! !--- advection 1D only - test case from Schar & Smolarkiewicz 1996 353 IF( ln_dynADV1D ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynADV1D ; ENDIF 354 ! !--- advection 2D only with prescribed ice velocities (from namelist) 355 IF( ln_dynADV2D ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynADV2D ; ENDIF 254 356 ! 255 357 IF( ioptio /= 1 ) CALL ctl_stop( 'ice_dyn_init: one and only one ice dynamics option has to be defined ' ) … … 261 363 ELSEIF ( 2. < rn_ishlat ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral strong-slip' 262 364 ENDIF 263 ! !--- NO Landfast ice : set to zero once for all 264 IF( .NOT.ln_landfast ) tau_icebfr(:,:) = 0._wp 365 ! !--- Landfast ice 366 IF( .NOT.ln_landfast_L16 .AND. .NOT.ln_landfast_home ) tau_icebfr(:,:) = 0._wp 367 ! 368 IF ( ln_landfast_L16 .AND. ln_landfast_home ) THEN 369 CALL ctl_stop( 'ice_dyn_init: choose one and only one landfast parameterization (ln_landfast_L16 or ln_landfast_home)' ) 370 ENDIF 265 371 ! 266 372 CALL ice_dyn_rdgrft_init ! set ice ridging/rafting parameters -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_adv.F90
r10069 r10419 40 40 ! 41 41 ! ** namelist (namdyn_adv) ** 42 LOGICAL :: ln_adv_Pra ! Prather advection scheme 43 LOGICAL :: ln_adv_UMx ! Ultimate-Macho advection scheme 44 INTEGER :: nn_UMx ! order of the UMx advection scheme 42 INTEGER :: nn_UMx ! order of the UMx advection scheme 45 43 ! 46 44 !! * Substitution … … 49 47 !! NEMO/ICE 4.0 , NEMO Consortium (2018) 50 48 !! $Id$ 51 !! Software governed by the CeCILL licen se (see./LICENSE)49 !! Software governed by the CeCILL licence (./LICENSE) 52 50 !!---------------------------------------------------------------------- 53 51 CONTAINS … … 89 87 CASE( np_advUMx ) ! ULTIMATE-MACHO scheme ! 90 88 ! !-----------------------! 91 CALL ice_dyn_adv_umx( nn_UMx, kt, u_ice, v_ice, & 92 & ato_i, v_i, v_s, sv_i, oa_i, a_i, a_ip, v_ip, e_s, e_i ) 89 CALL ice_dyn_adv_umx( nn_UMx, kt, u_ice, v_ice, ato_i, v_i, v_s, sv_i, oa_i, a_i, a_ip, v_ip, e_s, e_i ) 93 90 ! !-----------------------! 94 91 CASE( np_advPRA ) ! PRATHER scheme ! 95 92 ! !-----------------------! 96 CALL ice_dyn_adv_pra( kt, u_ice, v_ice, & 97 & ato_i, v_i, v_s, sv_i, oa_i, a_i, a_ip, v_ip, e_s, e_i ) 93 CALL ice_dyn_adv_pra( kt, u_ice, v_ice, ato_i, v_i, v_s, sv_i, oa_i, a_i, a_ip, v_ip, e_s, e_i ) 98 94 END SELECT 99 95 … … 101 97 ! Debug the advection schemes 102 98 !---------------------------- 103 ! clem: At least one advection scheme above is not strictly positive => UM from 3d to 5th order104 ! In Prather, I am not sure if the fields are bounded by 0 or not (it seems not)105 ! In UM 3-5 , advected fields are notbounded and negative values can appear.99 ! clem: At least one advection scheme above is not strictly positive => UMx 100 ! In Prather, I am not sure if the fields are bounded by 0 or not (it seems yes) 101 ! In UMx , advected fields are not perfectly bounded and negative values can appear. 106 102 ! These values are usually very small but in some occasions they can also be non-negligible 107 103 ! Therefore one needs to bound the advected fields by 0 (though this is not a clean fix) … … 118 114 ! 119 115 ! ==> conservation is ensured by calling this routine below, 120 ! however the global ice volume is then changed by advection (but errors are verysmall)116 ! however the global ice volume is then changed by advection (but errors are small) 121 117 CALL ice_var_zapneg( ato_i, v_i, v_s, sv_i, oa_i, a_i, a_ip, v_ip, e_s, e_i ) 122 118 -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_adv_umx.F90
r10397 r10419 14 14 !! ultimate_x(_y) : compute a tracer value at velocity points using ULTIMATE scheme at various orders 15 15 !! macho : ??? 16 !! nonosc _2d: compute monotonic tracer fluxes by a non-oscillatory algorithm16 !! nonosc : compute monotonic tracer fluxes by a non-oscillatory algorithm 17 17 !!---------------------------------------------------------------------- 18 18 USE phycst ! physical constant … … 20 20 USE sbc_oce , ONLY : nn_fsbc ! update frequency of surface boundary condition 21 21 USE ice ! sea-ice variables 22 USE icevar ! sea-ice: operations 22 23 ! 23 24 USE in_out_manager ! I/O manager … … 34 35 REAL(wp) :: z1_120 = 1._wp / 120._wp ! =1/120 35 36 37 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: amaxu, amaxv 38 39 ! advect H all the way (and get V=H*A at the end) 40 LOGICAL :: ll_thickness = .FALSE. 41 42 ! look for 9 points around in nonosc limiter 43 LOGICAL :: ll_9points = .FALSE. ! false=better h? 44 45 ! use HgradU in nonosc limiter 46 LOGICAL :: ll_HgradU = .TRUE. ! no effect? 47 48 ! if T interpolated at u/v points is negative, then interpolate T at u/v points using the upstream scheme 49 LOGICAL :: ll_neg = .TRUE. ! keep TRUE 50 51 ! limit the fluxes 52 LOGICAL :: ll_zeroup1 = .FALSE. ! false ok if Hbig otherwise needed for 2D sinon on a des valeurs de H trop fortes !! 53 LOGICAL :: ll_zeroup2 = .FALSE. ! false ok for 1D, 2D, 3D 54 LOGICAL :: ll_zeroup4 = .FALSE. ! false ok for 1D, 2D, 3D 55 LOGICAL :: ll_zeroup5 = .FALSE. ! false ok for 1D, 2D 56 57 ! fluxes that are limited are u*H, then (u*H)*(ua/u) is used for V (only for nonosc) 58 LOGICAL :: ll_clem = .TRUE. ! simpler than rachid and works 59 60 ! First advect H as H*=Hdiv(u), then use H* for H(n+1)=H(n)-div(uH*) 61 LOGICAL :: ll_gurvan = .FALSE. ! must be false for 1D case !! 62 63 ! First guess as div(uH) (-true-) or Hdiv(u)+ugradH (-false-) 64 LOGICAL :: ll_1stguess_clem = .FALSE. ! better negative values but less good h 65 66 ! advect (or not) open water. If not, retrieve it from advection of A 67 LOGICAL :: ll_ADVopw = .FALSE. ! 68 69 ! alternate directions for upstream 70 LOGICAL :: ll_upsxy = .TRUE. 71 72 ! alternate directions for high order 73 LOGICAL :: ll_hoxy = .TRUE. 74 75 ! prelimiter: use it to avoid overshoot in H 76 LOGICAL :: ll_prelimiter_zalesak = .TRUE. ! from: Zalesak(1979) eq. 14 => true is better for 1D but false is better in 3D (for h and negative values) => pb in x-y? 77 LOGICAL :: ll_prelimiter_devore = .FALSE. ! from: Devore eq. 11 (worth than zalesak) 78 79 ! iterate on the limiter (only nonosc) 80 LOGICAL :: ll_limiter_it2 = .FALSE. 81 82 36 83 !! * Substitutions 37 84 # include "vectopt_loop_substitute.h90" … … 39 86 !! NEMO/ICE 4.0 , NEMO Consortium (2018) 40 87 !! $Id$ 41 !! Software governed by the CeCILL licen se (see./LICENSE)88 !! Software governed by the CeCILL licence (./LICENSE) 42 89 !!---------------------------------------------------------------------- 43 90 CONTAINS 44 91 45 SUBROUTINE ice_dyn_adv_umx( k _order, kt, pu_ice, pv_ice, &46 & pato_i, pv_i, pv_s, psv_i, poa_i, pa_i, pa_ip, pv_ip, pe_s, pe_i )92 SUBROUTINE ice_dyn_adv_umx( kn_umx, kt, pu_ice, pv_ice, & 93 & pato_i, pv_i, pv_s, psv_i, poa_i, pa_i, pa_ip, pv_ip, pe_s, pe_i ) 47 94 !!---------------------------------------------------------------------- 48 95 !! *** ROUTINE ice_dyn_adv_umx *** … … 54 101 !! Reference : Leonard, B.P., 1991, Comput. Methods Appl. Mech. Eng., 88, 17-74. 55 102 !!---------------------------------------------------------------------- 56 INTEGER , INTENT(in ) :: k _order ! order of the scheme (1-5 or 20)103 INTEGER , INTENT(in ) :: kn_umx ! order of the scheme (1-5=UM or 20=CEN2) 57 104 INTEGER , INTENT(in ) :: kt ! time step 58 105 REAL(wp), DIMENSION(:,:) , INTENT(in ) :: pu_ice ! ice i-velocity … … 70 117 ! 71 118 INTEGER :: ji, jj, jk, jl, jt ! dummy loop indices 72 INTEGER :: initad ! number of sub-timestep for the advection 73 INTEGER :: ipl ! third dimention of tracer array 74 75 REAL(wp) :: zusnit, zdt 76 REAL(wp), DIMENSION(1) :: zcflprv, zcflnow ! send zcflnow and receive zcflprv 77 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zudy, zvdx, zcu_box, zcv_box 78 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zpato 119 INTEGER :: icycle ! number of sub-timestep for the advection 120 REAL(wp) :: zamsk ! 1 if advection of concentration, 0 if advection of other tracers 121 REAL(wp) :: zdt 122 REAL(wp), DIMENSION(1) :: zcflprv, zcflnow ! send zcflnow and receive zcflprv 123 REAL(wp), DIMENSION(jpi,jpj) :: zudy, zvdx 124 REAL(wp), DIMENSION(jpi,jpj) :: zati1, zati2 125 126 127 128 REAL(wp), DIMENSION(jpi,jpj) :: zcu_box, zcv_box 129 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zua_ho, zva_ho 130 REAL(wp), DIMENSION(jpi,jpj,jpl) :: z1_ai, z1_aip 131 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zhvar 132 79 133 !!---------------------------------------------------------------------- 80 134 ! 81 135 IF( kt == nit000 .AND. lwp ) WRITE(numout,*) '-- ice_dyn_adv_umx: Ultimate-Macho advection scheme' 82 136 ! 83 ALLOCATE( zudy(jpi,jpj) , zvdx(jpi,jpj) , zcu_box(jpi,jpj) , zcv_box(jpi,jpj) )84 ALLOCATE( zpato(jpi,jpj,1) )85 137 ! 86 138 ! --- If ice drift field is too fast, use an appropriate time step for advection (CFL test for stability) --- ! … … 93 145 CALL mpp_delay_max( 'icedyn_adv_umx', 'cflice', zcflnow(:), zcflprv(:), kt == nitend - nn_fsbc + 1 ) 94 146 95 IF( zcflprv(1) > .5 ) THEN ; i nitad = 2 ; zusnit = 0.5_wp96 ELSE ; i nitad = 1 ; zusnit = 1.0_wp147 IF( zcflprv(1) > .5 ) THEN ; icycle = 2 148 ELSE ; icycle = 1 97 149 ENDIF 98 99 zdt = rdt_ice / REAL(i nitad)150 151 zdt = rdt_ice / REAL(icycle) 100 152 101 153 ! --- transport --- ! … … 118 170 END DO 119 171 120 zpato (:,:,1) = pato_i(:,:) 121 172 IF( ll_zeroup2 ) THEN 173 IF(.NOT. ALLOCATED(amaxu)) ALLOCATE(amaxu (jpi,jpj,jpl)) 174 IF(.NOT. ALLOCATED(amaxv)) ALLOCATE(amaxv (jpi,jpj,jpl)) 175 ENDIF 122 176 !---------------! 123 177 !== advection ==! 124 178 !---------------! 125 DO jt = 1, initad 179 DO jt = 1, icycle 180 181 !!$ IF( ll_ADVopw ) THEN 182 !!$ zamsk = 1._wp 183 !!$ CALL adv_umx( zamsk, kn_umx, jt, kt, zdt, zudy, zvdx, zudy, zvdx, zcu_box, zcv_box, pato_i(:,:), pato_i(:,:) ) ! Open water area 184 !!$ zamsk = 0._wp 185 !!$ ELSE 186 zati1(:,:) = SUM( pa_i(:,:,:), dim=3 ) 187 !!$ ENDIF 126 188 127 l_full_nf_update = .FALSE. ! false: disable full North fold update (performances) 128 CALL adv_umx( k_order, kt, 1, zdt, zudy, zvdx, zcu_box, zcv_box, zpato(:,:,1) ) ! Open water area 129 CALL adv_umx( k_order, kt, jpl, zdt, zudy, zvdx, zcu_box, zcv_box, pa_i(:,:,:) ) ! Ice area 130 CALL adv_umx( k_order, kt, jpl, zdt, zudy, zvdx, zcu_box, zcv_box, pv_i(:,:,:) ) ! Ice volume 131 CALL adv_umx( k_order, kt, jpl, zdt, zudy, zvdx, zcu_box, zcv_box, psv_i(:,:,:) ) ! Salt content 132 CALL adv_umx( k_order, kt, jpl, zdt, zudy, zvdx, zcu_box, zcv_box, poa_i(:,:,:) ) ! Age content 189 WHERE( pa_i(:,:,:) >= epsi20 ) ; z1_ai(:,:,:) = 1._wp / pa_i(:,:,:) 190 ELSEWHERE ; z1_ai(:,:,:) = 0. 191 END WHERE 192 ! 193 WHERE( pa_ip(:,:,:) >= epsi20 ) ; z1_aip(:,:,:) = 1._wp / pa_ip(:,:,:) 194 ELSEWHERE ; z1_aip(:,:,:) = 0. 195 END WHERE 196 ! 197 IF( ll_zeroup2 ) THEN 198 DO jl = 1, jpl 199 DO jj = 2, jpjm1 200 DO ji = fs_2, fs_jpim1 201 amaxu(ji,jj,jl)=MAX( pa_i(ji,jj,jl), pa_i(ji,jj-1,jl), pa_i(ji,jj+1,jl), & 202 & pa_i(ji+1,jj,jl), pa_i(ji+1,jj-1,jl), pa_i(ji+1,jj+1,jl) ) 203 amaxv(ji,jj,jl)=MAX( pa_i(ji,jj,jl), pa_i(ji-1,jj,jl), pa_i(ji+1,jj,jl), & 204 & pa_i(ji,jj+1,jl), pa_i(ji-1,jj+1,jl), pa_i(ji+1,jj+1,jl) ) 205 END DO 206 END DO 207 END DO 208 CALL lbc_lnk_multi('icedyn_adv_umx', amaxu, 'T', 1., amaxv, 'T', 1.) 209 ENDIF 210 ! 211 DO jl = 1, jpl 212 zua_ho(:,:,jl) = zudy(:,:) 213 zva_ho(:,:,jl) = zvdx(:,:) 214 END DO 215 216 zamsk = 1._wp 217 CALL adv_umx( zamsk, kn_umx, jt, kt, zdt, zudy, zvdx, zua_ho, zva_ho, zcu_box, zcv_box, pa_i, pa_i, zua_ho, zva_ho ) ! Ice area 218 zamsk = 0._wp 219 ! 220 IF( ll_thickness ) THEN 221 DO jl = 1, jpl 222 zua_ho(:,:,jl) = zudy(:,:) 223 zva_ho(:,:,jl) = zvdx(:,:) 224 END DO 225 ENDIF 226 ! 227 zhvar(:,:,:) = pv_i(:,:,:) * z1_ai(:,:,:) 228 CALL adv_umx( zamsk, kn_umx, jt, kt, zdt, zudy, zvdx, zua_ho , zva_ho , zcu_box, zcv_box, zhvar, pv_i ) ! Ice volume 229 IF( ll_thickness ) pv_i(:,:,:) = zhvar(:,:,:) * pa_i(:,:,:) 230 ! 231 zhvar(:,:,:) = pv_s(:,:,:) * z1_ai(:,:,:) 232 CALL adv_umx( zamsk, kn_umx, jt, kt, zdt, zudy, zvdx, zua_ho , zva_ho , zcu_box, zcv_box, zhvar, pv_s ) ! Snw volume 233 IF( ll_thickness ) pv_s(:,:,:) = zhvar(:,:,:) * pa_i(:,:,:) 234 ! 235 zhvar(:,:,:) = psv_i(:,:,:) * z1_ai(:,:,:) 236 CALL adv_umx( zamsk, kn_umx, jt, kt, zdt, zudy, zvdx, zua_ho , zva_ho , zcu_box, zcv_box, zhvar, psv_i ) ! Salt content 237 ! 238 zhvar(:,:,:) = poa_i(:,:,:) * z1_ai(:,:,:) 239 CALL adv_umx( zamsk, kn_umx, jt, kt, zdt, zudy, zvdx, zua_ho , zva_ho , zcu_box, zcv_box, zhvar, poa_i ) ! Age content 240 ! 133 241 DO jk = 1, nlay_i 134 CALL adv_umx( k_order, kt, jpl, zdt, zudy, zvdx, zcu_box, zcv_box, pe_i(:,:,jk,:) ) ! Ice heat content 135 END DO 136 CALL adv_umx( k_order, kt, jpl, zdt, zudy, zvdx, zcu_box, zcv_box, pv_s(:,:,:) ) ! Snow volume 242 zhvar(:,:,:) = pe_i(:,:,jk,:) * z1_ai(:,:,:) 243 CALL adv_umx( zamsk, kn_umx, jt, kt, zdt, zudy, zvdx, zua_ho, zva_ho, zcu_box, zcv_box, zhvar, pe_i(:,:,jk,:) ) ! Ice heat content 244 END DO 245 ! 137 246 DO jk = 1, nlay_s 138 CALL adv_umx( k_order, kt, jpl, zdt, zudy, zvdx, zcu_box, zcv_box, pe_s(:,:,jk,:) ) ! Snow heat content 139 END DO 247 zhvar(:,:,:) = pe_s(:,:,jk,:) * z1_ai(:,:,:) 248 CALL adv_umx( zamsk, kn_umx, jt, kt, zdt, zudy, zvdx, zua_ho, zva_ho, zcu_box, zcv_box, zhvar, pe_s(:,:,jk,:) ) ! Snw heat content 249 END DO 250 ! 140 251 IF ( ln_pnd_H12 ) THEN 141 CALL adv_umx( k_order, kt, jpl, zdt, zudy, zvdx, zcu_box, zcv_box, pa_ip(:,:,:) ) ! Melt pond fraction 142 CALL adv_umx( k_order, kt, jpl, zdt, zudy, zvdx, zcu_box, zcv_box, pv_ip(:,:,:) ) ! Melt pond volume 252 ! 253 DO jl = 1, jpl 254 zua_ho(:,:,jl) = zudy(:,:) 255 zva_ho(:,:,jl) = zvdx(:,:) 256 END DO 257 258 zamsk = 1._wp 259 CALL adv_umx( zamsk, kn_umx, jt, kt, zdt, zudy, zvdx, zua_ho, zva_ho, zcu_box, zcv_box, pa_ip, pa_ip, zua_ho, zva_ho ) ! mp fraction 260 zamsk = 0._wp 261 ! 262 zhvar(:,:,:) = pv_ip(:,:,:) * z1_ai(:,:,:) 263 CALL adv_umx( zamsk, kn_umx, jt, kt, zdt, zudy, zvdx, zua_ho , zva_ho , zcu_box, zcv_box, zhvar, pv_ip ) ! mp volume 143 264 ENDIF 144 145 l_full_nf_update = jt == initad ! true: enable full North fold update (performances) when exiting the loop 146 CALL lbc_lnk( 'icedyn_adv_umx', zpato, 'T', 1. ) 147 CALL lbc_lnk( 'icedyn_adv_umx', pe_i, 'T', 1. ) 148 CALL lbc_lnk( 'icedyn_adv_umx', pe_s, 'T', 1. ) 149 IF ( ln_pnd_H12 ) THEN 150 CALL lbc_lnk_multi( 'icedyn_adv_umx', pa_i, 'T', 1., pv_i, 'T', 1., psv_i, 'T', 1., & 151 & poa_i, 'T', 1., pv_s, 'T', 1., pa_ip, 'T', 1., & 152 & pv_ip, 'T', 1. ) 153 ELSE 154 CALL lbc_lnk_multi( 'icedyn_adv_umx', pa_i, 'T', 1., pv_i, 'T', 1., psv_i, 'T', 1., & 155 & poa_i, 'T', 1., pv_s, 'T', 1. ) 156 ENDIF 157 265 ! 266 ! 267 !!$ IF( .NOT. ll_ADVopw ) THEN 268 zati2(:,:) = SUM( pa_i(:,:,:), dim=3 ) 269 DO jj = 2, jpjm1 270 DO ji = fs_2, fs_jpim1 271 pato_i(ji,jj) = pato_i(ji,jj) - ( zati2(ji,jj) - zati1(ji,jj) ) & ! Open water area 272 & - ( zudy(ji,jj) - zudy(ji-1,jj) + zvdx(ji,jj) - zvdx(ji,jj-1) )*r1_e1e2t(ji,jj)*zdt 273 END DO 274 END DO 275 CALL lbc_lnk( 'icedyn_adv_umx', pato_i(:,:), 'T', 1. ) 276 !!$ ENDIF 277 ! 158 278 END DO 159 279 ! 160 pato_i(:,:) = zpato (:,:,1)161 !162 DEALLOCATE( zudy, zvdx, zcu_box, zcv_box, zpato )163 !164 280 END SUBROUTINE ice_dyn_adv_umx 165 281 166 282 167 SUBROUTINE adv_umx( k_order, kt, ipl, pdt, puc, pvc, pubox, pvbox, ptc)283 SUBROUTINE adv_umx( pamsk, kn_umx, jt, kt, pdt, pu, pv, puc, pvc, pubox, pvbox, pt, ptc, pua_ho, pva_ho ) 168 284 !!---------------------------------------------------------------------- 169 285 !! *** ROUTINE adv_umx *** … … 178 294 !! ** Action : - pt the after advective tracer 179 295 !!---------------------------------------------------------------------- 180 INTEGER , INTENT(in ) :: k_order ! order of the ULTIMATE scheme 181 INTEGER , INTENT(in ) :: kt ! number of iteration 182 INTEGER , INTENT(in ) :: ipl ! third dimension of tracer array 183 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 184 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: puc , pvc ! 2 ice velocity components => u*e2 185 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: pubox, pvbox ! upstream velocity 186 REAL(wp), DIMENSION(jpi,jpj,ipl), INTENT(inout) :: ptc ! tracer content field 296 REAL(wp) , INTENT(in ) :: pamsk ! advection of concentration (1) or other tracers (0) 297 INTEGER , INTENT(in ) :: kn_umx ! order of the scheme (1-5=UM or 20=CEN2) 298 INTEGER , INTENT(in ) :: jt ! number of sub-iteration 299 INTEGER , INTENT(in ) :: kt ! number of iteration 300 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 301 REAL(wp), DIMENSION(:,: ), INTENT(in ) :: pu , pv ! 2 ice velocity components => u*e2 302 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: puc , pvc ! 2 ice velocity components => u*e2 or u*a*e2u 303 REAL(wp), DIMENSION(:,: ), INTENT(in ) :: pubox, pvbox ! upstream velocity 304 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: pt ! tracer field 305 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: ptc ! tracer content field 306 REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT( out), OPTIONAL :: pua_ho, pva_ho ! high order u*a fluxes 187 307 ! 188 308 INTEGER :: ji, jj, jl ! dummy loop indices 189 190 309 REAL(wp) :: ztra ! local scalar 191 REAL(wp), DIMENSION(jpi,jpj,ipl) :: zfu_ups, zfu_ho, zt_u, zt_ups 192 REAL(wp), DIMENSION(jpi,jpj,ipl) :: zfv_ups, zfv_ho, zt_v, ztrd 193 194 DO jl = 1, ipl 195 !!---------------------------------------------------------------------- 196 ! 197 ! upstream advection with initial mass fluxes & intermediate update 198 ! -------------------------------------------------------------------- 199 DO jj = 1, jpjm1 ! upstream tracer flux in the i and j direction 200 DO ji = 1, fs_jpim1 ! vector opt. 201 zfu_ups(ji,jj,jl) = MAX( puc(ji,jj), 0._wp ) * ptc(ji,jj,jl) + MIN( puc(ji,jj), 0._wp ) * ptc(ji+1,jj,jl) 202 zfv_ups(ji,jj,jl) = MAX( pvc(ji,jj), 0._wp ) * ptc(ji,jj,jl) + MIN( pvc(ji,jj), 0._wp ) * ptc(ji,jj+1,jl) 310 INTEGER :: kn_limiter = 1 ! 1=nonosc ; 2=superbee ; 3=h3(rachid) 311 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zfu_ho , zfv_ho , zt_u, zt_v, zpt 312 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zfu_ups, zfv_ups, zt_ups ! only for nonosc 313 !!---------------------------------------------------------------------- 314 ! 315 ! upstream (_ups) advection with initial mass fluxes 316 ! --------------------------------------------------- 317 318 IF( ll_gurvan .AND. pamsk==0. ) THEN 319 DO jl = 1, jpl 320 DO jj = 2, jpjm1 321 DO ji = fs_2, fs_jpim1 322 pt(ji,jj,jl) = ( pt (ji,jj,jl) + pt(ji,jj,jl) * pdt * ( pu(ji,jj) - pu(ji-1,jj) ) * r1_e1e2t(ji,jj) & 323 & + pt(ji,jj,jl) * pdt * ( pv(ji,jj) - pv(ji,jj-1) ) * r1_e1e2t(ji,jj) ) & 324 & * tmask(ji,jj,1) 325 END DO 326 END DO 327 END DO 328 CALL lbc_lnk( 'icedyn_adv_umx', pt, 'T', 1. ) 329 ENDIF 330 331 332 IF( .NOT. ll_upsxy ) THEN 333 334 ! fluxes in both x-y directions 335 DO jl = 1, jpl 336 DO jj = 1, jpjm1 337 DO ji = 1, fs_jpim1 338 IF( ll_clem ) THEN 339 zfu_ups(ji,jj,jl) = MAX( pu(ji,jj), 0._wp ) * pt(ji,jj,jl) + MIN( pu(ji,jj), 0._wp ) * pt(ji+1,jj,jl) 340 zfv_ups(ji,jj,jl) = MAX( pv(ji,jj), 0._wp ) * pt(ji,jj,jl) + MIN( pv(ji,jj), 0._wp ) * pt(ji,jj+1,jl) 341 ELSE 342 zfu_ups(ji,jj,jl) = MAX( puc(ji,jj,jl), 0._wp ) * pt(ji,jj,jl) + MIN( puc(ji,jj,jl), 0._wp ) * pt(ji+1,jj,jl) 343 zfv_ups(ji,jj,jl) = MAX( pvc(ji,jj,jl), 0._wp ) * pt(ji,jj,jl) + MIN( pvc(ji,jj,jl), 0._wp ) * pt(ji,jj+1,jl) 344 ENDIF 345 END DO 346 END DO 347 END DO 348 349 ELSE 350 ! 351 IF( MOD( (kt - 1) / nn_fsbc , 2 ) == MOD( (jt - 1) , 2 ) ) THEN !== odd ice time step: adv_x then adv_y ==! 352 ! flux in x-direction 353 DO jl = 1, jpl 354 DO jj = 1, jpjm1 355 DO ji = 1, fs_jpim1 356 IF( ll_clem ) THEN 357 zfu_ups(ji,jj,jl) = MAX( pu(ji,jj), 0._wp ) * pt(ji,jj,jl) + MIN( pu(ji,jj), 0._wp ) * pt(ji+1,jj,jl) 358 ELSE 359 zfu_ups(ji,jj,jl) = MAX( puc(ji,jj,jl), 0._wp ) * pt(ji,jj,jl) + MIN( puc(ji,jj,jl), 0._wp ) * pt(ji+1,jj,jl) 360 ENDIF 361 END DO 362 END DO 363 END DO 364 365 ! first guess of tracer content from u-flux 366 DO jl = 1, jpl 367 DO jj = 2, jpjm1 368 DO ji = fs_2, fs_jpim1 ! vector opt. 369 IF( ll_clem ) THEN 370 IF( ll_gurvan ) THEN 371 zpt(ji,jj,jl) = ( pt(ji,jj,jl) - ( zfu_ups(ji,jj,jl) - zfu_ups(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 372 ELSE 373 zpt(ji,jj,jl) = ( pt(ji,jj,jl) - ( zfu_ups(ji,jj,jl) - zfu_ups(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 374 & + pt(ji,jj,jl) * pdt * ( pu(ji,jj) - pu(ji-1,jj) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 375 & ) * tmask(ji,jj,1) 376 ENDIF 377 ELSE 378 zpt(ji,jj,jl) = ( ptc(ji,jj,jl) - ( zfu_ups(ji,jj,jl) - zfu_ups(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) ) & 379 & * tmask(ji,jj,1) 380 ENDIF 381 !! IF( ji==26 .AND. jj==86) THEN 382 !! WRITE(numout,*) '************************' 383 !! WRITE(numout,*) 'zpt upstream',zpt(ji,jj) 384 !! ENDIF 385 END DO 386 END DO 387 END DO 388 CALL lbc_lnk( 'icedyn_adv_umx', zpt, 'T', 1. ) 389 ! 390 ! flux in y-direction 391 DO jl = 1, jpl 392 DO jj = 1, jpjm1 393 DO ji = 1, fs_jpim1 394 IF( ll_clem ) THEN 395 zfv_ups(ji,jj,jl) = MAX( pv(ji,jj), 0._wp ) * zpt(ji,jj,jl) + MIN( pv(ji,jj), 0._wp ) * zpt(ji,jj+1,jl) 396 ELSE 397 zfv_ups(ji,jj,jl) = MAX( pvc(ji,jj,jl), 0._wp ) * zpt(ji,jj,jl) + MIN( pvc(ji,jj,jl), 0._wp ) * zpt(ji,jj+1,jl) 398 ENDIF 399 END DO 400 END DO 401 END DO 402 ! 403 ELSE !== even ice time step: adv_y then adv_x ==! 404 ! flux in y-direction 405 DO jl = 1, jpl 406 DO jj = 1, jpjm1 407 DO ji = 1, fs_jpim1 408 IF( ll_clem ) THEN 409 zfv_ups(ji,jj,jl) = MAX( pv(ji,jj), 0._wp ) * pt(ji,jj,jl) + MIN( pv(ji,jj), 0._wp ) * pt(ji,jj+1,jl) 410 ELSE 411 zfv_ups(ji,jj,jl) = MAX( pvc(ji,jj,jl), 0._wp ) * pt(ji,jj,jl) + MIN( pvc(ji,jj,jl), 0._wp ) * pt(ji,jj+1,jl) 412 ENDIF 413 END DO 414 END DO 415 END DO 416 417 ! first guess of tracer content from v-flux 418 DO jl = 1, jpl 419 DO jj = 2, jpjm1 420 DO ji = fs_2, fs_jpim1 ! vector opt. 421 IF( ll_clem ) THEN 422 IF( ll_gurvan ) THEN 423 zpt(ji,jj,jl) = ( pt(ji,jj,jl) - ( zfv_ups(ji,jj,jl) - zfv_ups(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 424 ELSE 425 zpt(ji,jj,jl) = ( pt(ji,jj,jl) - ( zfv_ups(ji,jj,jl) - zfv_ups(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) & 426 & + pt(ji,jj,jl) * pdt * ( pv(ji,jj) - pv(ji,jj-1) ) * r1_e1e2t(ji,jj) * (1.-pamsk) ) & 427 & * tmask(ji,jj,1) 428 ENDIF 429 ELSE 430 zpt(ji,jj,jl) = ( ptc(ji,jj,jl) - ( zfv_ups(ji,jj,jl) - zfv_ups(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) ) & 431 & * tmask(ji,jj,1) 432 ENDIF 433 !! IF( ji==26 .AND. jj==86) THEN 434 !! WRITE(numout,*) '************************' 435 !! WRITE(numout,*) 'zpt upstream',zpt(ji,jj) 436 !! ENDIF 437 END DO 438 END DO 439 END DO 440 CALL lbc_lnk( 'icedyn_adv_umx', zpt, 'T', 1. ) 441 ! 442 ! flux in x-direction 443 DO jl = 1, jpl 444 DO jj = 1, jpjm1 445 DO ji = 1, fs_jpim1 446 IF( ll_clem ) THEN 447 zfu_ups(ji,jj,jl) = MAX( pu(ji,jj), 0._wp ) * zpt(ji,jj,jl) + MIN( pu(ji,jj), 0._wp ) * zpt(ji+1,jj,jl) 448 ELSE 449 zfu_ups(ji,jj,jl) = MAX( puc(ji,jj,jl), 0._wp ) * zpt(ji,jj,jl) + MIN( puc(ji,jj,jl), 0._wp ) * zpt(ji+1,jj,jl) 450 ENDIF 451 END DO 452 END DO 453 END DO 454 ! 455 ENDIF 456 457 ENDIF 458 459 IF( ll_clem .AND. kn_limiter /= 1 ) & 460 & CALL ctl_stop( 'STOP', 'icedyn_adv_umx: ll_clem incompatible with limiters other than nonosc' ) 461 462 IF( ll_zeroup2 ) THEN 463 DO jl = 1, jpl 464 DO jj = 1, jpjm1 465 DO ji = 1, fs_jpim1 ! vector opt. 466 IF( amaxu(ji,jj,jl) == 0._wp ) zfu_ups(ji,jj,jl) = 0._wp 467 IF( amaxv(ji,jj,jl) == 0._wp ) zfv_ups(ji,jj,jl) = 0._wp 468 END DO 469 END DO 470 END DO 471 ENDIF 472 473 ! guess after content field with upstream scheme 474 DO jl = 1, jpl 475 DO jj = 2, jpjm1 476 DO ji = fs_2, fs_jpim1 477 ztra = - ( zfu_ups(ji,jj,jl) - zfu_ups(ji-1,jj ,jl) & 478 & + zfv_ups(ji,jj,jl) - zfv_ups(ji ,jj-1,jl) ) * r1_e1e2t(ji,jj) 479 IF( ll_clem ) THEN 480 IF( ll_gurvan ) THEN 481 zt_ups(ji,jj,jl) = ( pt (ji,jj,jl) + pdt * ztra ) * tmask(ji,jj,1) 482 ELSE 483 zt_ups(ji,jj,jl) = ( pt (ji,jj,jl) + pdt * ztra + ( pt(ji,jj,jl) * pdt * ( pu(ji,jj) - pu(ji-1,jj) ) & 484 & + pt(ji,jj,jl) * pdt * ( pv(ji,jj) - pv(ji,jj-1) ) ) & 485 & * r1_e1e2t(ji,jj) * (1.-pamsk) ) * tmask(ji,jj,1) 486 ENDIF 487 ELSE 488 zt_ups(ji,jj,jl) = ( ptc(ji,jj,jl) + pdt * ztra ) * tmask(ji,jj,1) 489 ENDIF 490 !! IF( ji==26 .AND. jj==86) THEN 491 !! WRITE(numout,*) '**************************' 492 !! WRITE(numout,*) 'zt upstream',zt_ups(ji,jj) 493 !! ENDIF 494 END DO 203 495 END DO 204 496 END DO 205 206 DO jj = 2, jpjm1 ! total intermediate advective trends 207 DO ji = fs_2, fs_jpim1 ! vector opt. 208 ztra = - ( zfu_ups(ji,jj,jl) - zfu_ups(ji-1,jj ,jl) & 209 & + zfv_ups(ji,jj,jl) - zfv_ups(ji ,jj-1,jl) ) * r1_e1e2t(ji,jj) 210 ! 211 ztrd(ji,jj,jl) = ztra ! upstream trend [ -div(uh) or -div(uhT) ] 212 zt_ups (ji,jj,jl) = ( ptc(ji,jj,jl) + pdt * ztra ) * tmask(ji,jj,1) ! guess after content field with monotonic scheme 213 END DO 214 END DO 215 END DO 216 497 CALL lbc_lnk( 'icedyn_adv_umx', zt_ups, 'T', 1. ) 498 217 499 ! High order (_ho) fluxes 218 500 ! ----------------------- 219 SELECT CASE( k_order ) 220 CASE ( 20 ) ! centered second order 221 DO jl = 1, ipl 501 SELECT CASE( kn_umx ) 502 ! 503 CASE ( 20 ) !== centered second order ==! 504 ! 505 CALL cen2( pamsk, kn_limiter, jt, kt, pdt, pt, pu, pv, puc, pvc, ptc, zfu_ho, zfv_ho, & 506 & zt_ups, zfu_ups, zfv_ups ) 507 ! 508 CASE ( 1:5 ) !== 1st to 5th order ULTIMATE-MACHO scheme ==! 509 ! 510 CALL macho( pamsk, kn_limiter, kn_umx, jt, kt, pdt, pt, pu, pv, puc, pvc, pubox, pvbox, ptc, zt_u, zt_v, zfu_ho, zfv_ho, & 511 & zt_ups, zfu_ups, zfv_ups ) 512 ! 513 END SELECT 514 515 IF( ll_thickness ) THEN 516 ! final trend with corrected fluxes 517 ! ------------------------------------ 518 DO jl = 1, jpl 519 DO jj = 2, jpjm1 520 DO ji = fs_2, fs_jpim1 521 IF( ll_gurvan ) THEN 522 ztra = - ( zfu_ho(ji,jj,jl) - zfu_ho(ji-1,jj,jl) + zfv_ho(ji,jj,jl) - zfv_ho(ji,jj-1,jl) ) * r1_e1e2t(ji,jj) 523 ELSE 524 ztra = ( - ( zfu_ho(ji,jj,jl) - zfu_ho(ji-1,jj,jl) + zfv_ho(ji,jj,jl) - zfv_ho(ji,jj-1,jl) ) & 525 & + ( pt(ji,jj,jl) * ( pu(ji,jj) - pu(ji-1,jj) ) * (1.-pamsk) ) & 526 & + ( pt(ji,jj,jl) * ( pv(ji,jj) - pv(ji,jj-1) ) * (1.-pamsk) ) ) * r1_e1e2t(ji,jj) 527 ENDIF 528 pt(ji,jj,jl) = ( pt(ji,jj,jl) + pdt * ztra ) * tmask(ji,jj,1) 529 530 IF( pt(ji,jj,jl) < -epsi20 ) THEN 531 WRITE(numout,*) 'T<0 ',pt(ji,jj,jl) 532 ENDIF 533 534 IF( pt(ji,jj,jl) < 0._wp .AND. pt(ji,jj,jl) >= -epsi20 ) pt(ji,jj,jl) = 0._wp 535 536 !! IF( ji==26 .AND. jj==86) THEN 537 !! WRITE(numout,*) 'zt high order',pt(ji,jj) 538 !! ENDIF 539 END DO 540 END DO 541 END DO 542 CALL lbc_lnk( 'icedyn_adv_umx', pt, 'T', 1. ) 543 ENDIF 544 545 ! Rachid trick 546 ! ------------ 547 IF( ll_clem ) THEN 548 IF( pamsk == 0. ) THEN 549 DO jl = 1, jpl 550 DO jj = 1, jpjm1 551 DO ji = 1, fs_jpim1 552 IF( ABS( puc(ji,jj,jl) ) > 0._wp .AND. ABS( pu(ji,jj) ) > 0._wp ) THEN 553 zfu_ho (ji,jj,jl) = zfu_ho (ji,jj,jl) * puc(ji,jj,jl) / pu(ji,jj) 554 zfu_ups(ji,jj,jl) = zfu_ups(ji,jj,jl) * puc(ji,jj,jl) / pu(ji,jj) 555 ELSE 556 zfu_ho (ji,jj,jl) = 0._wp 557 zfu_ups(ji,jj,jl) = 0._wp 558 ENDIF 559 ! 560 IF( ABS( pvc(ji,jj,jl) ) > 0._wp .AND. ABS( pv(ji,jj) ) > 0._wp ) THEN 561 zfv_ho (ji,jj,jl) = zfv_ho (ji,jj,jl) * pvc(ji,jj,jl) / pv(ji,jj) 562 zfv_ups(ji,jj,jl) = zfv_ups(ji,jj,jl) * pvc(ji,jj,jl) / pv(ji,jj) 563 ELSE 564 zfv_ho (ji,jj,jl) = 0._wp 565 zfv_ups(ji,jj,jl) = 0._wp 566 ENDIF 567 END DO 568 END DO 569 END DO 570 ENDIF 571 ENDIF 572 573 IF( ll_zeroup5 ) THEN 574 DO jl = 1, jpl 575 DO jj = 2, jpjm1 576 DO ji = 2, fs_jpim1 ! vector opt. 577 zpt(ji,jj,jl) = ( ptc(ji,jj,jl) - ( zfu_ho(ji,jj,jl) - zfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 578 & - ( zfv_ho(ji,jj,jl) - zfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 579 IF( zpt(ji,jj,jl) < 0. ) THEN 580 zfu_ho(ji ,jj,jl) = zfu_ups(ji ,jj,jl) 581 zfu_ho(ji-1,jj,jl) = zfu_ups(ji-1,jj,jl) 582 zfv_ho(ji ,jj,jl) = zfv_ups(ji ,jj,jl) 583 zfv_ho(ji,jj-1,jl) = zfv_ups(ji,jj-1,jl) 584 ENDIF 585 END DO 586 END DO 587 END DO 588 CALL lbc_lnk_multi( 'icedyn_adv_umx', zfu_ho, 'U', -1., zfv_ho, 'V', -1. ) 589 ENDIF 590 591 ! output high order fluxes u*a 592 ! ---------------------------- 593 IF( PRESENT( pua_ho ) ) THEN 594 DO jl = 1, jpl 222 595 DO jj = 1, jpjm1 223 DO ji = 1, fs_jpim1 ! vector opt. 224 zfu_ho(ji,jj,jl) = 0.5 * puc(ji,jj) * ( ptc(ji,jj,jl) + ptc(ji+1,jj,jl) ) 225 zfv_ho(ji,jj,jl) = 0.5 * pvc(ji,jj) * ( ptc(ji,jj,jl) + ptc(ji,jj+1,jl) ) 226 END DO 227 END DO 228 END DO 229 ! 230 CASE ( 1:5 ) ! 1st to 5th order ULTIMATE-MACHO scheme 231 CALL macho( k_order, kt, ipl, pdt, ptc, puc, pvc, pubox, pvbox, zt_u, zt_v ) 232 ! 233 DO jl = 1, ipl 596 DO ji = 1, fs_jpim1 597 pua_ho(ji,jj,jl) = zfu_ho(ji,jj,jl) 598 pva_ho(ji,jj,jl) = zfv_ho(ji,jj,jl) 599 END DO 600 END DO 601 END DO 602 ENDIF 603 604 605 IF( .NOT.ll_thickness ) THEN 606 ! final trend with corrected fluxes 607 ! ------------------------------------ 608 DO jl = 1, jpl 234 609 DO jj = 2, jpjm1 235 DO ji = 1, fs_jpim1 ! vector opt. 236 zfu_ho(ji,jj,jl) = puc(ji,jj) * zt_u(ji,jj,jl) 237 END DO 238 END DO 239 END DO 240 DO jl = 1, ipl 610 DO ji = fs_2, fs_jpim1 611 ztra = - ( zfu_ho(ji,jj,jl) - zfu_ho(ji-1,jj,jl) + zfv_ho(ji,jj,jl) - zfv_ho(ji,jj-1,jl) ) * r1_e1e2t(ji,jj) * pdt 612 613 ptc(ji,jj,jl) = ( ptc(ji,jj,jl) + ztra ) * tmask(ji,jj,1) 614 615 !! IF( ji==26 .AND. jj==86) THEN 616 !! WRITE(numout,*) 'ztc high order',ptc(ji,jj) 617 !! ENDIF 618 619 END DO 620 END DO 621 END DO 622 CALL lbc_lnk( 'icedyn_adv_umx', ptc, 'T', 1. ) 623 ENDIF 624 625 ! 626 END SUBROUTINE adv_umx 627 628 SUBROUTINE cen2( pamsk, kn_limiter, jt, kt, pdt, pt, pu, pv, puc, pvc, ptc, pfu_ho, pfv_ho, & 629 & pt_ups, pfu_ups, pfv_ups ) 630 !!--------------------------------------------------------------------- 631 !! *** ROUTINE macho *** 632 !! 633 !! ** Purpose : compute 634 !! 635 !! ** Method : ... ??? 636 !! TIM = transient interpolation Modeling 637 !! 638 !! Reference : Leonard, B.P., 1991, Comput. Methods Appl. Mech. Eng., 88, 17-74. 639 !!---------------------------------------------------------------------- 640 REAL(wp) , INTENT(in ) :: pamsk ! advection of concentration (1) or other tracers (0) 641 INTEGER , INTENT(in ) :: kn_limiter ! limiter 642 INTEGER , INTENT(in ) :: jt ! number of sub-iteration 643 INTEGER , INTENT(in ) :: kt ! number of iteration 644 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 645 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: pt ! tracer fields 646 REAL(wp), DIMENSION(:,: ), INTENT(in ) :: pu, pv ! 2 ice velocity components 647 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: puc, pvc ! 2 ice velocity * A components 648 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: ptc ! tracer content at before time step 649 REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT( out) :: pfu_ho, pfv_ho ! high order fluxes 650 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: pt_ups ! upstream guess of tracer content 651 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: pfu_ups, pfv_ups ! upstream fluxes 652 ! 653 INTEGER :: ji, jj, jl ! dummy loop indices 654 LOGICAL :: ll_xy = .TRUE. 655 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zzt 656 !!---------------------------------------------------------------------- 657 ! 658 IF( .NOT.ll_xy ) THEN !-- no alternate directions --! 659 ! 660 DO jl = 1, jpl 241 661 DO jj = 1, jpjm1 242 DO ji = fs_2, fs_jpim1 ! vector opt. 243 zfv_ho(ji,jj,jl) = pvc(ji,jj) * zt_v(ji,jj,jl) 244 END DO 245 END DO 246 END DO 247 ! 248 END SELECT 662 DO ji = 1, fs_jpim1 663 IF( ll_clem ) THEN 664 pfu_ho(ji,jj,jl) = 0.5 * pu(ji,jj) * ( pt(ji,jj,jl) + pt(ji+1,jj,jl) ) 665 pfv_ho(ji,jj,jl) = 0.5 * pv(ji,jj) * ( pt(ji,jj,jl) + pt(ji,jj+1,jl) ) 666 ELSE 667 pfu_ho(ji,jj,jl) = 0.5 * puc(ji,jj,jl) * ( pt(ji,jj,jl) + pt(ji+1,jj,jl) ) 668 pfv_ho(ji,jj,jl) = 0.5 * pvc(ji,jj,jl) * ( pt(ji,jj,jl) + pt(ji,jj+1,jl) ) 669 ENDIF 670 END DO 671 END DO 672 END DO 673 IF ( kn_limiter == 1 ) THEN 674 IF( ll_clem ) THEN 675 CALL nonosc_2d( pamsk, pdt, pu, puc, pv, pvc, ptc, pt, pt_ups, pfu_ups, pfv_ups, pfu_ho, pfv_ho ) 676 ELSE 677 CALL nonosc_2d( pamsk, pdt, pu, puc, pv, pvc, ptc, ptc, pt_ups, pfu_ups, pfv_ups, pfu_ho, pfv_ho ) 678 ENDIF 679 ELSEIF( kn_limiter == 2 ) THEN 680 CALL limiter_x( pdt, pu, puc, pt, pfu_ho ) 681 CALL limiter_y( pdt, pv, pvc, pt, pfv_ho ) 682 ELSEIF( kn_limiter == 3 ) THEN 683 CALL limiter_x( pdt, pu, puc, pt, pfu_ho, pfu_ups ) 684 CALL limiter_y( pdt, pv, pvc, pt, pfv_ho, pfv_ups ) 685 ENDIF 686 ! 687 ELSE !-- alternate directions --! 688 ! 689 IF( MOD( (kt - 1) / nn_fsbc , 2 ) == MOD( (jt - 1) , 2 ) ) THEN !== odd ice time step: adv_x then adv_y ==! 690 ! 691 ! flux in x-direction 692 DO jl = 1, jpl 693 DO jj = 1, jpjm1 694 DO ji = 1, fs_jpim1 695 IF( ll_clem ) THEN 696 pfu_ho(ji,jj,jl) = 0.5 * pu(ji,jj) * ( pt(ji,jj,jl) + pt(ji+1,jj,jl) ) 697 ELSE 698 pfu_ho(ji,jj,jl) = 0.5 * puc(ji,jj,jl) * ( pt(ji,jj,jl) + pt(ji+1,jj,jl) ) 699 ENDIF 700 END DO 701 END DO 702 END DO 703 IF( kn_limiter == 2 ) CALL limiter_x( pdt, pu, puc, pt, pfu_ho ) 704 IF( kn_limiter == 3 ) CALL limiter_x( pdt, pu, puc, pt, pfu_ho, pfu_ups ) 705 706 ! first guess of tracer content from u-flux 707 DO jl = 1, jpl 708 DO jj = 2, jpjm1 709 DO ji = fs_2, fs_jpim1 ! vector opt. 710 IF( ll_clem ) THEN 711 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 712 & + pt(ji,jj,jl) * pdt * ( pu(ji,jj) - pu(ji-1,jj) ) * r1_e1e2t(ji,jj) * (1.-pamsk) ) & 713 & * tmask(ji,jj,1) 714 ELSE 715 zzt(ji,jj,jl) = ( ptc(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 716 ENDIF 717 END DO 718 END DO 719 END DO 720 CALL lbc_lnk( 'icedyn_adv_umx', zzt, 'T', 1. ) 721 722 ! flux in y-direction 723 DO jl = 1, jpl 724 DO jj = 1, jpjm1 725 DO ji = 1, fs_jpim1 726 IF( ll_clem ) THEN 727 pfv_ho(ji,jj,jl) = 0.5 * pv(ji,jj) * ( zzt(ji,jj,jl) + zzt(ji,jj+1,jl) ) 728 ELSE 729 pfv_ho(ji,jj,jl) = 0.5 * pvc(ji,jj,jl) * ( zzt(ji,jj,jl) + zzt(ji,jj+1,jl) ) 730 ENDIF 731 END DO 732 END DO 733 END DO 734 IF( kn_limiter == 2 ) CALL limiter_y( pdt, pv, pvc, pt, pfv_ho ) 735 IF( kn_limiter == 3 ) CALL limiter_y( pdt, pv, pvc, pt, pfv_ho, pfv_ups ) 736 737 ELSE !== even ice time step: adv_y then adv_x ==! 738 ! 739 ! flux in y-direction 740 DO jl = 1, jpl 741 DO jj = 1, jpjm1 742 DO ji = 1, fs_jpim1 743 IF( ll_clem ) THEN 744 pfv_ho(ji,jj,jl) = 0.5 * pv(ji,jj) * ( pt(ji,jj,jl) + pt(ji,jj+1,jl) ) 745 ELSE 746 pfv_ho(ji,jj,jl) = 0.5 * pvc(ji,jj,jl) * ( pt(ji,jj,jl) + pt(ji,jj+1,jl) ) 747 ENDIF 748 END DO 749 END DO 750 END DO 751 IF( kn_limiter == 2 ) CALL limiter_y( pdt, pv, pvc, pt, pfv_ho ) 752 IF( kn_limiter == 3 ) CALL limiter_y( pdt, pv, pvc, pt, pfv_ho, pfv_ups ) 753 ! 754 ! first guess of tracer content from v-flux 755 DO jl = 1, jpl 756 DO jj = 2, jpjm1 757 DO ji = fs_2, fs_jpim1 ! vector opt. 758 IF( ll_clem ) THEN 759 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) & 760 & + pt(ji,jj,jl) * pdt * ( pv(ji,jj) - pv(ji,jj-1) ) * r1_e1e2t(ji,jj) * (1.-pamsk) ) & 761 & * tmask(ji,jj,1) 762 ELSE 763 zzt(ji,jj,jl) = ( ptc(ji,jj,jl) - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 764 ENDIF 765 END DO 766 END DO 767 END DO 768 CALL lbc_lnk( 'icedyn_adv_umx', zzt, 'T', 1. ) 769 ! 770 ! flux in x-direction 771 DO jl = 1, jpl 772 DO jj = 1, jpjm1 773 DO ji = 1, fs_jpim1 774 IF( ll_clem ) THEN 775 pfu_ho(ji,jj,jl) = 0.5 * pu(ji,jj) * ( zzt(ji,jj,jl) + zzt(ji+1,jj,jl) ) 776 ELSE 777 pfu_ho(ji,jj,jl) = 0.5 * puc(ji,jj,jl) * ( zzt(ji,jj,jl) + zzt(ji+1,jj,jl) ) 778 ENDIF 779 END DO 780 END DO 781 END DO 782 IF( kn_limiter == 2 ) CALL limiter_x( pdt, pu, puc, pt, pfu_ho ) 783 IF( kn_limiter == 3 ) CALL limiter_x( pdt, pu, puc, pt, pfu_ho, pfu_ups ) 784 785 ENDIF 786 IF( ll_clem ) THEN 787 IF( kn_limiter == 1 ) CALL nonosc_2d( pamsk, pdt, pu, puc, pv, pvc, ptc, pt, pt_ups, pfu_ups, pfv_ups, pfu_ho, pfv_ho ) 788 ELSE 789 IF( kn_limiter == 1 ) CALL nonosc_2d( pamsk, pdt, pu, puc, pv, pvc, ptc, ptc, pt_ups, pfu_ups, pfv_ups, pfu_ho, pfv_ho ) 790 ENDIF 249 791 250 ! antidiffusive flux : high order minus low order 251 ! -------------------------------------------------- 252 DO jl = 1, ipl 253 DO jj = 2, jpjm1 254 DO ji = 1, fs_jpim1 ! vector opt. 255 zfu_ho(ji,jj,jl) = zfu_ho(ji,jj,jl) - zfu_ups(ji,jj,jl) 256 END DO 257 END DO 258 END DO 259 DO jl = 1, ipl 260 DO jj = 1, jpjm1 261 DO ji = fs_2, fs_jpim1 ! vector opt. 262 zfv_ho(ji,jj,jl) = zfv_ho(ji,jj,jl) - zfv_ups(ji,jj,jl) 263 END DO 264 END DO 265 END DO 266 267 CALL lbc_lnk("icedyn_adv_umx",zt_ups, 'T', 1. ) ! Lateral boundary conditions (unchanged sign) 268 269 ! monotonicity algorithm 270 ! ------------------------- 271 CALL nonosc_2d( ipl, ptc, zfu_ho, zfv_ho, zt_ups, pdt ) 272 273 ! final trend with corrected fluxes 274 ! ------------------------------------ 275 DO jl = 1, ipl 276 DO jj = 2, jpjm1 277 DO ji = fs_2, fs_jpim1 ! vector opt. 278 ztra = ztrd(ji,jj,jl) - ( zfu_ho(ji,jj,jl) - zfu_ho(ji-1,jj ,jl) & 279 & + zfv_ho(ji,jj,jl) - zfv_ho(ji ,jj-1,jl) ) * r1_e1e2t(ji,jj) 280 ptc(ji,jj,jl) = ptc(ji,jj,jl) + pdt * ztra * tmask(ji,jj,1) 281 END DO 282 END DO 283 END DO 284 ! 285 END SUBROUTINE adv_umx 286 287 SUBROUTINE macho( k_order, kt, ipl, pdt, ptc, puc, pvc, pubox, pvbox, pt_u, pt_v ) 792 ENDIF 793 794 END SUBROUTINE cen2 795 796 797 SUBROUTINE macho( pamsk, kn_limiter, kn_umx, jt, kt, pdt, pt, pu, pv, puc, pvc, pubox, pvbox, ptc, pt_u, pt_v, pfu_ho, pfv_ho, & 798 & pt_ups, pfu_ups, pfv_ups ) 799 !!--------------------------------------------------------------------- 800 !! *** ROUTINE macho *** 801 !! 802 !! ** Purpose : compute 803 !! 804 !! ** Method : ... ??? 805 !! TIM = transient interpolation Modeling 806 !! 807 !! Reference : Leonard, B.P., 1991, Comput. Methods Appl. Mech. Eng., 88, 17-74. 808 !!---------------------------------------------------------------------- 809 REAL(wp) , INTENT(in ) :: pamsk ! advection of concentration (1) or other tracers (0) 810 INTEGER , INTENT(in ) :: kn_limiter ! limiter 811 INTEGER , INTENT(in ) :: kn_umx ! order of the scheme (1-5=UM or 20=CEN2) 812 INTEGER , INTENT(in ) :: jt ! number of sub-iteration 813 INTEGER , INTENT(in ) :: kt ! number of iteration 814 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 815 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: pt ! tracer fields 816 REAL(wp), DIMENSION(:,: ), INTENT(in ) :: pu, pv ! 2 ice velocity components 817 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: puc, pvc ! 2 ice velocity * A components 818 REAL(wp), DIMENSION(:,: ), INTENT(in ) :: pubox, pvbox ! upstream velocity 819 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: ptc ! tracer content at before time step 820 REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT( out) :: pt_u, pt_v ! tracer at u- and v-points 821 REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT( out) :: pfu_ho, pfv_ho ! high order fluxes 822 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: pt_ups ! upstream guess of tracer content 823 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: pfu_ups, pfv_ups ! upstream fluxes 824 ! 825 INTEGER :: ji, jj, jl ! dummy loop indices 826 REAL(wp) :: ztra 827 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zzt, zzfu_ho, zzfv_ho 828 !!---------------------------------------------------------------------- 829 ! 830 IF( MOD( (kt - 1) / nn_fsbc , 2 ) == MOD( (jt - 1) , 2 ) ) THEN !== odd ice time step: adv_x then adv_y ==! 831 ! 832 ! !-- ultimate interpolation of pt at u-point --! 833 CALL ultimate_x( kn_umx, pdt, pt, pu, puc, pt_u, pfu_ho ) 834 ! !-- limiter in x --! 835 IF( kn_limiter == 2 ) CALL limiter_x( pdt, pu, puc, pt, pfu_ho ) 836 IF( kn_limiter == 3 ) CALL limiter_x( pdt, pu, puc, pt, pfu_ho, pfu_ups ) 837 ! !-- advective form update in zzt --! 838 839 IF( ll_1stguess_clem ) THEN 840 841 ! first guess of tracer content from u-flux 842 DO jl = 1, jpl 843 DO jj = 2, jpjm1 844 DO ji = fs_2, fs_jpim1 ! vector opt. 845 IF( ll_clem ) THEN 846 IF( ll_gurvan ) THEN 847 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 848 ELSE 849 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 850 & + pt(ji,jj,jl) * pdt * ( pu(ji,jj) - pu(ji-1,jj) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 851 & ) * tmask(ji,jj,1) 852 ENDIF 853 ELSE 854 zzt(ji,jj,jl) = ( ptc(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 855 ENDIF 856 END DO 857 END DO 858 END DO 859 CALL lbc_lnk( 'icedyn_adv_umx', zzt, 'T', 1. ) 860 861 ELSE 862 863 DO jl = 1, jpl 864 DO jj = 2, jpjm1 865 DO ji = fs_2, fs_jpim1 ! vector opt. 866 IF( ll_gurvan ) THEN 867 zzt(ji,jj,jl) = pt(ji,jj,jl) - pubox(ji,jj ) * pdt * ( pt_u(ji,jj,jl) - pt_u(ji-1,jj,jl) ) * r1_e1t(ji,jj) & 868 & - pt (ji,jj,jl) * pdt * ( pu (ji,jj) - pu (ji-1,jj) ) * r1_e1e2t(ji,jj) 869 ELSE 870 zzt(ji,jj,jl) = pt(ji,jj,jl) - pubox(ji,jj ) * pdt * ( pt_u(ji,jj,jl) - pt_u(ji-1,jj,jl) ) * r1_e1t(ji,jj) & 871 & - pt (ji,jj,jl) * pdt * ( pu (ji,jj) - pu (ji-1,jj) ) * r1_e1e2t(ji,jj) * pamsk 872 ENDIF 873 zzt(ji,jj,jl) = zzt(ji,jj,jl) * tmask(ji,jj,1) 874 END DO 875 END DO 876 END DO 877 CALL lbc_lnk( 'icedyn_adv_umx', zzt, 'T', 1. ) 878 ENDIF 879 ! 880 ! !-- ultimate interpolation of pt at v-point --! 881 IF( ll_hoxy ) THEN 882 CALL ultimate_y( kn_umx, pdt, zzt, pv, pvc, pt_v, pfv_ho ) 883 ELSE 884 CALL ultimate_y( kn_umx, pdt, pt, pv, pvc, pt_v, pfv_ho ) 885 ENDIF 886 ! !-- limiter in y --! 887 IF( kn_limiter == 2 ) CALL limiter_y( pdt, pv, pvc, pt, pfv_ho ) 888 IF( kn_limiter == 3 ) CALL limiter_y( pdt, pv, pvc, pt, pfv_ho, pfv_ups ) 889 ! 890 ! 891 ELSE !== even ice time step: adv_y then adv_x ==! 892 ! 893 ! !-- ultimate interpolation of pt at v-point --! 894 CALL ultimate_y( kn_umx, pdt, pt, pv, pvc, pt_v, pfv_ho ) 895 ! !-- limiter in y --! 896 IF( kn_limiter == 2 ) CALL limiter_y( pdt, pv, pvc, pt, pfv_ho ) 897 IF( kn_limiter == 3 ) CALL limiter_y( pdt, pv, pvc, pt, pfv_ho, pfv_ups ) 898 ! !-- advective form update in zzt --! 899 IF( ll_1stguess_clem ) THEN 900 901 ! first guess of tracer content from v-flux 902 DO jl = 1, jpl 903 DO jj = 2, jpjm1 904 DO ji = fs_2, fs_jpim1 ! vector opt. 905 IF( ll_clem ) THEN 906 IF( ll_gurvan ) THEN 907 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 908 ELSE 909 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) & 910 & + pt(ji,jj,jl) * pdt * ( pv(ji,jj) - pv(ji,jj-1) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 911 & ) * tmask(ji,jj,1) 912 ENDIF 913 ELSE 914 zzt(ji,jj,jl) = ( ptc(ji,jj,jl) - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) ) & 915 & * tmask(ji,jj,1) 916 ENDIF 917 END DO 918 END DO 919 END DO 920 CALL lbc_lnk( 'icedyn_adv_umx', zzt, 'T', 1. ) 921 922 ELSE 923 924 DO jl = 1, jpl 925 DO jj = 2, jpjm1 926 DO ji = fs_2, fs_jpim1 927 IF( ll_gurvan ) THEN 928 zzt(ji,jj,jl) = pt(ji,jj,jl) - pvbox(ji,jj ) * pdt * ( pt_v(ji,jj,jl) - pt_v(ji,jj-1,jl) ) * r1_e2t(ji,jj) & 929 & - pt (ji,jj,jl) * pdt * ( pv (ji,jj) - pv (ji,jj-1) ) * r1_e1e2t(ji,jj) 930 ELSE 931 zzt(ji,jj,jl) = pt(ji,jj,jl) - pvbox(ji,jj ) * pdt * ( pt_v(ji,jj,jl) - pt_v(ji,jj-1,jl) ) * r1_e2t(ji,jj) & 932 & - pt (ji,jj,jl) * pdt * ( pv (ji,jj) - pv (ji,jj-1) ) * r1_e1e2t(ji,jj) * pamsk 933 ENDIF 934 zzt(ji,jj,jl) = zzt(ji,jj,jl) * tmask(ji,jj,1) 935 END DO 936 END DO 937 END DO 938 CALL lbc_lnk( 'icedyn_adv_umx', zzt, 'T', 1. ) 939 ENDIF 940 ! 941 ! !-- ultimate interpolation of pt at u-point --! 942 IF( ll_hoxy ) THEN 943 CALL ultimate_x( kn_umx, pdt, zzt, pu, puc, pt_u, pfu_ho ) 944 ELSE 945 CALL ultimate_x( kn_umx, pdt, pt, pu, puc, pt_u, pfu_ho ) 946 ENDIF 947 ! !-- limiter in x --! 948 IF( kn_limiter == 2 ) CALL limiter_x( pdt, pu, puc, pt, pfu_ho ) 949 IF( kn_limiter == 3 ) CALL limiter_x( pdt, pu, puc, pt, pfu_ho, pfu_ups ) 950 ! 951 ! 952 ENDIF 953 954 955 IF( kn_limiter == 1 ) THEN 956 IF( .NOT. ll_limiter_it2 ) THEN 957 IF( ll_clem ) THEN 958 CALL nonosc_2d ( pamsk, pdt, pu, puc, pv, pvc, ptc, pt, pt_ups, pfu_ups, pfv_ups, pfu_ho, pfv_ho ) 959 ELSE 960 CALL nonosc_2d ( pamsk, pdt, pu, puc, pv, pvc, ptc, ptc, pt_ups, pfu_ups, pfv_ups, pfu_ho, pfv_ho ) 961 ENDIF 962 ELSE 963 zzfu_ho(:,:,:) = pfu_ho(:,:,:) 964 zzfv_ho(:,:,:) = pfv_ho(:,:,:) 965 ! 1st iteration of nonosc (limit the flux with the upstream solution) 966 IF( ll_clem ) THEN 967 CALL nonosc_2d ( pamsk, pdt, pu, puc, pv, pvc, ptc, pt, pt_ups, pfu_ups, pfv_ups, zzfu_ho, zzfv_ho ) 968 ELSE 969 CALL nonosc_2d ( pamsk, pdt, pu, puc, pv, pvc, ptc, ptc, pt_ups, pfu_ups, pfv_ups, zzfu_ho, zzfv_ho ) 970 ENDIF 971 ! guess after content field with high order 972 DO jl = 1, jpl 973 DO jj = 2, jpjm1 974 DO ji = fs_2, fs_jpim1 975 ztra = - ( zzfu_ho(ji,jj,jl) - zzfu_ho(ji-1,jj,jl) + zzfv_ho(ji,jj,jl) - zzfv_ho(ji,jj-1,jl) ) * r1_e1e2t(ji,jj) 976 zzt(ji,jj,jl) = ( ptc(ji,jj,jl) + pdt * ztra ) * tmask(ji,jj,1) 977 END DO 978 END DO 979 END DO 980 CALL lbc_lnk( 'icedyn_adv_umx', zzt, 'T', 1. ) 981 ! 2nd iteration of nonosc (limit the flux with the limited high order solution) 982 IF( ll_clem ) THEN 983 CALL nonosc_2d ( pamsk, pdt, pu, puc, pv, pvc, ptc, pt, zzt, zzfu_ho, zzfv_ho, pfu_ho, pfv_ho ) 984 ELSE 985 CALL nonosc_2d ( pamsk, pdt, pu, puc, pv, pvc, ptc, ptc, zzt, zzfu_ho, zzfv_ho, pfu_ho, pfv_ho ) 986 ENDIF 987 ENDIF 988 ENDIF 989 ! 990 END SUBROUTINE macho 991 992 993 SUBROUTINE ultimate_x( kn_umx, pdt, pt, pu, puc, pt_u, pfu_ho ) 288 994 !!--------------------------------------------------------------------- 289 995 !! *** ROUTINE ultimate_x *** … … 296 1002 !! Reference : Leonard, B.P., 1991, Comput. Methods Appl. Mech. Eng., 88, 17-74. 297 1003 !!---------------------------------------------------------------------- 298 INTEGER , INTENT(in ) :: k_order ! order of the ULTIMATE scheme 299 INTEGER , INTENT(in ) :: kt ! number of iteration 300 INTEGER , INTENT(in ) :: ipl ! third dimension of tracer array 301 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 302 REAL(wp), DIMENSION(jpi,jpj,ipl), INTENT(in ) :: ptc ! tracer fields 303 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: puc, pvc ! 2 ice velocity components 304 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: pubox, pvbox ! upstream velocity 305 REAL(wp), DIMENSION(jpi,jpj,ipl), INTENT( out) :: pt_u, pt_v ! tracer at u- and v-points 306 ! 307 INTEGER :: ji, jj, jl ! dummy loop indices 308 REAL(wp) :: zc_box ! - - 309 REAL(wp), DIMENSION(jpi,jpj,ipl) :: zzt 310 !!---------------------------------------------------------------------- 311 ! 312 IF( MOD( (kt - 1) / nn_fsbc , 2 ) == 0 ) THEN !== odd ice time step: adv_x then adv_y ==! 313 ! 314 ! !-- ultimate interpolation of pt at u-point --! 315 CALL ultimate_x( k_order, ipl, pdt, ptc, puc, pt_u ) 316 ! 317 ! !-- advective form update in zzt --! 318 DO jl = 1, ipl 319 DO jj = 2, jpjm1 320 DO ji = fs_2, fs_jpim1 ! vector opt. 321 zzt(ji,jj,jl) = ptc(ji,jj,jl) - pubox(ji,jj) * pdt * ( pt_u(ji,jj,jl) - pt_u(ji-1,jj,jl) ) * r1_e1t(ji,jj) & 322 & - ptc(ji,jj,jl) * pdt * ( puc (ji,jj) - puc (ji-1,jj) ) * r1_e1e2t(ji,jj) 323 zzt(ji,jj,jl) = zzt(ji,jj,jl) * tmask(ji,jj,1) 324 END DO 325 END DO 326 END DO 327 CALL lbc_lnk( 'icedyn_adv_umx', zzt, 'T', 1. ) 328 ! 329 ! !-- ultimate interpolation of pt at v-point --! 330 CALL ultimate_y( k_order, ipl, pdt, zzt, pvc, pt_v ) 331 ! 332 ELSE !== even ice time step: adv_y then adv_x ==! 333 ! 334 ! !-- ultimate interpolation of pt at v-point --! 335 CALL ultimate_y( k_order, ipl, pdt, ptc, pvc, pt_v ) 336 ! 337 ! !-- advective form update in zzt --! 338 DO jl = 1, ipl 339 DO jj = 2, jpjm1 340 DO ji = fs_2, fs_jpim1 341 zzt(ji,jj,jl) = ptc(ji,jj,jl) - pvbox(ji,jj) * pdt * ( pt_v(ji,jj,jl) - pt_v(ji,jj-1,jl) ) * r1_e2t(ji,jj) & 342 & - ptc (ji,jj,jl) * pdt * ( pvc (ji,jj) - pvc (ji,jj-1) ) * r1_e1e2t(ji,jj) 343 zzt(ji,jj,jl) = zzt(ji,jj,jl) * tmask(ji,jj,1) 344 END DO 345 END DO 346 END DO 347 CALL lbc_lnk( 'icedyn_adv_umx', zzt, 'T', 1. ) 348 ! 349 ! !-- ultimate interpolation of pt at u-point --! 350 CALL ultimate_x( k_order, ipl, pdt, zzt, puc, pt_u ) 351 ! 352 ENDIF 353 ! 354 END SUBROUTINE macho 355 356 357 SUBROUTINE ultimate_x( k_order, ipl, pdt, pt, puc, pt_u ) 358 !!--------------------------------------------------------------------- 359 !! *** ROUTINE ultimate_x *** 360 !! 361 !! ** Purpose : compute 362 !! 363 !! ** Method : ... ??? 364 !! TIM = transient interpolation Modeling 365 !! 366 !! Reference : Leonard, B.P., 1991, Comput. Methods Appl. Mech. Eng., 88, 17-74. 367 !!---------------------------------------------------------------------- 368 INTEGER , INTENT(in ) :: k_order ! ocean time-step index 369 INTEGER , INTENT(in ) :: ipl ! third dimension of tracer array 370 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 371 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: puc ! ice i-velocity component 372 REAL(wp), DIMENSION(jpi,jpj,ipl), INTENT(in ) :: pt ! tracer fields 373 REAL(wp), DIMENSION(jpi,jpj,ipl), INTENT( out) :: pt_u ! tracer at u-point 374 ! 375 INTEGER :: ji, jj, jl ! dummy loop indices 1004 INTEGER , INTENT(in ) :: kn_umx ! order of the scheme (1-5=UM or 20=CEN2) 1005 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 1006 REAL(wp), DIMENSION(:,: ), INTENT(in ) :: pu ! ice i-velocity component 1007 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: puc ! ice i-velocity * A component 1008 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: pt ! tracer fields 1009 REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT( out) :: pt_u ! tracer at u-point 1010 REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT( out) :: pfu_ho ! high order flux 1011 ! 1012 INTEGER :: ji, jj, jl ! dummy loop indices 376 1013 REAL(wp) :: zcu, zdx2, zdx4 ! - - 377 REAL(wp), DIMENSION(jpi,jpj) :: ztu1, ztu3 378 REAL(wp), DIMENSION(jpi,jpj,ipl) :: ztu2, ztu4 1014 REAL(wp), DIMENSION(jpi,jpj,jpl) :: ztu1, ztu2, ztu3, ztu4 379 1015 !!---------------------------------------------------------------------- 380 1016 ! 381 1017 ! !-- Laplacian in i-direction --! 382 DO jl = 1, ipl1018 DO jl = 1, jpl 383 1019 DO jj = 2, jpjm1 ! First derivative (gradient) 384 1020 DO ji = 1, fs_jpim1 385 ztu1(ji,jj ) = ( pt(ji+1,jj,jl) - pt(ji,jj,jl) ) * r1_e1u(ji,jj) * umask(ji,jj,1)1021 ztu1(ji,jj,jl) = ( pt(ji+1,jj,jl) - pt(ji,jj,jl) ) * r1_e1u(ji,jj) * umask(ji,jj,1) 386 1022 END DO 387 1023 ! ! Second derivative (Laplacian) 388 1024 DO ji = fs_2, fs_jpim1 389 ztu2(ji,jj,jl) = ( ztu1(ji,jj ) - ztu1(ji-1,jj) ) * r1_e1t(ji,jj)1025 ztu2(ji,jj,jl) = ( ztu1(ji,jj,jl) - ztu1(ji-1,jj,jl) ) * r1_e1t(ji,jj) 390 1026 END DO 391 1027 END DO … … 394 1030 ! 395 1031 ! !-- BiLaplacian in i-direction --! 396 DO jl = 1, ipl1032 DO jl = 1, jpl 397 1033 DO jj = 2, jpjm1 ! Third derivative 398 1034 DO ji = 1, fs_jpim1 399 ztu3(ji,jj ) = ( ztu2(ji+1,jj,jl) - ztu2(ji,jj,jl) ) * r1_e1u(ji,jj) * umask(ji,jj,1)1035 ztu3(ji,jj,jl) = ( ztu2(ji+1,jj,jl) - ztu2(ji,jj,jl) ) * r1_e1u(ji,jj) * umask(ji,jj,1) 400 1036 END DO 401 1037 ! ! Fourth derivative 402 1038 DO ji = fs_2, fs_jpim1 403 ztu4(ji,jj,jl) = ( ztu3(ji,jj ) - ztu3(ji-1,jj) ) * r1_e1t(ji,jj)1039 ztu4(ji,jj,jl) = ( ztu3(ji,jj,jl) - ztu3(ji-1,jj,jl) ) * r1_e1t(ji,jj) 404 1040 END DO 405 1041 END DO … … 408 1044 ! 409 1045 ! 410 SELECT CASE (k _order)1046 SELECT CASE (kn_umx ) 411 1047 ! 412 1048 CASE( 1 ) !== 1st order central TIM ==! (Eq. 21) 413 1049 ! 414 DO jl = 1, ipl415 DO jj = 2, jpjm11050 DO jl = 1, jpl 1051 DO jj = 1, jpjm1 416 1052 DO ji = 1, fs_jpim1 ! vector opt. 417 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( 418 & - SIGN( 1._wp, puc(ji,jj) ) * ( pt(ji+1,jj,jl) - pt(ji,jj,jl) ) )1053 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( pt(ji+1,jj,jl) + pt(ji,jj,jl) & 1054 & - SIGN( 1._wp, pu(ji,jj) ) * ( pt(ji+1,jj,jl) - pt(ji,jj,jl) ) ) 419 1055 END DO 420 1056 END DO … … 423 1059 CASE( 2 ) !== 2nd order central TIM ==! (Eq. 23) 424 1060 ! 425 DO jl = 1, ipl426 DO jj = 2, jpjm11061 DO jl = 1, jpl 1062 DO jj = 1, jpjm1 427 1063 DO ji = 1, fs_jpim1 ! vector opt. 428 zcu = pu c(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj)429 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( pt(ji+1,jj,jl) + pt(ji,jj,jl) &430 & - zcu * ( pt(ji+1,jj,jl) - pt(ji,jj,jl) ) )1064 zcu = pu(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj) 1065 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( pt(ji+1,jj,jl) + pt(ji,jj,jl) & 1066 & - zcu * ( pt(ji+1,jj,jl) - pt(ji,jj,jl) ) ) 431 1067 END DO 432 1068 END DO … … 435 1071 CASE( 3 ) !== 3rd order central TIM ==! (Eq. 24) 436 1072 ! 437 DO jl = 1, ipl438 DO jj = 2, jpjm11073 DO jl = 1, jpl 1074 DO jj = 1, jpjm1 439 1075 DO ji = 1, fs_jpim1 ! vector opt. 440 zcu = pu c(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj)1076 zcu = pu(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj) 441 1077 zdx2 = e1u(ji,jj) * e1u(ji,jj) 442 1078 !!rachid zdx2 = e1u(ji,jj) * e1t(ji,jj) 443 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( ( pt (ji+1,jj,jl) + pt (ji,jj,jl) &444 & - zcu * ( pt (ji+1,jj,jl) - pt (ji,jj,jl) ) ) &445 & + z1_6 * zdx2 * ( zcu*zcu - 1._wp ) * ( ztu2(ji+1,jj,jl) + ztu2(ji,jj,jl) &446 & - SIGN( 1._wp, zcu ) * ( ztu2(ji+1,jj,jl) - ztu2(ji,jj,jl) ) ) )1079 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( ( pt (ji+1,jj,jl) + pt (ji,jj,jl) & 1080 & - zcu * ( pt (ji+1,jj,jl) - pt (ji,jj,jl) ) ) & 1081 & + z1_6 * zdx2 * ( zcu*zcu - 1._wp ) * ( ztu2(ji+1,jj,jl) + ztu2(ji,jj,jl) & 1082 & - SIGN( 1._wp, zcu ) * ( ztu2(ji+1,jj,jl) - ztu2(ji,jj,jl) ) ) ) 447 1083 END DO 448 1084 END DO … … 451 1087 CASE( 4 ) !== 4th order central TIM ==! (Eq. 27) 452 1088 ! 453 DO jl = 1, ipl454 DO jj = 2, jpjm11089 DO jl = 1, jpl 1090 DO jj = 1, jpjm1 455 1091 DO ji = 1, fs_jpim1 ! vector opt. 456 zcu = pu c(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj)1092 zcu = pu(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj) 457 1093 zdx2 = e1u(ji,jj) * e1u(ji,jj) 458 1094 !!rachid zdx2 = e1u(ji,jj) * e1t(ji,jj) 459 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( ( 460 & 461 & + z1_6 * zdx2 * ( zcu*zcu - 1._wp ) * ( 462 & 1095 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( ( pt (ji+1,jj,jl) + pt (ji,jj,jl) & 1096 & - zcu * ( pt (ji+1,jj,jl) - pt (ji,jj,jl) ) ) & 1097 & + z1_6 * zdx2 * ( zcu*zcu - 1._wp ) * ( ztu2(ji+1,jj,jl) + ztu2(ji,jj,jl) & 1098 & - 0.5_wp * zcu * ( ztu2(ji+1,jj,jl) - ztu2(ji,jj,jl) ) ) ) 463 1099 END DO 464 1100 END DO … … 467 1103 CASE( 5 ) !== 5th order central TIM ==! (Eq. 29) 468 1104 ! 469 DO jl = 1, ipl470 DO jj = 2, jpjm11105 DO jl = 1, jpl 1106 DO jj = 1, jpjm1 471 1107 DO ji = 1, fs_jpim1 ! vector opt. 472 zcu = pu c(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj)1108 zcu = pu(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj) 473 1109 zdx2 = e1u(ji,jj) * e1u(ji,jj) 474 !!rachid zdx2 = e1u(ji,jj) * e1t(ji,jj)1110 !!rachid zdx2 = e1u(ji,jj) * e1t(ji,jj) 475 1111 zdx4 = zdx2 * zdx2 476 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( ( pt (ji+1,jj,jl) + pt (ji,jj,jl) &477 & - zcu * ( pt (ji+1,jj,jl) - pt (ji,jj,jl) ) ) &478 & + z1_6 * zdx2 * ( zcu*zcu - 1._wp ) * ( ztu2(ji+1,jj,jl) + ztu2(ji,jj,jl) &479 & - 0.5_wp * zcu * ( ztu2(ji+1,jj,jl) - ztu2(ji,jj,jl) ) ) &480 & + z1_120 * zdx4 * ( zcu*zcu - 1._wp ) * ( zcu*zcu - 4._wp ) * ( ztu4(ji+1,jj,jl) + ztu4(ji,jj,jl) &481 & - SIGN( 1._wp, zcu ) * ( ztu4(ji+1,jj,jl) - ztu4(ji,jj,jl) ) ) )1112 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( ( pt (ji+1,jj,jl) + pt (ji,jj,jl) & 1113 & - zcu * ( pt (ji+1,jj,jl) - pt (ji,jj,jl) ) ) & 1114 & + z1_6 * zdx2 * ( zcu*zcu - 1._wp ) * ( ztu2(ji+1,jj,jl) + ztu2(ji,jj,jl) & 1115 & - 0.5_wp * zcu * ( ztu2(ji+1,jj,jl) - ztu2(ji,jj,jl) ) ) & 1116 & + z1_120 * zdx4 * ( zcu*zcu - 1._wp ) * ( zcu*zcu - 4._wp ) * ( ztu4(ji+1,jj,jl) + ztu4(ji,jj,jl) & 1117 & - SIGN( 1._wp, zcu ) * ( ztu4(ji+1,jj,jl) - ztu4(ji,jj,jl) ) ) ) 482 1118 END DO 483 1119 END DO … … 485 1121 ! 486 1122 END SELECT 1123 ! !-- High order flux in i-direction --! 1124 IF( ll_neg ) THEN 1125 DO jl = 1, jpl 1126 DO jj = 1, jpjm1 1127 DO ji = 1, fs_jpim1 1128 IF( pt_u(ji,jj,jl) < 0._wp ) THEN 1129 pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * ( pt(ji+1,jj,jl) + pt(ji,jj,jl) & 1130 & - SIGN( 1._wp, pu(ji,jj) ) * ( pt(ji+1,jj,jl) - pt(ji,jj,jl) ) ) 1131 ENDIF 1132 END DO 1133 END DO 1134 END DO 1135 ENDIF 1136 1137 DO jl = 1, jpl 1138 DO jj = 1, jpjm1 1139 DO ji = 1, fs_jpim1 ! vector opt. 1140 IF( ll_clem ) THEN 1141 pfu_ho(ji,jj,jl) = pu(ji,jj) * pt_u(ji,jj,jl) 1142 ELSE 1143 pfu_ho(ji,jj,jl) = puc(ji,jj,jl) * pt_u(ji,jj,jl) 1144 ENDIF 1145 END DO 1146 END DO 1147 END DO 487 1148 ! 488 1149 END SUBROUTINE ultimate_x 489 1150 490 1151 491 SUBROUTINE ultimate_y( k _order, ipl, pdt, pt, pvc, pt_v)1152 SUBROUTINE ultimate_y( kn_umx, pdt, pt, pv, pvc, pt_v, pfv_ho ) 492 1153 !!--------------------------------------------------------------------- 493 1154 !! *** ROUTINE ultimate_y *** … … 500 1161 !! Reference : Leonard, B.P., 1991, Comput. Methods Appl. Mech. Eng., 88, 17-74. 501 1162 !!---------------------------------------------------------------------- 502 INTEGER , INTENT(in ) :: k_order ! ocean time-step index 503 INTEGER , INTENT(in ) :: ipl ! third dimension of tracer array 504 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 505 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: pvc ! ice j-velocity component 506 REAL(wp), DIMENSION(jpi,jpj,ipl), INTENT(in ) :: pt ! tracer fields 507 REAL(wp), DIMENSION(jpi,jpj,ipl), INTENT( out) :: pt_v ! tracer at v-point 1163 INTEGER , INTENT(in ) :: kn_umx ! order of the scheme (1-5=UM or 20=CEN2) 1164 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 1165 REAL(wp), DIMENSION(:,: ), INTENT(in ) :: pv ! ice j-velocity component 1166 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: pvc ! ice j-velocity*A component 1167 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: pt ! tracer fields 1168 REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT( out) :: pt_v ! tracer at v-point 1169 REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT( out) :: pfv_ho ! high order flux 508 1170 ! 509 1171 INTEGER :: ji, jj, jl ! dummy loop indices 510 1172 REAL(wp) :: zcv, zdy2, zdy4 ! - - 511 REAL(wp), DIMENSION(jpi,jpj) :: ztv1, ztv3 512 REAL(wp), DIMENSION(jpi,jpj,ipl) :: ztv2, ztv4 1173 REAL(wp), DIMENSION(jpi,jpj,jpl) :: ztv1, ztv2, ztv3, ztv4 513 1174 !!---------------------------------------------------------------------- 514 1175 ! 515 1176 ! !-- Laplacian in j-direction --! 516 DO jl = 1, ipl1177 DO jl = 1, jpl 517 1178 DO jj = 1, jpjm1 ! First derivative (gradient) 518 1179 DO ji = fs_2, fs_jpim1 519 ztv1(ji,jj ) = ( pt(ji,jj+1,jl) - pt(ji,jj,jl) ) * r1_e2v(ji,jj) * vmask(ji,jj,1)1180 ztv1(ji,jj,jl) = ( pt(ji,jj+1,jl) - pt(ji,jj,jl) ) * r1_e2v(ji,jj) * vmask(ji,jj,1) 520 1181 END DO 521 1182 END DO 522 1183 DO jj = 2, jpjm1 ! Second derivative (Laplacian) 523 1184 DO ji = fs_2, fs_jpim1 524 ztv2(ji,jj,jl) = ( ztv1(ji,jj ) - ztv1(ji,jj-1) ) * r1_e2t(ji,jj)1185 ztv2(ji,jj,jl) = ( ztv1(ji,jj,jl) - ztv1(ji,jj-1,jl) ) * r1_e2t(ji,jj) 525 1186 END DO 526 1187 END DO … … 529 1190 ! 530 1191 ! !-- BiLaplacian in j-direction --! 531 DO jl = 1, ipl1192 DO jl = 1, jpl 532 1193 DO jj = 1, jpjm1 ! First derivative 533 1194 DO ji = fs_2, fs_jpim1 534 ztv3(ji,jj) = ( ztv2(ji,jj+1,jl) - ztv2(ji,jj,jl) ) * r1_e2v(ji,jj) * vmask(ji,jj,1)1195 ztv3(ji,jj,jl) = ( ztv2(ji,jj+1,jl) - ztv2(ji,jj,jl) ) * r1_e2v(ji,jj) * vmask(ji,jj,1) 535 1196 END DO 536 1197 END DO 537 1198 DO jj = 2, jpjm1 ! Second derivative 538 1199 DO ji = fs_2, fs_jpim1 539 ztv4(ji,jj,jl) = ( ztv3(ji,jj ) - ztv3(ji,jj-1) ) * r1_e2t(ji,jj)1200 ztv4(ji,jj,jl) = ( ztv3(ji,jj,jl) - ztv3(ji,jj-1,jl) ) * r1_e2t(ji,jj) 540 1201 END DO 541 1202 END DO … … 544 1205 ! 545 1206 ! 546 SELECT CASE (k _order)547 !1207 SELECT CASE (kn_umx ) 1208 ! 548 1209 CASE( 1 ) !== 1st order central TIM ==! (Eq. 21) 549 DO jl = 1, ipl1210 DO jl = 1, jpl 550 1211 DO jj = 1, jpjm1 551 DO ji = fs_2, fs_jpim1552 pt_v(ji,jj,jl) = 0.5_wp * vmask(ji,jj,1) * ( 553 & - SIGN( 1._wp, pv c(ji,jj) ) * ( pt(ji,jj+1,jl) - pt(ji,jj,jl) ) )1212 DO ji = 1, fs_jpim1 1213 pt_v(ji,jj,jl) = 0.5_wp * vmask(ji,jj,1) * ( ( pt(ji,jj+1,jl) + pt(ji,jj,jl) ) & 1214 & - SIGN( 1._wp, pv(ji,jj) ) * ( pt(ji,jj+1,jl) - pt(ji,jj,jl) ) ) 554 1215 END DO 555 1216 END DO … … 557 1218 ! 558 1219 CASE( 2 ) !== 2nd order central TIM ==! (Eq. 23) 559 DO jl = 1, ipl1220 DO jl = 1, jpl 560 1221 DO jj = 1, jpjm1 561 DO ji = fs_2, fs_jpim1562 zcv = pv c(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj)1222 DO ji = 1, fs_jpim1 1223 zcv = pv(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj) 563 1224 pt_v(ji,jj,jl) = 0.5_wp * vmask(ji,jj,1) * ( ( pt(ji,jj+1,jl) + pt(ji,jj,jl) ) & 564 1225 & - zcv * ( pt(ji,jj+1,jl) - pt(ji,jj,jl) ) ) … … 569 1230 ! 570 1231 CASE( 3 ) !== 3rd order central TIM ==! (Eq. 24) 571 DO jl = 1, ipl1232 DO jl = 1, jpl 572 1233 DO jj = 1, jpjm1 573 DO ji = fs_2, fs_jpim1574 zcv = pv c(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj)1234 DO ji = 1, fs_jpim1 1235 zcv = pv(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj) 575 1236 zdy2 = e2v(ji,jj) * e2v(ji,jj) 576 1237 !!rachid zdy2 = e2v(ji,jj) * e2t(ji,jj) … … 584 1245 ! 585 1246 CASE( 4 ) !== 4th order central TIM ==! (Eq. 27) 586 DO jl = 1, ipl1247 DO jl = 1, jpl 587 1248 DO jj = 1, jpjm1 588 DO ji = fs_2, fs_jpim1589 zcv = pv c(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj)1249 DO ji = 1, fs_jpim1 1250 zcv = pv(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj) 590 1251 zdy2 = e2v(ji,jj) * e2v(ji,jj) 591 1252 !!rachid zdy2 = e2v(ji,jj) * e2t(ji,jj) … … 599 1260 ! 600 1261 CASE( 5 ) !== 5th order central TIM ==! (Eq. 29) 601 DO jl = 1, ipl1262 DO jl = 1, jpl 602 1263 DO jj = 1, jpjm1 603 DO ji = fs_2, fs_jpim1604 zcv = pv c(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj)1264 DO ji = 1, fs_jpim1 1265 zcv = pv(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj) 605 1266 zdy2 = e2v(ji,jj) * e2v(ji,jj) 606 1267 !!rachid zdy2 = e2v(ji,jj) * e2t(ji,jj) … … 617 1278 ! 618 1279 END SELECT 1280 ! !-- High order flux in j-direction --! 1281 IF( ll_neg ) THEN 1282 DO jl = 1, jpl 1283 DO jj = 1, jpjm1 1284 DO ji = 1, fs_jpim1 1285 IF( pt_v(ji,jj,jl) < 0._wp ) THEN 1286 pt_v(ji,jj,jl) = 0.5_wp * vmask(ji,jj,1) * ( ( pt(ji,jj+1,jl) + pt(ji,jj,jl) ) & 1287 & - SIGN( 1._wp, pv(ji,jj) ) * ( pt(ji,jj+1,jl) - pt(ji,jj,jl) ) ) 1288 ENDIF 1289 END DO 1290 END DO 1291 END DO 1292 ENDIF 1293 1294 DO jl = 1, jpl 1295 DO jj = 1, jpjm1 1296 DO ji = 1, fs_jpim1 ! vector opt. 1297 IF( ll_clem ) THEN 1298 pfv_ho(ji,jj,jl) = pv(ji,jj) * pt_v(ji,jj,jl) 1299 ELSE 1300 pfv_ho(ji,jj,jl) = pvc(ji,jj,jl) * pt_v(ji,jj,jl) 1301 ENDIF 1302 END DO 1303 END DO 1304 END DO 619 1305 ! 620 1306 END SUBROUTINE ultimate_y 621 622 623 SUBROUTINE nonosc_2d( ipl, pbef, paa, pbb, paft, pdt)1307 1308 1309 SUBROUTINE nonosc_2d( pamsk, pdt, pu, puc, pv, pvc, ptc, pt, pt_low, pfu_low, pfv_low, pfu_ho, pfv_ho ) 624 1310 !!--------------------------------------------------------------------- 625 1311 !! *** ROUTINE nonosc *** 626 1312 !! 627 !! ** Purpose : compute monotonic tracer fluxes from the upstream1313 !! ** Purpose : compute monotonic tracer fluxes from the upstream 628 1314 !! scheme and the before field by a nonoscillatory algorithm 629 1315 !! 630 1316 !! ** Method : ... ??? 631 !! warning : p bef and paftmust be masked, but the boundaries1317 !! warning : pt and pt_low must be masked, but the boundaries 632 1318 !! conditions on the fluxes are not necessary zalezak (1979) 633 1319 !! drange (1995) multi-dimensional forward-in-time and upstream- 634 1320 !! in-space based differencing for fluid 635 1321 !!---------------------------------------------------------------------- 636 INTEGER , INTENT(in ) :: ipl ! third dimension of tracer array 637 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 638 REAL(wp), DIMENSION (jpi,jpj,ipl), INTENT(in ) :: pbef, paft ! before & after field 639 REAL(wp), DIMENSION (jpi,jpj,ipl), INTENT(inout) :: paa, pbb ! monotonic fluxes in the 2 directions 1322 REAL(wp) , INTENT(in ) :: pamsk ! advection of concentration (1) or other tracers (0) 1323 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 1324 REAL(wp), DIMENSION (:,: ), INTENT(in ) :: pu ! ice i-velocity => u*e2 1325 REAL(wp), DIMENSION (:,:,:), INTENT(in ) :: puc ! ice i-velocity *A => u*e2*a 1326 REAL(wp), DIMENSION (:,: ), INTENT(in ) :: pv ! ice j-velocity => v*e1 1327 REAL(wp), DIMENSION (:,:,:), INTENT(in ) :: pvc ! ice j-velocity *A => v*e1*a 1328 REAL(wp), DIMENSION (:,:,:), INTENT(in ) :: ptc, pt, pt_low ! before field & upstream guess of after field 1329 REAL(wp), DIMENSION (:,:,:), INTENT(inout) :: pfv_low, pfu_low ! upstream flux 1330 REAL(wp), DIMENSION (:,:,:), INTENT(inout) :: pfv_ho, pfu_ho ! monotonic flux 640 1331 ! 641 1332 INTEGER :: ji, jj, jl ! dummy loop indices 642 INTEGER :: ikm1 ! local integer 643 REAL(wp) :: zpos, zneg, zbt, za, zb, zc, zbig, zsml, z1_dt ! local scalars 644 REAL(wp) :: zau, zbu, zcu, zav, zbv, zcv, zup, zdo ! - - 645 REAL(wp), DIMENSION(jpi,jpj) :: zbup, zbdo, zmsk 646 REAL(wp), DIMENSION(jpi,jpj,ipl) :: zbetup, zbetdo, zdiv 647 !!---------------------------------------------------------------------- 648 ! 1333 REAL(wp) :: zpos, zneg, zbig, zsml, z1_dt, zpos2, zneg2 ! local scalars 1334 REAL(wp) :: zau, zbu, zcu, zav, zbv, zcv, zup, zdo, zsign, zcoef ! - - 1335 REAL(wp), DIMENSION(jpi,jpj ) :: zbup, zbdo 1336 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zbetup, zbetdo, zti_low, ztj_low, zzt 1337 !!---------------------------------------------------------------------- 649 1338 zbig = 1.e+40_wp 650 zsml = 1.e-15_wp 651 652 ! test on divergence 653 DO jl = 1, ipl 1339 zsml = epsi20 1340 1341 IF( ll_zeroup2 ) THEN 1342 DO jl = 1, jpl 1343 DO jj = 1, jpjm1 1344 DO ji = 1, fs_jpim1 ! vector opt. 1345 IF( amaxu(ji,jj,jl) == 0._wp ) pfu_ho(ji,jj,jl) = 0._wp 1346 IF( amaxv(ji,jj,jl) == 0._wp ) pfv_ho(ji,jj,jl) = 0._wp 1347 END DO 1348 END DO 1349 END DO 1350 ENDIF 1351 1352 IF( ll_zeroup4 ) THEN 1353 DO jl = 1, jpl 1354 DO jj = 1, jpjm1 1355 DO ji = 1, fs_jpim1 ! vector opt. 1356 IF( pfu_low(ji,jj,jl) == 0._wp ) pfu_ho(ji,jj,jl) = 0._wp 1357 IF( pfv_low(ji,jj,jl) == 0._wp ) pfv_ho(ji,jj,jl) = 0._wp 1358 END DO 1359 END DO 1360 END DO 1361 ENDIF 1362 1363 1364 IF( ll_zeroup1 ) THEN 1365 DO jl = 1, jpl 1366 DO jj = 2, jpjm1 1367 DO ji = fs_2, fs_jpim1 1368 IF( ll_gurvan ) THEN 1369 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 1370 & - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 1371 ELSE 1372 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 1373 & - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) & 1374 & + pt(ji,jj,jl) * pdt * ( pu(ji,jj) - pu(ji-1,jj) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 1375 & + pt(ji,jj,jl) * pdt * ( pv(ji,jj) - pv(ji,jj-1) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 1376 & ) * tmask(ji,jj,1) 1377 ENDIF 1378 IF( zzt(ji,jj,jl) < 0._wp ) THEN 1379 pfu_ho(ji,jj,jl) = pfu_low(ji,jj,jl) 1380 pfv_ho(ji,jj,jl) = pfv_low(ji,jj,jl) 1381 WRITE(numout,*) '*** 1 negative high order zzt ***',ji,jj,zzt(ji,jj,jl) 1382 ENDIF 1383 !! IF( ji==26 .AND. jj==86) THEN 1384 !! WRITE(numout,*) 'zzt high order',zzt(ji,jj) 1385 !! WRITE(numout,*) 'pfu_ho',(pfu_ho(ji,jj,jl)) * r1_e1e2t(ji,jj) * pdt 1386 !! WRITE(numout,*) 'pfv_ho',(pfv_ho(ji,jj,jl)) * r1_e1e2t(ji,jj) * pdt 1387 !! WRITE(numout,*) 'pfu_hom1',(pfu_ho(ji-1,jj,jl)) * r1_e1e2t(ji,jj) * pdt 1388 !! WRITE(numout,*) 'pfv_hom1',(pfv_ho(ji,jj-1,jl)) * r1_e1e2t(ji,jj) * pdt 1389 !! ENDIF 1390 IF( ll_gurvan ) THEN 1391 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 1392 & - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 1393 ELSE 1394 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 1395 & - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) & 1396 & + pt(ji,jj,jl) * pdt * ( pu(ji,jj) - pu(ji-1,jj) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 1397 & + pt(ji,jj,jl) * pdt * ( pv(ji,jj) - pv(ji,jj-1) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 1398 & ) * tmask(ji,jj,1) 1399 ENDIF 1400 IF( zzt(ji,jj,jl) < 0._wp ) THEN 1401 pfu_ho(ji-1,jj,jl) = pfu_low(ji-1,jj,jl) 1402 pfv_ho(ji,jj-1,jl) = pfv_low(ji,jj-1,jl) 1403 WRITE(numout,*) '*** 2 negative high order zzt ***',ji,jj,zzt(ji,jj,jl) 1404 ENDIF 1405 IF( ll_gurvan ) THEN 1406 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 1407 & - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 1408 ELSE 1409 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 1410 & - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) & 1411 & + pt(ji,jj,jl) * pdt * ( pu(ji,jj) - pu(ji-1,jj) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 1412 & + pt(ji,jj,jl) * pdt * ( pv(ji,jj) - pv(ji,jj-1) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 1413 & ) * tmask(ji,jj,1) 1414 ENDIF 1415 IF( zzt(ji,jj,jl) < 0._wp ) THEN 1416 WRITE(numout,*) '*** 3 negative high order zzt ***',ji,jj,zzt(ji,jj,jl) 1417 ENDIF 1418 END DO 1419 END DO 1420 END DO 1421 CALL lbc_lnk_multi( 'icedyn_adv_umx', pfu_ho, 'U', -1., pfv_ho, 'V', -1. ) 1422 ENDIF 1423 1424 1425 ! antidiffusive flux : high order minus low order 1426 ! -------------------------------------------------- 1427 DO jl = 1, jpl 1428 DO jj = 1, jpjm1 1429 DO ji = 1, fs_jpim1 ! vector opt. 1430 pfu_ho(ji,jj,jl) = pfu_ho(ji,jj,jl) - pfu_low(ji,jj,jl) 1431 pfv_ho(ji,jj,jl) = pfv_ho(ji,jj,jl) - pfv_low(ji,jj,jl) 1432 END DO 1433 END DO 1434 END DO 1435 1436 ! extreme case where pfu_ho has to be zero 1437 ! ---------------------------------------- 1438 ! pfu_ho 1439 ! * ---> 1440 ! | | * | | 1441 ! | | | * | 1442 ! | | | | * 1443 ! t_low : i-1 i i+1 i+2 1444 IF( ll_prelimiter_zalesak ) THEN 1445 1446 DO jl = 1, jpl 1447 DO jj = 2, jpjm1 1448 DO ji = fs_2, fs_jpim1 1449 zti_low(ji,jj,jl)= pt_low(ji+1,jj ,jl) 1450 ztj_low(ji,jj,jl)= pt_low(ji ,jj+1,jl) 1451 END DO 1452 END DO 1453 END DO 1454 CALL lbc_lnk_multi( 'icedyn_adv_umx', zti_low, 'T', 1., ztj_low, 'T', 1. ) 1455 1456 !! this does not work ?? 1457 !! DO jj = 2, jpjm1 1458 !! DO ji = fs_2, fs_jpim1 1459 !! IF( SIGN( 1., pfu_ho(ji,jj) ) /= SIGN( 1., pt_low (ji+1,jj ) - pt_low (ji ,jj) ) .AND. & 1460 !! & SIGN( 1., pfv_ho(ji,jj) ) /= SIGN( 1., pt_low (ji ,jj+1) - pt_low (ji ,jj) ) & 1461 !! & ) THEN 1462 !! IF( SIGN( 1., pfu_ho(ji,jj) ) /= SIGN( 1., zti_low(ji+1,jj ) - zti_low(ji ,jj) ) .AND. & 1463 !! & SIGN( 1., pfv_ho(ji,jj) ) /= SIGN( 1., ztj_low(ji,jj+1 ) - ztj_low(ji ,jj) ) & 1464 !! & ) THEN 1465 !! pfu_ho(ji,jj) = 0. ; pfv_ho(ji,jj) = 0. 1466 !! ENDIF 1467 !! IF( SIGN( 1., pfu_ho(ji,jj) ) /= SIGN( 1., pt_low (ji ,jj) - pt_low (ji-1,jj ) ) .AND. & 1468 !! & SIGN( 1., pfv_ho(ji,jj) ) /= SIGN( 1., pt_low (ji ,jj) - pt_low (ji ,jj-1) ) & 1469 !! & ) THEN 1470 !! pfu_ho(ji,jj) = 0. ; pfv_ho(ji,jj) = 0. 1471 !! ENDIF 1472 !! ENDIF 1473 !! END DO 1474 !! END DO 1475 1476 DO jl = 1, jpl 1477 DO jj = 2, jpjm1 1478 DO ji = fs_2, fs_jpim1 1479 IF ( pfu_ho(ji,jj,jl) * ( pt_low(ji+1,jj,jl) - pt_low(ji,jj,jl) ) <= 0. .AND. & 1480 & pfv_ho(ji,jj,jl) * ( pt_low(ji,jj+1,jl) - pt_low(ji,jj,jl) ) <= 0. ) THEN 1481 ! 1482 IF( pfu_ho(ji,jj,jl) * ( zti_low(ji+1,jj,jl) - zti_low(ji,jj,jl) ) <= 0 .AND. & 1483 & pfv_ho(ji,jj,jl) * ( ztj_low(ji,jj+1,jl) - ztj_low(ji,jj,jl) ) <= 0) pfu_ho(ji,jj,jl)=0. ; pfv_ho(ji,jj,jl)=0. 1484 ! 1485 IF( pfu_ho(ji,jj,jl) * ( pt_low(ji ,jj,jl) - pt_low(ji-1,jj,jl) ) <= 0 .AND. & 1486 & pfv_ho(ji,jj,jl) * ( pt_low(ji ,jj,jl) - pt_low(ji,jj-1,jl) ) <= 0) pfu_ho(ji,jj,jl)=0. ; pfv_ho(ji,jj,jl)=0. 1487 ! 1488 ENDIF 1489 END DO 1490 END DO 1491 END DO 1492 CALL lbc_lnk_multi( 'icedyn_adv_umx', pfu_ho, 'U', -1., pfv_ho, 'V', -1. ) ! lateral boundary cond. 1493 1494 ELSEIF( ll_prelimiter_devore ) THEN 1495 DO jl = 1, jpl 1496 DO jj = 2, jpjm1 1497 DO ji = fs_2, fs_jpim1 1498 zti_low(ji,jj,jl)= pt_low(ji+1,jj ,jl) 1499 ztj_low(ji,jj,jl)= pt_low(ji ,jj+1,jl) 1500 END DO 1501 END DO 1502 END DO 1503 CALL lbc_lnk_multi( 'icedyn_adv_umx', zti_low, 'T', 1., ztj_low, 'T', 1. ) 1504 1505 z1_dt = 1._wp / pdt 1506 DO jl = 1, jpl 1507 DO jj = 2, jpjm1 1508 DO ji = fs_2, fs_jpim1 1509 zsign = SIGN( 1., pt_low(ji+1,jj,jl) - pt_low(ji,jj,jl) ) 1510 pfu_ho(ji,jj,jl) = zsign * MAX( 0. , MIN( ABS(pfu_ho(ji,jj,jl)) , & 1511 & zsign * ( pt_low (ji ,jj,jl) - pt_low (ji-1,jj,jl) ) * e1e2t(ji ,jj) * z1_dt , & 1512 & zsign * ( zti_low(ji+1,jj,jl) - zti_low(ji ,jj,jl) ) * e1e2t(ji+1,jj) * z1_dt ) ) 1513 1514 zsign = SIGN( 1., pt_low(ji,jj+1,jl) - pt_low(ji,jj,jl) ) 1515 pfv_ho(ji,jj,jl) = zsign * MAX( 0. , MIN( ABS(pfv_ho(ji,jj,jl)) , & 1516 & zsign * ( pt_low (ji,jj ,jl) - pt_low (ji,jj-1,jl) ) * e1e2t(ji,jj ) * z1_dt , & 1517 & zsign * ( ztj_low(ji,jj+1,jl) - ztj_low(ji,jj ,jl) ) * e1e2t(ji,jj+1) * z1_dt ) ) 1518 END DO 1519 END DO 1520 END DO 1521 CALL lbc_lnk_multi( 'icedyn_adv_umx', pfu_ho, 'U', -1., pfv_ho, 'V', -1. ) ! lateral boundary cond. 1522 1523 ENDIF 1524 1525 1526 ! Search local extrema 1527 ! -------------------- 1528 ! max/min of pt & pt_low with large negative/positive value (-/+zbig) outside ice cover 1529 z1_dt = 1._wp / pdt 1530 DO jl = 1, jpl 1531 1532 DO jj = 1, jpj 1533 DO ji = 1, jpi 1534 IF ( pt(ji,jj,jl) <= 0._wp .AND. pt_low(ji,jj,jl) <= 0._wp ) THEN 1535 zbup(ji,jj) = -zbig 1536 zbdo(ji,jj) = zbig 1537 ELSEIF( pt(ji,jj,jl) <= 0._wp .AND. pt_low(ji,jj,jl) > 0._wp ) THEN 1538 zbup(ji,jj) = pt_low(ji,jj,jl) 1539 zbdo(ji,jj) = pt_low(ji,jj,jl) 1540 ELSEIF( pt(ji,jj,jl) > 0._wp .AND. pt_low(ji,jj,jl) <= 0._wp ) THEN 1541 zbup(ji,jj) = pt(ji,jj,jl) 1542 zbdo(ji,jj) = pt(ji,jj,jl) 1543 ELSE 1544 zbup(ji,jj) = MAX( pt(ji,jj,jl) , pt_low(ji,jj,jl) ) 1545 zbdo(ji,jj) = MIN( pt(ji,jj,jl) , pt_low(ji,jj,jl) ) 1546 ENDIF 1547 END DO 1548 END DO 1549 654 1550 DO jj = 2, jpjm1 655 DO ji = fs_2, fs_jpim1 ! vector opt. 656 zdiv(ji,jj,jl) = - ( paa(ji,jj,jl) - paa(ji-1,jj ,jl) & 657 & + pbb(ji,jj,jl) - pbb(ji ,jj-1,jl) ) 658 END DO 659 END DO 660 END DO 661 CALL lbc_lnk( 'icedyn_adv_umx', zdiv, 'T', 1. ) ! Lateral boundary conditions (unchanged sign) 662 663 DO jl = 1, ipl 664 ! Determine ice masks for before and after tracers 665 WHERE( pbef(:,:,jl) == 0._wp .AND. paft(:,:,jl) == 0._wp .AND. zdiv(:,:,jl) == 0._wp ) 666 zmsk(:,:) = 0._wp 667 ELSEWHERE 668 zmsk(:,:) = 1._wp * tmask(:,:,1) 669 END WHERE 670 671 ! Search local extrema 672 ! -------------------- 673 ! max/min of pbef & paft with large negative/positive value (-/+zbig) inside land 674 ! zbup(:,:) = MAX( pbef(:,:) * tmask(:,:,1) - zbig * ( 1.e0 - tmask(:,:,1) ), & 675 ! & paft(:,:) * tmask(:,:,1) - zbig * ( 1.e0 - tmask(:,:,1) ) ) 676 ! zbdo(:,:) = MIN( pbef(:,:) * tmask(:,:,1) + zbig * ( 1.e0 - tmask(:,:,1) ), & 677 ! & paft(:,:) * tmask(:,:,1) + zbig * ( 1.e0 - tmask(:,:,1) ) ) 678 zbup(:,:) = MAX( pbef(:,:,jl) * zmsk(:,:) - zbig * ( 1.e0 - zmsk(:,:) ), & 679 & paft(:,:,jl) * zmsk(:,:) - zbig * ( 1.e0 - zmsk(:,:) ) ) 680 zbdo(:,:) = MIN( pbef(:,:,jl) * zmsk(:,:) + zbig * ( 1.e0 - zmsk(:,:) ), & 681 & paft(:,:,jl) * zmsk(:,:) + zbig * ( 1.e0 - zmsk(:,:) ) ) 682 683 z1_dt = 1._wp / pdt 684 DO jj = 2, jpjm1 685 DO ji = fs_2, fs_jpim1 ! vector opt. 1551 DO ji = fs_2, fs_jpim1 ! vector opt. 1552 ! 1553 IF( .NOT. ll_9points ) THEN 1554 zup = MAX( zbup(ji,jj), zbup(ji-1,jj ), zbup(ji+1,jj ), zbup(ji ,jj-1), zbup(ji ,jj+1) ) ! search max/min in neighbourhood 1555 zdo = MIN( zbdo(ji,jj), zbdo(ji-1,jj ), zbdo(ji+1,jj ), zbdo(ji ,jj-1), zbdo(ji ,jj+1) ) 1556 ! 1557 ELSE 1558 zup = MAX( zbup(ji,jj), zbup(ji-1,jj ), zbup(ji+1,jj ), zbup(ji ,jj-1), zbup(ji ,jj+1), & ! search max/min in neighbourhood 1559 & zbup(ji-1,jj-1), zbup(ji+1,jj+1), zbup(ji+1,jj-1), zbup(ji-1,jj+1) ) 1560 zdo = MIN( zbdo(ji,jj), zbdo(ji-1,jj ), zbdo(ji+1,jj ), zbdo(ji ,jj-1), zbdo(ji ,jj+1), & 1561 & zbdo(ji-1,jj-1), zbdo(ji+1,jj+1), zbdo(ji+1,jj-1), zbdo(ji-1,jj+1) ) 1562 ENDIF 1563 ! 1564 zpos = MAX( 0., pfu_ho(ji-1,jj,jl) ) - MIN( 0., pfu_ho(ji ,jj,jl) ) & ! positive/negative part of the flux 1565 & + MAX( 0., pfv_ho(ji,jj-1,jl) ) - MIN( 0., pfv_ho(ji,jj ,jl) ) 1566 zneg = MAX( 0., pfu_ho(ji ,jj,jl) ) - MIN( 0., pfu_ho(ji-1,jj,jl) ) & 1567 & + MAX( 0., pfv_ho(ji,jj ,jl) ) - MIN( 0., pfv_ho(ji,jj-1,jl) ) 1568 ! 1569 IF( ll_HgradU .AND. .NOT.ll_gurvan ) THEN 1570 zneg2 = ( pt(ji,jj,jl) * MAX( 0., pu(ji,jj) - pu(ji-1,jj) ) + pt(ji,jj,jl) * MAX( 0., pv(ji,jj) - pv(ji,jj-1) ) & 1571 & ) * ( 1. - pamsk ) 1572 zpos2 = ( - pt(ji,jj,jl) * MIN( 0., pu(ji,jj) - pu(ji-1,jj) ) - pt(ji,jj,jl) * MIN( 0., pv(ji,jj) - pv(ji,jj-1) ) & 1573 & ) * ( 1. - pamsk ) 1574 ELSE 1575 zneg2 = 0. ; zpos2 = 0. 1576 ENDIF 1577 ! 1578 ! ! up & down beta terms 1579 IF( (zpos+zpos2) > 0. ) THEN ; zbetup(ji,jj,jl) = MAX( 0._wp, zup - pt_low(ji,jj,jl) ) / (zpos+zpos2) * e1e2t(ji,jj) * z1_dt 1580 ELSE ; zbetup(ji,jj,jl) = 0. ! zbig 1581 ENDIF 1582 ! 1583 IF( (zneg+zneg2) > 0. ) THEN ; zbetdo(ji,jj,jl) = MAX( 0._wp, pt_low(ji,jj,jl) - zdo ) / (zneg+zneg2) * e1e2t(ji,jj) * z1_dt 1584 ELSE ; zbetdo(ji,jj,jl) = 0. ! zbig 1585 ENDIF 1586 ! 1587 ! if all the points are outside ice cover 1588 IF( zup == -zbig ) zbetup(ji,jj,jl) = 0. ! zbig 1589 IF( zdo == zbig ) zbetdo(ji,jj,jl) = 0. ! zbig 1590 ! 1591 1592 !! IF( ji==26 .AND. jj==86) THEN 1593 ! WRITE(numout,*) '-----------------' 1594 ! WRITE(numout,*) 'zpos',zpos,zpos2 1595 ! WRITE(numout,*) 'zneg',zneg,zneg2 1596 ! WRITE(numout,*) 'puc/pu',ABS(puc(ji,jj))/MAX(epsi20, ABS(pu(ji,jj))) 1597 ! WRITE(numout,*) 'pvc/pv',ABS(pvc(ji,jj))/MAX(epsi20, ABS(pv(ji,jj))) 1598 ! WRITE(numout,*) 'pucm1/pu',ABS(puc(ji-1,jj))/MAX(epsi20, ABS(pu(ji-1,jj))) 1599 ! WRITE(numout,*) 'pvcm1/pv',ABS(pvc(ji,jj-1))/MAX(epsi20, ABS(pv(ji,jj-1))) 1600 ! WRITE(numout,*) 'pfu_ho',(pfu_ho(ji,jj)+pfu_low(ji,jj)) * r1_e1e2t(ji,jj) * pdt 1601 ! WRITE(numout,*) 'pfv_ho',(pfv_ho(ji,jj)+pfv_low(ji,jj)) * r1_e1e2t(ji,jj) * pdt 1602 ! WRITE(numout,*) 'pfu_hom1',(pfu_ho(ji-1,jj)+pfu_low(ji-1,jj)) * r1_e1e2t(ji,jj) * pdt 1603 ! WRITE(numout,*) 'pfv_hom1',(pfv_ho(ji,jj-1)+pfv_low(ji,jj-1)) * r1_e1e2t(ji,jj) * pdt 1604 ! WRITE(numout,*) 'pfu_low',pfu_low(ji,jj) * r1_e1e2t(ji,jj) * pdt 1605 ! WRITE(numout,*) 'pfv_low',pfv_low(ji,jj) * r1_e1e2t(ji,jj) * pdt 1606 ! WRITE(numout,*) 'pfu_lowm1',pfu_low(ji-1,jj) * r1_e1e2t(ji,jj) * pdt 1607 ! WRITE(numout,*) 'pfv_lowm1',pfv_low(ji,jj-1) * r1_e1e2t(ji,jj) * pdt 1608 ! 1609 ! WRITE(numout,*) 'pt',pt(ji,jj) 1610 ! WRITE(numout,*) 'ptim1',pt(ji-1,jj) 1611 ! WRITE(numout,*) 'ptjm1',pt(ji,jj-1) 1612 ! WRITE(numout,*) 'pt_low',pt_low(ji,jj) 1613 ! WRITE(numout,*) 'zbetup',zbetup(ji,jj) 1614 ! WRITE(numout,*) 'zbetdo',zbetdo(ji,jj) 1615 ! WRITE(numout,*) 'zup',zup 1616 ! WRITE(numout,*) 'zdo',zdo 1617 ! ENDIF 686 1618 ! 687 zup = MAX( zbup(ji,jj), zbup(ji-1,jj ), zbup(ji+1,jj ), & ! search max/min in neighbourhood688 & zbup(ji ,jj-1), zbup(ji ,jj+1) )689 zdo = MIN( zbdo(ji,jj), zbdo(ji-1,jj ), zbdo(ji+1,jj ), &690 & zbdo(ji ,jj-1), zbdo(ji ,jj+1) )691 !692 zpos = MAX( 0., paa(ji-1,jj ,jl) ) - MIN( 0., paa(ji ,jj ,jl) ) & ! positive/negative part of the flux693 & + MAX( 0., pbb(ji ,jj-1,jl) ) - MIN( 0., pbb(ji ,jj ,jl) )694 zneg = MAX( 0., paa(ji ,jj ,jl) ) - MIN( 0., paa(ji-1,jj ,jl) ) &695 & + MAX( 0., pbb(ji ,jj ,jl) ) - MIN( 0., pbb(ji ,jj-1,jl) )696 !697 zbt = e1e2t(ji,jj) * z1_dt ! up & down beta terms698 zbetup(ji,jj,jl) = ( zup - paft(ji,jj,jl) ) / ( zpos + zsml ) * zbt699 zbetdo(ji,jj,jl) = ( paft(ji,jj,jl) - zdo ) / ( zneg + zsml ) * zbt700 1619 END DO 701 1620 END DO … … 703 1622 CALL lbc_lnk_multi( 'icedyn_adv_umx', zbetup, 'T', 1., zbetdo, 'T', 1. ) ! lateral boundary cond. (unchanged sign) 704 1623 705 DO jl = 1, ipl 706 ! monotonic flux in the i & j direction (paa & pbb) 707 ! ------------------------------------- 708 DO jj = 2, jpjm1 1624 1625 ! monotonic flux in the y direction 1626 ! --------------------------------- 1627 DO jl = 1, jpl 1628 DO jj = 1, jpjm1 709 1629 DO ji = 1, fs_jpim1 ! vector opt. 710 1630 zau = MIN( 1._wp , zbetdo(ji,jj,jl) , zbetup(ji+1,jj,jl) ) 711 1631 zbu = MIN( 1._wp , zbetup(ji,jj,jl) , zbetdo(ji+1,jj,jl) ) 712 zcu = 0.5 + SIGN( 0.5 , p aa(ji,jj,jl) )1632 zcu = 0.5 + SIGN( 0.5 , pfu_ho(ji,jj,jl) ) 713 1633 ! 714 paa(ji,jj,jl) = paa(ji,jj,jl) * ( zcu * zau + ( 1._wp - zcu) * zbu ) 715 END DO 716 END DO 717 ! 1634 zcoef = ( zcu * zau + ( 1._wp - zcu ) * zbu ) 1635 1636 pfu_ho(ji,jj,jl) = pfu_ho(ji,jj,jl) * zcoef + pfu_low(ji,jj,jl) 1637 1638 !! IF( ji==26 .AND. jj==86) THEN 1639 !! WRITE(numout,*) 'coefU',zcoef 1640 !! WRITE(numout,*) 'pfu_ho',(pfu_ho(ji,jj,jl)) * r1_e1e2t(ji,jj) * pdt 1641 !! WRITE(numout,*) 'pfu_hom1',(pfu_ho(ji-1,jj,jl)) * r1_e1e2t(ji,jj) * pdt 1642 !! ENDIF 1643 1644 END DO 1645 END DO 1646 718 1647 DO jj = 1, jpjm1 719 DO ji = fs_2, fs_jpim1 ! vector opt.1648 DO ji = 1, fs_jpim1 ! vector opt. 720 1649 zav = MIN( 1._wp , zbetdo(ji,jj,jl) , zbetup(ji,jj+1,jl) ) 721 1650 zbv = MIN( 1._wp , zbetup(ji,jj,jl) , zbetdo(ji,jj+1,jl) ) 722 zcv = 0.5 + SIGN( 0.5 , p bb(ji,jj,jl) )1651 zcv = 0.5 + SIGN( 0.5 , pfv_ho(ji,jj,jl) ) 723 1652 ! 724 pbb(ji,jj,jl) = pbb(ji,jj,jl) * ( zcv * zav + ( 1._wp - zcv) * zbv ) 725 END DO 726 END DO 1653 zcoef = ( zcv * zav + ( 1._wp - zcv ) * zbv ) 1654 1655 pfv_ho(ji,jj,jl) = pfv_ho(ji,jj,jl) * zcoef + pfv_low(ji,jj,jl) 1656 1657 !! IF( ji==26 .AND. jj==86) THEN 1658 !! WRITE(numout,*) 'coefV',zcoef 1659 !! WRITE(numout,*) 'pfv_ho',(pfv_ho(ji,jj,jl)) * r1_e1e2t(ji,jj) * pdt 1660 !! WRITE(numout,*) 'pfv_hom1',(pfv_ho(ji,jj-1,jl)) * r1_e1e2t(ji,jj) * pdt 1661 !! ENDIF 1662 END DO 1663 END DO 1664 1665 ! clem test 1666 DO jj = 2, jpjm1 1667 DO ji = 2, fs_jpim1 ! vector opt. 1668 IF( ll_gurvan ) THEN 1669 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 1670 & - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) ) * tmask(ji,jj,1) 1671 ELSE 1672 zzt(ji,jj,jl) = ( pt(ji,jj,jl) - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) ) * pdt * r1_e1e2t(ji,jj) & 1673 & - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) ) * pdt * r1_e1e2t(ji,jj) & 1674 & + pt(ji,jj,jl) * pdt * ( pu(ji,jj) - pu(ji-1,jj) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 1675 & + pt(ji,jj,jl) * pdt * ( pv(ji,jj) - pv(ji,jj-1) ) * r1_e1e2t(ji,jj) * (1.-pamsk) & 1676 & ) * tmask(ji,jj,1) 1677 ENDIF 1678 IF( zzt(ji,jj,jl) < -epsi20 ) THEN 1679 WRITE(numout,*) 'T<0 nonosc',zzt(ji,jj,jl) 1680 ENDIF 1681 END DO 1682 END DO 1683 727 1684 END DO 1685 1686 ! 728 1687 ! 729 1688 END SUBROUTINE nonosc_2d 1689 1690 SUBROUTINE limiter_x( pdt, pu, puc, pt, pfu_ho, pfu_ups ) 1691 !!--------------------------------------------------------------------- 1692 !! *** ROUTINE limiter_x *** 1693 !! 1694 !! ** Purpose : compute flux limiter 1695 !!---------------------------------------------------------------------- 1696 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 1697 REAL(wp), DIMENSION (:,: ), INTENT(in ) :: pu ! ice i-velocity => u*e2 1698 REAL(wp), DIMENSION (:,:,:), INTENT(in ) :: puc ! ice i-velocity *A => u*e2*a 1699 REAL(wp), DIMENSION (:,:,:), INTENT(in ) :: pt ! ice tracer 1700 REAL(wp), DIMENSION (:,:,:), INTENT(inout) :: pfu_ho ! high order flux 1701 REAL(wp), DIMENSION (:,:,:), INTENT(in ), OPTIONAL :: pfu_ups ! upstream flux 1702 ! 1703 REAL(wp) :: Cr, Rjm, Rj, Rjp, uCFL, zpsi, zh3, zlimiter, Rr 1704 INTEGER :: ji, jj, jl ! dummy loop indices 1705 REAL(wp), DIMENSION (jpi,jpj,jpl) :: zslpx ! tracer slopes 1706 !!---------------------------------------------------------------------- 1707 ! 1708 DO jl = 1, jpl 1709 DO jj = 2, jpjm1 1710 DO ji = fs_2, fs_jpim1 ! vector opt. 1711 zslpx(ji,jj,jl) = ( pt(ji+1,jj,jl) - pt(ji,jj,jl) ) * umask(ji,jj,1) 1712 END DO 1713 END DO 1714 END DO 1715 CALL lbc_lnk( 'icedyn_adv_umx', zslpx, 'U', -1.) ! lateral boundary cond. 1716 1717 DO jl = 1, jpl 1718 DO jj = 2, jpjm1 1719 DO ji = fs_2, fs_jpim1 ! vector opt. 1720 uCFL = pdt * ABS( pu(ji,jj) ) * r1_e1e2t(ji,jj) 1721 1722 Rjm = zslpx(ji-1,jj,jl) 1723 Rj = zslpx(ji ,jj,jl) 1724 Rjp = zslpx(ji+1,jj,jl) 1725 1726 IF( PRESENT(pfu_ups) ) THEN 1727 1728 IF( pu(ji,jj) > 0. ) THEN ; Rr = Rjm 1729 ELSE ; Rr = Rjp 1730 ENDIF 1731 1732 zh3 = pfu_ho(ji,jj,jl) - pfu_ups(ji,jj,jl) 1733 IF( Rj > 0. ) THEN 1734 zlimiter = MAX( 0., MIN( zh3, MAX(-Rr * 0.5 * ABS(pu(ji,jj)), & 1735 & MIN( 2. * Rr * 0.5 * ABS(pu(ji,jj)), zh3, 1.5 * Rj * 0.5 * ABS(pu(ji,jj)) ) ) ) ) 1736 ELSE 1737 zlimiter = -MAX( 0., MIN(-zh3, MAX( Rr * 0.5 * ABS(pu(ji,jj)), & 1738 & MIN(-2. * Rr * 0.5 * ABS(pu(ji,jj)), -zh3, -1.5 * Rj * 0.5 * ABS(pu(ji,jj)) ) ) ) ) 1739 ENDIF 1740 pfu_ho(ji,jj,jl) = pfu_ups(ji,jj,jl) + zlimiter 1741 1742 ELSE 1743 IF( Rj /= 0. ) THEN 1744 IF( pu(ji,jj) > 0. ) THEN ; Cr = Rjm / Rj 1745 ELSE ; Cr = Rjp / Rj 1746 ENDIF 1747 ELSE 1748 Cr = 0. 1749 !IF( pu(ji,jj) > 0. ) THEN ; Cr = Rjm * 1.e20 1750 !ELSE ; Cr = Rjp * 1.e20 1751 !ENDIF 1752 ENDIF 1753 1754 ! -- superbee -- 1755 zpsi = MAX( 0., MAX( MIN(1.,2.*Cr), MIN(2.,Cr) ) ) 1756 ! -- van albada 2 -- 1757 !!zpsi = 2.*Cr / (Cr*Cr+1.) 1758 1759 ! -- sweby (with beta=1) -- 1760 !!zpsi = MAX( 0., MAX( MIN(1.,1.*Cr), MIN(1.,Cr) ) ) 1761 ! -- van Leer -- 1762 !!zpsi = ( Cr + ABS(Cr) ) / ( 1. + ABS(Cr) ) 1763 ! -- ospre -- 1764 !!zpsi = 1.5 * ( Cr*Cr + Cr ) / ( Cr*Cr + Cr + 1. ) 1765 ! -- koren -- 1766 !!zpsi = MAX( 0., MIN( 2.*Cr, MIN( (1.+2*Cr)/3., 2. ) ) ) 1767 ! -- charm -- 1768 !IF( Cr > 0. ) THEN ; zpsi = Cr * (3.*Cr + 1.) / ( (Cr + 1.) * (Cr + 1.) ) 1769 !ELSE ; zpsi = 0. 1770 !ENDIF 1771 ! -- van albada 1 -- 1772 !!zpsi = (Cr*Cr + Cr) / (Cr*Cr +1) 1773 ! -- smart -- 1774 !!zpsi = MAX( 0., MIN( 2.*Cr, MIN( 0.25+0.75*Cr, 4. ) ) ) 1775 ! -- umist -- 1776 !!zpsi = MAX( 0., MIN( 2.*Cr, MIN( 0.25+0.75*Cr, MIN(0.75+0.25*Cr, 2. ) ) ) ) 1777 1778 ! high order flux corrected by the limiter 1779 pfu_ho(ji,jj,jl) = pfu_ho(ji,jj,jl) - ABS( pu(ji,jj) ) * ( (1.-zpsi) + uCFL*zpsi ) * Rj * 0.5 1780 1781 ENDIF 1782 END DO 1783 END DO 1784 END DO 1785 CALL lbc_lnk( 'icedyn_adv_umx', pfu_ho, 'U', -1.) ! lateral boundary cond. 1786 ! 1787 END SUBROUTINE limiter_x 1788 1789 SUBROUTINE limiter_y( pdt, pv, pvc, pt, pfv_ho, pfv_ups ) 1790 !!--------------------------------------------------------------------- 1791 !! *** ROUTINE limiter_y *** 1792 !! 1793 !! ** Purpose : compute flux limiter 1794 !!---------------------------------------------------------------------- 1795 REAL(wp) , INTENT(in ) :: pdt ! tracer time-step 1796 REAL(wp), DIMENSION (:,: ), INTENT(in ) :: pv ! ice i-velocity => u*e2 1797 REAL(wp), DIMENSION (:,:,:), INTENT(in ) :: pvc ! ice i-velocity *A => u*e2*a 1798 REAL(wp), DIMENSION (:,:,:), INTENT(in ) :: pt ! ice tracer 1799 REAL(wp), DIMENSION (:,:,:), INTENT(inout) :: pfv_ho ! high order flux 1800 REAL(wp), DIMENSION (:,:,:), INTENT(in ), OPTIONAL :: pfv_ups ! upstream flux 1801 ! 1802 REAL(wp) :: Cr, Rjm, Rj, Rjp, vCFL, zpsi, zh3, zlimiter, Rr 1803 INTEGER :: ji, jj, jl ! dummy loop indices 1804 REAL(wp), DIMENSION (jpi,jpj,jpl) :: zslpy ! tracer slopes 1805 !!---------------------------------------------------------------------- 1806 ! 1807 DO jl = 1, jpl 1808 DO jj = 2, jpjm1 1809 DO ji = fs_2, fs_jpim1 ! vector opt. 1810 zslpy(ji,jj,jl) = ( pt(ji,jj+1,jl) - pt(ji,jj,jl) ) * vmask(ji,jj,1) 1811 END DO 1812 END DO 1813 END DO 1814 CALL lbc_lnk( 'icedyn_adv_umx', zslpy, 'V', -1.) ! lateral boundary cond. 1815 1816 DO jl = 1, jpl 1817 DO jj = 2, jpjm1 1818 DO ji = fs_2, fs_jpim1 ! vector opt. 1819 vCFL = pdt * ABS( pv(ji,jj) ) * r1_e1e2t(ji,jj) 1820 1821 Rjm = zslpy(ji,jj-1,jl) 1822 Rj = zslpy(ji,jj ,jl) 1823 Rjp = zslpy(ji,jj+1,jl) 1824 1825 IF( PRESENT(pfv_ups) ) THEN 1826 1827 IF( pv(ji,jj) > 0. ) THEN ; Rr = Rjm 1828 ELSE ; Rr = Rjp 1829 ENDIF 1830 1831 zh3 = pfv_ho(ji,jj,jl) - pfv_ups(ji,jj,jl) 1832 IF( Rj > 0. ) THEN 1833 zlimiter = MAX( 0., MIN( zh3, MAX(-Rr * 0.5 * ABS(pv(ji,jj)), & 1834 & MIN( 2. * Rr * 0.5 * ABS(pv(ji,jj)), zh3, 1.5 * Rj * 0.5 * ABS(pv(ji,jj)) ) ) ) ) 1835 ELSE 1836 zlimiter = -MAX( 0., MIN(-zh3, MAX( Rr * 0.5 * ABS(pv(ji,jj)), & 1837 & MIN(-2. * Rr * 0.5 * ABS(pv(ji,jj)), -zh3, -1.5 * Rj * 0.5 * ABS(pv(ji,jj)) ) ) ) ) 1838 ENDIF 1839 pfv_ho(ji,jj,jl) = pfv_ups(ji,jj,jl) + zlimiter 1840 1841 ELSE 1842 1843 IF( Rj /= 0. ) THEN 1844 IF( pv(ji,jj) > 0. ) THEN ; Cr = Rjm / Rj 1845 ELSE ; Cr = Rjp / Rj 1846 ENDIF 1847 ELSE 1848 Cr = 0. 1849 !IF( pv(ji,jj) > 0. ) THEN ; Cr = Rjm * 1.e20 1850 !ELSE ; Cr = Rjp * 1.e20 1851 !ENDIF 1852 ENDIF 1853 1854 ! -- superbee -- 1855 zpsi = MAX( 0., MAX( MIN(1.,2.*Cr), MIN(2.,Cr) ) ) 1856 ! -- van albada 2 -- 1857 !!zpsi = 2.*Cr / (Cr*Cr+1.) 1858 1859 ! -- sweby (with beta=1) -- 1860 !!zpsi = MAX( 0., MAX( MIN(1.,1.*Cr), MIN(1.,Cr) ) ) 1861 ! -- van Leer -- 1862 !!zpsi = ( Cr + ABS(Cr) ) / ( 1. + ABS(Cr) ) 1863 ! -- ospre -- 1864 !!zpsi = 1.5 * ( Cr*Cr + Cr ) / ( Cr*Cr + Cr + 1. ) 1865 ! -- koren -- 1866 !!zpsi = MAX( 0., MIN( 2.*Cr, MIN( (1.+2*Cr)/3., 2. ) ) ) 1867 ! -- charm -- 1868 !IF( Cr > 0. ) THEN ; zpsi = Cr * (3.*Cr + 1.) / ( (Cr + 1.) * (Cr + 1.) ) 1869 !ELSE ; zpsi = 0. 1870 !ENDIF 1871 ! -- van albada 1 -- 1872 !!zpsi = (Cr*Cr + Cr) / (Cr*Cr +1) 1873 ! -- smart -- 1874 !!zpsi = MAX( 0., MIN( 2.*Cr, MIN( 0.25+0.75*Cr, 4. ) ) ) 1875 ! -- umist -- 1876 !!zpsi = MAX( 0., MIN( 2.*Cr, MIN( 0.25+0.75*Cr, MIN(0.75+0.25*Cr, 2. ) ) ) ) 1877 1878 ! high order flux corrected by the limiter 1879 pfv_ho(ji,jj,jl) = pfv_ho(ji,jj,jl) - ABS( pv(ji,jj) ) * ( (1.-zpsi) + vCFL*zpsi ) * Rj * 0.5 1880 1881 ENDIF 1882 END DO 1883 END DO 1884 END DO 1885 CALL lbc_lnk( 'icedyn_adv_umx', pfv_ho, 'V', -1.) ! lateral boundary cond. 1886 ! 1887 END SUBROUTINE limiter_y 730 1888 731 1889 #else -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rdgrft.F90
r10402 r10419 39 39 40 40 ! Variables shared among ridging subroutines 41 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) :: closing_net ! net rate at which area is removed (1/s)42 ! ! (ridging ice area - area of new ridges) / dt43 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) :: opning! rate of opening due to divergence/shear44 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) :: closing_gross! rate at which area removed, not counting area of new ridges45 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: apartf! participation function; fraction of ridging/closing associated w/ category n46 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: hrmin! minimum ridge thickness47 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: hrmax! maximum ridge thickness48 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: hraft! thickness of rafted ice49 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: hi_hrdg! thickness of ridging ice / mean ridge thickness50 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: aridge! participating ice ridging51 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: araft! participating ice rafting41 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) :: closing_net ! net rate at which area is removed (1/s) 42 ! ! (ridging ice area - area of new ridges) / dt 43 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) :: opning ! rate of opening due to divergence/shear 44 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) :: closing_gross ! rate at which area removed, not counting area of new ridges 45 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: apartf ! participation function; fraction of ridging/closing associated w/ category n 46 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: hrmin ! minimum ridge thickness 47 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: hrmax ! maximum ridge thickness 48 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: hraft ! thickness of rafted ice 49 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: hi_hrdg ! thickness of ridging ice / mean ridge thickness 50 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: aridge ! participating ice ridging 51 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: araft ! participating ice rafting 52 52 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ze_i_2d 53 53 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ze_s_2d … … 59 59 LOGICAL :: ln_str_H79 ! ice strength parameterization (Hibler79) 60 60 REAL(wp) :: rn_pstar ! determines ice strength, Hibler JPO79 61 REAL(wp) :: rn_crhg ! determines changes in ice strength62 61 REAL(wp) :: rn_csrdg ! fraction of shearing energy contributing to ridging 63 62 LOGICAL :: ln_partf_lin ! participation function linear (Thorndike et al. (1975)) … … 79 78 !! NEMO/ICE 4.0 , NEMO Consortium (2018) 80 79 !! $Id$ 81 !! Software governed by the CeCILL licen se (see./LICENSE)80 !! Software governed by the CeCILL licence (./LICENSE) 82 81 !!---------------------------------------------------------------------- 83 82 CONTAINS … … 193 192 ! divergence given by the advection scheme 194 193 ! (which may not be equal to divu as computed from the velocity field) 195 zdivu_adv(ji) = ( 1._wp - ato_i_1d(ji) - SUM( a_i_2d(ji,:) ) ) * r1_rdtice 194 IF ( ln_adv_Pra ) THEN 195 zdivu_adv(ji) = ( 1._wp - ato_i_1d(ji) - SUM( a_i_2d(ji,:) ) ) * r1_rdtice 196 ELSEIF( ln_adv_UMx ) THEN 197 zdivu_adv(ji) = zdivu(ji) 198 ENDIF 196 199 ! 197 200 IF( zdivu_adv(ji) < 0._wp ) closing_net(ji) = MAX( closing_net(ji), -zdivu_adv(ji) ) ! make sure the closing rate is large enough -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rhg.F90
r10069 r10419 43 43 !! NEMO/ICE 4.0 , NEMO Consortium (2018) 44 44 !! $Id$ 45 !! Software governed by the CeCILL licen se (see./LICENSE)45 !! Software governed by the CeCILL licence (./LICENSE) 46 46 !!---------------------------------------------------------------------- 47 47 CONTAINS -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rhg_evp.F90
r10402 r10419 119 119 REAL(wp) :: ecc2, z1_ecc2 ! square of yield ellipse eccenticity 120 120 REAL(wp) :: zalph1, z1_alph1, zalph2, z1_alph2 ! alpha coef from Bouillon 2009 or Kimmritz 2017 121 REAL(wp) :: zm1, zm2, zm3, zmassU, zmassV ! ice/snow mass121 REAL(wp) :: zm1, zm2, zm3, zmassU, zmassV, zvU, zvV ! ice/snow mass and volume 122 122 REAL(wp) :: zdelta, zp_delf, zds2, zdt, zdt2, zdiv, zdiv2 ! temporary scalars 123 123 REAL(wp) :: zTauO, zTauB, zTauE, zvel ! temporary scalars 124 REAL(wp) :: zkt ! isotropic tensile strength for landfast ice 125 REAL(wp) :: zvCr ! critical ice volume above which ice is landfast 124 126 ! 125 127 REAL(wp) :: zresm ! Maximal error on ice velocity … … 137 139 REAL(wp), DIMENSION(jpi,jpj) :: zmf ! coriolis parameter at T points 138 140 REAL(wp), DIMENSION(jpi,jpj) :: zTauU_ia , ztauV_ia ! ice-atm. stress at U-V points 141 REAL(wp), DIMENSION(jpi,jpj) :: zTauU_ib , ztauV_ib ! ice-bottom stress at U-V points (landfast param) 139 142 REAL(wp), DIMENSION(jpi,jpj) :: zspgU , zspgV ! surface pressure gradient at U/V points 140 143 REAL(wp), DIMENSION(jpi,jpj) :: v_oceU, u_oceV, v_iceU, u_iceV ! ocean/ice u/v component on V/U points … … 144 147 REAL(wp), DIMENSION(jpi,jpj) :: zs1, zs2, zs12 ! stress tensor components 145 148 !!$ REAL(wp), DIMENSION(jpi,jpj) :: zu_ice, zv_ice, zresr ! check convergence 146 REAL(wp), DIMENSION(jpi,jpj) :: zssh _lead_m! array used for the calculation of ice surface slope:149 REAL(wp), DIMENSION(jpi,jpj) :: zsshdyn ! array used for the calculation of ice surface slope: 147 150 ! ! ocean surface (ssh_m) if ice is not embedded 148 ! ! ice topsurface if ice is embedded151 ! ! ice bottom surface if ice is embedded 149 152 REAL(wp), DIMENSION(jpi,jpj) :: zCorx, zCory ! Coriolis stress array 150 153 REAL(wp), DIMENSION(jpi,jpj) :: ztaux_oi, ztauy_oi ! Ocean-to-ice stress array … … 256 259 END DO 257 260 END DO 258 261 262 ! landfast param from Lemieux(2016): add isotropic tensile strength (following Konig Beatty and Holland, 2010) 263 IF( ln_landfast_L16 .OR. ln_landfast_home ) THEN ; zkt = rn_tensile 264 ELSE ; zkt = 0._wp 265 ENDIF 259 266 ! 260 267 !------------------------------------------------------------------------------! 261 268 ! 2) Wind / ocean stress, mass terms, coriolis terms 262 269 !------------------------------------------------------------------------------! 263 264 ! == embedded sea ice: compute representative ice top surface ==!265 ! == non-embedded sea ice: use ocean surface for slope calculation ==!266 zssh _lead_m(:,:) = ice_var_sshdyn( ssh_m, snwice_mass, snwice_mass_b)270 ! sea surface height 271 ! embedded sea ice: compute representative ice top surface 272 ! non-embedded sea ice: use ocean surface for slope calculation 273 zsshdyn(:,:) = ice_var_sshdyn( ssh_m, snwice_mass, snwice_mass_b) 267 274 268 275 DO jj = 2, jpjm1 … … 302 309 303 310 ! Surface pressure gradient (- m*g*GRAD(ssh)) at U-V points 304 zspgU(ji,jj) = - zmassU * grav * ( zssh _lead_m(ji+1,jj) - zssh_lead_m(ji,jj) ) * r1_e1u(ji,jj)305 zspgV(ji,jj) = - zmassV * grav * ( zssh _lead_m(ji,jj+1) - zssh_lead_m(ji,jj) ) * r1_e2v(ji,jj)311 zspgU(ji,jj) = - zmassU * grav * ( zsshdyn(ji+1,jj) - zsshdyn(ji,jj) ) * r1_e1u(ji,jj) 312 zspgV(ji,jj) = - zmassV * grav * ( zsshdyn(ji,jj+1) - zsshdyn(ji,jj) ) * r1_e2v(ji,jj) 306 313 307 314 ! masks … … 317 324 CALL lbc_lnk_multi( 'icedyn_rhg_evp', zmf, 'T', 1., zdt_m, 'T', 1. ) 318 325 ! 326 ! !== Landfast ice parameterization ==! 327 ! 328 IF( ln_landfast_L16 ) THEN !-- Lemieux 2016 329 DO jj = 2, jpjm1 330 DO ji = fs_2, fs_jpim1 331 ! ice thickness at U-V points 332 zvU = 0.5_wp * ( vt_i(ji,jj) * e1e2t(ji,jj) + vt_i(ji+1,jj) * e1e2t(ji+1,jj) ) * r1_e1e2u(ji,jj) * umask(ji,jj,1) 333 zvV = 0.5_wp * ( vt_i(ji,jj) * e1e2t(ji,jj) + vt_i(ji,jj+1) * e1e2t(ji,jj+1) ) * r1_e1e2v(ji,jj) * vmask(ji,jj,1) 334 ! ice-bottom stress at U points 335 zvCr = zaU(ji,jj) * rn_depfra * hu_n(ji,jj) 336 zTauU_ib(ji,jj) = rn_icebfr * MAX( 0._wp, zvU - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaU(ji,jj) ) ) 337 ! ice-bottom stress at V points 338 zvCr = zaV(ji,jj) * rn_depfra * hv_n(ji,jj) 339 zTauV_ib(ji,jj) = rn_icebfr * MAX( 0._wp, zvV - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaV(ji,jj) ) ) 340 ! ice_bottom stress at T points 341 zvCr = at_i(ji,jj) * rn_depfra * ht_n(ji,jj) 342 tau_icebfr(ji,jj) = rn_icebfr * MAX( 0._wp, vt_i(ji,jj) - zvCr ) * EXP( -rn_crhg * ( 1._wp - at_i(ji,jj) ) ) 343 END DO 344 END DO 345 CALL lbc_lnk( 'icedyn_rhg_evp', tau_icebfr(:,:), 'T', 1. ) 346 ! 347 ELSEIF( ln_landfast_home ) THEN !-- Home made 348 DO jj = 2, jpjm1 349 DO ji = fs_2, fs_jpim1 350 zTauU_ib(ji,jj) = tau_icebfr(ji,jj) 351 zTauV_ib(ji,jj) = tau_icebfr(ji,jj) 352 END DO 353 END DO 354 ! 355 ELSE !-- no landfast 356 DO jj = 2, jpjm1 357 DO ji = fs_2, fs_jpim1 358 zTauU_ib(ji,jj) = 0._wp 359 zTauV_ib(ji,jj) = 0._wp 360 END DO 361 END DO 362 ENDIF 363 IF( iom_use('tau_icebfr') ) CALL iom_put( 'tau_icebfr', tau_icebfr(:,:) ) 364 319 365 !------------------------------------------------------------------------------! 320 366 ! 3) Solution of the momentum equation, iterative procedure … … 382 428 ENDIF 383 429 384 ! stress at T points 385 zs1(ji,jj) = ( zs1(ji,jj) * zalph1 + zp_delt(ji,jj) * ( zdiv - zdelta) ) * z1_alph1386 zs2(ji,jj) = ( zs2(ji,jj) * zalph2 + zp_delt(ji,jj) * ( zdt * z1_ecc2 ) ) * z1_alph2430 ! stress at T points (zkt/=0 if landfast) 431 zs1(ji,jj) = ( zs1(ji,jj) * zalph1 + zp_delt(ji,jj) * ( zdiv * (1._wp + zkt) - zdelta * (1._wp - zkt) ) ) * z1_alph1 432 zs2(ji,jj) = ( zs2(ji,jj) * zalph2 + zp_delt(ji,jj) * ( zdt * z1_ecc2 * (1._wp + zkt) ) ) * z1_alph2 387 433 388 434 END DO … … 403 449 zp_delf = 0.25_wp * ( zp_delt(ji,jj) + zp_delt(ji+1,jj) + zp_delt(ji,jj+1) + zp_delt(ji+1,jj+1) ) 404 450 405 ! stress at F points 406 zs12(ji,jj)= ( zs12(ji,jj) * zalph2 + zp_delf * ( zds(ji,jj) * z1_ecc2 ) * 0.5_wp ) * z1_alph2451 ! stress at F points (zkt/=0 if landfast) 452 zs12(ji,jj)= ( zs12(ji,jj) * zalph2 + zp_delf * ( zds(ji,jj) * z1_ecc2 * (1._wp + zkt) ) * 0.5_wp ) * z1_alph2 407 453 408 454 END DO … … 452 498 ! 453 499 ! !--- tau_bottom/v_ice 454 zvel = MAX( zepsi, SQRT( v_ice(ji,jj) * v_ice(ji,jj) + u_iceV(ji,jj) * u_iceV(ji,jj)) )455 zTauB = - tau_icebfr(ji,jj) / zvel500 zvel = 5.e-05_wp + SQRT( v_ice(ji,jj) * v_ice(ji,jj) + u_iceV(ji,jj) * u_iceV(ji,jj) ) 501 zTauB = - zTauV_ib(ji,jj) / zvel 456 502 ! 457 503 ! !--- Coriolis at V-points (energy conserving formulation) … … 464 510 ! 465 511 ! !--- landfast switch => 0 = static friction ; 1 = sliding friction 466 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - tau_icebfr(ji,jj) ) - SIGN( 1._wp, zTauE ) ) )512 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - zTauV_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 467 513 ! 468 514 IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) … … 500 546 ! 501 547 ! !--- tau_bottom/u_ice 502 zvel = MAX( zepsi, SQRT( v_iceU(ji,jj) * v_iceU(ji,jj) + u_ice(ji,jj) * u_ice(ji,jj)) )503 zTauB = - tau_icebfr(ji,jj) / zvel548 zvel = 5.e-05_wp + SQRT( v_iceU(ji,jj) * v_iceU(ji,jj) + u_ice(ji,jj) * u_ice(ji,jj) ) 549 zTauB = - zTauU_ib(ji,jj) / zvel 504 550 ! 505 551 ! !--- Coriolis at U-points (energy conserving formulation) … … 512 558 ! 513 559 ! !--- landfast switch => 0 = static friction ; 1 = sliding friction 514 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - tau_icebfr(ji,jj) ) - SIGN( 1._wp, zTauE ) ) )560 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - zTauU_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 515 561 ! 516 562 IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) … … 550 596 ! 551 597 ! !--- tau_bottom/u_ice 552 zvel = MAX( zepsi, SQRT( v_iceU(ji,jj) * v_iceU(ji,jj) + u_ice(ji,jj) * u_ice(ji,jj)) )553 zTauB = - tau_icebfr(ji,jj) / zvel598 zvel = 5.e-05_wp + SQRT( v_iceU(ji,jj) * v_iceU(ji,jj) + u_ice(ji,jj) * u_ice(ji,jj) ) 599 zTauB = - zTauU_ib(ji,jj) / zvel 554 600 ! 555 601 ! !--- Coriolis at U-points (energy conserving formulation) … … 562 608 ! 563 609 ! !--- landfast switch => 0 = static friction ; 1 = sliding friction 564 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - tau_icebfr(ji,jj) ) - SIGN( 1._wp, zTauE ) ) )610 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - zTauU_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 565 611 ! 566 612 IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) … … 598 644 ! 599 645 ! !--- tau_bottom/v_ice 600 zvel = MAX( zepsi, SQRT( v_ice(ji,jj) * v_ice(ji,jj) + u_iceV(ji,jj) * u_iceV(ji,jj)) )601 z tauB = - tau_icebfr(ji,jj) / zvel646 zvel = 5.e-05_wp + SQRT( v_ice(ji,jj) * v_ice(ji,jj) + u_iceV(ji,jj) * u_iceV(ji,jj) ) 647 zTauB = - zTauV_ib(ji,jj) / zvel 602 648 ! 603 649 ! !--- Coriolis at v-points (energy conserving formulation) … … 610 656 ! 611 657 ! !--- landfast switch => 0 = static friction ; 1 = sliding friction 612 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, zTauE - tau_icebfr(ji,jj) ) - SIGN( 1._wp, zTauE ) ) )658 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, zTauE - zTauV_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 613 659 ! 614 660 IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/iceistate.F90
r10358 r10419 64 64 !! NEMO/ICE 4.0 , NEMO Consortium (2018) 65 65 !! $Id$ 66 !! Software governed by the CeCILL licen se (see ./LICENSE)66 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 67 67 !!---------------------------------------------------------------------- 68 68 CONTAINS … … 174 174 ! then we check whether the distribution fullfills 175 175 ! volume and area conservation, positivity and ice categories bounds 176 zh_i_ini(:,:,:) = 0._wp 177 za_i_ini(:,:,:) = 0._wp 178 ! 179 DO jj = 1, jpj 180 DO ji = 1, jpi 181 ! 182 IF( zat_i_ini(ji,jj) > 0._wp .AND. zht_i_ini(ji,jj) > 0._wp )THEN 183 184 ! find which category (jl0) the input ice thickness falls into 185 jl0 = jpl 186 DO jl = 1, jpl 187 IF ( ( zht_i_ini(ji,jj) > hi_max(jl-1) ) .AND. ( zht_i_ini(ji,jj) <= hi_max(jl) ) ) THEN 188 jl0 = jl 189 CYCLE 190 ENDIF 191 END DO 176 177 IF( jpl == 1 ) THEN 178 ! 179 zh_i_ini(:,:,1) = zht_i_ini(:,:) 180 za_i_ini(:,:,1) = zat_i_ini(:,:) 181 ! 182 ELSE 183 zh_i_ini(:,:,:) = 0._wp 184 za_i_ini(:,:,:) = 0._wp 185 ! 186 DO jj = 1, jpj 187 DO ji = 1, jpi 192 188 ! 193 itest(:) = 0 194 i_fill = jpl + 1 !------------------------------------ 195 DO WHILE ( ( SUM( itest(:) ) /= 4 ) .AND. ( i_fill >= 2 ) ) ! iterative loop on i_fill categories 196 ! !------------------------------------ 197 i_fill = i_fill - 1 189 IF( zat_i_ini(ji,jj) > 0._wp .AND. zht_i_ini(ji,jj) > 0._wp )THEN 190 191 ! find which category (jl0) the input ice thickness falls into 192 jl0 = jpl 193 DO jl = 1, jpl 194 IF ( ( zht_i_ini(ji,jj) > hi_max(jl-1) ) .AND. ( zht_i_ini(ji,jj) <= hi_max(jl) ) ) THEN 195 jl0 = jl 196 CYCLE 197 ENDIF 198 END DO 198 199 ! 199 zh_i_ini(ji,jj,:) = 0._wp200 za_i_ini(ji,jj,:) = 0._wp201 200 itest(:) = 0 202 ! 203 IF ( i_fill == 1 ) THEN !-- case very thin ice: fill only category 1 204 zh_i_ini(ji,jj,1) = zht_i_ini(ji,jj) 205 za_i_ini(ji,jj,1) = zat_i_ini(ji,jj) 206 ELSE !-- case ice is thicker: fill categories >1 207 ! thickness 208 DO jl = 1, i_fill-1 209 zh_i_ini(ji,jj,jl) = hi_mean(jl) 210 END DO 201 i_fill = jpl + 1 !------------------------------------ 202 DO WHILE ( ( SUM( itest(:) ) /= 4 ) .AND. ( i_fill >= 2 ) ) ! iterative loop on i_fill categories 203 ! !------------------------------------ 204 i_fill = i_fill - 1 211 205 ! 212 ! concentration 213 za_i_ini(ji,jj,jl0) = zat_i_ini(ji,jj) / SQRT(REAL(jpl)) 214 DO jl = 1, i_fill - 1 215 IF( jl /= jl0 )THEN 216 zarg = ( zh_i_ini(ji,jj,jl) - zht_i_ini(ji,jj) ) / ( 0.5_wp * zht_i_ini(ji,jj) ) 217 za_i_ini(ji,jj,jl) = za_i_ini(ji,jj,jl0) * EXP(-zarg**2) 206 zh_i_ini(ji,jj,:) = 0._wp 207 za_i_ini(ji,jj,:) = 0._wp 208 itest(:) = 0 209 ! 210 IF ( i_fill == 1 ) THEN !-- case very thin ice: fill only category 1 211 zh_i_ini(ji,jj,1) = zht_i_ini(ji,jj) 212 za_i_ini(ji,jj,1) = zat_i_ini(ji,jj) 213 ELSE !-- case ice is thicker: fill categories >1 214 ! thickness 215 DO jl = 1, i_fill-1 216 zh_i_ini(ji,jj,jl) = hi_mean(jl) 217 END DO 218 ! 219 ! concentration 220 za_i_ini(ji,jj,jl0) = zat_i_ini(ji,jj) / SQRT(REAL(jpl)) 221 DO jl = 1, i_fill - 1 222 IF( jl /= jl0 )THEN 223 zarg = ( zh_i_ini(ji,jj,jl) - zht_i_ini(ji,jj) ) / ( 0.5_wp * zht_i_ini(ji,jj) ) 224 za_i_ini(ji,jj,jl) = za_i_ini(ji,jj,jl0) * EXP(-zarg**2) 225 ENDIF 226 END DO 227 228 ! last category 229 za_i_ini(ji,jj,i_fill) = zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:i_fill-1) ) 230 zV = SUM( za_i_ini(ji,jj,1:i_fill-1) * zh_i_ini(ji,jj,1:i_fill-1) ) 231 zh_i_ini(ji,jj,i_fill) = ( zvt_i_ini(ji,jj) - zV ) / MAX( za_i_ini(ji,jj,i_fill), epsi10 ) 232 233 ! correction if concentration of upper cat is greater than lower cat 234 ! (it should be a gaussian around jl0 but sometimes it is not) 235 IF ( jl0 /= jpl ) THEN 236 DO jl = jpl, jl0+1, -1 237 IF ( za_i_ini(ji,jj,jl) > za_i_ini(ji,jj,jl-1) ) THEN 238 zdv = zh_i_ini(ji,jj,jl) * za_i_ini(ji,jj,jl) 239 zh_i_ini(ji,jj,jl ) = 0._wp 240 za_i_ini(ji,jj,jl ) = 0._wp 241 za_i_ini(ji,jj,1:jl-1) = za_i_ini(ji,jj,1:jl-1) & 242 & + zdv / MAX( REAL(jl-1) * zht_i_ini(ji,jj), epsi10 ) 243 END IF 244 ENDDO 218 245 ENDIF 219 END DO 220 221 ! last category 222 za_i_ini(ji,jj,i_fill) = zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:i_fill-1) ) 223 zV = SUM( za_i_ini(ji,jj,1:i_fill-1) * zh_i_ini(ji,jj,1:i_fill-1) ) 224 zh_i_ini(ji,jj,i_fill) = ( zvt_i_ini(ji,jj) - zV ) / MAX( za_i_ini(ji,jj,i_fill), epsi10 ) 225 226 ! correction if concentration of upper cat is greater than lower cat 227 ! (it should be a gaussian around jl0 but sometimes it is not) 228 IF ( jl0 /= jpl ) THEN 229 DO jl = jpl, jl0+1, -1 230 IF ( za_i_ini(ji,jj,jl) > za_i_ini(ji,jj,jl-1) ) THEN 231 zdv = zh_i_ini(ji,jj,jl) * za_i_ini(ji,jj,jl) 232 zh_i_ini(ji,jj,jl ) = 0._wp 233 za_i_ini(ji,jj,jl ) = 0._wp 234 za_i_ini(ji,jj,1:jl-1) = za_i_ini(ji,jj,1:jl-1) & 235 & + zdv / MAX( REAL(jl-1) * zht_i_ini(ji,jj), epsi10 ) 236 END IF 237 ENDDO 246 ! 238 247 ENDIF 239 248 ! 249 ! Compatibility tests 250 zconv = ABS( zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:jpl) ) ) ! Test 1: area conservation 251 IF ( zconv < epsi06 ) itest(1) = 1 252 ! 253 zconv = ABS( zat_i_ini(ji,jj) * zht_i_ini(ji,jj) & ! Test 2: volume conservation 254 & - SUM( za_i_ini (ji,jj,1:jpl) * zh_i_ini (ji,jj,1:jpl) ) ) 255 IF ( zconv < epsi06 ) itest(2) = 1 256 ! 257 IF ( zh_i_ini(ji,jj,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 ! Test 3: thickness of the last category is in-bounds ? 258 ! 259 itest(4) = 1 260 DO jl = 1, i_fill 261 IF ( za_i_ini(ji,jj,jl) < 0._wp ) itest(4) = 0 ! Test 4: positivity of ice concentrations 262 END DO 263 ! !---------------------------- 264 END DO ! end iteration on categories 265 ! !---------------------------- 266 IF( lwp .AND. SUM(itest) /= 4 ) THEN 267 WRITE(numout,*) 268 WRITE(numout,*) ' !!!! ALERT itest is not equal to 4 !!! ' 269 WRITE(numout,*) ' !!!! Something is wrong in the SI3 initialization procedure ' 270 WRITE(numout,*) 271 WRITE(numout,*) ' *** itest_i (i=1,4) = ', itest(:) 272 WRITE(numout,*) ' zat_i_ini : ', zat_i_ini(ji,jj) 273 WRITE(numout,*) ' zht_i_ini : ', zht_i_ini(ji,jj) 240 274 ENDIF 241 275 ! 242 ! Compatibility tests243 zconv = ABS( zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:jpl) ) ) ! Test 1: area conservation244 IF ( zconv < epsi06 ) itest(1) = 1245 !246 zconv = ABS( zat_i_ini(ji,jj) * zht_i_ini(ji,jj) & ! Test 2: volume conservation247 & - SUM( za_i_ini (ji,jj,1:jpl) * zh_i_ini (ji,jj,1:jpl) ) )248 IF ( zconv < epsi06 ) itest(2) = 1249 !250 IF ( zh_i_ini(ji,jj,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 ! Test 3: thickness of the last category is in-bounds ?251 !252 itest(4) = 1253 DO jl = 1, i_fill254 IF ( za_i_ini(ji,jj,jl) < 0._wp ) itest(4) = 0 ! Test 4: positivity of ice concentrations255 END DO256 ! !----------------------------257 END DO ! end iteration on categories258 ! !----------------------------259 IF( lwp .AND. SUM(itest) /= 4 ) THEN260 WRITE(numout,*)261 WRITE(numout,*) ' !!!! ALERT itest is not equal to 4 !!! '262 WRITE(numout,*) ' !!!! Something is wrong in the SI3 initialization procedure '263 WRITE(numout,*)264 WRITE(numout,*) ' *** itest_i (i=1,4) = ', itest(:)265 WRITE(numout,*) ' zat_i_ini : ', zat_i_ini(ji,jj)266 WRITE(numout,*) ' zht_i_ini : ', zht_i_ini(ji,jj)267 276 ENDIF 268 277 ! 269 ENDIF 270 ! 271 END DO 272 END DO 273 278 END DO 279 END DO 280 ENDIF 281 274 282 !--------------------------------------------------------------------- 275 283 ! 4) Fill in sea ice arrays -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icestp.F90
r10402 r10419 194 194 CALL ice_var_agg( 2 ) ! necessary calls (at least for coupling) 195 195 ! 196 !! clem: one should switch the calculation of the fluxes onto the parent grid but the following calls do not work197 !! moreover it should only be called at the update frequency (as in agrif_ice_update.F90)198 !# if defined key_agrif199 ! IF( .NOT. Agrif_Root() ) CALL Agrif_ChildGrid_To_ParentGrid()200 !# endif201 196 CALL ice_update_flx( kt ) ! -- Update ocean surface mass, heat and salt fluxes 202 !# if defined key_agrif 203 ! IF( .NOT. Agrif_Root() ) CALL Agrif_ParentGrid_To_ChildGrid() 204 !# endif 197 ! 205 198 IF( ln_icediahsb ) CALL ice_dia( kt ) ! -- Diagnostics outputs 206 199 ! … … 368 361 e_i_b (:,:,:,:) = e_i (:,:,:,:) ! ice thermal energy 369 362 WHERE( a_i_b(:,:,:) >= epsi20 ) 370 h_i_b(:,:,:) = v_i_b 371 h_s_b(:,:,:) = v_s_b 363 h_i_b(:,:,:) = v_i_b(:,:,:) / a_i_b(:,:,:) ! ice thickness 364 h_s_b(:,:,:) = v_s_b(:,:,:) / a_i_b(:,:,:) ! snw thickness 372 365 ELSEWHERE 373 366 h_i_b(:,:,:) = 0._wp 374 367 h_s_b(:,:,:) = 0._wp 368 END WHERE 369 370 WHERE( a_ip(:,:,:) >= epsi20 ) 371 h_ip_b(:,:,:) = v_ip(:,:,:) / a_ip(:,:,:) ! ice pond thickness 372 ELSEWHERE 373 h_ip_b(:,:,:) = 0._wp 375 374 END WHERE 376 375 ! -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icevar.F90
r10345 r10419 557 557 !!------------------------------------------------------------------- 558 558 ! 559 ! 560 DO jl = 1, jpl !== loop over the categories ==! 561 ! 562 !---------------------------------------- 563 ! zap ice energy and send it to the ocean 564 !---------------------------------------- 565 DO jk = 1, nlay_i 566 DO jj = 1 , jpj 567 DO ji = 1 , jpi 568 IF( pe_i(ji,jj,jk,jl) < 0._wp .OR. pa_i(ji,jj,jl) < 0._wp ) THEN 569 hfx_res(ji,jj) = hfx_res(ji,jj) - pe_i(ji,jj,jk,jl) * r1_rdtice ! W.m-2 <0 570 pe_i(ji,jj,jk,jl) = 0._wp 571 ENDIF 572 END DO 573 END DO 574 END DO 575 ! 576 DO jk = 1, nlay_s 577 DO jj = 1 , jpj 578 DO ji = 1 , jpi 579 IF( pe_s(ji,jj,jk,jl) < 0._wp .OR. pa_i(ji,jj,jl) < 0._wp ) THEN 580 hfx_res(ji,jj) = hfx_res(ji,jj) - pe_s(ji,jj,jk,jl) * r1_rdtice ! W.m-2 <0 581 pe_s(ji,jj,jk,jl) = 0._wp 582 ENDIF 583 END DO 584 END DO 585 END DO 586 ! 587 !----------------------------------------------------- 588 ! zap ice and snow volume, add water and salt to ocean 589 !----------------------------------------------------- 590 DO jj = 1 , jpj 591 DO ji = 1 , jpi 592 IF( pv_i(ji,jj,jl) < 0._wp .OR. pa_i(ji,jj,jl) < 0._wp ) THEN 593 wfx_res(ji,jj) = wfx_res(ji,jj) + pv_i (ji,jj,jl) * rhoi * r1_rdtice 594 pv_i (ji,jj,jl) = 0._wp 595 ENDIF 596 IF( pv_s(ji,jj,jl) < 0._wp .OR. pa_i(ji,jj,jl) < 0._wp ) THEN 597 wfx_res(ji,jj) = wfx_res(ji,jj) + pv_s (ji,jj,jl) * rhos * r1_rdtice 598 pv_s (ji,jj,jl) = 0._wp 599 ENDIF 600 IF( psv_i(ji,jj,jl) < 0._wp .OR. pa_i(ji,jj,jl) < 0._wp ) THEN 601 sfx_res(ji,jj) = sfx_res(ji,jj) + psv_i(ji,jj,jl) * rhoi * r1_rdtice 602 psv_i (ji,jj,jl) = 0._wp 603 ENDIF 604 END DO 605 END DO 606 ! 607 END DO 608 ! 559 609 WHERE( pato_i(:,:) < 0._wp ) pato_i(:,:) = 0._wp 560 610 WHERE( poa_i (:,:,:) < 0._wp ) poa_i (:,:,:) = 0._wp … … 563 613 WHERE( pv_ip (:,:,:) < 0._wp ) pv_ip (:,:,:) = 0._wp ! in theory one should change wfx_pnd(-) and wfx_sum(+) 564 614 ! but it does not change conservation, so keep it this way is ok 565 !566 DO jl = 1, jpl !== loop over the categories ==!567 !568 !----------------------------------------569 ! zap ice energy and send it to the ocean570 !----------------------------------------571 DO jk = 1, nlay_i572 DO jj = 1 , jpj573 DO ji = 1 , jpi574 IF( pe_i(ji,jj,jk,jl) < 0._wp ) THEN575 hfx_res(ji,jj) = hfx_res(ji,jj) - pe_i(ji,jj,jk,jl) * r1_rdtice ! W.m-2 <0576 pe_i(ji,jj,jk,jl) = 0._wp577 ENDIF578 END DO579 END DO580 END DO581 !582 DO jk = 1, nlay_s583 DO jj = 1 , jpj584 DO ji = 1 , jpi585 IF( pe_s(ji,jj,jk,jl) < 0._wp ) THEN586 hfx_res(ji,jj) = hfx_res(ji,jj) - pe_s(ji,jj,jk,jl) * r1_rdtice ! W.m-2 <0587 pe_s(ji,jj,jk,jl) = 0._wp588 ENDIF589 END DO590 END DO591 END DO592 !593 !-----------------------------------------------------594 ! zap ice and snow volume, add water and salt to ocean595 !-----------------------------------------------------596 DO jj = 1 , jpj597 DO ji = 1 , jpi598 IF( pv_i(ji,jj,jl) < 0._wp ) THEN599 wfx_res(ji,jj) = wfx_res(ji,jj) + pv_i (ji,jj,jl) * rhoi * r1_rdtice600 pv_i (ji,jj,jl) = 0._wp601 ENDIF602 IF( pv_s(ji,jj,jl) < 0._wp ) THEN603 wfx_res(ji,jj) = wfx_res(ji,jj) + pv_s (ji,jj,jl) * rhos * r1_rdtice604 pv_s (ji,jj,jl) = 0._wp605 ENDIF606 IF( psv_i(ji,jj,jl) < 0._wp ) THEN607 sfx_res(ji,jj) = sfx_res(ji,jj) + psv_i(ji,jj,jl) * rhoi * r1_rdtice608 psv_i (ji,jj,jl) = 0._wp609 ENDIF610 END DO611 END DO612 !613 END DO614 615 ! 615 616 END SUBROUTINE ice_var_zapneg … … 953 954 FUNCTION ice_var_sshdyn(pssh, psnwice_mass, psnwice_mass_b) 954 955 !!--------------------------------------------------------------------- 955 !! *** ROUTINE rhg_evp_rst***956 !! *** ROUTINE ice_var_sshdyn *** 956 957 !! 957 958 !! ** Purpose : compute the equivalent ssh in lead when sea ice is embedded … … 962 963 !! Sea ice-ocean coupling using a rescaled vertical coordinate z*, 963 964 !! Ocean Modelling, Volume 24, Issues 1-2, 2008 964 !!965 965 !!---------------------------------------------------------------------- 966 966 ! -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icewri.F90
r10358 r10419 38 38 !! NEMO/ICE 4.0 , NEMO Consortium (2018) 39 39 !! $Id$ 40 !! Software governed by the CeCILL licen se (see./LICENSE)40 !! Software governed by the CeCILL licence (./LICENSE) 41 41 !!---------------------------------------------------------------------- 42 42 CONTAINS … … 50 50 INTEGER :: ji, jj, jk, jl ! dummy loop indices 51 51 REAL(wp) :: z2da, z2db, zrho1, zrho2 52 REAL(wp), DIMENSION(jpi,jpj) :: z2d ! 2D workspace52 REAL(wp), DIMENSION(jpi,jpj) :: z2d, zfast ! 2D workspace 53 53 REAL(wp), DIMENSION(jpi,jpj) :: zmsk00, zmsk05, zmsk15, zmsksn ! O%, 5% and 15% concentration mask and snow mask 54 54 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zmsk00l, zmsksnl ! cat masks … … 132 132 IF( iom_use('vtau_ai' ) ) CALL iom_put( "vtau_ai", vtau_ice * zmsk00 ) ! Wind stress term in force balance (y) 133 133 134 IF( iom_use('icevel') ) THEN 134 IF( iom_use('icevel') .OR. iom_use('fasticepres') ) THEN 135 ! module of ice velocity 135 136 DO jj = 2 , jpjm1 136 137 DO ji = 2 , jpim1 … … 141 142 END DO 142 143 CALL lbc_lnk( 'icewri', z2d, 'T', 1. ) 143 IF( iom_use('icevel') ) CALL iom_put( "icevel" , z2d ) ! ice velocity module 144 IF( iom_use('icevel') ) CALL iom_put( "icevel" , z2d ) 145 146 ! record presence of fast ice 147 WHERE( z2d(:,:) < 5.e-04_wp .AND. zmsk00(:,:) == 1._wp ) ; zfast(:,:) = 1._wp 148 ELSEWHERE ; zfast(:,:) = 0._wp 149 END WHERE 150 IF( iom_use('fasticepres') ) CALL iom_put( "fasticepres" , zfast ) 144 151 ENDIF 145 152 -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/cpl_oasis3.F90
r10386 r10419 142 142 INTEGER :: id_part 143 143 INTEGER :: paral(5) ! OASIS3 box partition 144 INTEGER :: ishape( 2,2) ! shape of arrays passed to PSMILe144 INTEGER :: ishape(4) ! shape of arrays passed to PSMILe 145 145 INTEGER :: ji,jc,jm ! local loop indicees 146 146 CHARACTER(LEN=64) :: zclname … … 181 181 ! nl* is set to the global values 1 and jp*glo. 182 182 ! 183 ishape(:,1) = (/ 1, nlei-nldi+1 /) 184 ishape(:,2) = (/ 1, nlej-nldj+1 /) 183 ishape(1) = 1 184 ishape(2) = nlei-nldi+1 185 ishape(3) = 1 186 ishape(4) = nlej-nldj+1 185 187 ! 186 188 ! ... Allocate memory for data exchange … … 242 244 #endif 243 245 IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_Out 244 CALL oasis_def_var (ssnd(ji)%nid(jc,jm), zclname, id_part , (/ 2, 0/), &246 CALL oasis_def_var (ssnd(ji)%nid(jc,jm), zclname, id_part , (/ 2, 1 /), & 245 247 & OASIS_Out , ishape , OASIS_REAL, nerror ) 246 248 IF ( nerror /= OASIS_Ok ) THEN … … 287 289 #endif 288 290 IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_In 289 CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part , (/ 2, 0/), &291 CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part , (/ 2, 1 /), & 290 292 & OASIS_In , ishape , OASIS_REAL, nerror ) 291 293 IF ( nerror /= OASIS_Ok ) THEN -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbccpl.F90
r10402 r10419 1667 1667 zsprecip(:,:) = frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_semp)%z3(:,:,1) 1668 1668 ztprecip(:,:) = frcv(jpr_semp)%z3(:,:,1) - frcv(jpr_sbpr)%z3(:,:,1) + zsprecip(:,:) 1669 CASE( 'none' ) ! Not available as for now: needs additional coding below when computing zevap_oce 1670 ! ! since fields received are not defined with none option 1671 CALL ctl_stop( 'STOP', 'sbccpl/sbc_cpl_ice_flx: some fields are not defined. Change sn_rcv_emp value in namelist namsbc_cpl' ) 1669 1672 END SELECT 1670 1673 … … 1943 1946 & / ( 1.- ( alb_oce_mix(:,: ) * ziceld(:,:) & 1944 1947 & + palbi (:,:,1) * picefr(:,:) ) ) 1948 CASE( 'none' ) ! Not available as for now: needs additional coding 1949 ! ! since fields received, here zqsr_tot, are not defined with none option 1950 CALL ctl_stop( 'STOP', 'sbccpl/sbc_cpl_ice_flx: some fields are not defined. Change sn_rcv_qsr value in namelist namsbc_cpl' ) 1945 1951 END SELECT 1946 1952 IF( ln_dm2dc .AND. ln_cpl ) THEN ! modify qsr to include the diurnal cycle -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/stpctl.F90
r10417 r10419 143 143 ! !== error handling ==! 144 144 IF( ( ln_ctl .OR. lsomeoce ) .AND. ( & ! have use mpp_max (because ln_ctl=.T.) or contains some ocean points 145 & zmax(1) > 15._wp .OR. & ! too large sea surface height ( > 15m )145 & zmax(1) > 20._wp .OR. & ! too large sea surface height ( > 20 m ) 146 146 & zmax(2) > 10._wp .OR. & ! too large velocity ( > 10 m/s) 147 147 & zmax(3) >= 0._wp .OR. & ! negative or zero sea surface salinity … … 161 161 ENDIF 162 162 163 WRITE(ctmp1,*) ' stp_ctl: |ssh| > 10 m or |U| > 10 m/s or S <= 0 or S >= 100 or NaN encounter in the tests'163 WRITE(ctmp1,*) ' stp_ctl: |ssh| > 20 m or |U| > 10 m/s or S <= 0 or S >= 100 or NaN encounter in the tests' 164 164 WRITE(ctmp2,9100) kt, zmax(1), ih(1) , ih(2) 165 165 WRITE(ctmp3,9200) kt, zmax(2), iu(1) , iu(2) , iu(3) -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/P4Z/p4zfechem.F90
r10368 r10419 25 25 PUBLIC p4z_fechem_init ! called in trcsms_pisces.F90 26 26 27 LOGICAL :: ln_fechem !: boolean for complex iron chemistry following Tagliabue and voelker28 27 LOGICAL :: ln_ligvar !: boolean for variable ligand concentration following Tagliabue and voelker 29 28 REAL(wp), PUBLIC :: xlam1 !: scavenging rate of Iron … … 32 31 REAL(wp), PUBLIC :: kfep !: rate constant for nanoparticle formation 33 32 34 REAL(wp) :: kl1, kl2, kb1, kb2, ks, kpr, spd, con, kth !!gm <<<== DOCTOR names SVP !!!35 36 33 !!---------------------------------------------------------------------- 37 34 !! NEMO/TOP 4.0 , NEMO Consortium (2018) … … 47 44 !! ** Purpose : Compute remineralization/scavenging of iron 48 45 !! 49 !! ** Method : 2 different chemistry models are available for iron 50 !! (1) The simple chemistry model of Aumont and Bopp (2006) 51 !! based on one ligand and one inorganic form 52 !! (2) The complex chemistry model of Tagliabue and 53 !! Voelker (2009) based on 2 ligands, 2 inorganic forms 54 !! and one particulate form (ln_fechem) 46 !! ** Method : A simple chemistry model of iron from Aumont and Bopp (2006) 47 !! based on one ligand and one inorganic form 55 48 !!--------------------------------------------------------------------- 56 49 INTEGER, INTENT(in) :: kt, knt ! ocean time step … … 74 67 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zTL1, zFe3, ztotlig, precip, zFeL1 75 68 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zcoll3d, zscav3d, zlcoll3d 76 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zFeL2, zTL2, zFe2, zFeP77 REAL(wp), ALLOCATABLE, DIMENSION(:,: ) :: zstrn, zstrn278 69 !!--------------------------------------------------------------------- 79 70 ! … … 83 74 zFeL1(:,:,:) = 0. 84 75 zTL1 (:,:,:) = 0. 85 IF( ln_fechem ) THEN86 ALLOCATE( zstrn(jpi,jpj), zstrn2(jpi,jpj) )87 ALLOCATE( zFe2(jpi,jpj,jpk), zFeL2(jpi,jpj,jpk), zTL2(jpi,jpj,jpk), zFeP(jpi,jpj,jpk) )88 zFe2 (:,:,:) = 0.89 zFeL2(:,:,:) = 0.90 zTL2 (:,:,:) = 0.91 zFeP (:,:,:) = 0.92 ENDIF93 76 94 77 ! Total ligand concentration : Ligands can be chosen to be constant or variable … … 104 87 ENDIF 105 88 106 IF( ln_fechem ) THEN 107 ! compute the day length depending on latitude and the day 108 zrum = REAL( nday_year - 80, wp ) / REAL( nyear_len(1), wp ) 109 zcodel = ASIN( SIN( zrum * rpi * 2._wp ) * SIN( rad * 23.5_wp ) ) 110 111 ! day length in hours 112 zstrn(:,:) = 0. 89 ! ------------------------------------------------------------ 90 ! from Aumont and Bopp (2006) 91 ! This model is based on one ligand and Fe' 92 ! Chemistry is supposed to be fast enough to be at equilibrium 93 ! ------------------------------------------------------------ 94 DO jk = 1, jpkm1 113 95 DO jj = 1, jpj 114 96 DO ji = 1, jpi 115 zargu = TAN( zcodel ) * TAN( gphit(ji,jj) * rad ) 116 zargu = MAX( -1., MIN( 1., zargu ) ) 117 zstrn(ji,jj) = MAX( 0.0, 24. - 2. * ACOS( zargu ) / rad / 15. ) 118 END DO 97 zTL1(ji,jj,jk) = ztotlig(ji,jj,jk) 98 zkeq = fekeq(ji,jj,jk) 99 zfesatur = zTL1(ji,jj,jk) * 1E-9 100 ztfe = trb(ji,jj,jk,jpfer) 101 ! Fe' is the root of a 2nd order polynom 102 zFe3 (ji,jj,jk) = ( -( 1. + zfesatur * zkeq - zkeq * ztfe ) & 103 & + SQRT( ( 1. + zfesatur * zkeq - zkeq * ztfe )**2 & 104 & + 4. * ztfe * zkeq) ) / ( 2. * zkeq ) 105 zFe3 (ji,jj,jk) = zFe3(ji,jj,jk) * 1E9 106 zFeL1(ji,jj,jk) = MAX( 0., trb(ji,jj,jk,jpfer) * 1E9 - zFe3(ji,jj,jk) ) 107 END DO 119 108 END DO 120 121 ! Maximum light intensity 122 zstrn2(:,:) = zstrn(:,:) / 24. 123 WHERE( zstrn(:,:) < 1.e0 ) zstrn(:,:) = 24. 124 zstrn(:,:) = 24. / zstrn(:,:) 125 126 ! ------------------------------------------------------------ 127 ! NEW FE CHEMISTRY ROUTINE from Tagliabue and Volker (2009) 128 ! This model is based on two ligands, Fe2+, Fe3+ and Fep 129 ! Chemistry is supposed to be fast enough to be at equilibrium 130 ! ------------------------------------------------------------ 131 DO jn = 1, 2 132 DO jk = 1, jpkm1 133 DO jj = 1, jpj 134 DO ji = 1, jpi 135 zlight = etot(ji,jj,jk) * zstrn(ji,jj) * REAL( 2-jn, wp ) 136 zzstrn2 = zstrn2(ji,jj) * REAL( 2-jn, wp ) + (1. - zstrn2(ji,jj) ) * REAL( jn-1, wp ) 137 ! Calculate ligand concentrations : assume 2/3rd of excess goes to 138 ! strong ligands (L1) and 1/3rd to weak ligands (L2) 139 ztligand = ztotlig(ji,jj,jk) - ligand * 1E9 140 zTL1(ji,jj,jk) = 0.000001 + 0.67 * ztligand 141 zTL2(ji,jj,jk) = ligand * 1E9 - 0.000001 + 0.33 * ztligand 142 ! ionic strength from Millero et al. 1987 143 zph = -LOG10( MAX( hi(ji,jj,jk), rtrn) ) 144 zoxy = trb(ji,jj,jk,jpoxy) 145 ! Fe2+ oxydation rate from Santana-Casiano et al. (2005) 146 zkox = 35.407 - 6.7109 * zph + 0.5342 * zph * zph - 5362.6 / ( tempis(ji,jj,jk) + 273.15 ) & 147 & - 0.04406 * SQRT( salinprac(ji,jj,jk) ) - 0.002847 * salinprac(ji,jj,jk) 148 zkox = ( 10.** zkox ) * spd 149 zkox = zkox * MAX( 1.e-6, zoxy) / ( chemo2(ji,jj,jk) + rtrn ) 150 ! PHOTOREDUCTION of complexed iron : Tagliabue and Arrigo (2006) 151 zkph2 = MAX( 0., 15. * zlight / ( zlight + 2. ) ) * (1. - fr_i(ji,jj)) 152 zkph1 = zkph2 / 5. 153 ! pass the dfe concentration from PISCES 154 ztfe = trb(ji,jj,jk,jpfer) * 1e9 155 ! ---------------------------------------------------------- 156 ! ANALYTICAL SOLUTION OF ROOTS OF THE FE3+ EQUATION 157 ! As shown in Tagliabue and Voelker (2009), Fe3+ is the root of a 3rd order polynom. 158 ! ---------------------------------------------------------- 159 ! calculate some parameters 160 za = 1.0 + ks / kpr 161 zb = 1.0 + zkph2 / ( zkox ) 162 zc = 1.0 + ( zkph1 + kth ) / ( zkox ) 163 zkappa1 = ( kb1 + zkph1 + kth ) / kl1 164 zkappa2 = ( kb2 + zkph2 ) / kl2 165 za2 = zTL2(ji,jj,jk) * zb / za + zTL2(ji,jj,jk) * zc / za + zkappa1 + zkappa2 - ztfe / za 166 za1 = zkappa1 * zTL2(ji,jj,jk) * zb / za + zkappa2 * zTL1(ji,jj,jk) * zc / za & 167 & + zkappa1 * zkappa2 - ( zkappa1 + zkappa2 ) * ztfe / za 168 za0 = -zkappa1 * zkappa2 * ztfe / za 169 zp = za1 - za2 * za2 / 3. 170 zq = za2 * za2 * za2 * 2. / 27. - za2 * za1 / 3. + za0 171 zp3 = zp / 3. 172 zq2 = zq / 2. 173 zd = zp3 * zp3 * zp3 + zq2 * zq2 174 zr = zq / ABS( zq ) * SQRT( ABS( zp ) / 3. ) 175 ! compute the roots 176 IF( zp > 0.) THEN 177 ! zphi = ASINH( zq / ( 2. * zr * zr * zr ) ) 178 zphi = zq / ( 2. * zr * zr * zr ) 179 zphi = LOG( zphi + SQRT( zphi * zphi + 1 ) ) ! asinh(x) = log(x + sqrt(x^2+1)) 180 zxs = -2. * zr * SINH( zphi / 3. ) - za1 / 3. 181 ELSE 182 IF( zd > 0. ) THEN 183 zfff = MAX( 1., zq / ( 2. * zr * zr * zr ) ) 184 ! zphi = ACOSH( zfff ) 185 zphi = LOG( zfff + SQRT( zfff * zfff - 1 ) ) ! acosh(x) = log(x + sqrt(x^2-1)) 186 zxs = -2. * zr * COSH( zphi / 3. ) - za1 / 3. 187 ELSE 188 zfff = MIN( 1., zq / ( 2. * zr * zr * zr ) ) 189 zphi = ACOS( zfff ) 190 DO jic = 1, 3 191 zfunc = -2 * zr * COS( zphi / 3. + 2. * REAL( jic - 1, wp ) * rpi / 3. ) - za2 / 3. 192 IF( zfunc > 0. .AND. zfunc <= ztfe) zxs = zfunc 193 END DO 194 ENDIF 195 ENDIF 196 ! solve for the other Fe species 197 zzFe3 = MAX( 0., zxs ) 198 zzFep = MAX( 0., ( ks * zzFe3 / kpr ) ) 199 zzFeL1 = MAX( 0., ( zzFe3 * zTL1(ji,jj,jk) ) / ( zkappa1 + zzFe3 ) ) 200 zzFeL2 = (ztfe - za * zzFe3 - zc * zzFeL1 ) / zb 201 zzFe2 = MAX( 0., ( ( ( zkph1 + kth ) * zzFeL1 + zkph2 * zzFeL2 ) / zkox ) ) 202 zzFep = ztfe - zzFe3 - zzFe2 - zzFeL1 - zzFeL2 203 zFe3(ji,jj,jk) = zFe3(ji,jj,jk) + zzFe3 * zzstrn2 204 zFe2(ji,jj,jk) = zFe2(ji,jj,jk) + zzFe2 * zzstrn2 205 zFeL2(ji,jj,jk) = zFeL2(ji,jj,jk) + zzFeL2 * zzstrn2 206 zFeL1(ji,jj,jk) = zFeL1(ji,jj,jk) + zzFeL1 * zzstrn2 207 zFeP(ji,jj,jk) = zFeP(ji,jj,jk) + zzFeP * zzstrn2 208 END DO 209 END DO 210 END DO 211 END DO 212 ELSE 213 ! ------------------------------------------------------------ 214 ! OLD FE CHEMISTRY ROUTINE from Aumont and Bopp (2006) 215 ! This model is based on one ligand and Fe' 216 ! Chemistry is supposed to be fast enough to be at equilibrium 217 ! ------------------------------------------------------------ 218 DO jk = 1, jpkm1 219 DO jj = 1, jpj 220 DO ji = 1, jpi 221 zTL1(ji,jj,jk) = ztotlig(ji,jj,jk) 222 zkeq = fekeq(ji,jj,jk) 223 zfesatur = zTL1(ji,jj,jk) * 1E-9 224 ztfe = trb(ji,jj,jk,jpfer) 225 ! Fe' is the root of a 2nd order polynom 226 zFe3 (ji,jj,jk) = ( -( 1. + zfesatur * zkeq - zkeq * ztfe ) & 227 & + SQRT( ( 1. + zfesatur * zkeq - zkeq * ztfe )**2 & 228 & + 4. * ztfe * zkeq) ) / ( 2. * zkeq ) 229 zFe3 (ji,jj,jk) = zFe3(ji,jj,jk) * 1E9 230 zFeL1(ji,jj,jk) = MAX( 0., trb(ji,jj,jk,jpfer) * 1E9 - zFe3(ji,jj,jk) ) 231 END DO 232 END DO 233 END DO 234 ! 235 ENDIF 109 END DO 110 ! 236 111 237 112 zdust = 0. ! if no dust available … … 247 122 & + fesol(ji,jj,jk,3) * zhplus + fesol(ji,jj,jk,4) & 248 123 & + fesol(ji,jj,jk,5) / zhplus ) 249 IF( ln_fechem ) THEN 250 zfeequi = ( zFe3(ji,jj,jk) + zFe2(ji,jj,jk) + zFeP(ji,jj,jk) ) * 1E-9 251 zfecoll = ( 0.3 * zFeL1(ji,jj,jk) + 0.5 * zFeL2(ji,jj,jk) ) * 1E-9 252 precip(ji,jj,jk) = 0.0 253 ELSE 254 zfeequi = zFe3(ji,jj,jk) * 1E-9 255 zhplus = max( rtrn, hi(ji,jj,jk) ) 256 fe3sol = fesol(ji,jj,jk,1) * ( zhplus**3 + fesol(ji,jj,jk,2) * zhplus**2 & 124 ! 125 zfeequi = zFe3(ji,jj,jk) * 1E-9 126 zhplus = max( rtrn, hi(ji,jj,jk) ) 127 fe3sol = fesol(ji,jj,jk,1) * ( zhplus**3 + fesol(ji,jj,jk,2) * zhplus**2 & 257 128 & + fesol(ji,jj,jk,3) * zhplus + fesol(ji,jj,jk,4) & 258 129 & + fesol(ji,jj,jk,5) / zhplus ) 259 zfecoll = 0.5 * zFeL1(ji,jj,jk) * 1E-9 260 ! precipitation of Fe3+, creation of nanoparticles 261 precip(ji,jj,jk) = MAX( 0., ( zFe3(ji,jj,jk) * 1E-9 - fe3sol ) ) * kfep * xstep 262 ENDIF 130 zfecoll = 0.5 * zFeL1(ji,jj,jk) * 1E-9 131 ! precipitation of Fe3+, creation of nanoparticles 132 precip(ji,jj,jk) = MAX( 0., ( zFe3(ji,jj,jk) * 1E-9 - fe3sol ) ) * kfep * xstep 263 133 ! 264 134 ztrc = ( trb(ji,jj,jk,jppoc) + trb(ji,jj,jk,jpgoc) + trb(ji,jj,jk,jpcal) + trb(ji,jj,jk,jpgsi) ) * 1.e6 … … 311 181 ! Define the bioavailable fraction of iron 312 182 ! ---------------------------------------- 313 IF( ln_fechem ) THEN ; biron(:,:,:) = MAX( 0., trb(:,:,:,jpfer) - zFeP(:,:,:) * 1E-9 ) 314 ELSE ; biron(:,:,:) = trb(:,:,:,jpfer) 315 ENDIF 183 biron(:,:,:) = trb(:,:,:,jpfer) 316 184 ! 317 185 IF( ln_ligand ) THEN … … 327 195 zaggliga = zlam1a * xstep * zligco 328 196 zaggligb = zlam1b * xstep * zligco 329 tra(ji,jj,jk,jpfep) = tra(ji,jj,jk,jpfep) + precip(ji,jj,jk)330 197 tra(ji,jj,jk,jplgw) = tra(ji,jj,jk,jplgw) - zaggliga - zaggligb 331 198 zlcoll3d(ji,jj,jk) = zaggliga + zaggligb … … 334 201 END DO 335 202 ! 336 IF( .NOT.ln_fechem) THEN 337 plig(:,:,:) = MAX( 0., ( ( zFeL1(:,:,:) * 1E-9 ) / ( trb(:,:,:,jpfer) +rtrn ) ) ) 338 ENDIF 203 plig(:,:,:) = MAX( 0., ( ( zFeL1(:,:,:) * 1E-9 ) / ( trb(:,:,:,jpfer) +rtrn ) ) ) 339 204 ! 340 205 ENDIF … … 343 208 IF( lk_iomput ) THEN 344 209 IF( knt == nrdttrc ) THEN 345 zrfact2 = 1.e3 * rfact2r ! conversion from mol/L/timestep into mol/m3/s 346 IF( iom_use("Fe3") ) CALL iom_put("Fe3" , zFe3 (:,:,:) * tmask(:,:,:) ) ! Fe3+ 347 IF( iom_use("FeL1") ) CALL iom_put("FeL1" , zFeL1 (:,:,:) * tmask(:,:,:) ) ! FeL1 348 IF( iom_use("TL1") ) CALL iom_put("TL1" , zTL1 (:,:,:) * tmask(:,:,:) ) ! TL1 349 IF( iom_use("Totlig") ) CALL iom_put("Totlig" , ztotlig(:,:,:) * tmask(:,:,:) ) ! TL 350 IF( iom_use("Biron") ) CALL iom_put("Biron" , biron (:,:,:) * 1e9 * tmask(:,:,:) ) ! biron 351 IF( iom_use("FESCAV") ) CALL iom_put("FESCAV" , zscav3d(:,:,:) * 1e9 * tmask(:,:,:) * zrfact2 ) 352 IF( iom_use("FECOLL") ) CALL iom_put("FECOLL" , zcoll3d(:,:,:) * 1e9 * tmask(:,:,:) * zrfact2 ) 353 IF( iom_use("LGWCOLL")) CALL iom_put("LGWCOLL", zlcoll3d(:,:,:) * 1e9 * tmask(:,:,:) * zrfact2 ) 354 IF( ln_fechem ) THEN 355 IF( iom_use("Fe2") ) CALL iom_put("Fe2" , zFe2 (:,:,:) * tmask(:,:,:) ) ! Fe2+ 356 IF( iom_use("FeL2") ) CALL iom_put("FeL2" , zFeL2 (:,:,:) * tmask(:,:,:) ) ! FeL2 357 IF( iom_use("FeP") ) CALL iom_put("FeP" , zFeP (:,:,:) * tmask(:,:,:) ) ! FeP 358 IF( iom_use("TL2") ) CALL iom_put("TL2" , zTL2 (:,:,:) * tmask(:,:,:) ) ! TL2 359 ENDIF 210 zrfact2 = 1.e3 * rfact2r ! conversion from mol/L/timestep into mol/m3/s 211 IF( iom_use("Fe3") ) CALL iom_put("Fe3" , zFe3 (:,:,:) * tmask(:,:,:) ) ! Fe3+ 212 IF( iom_use("FeL1") ) CALL iom_put("FeL1" , zFeL1 (:,:,:) * tmask(:,:,:) ) ! FeL1 213 IF( iom_use("TL1") ) CALL iom_put("TL1" , zTL1 (:,:,:) * tmask(:,:,:) ) ! TL1 214 IF( iom_use("Totlig") ) CALL iom_put("Totlig" , ztotlig(:,:,:) * tmask(:,:,:) ) ! TL 215 IF( iom_use("Biron") ) CALL iom_put("Biron" , biron (:,:,:) * 1e9 * tmask(:,:,:) ) ! biron 216 IF( iom_use("FESCAV") ) CALL iom_put("FESCAV" , zscav3d(:,:,:) * 1e9 * tmask(:,:,:) * zrfact2 ) 217 IF( iom_use("FECOLL") ) CALL iom_put("FECOLL" , zcoll3d(:,:,:) * 1e9 * tmask(:,:,:) * zrfact2 ) 218 IF( iom_use("LGWCOLL")) CALL iom_put("LGWCOLL", zlcoll3d(:,:,:) * 1e9 * tmask(:,:,:) * zrfact2 ) 360 219 ENDIF 361 220 ENDIF … … 367 226 ENDIF 368 227 ! 369 IF( ln_fechem ) THEN370 DEALLOCATE( zstrn, zstrn2 )371 DEALLOCATE( zFe2, zFeL2, zTL2, zFeP )372 ENDIF373 !374 228 IF( ln_timing ) CALL timing_stop('p4z_fechem') 375 229 ! … … 391 245 INTEGER :: ios ! Local integer 392 246 !! 393 NAMELIST/nampisfer/ ln_ fechem, ln_ligvar, xlam1, xlamdust, ligand, kfep247 NAMELIST/nampisfer/ ln_ligvar, xlam1, xlamdust, ligand, kfep 394 248 !!---------------------------------------------------------------------- 395 249 ! … … 410 264 IF(lwp) THEN ! control print 411 265 WRITE(numout,*) ' Namelist : nampisfer' 412 WRITE(numout,*) ' enable complex iron chemistry scheme ln_fechem =', ln_fechem413 266 WRITE(numout,*) ' variable concentration of ligand ln_ligvar =', ln_ligvar 414 267 WRITE(numout,*) ' scavenging rate of Iron xlam1 =', xlam1 … … 418 271 ENDIF 419 272 ! 420 IF (ln_ligand .AND. ln_fechem) CALL ctl_stop( 'STOP', 'p4z_fechem_init: ln_ligand and ln_fechem are incompatible')421 !422 IF( ln_fechem ) THEN ! set some constants used by the complexe chemistry scheme423 !424 spd = 3600. * 24.425 con = 1.E9426 ! LIGAND KINETICS (values from Witter et al. 2000)427 ! Weak (L2) ligands428 ! Phaeophytin429 kl2 = 12.2E5 * spd / con430 kb2 = 12.3E-6 * spd431 ! Strong (L1) ligands432 ! Saccharides433 ! kl1 = 12.2E5 * spd / con434 ! kb1 = 12.3E-6 * spd435 ! DFOB-436 kl1 = 19.6e5 * spd / con437 kb1 = 1.5e-6 * spd438 ! pcp and remin of Fe3p439 ks = 0.075440 kpr = 0.05441 ! thermal reduction of Fe3442 kth = 0.0048 * 24.443 !444 ENDIF445 !446 273 END SUBROUTINE p4z_fechem_init 447 274 -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/P4Z/p4zligand.F90
r10368 r10419 25 25 REAL(wp), PUBLIC :: rlig !: Remin ligand production 26 26 REAL(wp), PUBLIC :: prlgw !: Photochemical of weak ligand 27 REAL(wp), PUBLIC :: rfep !: Dissolution rate of FeP28 27 29 28 !!---------------------------------------------------------------------- … … 43 42 ! 44 43 INTEGER :: ji, jj, jk 45 REAL(wp) :: zlgwp, zlgwpr, zlgwr, zlablgw , zrfepa, zfepr44 REAL(wp) :: zlgwp, zlgwpr, zlgwr, zlablgw 46 45 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zligrem, zligpr, zrligprod 47 46 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zw3d … … 71 70 zligpr(ji,jj,jk) = zlgwpr 72 71 zrligprod(ji,jj,jk) = zlgwp 73 !74 ! ----------------------------------------------------------75 ! Dissolution of nanoparticle Fe76 ! ----------------------------------------------------------77 ! dissolution rate is maximal in the presence of light and78 ! lower in the aphotici zone79 ! ! 25 Wm-2 constant80 zrfepa = rfep * ( 1. - EXP( -1. * etot(ji,jj,jk) / 25. ) ) * (1.- fr_i(ji,jj))81 zrfepa = MAX( (zrfepa / 10.0), zrfepa ) ! min of 10 days lifetime82 zfepr = rfep * xstep * trb(ji,jj,jk,jpfep)83 tra(ji,jj,jk,jpfep) = tra(ji,jj,jk,jpfep) - zfepr84 tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + zfepr85 72 ! 86 73 END DO … … 130 117 INTEGER :: ios ! Local integer 131 118 ! 132 NAMELIST/nampislig/ rlgw, prlgw, rlgs, r fep, rlig119 NAMELIST/nampislig/ rlgw, prlgw, rlgs, rlig 133 120 !!---------------------------------------------------------------------- 134 121 ! … … 148 135 IF(lwp) THEN ! control print 149 136 WRITE(numout,*) ' Namelist : nampislig' 150 WRITE(numout,*) ' Dissolution rate of FeP rfep =', rfep151 137 WRITE(numout,*) ' Lifetime (years) of weak ligands rlgw =', rlgw 152 138 WRITE(numout,*) ' Remin ligand production per unit C rlig =', rlig -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/P4Z/p4zprod.F90
r10368 r10419 26 26 PUBLIC p4z_prod_alloc 27 27 28 LOGICAL , PUBLIC :: ln_newprod !:29 28 REAL(wp), PUBLIC :: pislopen !: 30 29 REAL(wp), PUBLIC :: pisloped !: … … 156 155 END DO 157 156 158 IF( ln_newprod ) THEN 159 DO jk = 1, jpkm1 160 DO jj = 1, jpj 161 DO ji = 1, jpi 162 IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN 163 ! Computation of production function for Carbon 164 ! --------------------------------------------- 165 zpislopen = zpislopeadn(ji,jj,jk) / ( ( r1_rday + bresp * r1_rday ) & 166 & * zmxl_fac(ji,jj,jk) * rday + rtrn) 167 zpisloped = zpislopeadd(ji,jj,jk) / ( ( r1_rday + bresp * r1_rday ) & 168 & * zmxl_fac(ji,jj,jk) * rday + rtrn) 169 zprbio(ji,jj,jk) = zprbio(ji,jj,jk) * ( 1.- EXP( -zpislopen * enano(ji,jj,jk) ) ) 170 zprdia(ji,jj,jk) = zprdia(ji,jj,jk) * ( 1.- EXP( -zpisloped * ediat(ji,jj,jk) ) ) 171 ! Computation of production function for Chlorophyll 172 !-------------------------------------------------- 173 zpislopen = zpislopeadn(ji,jj,jk) / ( zprmaxn(ji,jj,jk) * zmxl_chl(ji,jj,jk) * rday + rtrn ) 174 zpisloped = zpislopeadd(ji,jj,jk) / ( zprmaxd(ji,jj,jk) * zmxl_chl(ji,jj,jk) * rday + rtrn ) 175 zprnch(ji,jj,jk) = zprmaxn(ji,jj,jk) * ( 1.- EXP( -zpislopen * enanom(ji,jj,jk) ) ) 176 zprdch(ji,jj,jk) = zprmaxd(ji,jj,jk) * ( 1.- EXP( -zpisloped * ediatm(ji,jj,jk) ) ) 177 ENDIF 178 END DO 179 END DO 180 END DO 181 ELSE 182 DO jk = 1, jpkm1 183 DO jj = 1, jpj 184 DO ji = 1, jpi 185 IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN 186 ! Computation of production function for Carbon 187 ! --------------------------------------------- 188 zpislopen = zpislopeadn(ji,jj,jk) / ( zprbio(ji,jj,jk) * rday * xlimphy(ji,jj,jk) + rtrn ) 189 zpisloped = zpislopeadd(ji,jj,jk) / ( zprdia(ji,jj,jk) * rday * xlimdia(ji,jj,jk) + rtrn ) 190 zprbio(ji,jj,jk) = zprbio(ji,jj,jk) * ( 1.- EXP( -zpislopen * enano(ji,jj,jk) ) ) 191 zprdia(ji,jj,jk) = zprdia(ji,jj,jk) * ( 1.- EXP( -zpisloped * ediat(ji,jj,jk) ) ) 192 ! Computation of production function for Chlorophyll 193 !-------------------------------------------------- 194 zpislopen = zpislopen * zmxl_fac(ji,jj,jk) / ( zmxl_chl(ji,jj,jk) + rtrn ) 195 zpisloped = zpisloped * zmxl_fac(ji,jj,jk) / ( zmxl_chl(ji,jj,jk) + rtrn ) 196 zprnch(ji,jj,jk) = zprmaxn(ji,jj,jk) * ( 1.- EXP( -zpislopen * enanom(ji,jj,jk) ) ) 197 zprdch(ji,jj,jk) = zprmaxd(ji,jj,jk) * ( 1.- EXP( -zpisloped * ediatm(ji,jj,jk) ) ) 198 ENDIF 199 END DO 200 END DO 201 END DO 202 ENDIF 157 DO jk = 1, jpkm1 158 DO jj = 1, jpj 159 DO ji = 1, jpi 160 IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN 161 ! Computation of production function for Carbon 162 ! --------------------------------------------- 163 zpislopen = zpislopeadn(ji,jj,jk) / ( ( r1_rday + bresp * r1_rday ) & 164 & * zmxl_fac(ji,jj,jk) * rday + rtrn) 165 zpisloped = zpislopeadd(ji,jj,jk) / ( ( r1_rday + bresp * r1_rday ) & 166 & * zmxl_fac(ji,jj,jk) * rday + rtrn) 167 zprbio(ji,jj,jk) = zprbio(ji,jj,jk) * ( 1.- EXP( -zpislopen * enano(ji,jj,jk) ) ) 168 zprdia(ji,jj,jk) = zprdia(ji,jj,jk) * ( 1.- EXP( -zpisloped * ediat(ji,jj,jk) ) ) 169 ! Computation of production function for Chlorophyll 170 !-------------------------------------------------- 171 zpislopen = zpislopeadn(ji,jj,jk) / ( zprmaxn(ji,jj,jk) * zmxl_chl(ji,jj,jk) * rday + rtrn ) 172 zpisloped = zpislopeadd(ji,jj,jk) / ( zprmaxd(ji,jj,jk) * zmxl_chl(ji,jj,jk) * rday + rtrn ) 173 zprnch(ji,jj,jk) = zprmaxn(ji,jj,jk) * ( 1.- EXP( -zpislopen * enanom(ji,jj,jk) ) ) 174 zprdch(ji,jj,jk) = zprmaxd(ji,jj,jk) * ( 1.- EXP( -zpisloped * ediatm(ji,jj,jk) ) ) 175 ENDIF 176 END DO 177 END DO 178 END DO 203 179 204 180 ! Computation of a proxy of the N/C ratio … … 505 481 INTEGER :: ios ! Local integer 506 482 ! 507 NAMELIST/namp4zprod/ pislopen, pisloped, xadap, ln_newprod,bresp, excretn, excretd, &483 NAMELIST/namp4zprod/ pislopen, pisloped, xadap, bresp, excretn, excretd, & 508 484 & chlcnm, chlcdm, chlcmin, fecnm, fecdm, grosip 509 485 !!---------------------------------------------------------------------- … … 525 501 IF(lwp) THEN ! control print 526 502 WRITE(numout,*) ' Namelist : namp4zprod' 527 WRITE(numout,*) ' Enable new parame. of production (T/F) ln_newprod =', ln_newprod528 503 WRITE(numout,*) ' mean Si/C ratio grosip =', grosip 529 504 WRITE(numout,*) ' P-I slope pislopen =', pislopen … … 531 506 WRITE(numout,*) ' excretion ratio of nanophytoplankton excretn =', excretn 532 507 WRITE(numout,*) ' excretion ratio of diatoms excretd =', excretd 533 IF( ln_newprod ) THEN 534 WRITE(numout,*) ' basal respiration in phytoplankton bresp =', bresp 535 WRITE(numout,*) ' Maximum Chl/C in phytoplankton chlcmin =', chlcmin 536 ENDIF 508 WRITE(numout,*) ' basal respiration in phytoplankton bresp =', bresp 509 WRITE(numout,*) ' Maximum Chl/C in phytoplankton chlcmin =', chlcmin 537 510 WRITE(numout,*) ' P-I slope for diatoms pisloped =', pisloped 538 511 WRITE(numout,*) ' Minimum Chl/C in nanophytoplankton chlcnm =', chlcnm -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/P4Z/p4zsbc.F90
r10368 r10419 31 31 REAL(wp), PUBLIC :: dustsolub !: Solubility of the dust 32 32 REAL(wp), PUBLIC :: mfrac !: Mineral Content of the dust 33 REAL(wp), PUBLIC :: rdustfep !: Fraction of dust that is dissolvable34 33 REAL(wp), PUBLIC :: icefeinput !: Iron concentration in sea ice 35 34 REAL(wp), PUBLIC :: wdust !: Sinking speed of the dust … … 39 38 REAL(wp) :: hratio !: Fe:3He ratio assumed for vent iron supply 40 39 REAL(wp) :: distcoast !: Distance off the coast for Iron from sediments 41 REAL(wp), PUBLIC :: fep_rats !: Fep/Fer ratio from sed sources42 REAL(wp), PUBLIC :: fep_rath !: Fep/Fer ratio from hydro sources43 40 REAL(wp), PUBLIC :: lgw_rath !: Weak ligand ratio from hydro sources 44 41 … … 228 225 & ln_dust, ln_solub, ln_river, ln_ndepo, ln_ironsed, ln_ironice, ln_hydrofe, & 229 226 & sedfeinput, distcoast, dustsolub, icefeinput, wdust, mfrac, nitrfix, diazolight, concfediaz, & 230 & hratio, fep_rats, fep_rath, rdustfep,lgw_rath227 & hratio, lgw_rath 231 228 !!---------------------------------------------------------------------- 232 229 ! … … 265 262 WRITE(numout,*) ' Fe to 3He ratio assumed for vent iron supply hratio = ', hratio 266 263 IF( ln_ligand ) THEN 267 WRITE(numout,*) ' Fep/Fer ratio from sed sources fep_rats = ', fep_rats268 WRITE(numout,*) ' Fep/Fer ratio from sed hydro sources fep_rath = ', fep_rath269 WRITE(numout,*) ' Fraction of dust that is dissolvable rdustfep = ', rdustfep270 264 WRITE(numout,*) ' Weak ligand ratio from sed hydro sources lgw_rath = ', lgw_rath 271 265 ENDIF -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/P4Z/p4zsed.F90
r10368 r10419 60 60 REAL(wp) :: ztrfer, ztrpo4s, ztrdp, zwdust, zmudia, ztemp 61 61 REAL(wp) :: xdiano3, xdianh4 62 REAL(wp) :: zwssfep63 62 ! 64 63 CHARACTER (len=25) :: charout … … 68 67 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zsoufer, zlight 69 68 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrpo4, ztrdop, zirondep, zpdep 70 REAL(wp), ALLOCATABLE, DIMENSION(:,: ) :: zsidep, z wsfep, zironice69 REAL(wp), ALLOCATABLE, DIMENSION(:,: ) :: zsidep, zironice 71 70 !!--------------------------------------------------------------------- 72 71 ! … … 87 86 ALLOCATE( ztrpo4(jpi,jpj,jpk) ) 88 87 IF( ln_p5z ) ALLOCATE( ztrdop(jpi,jpj,jpk) ) 89 IF( ln_ligand ) ALLOCATE( zwsfep(jpi,jpj) )90 88 91 89 zdenit2d(:,:) = 0.e0 … … 131 129 ELSE 132 130 zirondep(:,:,1) = dustsolub * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e-10 * r1_ryyss 133 ENDIF134 IF ( ln_ligand ) THEN135 IF( ln_solub ) THEN136 tra(:,:,1,jpfep) = tra(:,:,1,jpfep) + rdustfep * (1.0 - solub(:,:)) * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85137 ELSE138 tra(:,:,1,jpfep) = tra(:,:,1,jpfep) + rdustfep * (1.0 - dustsolub) * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85139 ENDIF140 131 ENDIF 141 132 zsidep(:,:) = 8.8 * 0.075 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 28.1 … … 216 207 tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + hydrofe(:,:,:) * rfact2 217 208 IF( ln_ligand ) THEN 218 tra(:,:,:,jpfep) = tra(:,:,:,jpfep) + ( hydrofe(:,:,:) * fep_rath ) * rfact2219 209 tra(:,:,:,jplgw) = tra(:,:,:,jplgw) + ( hydrofe(:,:,:) * lgw_rath ) * rfact2 220 210 ENDIF … … 235 225 END DO 236 226 ! 237 IF( ln_ligand ) THEN238 DO jj = 1, jpj239 DO ji = 1, jpi240 ikt = mbkt(ji,jj)241 zdep = e3t_n(ji,jj,ikt) / xstep242 zwsfep(ji,jj) = MIN( 0.99 * zdep, wsfep(ji,jj,ikt) )243 END DO244 ENDDO245 ENDIF246 247 227 IF( .NOT.lk_sed ) THEN 248 228 ! … … 251 231 IF( ln_ironsed ) THEN 252 232 tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + ironsed(:,:,:) * rfact2 253 IF( ln_ligand ) tra(:,:,:,jpfep) = tra(:,:,:,jpfep) + ( ironsed(:,:,:) * fep_rats ) * rfact2254 233 ! 255 234 IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "Ironsed" ) ) & … … 334 313 END DO 335 314 END DO 336 !337 IF( ln_ligand ) THEN338 DO jj = 1, jpj339 DO ji = 1, jpi340 ikt = mbkt(ji,jj)341 zdep = xstep / e3t_n(ji,jj,ikt)342 zwssfep = zwsfep(ji,jj) * zdep343 tra(ji,jj,ikt,jpfep) = tra(ji,jj,ikt,jpfep) - trb(ji,jj,ikt,jpfep) * zwssfep344 END DO345 END DO346 ENDIF347 315 ! 348 316 IF( ln_p5z ) THEN … … 524 492 ! 525 493 IF( ln_p5z ) DEALLOCATE( ztrpo4, ztrdop ) 526 IF( ln_ligand ) DEALLOCATE( zwsfep )527 494 ! 528 495 IF( ln_timing ) CALL timing_stop('p4z_sed') -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/P4Z/p4zsink.F90
r10377 r10419 35 35 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sinkfer !: Small BFe sinking fluxes 36 36 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sinkfer2 !: Big iron sinking fluxes 37 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sinkfep !: Fep sinking fluxes38 37 39 38 INTEGER :: ik100 … … 126 125 ENDIF 127 126 128 IF( ln_ligand ) THEN129 wsfep (:,:,:) = wfep130 !131 sinkfep(:,:,:) = 0.e0132 CALL trc_sink( kt, wsfep, sinkfep , jpfep, rfact2 )133 ENDIF134 135 127 ! Total carbon export per year 136 128 IF( iom_use( "tcexp" ) .OR. ( ln_check_mass .AND. kt == nitend .AND. knt == nrdttrc ) ) & … … 214 206 !! *** ROUTINE p4z_sink_alloc *** 215 207 !!---------------------------------------------------------------------- 216 INTEGER :: ierr( 3)208 INTEGER :: ierr(2) 217 209 !!---------------------------------------------------------------------- 218 210 ! … … 224 216 & sinkfer(jpi,jpj,jpk) , STAT=ierr(1) ) 225 217 ! 226 IF( ln_ligand ) ALLOCATE( sinkfep(jpi,jpj,jpk) , STAT=ierr(2) )227 228 218 IF( ln_p5z ) ALLOCATE( sinkingn(jpi,jpj,jpk), sinking2n(jpi,jpj,jpk) , & 229 & sinkingp(jpi,jpj,jpk), sinking2p(jpi,jpj,jpk) , STAT=ierr( 3) )219 & sinkingp(jpi,jpj,jpk), sinking2p(jpi,jpj,jpk) , STAT=ierr(2) ) 230 220 ! 231 221 p4z_sink_alloc = MAXVAL( ierr ) -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/P4Z/p4zsms.F90
r10377 r10419 74 74 CALL p4z_che ! initialize the chemical constants 75 75 CALL ahini_for_at(hi) ! set PH at kt=nit000 76 t_oce_co2_flx_cum = 0._wp 76 77 ELSE 77 78 CALL p4z_rst( nittrc000, 'READ' ) !* read or initialize all required fields … … 188 189 !! 189 190 NAMELIST/nampisbio/ nrdttrc, wsbio, xkmort, ferat3, wsbio2, wsbio2max, wsbio2scale, & 190 & wfep, ldocp, ldocz, lthet, & 191 & no3rat3, po4rat3 191 & ldocp, ldocz, lthet, no3rat3, po4rat3 192 192 ! 193 193 NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp … … 223 223 WRITE(numout,*) ' Big particles sinking speed length scale wsbio2scale =', wsbio2scale 224 224 IF( ln_ligand ) THEN 225 WRITE(numout,*) ' FeP sinking speed wfep =', wfep226 225 IF( ln_p4z ) THEN 227 226 WRITE(numout,*) ' Phyto ligand production per unit doc ldocp =', ldocp … … 493 492 & + trn(:,:,:,jpbfe) + trn(:,:,:,jpsfe) & 494 493 & + ( trn(:,:,:,jpzoo) + trn(:,:,:,jpmes) ) * ferat3 495 IF( ln_ligand) zwork(:,:,:) = zwork(:,:,:) + trn(:,:,:,jpfep)496 494 ! 497 495 ferbudget = glob_sum( 'p4zsms', zwork(:,:,:) * cvol(:,:,:) ) -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/par_pisces.F90
r10068 r10419 56 56 INTEGER, PUBLIC :: jpgop !: Big phosphorus particles Concentration 57 57 INTEGER, PUBLIC :: jplgw !: Weak Ligands 58 INTEGER, PUBLIC :: jpfep !: Fe nanoparticle59 58 60 59 !!--------------------------------------------------------------------- -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/sms_pisces.F90
r10377 r10419 47 47 REAL(wp) :: xkmort !: ??? 48 48 REAL(wp) :: ferat3 !: ??? 49 REAL(wp) :: wfep !: ???50 49 REAL(wp) :: ldocp !: ??? 51 50 REAL(wp) :: ldocz !: ??? … … 90 89 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsbio3 !: POC sinking speed 91 90 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsbio4 !: GOC sinking speed 92 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsfep93 94 95 91 96 92 !!* SMS for the organic matter … … 175 171 ! 176 172 IF( ln_ligand ) THEN 177 ALLOCATE( plig(jpi,jpj,jpk) , wsfep(jpi,jpj,jpk) ,STAT=ierr(8) )173 ALLOCATE( plig(jpi,jpj,jpk) , STAT=ierr(8) ) 178 174 ENDIF 179 !180 175 ENDIF 181 176 ! -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/trcini_pisces.F90
r10402 r10419 168 168 IF( cltra == 'PFe' ) jppfe = jn !: Picophytoplankton Fe biomass 169 169 IF( cltra == 'LGW' ) jplgw = jn !: Weak ligands 170 IF( cltra == 'LFe' ) jpfep = jn !: Fe nanoparticle171 170 END DO 172 171 … … 216 215 IF( ln_ligand) THEN 217 216 trn(:,:,:,jplgw) = 0.6E-9 218 trn(:,:,:,jpfep) = 0. * 5.e-6219 217 ENDIF 220 218 IF( ln_p5z ) THEN -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/ICEDYN/EXPREF/1_namelist_ice_cfg
r9801 r10419 1 1 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2 !! SI3 namelist:2 !! SI3 configuration namelist: Overwrites SHARED/namelist_ice_ref 3 3 !! 1 - Generic parameters (nampar) 4 4 !! 2 - Ice thickness discretization (namitd) … … 33 33 &namdyn ! Ice dynamics 34 34 !------------------------------------------------------------------------------ 35 ln_dyn FULL= .false. ! dyn.: full ice dynamics (rheology + advection + ridging/rafting + correction)35 ln_dynALL = .false. ! dyn.: full ice dynamics (rheology + advection + ridging/rafting + correction) 36 36 ln_dynRHGADV = .true. ! dyn.: no ridge/raft & no corrections (rheology + advection) 37 ln_dynADV = .false. ! dyn.: only advection w prescribed vel.(rn_uvice + advection) 37 ln_dynADV1D = .false. ! dyn.: only advection 1D (Schar & Smolarkiewicz 1996 test case) 38 ln_dynADV2D = .false. ! dyn.: only advection 2D w prescribed vel.(rn_uvice + advection) 38 39 rn_uice = 0.5 ! prescribed ice u-velocity 39 40 rn_vice = 0. ! prescribed ice v-velocity -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/ICEDYN/EXPREF/file_def_nemo-ice.xml
r9740 r10419 21 21 <field field_ref="snwvolu" name="snvolu" /> 22 22 <field field_ref="icethic" name="sithic" /> 23 <field field_ref="icethic" name="sithic_max" operation="maximum" /> 24 <field field_ref="icethic" name="sithic_min" operation="minimum" /> 25 <field field_ref="iceneg_pres" name="sineg_pres" /> 26 <field field_ref="iceneg_volu" name="sineg_volu" /> 27 <field field_ref="fasticepres" name="fasticepres" /> 23 28 <field field_ref="icevolu" name="sivolu" /> 24 29 <field field_ref="iceconc" name="siconc" /> -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/ICEDYN/EXPREF/namelist_ice_cfg
r10075 r10419 33 33 &namdyn ! Ice dynamics 34 34 !------------------------------------------------------------------------------ 35 ln_dyn FULL= .false. ! dyn.: full ice dynamics (rheology + advection + ridging/rafting + correction)35 ln_dynALL = .false. ! dyn.: full ice dynamics (rheology + advection + ridging/rafting + correction) 36 36 ln_dynRHGADV = .true. ! dyn.: no ridge/raft & no corrections (rheology + advection) 37 ln_dynADV = .false. ! dyn.: only advection w prescribed vel.(rn_uvice + advection) 37 ln_dynADV1D = .false. ! dyn.: only advection 1D (Schar & Smolarkiewicz 1996 test case) 38 ln_dynADV2D = .false. ! dyn.: only advection 2D w prescribed vel.(rn_uvice + advection) 38 39 rn_uice = 0.5 ! prescribed ice u-velocity 39 40 rn_vice = 0. ! prescribed ice v-velocity … … 95 96 sn_tmi = 'initice' , -12 ,'tmi' , .false. , .true., 'yearly' , '' , '', '' 96 97 sn_smi = 'initice' , -12 ,'smi' , .false. , .true., 'yearly' , '' , '', '' 97 cn_dir 98 cn_dir='./' 98 99 / 99 100 !------------------------------------------------------------------------------ -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/demo_cfgs.txt
r10343 r10419 4 4 OVERFLOW OCE 5 5 ICEDYN OCE NST SAS ICE 6 ICEADV OCE SAS ICE 6 7 VORTEX OCE NST 7 8 WAD OCE
Note: See TracChangeset
for help on using the changeset viewer.