Ignore:
Timestamp:
2020-06-17T13:01:47+02:00 (4 months ago)
Author:
acc
Message:

2020/dev_r12953_ENHANCE-10_acc_fix_traqsr. Merge in trunk changes from 12953 to current HEAD (13115). Fully SETTE tested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12953_ENHANCE-10_acc_fix_traqsr/tests/STATION_ASF/MY_SRC/stpctl.F90

    r12933 r13121  
    179179         ! 
    180180         IF( ll_colruns .or. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
    181             IF(lwp)   CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
     181            IF(lwp) THEN   ;   CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
     182            ELSE           ;   nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
     183            ENDIF 
    182184         ELSE                                    ! only mpi subdomains with errors are here -> STOP now 
    183185            CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
    184186         ENDIF 
    185187         ! 
    186          IF( nstop == 0 )   nstop = 1  
    187          ngrdstop = Agrif_Fixed() 
    188          ! 
     188      ENDIF 
     189      ! 
     190      IF( nstop > 0 ) THEN                                                  ! an error was detected and we did not abort yet... 
     191         ngrdstop = Agrif_Fixed()                                           ! store which grid got this error 
     192         IF( .NOT. ll_colruns .AND. jpnij > 1 )   CALL ctl_stop( 'STOP' )   ! we must abort here to avoid MPI deadlock 
    189193      ENDIF 
    190194      ! 
     
    219223      !!! WRITE(clsum, '(i'//clfmt//')') ksum                   ! this is creating a compilation error with AGRIF 
    220224      cl4 = '(i'//clfmt//')'   ;   WRITE(clsum, cl4) ksum 
    221       WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpnij-1,wp))) + 1     ! how many digits to we need to write ? (we decide max = 9) 
     225      WRITE(clfmt, '(i1)') INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1    ! how many digits to we need to write ? (we decide max = 9) 
    222226      cl4 = '(i'//clfmt//')'   ;   WRITE(clmin, cl4) kmin-1 
    223227                                   WRITE(clmax, cl4) kmax-1 
Note: See TracChangeset for help on using the changeset viewer.