233 |
and for each meridional position $j=1,\ldots,N_y$, a zonal index |
and for each meridional position $j=1,\ldots,N_y$, a zonal index |
234 |
$i$ specifies the Eastern/Western OB position. |
$i$ specifies the Eastern/Western OB position. |
235 |
For Northern/Southern OB this defines an $N_x$-dimensional |
For Northern/Southern OB this defines an $N_x$-dimensional |
236 |
``row'' array $\tt OB\_Jnorth(Ny)$ / $\tt OB\_Jsouth(Ny)$, |
``row'' array $\tt OB\_Jnorth(Nx)$ / $\tt OB\_Jsouth(Nx)$, |
237 |
and an $N_y$-dimenisonal |
and an $N_y$-dimenisonal |
238 |
``column'' array $\tt OB\_Ieast(Nx)$ / $\tt OB\_Iwest(Nx)$. |
``column'' array $\tt OB\_Ieast(Ny)$ / $\tt OB\_Iwest(Ny)$. |
239 |
Positions determined in this way allows Northern/Southern |
Positions determined in this way allows Northern/Southern |
240 |
OBs to be at variable $j$ (or $y$) positions, and Eastern/Western |
OBs to be at variable $j$ (or $y$) positions, and Eastern/Western |
241 |
OBs at variable $i$ (or $x$) positions. |
OBs at variable $i$ (or $x$) positions. |
356 |
in \code{data}, see \code{verification/exp4} for an example. |
in \code{data}, see \code{verification/exp4} for an example. |
357 |
|
|
358 |
\paragraph{OBCS\_CALC\_STEVENS:} ~ \\ |
\paragraph{OBCS\_CALC\_STEVENS:} ~ \\ |
359 |
(THE IMPLEMENTATION OF THESE BOUNDARY CONDITIONS IS NOT COMPLETE. SO |
(THE IMPLEMENTATION OF THESE BOUNDARY CONDITIONS IS NOT |
360 |
FAR ONLY EASTERN AND WESTERN BOUNDARIES ARE SUPPORTED.) \\ |
COMPLETE. PASSIVE TRACERS, SEA ICE AND NON-LINEAR FREE SURFACE ARE NOT |
361 |
|
SUPPORTED PROPERLY.) \\ |
362 |
The boundary conditions following \citet{stevens:90} require the |
The boundary conditions following \citet{stevens:90} require the |
363 |
vertically averaged normal velocity (originally specified as a stream |
vertically averaged normal velocity (originally specified as a stream |
364 |
function along the open boundary) $\bar{u}_{ob}$ and the tracer fields |
function along the open boundary) $\bar{u}_{ob}$ and the tracer fields |
365 |
$\chi_{ob}$ (note: passive tracers are currently not implemented and |
$\chi_{ob}$ (note: passive tracers are currently not implemented and |
366 |
the code stops when package \code{ptracers} is used together with this |
the code stops when package \code{ptracers} is used together with this |
367 |
option). Currently, the code vertically averages the normal velocity |
option). Currently, the code vertically averages the normal velocity |
368 |
as specified. From these prescribed values the code computes the |
as specified in \code{OB[E,W]u} or \code{OB[N,S]v}. From these |
369 |
boundary values for the next timestep $n+1$ as follows (as an |
prescribed values the code computes the boundary values for the next |
370 |
example, we use the notation for an eastern or western boundary): |
timestep $n+1$ as follows (as an example, we use the notation for an |
371 |
|
eastern or western boundary): |
372 |
\begin{itemize} |
\begin{itemize} |
373 |
\item $u^{n+1}(y,z) = \bar{u}_{ob}(y) + u'(y,z)$, where $u_{n}'$ is the |
\item $u^{n+1}(y,z) = \bar{u}_{ob}(y) + (u')^{n}(y,z)$, where |
374 |
deviation from the vertically averaged velocity one grid point |
$(u')^{n}$ is the deviation from the vertically averaged velocity at |
375 |
inward from the boundary. |
timestep $n$ on the boundary. $(u')^{n}$ is computed in the previous |
376 |
|
time step $n$ from the intermediate velocity $u^*$ prior to the |
377 |
|
correction step (see section \ref{sec:time_stepping}, e.g., |
378 |
|
eq.\,(\ref{eq:ustar-backward-free-surface})). |
379 |
|
% and~(\ref{eq:vstar-backward-free-surface})). |
380 |
|
(This velocity is not |
381 |
|
available at the beginning of the next time step $n+1$, when |
382 |
|
S/R~OBCS\_CALC/OBCS\_CALC\_STEVENS are called, therefore it needs to |
383 |
|
be saved in S/R~DYNAMICS by calling S/R~OBCS\_SAVE\_UV\_N and also |
384 |
|
stored in a separate restart files |
385 |
|
\verb+pickup_stevens[N/S/E/W].${iteration}.data+) |
386 |
|
% Define CPP-flag OBCS\_STEVENS\_USE\_INTERIOR\_VELOCITY to use the |
387 |
|
% velocity one grid point inward from the boundary. |
388 |
\item If $u^{n+1}$ is directed into the model domain, the boudary |
\item If $u^{n+1}$ is directed into the model domain, the boudary |
389 |
value for tracer $\chi$ is restored to the prescribed values: |
value for tracer $\chi$ is restored to the prescribed values: |
390 |
\[\chi^{n+1} = \chi^{n} + \frac{\Delta{t}}{\tau_\chi} (\chi_{ob} - |
\[\chi^{n+1} = \chi^{n} + \frac{\Delta{t}}{\tau_\chi} (\chi_{ob} - |
391 |
\chi^{n}),\] where $\tau_\chi$ is the relaxation time |
\chi^{n}),\] where $\tau_\chi$ is the relaxation time |
392 |
scale \texttt{T/SrelaxStevens}. |
scale \texttt{T/SrelaxStevens}. The new $\chi^{n+1}$ is then subject |
393 |
\item If $u^{n+1}$ is directed out of the model domain, the tracer is |
to the advection by $u^{n+1}$. |
394 |
advected out of the domain with $u^{n+1}+c$, where $c$ is a phase |
\item If $u^{n+1}$ is directed out of the model domain, the tracer |
395 |
velocity estimated as |
$\chi^{n+1}$ on the boundary at timestep $n+1$ is estimated from |
396 |
$\frac{1}{2}\frac{\partial\chi}{\partial{t}}/\frac{\partial\chi}{\partial{x}}$. |
advection out of the domain with $u^{n+1}+c$, where $c$ is |
397 |
|
a phase velocity estimated as |
398 |
|
$\frac{1}{2}\frac{\partial\chi}{\partial{t}}/\frac{\partial\chi}{\partial{x}}$. The |
399 |
|
numerical scheme is (as an example for an eastern boundary): |
400 |
|
\[\chi_{i_{b},j,k}^{n+1} = \chi_{i_{b},j,k}^{n} + \Delta{t} |
401 |
|
(u^{n+1}+c)_{i_{b},j,k}\frac{\chi_{i_{b},j,k}^{n} |
402 |
|
- \chi_{i_{b}-1,j,k}^{n}}{\Delta{x}_{i_{b},j}^{C}}\mbox{, if }u_{i_{b},j,k}^{n+1}>0, |
403 |
|
\] where $i_{b}$ is the boundary index.\\ |
404 |
For test purposes, the phase velocity contribution or the entire |
For test purposes, the phase velocity contribution or the entire |
405 |
advection can |
advection can be turned off by setting the corresponding parameters |
|
be turned off by setting the corresponding parameters |
|
406 |
\texttt{useStevensPhaseVel} and \texttt{useStevensAdvection} to |
\texttt{useStevensPhaseVel} and \texttt{useStevensAdvection} to |
407 |
\texttt{.FALSE.}.\end{itemize} See \citet{stevens:90} for details. |
\texttt{.FALSE.}. |
408 |
|
\end{itemize} |
409 |
|
See \citet{stevens:90} for details. With this boundary condition |
410 |
|
specifying the exact net transport across the open boundary is simple, |
411 |
|
so that balancing the flow with (S/R~OBCS\_BALANCE\_FLOW, see next |
412 |
|
paragraph) is usually not necessary. |
413 |
|
|
414 |
\paragraph{OBCS\_BALANCE\_FLOW:} ~ \\ |
\paragraph{OBCS\_BALANCE\_FLOW:} ~ \\ |
415 |
% |
% |
425 |
how the net inflow is redistributed as small correction velocities |
how the net inflow is redistributed as small correction velocities |
426 |
between the individual sections. A value ``\code{-1}'' balances an |
between the individual sections. A value ``\code{-1}'' balances an |
427 |
individual boundary, values $>0$ determine the relative size of the |
individual boundary, values $>0$ determine the relative size of the |
428 |
correction. For example, with the values |
correction. For example, the values |
429 |
\begin{tabbing} |
\begin{tabbing} |
430 |
\code{OBCS\_balanceFac\_E}\=\code{ = 1.,} \\ |
\code{OBCS\_balanceFacE}\code{ = 1.,} \\ |
431 |
\code{OBCS\_balanceFac\_W}\>\code{ = -1.,} \\ |
\code{OBCS\_balanceFacW}\code{ = -1.,} \\ |
432 |
\code{OBCS\_balanceFac\_N}\>\code{ = 2.,} \\ |
\code{OBCS\_balanceFacN}\code{ = 2.,} \\ |
433 |
\code{OBCS\_balanceFac\_S}\>\code{ = 0.,} |
\code{OBCS\_balanceFacS}\code{ = 0.,} |
434 |
\end{tabbing} |
\end{tabbing} |
435 |
will make the model |
make the model |
436 |
\begin{itemize} |
\begin{itemize} |
437 |
\item correct Western \code{OBWu} by substracting a uniform velocity to |
\item correct Western \code{OBWu} by substracting a uniform velocity to |
438 |
ensure zero net transport through Western OB |
ensure zero net transport through the Western open boundary; |
439 |
\item correct Eastern and Northern normal flow, with the Northern |
\item correct Eastern and Northern normal flow, with the Northern |
440 |
velocity correction two times larger than Eastern correction, but |
velocity correction two times larger than the Eastern correction, but |
441 |
not the Southern normal flow to ensure that the total inflow through |
\emph{not} the Southern normal flow, to ensure that the total inflow through |
442 |
East, Northern, and Southern OB is balanced |
East, Northern, and Southern open boundary is balanced. |
443 |
\end{itemize} |
\end{itemize} |
444 |
|
|
445 |
The old method of balancing the net flow for all sections individually |
The old method of balancing the net flow for all sections individually |
452 |
u(y,z) - \int_{\mbox{western boundary}}u\,dy\,dz \approx OBNu(j,k) - \sum_{j,k} |
u(y,z) - \int_{\mbox{western boundary}}u\,dy\,dz \approx OBNu(j,k) - \sum_{j,k} |
453 |
OBNu(j,k) h_{w}(i_{b},j,k)\Delta{y_G(i_{b},j)}\Delta{z(k)}. |
OBNu(j,k) h_{w}(i_{b},j,k)\Delta{y_G(i_{b},j)}\Delta{z(k)}. |
454 |
\] |
\] |
455 |
This also ensures a net total inflow of zero through all boundaries to |
This also ensures a net total inflow of zero through all boundaries, |
456 |
make it a useful flag for preventing infinite sea-level change within |
but this combination of flags is \emph{not} useful if you want to |
457 |
the domain, but this combination of flags is \emph{not} useful if you |
simulate, say, a sector of the Southern Ocean with a strong ACC |
458 |
want to simulate, say, a sector of the Southern Ocean with a strong |
entering through the western and leaving through the eastern boundary, |
459 |
ACC entering through the western and leaving through the eastern |
because the value of ``\code{-1}'' for these flags will make sure that |
460 |
boundary, because the value of ``\code{-1}'' for these flags will make |
the strong inflow is removed. Clearly, gobal balancing with |
461 |
sure that the strong inflow is removed. |
\code{OBCS\_balanceFacE/W/N/S} $\ge0$ is the preferred method. |
462 |
|
|
463 |
\paragraph{OBCS\_APPLY\_*:} ~ \\ |
\paragraph{OBCS\_APPLY\_*:} ~ \\ |
464 |
~ |
~ |
480 |
where $\chi$ is the model variable (U/V/T/S) in the interior, |
where $\chi$ is the model variable (U/V/T/S) in the interior, |
481 |
$\chi_{BC}$ the boundary value, $L$ the thickness of the sponge layer |
$\chi_{BC}$ the boundary value, $L$ the thickness of the sponge layer |
482 |
(runtime parameter \code{spongeThickness} in number of grid points), |
(runtime parameter \code{spongeThickness} in number of grid points), |
483 |
$\delta{L}\in[0,L]$ ($l\in[0,1]$) the distance from the boundary (also in grid points), and |
$\delta{L}\in[0,L]$ ($\frac{\delta{L}}{L}=l\in[0,1]$) the distance from the boundary (also in grid points), and |
484 |
$\tau_{b}$ (runtime parameters \code{Urelaxobcsbound} and |
$\tau_{b}$ (runtime parameters \code{Urelaxobcsbound} and |
485 |
\code{Vrelaxobcsbound}) and $\tau_{i}$ (runtime parameters |
\code{Vrelaxobcsbound}) and $\tau_{i}$ (runtime parameters |
486 |
\code{Urelaxobcsinner} and \code{Vrelaxobcsinner}) the relaxation time |
\code{Urelaxobcsinner} and \code{Vrelaxobcsinner}) the relaxation time |