Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:42:10 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
46c0643d8f Jean*0001 #include "MOM_COMMON_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C !ROUTINE: MOM_V_METRIC_NH
                0005 
                0006 C !INTERFACE: ==========================================================
                0007       SUBROUTINE MOM_V_METRIC_NH(
                0008      I               bi,bj,k,
                0009      I               vFld,wFld,
                0010      O               vMetricTerms,
                0011      I               myThid )
                0012 
                0013 C !DESCRIPTION:
                0014 C Calculates the zonal metric term due to non-hydrostaticity on the sphere:
                0015 C \begin{equation}
                0016 C -\frac{v}{a} \overline{w}^{jk}
                0017 C \end{equation}
                0018 
                0019 C !USES: ===============================================================
                0020       IMPLICIT NONE
                0021 #include "SIZE.h"
                0022 #include "EEPARAMS.h"
                0023 #include "PARAMS.h"
                0024 #include "GRID.h"
                0025 
                0026 C !INPUT PARAMETERS: ===================================================
                0027 C  bi,bj                :: tile indices
                0028 C  k                    :: vertical level
                0029 C  vFld                 :: merdional flow
                0030 C  wFld                 :: vertical flow
                0031 C  myThid               :: thread number
                0032       INTEGER bi,bj,k
                0033       _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0034       _RL wFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0035       INTEGER myThid
                0036 
                0037 C !OUTPUT PARAMETERS: ==================================================
                0038 C  vMetricTerms         :: metric term
                0039       _RL vMetricTerms(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0040 
                0041 C !LOCAL VARIABLES: ====================================================
                0042 C  i,j                  :: loop indices
8ecb2a8ef1 Jean*0043       INTEGER i,j,kp1
46c0643d8f Jean*0044       _RL wVelBottomOverride
                0045 CEOP
                0046 
8ecb2a8ef1 Jean*0047       kp1=min(k+1,Nr)
46c0643d8f Jean*0048       wVelBottomOverride=1.
                0049       IF (k.EQ.Nr) wVelBottomOverride=0.
                0050 
                0051       DO j=1-Olx+1,sNy+Oly
                0052        DO i=1-Olx,sNx+Olx
eaba2fd266 Jean*0053          vMetricTerms(i,j) = vFld(i,j)*recip_rSphere*recip_deepFacC(k)
8ecb2a8ef1 Jean*0054      &    *0.25*( (wFld(i,j-1,kp1,bi,bj)+wFld(i,j,kp1,bi,bj))
                0055      &            *rVel2wUnit(kp1)*wVelBottomOverride
                0056      &          + (wFld(i,j-1, k ,bi,bj)+wFld(i,j, k ,bi,bj))
                0057      &            *rVel2wUnit( k )
                0058      &          )*gravitySign
46c0643d8f Jean*0059        ENDDO
                0060       ENDDO
                0061 
                0062       RETURN
                0063       END