diff --git a/Source/dump.f90 b/Source/dump.f90 index 2cf728ddafc..52a7d65b3fe 100644 --- a/Source/dump.f90 +++ b/Source/dump.f90 @@ -5652,6 +5652,7 @@ SUBROUTINE DUMP_SLCF(T,DT,NM,IFRMT) INTEGER :: IFACT, JFACT, KFACT REAL(FB), ALLOCATABLE, DIMENSION(:) :: QQ_PACK REAL(FB) :: UVEL, VVEL, WVEL, VEL, PLOT3D_MIN, PLOT3D_MAX +INTEGER :: IERROR ! Return if there are no slices to process and this is not a Plot3D dump @@ -5990,13 +5991,13 @@ SUBROUTINE DUMP_SLCF(T,DT,NM,IFRMT) CHANGE_BOUND = 1 ELSE OPEN(LU_SLCF(IQ2,NM),FILE=FN_SLCF(IQ2,NM),ACTION='READ') - READ(LU_SLCF(IQ2,NM),*)T_BOUND, SLICE_MIN_BOUND, SLICE_MAX_BOUND + READ(LU_SLCF(IQ2,NM),FMT=*,IOSTAT=IERROR)T_BOUND, SLICE_MIN_BOUND, SLICE_MAX_BOUND CLOSE(LU_SLCF(IQ2,NM)) - IF (SLICE_MIN < SLICE_MIN_BOUND) THEN + IF (IERROR /= 0 .OR. SLICE_MIN < SLICE_MIN_BOUND) THEN SLICE_MIN_BOUND = SLICE_MIN CHANGE_BOUND = 1 ENDIF - IF (SLICE_MAX > SLICE_MAX_BOUND) THEN + IF (IERROR /= 0 .OR. SLICE_MAX > SLICE_MAX_BOUND) THEN SLICE_MAX_BOUND = SLICE_MAX CHANGE_BOUND = 1 ENDIF @@ -6010,6 +6011,7 @@ SUBROUTINE DUMP_SLCF(T,DT,NM,IFRMT) IQ2 = IQ + N_SLCF_MAX STIME = REAL(T_BEGIN + (T-T_BEGIN)*TIME_SHRINK_FACTOR,FB) ! write geometry for slice file + CHANGE_BOUND = 0 IF (ABS(STIME-T_BEGIN) SLICE_MAX_BOUND) THEN + IF (IERROR /= 0 .OR. SLICE_MAX > SLICE_MAX_BOUND) THEN SLICE_MAX_BOUND = SLICE_MAX CHANGE_BOUND = 1 ENDIF @@ -10350,7 +10352,7 @@ SUBROUTINE DUMP_BNDF(T,DT,NM) INTEGER, INTENT(IN) :: NM TYPE(PATCH_TYPE), POINTER :: PA REAL(FB) BNDF_TIME, BNDF_VAL_MIN, BNDF_VAL_MAX -INTEGER :: CHANGE_BOUND +INTEGER :: CHANGE_BOUND, IERROR IF (MESHES(NM)%N_PATCH==0 .AND. MESHES(NM)%N_INTERNAL_CFACE_CELLS==0) RETURN @@ -10483,13 +10485,13 @@ SUBROUTINE DUMP_BNDF(T,DT,NM) CHANGE_BOUND = 1 ELSE OPEN(LU_BNDF(NF+N_BNDF,NM),FILE=FN_BNDF(NF+N_BNDF,NM),ACTION='READ') - READ(LU_BNDF(NF+N_BNDF,NM),*)BNDF_TIME, BNDF_VAL_MIN, BNDF_VAL_MAX + READ(LU_BNDF(NF+N_BNDF,NM),FMT=*,IOSTAT=IERROR)BNDF_TIME, BNDF_VAL_MIN, BNDF_VAL_MAX CLOSE(LU_BNDF(NF+N_BNDF,NM)) - IF( BOUND_MIN < BNDF_VAL_MIN) THEN + IF( IERROR /= 0 .OR. BOUND_MIN < BNDF_VAL_MIN) THEN BNDF_VAL_MIN = BOUND_MIN CHANGE_BOUND = 1 ENDIF - IF( BOUND_MAX > BNDF_VAL_MAX) THEN + IF( IERROR /= 0 .OR. BOUND_MAX > BNDF_VAL_MAX) THEN BNDF_VAL_MAX = BOUND_MAX CHANGE_BOUND = 1 ENDIF @@ -10528,13 +10530,13 @@ SUBROUTINE DUMP_BNDF(T,DT,NM) IND,0,BF%Y_INDEX,BF%Z_INDEX,BF%PART_INDEX,0,0,BF%PROP_INDEX,0,0,T,DT,NM, & BOUND_MIN, BOUND_MAX) OPEN(LU_BNDG(NF+N_BNDF,NM),FILE=FN_BNDG(NF+N_BNDF,NM), ACTION='READ') - READ(LU_BNDG(NF+N_BNDF,NM),*)BNDF_TIME, BNDF_VAL_MIN, BNDF_VAL_MAX + READ(LU_BNDG(NF+N_BNDF,NM),FMT=*,IOSTAT=IERROR)BNDF_TIME, BNDF_VAL_MIN, BNDF_VAL_MAX CLOSE(LU_BNDG(NF+N_BNDF,NM)) - IF (BOUND_MIN < BNDF_VAL_MIN) THEN + IF (IERROR /= 0 .OR. BOUND_MIN < BNDF_VAL_MIN) THEN BNDF_VAL_MIN = BOUND_MIN CHANGE_BOUND = 1 ENDIF - IF (BOUND_MAX > BNDF_VAL_MAX) THEN + IF (IERROR /= 0 .OR. BOUND_MAX > BNDF_VAL_MAX) THEN BNDF_VAL_MAX = BOUND_MAX CHANGE_BOUND = 1 ENDIF