File indexing completed on 2018-03-02 18:42:16 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
cec2469d72 Alis*0001 #include "MOM_VECINV_OPTIONS.h"
aea29c8517 Alis*0002
0003 SUBROUTINE MOM_VI_DEL2UV(
0004 I bi,bj,k,
0005 I hDiv,vort3,hFacZ,
0006 O del2u,del2v,
0007 I myThid)
0008 IMPLICIT NONE
0009
0010
0011
0012
0013
0014 #include "SIZE.h"
0015 #include "GRID.h"
404487e0d3 Andr*0016 #include "EEPARAMS.h"
aea29c8517 Alis*0017
0018
0019 INTEGER bi,bj,k
0020 _RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0021 _RL vort3(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0022 _RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0023 _RL del2u(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0024 _RL del2v(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0025 INTEGER myThid
0026
0027
85504c2f03 Jean*0028 INTEGER i,j
0029
aea29c8517 Alis*0030
85504c2f03 Jean*0031
0032
f1a4cec01a Jean*0033
0034
aea29c8517 Alis*0035
0036
0037
0038
0039
0040
0041
85504c2f03 Jean*0042
0043
0044
aea29c8517 Alis*0045
0046
0047
0048
85504c2f03 Jean*0049
0050
0051
0052
aea29c8517 Alis*0053
0054
0055
0056
0057
0058
85504c2f03 Jean*0059
0060
0061
aea29c8517 Alis*0062
0063
0064
0065
0066
0067
0068
85504c2f03 Jean*0069
0070
0071
0072
0073
0074
0075
0076
0077
7f82819bd8 Patr*0078
85504c2f03 Jean*0079 IF (useCubedSphereExchange) THEN
0080
93e3461d85 Jean*0081 CALL FILL_CS_CORNER_TR_RL( 1, .FALSE.,
1891130b05 Jean*0082 & hDiv, bi,bj, myThid )
85504c2f03 Jean*0083 ENDIF
7f82819bd8 Patr*0084
85504c2f03 Jean*0085
0086
f1a4cec01a Jean*0087 DO j=2-OLy,sNy+OLy-1
0088 DO i=2-OLx,sNx+OLx-1
85504c2f03 Jean*0089 del2u(i,j) =
40adf483e7 Jean*0090 & ( ( hDiv(i,j) - hDiv(i-1,j) )*recip_dxC(i,j,bi,bj)
0091 & -_recip_hFacW(i,j,k,bi,bj)*
85504c2f03 Jean*0092 & ( hFacZ(i,j+1)*vort3(i,j+1) - hFacZ(i,j)*vort3(i,j) )
40adf483e7 Jean*0093 & *recip_dyG(i,j,bi,bj)
f1a4cec01a Jean*0094 & )*maskW(i,j,k,bi,bj)*recip_deepFacC(k)
a127177afc Jean*0095 #ifdef ALLOW_OBCS
0096 & *maskInW(i,j,bi,bj)
0097 #endif
85504c2f03 Jean*0098 ENDDO
0099 ENDDO
aea29c8517 Alis*0100
85504c2f03 Jean*0101
0102
7f82819bd8 Patr*0103
85504c2f03 Jean*0104 IF (useCubedSphereExchange) THEN
0105
93e3461d85 Jean*0106 CALL FILL_CS_CORNER_TR_RL( 2, .FALSE.,
1891130b05 Jean*0107 & hDiv, bi,bj, myThid )
85504c2f03 Jean*0108 ENDIF
7f82819bd8 Patr*0109
85504c2f03 Jean*0110
0111
f1a4cec01a Jean*0112 DO j=2-OLy,sNy+OLy-1
0113 DO i=2-OLx,sNx+OLx-1
85504c2f03 Jean*0114 del2v(i,j) =
40adf483e7 Jean*0115 & ( ( hDiv(i,j) - hDiv(i,j-1) )*recip_dyC(i,j,bi,bj)
0116 & +_recip_hFacS(i,j,k,bi,bj)*
85504c2f03 Jean*0117 & ( hFacZ(i+1,j)*vort3(i+1,j) - hFacZ(i,j)*vort3(i,j) )
40adf483e7 Jean*0118 & *recip_dxG(i,j,bi,bj)
f1a4cec01a Jean*0119 & )*maskS(i,j,k,bi,bj)*recip_deepFacC(k)
a127177afc Jean*0120 #ifdef ALLOW_OBCS
0121 & *maskInS(i,j,bi,bj)
0122 #endif
aea29c8517 Alis*0123 ENDDO
0124 ENDDO
0125
0126 RETURN
0127 END