/[MITgcm]/MITgcm/pkg/generic_advdiff/gad_implicit_r.F
ViewVC logotype

Diff of /MITgcm/pkg/generic_advdiff/gad_implicit_r.F

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

revision 1.7 by jmc, Sat Dec 4 18:50:34 2004 UTC revision 1.8 by jmc, Thu Dec 16 22:28:43 2004 UTC
# Line 72  C errCode   :: > 0 if singular matrix Line 72  C errCode   :: > 0 if singular matrix
72        _RL rTrans(1-Olx:sNx+Olx,1-Oly:sNy+Oly)        _RL rTrans(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
73        _RL rTransKp1(1-Olx:sNx+Olx,1-Oly:sNy+Oly)        _RL rTransKp1(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
74        _RL localTijk(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)        _RL localTijk(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
75    #ifdef ALLOW_DIAGNOSTICS
76          INTEGER     kk
77          CHARACTER*8 diagName
78          CHARACTER*4 GAD_DIAG_SUFX, diagSufx
79          EXTERNAL    GAD_DIAG_SUFX
80          LOGICAL     DIAGNOSTICS_IS_ON
81          EXTERNAL    DIAGNOSTICS_IS_ON
82          _RL df (1-Olx:sNx+Olx,1-Oly:sNy+Oly)
83    #endif
84  CEOP  CEOP
85    
86  C--   no need to solve anything with only 1 level:  C--   no need to solve anything with only 1 level:
# Line 265  C--   Solve penta-diagonal system : Line 274  C--   Solve penta-diagonal system :
274          STOP 'GAD_IMPLICIT_R: no solver available'          STOP 'GAD_IMPLICIT_R: no solver available'
275        ENDIF        ENDIF
276    
277    #ifdef ALLOW_DIAGNOSTICS
278    C--   Set diagnostic suffix for the current tracer
279          IF ( useDiagnostics .AND. implicitDiffusion ) THEN
280            diagSufx = GAD_DIAG_SUFX( tracerIdentity, myThid )
281            diagName = 'DFrI'//diagSufx
282            IF ( DIAGNOSTICS_IS_ON(diagName,myThid) ) THEN
283             DO k= 1,Nr
284              IF ( k.EQ.1 ) THEN
285    C-  Note: Needs to call DIAGNOSTICS_FILL at level k=1 even if array == 0
286    C         otherwise counter is not incremented !!
287                DO j=1-OLy,sNy+OLy
288                 DO i=1-OLx,sNx+OLx
289                   df(i,j) = 0. _d 0
290                 ENDDO
291                ENDDO
292              ELSE
293                DO j=1,sNy
294                 DO i=1,sNx
295                   df(i,j) =
296         &              rA(i,j,bi,bj)
297         &            * KappaRX(i,j,k)*recip_drC(k)
298         &            * (gTracer(i,j,k,bi,bj) - gTracer(i,j,k-1,bi,bj))
299                 ENDDO
300                ENDDO
301              ENDIF
302              kk = -k
303              CALL DIAGNOSTICS_FILL(df,diagName, kk,1, 2,bi,bj, myThid)
304             ENDDO
305            ENDIF
306          ENDIF
307    #endif /* ALLOW_DIAGNOSTICS */
308    
309  C--   end if Nr > 1  C--   end if Nr > 1
310        ENDIF        ENDIF
311    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22