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

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

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

revision 1.5 by jmc, Mon Nov 22 16:27:05 2004 UTC revision 1.7 by heimbach, Fri Jul 27 22:18:57 2007 UTC
# Line 56  C-    safer to work on a local copy of r Line 56  C-    safer to work on a local copy of r
56        ENDDO        ENDDO
57    
58  C-    Internal exchange for calculations in X  C-    Internal exchange for calculations in X
59  #ifndef ALLOW_AUTODIFF_TAMC  cph-exch2#ifndef ALLOW_AUTODIFF_TAMC
60        IF ( useCubedSphereExchange ) THEN        IF ( useCubedSphereExchange ) THEN
61          CALL FILL_CS_CORNER_TR_RL( .TRUE., rhoLoc, bi,bj, myThid )          CALL FILL_CS_CORNER_TR_RL( .TRUE., rhoLoc, bi,bj, myThid )
62        ENDIF        ENDIF
63  #endif  cph-exch2#endif
64        DO j=1-Oly,sNy+Oly        DO j=1-Oly,sNy+Oly
65         DO i=1-Olx+1,sNx+Olx         DO i=1-Olx+1,sNx+Olx
66          sigmaX(i,j,k)=_maskW(i,j,k,bi,bj)          sigmaX(i,j,k)=_maskW(i,j,k,bi,bj)
# Line 70  C-    Internal exchange for calculations Line 70  C-    Internal exchange for calculations
70        ENDDO        ENDDO
71    
72  C-    Internal exchange for calculations in Y  C-    Internal exchange for calculations in Y
73  #ifndef ALLOW_AUTODIFF_TAMC  cph-exch2#ifndef ALLOW_AUTODIFF_TAMC
74        IF ( useCubedSphereExchange ) THEN        IF ( useCubedSphereExchange ) THEN
75          CALL FILL_CS_CORNER_TR_RL( .FALSE., rhoLoc, bi,bj, myThid )          CALL FILL_CS_CORNER_TR_RL( .FALSE., rhoLoc, bi,bj, myThid )
76        ENDIF        ENDIF
77  #endif  cph-exch2#endif
78        DO j=1-Oly+1,sNy+Oly        DO j=1-Oly+1,sNy+Oly
79         DO i=1-Olx,sNx+Olx         DO i=1-Olx,sNx+Olx
80          sigmaY(i,j,k)=_maskS(i,j,k,bi,bj)          sigmaY(i,j,k)=_maskS(i,j,k,bi,bj)
# Line 83  C-    Internal exchange for calculations Line 83  C-    Internal exchange for calculations
83         ENDDO         ENDDO
84        ENDDO        ENDDO
85    
 C- jmc: Patrick, will this work for TAF ?  
86        IF (K.EQ.1) THEN        IF (K.EQ.1) THEN
87         DO j=1-Oly,sNy+Oly         DO j=1-Oly,sNy+Oly
88          DO i=1-Olx,sNx+Olx          DO i=1-Olx,sNx+Olx
# Line 94  C- jmc: Patrick, will this work for TAF Line 93  C- jmc: Patrick, will this work for TAF
93         DO j=1-Oly,sNy+Oly         DO j=1-Oly,sNy+Oly
94          DO i=1-Olx,sNx+Olx          DO i=1-Olx,sNx+Olx
95           sigmaR(i,j,k)= maskC(i,j,k,bi,bj)           sigmaR(i,j,k)= maskC(i,j,k,bi,bj)
96       &                *recip_drC(k)*rkFac       &                *recip_drC(k)*rkSign
97       &                *(sigKm1(i,j)-sigKp1(i,j))       &                *(sigKp1(i,j)-sigKm1(i,j))
98          ENDDO          ENDDO
99         ENDDO         ENDDO
100        ENDIF        ENDIF
 C- jmc: leave the old code commented (in case ...)  
 c     DO j=1-Oly,sNy+Oly  
 c      DO i=1-Olx,sNx+Olx  
 c       IF (K.NE.1 .AND. hfacC(i,j,k,bi,bj).NE.0.) THEN  
 c        sigmaR(i,j,k)=recip_drC(k)*rkFac*(sigKm1(i,j)-sigKp1(i,j))  
 c       ELSE  
 c        sigmaR(i,j,k)=0.  
 c       ENDIF  
 c      ENDDO  
 c     ENDDO  
101    
102        RETURN        RETURN
103        END        END

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

  ViewVC Help
Powered by ViewVC 1.1.22