New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 10695 – NEMO

Changeset 10695


Ignore:
Timestamp:
2019-02-18T18:36:23+01:00 (6 years ago)
Author:
mathiot
Message:

change PRINT in CALL ctl_stop (ticket #2238 solution 1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/fix_ticket2238_solution1/src/OCE/ICB/icbutl.F90

    r10680 r10695  
    360360      REAL(wp)                , INTENT(in) ::   pi, pj               ! targeted coordinates in (i,j) referential 
    361361      ! 
    362       INTEGER  ::   ii, ij, icase   ! local integer 
     362      INTEGER  ::   ii, ij, icase, ierr   ! local integer 
    363363      ! 
    364364      ! weights corresponding to corner points of a T cell quadrant 
     
    382382 
    383383      ! 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 
    386388      ELSE                           ;   ii = mi1(ii) 
    387389      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 
    390392      ELSE                           ;   ij  = mj1(ij) 
    391393      ENDIF 
    392394      ! 
    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)') 
    395399      ! 
    396400      IF(    0.0_wp <= zi .AND. zi < 0.5_wp   ) THEN 
Note: See TracChangeset for help on using the changeset viewer.