/[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.37 by mlosch, Tue May 13 13:30:05 2003 UTC revision 1.42 by edhill, Tue Nov 4 18:40:58 2003 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    #include "PACKAGES_CONFIG.h"
5  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
6    
7  CBOP  CBOP
# Line 23  C     == Global variables Line 24  C     == Global variables
24  #include "EEPARAMS.h"  #include "EEPARAMS.h"
25  #include "PARAMS.h"  #include "PARAMS.h"
26  #include "DYNVARS.h"  #include "DYNVARS.h"
27    #ifdef ALLOW_CD_CODE
28    #include "CD_CODE_VARS.h"
29    #endif
30  #include "GRID.h"  #include "GRID.h"
31  #include "SURFACE.h"  #include "SURFACE.h"
32  #include "FFIELDS.h"  #include "FFIELDS.h"
# Line 64  C--   Save previous solution & Initialis Line 68  C--   Save previous solution & Initialis
68         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
69          DO j=1-OLy,sNy+OLy          DO j=1-OLy,sNy+OLy
70           DO i=1-OLx,sNx+OLx           DO i=1-OLx,sNx+OLx
71  #ifdef INCLUDE_CD_CODE  #ifdef ALLOW_CD_CODE
72            etaNm1(i,j,bi,bj) = etaN(i,j,bi,bj)            etaNm1(i,j,bi,bj) = etaN(i,j,bi,bj)
73  #endif  #endif
74            cg2d_x(i,j,bi,bj) = Bo_surf(i,j,bi,bj)*etaN(i,j,bi,bj)            cg2d_x(i,j,bi,bj) = Bo_surf(i,j,bi,bj)*etaN(i,j,bi,bj)
# Line 125  C--   Add source term arising from w=d/d Line 129  C--   Add source term arising from w=d/d
129          ELSEIF ( exactConserv ) THEN          ELSEIF ( exactConserv ) THEN
130  #else  #else
131          IF ( exactConserv ) THEN          IF ( exactConserv ) THEN
132  #endif  #endif /* ALLOW_NONHYDROSTATIC */
133           DO j=1,sNy           DO j=1,sNy
134            DO i=1,sNx            DO i=1,sNx
135             cg2d_b(i,j,bi,bj) = cg2d_b(i,j,bi,bj)             cg2d_b(i,j,bi,bj) = cg2d_b(i,j,bi,bj)
# Line 174  C Western boundary Line 178  C Western boundary
178         ENDDO         ENDDO
179        ENDDO        ENDDO
180    
181  #ifndef DISABLE_DEBUGMODE  #ifdef ALLOW_DEBUG
182        IF (debugMode) THEN        IF ( debugLevel .GE. debLevB ) THEN
183         CALL DEBUG_STATS_RL(1,cg2d_b,'cg2d_b (SOLVE_FOR_PRESSURE)',         CALL DEBUG_STATS_RL(1,cg2d_b,'cg2d_b (SOLVE_FOR_PRESSURE)',
184       &                        myThid)       &                        myThid)
185        ENDIF        ENDIF
# Line 196  C     see CG2D.h for the interface to th Line 200  C     see CG2D.h for the interface to th
200       I           myThid )       I           myThid )
201        _EXCH_XY_R8(cg2d_x, myThid )        _EXCH_XY_R8(cg2d_x, myThid )
202    
203  #ifndef DISABLE_DEBUGMODE  #ifdef ALLOW_DEBUG
204        IF (debugMode) THEN        IF ( debugLevel .GE. debLevB ) THEN
205         CALL DEBUG_STATS_RL(1,cg2d_x,'cg2d_x (SOLVE_FOR_PRESSURE)',         CALL DEBUG_STATS_RL(1,cg2d_x,'cg2d_x (SOLVE_FOR_PRESSURE)',
206       &                        myThid)       &                        myThid)
207        ENDIF        ENDIF
# Line 206  C     see CG2D.h for the interface to th Line 210  C     see CG2D.h for the interface to th
210  C- dump CG2D output at monitorFreq (to reduce size of STD-OUTPUT files) :  C- dump CG2D output at monitorFreq (to reduce size of STD-OUTPUT files) :
211        IF ( DIFFERENT_MULTIPLE(monitorFreq,myTime,        IF ( DIFFERENT_MULTIPLE(monitorFreq,myTime,
212       &                                    myTime-deltaTClock) ) THEN       &                                    myTime-deltaTClock) ) THEN
213         _BEGIN_MASTER( myThid )         IF ( debugLevel .GE. debLevA ) THEN
214         WRITE(msgBuf,'(A34,1PE24.14)') 'cg2d_init_res =',firstResidual          _BEGIN_MASTER( myThid )
215         CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)          WRITE(msgBuf,'(A34,1PE24.14)') 'cg2d_init_res =',firstResidual
216         WRITE(msgBuf,'(A34,I6)') 'cg2d_iters =',numIters          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
217         CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)          WRITE(msgBuf,'(A34,I6)') 'cg2d_iters =',numIters
218         WRITE(msgBuf,'(A34,1PE24.14)') 'cg2d_res =',lastResidual          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
219         CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)          WRITE(msgBuf,'(A34,1PE24.14)') 'cg2d_res =',lastResidual
220         _END_MASTER( )          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
221            _END_MASTER( )
222           ENDIF
223        ENDIF        ENDIF
224    
225  C--   Transfert the 2D-solution to "etaN" :  C--   Transfert the 2D-solution to "etaN" :
# Line 354  C Western boundary Line 360  C Western boundary
360    
361        IF ( DIFFERENT_MULTIPLE(monitorFreq,myTime,        IF ( DIFFERENT_MULTIPLE(monitorFreq,myTime,
362       &                                    myTime-deltaTClock) ) THEN       &                                    myTime-deltaTClock) ) THEN
363         _BEGIN_MASTER( myThid )         IF ( debugLevel .GE. debLevA ) THEN
364         WRITE(msgBuf,'(A34,1PE24.14)') 'cg3d_init_res =',firstResidual          _BEGIN_MASTER( myThid )
365         CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)          WRITE(msgBuf,'(A34,1PE24.14)') 'cg3d_init_res =',firstResidual
366         WRITE(msgBuf,'(A34,I6)') 'cg3d_iters =',numIters          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
367         CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)          WRITE(msgBuf,'(A34,I6)') 'cg3d_iters =',numIters
368         WRITE(msgBuf,'(A34,1PE24.14)') 'cg3d_res =',lastResidual          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
369         CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)          WRITE(msgBuf,'(A34,1PE24.14)') 'cg3d_res =',lastResidual
370         _END_MASTER( )          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
371            _END_MASTER( )
372           ENDIF
373        ENDIF        ENDIF
374    
375        ENDIF        ENDIF

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.42

  ViewVC Help
Powered by ViewVC 1.1.22