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

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

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

revision 1.14 by adcroft, Thu Dec 10 00:16:16 1998 UTC revision 1.15 by adcroft, Mon Mar 22 15:54:04 1999 UTC
# Line 32  C     bi,bj  - Loop counters Line 32  C     bi,bj  - Loop counters
32  C     I,J,K  C     I,J,K
33        INTEGER bi, bj        INTEGER bi, bj
34        INTEGER  I, J, K        INTEGER  I, J, K
35    #ifdef ALLOW_NONHYDROSTATIC
36          INTEGER Km1
37          _RL hFacUpper,hFacLower
38    #endif
39    
40  C     Calculate quantities derived from XY depth map  C     Calculate quantities derived from XY depth map
41        DO bj = myByLo(myThid), myByHi(myThid)        DO bj = myByLo(myThid), myByHi(myThid)
# Line 74  C           Base of domain is below bott Line 78  C           Base of domain is below bott
78             ELSE             ELSE
79  C           Base of domain is in this cell  C           Base of domain is in this cell
80  C           Set hFac to the fraction of the cell that is open.  C           Set hFac to the fraction of the cell that is open.
81              hFacC(I,J,K,bi,bj) = (rF(K)*rkFac-H(I,J,bi,bj)*rkFac)*recip_drF(K)              hFacC(I,J,K,bi,bj) =
82         &       (rF(K)*rkFac-H(I,J,bi,bj)*rkFac)*recip_drF(K)
83             ENDIF             ENDIF
84  C Impose minimum fraction  C Impose minimum fraction
85             IF (hFacC(I,J,K,bi,bj).LT.hFacMin) THEN             IF (hFacC(I,J,K,bi,bj).LT.hFacMin) THEN
# Line 185  C     Calculate recipricols grid lengths Line 190  C     Calculate recipricols grid lengths
190        _EXCH_XY_R4(recip_dxV, myThid )        _EXCH_XY_R4(recip_dxV, myThid )
191        _EXCH_XY_R4(recip_dyU, myThid )        _EXCH_XY_R4(recip_dyU, myThid )
192    
193    #ifdef ALLOW_NONHYDROSTATIC
194    C--   Calculate the reciprocal hfac distance/volume for W cells
195          DO bj = myByLo(myThid), myByHi(myThid)
196           DO bi = myBxLo(myThid), myBxHi(myThid)
197            DO K=1,Nr
198             Km1=max(K-1,1)
199             hFacUpper=drF(Km1)/(drF(Km1)+drF(K))
200             IF (Km1.EQ.K) hFacUpper=0.
201             hFacLower=drF(K)/(drF(Km1)+drF(K))
202             DO J=1,sNy
203              DO I=1,sNx
204               IF (hFacC(I,J,K,bi,bj).NE.0.) THEN
205                IF (hFacC(I,J,K,bi,bj).LE.0.5) THEN
206                recip_hFacU(I,J,K,bi,bj)=
207         &         hFacUpper+hFacLower*hFacC(I,J,K,bi,bj)
208                ELSE
209                 recip_hFacU(I,J,K,bi,bj)=1.
210                ENDIF
211               ELSE
212                recip_hFacU(I,J,K,bi,bj)=0.
213               ENDIF
214               IF (recip_hFacU(I,J,K,bi,bj).NE.0.)
215         &      recip_hFacU(I,J,K,bi,bj)=1./recip_hFacU(I,J,K,bi,bj)
216              ENDDO
217             ENDDO
218            ENDDO
219           ENDDO
220          ENDDO
221          _EXCH_XY_R4(recip_hFacU, myThid )
222    #endif
223  C  C
224        RETURN        RETURN
225        END        END

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22