next up previous
Next: sigmaset.F Up: The Proudman Oceanographic Laboratory Previous: scoordset.F

Subsections


setopenbc.F


subroutine setopenbc

Description

The model allows open boundaries anywhere within the global domain icg=1..l, icg=1,m. The boundaries themselves are defined to lie along points where scalar variables are defined (b-points), so any non-land point at the edge of the global domain must be an open boundary point. The default is to just set these points. incb(i,j) (set in boset.F (27.1)) and ifaceob are used to defined location and orientation of open boundaries. This routine uses global versions of these on the master processor: incb_glob and ifaceob_glob.

The array ifaceob has non-zero values at open boundary points according to which faces are open (i.e. are not shared with another model b-point). At i,j, ifaceob(k,i,j) =1 if these faces are open:

k=1 south
k=2 north
k=3 west
k=4 east

Additionally points can be read in from openbcpoints.dat. This lists icg, jcg points and ifaceob values; ifaceob_glob and incb_glob are set accordingly.

Once ifaceob_glob is defined it is used to set global arrays that list where boundary condition data are required. Depending on the variable and type of boundary conditions used, data is required at three possible locations. These are:

iubc(nubc),jubc(nubc) i,j where u,v data is needed
izbc(nubc),jzbc(nubc) i,j where zet data is needed
ibbc(nubc),jbbc(nubc) i,j where T and S data is needed

These are then copied back to each processor as well as being written to files for boundary condition generation. The arrays ifaceob_glob and incb_glob are distributed to ifaceob and incb for use by the boundary condtion routines

Subroutine Arguments

none

Local variables

i,j,k,icg,jcg Grid indices.
npts,iface Number and orientation of extra points read in.
iu_bc, ib_bc Global arrays indicating points where $u$ and $T$ boundary data is needed
ifaceob_glob Global version of ifaceob, the orientation of the open boundary points.
incb_glob Global version of incb the location of the open boundary points.
lat,lon Positions for outputting the location of open boundary points

Logical units

55 openbcpoints.dat list of open boundary points in the interior of the model domain
56 openbclist_u.dat list of points/location where u data is needed
57 openbclist_b.dat list of points/location where T and S data is needed
58 openbclist_z.dat list of points/location where zet data is needed

Order of Things

  1. Set global arrays open boundary points
  2. Find where data is required for these
  3. Produce lists of the u, b, and zet data points
  4. Distribute these lists

Options - Logical

readopenbcpoints true if extra open boundary locations are to be read in.

Options - Compiler

none

Known Issues

Not properly tested yet


subroutine expandtoopenbc(vab,mh)

Description

Calculations at open boundary points often require information (e.g. water depth) on the external side of the boundary. This subroutine copies internal values of vab across the open boundary faces defined by ifaceob, assuming no horizontal gradient. If the external point shares open boundaries with a number of internal points then an average is taken.

Subroutine Arguments

vab(i,j) The variable that is being expanded across open boundaries
bf mh The halo width of vab

Local variables

i,j Grid indices.
np(i,j) Number of internal points giving a value to this external point.

Logical units

None

Order of Things

  1. assign values across faces given by ifaceob
  2. assign values at corner points (just in case they are needed)
  3. calculate mean at each external point.

Options - Logical

None

Options - Compiler

None

Known Issues


next up previous
Next: sigmaset.F Up: The Proudman Oceanographic Laboratory Previous: scoordset.F
The AMMP Project 2005-04-20