adv_fct_2dh - 2DH FCT advection of 2D quantities

INTERFACE:

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

In this routine, the flux corrected transport advection scheme by Zalezak (1979) is applied for the two horizontal directions in one step. For details of this type of operator splitting, see section 7.4.10 on page [*]).

The monotone low-order flux is the first-order upstream scheme, the high-order flux is the third-order ULTIMATE QUICKEST scheme by Leonard et al. (1995). The scheme should thus 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 directioal-split schemes might compute negative intermediate solutions. Extra checks for boundaries including mirroring out of the transported quantities are performed in order to account for the third-order large stencils.

If GETM is executed as slice model (compiler option SLICE_MODEL) the advection step for the $y$ direction is not executed. USES:

    use domain, only: imin,imax,jmin,jmax
 #if !( defined(SPHERICAL) || defined(CURVILINEAR) )
    use domain, only: dx,dy,ard1
 #endif
    use halo_zones, only : update_2d_halo,wait_halo,z_TAG
  $ use omp_lib
    IMPLICIT NONE
INPUT PARAMETERS:
    logical,intent(in)                                           :: fct
    REALTYPE,intent(in)                                          :: dt,AH
    REALTYPE,dimension(E2DFIELD),intent(in)                      :: f,U,V,Dn,DU,DV
 #if defined(SPHERICAL) || defined(CURVILINEAR)
    REALTYPE,dimension(:,:),pointer,contiguous,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
    logical,dimension(:,:),pointer,contiguous,intent(in)         :: mask_uflux
    logical,dimension(_IRANGE_HALO_,_JRANGE_HALO_-1),intent(in)  :: mask_vflux
INPUT/OUTPUT PARAMETERS:
    REALTYPE,dimension(E2DFIELD),intent(inout)                   :: fi,Di,adv
LOCAL VARIABLES:
    integer         :: i,j
    REALTYPE,dimension(E2DFIELD) :: Dio
    REALTYPE,dimension(E2DFIELD) :: uflux,flx
 #ifndef SLICE_MODEL
    REALTYPE,dimension(E2DFIELD) :: vflux,fly
 #endif
    REALTYPE,dimension(E2DFIELD) :: faux,rp,rm,cmin,cmax
    REALTYPE        :: CNW,CW,CSW,CSSW,CWW,CSWW,CC,CS
    REALTYPE        :: advn,uuu,vvv,CExx,Cl,Cu,fac
    REALTYPE,parameter :: one12th=_ONE_/12,one6th=_ONE_/6,one3rd=_ONE_/3
REVISION HISTORY:
    Original author(s): Hans Burchard & Karsten Bolding