Commit 50f5b5b6 authored by Burkhardt Rockel's avatar Burkhardt Rockel

Version 1.6 2019/04/17

functions `check_files.f90` and `check_files_iso.f90` modified for better structure of the _check\_files.log_ file
parent ad4fd292
Pipeline #13 failed with stages
.DS_Store
......@@ -115,14 +115,14 @@ SUBROUTINE check_files (ystartdate, yenddate, yinterval, yprefix1, yprefix2, ysu
INQUIRE(file=TRIM(bndfile1),exist=lexist)
IF (.NOT. lexist) THEN
IF ( TRIM(yprefix1) == TRIM(yprefix2)) THEN
WRITE (1,*) TRIM(bndfile1),' does not exist'
WRITE (1,'(A,A)') TRIM(bndfile1),' -- does not exist'
lok = .FALSE.
ELSE
bndfile2 = TRIM(inpdir)//'/'//TRIM(yprefix2)//yactdate(1:10)//TRIM(ysuffix)
INQUIRE(file=TRIM(bndfile2),exist=lexist)
IF (.NOT. lexist) THEN
WRITE (1,*) TRIM(bndfile1),' does not exist'
WRITE (1,*) TRIM(bndfile2),' does not exist'
WRITE (1,'(A,A)') TRIM(bndfile1),' -- does not exist'
WRITE (1,'(A,A)') TRIM(bndfile2),' -- does not exist'
lok = .FALSE.
! ELSE
! WRITE (1,*) TRIM(bndfile2),' found'
......@@ -136,11 +136,12 @@ SUBROUTINE check_files (ystartdate, yenddate, yinterval, yprefix1, yprefix2, ysu
hours = hours + inctime
ENDDO
CLOSE (1)
IF (lok) THEN
CLOSE (1, status='delete')
WRITE (*,'(A1)') '0'
ELSE
CLOSE (1)
WRITE (*,'(A1)') '1'
ENDIF
......@@ -180,14 +181,14 @@ SUBROUTINE check_files (ystartdate, yenddate, yinterval, yprefix1, yprefix2, ysu
INQUIRE(file=bndfile1,exist=lexist)
IF (.NOT. lexist) THEN
IF ( TRIM(yprefix1) == TRIM(yprefix2)) THEN
WRITE (1,*) TRIM(bndfile1),' does not exist'
WRITE (1,'(A,A)') TRIM(bndfile1),' -- does not exist'
lok = .FALSE.
ELSE
bndfile2 = TRIM(inpdir)//'/'//TRIM(yprefix2)//TRIM(yactdate)//TRIM(ysuffix)
INQUIRE(file=bndfile2,exist=lexist)
IF (.NOT. lexist) THEN
WRITE (1,*) TRIM(bndfile1),' does not exist'
WRITE (1,*) TRIM(bndfile2),' does not exist'
WRITE (1,'(A,A)') TRIM(bndfile1),' -- does not exist'
WRITE (1,'(A,A)') TRIM(bndfile2),' -- does not exist'
lok = .FALSE.
! ELSE
! WRITE (1,*) TRIM(bndfile1),' found'
......@@ -200,12 +201,12 @@ SUBROUTINE check_files (ystartdate, yenddate, yinterval, yprefix1, yprefix2, ysu
seconds = seconds + inctime
ENDDO
CLOSE (1)
IF (lok) THEN
CLOSE (1, status='delete')
write (*,'(A1)') '0'
ELSE
CLOSE (1)
write (*,'(A1)') '1'
ENDIF
......
......@@ -114,14 +114,14 @@ SUBROUTINE check_files_iso (ystartdate, yenddate, yinterval, yprefix1, yprefix2,
INQUIRE(file=bndfile1,exist=lexist)
IF (.NOT. lexist) THEN
IF ( TRIM(yprefix1) == TRIM(yprefix2)) THEN
WRITE (1,*) TRIM(bndfile1),' does not exist'
WRITE (1,'(A,A)') TRIM(bndfile1),' -- does not exist'
lok = .FALSE.
ELSE
bndfile2 = TRIM(inpdir)//'/'//TRIM(yprefix2)//yactdate(1:8)//'T'//yactdate(9:14)//'Z'//TRIM(ysuffix)
INQUIRE(file=bndfile2,exist=lexist)
IF (.NOT. lexist) THEN
WRITE (1,*) TRIM(bndfile1),' does not exist'
WRITE (1,*) TRIM(bndfile2),' does not exist'
WRITE (1,'(A,A)') TRIM(bndfile1),' -- does not exist'
WRITE (1,'(A,A)') TRIM(bndfile2),' -- does not exist'
lok = .FALSE.
! ELSE
! WRITE (1,*) TRIM(bndfile1),' found'
......@@ -135,11 +135,12 @@ SUBROUTINE check_files_iso (ystartdate, yenddate, yinterval, yprefix1, yprefix2,
seconds = seconds + inctime
ENDDO
CLOSE (1)
IF (lok) THEN
CLOSE (1, status='delete')
write (*,'(A1)') '0'
ELSE
CLOSE (1)
write (*,'(A1)') '1'
ENDIF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment