/[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.6 by cnh, Sun Sep 6 14:45:11 1998 UTC revision 1.7 by cnh, Tue Sep 8 01:37:49 1998 UTC
# Line 43  C         Inverse of depth Line 43  C         Inverse of depth
43            ELSE            ELSE
44             recip_H(i,j,bi,bj) = 1. _d 0 /  abs( H(i,j,bi,bj) )             recip_H(i,j,bi,bj) = 1. _d 0 /  abs( H(i,j,bi,bj) )
45            ENDIF            ENDIF
46              depthInK(i,j,bi,bj) = 0.
47           ENDDO           ENDDO
48          ENDDO          ENDDO
49         ENDDO         ENDDO
# Line 55  C     Calculate lopping factor hFacC Line 56  C     Calculate lopping factor hFacC
56          DO K=1, Nr          DO K=1, Nr
57           DO J=1,sNy           DO J=1,sNy
58            DO I=1,sNx            DO I=1,sNx
59    C          Round depths within a small fraction of layer depth to that
60    C          layer depth.
61               IF ( ABS(H(I,J,bi,bj)-rF(K)) .LT. 1. _d -6*ABS(rF(K)) .AND.
62         &          ABS(H(I,J,bi,bj)-rF(K)) .LT. 1. _d -6*ABS(H(I,J,bi,bj)) )THEN
63                H(I,J,bi,bj) = rF(K)
64               ENDIF
65             IF     ( H(I,J,bi,bj)*rkFac .GE. rF(K)*rkFac ) THEN             IF     ( H(I,J,bi,bj)*rkFac .GE. rF(K)*rkFac ) THEN
66  C           Top of cell is below base of domain  C           Top of cell is below base of domain
67              hFacC(I,J,K,bi,bj) = 0.              hFacC(I,J,K,bi,bj) = 0.
# Line 64  C           Base of domain is below bott Line 71  C           Base of domain is below bott
71             ELSE             ELSE
72  C           Base of domain is in this cell  C           Base of domain is in this cell
73  C           Set hFac to the fraction of the cell that is open.  C           Set hFac to the fraction of the cell that is open.
74              hFacC(I,J,K,bi,bj) = (rF(K)*rkFac-H(I,J,bi,bj)*rkFac)*recip_drF(K)  C           hFacC(I,J,K,bi,bj) = (rF(K)*rkFac-H(I,J,bi,bj)*rkFac)*recip_drF(K)
75    CcnhDebugStarts
76    C Impose full-step
77                hFacC(I,J,K,bi,bj) = 1.
78    CCnhDebugEnds
79             ENDIF             ENDIF
80  C Impose minimum fraction  C Impose minimum fraction
81             IF (hFacC(I,J,K,bi,bj).LT.hFacMin) THEN             IF (hFacC(I,J,K,bi,bj).LT.hFacMin) THEN
# Line 82  C Impose minimum size (dimensional) Line 93  C Impose minimum size (dimensional)
93               hFacC(I,J,K,bi,bj)=hFacMinDr*recip_drF(k)               hFacC(I,J,K,bi,bj)=hFacMinDr*recip_drF(k)
94              ENDIF              ENDIF
95             ENDIF             ENDIF
96               depthInK(i,j,bi,bj) = depthInK(i,j,bi,bj) + hFacC(i,j,k,bi,bj)
97            ENDDO            ENDDO
98           ENDDO           ENDDO
99          ENDDO          ENDDO
100         ENDDO         ENDDO
101        ENDDO        ENDDO
102        _EXCH_XYZ_R4(hFacC , myThid )        _EXCH_XYZ_R4(hFacC , myThid )
103          _EXCH_XY_R4( depthInK, myThid )
104    
105          CALL PLOT_FIELD_XYRS( depthInK, 'Model Depths K Index' , 1, myThid )
106    
107  C     hFacW and hFacS (at U and V points)  C     hFacW and hFacS (at U and V points)
108        DO bj=myByLo(myThid), myByHi(myThid)        DO bj=myByLo(myThid), myByHi(myThid)

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

  ViewVC Help
Powered by ViewVC 1.1.22