59 |
_RS vf(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
_RS vf(1-Olx:sNx+Olx,1-Oly:sNy+Oly) |
60 |
_RL firstResidual,lastResidual |
_RL firstResidual,lastResidual |
61 |
_RL tmpFac |
_RL tmpFac |
62 |
|
_RL sumEmP, tileEmP |
63 |
|
LOGICAL putPmEinXvector |
64 |
INTEGER numIters |
INTEGER numIters |
65 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
66 |
CEOP |
CEOP |
73 |
COMMON /timevars/ utnew, utold, stnew, stold, wtnew, wtold |
COMMON /timevars/ utnew, utold, stnew, stold, wtnew, wtold |
74 |
#endif |
#endif |
75 |
|
|
76 |
|
C-- Initialise the Vector solution with etaN + deltaT*Global_mean_PmE |
77 |
|
C instead of simply etaN ; This can speed-up the solver convergence in |
78 |
|
C the case where |Global_mean_PmE| is large. |
79 |
|
putPmEinXvector = .FALSE. |
80 |
|
c putPmEinXvector = useRealFreshWaterFlux |
81 |
|
|
82 |
C-- Save previous solution & Initialise Vector solution and source term : |
C-- Save previous solution & Initialise Vector solution and source term : |
83 |
|
sumEmP = 0. |
84 |
DO bj=myByLo(myThid),myByHi(myThid) |
DO bj=myByLo(myThid),myByHi(myThid) |
85 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
DO bi=myBxLo(myThid),myBxHi(myThid) |
86 |
DO j=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |
103 |
ENDDO |
ENDDO |
104 |
ENDDO |
ENDDO |
105 |
ENDIF |
ENDIF |
106 |
|
IF ( putPmEinXvector ) THEN |
107 |
|
tileEmP = 0. |
108 |
|
DO j=1,sNy |
109 |
|
DO i=1,sNx |
110 |
|
tileEmP = tileEmP + rA(i,j,bi,bj)*EmPmR(i,j,bi,bj) |
111 |
|
& *maskH(i,j,bi,bj) |
112 |
|
ENDDO |
113 |
|
ENDDO |
114 |
|
sumEmP = sumEmP + tileEmP |
115 |
|
ENDIF |
116 |
ENDDO |
ENDDO |
117 |
ENDDO |
ENDDO |
118 |
|
IF ( putPmEinXvector ) THEN |
119 |
|
_GLOBAL_SUM_R8( sumEmP, myThid ) |
120 |
|
ENDIF |
121 |
|
|
122 |
DO bj=myByLo(myThid),myByHi(myThid) |
DO bj=myByLo(myThid),myByHi(myThid) |
123 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
DO bi=myBxLo(myThid),myBxHi(myThid) |
124 |
|
IF ( putPmEinXvector ) THEN |
125 |
|
tmpFac = 0. |
126 |
|
IF (globalArea.GT.0.) tmpFac = freeSurfFac*deltaTfreesurf |
127 |
|
& *convertEmP2rUnit*sumEmP/globalArea |
128 |
|
DO j=1,sNy |
129 |
|
DO i=1,sNx |
130 |
|
cg2d_x(i,j,bi,bj) = cg2d_x(i,j,bi,bj) |
131 |
|
& - tmpFac*Bo_surf(i,j,bi,bj) |
132 |
|
ENDDO |
133 |
|
ENDDO |
134 |
|
ENDIF |
135 |
DO K=Nr,1,-1 |
DO K=Nr,1,-1 |
136 |
DO j=1,sNy+1 |
DO j=1,sNy+1 |
137 |
DO i=1,sNx+1 |
DO i=1,sNx+1 |