Changeset 11543 for NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex
- Timestamp:
- 2019-09-13T15:57:52+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex
r11537 r11543 57 57 58 58 \[ 59 % \label{eq: lbc_aaaa}59 % \label{eq:LBC_aaaa} 60 60 \frac{A^{lT} }{e_1 }\frac{\partial T}{\partial i}\equiv \frac{A_u^{lT} 61 61 }{e_{1u} } \; \delta_{i+1 / 2} \left[ T \right]\;\;mask_u … … 134 134 the no-slip boundary condition, simply by multiplying it by the mask$_{f}$ : 135 135 \[ 136 % \label{eq: lbc_bbbb}136 % \label{eq:LBC_bbbb} 137 137 \zeta \equiv \frac{1}{e_{1f} {\kern 1pt}e_{2f} }\left( {\delta_{i+1/2} 138 138 \left[ {e_{2v} \,v} \right]-\delta_{j+1/2} \left[ {e_{1u} \,u} \right]} … … 226 226 The north fold boundary condition has been introduced in order to handle the north boundary of 227 227 a three-polar ORCA grid. 228 Such a grid has two poles in the northern hemisphere (\autoref{fig: MISC_ORCA_msh},229 and thus requires a specific treatment illustrated in \autoref{fig: North_Fold_T}.228 Such a grid has two poles in the northern hemisphere (\autoref{fig:CFGS_ORCA_msh}, 229 and thus requires a specific treatment illustrated in \autoref{fig:LBC_North_Fold_T}. 230 230 Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition. 231 231 … … 235 235 \includegraphics[width=\textwidth]{Fig_North_Fold_T} 236 236 \caption{ 237 \protect\label{fig: North_Fold_T}237 \protect\label{fig:LBC_North_Fold_T} 238 238 North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$), 239 239 as used in ORCA 2, 1/4, and 1/12. … … 256 256 %----------------------------------------------------------------------------------------------- 257 257 258 For massively parallel processing (mpp), a domain decomposition method is used. The basic idea of the method is to split the large computation domain of a numerical experiment into several smaller domains and solve the set of equations by addressing independent local problems. Each processor has its own local memory and computes the model equation over a subdomain of the whole model domain. The subdomain boundary conditions are specified through communications between processors which are organized by explicit statements (message passing method). The present implementation is largely inspired by Guyon's work [Guyon 1995]. 258 For massively parallel processing (mpp), a domain decomposition method is used. 259 The basic idea of the method is to split the large computation domain of a numerical experiment into several smaller domains and 260 solve the set of equations by addressing independent local problems. 261 Each processor has its own local memory and computes the model equation over a subdomain of the whole model domain. 262 The subdomain boundary conditions are specified through communications between processors which are organized by 263 explicit statements (message passing method). 264 The present implementation is largely inspired by Guyon's work [Guyon 1995]. 259 265 260 266 The parallelization strategy is defined by the physical characteristics of the ocean model. … … 272 278 each processor sends to its neighbouring processors the update values of the points corresponding to 273 279 the interior overlapping area to its neighbouring sub-domain (\ie\ the innermost of the two overlapping rows). 274 Communications are first done according to the east-west direction and next according to the north-south direction. There is no specific communications for the corners. The communication is done through the Message Passing Interface (MPI) and requires \key{mpp\_mpi}. Use also \key{mpi2} if MPI3 is not available on your computer. 280 Communications are first done according to the east-west direction and next according to the north-south direction. 281 There is no specific communications for the corners. 282 The communication is done through the Message Passing Interface (MPI) and requires \key{mpp\_mpi}. 283 Use also \key{mpi2} if MPI3 is not available on your computer. 275 284 The data exchanges between processors are required at the very place where 276 285 lateral domain boundary conditions are set in the mono-domain computation: … … 285 294 \includegraphics[width=\textwidth]{Fig_mpp} 286 295 \caption{ 287 \protect\label{fig: mpp}296 \protect\label{fig:LBC_mpp} 288 297 Positioning of a sub-domain when massively parallel processing is used. 289 298 } … … 292 301 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 293 302 294 In \NEMO, the splitting is regular and arithmetic. The total number of subdomains corresponds to the number of MPI processes allocated to \NEMO\ when the model is launched (\ie\ mpirun -np x ./nemo will automatically give x subdomains). The i-axis is divided by \np{jpni} and the j-axis by \np{jpnj}. These parameters are defined in \nam{mpp} namelist. If \np{jpni} and \np{jpnj} are < 1, they will be automatically redefined in the code to give the best domain decomposition (see bellow). 295 296 Each processor is independent and without message passing or synchronous process, programs run alone and access just its own local memory. For this reason, the main model dimensions are now the local dimensions of the subdomain (pencil) that are named \jp{jpi}, \jp{jpj}, \jp{jpk}. 297 These dimensions include the internal domain and the overlapping rows. The number of rows to exchange (known as the halo) is usually set to one (nn\_hls=1, in \mdl{par\_oce}, and must be kept to one until further notice). The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}. The relationship between the whole domain and a sub-domain is: 298 \[ 299 jpi = ( jpiglo-2\times nn\_hls + (jpni-1) ) / jpni + 2\times nn\_hls 300 \] 301 \[ 303 In \NEMO, the splitting is regular and arithmetic. 304 The total number of subdomains corresponds to the number of MPI processes allocated to \NEMO\ when the model is launched 305 (\ie\ mpirun -np x ./nemo will automatically give x subdomains). 306 The i-axis is divided by \np{jpni} and the j-axis by \np{jpnj}. 307 These parameters are defined in \nam{mpp} namelist. 308 If \np{jpni} and \np{jpnj} are < 1, they will be automatically redefined in the code to give the best domain decomposition 309 (see bellow). 310 311 Each processor is independent and without message passing or synchronous process, programs run alone and access just its own local memory. 312 For this reason, 313 the main model dimensions are now the local dimensions of the subdomain (pencil) that are named \jp{jpi}, \jp{jpj}, \jp{jpk}. 314 These dimensions include the internal domain and the overlapping rows. 315 The number of rows to exchange (known as the halo) is usually set to one (nn\_hls=1, in \mdl{par\_oce}, 316 and must be kept to one until further notice). 317 The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}. 318 The relationship between the whole domain and a sub-domain is: 319 \begin{gather*} 320 jpi = ( jpiglo-2\times nn\_hls + (jpni-1) ) / jpni + 2\times nn\_hls \\ 302 321 jpj = ( jpjglo-2\times nn\_hls + (jpnj-1) ) / jpnj + 2\times nn\_hls 303 \ ]304 305 One also defines variables nldi and nlei which correspond to the internal domain bounds, and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain (\autoref{fig: mpp}). Note that since the version 4, there is no more extra-halo area as defined in \autoref{fig:mpp} so \jp{jpi} is now always equal to nlci and \jp{jpj} equal to nlcj.322 \end{gather*} 323 324 One also defines variables nldi and nlei which correspond to the internal domain bounds, and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain (\autoref{fig:LBC_mpp}). Note that since the version 4, there is no more extra-halo area as defined in \autoref{fig:LBC_mpp} so \jp{jpi} is now always equal to nlci and \jp{jpj} equal to nlcj. 306 325 307 326 An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 308 327 a global array (whole domain) by the relationship: 309 328 \[ 310 % \label{eq: lbc_nimpp}329 % \label{eq:LBC_nimpp} 311 330 T_{g} (i+nimpp-1,j+njmpp-1,k) = T_{l} (i,j,k), 312 331 \] … … 322 341 323 342 If the domain decomposition is automatically defined (when \np{jpni} and \np{jpnj} are < 1), the decomposition chosen by the model will minimise the sub-domain size (defined as $max_{all domains}(jpi \times jpj)$) and maximize the number of eliminated land subdomains. This means that no other domain decomposition (a set of \np{jpni} and \np{jpnj} values) will use less processes than $(jpni \times jpnj - N_{land})$ and get a smaller subdomain size. 324 In order to specify $N_{mpi}$ properly (minimize $N_{useless}$), you must run the model once with \np{ln\_list} activated. In this case, the model will start the initialisation phase, print the list of optimum decompositions ($N_{mpi}$, \np{jpni} and \np{jpnj}) in \texttt{ocean.output} and directly abort. The maximum value of $N_{mpi}$ tested in this list is given by $max(N_{MPI\_tasks}, \np{jpni} \times \np{jpnj})$. For example, run the model on 40 nodes with ln\_list activated and $\np{jpni} = 10000$ and $\np{jpnj} = 1$, will print the list of optimum domains decomposition from 1 to about 10000. 325 326 Processors are numbered from 0 to $N_{mpi} - 1$. Subdomains containning some ocean points are numbered first from 0 to $jpni * jpnj - N_{land} -1$. The remaining $N_{useless}$ land subdomains are numbered next, which means that, for a given (\np{jpni}, \np{jpnj}), the numbers attributed to he ocean subdomains do not vary with $N_{useless}$. 343 In order to specify $N_{mpi}$ properly (minimize $N_{useless}$), you must run the model once with \np{ln\_list} activated. In this case, the model will start the initialisation phase, print the list of optimum decompositions ($N_{mpi}$, \np{jpni} and \np{jpnj}) in \texttt{ocean.output} and directly abort. The maximum value of $N_{mpi}$ tested in this list is given by $max(N_{MPI\_tasks}, \np{jpni} \times \np{jpnj})$. For example, run the model on 40 nodes with ln\_list activated and $\np{jpni} = 10000$ and $\np{jpnj} = 1$, will print the list of optimum domains decomposition from 1 to about 10000. 344 345 Processors are numbered from 0 to $N_{mpi} - 1$. Subdomains containning some ocean points are numbered first from 0 to $jpni * jpnj - N_{land} -1$. The remaining $N_{useless}$ land subdomains are numbered next, which means that, for a given (\np{jpni}, \np{jpnj}), the numbers attributed to he ocean subdomains do not vary with $N_{useless}$. 327 346 328 347 When land processors are eliminated, the value corresponding to these locations in the model output files is undefined. \np{ln\_mskland} must be activated in order avoid Not a Number values in output files. Note that it is better to not eliminate land processors when creating a meshmask file (\ie\ when setting a non-zero value to \np{nn\_msh}). … … 332 351 \begin{center} 333 352 \includegraphics[width=\textwidth]{Fig_mppini2} 334 \caption 335 \protect\label{fig: mppini2}353 \caption[Atlantic domain]{ 354 \protect\label{fig:LBC_mppini2} 336 355 Example of Atlantic domain defined for the CLIPPER projet. 337 356 Initial grid is composed of 773 x 1236 horizontal points. … … 374 393 %---------------------------------------------- 375 394 \subsection{Namelists} 376 \label{subsec: BDY_namelist}395 \label{subsec:LBC_bdy_namelist} 377 396 378 397 The BDY module is activated by setting \np{ln\_bdy}\forcode{=.true.} . … … 384 403 In the example above, there are two boundary sets, the first of which is defined via a file and 385 404 the second is defined in the namelist. 386 For more details of the definition of the boundary geometry see section \autoref{subsec: BDY_geometry}.405 For more details of the definition of the boundary geometry see section \autoref{subsec:LBC_bdy_geometry}. 387 406 388 407 For each boundary set a boundary condition has to be chosen for the barotropic solution … … 441 460 %---------------------------------------------- 442 461 \subsection{Flow relaxation scheme} 443 \label{subsec: BDY_FRS_scheme}462 \label{subsec:LBC_bdy_FRS_scheme} 444 463 445 464 The Flow Relaxation Scheme (FRS) \citep{davies_QJRMS76,engedahl_T95}, … … 448 467 Given a model prognostic variable $\Phi$ 449 468 \[ 450 % \label{eq: bdy_frs1}469 % \label{eq:LBC_bdy_frs1} 451 470 \Phi(d) = \alpha(d)\Phi_{e}(d) + (1-\alpha(d))\Phi_{m}(d)\;\;\;\;\; d=1,N 452 471 \] … … 457 476 the prognostic equation for $\Phi$ of the form: 458 477 \[ 459 % \label{eq: bdy_frs2}478 % \label{eq:LBC_bdy_frs2} 460 479 -\frac{1}{\tau}\left(\Phi - \Phi_{e}\right) 461 480 \] 462 481 where the relaxation time scale $\tau$ is given by a function of $\alpha$ and the model time step $\Delta t$: 463 482 \[ 464 % \label{eq: bdy_frs3}483 % \label{eq:LBC_bdy_frs3} 465 484 \tau = \frac{1-\alpha}{\alpha} \,\rdt 466 485 \] … … 472 491 The function $\alpha$ is specified as a $tanh$ function: 473 492 \[ 474 % \label{eq: bdy_frs4}493 % \label{eq:LBC_bdy_frs4} 475 494 \alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right), \quad d=1,N 476 495 \] … … 480 499 %---------------------------------------------- 481 500 \subsection{Flather radiation scheme} 482 \label{subsec: BDY_flather_scheme}501 \label{subsec:LBC_bdy_flather_scheme} 483 502 484 503 The \citet{flather_JPO94} scheme is a radiation condition on the normal, 485 504 depth-mean transport across the open boundary. 486 505 It takes the form 487 \begin{equation} \label{eq:bdy_fla1} 488 U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right), 506 \begin{equation} 507 \label{eq:LBC_bdy_fla1} 508 U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right), 489 509 \end{equation} 490 510 where $U$ is the depth-mean velocity normal to the boundary and $\eta$ is the sea surface height, … … 495 515 the external depth-mean normal velocity, 496 516 plus a correction term that allows gravity waves generated internally to exit the model boundary. 497 Note that the sea-surface height gradient in \autoref{eq: bdy_fla1} is a spatial gradient across the model boundary,517 Note that the sea-surface height gradient in \autoref{eq:LBC_bdy_fla1} is a spatial gradient across the model boundary, 498 518 so that $\eta_{e}$ is defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the $T$ points with $nbr=2$. 499 519 $U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie\ between the two $T$ grid points. … … 501 521 %---------------------------------------------- 502 522 \subsection{Orlanski radiation scheme} 503 \label{subsec: BDY_orlanski_scheme}523 \label{subsec:LBC_bdy_orlanski_scheme} 504 524 505 525 The Orlanski scheme is based on the algorithm described by \citep{marchesiello.mcwilliams.ea_OM01}, hereafter MMS. … … 507 527 The adaptive Orlanski condition solves a wave plus relaxation equation at the boundary: 508 528 \begin{equation} 509 \frac{\partial\phi}{\partial t} + c_x \frac{\partial\phi}{\partial x} + c_y \frac{\partial\phi}{\partial y} = 510 -\frac{1}{\tau}(\phi - \phi^{ext})511 \label{eq:wave_continuous} 529 \label{eq:LBC_wave_continuous} 530 \frac{\partial\phi}{\partial t} + c_x \frac{\partial\phi}{\partial x} + c_y \frac{\partial\phi}{\partial y} = 531 -\frac{1}{\tau}(\phi - \phi^{ext}) 512 532 \end{equation} 513 533 … … 515 535 velocities are diagnosed from the model fields as: 516 536 517 \begin{equation} \label{eq:cx} 518 c_x = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial x}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} 537 \begin{equation} 538 \label{eq:LBC_cx} 539 c_x = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial x}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} 519 540 \end{equation} 520 541 \begin{equation} 521 \label{eq:cy}522 c_y = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial y}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2}542 \label{eq:LBC_cy} 543 c_y = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial y}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} 523 544 \end{equation} 524 545 525 546 (As noted by MMS, this is a circular diagnosis of the phase speeds which only makes sense on a discrete grid). 526 Equation (\autoref{eq: wave_continuous}) is defined adaptively depending on the sign of the phase velocity normal to the boundary $c_x$.547 Equation (\autoref{eq:LBC_wave_continuous}) is defined adaptively depending on the sign of the phase velocity normal to the boundary $c_x$. 527 548 For $c_x$ outward, we have 528 549 … … 534 555 535 556 \begin{equation} 536 \tau = \tau_{in}\,\,\,;\,\,\, c_x = c_y = 0 537 \label{eq:tau_in} 557 \label{eq:LBC_tau_in} 558 \tau = \tau_{in}\,\,\,;\,\,\, c_x = c_y = 0 538 559 \end{equation} 539 560 540 561 Generally the relaxation time scale at inward propagation points (\np{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation 541 562 points (\np{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points. 542 See \autoref{subsec: BDY_relaxation} for detailed on the spatial shape of the scaling.\\563 See \autoref{subsec:LBC_bdy_relaxation} for detailed on the spatial shape of the scaling.\\ 543 564 The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming 544 that $c_y$ is zero in equation (\autoref{eq: wave_continuous}), but including545 this term in the denominator of equation (\autoref{eq: cx}). Both versions of the scheme are options in BDY. Equations546 (\autoref{eq: wave_continuous}) - (\autoref{eq:tau_in}) correspond to equations (13) - (15) and (2) - (3) in MMS.\\565 that $c_y$ is zero in equation (\autoref{eq:LBC_wave_continuous}), but including 566 this term in the denominator of equation (\autoref{eq:LBC_cx}). Both versions of the scheme are options in BDY. Equations 567 (\autoref{eq:LBC_wave_continuous}) - (\autoref{eq:LBC_tau_in}) correspond to equations (13) - (15) and (2) - (3) in MMS.\\ 547 568 548 569 %---------------------------------------------- 549 570 \subsection{Relaxation at the boundary} 550 \label{subsec: BDY_relaxation}571 \label{subsec:LBC_bdy_relaxation} 551 572 552 573 In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. … … 564 585 %---------------------------------------------- 565 586 \subsection{Boundary geometry} 566 \label{subsec: BDY_geometry}587 \label{subsec:LBC_bdy_geometry} 567 588 568 589 Each open boundary set is defined as a list of points. … … 615 636 %---------------------------------------------- 616 637 \subsection{Input boundary data files} 617 \label{subsec: BDY_data}638 \label{subsec:LBC_bdy_data} 618 639 619 640 The data files contain the data arrays in the order in which the points are defined in the $nbi$ and $nbj$ arrays. … … 655 676 %---------------------------------------------- 656 677 \subsection{Volume correction} 657 \label{subsec: BDY_vol_corr}678 \label{subsec:LBC_bdy_vol_corr} 658 679 659 680 There is an option to force the total volume in the regional model to be constant. … … 672 693 %---------------------------------------------- 673 694 \subsection{Tidal harmonic forcing} 674 \label{subsec: BDY_tides}695 \label{subsec:LBC_bdy_tides} 675 696 676 697 %-----------------------------------------nambdy_tide--------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.