do_bdy_3d - updating 3D boundary conditions

INTERFACE:

    subroutine do_bdy_3d(tag,field)
DESCRIPTION:

Here, the boundary conditions for salinity and temperature are copied to the boundary points and relaxed to the near boundary points by means of the flow relaxation scheme by Martinsen and Engedahl (1987).

As an extention to the flow relaxation scheme, it is possible to relax the boundary point values to the specified boundary condition in time, thus giving more realistic situations especially for outgoing flow conditions. This nudging is implemented to depend on the local (3D) current velocity perpendicular to the boundary. For strong outflow, the boundary condition is turned off, while for inflows it is given a high impact. USES:

    IMPLICIT NONE
INPUT PARAMETERS:
    integer, intent(in)                 :: tag
INPUT/OUTPUT PARAMETERS:
    REALTYPE, intent(inout)             :: field(I3DFIELD)
LOCAL VARIABLES:
    integer                   :: i,j,k,l,n,o,ii,jj,kk
    REALTYPE                  :: sp(1:4),rat
    REALTYPE                  :: bdy3d_tmrlx_umin
    REALTYPE                  :: wsum