subroutine uv_diff_2dh(An_method,UEx,VEx,U,V,D,DU,DV,hsd_u,hsd_v) Note (KK): keep in sync with interface in m2d.F90

Here, the diffusion terms for the vertically integrated transports are
calculated by means of central differences, following the finite volume
approach. They are added to the
advection terms into the terms `UEx` and `VEx` for the
- and the -equation, respectively. The physical diffusion with the
given eddy viscosity coefficient is based on velocity gradients,
whereas an additional numerical damping of the barotropic mode is based
on gradients of the transports with the damping coefficient ,
see the example given as equations (90) and
(91).

First diffusion term in (61):

(82) |

with diffusive fluxes

(83) |

Second diffusion term in (61):

(84) |

with diffusive fluxes

(85) |

First diffusion term in (62):

(86) |

with diffusive fluxes

(87) |

Second diffusion term in (62):

(88) |

with diffusive fluxes

(89) |

The role of the additional diffusion of and with the diffusion coefficient is best demonstrated by means of a simplified set of vertically integrated equations:

which can be transformed into an equation for by derivation of the -equation with respect to , of the -equation with respect to and the -equation with respect to and subsequent elimination of and :

which can be interpreted as a wave equation with a damping on . This introduces an explicit damping of free surface elevation oscillations in a momentum-conservative manner. Hydrodynamic models with implicit treatment of the barotropic mode do not need to apply this method due to the implicit damping of those models, see e.g. Backhaus (1985). The implementation of this explicit damping described here has been suggested by Jean-Marie Beckers, Liége (Belgium).

When working with the option `SLICE_MODEL`, the calculation of
all gradients in -direction is suppressed.
**USES:**

use domain, only: imin,imax,jmin,jmax,az,au,av,ax #if defined(SPHERICAL) || defined(CURVILINEAR) use domain, only: dyc,arud1,dxx,dyx,arvd1,dxc #else use domain, only: dx,dy,ard1 #endif use m2d, only: Am use variables_2d, only: An,AnX $ use omp_lib IMPLICIT NONE

integer,intent(in) :: An_method REALTYPE,dimension(E2DFIELD),intent(in),optional :: U,V,D,DU,DV

REALTYPE,dimension(E2DFIELD),intent(inout) :: UEx,VEx

REALTYPE,dimension(E2DFIELD),intent(out),optional :: hsd_u,hsd_v

Original author(s): Hans Burchard Modified by : Knut Klingbeil

REALTYPE,dimension(E2DFIELD) :: work2d logical :: use_Am integer :: i,j

kklingbe 2017-10-02