From b22c2050c738cce8e03002703bce678a778d19df Mon Sep 17 00:00:00 2001 From: David A Minton Date: Thu, 14 Oct 2021 10:08:15 -0400 Subject: [PATCH] Fixed issue that was causing binary particle files to be written even in NetCDF output mode --- src/io/io.f90 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/io/io.f90 b/src/io/io.f90 index d68c090c9..e206c40cf 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -164,7 +164,7 @@ module subroutine io_dump_particle_info_base(self, param, idx) integer(I4B) :: i character(STRMAX) :: errmsg - !if ((param%out_type == REAL4_TYPE) .or. (param%out_type == REAL8_TYPE)) then + if ((param%out_type == REAL4_TYPE) .or. (param%out_type == REAL8_TYPE)) then if (lfirst) then select case(param%out_stat) case('APPEND') @@ -200,15 +200,14 @@ module subroutine io_dump_particle_info_base(self, param, idx) end select close(unit = LUN, err = 667, iomsg = errmsg) - !else if ((param%out_type == NETCDF_FLOAT_TYPE) .or. (param%out_type == NETCDF_DOUBLE_TYPE)) then - if ((param%out_type == NETCDF_FLOAT_TYPE) .or. (param%out_type == NETCDF_DOUBLE_TYPE)) then + else if ((param%out_type == NETCDF_FLOAT_TYPE) .or. (param%out_type == NETCDF_DOUBLE_TYPE)) then call self%write_particle_info(param%nciu) end if return 667 continue - write(*,*) "Error reading particle information file: " // trim(adjustl(errmsg)) + write(*,*) "Error writing particle information file: " // trim(adjustl(errmsg)) call util_exit(FAILURE) end subroutine io_dump_particle_info_base