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 13159 for NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/src/OCE/LBC/lib_mpp.F90 – NEMO

Ignore:
Timestamp:
2020-06-26T10:26:32+02:00 (4 years ago)
Author:
gsamson
Message:

merge trunk@r13136 into ASINTER-06 branch; pass all SETTE tests; results identical to trunk@r13136; ticket #2419

Location:
NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement

    • Property svn:externals
      •  

        old new  
        88 
        99# SETTE 
        10 ^/utils/CI/sette@HEAD         sette 
         10^/utils/CI/sette@12931        sette 
  • NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/src/OCE/LBC/lib_mpp.F90

    r12512 r13159  
    11121112      CHARACTER(len=*), INTENT(in   ), OPTIONAL ::        cd2, cd3, cd4, cd5 
    11131113      CHARACTER(len=*), INTENT(in   ), OPTIONAL ::   cd6, cd7, cd8, cd9, cd10 
     1114      ! 
     1115      CHARACTER(LEN=8) ::   clfmt            ! writing format 
     1116      INTEGER          ::   inum 
    11141117      !!---------------------------------------------------------------------- 
    11151118      ! 
    11161119      nstop = nstop + 1 
    11171120      ! 
    1118       ! force to open ocean.output file if not already opened 
    1119       IF( numout == 6 ) CALL ctl_opn( numout, 'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
     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 ) 
     1129      ENDIF 
    11201130      ! 
    11211131                            WRITE(numout,*) 
     
    11451155         WRITE(numout,*)  'huge E-R-R-O-R : immediate stop' 
    11461156         WRITE(numout,*)   
     1157         CALL FLUSH(numout) 
     1158         CALL SLEEP(60)   ! make sure that all output and abort files are written by all cores. 60s should be enough... 
    11471159         CALL mppstop( ld_abort = .true. ) 
    11481160      ENDIF 
     
    12071219      ! 
    12081220      CHARACTER(len=80) ::   clfile 
     1221      CHARACTER(LEN=10) ::   clfmt            ! writing format 
    12091222      INTEGER           ::   iost 
     1223      INTEGER           ::   idg              ! number of digits 
    12101224      !!---------------------------------------------------------------------- 
    12111225      ! 
     
    12141228      clfile = TRIM(cdfile) 
    12151229      IF( PRESENT( karea ) ) THEN 
    1216          IF( karea > 1 )   WRITE(clfile, "(a,'_',i4.4)") TRIM(clfile), karea-1 
     1230         IF( karea > 1 ) THEN 
     1231            ! Warning: jpnij is maybe not already defined when calling ctl_opn -> use mppsize instead of jpnij 
     1232            idg = MAX( INT(LOG10(REAL(MAX(1,mppsize-1),wp))) + 1, 4 )      ! how many digits to we need to write? min=4, max=9 
     1233            WRITE(clfmt, "('(a,a,i', i1, '.', i1, ')')") idg, idg          ! '(a,a,ix.x)' 
     1234            WRITE(clfile, clfmt) TRIM(clfile), '_', karea-1 
     1235         ENDIF 
    12171236      ENDIF 
    12181237#if defined key_agrif 
Note: See TracChangeset for help on using the changeset viewer.