Back to home page

MITgcm

 
 

    


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

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
6d54cf9ca1 Ed H*0001 #include "MOM_FLUXFORM_OPTIONS.h"
aea29c8517 Alis*0002 
71207ba845 Alis*0003 CBOP
                0004 C !ROUTINE: MOM_U_METRIC_SPHERE
                0005 
                0006 C !INTERFACE: ==========================================================
aea29c8517 Alis*0007       SUBROUTINE MOM_U_METRIC_SPHERE(
                0008      I        bi,bj,k,
                0009      I        uFld, vFld,
                0010      O        uMetricTerms,
eaba2fd266 Jean*0011      I        myThid )
aea29c8517 Alis*0012 
71207ba845 Alis*0013 C !DESCRIPTION:
                0014 C Calculates the zonal metric term due to sphericity:
                0015 C \begin{equation}
                0016 C \frac{u}{a} \overline{v}^{ij} \tan{\phi}
                0017 C \end{equation}
                0018 
                0019 C !USES: ===============================================================
                0020       IMPLICIT NONE
aea29c8517 Alis*0021 #include "SIZE.h"
                0022 #include "EEPARAMS.h"
                0023 #include "PARAMS.h"
                0024 #include "GRID.h"
                0025 
71207ba845 Alis*0026 C !INPUT PARAMETERS: ===================================================
                0027 C  bi,bj                :: tile indices
                0028 C  k                    :: vertical level
                0029 C  uFld                 :: zonal flow
                0030 C  vFld                 :: meridional flow
                0031 C  myThid               :: thread number
aea29c8517 Alis*0032       INTEGER bi,bj,k
                0033       _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0034       _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0035       INTEGER myThid
                0036 
71207ba845 Alis*0037 C !OUTPUT PARAMETERS: ==================================================
                0038 C  uMetricTerms         :: metric term
                0039       _RL uMetricTerms(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0040 
                0041 C !LOCAL VARIABLES: ====================================================
                0042 C  i,j                  :: loop indices
                0043       INTEGER i,j
                0044 CEOP
aea29c8517 Alis*0045 
                0046       DO j=1-Olx,sNy+Oly-1
                0047        DO i=1-Olx+1,sNx+Olx
eaba2fd266 Jean*0048          uMetricTerms(i,j) =
                0049      &    uFld(i,j)*recip_rSphere*recip_deepFacC(k)
aea29c8517 Alis*0050      &    *0.25*( vFld(i,j  )+vFld(i-1,j  )
                0051      &           +vFld(i,j+1)+vFld(i-1,j+1)
                0052      &          )*_tanPhiAtU(i,j,bi,bj)
                0053        ENDDO
                0054       ENDDO
                0055 
                0056       RETURN
                0057       END