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
0004
0005
0006
0007 SUBROUTINE MOM_V_METRIC_NH(
0008 I bi,bj,k,
0009 I vFld,wFld,
0010 O vMetricTerms,
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
0029
0030
0031
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
0038
0039 _RL vMetricTerms(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0040
0041
0042
8ecb2a8ef1 Jean*0043 INTEGER i,j,kp1
46c0643d8f Jean*0044 _RL wVelBottomOverride
0045
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