adv_upstream_2dh - 2DH upstream advection of 2D quantities

INTERFACE:

    subroutine adv_upstream_2dh(dt,f,fi,Di,adv,U,V,Dn,DU,DV, &
 #if defined(SPHERICAL) || defined(CURVILINEAR)
                                dxv,dyu,dxu,dyv,arcd1,       &
 #endif
                                AH,az)
    Note (KK): Keep in sync with interface in advection.F90
DESCRIPTION:

In this routine, the first-order upstream advection scheme is applied for the two horizontal directions in one step. The scheme should be positive definite and of high resolution. In order to remove truncation errors which might in Wadden Sea applications cause non-monotonicity, a truncation of over- and undershoots is carried out at the end of this subroutine. Such two-dimensional schemes are advantageous in Wadden Sea applications, since one-dimensional directional-split schemes might compute negative intermediate depths. USES:

    use domain, only: imin,imax,jmin,jmax
 #if !( defined(SPHERICAL) || defined(CURVILINEAR) )
    use domain, only: dx,dy,ard1
 #endif
  $ use omp_lib
    IMPLICIT NONE
INPUT PARAMETERS:
    REALTYPE,intent(in)                                          :: dt,AH
    REALTYPE,dimension(E2DFIELD),intent(in)                      :: f,U,V,Dn,DU,DV
 #if defined(SPHERICAL) || defined(CURVILINEAR)
    REALTYPE,dimension(:,:),pointer,intent(in)                   :: dxu,dyu
    REALTYPE,dimension(_IRANGE_HALO_,_JRANGE_HALO_-1),intent(in) :: dxv,dyv
    REALTYPE,dimension(E2DFIELD),intent(in)                      :: arcd1
 #endif
    integer,dimension(E2DFIELD),intent(in)                       :: az
INPUT/OUTPUT PARAMETERS:
    REALTYPE,dimension(E2DFIELD),intent(inout)                   :: fi,Di,adv
LOCAL VARIABLES:
    integer                      :: i,j,ii,jj
    REALTYPE                     :: Dio,advn
    REALTYPE,dimension(E2DFIELD) :: uflux,vflux
    REALTYPE,dimension(E2DFIELD) :: cmin,cmax
REVISION HISTORY:
    Original author(s): Hans Burchard & Karsten Bolding



kklingbe 2017-10-02