File indexing completed on 2018-03-02 18:42:11 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
0004
0005
0006
0007 SUBROUTINE MOM_W_METRIC_NH(
0008 I bi,bj,k,
0009 I uFld, vFld,
0010 O wMetricTerms,
0011 I myThid )
0012
0013
0014
0015
0016
0017
0018
0019
0020 IMPLICIT NONE
0021 #include "SIZE.h"
0022 #include "EEPARAMS.h"
0023 #include "PARAMS.h"
0024 #include "GRID.h"
0025
0026
0027
0028
eaba2fd266 Jean*0029
0030
6780674bfd Jean*0031
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
0038
0039 _RL wMetricTerms(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0040
0041 #ifdef ALLOW_NONHYDROSTATIC
0042
0043
0044 INTEGER i,j
0045
0046
8ecb2a8ef1 Jean*0047 IF ( k.GT.1 .AND. k.LE.Nr ) THEN
6780674bfd Jean*0048 DO j=1-Olx,sNy+Oly-1
0049 DO i=1-Olx,sNx+Olx-1
8ecb2a8ef1 Jean*0050 wMetricTerms(i,j) = -gravitySign*wUnit2rVel(k)
eaba2fd266 Jean*0051 & *recip_rSphere*recip_deepFacF(k)*(
6780674bfd Jean*0052 & ( (uFld( i ,j,k-1,bi,bj)*uFld( i ,j,k-1,bi,bj)
0053 & +uFld(i+1,j,k-1,bi,bj)*uFld(i+1,j,k-1,bi,bj))
0054 & + (vFld(i, j ,k-1,bi,bj)*vFld(i, j ,k-1,bi,bj)
0055 & +vFld(i,j+1,k-1,bi,bj)*vFld(i,j+1,k-1,bi,bj))
0056 & )
0057 & + ( (uFld( i ,j, k ,bi,bj)*uFld( i ,j, k ,bi,bj)
0058 & +uFld(i+1,j, k ,bi,bj)*uFld(i+1,j, k ,bi,bj))
0059 & + (vFld(i, j , k ,bi,bj)*vFld(i, j , k ,bi,bj)
0060 & +vFld(i,j+1, k ,bi,bj)*vFld(i,j+1, k ,bi,bj))
eaba2fd266 Jean*0061 & ) )*0.25 _d 0
6780674bfd Jean*0062 ENDDO
0063 ENDDO
0064 ELSE
0065 DO j=1-Olx,sNy+Oly-1
0066 DO i=1-Olx,sNx+Olx-1
0067 wMetricTerms(i,j) = 0. _d 0
0068 ENDDO
0069 ENDDO
0070 ENDIF
0071
0072 #endif /* ALLOW_NONHYDROSTATIC */
0073
0074 RETURN
0075 END