Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:40:55 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_Y
                0005 
                0006 C !INTERFACE: ==========================================================
eaba2fd266 Jean*0007       SUBROUTINE GAD_BIHARM_Y(
31566b6684 Alis*0008      I           bi,bj,k,
                0009      I           yA,del2T,diffK4,
                0010      O           dfy,
                0011      I           myThid )
                0012 
aba3ddc7b7 Alis*0013 C !DESCRIPTION:
                0014 C Calculates the meridional 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 meridional gradient:
                0017 C \begin{equation*}
                0018 C F^y_{diff} = \kappa_4 \partial_y \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  yA                   :: area of face at V points
                0030 C  del2T                :: Laplacian of tracer
                0031 C  myThid               :: thread number
31566b6684 Alis*0032       INTEGER bi,bj,k
                0033       _RS yA   (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  dfy                  :: meridional diffusive flux
                0040       _RL dfy  (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 meridional fluxes ...
81c8d7b9aa Jean*0048 c     DO i=1-Olx,sNx+Olx
                0049 c      dfy(i,1-Oly) = 0.
                0050 c     ENDDO
31566b6684 Alis*0051       DO j=1-Oly+1,sNy+Oly
                0052        DO i=1-Olx,sNx+Olx
eaba2fd266 Jean*0053 c        dfy(i,j) = diffK4*yA(i,j)
                0054          dfy(i,j) = dfy(i,j) + diffK4*yA(i,j)
                0055      &    *_recip_dyC(i,j,bi,bj)*recip_deepFacC(k)
                0056      &    *(del2T(i,j)-del2T(i,j-1))
31566b6684 Alis*0057 #ifdef ISOTROPIC_COS_SCALING
                0058 #ifdef COSINEMETH_III
                0059      &    *sqCosFacV(j,bi,bj)
                0060 #else
eaba2fd266 Jean*0061      &    *cosFacV(j,bi,bj)
31566b6684 Alis*0062 #endif
                0063 #endif
                0064        ENDDO
                0065       ENDDO
                0066 
                0067       RETURN
                0068       END