/[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.15 by adcroft, Mon Mar 22 15:54:04 1999 UTC revision 1.24 by cnh, Wed Sep 26 18:09:15 2001 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    C $Name$
3    
4  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
5    
6  CStartOfInterface  CBOP
7    C     !ROUTINE: INI_MASKS_ETC
8    C     !INTERFACE:
9        SUBROUTINE INI_MASKS_ETC( myThid )        SUBROUTINE INI_MASKS_ETC( myThid )
10  C     /==========================================================\  C     !DESCRIPTION: \bv
11  C     | SUBROUTINE INI_MASKS_ETC                                 |  C     *==========================================================*
12  C     | o Initialise masks and topography factors                |  C     | SUBROUTINE INI_MASKS_ETC                                  
13  C     |==========================================================|  C     | o Initialise masks and topography factors                
14  C     | These arrays are used throughout the code and describe   |  C     *==========================================================*
15  C     | the topography of the domain through masks (0s and 1s)   |  C     | These arrays are used throughout the code and describe    
16  C     | and fractional height factors (0<hFac<1). The latter     |  C     | the topography of the domain through masks (0s and 1s)    
17  C     | distinguish between the lopped-cell and full-step        |  C     | and fractional height factors (0<hFac<1). The latter      
18  C     | topographic representations.                             |  C     | distinguish between the lopped-cell and full-step        
19  C     \==========================================================/  C     | topographic representations.                              
20        IMPLICIT NONE  C     *==========================================================*
21    C     \ev
22    
23    C     !USES:
24          IMPLICIT NONE
25  C     === Global variables ===  C     === Global variables ===
26  #include "SIZE.h"  #include "SIZE.h"
27  #include "EEPARAMS.h"  #include "EEPARAMS.h"
28  #include "PARAMS.h"  #include "PARAMS.h"
29  #include "GRID.h"  #include "GRID.h"
30    #include "SURFACE.h"
31    
32    C     !INPUT/OUTPUT PARAMETERS:
33  C     == Routine arguments ==  C     == Routine arguments ==
34  C     myThid -  Number of this instance of INI_MASKS_ETC  C     myThid -  Number of this instance of INI_MASKS_ETC
35        INTEGER myThid        INTEGER myThid
 CEndOfInterface  
36    
37    C     !LOCAL VARIABLES:
38    C     == Local variables in common ==
39    C     tmpfld  - Temporary array used to compute & write Total Depth
40    C               has to be in common for multi threading
41          COMMON / LOCAL_INI_MASKS_ETC / tmpfld
42          _RS tmpfld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
43  C     == Local variables ==  C     == Local variables ==
44  C     bi,bj  - Loop counters  C     bi,bj  - Loop counters
45  C     I,J,K  C     I,J,K
# Line 36  C     I,J,K Line 49  C     I,J,K
49        INTEGER Km1        INTEGER Km1
50        _RL hFacUpper,hFacLower        _RL hFacUpper,hFacLower
51  #endif  #endif
52          _RL hFacCtmp
53          _RL hFacMnSz
54    CEOP
55    
56  C     Calculate quantities derived from XY depth map  C- Calculate lopping factor hFacC : over-estimate the part inside of the domain
57        DO bj = myByLo(myThid), myByHi(myThid)  C    taking into account the lower_R Boundary (Bathymetrie / Top of Atmos)
58         DO bi = myBxLo(myThid), myBxHi(myThid)        DO bj=myByLo(myThid), myByHi(myThid)
59          DO J=1,sNy         DO bi=myBxLo(myThid), myBxHi(myThid)
60           DO I=1,sNx          DO K=1, Nr
61  C         Inverse of depth           hFacMnSz=max( hFacMin, min(hFacMinDr*recip_drF(k),1. _d 0) )
62            IF ( h(i,j,bi,bj) .EQ. 0. _d 0 ) THEN           DO J=1-Oly,sNy+Oly
63             recip_H(i,j,bi,bj) = 0. _d 0            DO I=1-Olx,sNx+Olx
64            ELSE  C      o Non-dimensional distance between grid bound. and domain lower_R bound.
65             recip_H(i,j,bi,bj) = 1. _d 0 /  abs( H(i,j,bi,bj) )             hFacCtmp = (rF(K)-R_low(I,J,bi,bj))*recip_drF(K)
66            ENDIF  C      o Select between, closed, open or partial (0,1,0-1)
67            depthInK(i,j,bi,bj) = 0.             hFacCtmp=min( max( hFacCtmp, 0. _d 0) , 1. _d 0)
68    C      o Impose minimum fraction and/or size (dimensional)
69               IF (hFacCtmp.LT.hFacMnSz) THEN
70                IF (hFacCtmp.LT.hFacMnSz*0.5) THEN
71                 hFacC(I,J,K,bi,bj)=0.
72                ELSE
73                 hFacC(I,J,K,bi,bj)=hFacMnSz
74                ENDIF
75               ELSE
76                 hFacC(I,J,K,bi,bj)=hFacCtmp
77               ENDIF
78              ENDDO
79           ENDDO           ENDDO
80          ENDDO          ENDDO
81    
82    C-  Re-calculate lower-R Boundary position, taking into account hFacC
83            DO J=1-Oly,sNy+Oly
84             DO I=1-Olx,sNx+Olx
85              R_low(I,J,bi,bj) = rF(1)
86              DO K=Nr,1,-1
87               R_low(I,J,bi,bj) = R_low(I,J,bi,bj)
88         &                      - drF(k)*hFacC(I,J,K,bi,bj)
89              ENDDO
90             ENDDO
91            ENDDO
92    C - end bi,bj loops.
93         ENDDO         ENDDO
94        ENDDO        ENDDO
       _EXCH_XY_R4(   recip_H, myThid )  
95    
96  C     Calculate lopping factor hFacC  C-  Calculate lopping factor hFacC : Remove part outside of the domain
97    C    taking into account the Reference (=at rest) Surface Position Ro_surf
98        DO bj=myByLo(myThid), myByHi(myThid)        DO bj=myByLo(myThid), myByHi(myThid)
99         DO bi=myBxLo(myThid), myBxHi(myThid)         DO bi=myBxLo(myThid), myBxHi(myThid)
100          DO K=1, Nr          DO K=1, Nr
101           DO J=1,sNy           hFacMnSz=max( hFacMin, min(hFacMinDr*recip_drF(k),1. _d 0) )
102            DO I=1,sNx           DO J=1-Oly,sNy+Oly
103  C          Round depths within a small fraction of layer depth to that            DO I=1-Olx,sNx+Olx
104  C          layer depth.  C      o Non-dimensional distance between grid boundary and model surface
105             IF ( ABS(H(I,J,bi,bj)-rF(K)) .LT.             hFacCtmp = (rF(k)-Ro_surf(I,J,bi,bj))*recip_drF(K)
106       &          1. _d -6*ABS(rF(K)) .AND.  C      o Reduce the previous fraction : substract the outside part.
107       &          ABS(H(I,J,bi,bj)-rF(K)) .LT.             hFacCtmp = hFacC(I,J,K,bi,bj) - max( hFacCtmp, 0. _d 0)
108       &          1. _d -6*ABS(H(I,J,bi,bj)) )THEN  C      o set to zero if empty Column :
109              H(I,J,bi,bj) = rF(K)             hFacCtmp = max( hFacCtmp, 0. _d 0)
110             ENDIF  C      o Impose minimum fraction and/or size (dimensional)
111             IF     ( H(I,J,bi,bj)*rkFac .GE. rF(K)*rkFac ) THEN             IF (hFacCtmp.LT.hFacMnSz) THEN
112  C           Top of cell is below base of domain              IF (hFacCtmp.LT.hFacMnSz*0.5) THEN
             hFacC(I,J,K,bi,bj) = 0.  
            ELSEIF ( H(I,J,bi,bj)*rkFac .LE. rF(K+1)*rkFac ) THEN  
 C           Base of domain is below bottom of this cell  
             hFacC(I,J,K,bi,bj) = 1.  
            ELSE  
 C           Base of domain is in this cell  
 C           Set hFac to the fraction of the cell that is open.  
             hFacC(I,J,K,bi,bj) =  
      &       (rF(K)*rkFac-H(I,J,bi,bj)*rkFac)*recip_drF(K)  
            ENDIF  
 C Impose minimum fraction  
            IF (hFacC(I,J,K,bi,bj).LT.hFacMin) THEN  
             IF (hFacC(I,J,K,bi,bj).LT.hFacMin*0.5) THEN  
113               hFacC(I,J,K,bi,bj)=0.               hFacC(I,J,K,bi,bj)=0.
114              ELSE              ELSE
115               hFacC(I,J,K,bi,bj)=hFacMin               hFacC(I,J,K,bi,bj)=hFacMnSz
116              ENDIF              ENDIF
117               ELSE
118                 hFacC(I,J,K,bi,bj)=hFacCtmp
119             ENDIF             ENDIF
120  C Impose minimum size (dimensional)            ENDDO
121             IF (drF(k)*hFacC(I,J,K,bi,bj).LT.hFacMinDr) THEN           ENDDO
122              IF (drF(k)*hFacC(I,J,K,bi,bj).LT.hFacMinDr*0.5) THEN          ENDDO
123               hFacC(I,J,K,bi,bj)=0.  
124              ELSE  C-  Re-calculate Reference surface position, taking into account hFacC
125               hFacC(I,J,K,bi,bj)=hFacMinDr*recip_drF(k)  C   initialize Total column fluid thickness and surface k index
126              ENDIF  C       Note: if no fluid (continent) ==> ksurf = Nr+1
127            DO J=1-Oly,sNy+Oly
128             DO I=1-Olx,sNx+Olx
129              tmpfld(I,J,bi,bj) = 0.
130              ksurfC(I,J,bi,bj) = Nr+1
131              Ro_surf(I,J,bi,bj) = R_low(I,J,bi,bj)
132              DO K=Nr,1,-1
133               Ro_surf(I,J,bi,bj) = Ro_surf(I,J,bi,bj)
134         &                        + drF(k)*hFacC(I,J,K,bi,bj)
135               IF (hFacC(I,J,K,bi,bj).NE.0.) THEN
136                ksurfC(I,J,bi,bj) = k
137                tmpfld(i,j,bi,bj) = tmpfld(i,j,bi,bj) + 1.
138             ENDIF             ENDIF
            depthInK(i,j,bi,bj) = depthInK(i,j,bi,bj)  
      &                          +hFacC(i,j,k,bi,bj)  
139            ENDDO            ENDDO
140           ENDDO           ENDDO
141          ENDDO          ENDDO
142    C - end bi,bj loops.
143         ENDDO         ENDDO
144        ENDDO        ENDDO
       _EXCH_XYZ_R4(hFacC , myThid )  
       _EXCH_XY_R4( depthInK, myThid )  
145    
146        CALL PLOT_FIELD_XYRS( depthInK,  C     CALL PLOT_FIELD_XYRS( tmpfld,
147       & 'Model Depths K Index' , 1, myThid )  C    &         'Model Depths K Index' , 1, myThid )
148          CALL PLOT_FIELD_XYRS(R_low,
149         &         'Model R_low (ini_masks_etc)', 1, myThid)
150          CALL PLOT_FIELD_XYRS(Ro_surf,
151         &         'Model Ro_surf (ini_masks_etc)', 1, myThid)
152    
153    C     Calculate quantities derived from XY depth map
154          DO bj = myByLo(myThid), myByHi(myThid)
155           DO bi = myBxLo(myThid), myBxHi(myThid)
156            DO j=1-Oly,sNy+Oly
157             DO i=1-Olx,sNx+Olx
158    C         Total fluid column thickness (r_unit) :
159    c         Rcolumn(i,j,bi,bj)= Ro_surf(i,j,bi,bj) - R_low(i,j,bi,bj)
160              tmpfld(i,j,bi,bj) = Ro_surf(i,j,bi,bj) - R_low(i,j,bi,bj)
161    C         Inverse of fluid column thickness (1/r_unit)
162              IF ( tmpfld(i,j,bi,bj) .LE. 0. ) THEN
163               recip_Rcol(i,j,bi,bj) = 0.
164              ELSE
165               recip_Rcol(i,j,bi,bj) = 1. / tmpfld(i,j,bi,bj)
166              ENDIF
167             ENDDO
168            ENDDO
169           ENDDO
170          ENDDO
171    C     _EXCH_XY_R4(   recip_Rcol, myThid )
172    
173  C     hFacW and hFacS (at U and V points)  C     hFacW and hFacS (at U and V points)
174        DO bj=myByLo(myThid), myByHi(myThid)        DO bj=myByLo(myThid), myByHi(myThid)
# Line 125  C     hFacW and hFacS (at U and V points Line 185  C     hFacW and hFacS (at U and V points
185          ENDDO          ENDDO
186         ENDDO         ENDDO
187        ENDDO        ENDDO
188        _EXCH_XYZ_R4(hFacW , myThid )        CALL EXCH_UV_XYZ_RS(hFacW,hFacS,.FALSE.,myThid)
189        _EXCH_XYZ_R4(hFacS , myThid )  C     The following block allows thin walls representation of non-periodic
190    C     boundaries such as happen on the lat-lon grid at the N/S poles.
191    C     We should really supply a flag for doing this.
192          DO bj=myByLo(myThid), myByHi(myThid)
193           DO bi=myBxLo(myThid), myBxHi(myThid)
194            DO K=1, Nr
195             DO J=1-Oly,sNy+Oly
196              DO I=1-Olx,sNx+Olx
197               IF (DYG(I,J,bi,bj).EQ.0.) hFacW(I,J,K,bi,bj)=0.
198               IF (DXG(I,J,bi,bj).EQ.0.) hFacS(I,J,K,bi,bj)=0.
199              ENDDO
200             ENDDO
201            ENDDO
202           ENDDO
203          ENDDO
204    
205    C-    Write to disk: Total Column Thickness & hFac(C,W,S):
206          _BARRIER
207          _BEGIN_MASTER( myThid )
208    C     CALL MDSWRITEFIELD( 'Depth', writeBinaryPrec, .TRUE.,
209    C    &                    'RS', 1, tmpfld, 1, -1, myThid )
210          CALL WRITE_FLD_XY_RS( 'Depth',' ',tmpfld,0,myThid)
211          CALL WRITE_FLD_XYZ_RS( 'hFacC',' ',hFacC,0,myThid)
212          CALL WRITE_FLD_XYZ_RS( 'hFacW',' ',hFacW,0,myThid)
213          CALL WRITE_FLD_XYZ_RS( 'hFacS',' ',hFacS,0,myThid)
214          _END_MASTER(myThid)
215    
216          CALL PLOT_FIELD_XYZRS( hFacC, 'hFacC' , Nr, 1, myThid )
217          CALL PLOT_FIELD_XYZRS( hFacW, 'hFacW' , Nr, 1, myThid )
218          CALL PLOT_FIELD_XYZRS( hFacS, 'hFacS' , Nr, 1, myThid )
219    
220  C     Masks and reciprocals of hFac[CWS]  C     Masks and reciprocals of hFac[CWS]
221        DO bj = myByLo(myThid), myByHi(myThid)        DO bj = myByLo(myThid), myByHi(myThid)
222         DO bi = myBxLo(myThid), myBxHi(myThid)         DO bi = myBxLo(myThid), myBxHi(myThid)
223          DO K=1,Nr          DO K=1,Nr
224           DO J=1,sNy           DO J=1-Oly,sNy+Oly
225            DO I=1,sNx            DO I=1-Olx,sNx+Olx
226             IF (HFacC(I,J,K,bi,bj) .NE. 0. _d 0 ) THEN             IF (HFacC(I,J,K,bi,bj) .NE. 0. ) THEN
227              recip_HFacC(I,J,K,bi,bj) = 1. _d 0 / HFacC(I,J,K,bi,bj)              recip_HFacC(I,J,K,bi,bj) = 1. / HFacC(I,J,K,bi,bj)
228                maskC(I,J,K,bi,bj) = 1.
229             ELSE             ELSE
230              recip_HFacC(I,J,K,bi,bj) = 0. _d 0              recip_HFacC(I,J,K,bi,bj) = 0.
231                maskC(I,J,K,bi,bj) = 0.
232             ENDIF             ENDIF
233             IF (HFacW(I,J,K,bi,bj) .NE. 0. _d 0 ) THEN             IF (HFacW(I,J,K,bi,bj) .NE. 0. ) THEN
234              recip_HFacW(I,J,K,bi,bj) = 1. _d 0 / HFacW(I,J,K,bi,bj)              recip_HFacW(I,J,K,bi,bj) = 1. / HFacW(I,J,K,bi,bj)
235              maskW(I,J,K,bi,bj) = 1. _d 0              maskW(I,J,K,bi,bj) = 1.
236             ELSE             ELSE
237              recip_HFacW(I,J,K,bi,bj) = 0. _d 0              recip_HFacW(I,J,K,bi,bj) = 0.
238              maskW(I,J,K,bi,bj) = 0.0 _d 0              maskW(I,J,K,bi,bj) = 0.
239             ENDIF             ENDIF
240             IF (HFacS(I,J,K,bi,bj) .NE. 0. _d 0 ) THEN             IF (HFacS(I,J,K,bi,bj) .NE. 0. ) THEN
241              recip_HFacS(I,J,K,bi,bj) = 1. _d 0 / HFacS(I,J,K,bi,bj)              recip_HFacS(I,J,K,bi,bj) = 1. / HFacS(I,J,K,bi,bj)
242              maskS(I,J,K,bi,bj) = 1. _d 0              maskS(I,J,K,bi,bj) = 1.
243             ELSE             ELSE
244              recip_HFacS(I,J,K,bi,bj) = 0. _d 0              recip_HFacS(I,J,K,bi,bj) = 0.
245              maskS(I,J,K,bi,bj) = 0. _d 0              maskS(I,J,K,bi,bj) = 0.
246             ENDIF             ENDIF
247            ENDDO            ENDDO
248           ENDDO           ENDDO
249          ENDDO          ENDDO
250    C-    Calculate surface k index for interface W & S (U & V points)
251            DO J=1-Oly,sNy+Oly
252             DO I=1-Olx,sNx+Olx
253              ksurfW(I,J,bi,bj) = Nr+1
254              ksurfS(I,J,bi,bj) = Nr+1
255              DO k=Nr,1,-1
256               IF (hFacW(I,J,K,bi,bj).NE.0.) ksurfW(I,J,bi,bj) = k
257               IF (hFacS(I,J,K,bi,bj).NE.0.) ksurfS(I,J,bi,bj) = k
258              ENDDO
259             ENDDO
260            ENDDO
261    C - end bi,bj loops.
262         ENDDO         ENDDO
263        ENDDO        ENDDO
264        _EXCH_XYZ_R4(recip_HFacC    , myThid )  C     _EXCH_XYZ_R4(recip_HFacC    , myThid )
265        _EXCH_XYZ_R4(recip_HFacW    , myThid )  C     _EXCH_XYZ_R4(recip_HFacW    , myThid )
266        _EXCH_XYZ_R4(recip_HFacS    , myThid )  C     _EXCH_XYZ_R4(recip_HFacS    , myThid )
267        _EXCH_XYZ_R4(maskW    , myThid )  C     _EXCH_XYZ_R4(maskW    , myThid )
268        _EXCH_XYZ_R4(maskS    , myThid )  C     _EXCH_XYZ_R4(maskS    , myThid )
269    
270  C     Calculate recipricols grid lengths  C     Calculate recipricols grid lengths
271        DO bj = myByLo(myThid), myByHi(myThid)        DO bj = myByLo(myThid), myByHi(myThid)
272         DO bi = myBxLo(myThid), myBxHi(myThid)         DO bi = myBxLo(myThid), myBxHi(myThid)
273          DO J=1,sNy          DO J=1-Oly,sNy+Oly
274           DO I=1,sNx           DO I=1-Olx,sNx+Olx
275            recip_dxG(I,J,bi,bj)=1.d0/dxG(I,J,bi,bj)            IF ( dxG(I,J,bi,bj) .NE. 0. )
276            recip_dyG(I,J,bi,bj)=1.d0/dyG(I,J,bi,bj)       &    recip_dxG(I,J,bi,bj)=1.d0/dxG(I,J,bi,bj)
277            recip_dxC(I,J,bi,bj)=1.d0/dxC(I,J,bi,bj)            IF ( dyG(I,J,bi,bj) .NE. 0. )
278            recip_dyC(I,J,bi,bj)=1.d0/dyC(I,J,bi,bj)       &    recip_dyG(I,J,bi,bj)=1.d0/dyG(I,J,bi,bj)
279            recip_dxF(I,J,bi,bj)=1.d0/dxF(I,J,bi,bj)            IF ( dxC(I,J,bi,bj) .NE. 0. )
280            recip_dyF(I,J,bi,bj)=1.d0/dyF(I,J,bi,bj)       &    recip_dxC(I,J,bi,bj)=1.d0/dxC(I,J,bi,bj)
281            recip_dxV(I,J,bi,bj)=1.d0/dxV(I,J,bi,bj)            IF ( dyC(I,J,bi,bj) .NE. 0. )
282            recip_dyU(I,J,bi,bj)=1.d0/dyU(I,J,bi,bj)       &    recip_dyC(I,J,bi,bj)=1.d0/dyC(I,J,bi,bj)
283              IF ( dxF(I,J,bi,bj) .NE. 0. )
284         &    recip_dxF(I,J,bi,bj)=1.d0/dxF(I,J,bi,bj)
285              IF ( dyF(I,J,bi,bj) .NE. 0. )
286         &    recip_dyF(I,J,bi,bj)=1.d0/dyF(I,J,bi,bj)
287              IF ( dxV(I,J,bi,bj) .NE. 0. )
288         &    recip_dxV(I,J,bi,bj)=1.d0/dxV(I,J,bi,bj)
289              IF ( dyU(I,J,bi,bj) .NE. 0. )
290         &    recip_dyU(I,J,bi,bj)=1.d0/dyU(I,J,bi,bj)
291              IF ( rA(I,J,bi,bj) .NE. 0. )
292         &    recip_rA(I,J,bi,bj)=1.d0/rA(I,J,bi,bj)
293              IF ( rAs(I,J,bi,bj) .NE. 0. )
294         &    recip_rAs(I,J,bi,bj)=1.d0/rAs(I,J,bi,bj)
295              IF ( rAw(I,J,bi,bj) .NE. 0. )
296         &    recip_rAw(I,J,bi,bj)=1.d0/rAw(I,J,bi,bj)
297              IF ( rAz(I,J,bi,bj) .NE. 0. )
298         &    recip_rAz(I,J,bi,bj)=1.d0/rAz(I,J,bi,bj)
299           ENDDO           ENDDO
300          ENDDO          ENDDO
301         ENDDO         ENDDO
302        ENDDO        ENDDO
303        _EXCH_XY_R4(recip_dxG, myThid )  C     Do not need these since above denominators are valid over full range
304        _EXCH_XY_R4(recip_dyG, myThid )  C     _EXCH_XY_R4(recip_dxG, myThid )
305        _EXCH_XY_R4(recip_dxC, myThid )  C     _EXCH_XY_R4(recip_dyG, myThid )
306        _EXCH_XY_R4(recip_dyC, myThid )  C     _EXCH_XY_R4(recip_dxC, myThid )
307        _EXCH_XY_R4(recip_dxF, myThid )  C     _EXCH_XY_R4(recip_dyC, myThid )
308        _EXCH_XY_R4(recip_dyF, myThid )  C     _EXCH_XY_R4(recip_dxF, myThid )
309        _EXCH_XY_R4(recip_dxV, myThid )  C     _EXCH_XY_R4(recip_dyF, myThid )
310        _EXCH_XY_R4(recip_dyU, myThid )  C     _EXCH_XY_R4(recip_dxV, myThid )
311    C     _EXCH_XY_R4(recip_dyU, myThid )
312    C     _EXCH_XY_R4(recip_rAw, myThid )
313    C     _EXCH_XY_R4(recip_rAs, myThid )
314    
315  #ifdef ALLOW_NONHYDROSTATIC  #ifdef ALLOW_NONHYDROSTATIC
316  C--   Calculate the reciprocal hfac distance/volume for W cells  C--   Calculate the reciprocal hfac distance/volume for W cells
# Line 199  C--   Calculate the reciprocal hfac dist Line 321  C--   Calculate the reciprocal hfac dist
321           hFacUpper=drF(Km1)/(drF(Km1)+drF(K))           hFacUpper=drF(Km1)/(drF(Km1)+drF(K))
322           IF (Km1.EQ.K) hFacUpper=0.           IF (Km1.EQ.K) hFacUpper=0.
323           hFacLower=drF(K)/(drF(Km1)+drF(K))           hFacLower=drF(K)/(drF(Km1)+drF(K))
324           DO J=1,sNy           DO J=1-Oly,sNy+Oly
325            DO I=1,sNx            DO I=1-Olx,sNx+Olx
326             IF (hFacC(I,J,K,bi,bj).NE.0.) THEN             IF (hFacC(I,J,K,bi,bj).NE.0.) THEN
327              IF (hFacC(I,J,K,bi,bj).LE.0.5) THEN              IF (hFacC(I,J,K,bi,bj).LE.0.5) THEN
328              recip_hFacU(I,J,K,bi,bj)=              recip_hFacU(I,J,K,bi,bj)=
# Line 218  C--   Calculate the reciprocal hfac dist Line 340  C--   Calculate the reciprocal hfac dist
340          ENDDO          ENDDO
341         ENDDO         ENDDO
342        ENDDO        ENDDO
343        _EXCH_XY_R4(recip_hFacU, myThid )  C     _EXCH_XY_R4(recip_hFacU, myThid )
344  #endif  #endif
345  C  C
346        RETURN        RETURN

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

  ViewVC Help
Powered by ViewVC 1.1.22