Changeset 12933 for NEMO/trunk/src/OCE/LBC/lib_mpp.F90
- Timestamp:
- 2020-05-15T10:06:25+02:00 (4 years ago)
- Location:
- NEMO/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk
- Property svn:externals
-
old new 8 8 9 9 # SETTE 10 ^/utils/CI/sette@12 798sette10 ^/utils/CI/sette@12931 sette
-
- Property svn:externals
-
NEMO/trunk/src/OCE/LBC/lib_mpp.F90
r12512 r12933 1112 1112 CHARACTER(len=*), INTENT(in ), OPTIONAL :: cd2, cd3, cd4, cd5 1113 1113 CHARACTER(len=*), INTENT(in ), OPTIONAL :: cd6, cd7, cd8, cd9, cd10 1114 ! 1115 CHARACTER(LEN=8) :: clfmt ! writing format 1116 INTEGER :: inum 1117 INTEGER :: idg ! number of digits 1114 1118 !!---------------------------------------------------------------------- 1115 1119 ! 1116 1120 nstop = nstop + 1 1117 1121 ! 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. ) 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(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 1132 ENDIF 1120 1133 ! 1121 1134 WRITE(numout,*) … … 1145 1158 WRITE(numout,*) 'huge E-R-R-O-R : immediate stop' 1146 1159 WRITE(numout,*) 1160 CALL FLUSH(numout) 1161 CALL SLEEP(60) ! make sure that all output and abort files are written by all cores. 60s should be enough... 1147 1162 CALL mppstop( ld_abort = .true. ) 1148 1163 ENDIF … … 1207 1222 ! 1208 1223 CHARACTER(len=80) :: clfile 1224 CHARACTER(LEN=10) :: clfmt ! writing format 1209 1225 INTEGER :: iost 1226 INTEGER :: idg ! number of digits 1210 1227 !!---------------------------------------------------------------------- 1211 1228 ! … … 1214 1231 clfile = TRIM(cdfile) 1215 1232 IF( PRESENT( karea ) ) THEN 1216 IF( karea > 1 ) WRITE(clfile, "(a,'_',i4.4)") TRIM(clfile), karea-1 1233 IF( karea > 1 ) THEN 1234 idg = MAX( INT(LOG10(REAL(jpnij-1,wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=9 1235 WRITE(clfmt, "('(a,a,i', i1, '.', i1, ')')") idg, idg ! '(a,a,ix.x)' 1236 WRITE(clfile, clfmt) TRIM(clfile), '_', karea-1 1237 ENDIF 1217 1238 ENDIF 1218 1239 #if defined key_agrif
Note: See TracChangeset
for help on using the changeset viewer.