Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:40:54 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
31566b6684 Alis*0001 #include "GAD_OPTIONS.h"
                0002 
aba3ddc7b7 Alis*0003 CBOP
                0004 C !ROUTINE: GAD_BIHARM_X
                0005 
                0006 C !INTERFACE: ==========================================================
eaba2fd266 Jean*0007       SUBROUTINE GAD_BIHARM_X(
31566b6684 Alis*0008      I           bi,bj,k,
                0009      I           xA,del2T,diffK4,
81c8d7b9aa Jean*0010      U           dfx,
31566b6684 Alis*0011      I           myThid )
                0012 
aba3ddc7b7 Alis*0013 C !DESCRIPTION:
                0014 C Calculates the zonal flux due to bi-harmonic diffusion of a tracer.
                0015 C Routine takes the laplacian of the tracer as argument and calculates
                0016 C the zonal gradient:
                0017 C \begin{equation*}
                0018 C F^x_{diff} = \kappa_4 \partial_x \nabla^2 \theta
                0019 C \end{equation*}
                0020 
                0021 C !USES: ===============================================================
                0022       IMPLICIT NONE
31566b6684 Alis*0023 #include "SIZE.h"
                0024 #include "GRID.h"
                0025 
aba3ddc7b7 Alis*0026 C !INPUT PARAMETERS: ===================================================
                0027 C  bi,bj                :: tile indices
                0028 C  k                    :: vertical level
                0029 C  xA                   :: area of face at U points
                0030 C  del2T                :: Laplacian of tracer
                0031 C  myThid               :: thread number
31566b6684 Alis*0032       INTEGER bi,bj,k
                0033       _RS xA   (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0034       _RL del2T(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0035       _RL diffK4
                0036       INTEGER myThid
                0037 
aba3ddc7b7 Alis*0038 C !OUTPUT PARAMETERS: ==================================================
                0039 C  dfx                  :: zonal diffusive flux
                0040       _RL dfx  (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0041 
                0042 C !LOCAL VARIABLES: ====================================================
                0043 C  i,j                  :: loop indices
31566b6684 Alis*0044       INTEGER i,j
aba3ddc7b7 Alis*0045 CEOP
31566b6684 Alis*0046 
                0047 C     Difference of zonal fluxes ...
                0048       DO j=1-Oly,sNy+Oly
81c8d7b9aa Jean*0049 c      dfx(1-Olx,j) = 0.
31566b6684 Alis*0050        DO i=1-Olx+1,sNx+Olx
eaba2fd266 Jean*0051 c        dfx(i,j) = diffK4*xA(i,j)
                0052          dfx(i,j) = dfx(i,j) + diffK4*xA(i,j)
                0053      &    *_recip_dxC(i,j,bi,bj)*recip_deepFacC(k)
                0054      &    *(del2T(i,j)-del2T(i-1,j))
31566b6684 Alis*0055 #ifdef COSINEMETH_III
                0056      &    *sqCosFacU(j,bi,bj)
                0057 #else
eaba2fd266 Jean*0058      &    *cosFacU(j,bi,bj)
31566b6684 Alis*0059 #endif
                0060        ENDDO
                0061       ENDDO
                0062 
                0063       RETURN
                0064       END