File indexing completed on 2018-03-02 18:36:45 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
1dbaea09ee Chri*0001 #include "CPP_OPTIONS.h"
924557e60a Chri*0002
9366854e02 Chri*0003
0004
0005
924557e60a Chri*0006 SUBROUTINE INI_CARTESIAN_GRID( myThid )
758c85d317 Jean*0007
9366854e02 Chri*0008
0009
9780090eaa Jean*0010
0011
9366854e02 Chri*0012
9780090eaa Jean*0013
0014
06399abf63 Jean*0015
0016
0017
0018
0019
9780090eaa Jean*0020
9366854e02 Chri*0021
0022
924557e60a Chri*0023
9366854e02 Chri*0024
0025 IMPLICIT NONE
924557e60a Chri*0026
0027 #include "SIZE.h"
0028 #include "EEPARAMS.h"
0029 #include "PARAMS.h"
0030 #include "GRID.h"
0031
9366854e02 Chri*0032
924557e60a Chri*0033
06399abf63 Jean*0034
924557e60a Chri*0035 INTEGER myThid
0036
9366854e02 Chri*0037
924557e60a Chri*0038
06399abf63 Jean*0039
0040
0041
0042
0043
0044
0045 INTEGER bi, bj
0046 INTEGER i, j
0047 INTEGER gridNx, gridNy
0048
0049 _RL delXloc(0-OLx:sNx+OLx)
0050 _RL delYloc(0-OLy:sNy+OLy)
0051
0052 _RL xGloc(1-OLx:sNx+OLx+1,1-OLy:sNy+OLy+1)
0053 _RL yGloc(1-OLx:sNx+OLx+1,1-OLy:sNy+OLy+1)
9366854e02 Chri*0054
aea29c8517 Alis*0055
06399abf63 Jean*0056
924557e60a Chri*0057 DO bj = myByLo(myThid), myByHi(myThid)
0058 DO bi = myBxLo(myThid), myBxHi(myThid)
aea29c8517 Alis*0059
06399abf63 Jean*0060
0061
aea29c8517 Alis*0062
06399abf63 Jean*0063 CALL INI_LOCAL_GRID(
0064 O xGloc, yGloc,
0065 O delXloc, delYloc,
0066 O gridNx, gridNy,
0067 I bi, bj, myThid )
aea29c8517 Alis*0068
0069
06399abf63 Jean*0070 DO j=1-OLy,sNy+OLy
0071 DO i=1-OLx,sNx+OLx
758c85d317 Jean*0072 xG(i,j,bi,bj) = xGloc(i,j)
0073 yG(i,j,bi,bj) = yGloc(i,j)
924557e60a Chri*0074 ENDDO
0075 ENDDO
aea29c8517 Alis*0076
0077
06399abf63 Jean*0078 DO j=1-OLy,sNy+OLy
0079 DO i=1-OLx,sNx+OLx
aea29c8517 Alis*0080
758c85d317 Jean*0081 xC(i,j,bi,bj) = 0.25 _d 0*(
0082 & xGloc(i,j)+xGloc(i+1,j)+xGloc(i,j+1)+xGloc(i+1,j+1) )
0083 yC(i,j,bi,bj) = 0.25 _d 0*(
0084 & yGloc(i,j)+yGloc(i+1,j)+yGloc(i,j+1)+yGloc(i+1,j+1) )
aea29c8517 Alis*0085 ENDDO
0086 ENDDO
0087
0088
06399abf63 Jean*0089 DO j=1-OLy,sNy+OLy
0090 DO i=1-OLx,sNx+OLx
0091 dxF(i,j,bi,bj) = delXloc(i)
0092 dyF(i,j,bi,bj) = delYloc(j)
924557e60a Chri*0093 ENDDO
0094 ENDDO
aea29c8517 Alis*0095
0096
06399abf63 Jean*0097 DO j=1-OLy,sNy+OLy
0098 DO i=1-OLx,sNx+OLx
0099 dxG(i,j,bi,bj) = delXloc(i)
0100 dyG(i,j,bi,bj) = delYloc(j)
aea29c8517 Alis*0101 ENDDO
0102 ENDDO
0103
0104
71b5d4795f Jean*0105
0106
aea29c8517 Alis*0107
0108
06399abf63 Jean*0109 DO j=1-OLy,sNy+OLy
0110 DO i=1-OLx+1,sNx+OLx
758c85d317 Jean*0111 dxC(i,j,bi,bj) = 0.5 _d 0*(dxF(i,j,bi,bj)+dxF(i-1,j,bi,bj))
aea29c8517 Alis*0112 ENDDO
0113 ENDDO
0114
0115
06399abf63 Jean*0116 DO j=1-OLy+1,sNy+OLy
0117 DO i=1-OLx,sNx+OLx
758c85d317 Jean*0118 dyC(i,j,bi,bj) = 0.5 _d 0*(dyF(i,j,bi,bj)+dyF(i,j-1,bi,bj))
aea29c8517 Alis*0119 ENDDO
0120 ENDDO
0121
0122
06399abf63 Jean*0123 DO j=1-OLy+1,sNy+OLy
0124 DO i=1-OLx+1,sNx+OLx
aea29c8517 Alis*0125
758c85d317 Jean*0126 dxV(i,j,bi,bj) = 0.5 _d 0*(dxG(i,j,bi,bj)+dxG(i-1,j,bi,bj))
0127 dyU(i,j,bi,bj) = 0.5 _d 0*(dyG(i,j,bi,bj)+dyG(i,j-1,bi,bj))
aea29c8517 Alis*0128
758c85d317 Jean*0129
0130
aea29c8517 Alis*0131 ENDDO
0132 ENDDO
0133
9780090eaa Jean*0134
06399abf63 Jean*0135 DO j=1-OLy,sNy+OLy
0136 DO i=1-OLx,sNx+OLx
758c85d317 Jean*0137 rA (i,j,bi,bj) = dxF(i,j,bi,bj)*dyF(i,j,bi,bj)
0138 rAw(i,j,bi,bj) = dxC(i,j,bi,bj)*dyG(i,j,bi,bj)
0139 rAs(i,j,bi,bj) = dxG(i,j,bi,bj)*dyC(i,j,bi,bj)
0140 rAz(i,j,bi,bj) = dxV(i,j,bi,bj)*dyU(i,j,bi,bj)
51910c84f4 Jean*0141
71b5d4795f Jean*0142
0143
0144
0145
0146
e7217683b5 Chri*0147 ENDDO
0148 ENDDO
b05b067368 Chri*0149
9780090eaa Jean*0150
0151 ENDDO
0152 ENDDO
aea29c8517 Alis*0153
924557e60a Chri*0154 RETURN
0155 END