Physical/Domain Boundary Conditions
There are two primary types of physical/domain boundary conditions: those which rely only on the data in the valid regions, and those which rely on externally specified values.
REMORA allows users to specify types of boundary condition with keywords in the inputs file.
The option remora.boundary_per_variable controls whether conditions are specified on a
per-side (false) or per-variable (true) basis. Conditions are only set on the x- and y-faces.
Boundaries in the z-direction always correspond to the sea floor and surface. Bottom drag is specified with
remora.rdrag (see Physics Parameters), and surface wind
stress is specified by the function init_analytic_smflux in prob.cpp.
REMORA also implements the ROMS bulk fluxes parameterization with optional evaporation-precipitation. The
parametrization can be turned on with remora.bulk_fluxes. Further options can be found in the
parameter list.
Boundary per side
To set boundary conditions per domain side for all variables, set
remora.boundary_per_variable = false. This is the default behavior.
The information for each face is preceded by
remora.bc.xlo.type, remora.bc.xhi.type, remora.bc.ylo.type, or remora.bc.yhi.type. Spelling of the type matters; capitalization does not. The
options for boundary conditions per side are listed below.
periodic
inflow
outflow
slipwall
noslipwall
symmetry
clamped
Each of these types of physical boundary condition has a mapping to a mathematical boundary condition
for each type; this is summarized in the table below, along with the corresponding ROMS boundary conditions.
If periodic is selected, it must be used for both low and high faces in a direction. The remora.is_periodic
flag must match as described in ProblemGeometry.
For example, setting
remora.bc.xlo.type = "Inflow"
remora.bc.xhi.type = "Outflow"
remora.bc.ylo.type = "periodic" #optional
remora.bc.yhi.type = "periodic" #optional
remora.is_periodic = 0 1 0
would define a problem with inflow in the low-\(x\) direction,
outflow in the high-\(x\) direction, periodic in the \(y\)-direction,
and slip wall on the low and high \(y\)-faces, and
Note that no keyword is needed for a periodic boundary, here only the
specification in remora.is_periodic is needed.
Boundary per variable
To set different boundary conditions for different variables on each side of the domain, set remora.boundary_per_variable = true.
If true, conditions must be set for all of the following variables.
temperature:
remora.bc.temp.typesalinity:
remora.bc.salt.typeadditional scalars:
remora.bc.scalar.type, or one entry per tracer (see below)3D u-velocity:
remora.bc.u.type3D v-velocity:
remora.bc.v.type2D u-velocity:
remora.bc.ubar.type2D v-velocity:
remora.bc.vbar.typesea surface height:
remora.bc.zeta.typeturbulent kinetic energy:
remora.bc.tke.type
They must be set to a list of four conditions in the ROMS order West, South, East, North,
mapping onto low-\(x\), low-\(y\), high-\(x\), high-\(y\). South is the
low-\(y\) face, the one remora.bc.ylo.type names and *_south boundary data fills.
The options are
periodic
inflow
outflow
slipwall
noslipwall
symmetry
clamped
chapman
flather
orlanski_rad
orlanski_rad_nudg
The corresponding ROMS conditions are indicated in the tables below.
For example, setting
# West South East North
remora.bc.temp.type = periodic clamped periodic clamped
remora.bc.salt.type = periodic clamped periodic clamped
remora.bc.scalar.type = periodic clamped periodic clamped
remora.bc.u.type = periodic clamped periodic clamped
remora.bc.v.type = periodic clamped periodic clamped
remora.bc.w.type = periodic clamped periodic clamped
remora.bc.ubar.type = periodic flather periodic flather
remora.bc.vbar.type = periodic flather periodic flather
remora.bc.zeta.type = periodic chapman periodic chapman
remora.bc.tke.type = periodic outflow periodic outflow
remora.is_periodic = 1 0 0
will define a problem that is periodic on the Western and Eastern sides. Temperature, salinity, passive scalar, 3D u-velocity, and 3D v-velocity will be clamped to values given in a NetCDF file specified by remora.nc_bdry_file_0. The 2D momentum and zeta BCs are calculated from the Chapman/Flather conditions, with nudging towards values given in the boundary NetCDF file.
Boundary conditions for individual tracers
Every cell-centered tracer can be configured on its own, using the same options and the same
file-driven data path as temperature and salinity. In per-variable mode, address a tracer by its
own name rather than by the shared scalar keyword:
# West South East North
remora.bc.NO3.type = periodic clamped periodic clamped
remora.bc.oxygen.type = periodic outflow periodic outflow
The tracer names are the same ones used for plotfile output: temp and salt, then either
the biology tracer names when remora.biology_model is active
(NO3, NH4, chlorophyll, …) or tracer, tracer_1, … otherwise.
remora.bc.scalar.type still works and still applies to every tracer beyond salt. A per-tracer
entry takes precedence where one is given, so the two can be mixed: set scalar for the common
case and override only the tracers that differ.
Tracers configured with clamped or orlanski_rad_nudg read their boundary values from the
NetCDF boundary file, following the same naming convention as temperature and salinity: a tracer
named NO3 reads NO3_west, NO3_east, NO3_south, and NO3_north. Only the sides
that actually need data are read, so the file need not contain anything for a tracer left on a
local condition such as outflow or slipwall. If a tracer is given a file-driven condition
and the file does not carry the matching variables, the run stops at setup and names them. The
time axis for a tracer’s boundary data can be named with remora.bdy_<name>_time_varname (for
example remora.bdy_NO3_time_varname), defaulting to remora.bdy_time_varname as for the
other variables.
This holds in per-side mode as well: a side keyword covers every variable at once, tracers
included, so a per-side clamped or orlanski_rad_nudg drives every tracer the run carries
from file, not temperature and salinity alone. A ROMS boundary file that carries temperature and
salinity but nothing for the extra tracers will stop the run at setup, naming the variables it
lacks. Either give the file the missing fields, drop the extra tracers (remora.nscalar = 0),
or switch to per-variable mode and state each tracer’s condition outright – outflow for a
tracer with no boundary data of its own. remora.nscalar defaults to 0, so this only comes
up for a run that asks for dye or turns on a biology model.
Nudging for orlanski_rad_nudg uses the tracer timescale remora.tnudg for every tracer,
matching the ROMS default of a single Tnudg shared across tracers. A tracer picks up a
spatially varying coefficient instead when climatology nudging is turned on for it and
remora.nc_clim_coeff_file carries a {var}_NudgeCoef field for that tracer; otherwise it
keeps the constant derived from remora.tnudg. See Climatology nudging for individual tracers.
Boundary condition options
Boundary types for per-side or per-variable specification
Scroll table to the right if not all visible. Rightmost column is sea surface height.
Type |
ROMS name |
Normal vel (3D) |
Tangential vel (3D) |
Normal vel (2D) |
Tangential vel (2D) |
T, S, etc. |
sea surface height |
|---|---|---|---|---|---|---|---|
periodic |
Per |
periodic |
periodic |
periodic |
periodic |
periodic |
periodic |
inflow |
Cla |
ext_dir |
ext_dir |
ext_dir |
ext_dir |
ext_dir |
ext_dir |
outflow |
Gra |
foextrap |
foextrap |
foextrap |
foextrap |
foextrap |
foextrap |
slipwall |
Clo |
ext_dir (set to 0) |
foextrap |
ext_dir (set to 0) |
foextrap |
ext_dir/ foextrap |
ext_dir/ foextrap |
noslipwall |
N/A |
ext_dir (set to 0) |
ext_dir (set to 0) |
ext_dir (set to 0) |
ext_dir (set to 0) |
ext_dir/ foextrap |
ext_dir/ foextrap |
symmetry |
N/A |
reflect_odd |
reflect_even |
reflect_odd |
reflect_even |
reflect_even |
reflect_even |
clamped* |
Cla |
clamped |
clamped |
clamped |
clamped |
clamped |
clamped |
Boundary types for per-variable specification ONLY
Scroll table to the right if not all visible. Rightmost column is sea surface height.
Type |
ROMS name |
Normal vel (3D) |
Tangential vel (3D) |
Normal vel (2D) |
Tangential vel (2D) |
T, S, etc. |
sea surface height |
|---|---|---|---|---|---|---|---|
chapman* |
Che |
N/A |
N/A |
N/A |
N/A |
N/A |
chapman |
flather* |
Fla |
N/A |
N/A |
flather |
flather |
N/A |
N/A |
orlanski_rad |
Rad |
orlanski |
orlanski |
orlanski |
orlanski |
orlanski |
orlanski |
orlanski_rad_nudg* |
RadNud |
orlanski w/nudging |
orlanski w/nudging |
orlanski w/nudging |
orlanski w/nudging |
orlanski w/nudging |
orlanski w/nudging |
The asterisks (*) indicate conditions that require the specification of a boundary file.
Here ext_dir, foextrap, and reflect_even refer to AMReX keywords. The ext_dir type
refers to an “external Dirichlet” boundary, which means the values must be specified by the user, unless
marked as set to 0 in the table above.
The foextrap type refers to “first order extrapolation” which sets all the ghost values to the
same value in the last valid cell/face. (AMReX also has a hoextrap, or “higher order extrapolation”
option, which does a linear extrapolation from the two nearest valid values.)
As an example,
remora.bc.xlo.type = "Inflow"
remora.bc.xlo.velocity = 1. 0.9 0.
remora.bc.xlo.temp = 15.
remora.bc.xlo.salt = 35.
remora.bc.xlo.tracer = 2.
sets the boundary condition type at the low x face to be an inflow with xlo.type = “Inflow”.
The velocity components take their value from velocity; each tracer takes one keyed by its
own name. There is no keyword standing in for “the remaining tracers”: a side covers all of
them, so every tracer the run carries – temp, salt, each dye, each biology tracer –
needs its own entry on an inflow face, and a value always says which tracer it is for.
ubar, vbar, zeta and tke have no input of their own and are given zero.
Because ubar and vbar are among those, an inflow face carries no barotropic normal
velocity, and the barotropic correction holds the net volume flux through the face near zero
whatever velocity says. Tracers still enter such a face by horizontal diffusion, and the
inflow values above are what they diffuse from, but inflow cannot presently be used to drive
a prescribed advective transport through the boundary.
In per-variable mode the prefix already names the variable, so value sits under it –
remora.bc.temp.value, remora.bc.NO3.value, remora.bc.u.velocity – and applies to
whichever of that variable’s sides are inflow. A tracer that takes its condition from the shared
remora.bc.scalar.type reads remora.bc.scalar.value along with it; give a tracer its own
.type to give it its own value.
value is read only under a variable prefix, and there is no scalar keyword for a tracer
inflow value at all. Earlier versions read scalar under a side prefix for the tracers past
salt, and read nothing for temperature or salinity, so no configuration that ran correctly
used it.
An inflow face missing a tracer value stops the run at setup, naming the input it wants, as a
missing velocity always has. There is no default: what a missing entry used to leave behind
was a placeholder of order \(10^{19}\), which ext_dir then wrote into the ghost cells.
We note that noslipwall allows for non-zero tangential velocities to be specified, such as
remora.is_periodic = 1 0 0
remora.bc.ylo.type = "NoSlipWall"
remora.bc.yhi.type = "NoSlipWall"
remora.bc.ylo.velocity = 0.0 0.0 0.0
remora.bc.yhi.velocity = 2.0 0.0 0.0
It is important to note that external Dirichlet boundary data should be specified as the value on the face of the cell bounding the domain, even for cell-centered state data.
Nudging options
When using orlanski_rad_nudg, the nudging strength is specified by input parameters. When climatology nudging is turned on, timescales will instead be read from the file specified in remora.nc_clim_coeff_file. remora.obcfac will still be used.
Parameter |
Definition |
Acceptable Values |
Default |
|---|---|---|---|
remora.tnudg |
Nudging timescale for tracers in days |
Positive real |
0.0 |
remora.m3nudg |
Nudging timescale for 3D momentum in days |
Positive real |
0.0 |
remora.obcfac |
Ratio between inflow and outflow boundary conditions |
Positive real |
0.0 |