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 13011 for NEMO/trunk/src/OCE/LBC/lib_mpp.F90 – NEMO

Ignore:
Timestamp:
2020-06-03T09:56:28+02:00 (4 years ago)
Author:
smasson
Message:

trunk: make sure error messages are visible, see #2418

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/LBC/lib_mpp.F90

    r13009 r13011  
    11141114      ! 
    11151115      CHARACTER(LEN=8) ::   clfmt            ! writing format 
    1116       INTEGER ::   inum 
    1117       INTEGER ::   idg  ! number of digits 
     1116      INTEGER          ::   inum 
    11181117      !!---------------------------------------------------------------------- 
    11191118      ! 
    11201119      nstop = nstop + 1 
    11211120      ! 
    1122       IF( numout == 6 ) THEN                          ! force to open ocean.output file if not already opened 
    1123          CALL ctl_opn( numout, 'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    1124       ELSE 
    1125          IF( narea > 1 .AND. cd1 == 'STOP' ) THEN     ! add an error message in ocean.output 
    1126             CALL ctl_opn( inum,'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    1127             WRITE(inum,*) 
    1128             idg = MAX( INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1, 4 )        ! how many digits to we need to write? min=4, max=9 
    1129             WRITE(clfmt, "('(a,i', i1, '.', i1, ')')") idg, idg            ! '(a,ix.x)' 
    1130             WRITE(inum,clfmt) ' ===>>> : see E R R O R in ocean.output_', narea - 1 
    1131          ENDIF 
     1121      IF( cd1 == 'STOP' .AND. narea /= 1 ) THEN    ! Immediate stop: add an arror message in 'ocean.output' file 
     1122         CALL ctl_opn( inum, 'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
     1123         WRITE(inum,*) 
     1124         WRITE(inum,*) ' ==>>>   Look for "E R R O R" messages in all existing *ocean.output* files' 
     1125         CLOSE(inum) 
     1126      ENDIF 
     1127      IF( numout == 6 ) THEN                       ! force to open ocean.output file if not already opened 
     1128         CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE., narea ) 
    11321129      ENDIF 
    11331130      ! 
Note: See TracChangeset for help on using the changeset viewer.