/[MITgcm]/MITgcm_contrib/MPMice/beaufort/code/cpl_mpmice.F
ViewVC logotype

Diff of /MITgcm_contrib/MPMice/beaufort/code/cpl_mpmice.F

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

revision 1.18 by dimitri, Thu Nov 14 17:17:47 2013 UTC revision 1.20 by dimitri, Wed Sep 28 15:11:47 2016 UTC
# Line 97  C     Send grid dimensions (Nx,Ny) Line 97  C     Send grid dimensions (Nx,Ny)
97  # endif /* CPL_COUPLED */  # endif /* CPL_COUPLED */
98         _END_MASTER( myThid )         _END_MASTER( myThid )
99    
100    C     Send longitude East of center of grid cell
101           DO bj=1,nSy
102            DO bi=1,nSx
103             DO j=1,sNy
104              DO i=1,sNx
105               local(i,j,bi,bj) = xC(i,j,bi,bj)
106              ENDDO
107             ENDDO
108            ENDDO
109           ENDDO
110           CALL GATHER_2D( xfer_array, local, myThid )
111    # ifdef CPL_DEBUG
112           CALL PLOT_FIELD_XYRL( xC, 'xC', myIter, myThid )
113    # endif /* CPL_DEBUG */
114    # ifdef CPL_COUPLED
115           _BEGIN_MASTER( myThid )
116           IF ( myworldid .EQ. local_ocean_leader ) THEN
117            buffsize = Nx*Ny
118            CALL MPI_SEND(xfer_array,buffsize,MPI_DOUBLE_PRECISION,
119         &     local_ice_leader,xCTag,MPI_COMM_WORLD,mpierr)
120           ENDIF
121           _END_MASTER( myThid )
122    # endif /* CPL_COUPLED */
123    
124    C     Send latitude North of center of grid cell
125           DO bj=1,nSy
126            DO bi=1,nSx
127             DO j=1,sNy
128              DO i=1,sNx
129               local(i,j,bi,bj) = yC(i,j,bi,bj)
130              ENDDO
131             ENDDO
132            ENDDO
133           ENDDO
134           CALL GATHER_2D( xfer_array, local, myThid )
135    # ifdef CPL_DEBUG
136           CALL PLOT_FIELD_XYRL( yC, 'yC', myIter, myThid )
137    # endif /* CPL_DEBUG */
138    # ifdef CPL_COUPLED
139           _BEGIN_MASTER( myThid )
140           IF ( myworldid .EQ. local_ocean_leader ) THEN
141            buffsize = Nx*Ny
142            CALL MPI_SEND(xfer_array,buffsize,MPI_DOUBLE_PRECISION,
143         &     local_ice_leader,yCTag,MPI_COMM_WORLD,mpierr)
144           ENDIF
145           _END_MASTER( myThid )
146    # endif /* CPL_COUPLED */
147    
148  C     Send longitude East of SouthWest corner  C     Send longitude East of SouthWest corner
149         DO bj=1,nSy         DO bj=1,nSy
150          DO bi=1,nSx          DO bi=1,nSx
# Line 193  C     Send distance in m between SouthWe Line 241  C     Send distance in m between SouthWe
241         _END_MASTER( myThid )         _END_MASTER( myThid )
242  # endif /* CPL_COUPLED */  # endif /* CPL_COUPLED */
243    
244    C     Send cosine(alpha) relative to geographic direction at grid cell center
245           DO bj=1,nSy
246            DO bi=1,nSx
247             DO j=1,sNy
248              DO i=1,sNx
249               local(i,j,bi,bj) = angleCosC(i,j,bi,bj)
250              ENDDO
251             ENDDO
252            ENDDO
253           ENDDO
254           CALL GATHER_2D( xfer_array, local, myThid )
255    # ifdef CPL_DEBUG
256           CALL PLOT_FIELD_XYRL( angleCosC, 'aCS', myIter, myThid )
257    # endif /* CPL_DEBUG */
258    # ifdef CPL_COUPLED
259           _BEGIN_MASTER( myThid )
260           IF ( myworldid .EQ. local_ocean_leader ) THEN
261            buffsize = Nx*Ny
262            CALL MPI_SEND(xfer_array,buffsize,MPI_DOUBLE_PRECISION,
263         &     local_ice_leader,aCStag,MPI_COMM_WORLD,mpierr)
264           ENDIF
265           _END_MASTER( myThid )
266    # endif /* CPL_COUPLED */
267    
268    C     Send sine(alpha) relative to geographic direction at grid cell center
269           DO bj=1,nSy
270            DO bi=1,nSx
271             DO j=1,sNy
272              DO i=1,sNx
273               local(i,j,bi,bj) = angleSinC(i,j,bi,bj)
274              ENDDO
275             ENDDO
276            ENDDO
277           ENDDO
278           CALL GATHER_2D( xfer_array, local, myThid )
279    # ifdef CPL_DEBUG
280           CALL PLOT_FIELD_XYRL( angleSinC, 'aSN', myIter, myThid )
281    # endif /* CPL_DEBUG */
282    # ifdef CPL_COUPLED
283           _BEGIN_MASTER( myThid )
284           IF ( myworldid .EQ. local_ocean_leader ) THEN
285            buffsize = Nx*Ny
286            CALL MPI_SEND(xfer_array,buffsize,MPI_DOUBLE_PRECISION,
287         &     local_ice_leader,aSNtag,MPI_COMM_WORLD,mpierr)
288           ENDIF
289           _END_MASTER( myThid )
290    # endif /* CPL_COUPLED */
291    
292  C     Send landmask of center of grid cell, 0 is land, >0 is ocean  C     Send landmask of center of grid cell, 0 is land, >0 is ocean
293         DO bj=1,nSy         DO bj=1,nSy
294          DO bi=1,nSx          DO bi=1,nSx
# Line 1106  C     Receive residual shortwave Line 1202  C     Receive residual shortwave
1202         DO bi=1,nSx         DO bi=1,nSx
1203          DO j=1,sNy          DO j=1,sNy
1204           DO i=1,sNx           DO i=1,sNx
1205              Qnet(i,j,bi,bj) = Qnet(i,j,bi,bj) - Qsw(i,j,bi,bj)
1206            Qsw(i,j,bi,bj) = -AREA(i,j,bi,bj)  * local(i,j,bi,bj) +            Qsw(i,j,bi,bj) = -AREA(i,j,bi,bj)  * local(i,j,bi,bj) +
1207       &                  (1.-AREA(i,j,bi,bj)) *   Qsw(i,j,bi,bj)       &                  (1.-AREA(i,j,bi,bj)) *   Qsw(i,j,bi,bj)
1208           ENDDO           ENDDO

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.22