Changeset 7646 for trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
- Timestamp:
- 2017-02-06T10:25:03+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
r6981 r7646 392 392 ENDIF 393 393 394 IF( iptglo .NE.0 )THEN394 IF( iptglo /= 0 )THEN 395 395 396 396 !read points'coordinates and directions … … 399 399 directemp(:) = 0 !value of directions of each points 400 400 DO jpt=1,iptglo 401 READ(numdct_in) i1,i2401 READ(numdct_in) i1, i2 402 402 coordtemp(jpt)%I = i1 403 403 coordtemp(jpt)%J = i2 404 404 ENDDO 405 READ(numdct_in) directemp(1:iptglo)405 READ(numdct_in) directemp(1:iptglo) 406 406 407 407 !debug … … 416 416 !Now each proc selects only points that are in its domain: 417 417 !-------------------------------------------------------- 418 iptloc = 0 ! initialize number of points selected419 DO jpt =1,iptglo !loop on listpoint read in the file420 418 iptloc = 0 ! initialize number of points selected 419 DO jpt = 1, iptglo ! loop on listpoint read in the file 420 ! 421 421 iiglo=coordtemp(jpt)%I ! global coordinates of the point 422 422 ijglo=coordtemp(jpt)%J ! " 423 423 424 IF( iiglo==jpi dta .AND. nimpp==1 ) iiglo = 2425 426 iiloc=iiglo- jpizoom+1-nimpp+1 ! local coordinates of the point427 ijloc=ijglo- jpjzoom+1-njmpp+1 ! "424 IF( iiglo==jpiglo .AND. nimpp==1 ) iiglo = 2 !!gm BUG: Hard coded periodicity ! 425 426 iiloc=iiglo-nimpp+1 ! local coordinates of the point 427 ijloc=ijglo-njmpp+1 ! " 428 428 429 429 !verify if the point is on the local domain:(1,nlei)*(1,nlej) 430 IF( iiloc .GE. 1 .AND. iiloc .LE.nlei .AND. &431 ijloc .GE. 1 .AND. ijloc .LE.nlej )THEN430 IF( iiloc >= 1 .AND. iiloc <= nlei .AND. & 431 ijloc >= 1 .AND. ijloc <= nlej )THEN 432 432 iptloc = iptloc + 1 ! count local points 433 433 secs(jsec)%listPoint(iptloc) = POINT_SECTION(mi0(iiglo),mj0(ijglo)) ! store local coordinates 434 434 secs(jsec)%direction(iptloc) = directemp(jpt) ! store local direction 435 435 ENDIF 436 437 END DO436 ! 437 END DO 438 438 439 439 secs(jsec)%nb_point=iptloc !store number of section's points … … 444 444 WRITE(numout,*)" List of points selected by the proc:" 445 445 DO jpt = 1,iptloc 446 iiglo = secs(jsec)%listPoint(jpt)%I + jpizoom - 1 +nimpp - 1447 ijglo = secs(jsec)%listPoint(jpt)%J + jpjzoom - 1 +njmpp - 1446 iiglo = secs(jsec)%listPoint(jpt)%I + nimpp - 1 447 ijglo = secs(jsec)%listPoint(jpt)%J + njmpp - 1 448 448 WRITE(numout,*)' # I J : ',iiglo,ijglo 449 449 ENDDO … … 452 452 IF(jsec==nn_secdebug .AND. secs(jsec)%nb_point .NE. 0)THEN 453 453 DO jpt = 1,iptloc 454 iiglo = secs(jsec)%listPoint(jpt)%I + jpizoom - 1 +nimpp - 1455 ijglo = secs(jsec)%listPoint(jpt)%J + jpjzoom - 1 +njmpp - 1454 iiglo = secs(jsec)%listPoint(jpt)%I + nimpp - 1 455 ijglo = secs(jsec)%listPoint(jpt)%J + njmpp - 1 456 456 ENDDO 457 457 ENDIF … … 468 468 IF(jsec==nn_secdebug .AND. secs(jsec)%nb_point .NE. 0)THEN 469 469 DO jpt = 1,secs(jsec)%nb_point 470 iiglo = secs(jsec)%listPoint(jpt)%I + jpizoom - 1 +nimpp - 1471 ijglo = secs(jsec)%listPoint(jpt)%J + jpjzoom - 1 +njmpp - 1470 iiglo = secs(jsec)%listPoint(jpt)%I + nimpp - 1 471 ijglo = secs(jsec)%listPoint(jpt)%J + njmpp - 1 472 472 ENDDO 473 473 ENDIF … … 479 479 iptloc = secs(jsec)%nb_point 480 480 DO jpt = 1,iptloc 481 iiglo = secs(jsec)%listPoint(jpt)%I + jpizoom - 1 +nimpp - 1482 ijglo = secs(jsec)%listPoint(jpt)%J + jpjzoom - 1 +njmpp - 1481 iiglo = secs(jsec)%listPoint(jpt)%I + nimpp - 1 482 ijglo = secs(jsec)%listPoint(jpt)%J + njmpp - 1 483 483 WRITE(numout,*)' # I J : ',iiglo,ijglo 484 484 CALL FLUSH(numout)
Note: See TracChangeset
for help on using the changeset viewer.