- Timestamp:
- 2013-03-26T11:45:16+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/LBC/mapcomm_mod.F90
r3837 r3849 156 156 157 157 ! Public routines 158 PUBLIC :: mapcomms, iprocmap 158 PUBLIC :: mapcomms, iprocmap, set_num_subdomains 159 159 160 160 ! Public variables … … 165 165 PUBLIC :: nsendp,nsendp2d,nrecvp,nrecvp2d,npatchsend,npatchrecv, & 166 166 nxsendp,nysendp,nzsendp,nxrecvp,nyrecvp,nzrecvp, & 167 idesrecvp,jdesrecvp,isrcsendp,jsrcsendp 167 idesrecvp,jdesrecvp,isrcsendp,jsrcsendp, nprocp 168 168 169 169 PUBLIC :: ielb, ieub, pielb, pjelb, pieub, pjeub, & 170 170 iesub, jesub, jeub, ilbext, iubext, jubext, jlbext, pnactive,& 171 piesub, pjesub, jelb, pilbext, pjlbext, pjubext, piubext, & 172 nprocp 171 piesub, pjesub, jelb, pilbext, pjlbext, pjubext, piubext 173 172 174 173 PUBLIC :: NONE & … … 191 190 192 191 ! Switch for trimming points below ocean floor from halo swaps 193 ! LOGICAL, PARAMETER :: msgtrim_z = .TRUE. ! .FALSE.194 LOGICAL, PUBLIC, SAVE 192 ! Defaults to true unless set via NEMO_MSGTRIM_Z environment var. 193 LOGICAL, PUBLIC, SAVE :: msgtrim_z 195 194 196 195 CONTAINS 196 197 SUBROUTINE set_num_subdomains(npes) 198 IMPLICIT none 199 !!------------------------------------------------------------------ 200 !! Set the number of subdomains to partition the domain into. 201 !!------------------------------------------------------------------ 202 INTEGER, INTENT(in) :: npes 203 204 nprocp = npes 205 206 END SUBROUTINE set_num_subdomains 207 197 208 198 209 SUBROUTINE mapcomms ( depth, ibotlvl, nx, ny, jperio, ierr ) … … 213 224 214 225 ! Local variables. 215 INTEGER :: i, i1, i2, i col, ihalo, iproc, iprocc, iprocx, &216 iprocy, j, j1, j2, lumapout,nadd, naddmaxr, naddmaxs226 INTEGER :: i, i1, i2, ihalo, iproc, iprocc, iprocx, & 227 iprocy, j, j1, j2, nadd, naddmaxr, naddmaxs 217 228 INTEGER :: ldiff0, ldiff1 ! Local vars for coping with wrapping of coords 218 229 INTEGER :: imax, imin ! Max/min value of i that a halo strip can run … … 1302 1313 IF ( addcorner ) THEN 1303 1314 #if defined ARPDEBUG 1304 WRITE (*,FMT="(I3,': ARPDBG adding corner send to ',I 2,', dir = ',I1)") &1315 WRITE (*,FMT="(I3,': ARPDBG adding corner send to ',I4,', dir = ',I1)") & 1305 1316 narea-1, procid(iprocc),i 1306 1317 #endif … … 1314 1325 1315 1326 #if defined ARPDEBUG 1316 WRITE (*,FMT="(I3,': ARPDBG adding corner recv. from ',I 3,', old dir = ',I1,' new dir = ',I1)") &1327 WRITE (*,FMT="(I3,': ARPDBG adding corner recv. from ',I4,', old dir = ',I1,' new dir = ',I1)") & 1317 1328 narea-1, procid(iprocc),i, j 1318 1329 #endif … … 1380 1391 ! ARP - for debugging only 1381 1392 !!$ IF(iprocmap == 0)THEN 1382 !!$ WRITE(*,"('iprocmap: failed to find owner PE for (',I3, I3,')')") ia, ja1393 !!$ WRITE(*,"('iprocmap: failed to find owner PE for (',I3,1x,I3,')')") ia, ja 1383 1394 !!$ WRITE(*,*) 'PE domains are [xmin:xmax][ymin:ymax]:' 1384 1395 !!$ DO iproc=1,nprocp,1 … … 1826 1837 1827 1838 ! Can any points along the left (low i) edge be trimmed? 1828 left_edge: DO i=ilo, ihi - nextra1839 left_edge: DO i=ilo, ihi 1829 1840 DO j=jlo, jhi 1830 1841 ! depth is global mask, i and j are local coords … … 1856 1867 1857 1868 ! Can any points along the right (high i) edge be trimmed? 1858 right_edge: DO i=ihi, ilo + nextra, -11869 right_edge: DO i=ihi, ilo, -1 1859 1870 DO j=jlo, jhi 1860 1871 ! IF (depth(i+nimpp-1-nextra,j+njmpp-1) .ne. land) exit right_edge
Note: See TracChangeset
for help on using the changeset viewer.