- subroutine setopenbc
- Description
- Subroutine Arguments
- Local variables
- Logical units
- Order of Things
- Options - Logical
- Options - Compiler
- Known Issues

- subroutine expandtoopenbc(vab,mh)

setopenbc.F

subroutine setopenbc

**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
**

**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 and 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

- 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

- Set global arrays open boundary points
- Find where data is required for these
- Produce lists of the u, b, and zet data points
- Distribute these lists

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

- none

subroutine expandtoopenbc(vab,mh)

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

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

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