From 46860e73773aa78c3510dbfaff3e5c2894b0d811 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Thu, 14 Oct 2021 23:31:05 -0400 Subject: [PATCH] Header and variables are now read from the proper input files, not the bin.nc file --- src/io/io.f90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/io/io.f90 b/src/io/io.f90 index db08a0331..ffd01c817 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -1378,9 +1378,14 @@ module subroutine io_read_in_system(self, param) class(swiftest_parameters), intent(inout) :: param ! Internals integer(I4B) :: ierr + class(swiftest_parameters), allocatable :: tmp_param if ((param%in_type == NETCDF_DOUBLE_TYPE) .or. (param%in_type == NETCDF_FLOAT_TYPE)) then - ierr = self%read_frame(param%nciu, param) + allocate(tmp_param, source=param) + tmp_param%outfile = param%in_netcdf + tmp_param%out_form = param%in_form + ierr = self%read_frame(tmp_param%nciu, tmp_param) + deallocate(tmp_param) if (ierr /=0) call util_exit(FAILURE) else call self%cb%read_in(param)