/[MITgcm]/MITgcm/model/src/solve_for_pressure.F
ViewVC logotype

Diff of /MITgcm/model/src/solve_for_pressure.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.46 by jmc, Sun May 15 03:02:08 2005 UTC revision 1.47 by jmc, Thu Jul 21 19:47:53 2005 UTC
# Line 59  C     == Local variables == Line 59  C     == Local variables ==
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
# Line 71  C     == Timing variables == Line 73  C     == Timing variables ==
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
# Line 94  C--   Save previous solution & Initialis Line 103  C--   Save previous solution & Initialis
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

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

  ViewVC Help
Powered by ViewVC 1.1.22