Skip to content

Commit

Permalink
fix: replace hardcoded unit number with newunit in test_diag_integral (
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Lentz authored Oct 24, 2024
1 parent fd1b606 commit bd9cbeb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test_fms/diag_integral/test_diag_integral.F90
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,12 @@ end subroutine test_sum_diag_integral_field
!-------------------------------------
subroutine read_diag_integral_file

character(17), parameter :: di_file='diag_integral.out'
integer, parameter :: iunit=100

character(*), parameter :: di_file='diag_integral.out'
integer :: iunit
character(100) :: cline1, cline2, cline3, cline4, cline5, clin6

!> read in computed values
open(unit=iunit,file=trim(di_file))
open(newunit=iunit, file=di_file)
read(iunit,*) cline1, cline2, cline3, cline4, cline5, clin6
read(iunit,*) itime, field_avg2, field_avg3, field_avgw, field_avgh
close(iunit)
Expand Down

0 comments on commit bd9cbeb

Please sign in to comment.