Changeset 10695
- Timestamp:
- 2019-02-18T18:36:23+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/fix_ticket2238_solution1/src/OCE/ICB/icbutl.F90
r10680 r10695 360 360 REAL(wp) , INTENT(in) :: pi, pj ! targeted coordinates in (i,j) referential 361 361 ! 362 INTEGER :: ii, ij, icase ! local integer362 INTEGER :: ii, ij, icase, ierr ! local integer 363 363 ! 364 364 ! weights corresponding to corner points of a T cell quadrant … … 382 382 383 383 ! find position in this processor. Prevent near edge problems (see #1389) 384 IF ( ii < mig( 1 ) ) THEN ; ii = 1 ; PRINT *, 'SHOULD NOT SEE THIS 1' 385 ELSEIF( ii > mig(jpi) ) THEN ; ii = jpi ; PRINT *, 'SHOULD NOT SEE THIS jpi' 384 ! 385 ierr = 0 386 IF ( ii < mig( 1 ) ) THEN ; ii = 1 ; ierr = ierr + 1 387 ELSEIF( ii > mig(jpi) ) THEN ; ii = jpi ; ierr = ierr + 1 386 388 ELSE ; ii = mi1(ii) 387 389 ENDIF 388 IF ( ij < mjg( 1 ) ) THEN ; ij = 1 ; PRINT *, 'SHOULD NOT SEE THIS i 1'389 ELSEIF( ij > mjg(jpj) ) THEN ; ij = jpj ; PRINT *, 'SHOULD NOT SEE THIS jpj'390 IF ( ij < mjg( 1 ) ) THEN ; ij = 1 ; ierr = ierr + 1 391 ELSEIF( ij > mjg(jpj) ) THEN ; ij = jpj ; ierr = ierr + 1 390 392 ELSE ; ij = mj1(ij) 391 393 ENDIF 392 394 ! 393 IF( ii == jpi ) THEN ; ii = ii-1 ; PRINT *, 'SHOULD NOT SEE THIS ii-1' ; END IF 394 IF( ij == jpj ) THEN ; ij = ij-1 ; PRINT *, 'SHOULD NOT SEE THIS ij-1' ; END IF 395 IF( ii == jpi ) THEN ; ii = ii-1 ; ierr = ierr + 1 ; END IF 396 IF( ij == jpj ) THEN ; ij = ij-1 ; ierr = ierr + 1 ; END IF 397 ! 398 IF ( ierr > 0 ) CALL ctl_stop('STOP','icb_utl_bilin_e: an icebergs coordinates is out of valid range (out of bound error)') 395 399 ! 396 400 IF( 0.0_wp <= zi .AND. zi < 0.5_wp ) THEN
Note: See TracChangeset
for help on using the changeset viewer.