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
6780674bfd Jean*0001 #include "MOM_COMMON_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C !ROUTINE: MOM_W_CORIOLIS_NH
                0005 
                0006 C !INTERFACE: ==========================================================
8ecb2a8ef1 Jean*0007       SUBROUTINE MOM_W_CORIOLIS_NH(
6780674bfd Jean*0008      I               bi,bj,k,
                0009      I               uFld, vFld,
                0010      U               wCoriolisTerm,
8ecb2a8ef1 Jean*0011      I               myThid )
6780674bfd Jean*0012 
                0013 C !DESCRIPTION:
                0014 C Calculates the Coriolis term in the vertical momentum equation:
                0015 C \begin{equation*}
3daafce20b Jean*0016 C + f_prime \overline{u}^{ik}
6780674bfd Jean*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  uFld                 :: horizontal flow, u component
                0030 C  vFld                 :: horizontal flow, v component
                0031 C  myThid               :: my Thread Id number
                0032       INTEGER bi,bj,k
                0033       _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0034       _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0035       INTEGER myThid
                0036 
                0037 C !OUTPUT PARAMETERS: ==================================================
                0038 C  uCoriolisTerm        :: Coriolis term
                0039       _RL wCoriolisTerm(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0040 
                0041 #ifdef ALLOW_NONHYDROSTATIC
                0042 C !LOCAL VARIABLES: ====================================================
                0043 C  i,j                  :: loop indices
                0044       INTEGER i,j
                0045 CEOP
                0046 
                0047 
                0048 C Energy conserving discretization of 2*Omega*cos(phi)*u_eastward
                0049       IF ( k.GT.1 .AND. k.LE.Nr ) THEN
                0050         DO j=1-Oly,sNy+Oly-1
                0051          DO i=1-Olx,sNx+Olx-1
8ecb2a8ef1 Jean*0052            wCoriolisTerm(i,j) =
6780674bfd Jean*0053      &      -gravitySign*fCoriCos(i,j,bi,bj)*
                0054      &       ( angleCosC(i,j,bi,bj)*(
                0055      &                (uFld(i,j,k-1,bi,bj)+uFld(i+1,j,k-1,bi,bj))
                0056      &              + (uFld(i,j, k ,bi,bj)+uFld(i+1,j, k ,bi,bj))
                0057      &                              )*0.25 _d 0
                0058      &        -angleSinC(i,j,bi,bj)*(
                0059      &                (vFld(i,j,k-1,bi,bj)+vFld(i,j+1,k-1,bi,bj))
                0060      &              + (vFld(i,j, k ,bi,bj)+vFld(i,j+1, k ,bi,bj))
                0061      &                              )*0.25 _d 0
8ecb2a8ef1 Jean*0062      &       )*wUnit2rVel(k)
6780674bfd Jean*0063          ENDDO
                0064         ENDDO
                0065       ELSE
                0066         DO j=1-Oly,sNy+Oly-1
                0067          DO i=1-Olx,sNx+Olx-1
                0068            wCoriolisTerm(i,j) = 0. _d 0
                0069          ENDDO
                0070         ENDDO
                0071       ENDIF
                0072 
                0073 #endif /* ALLOW_NONHYDROSTATIC */
                0074 
                0075       RETURN
                0076       END