Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Fixed issue where when a string was overwritten by a shorter string i…
Browse files Browse the repository at this point in the history
…n NetCDF, the trailing characters of the older string remained.
  • Loading branch information
daminton committed Jan 9, 2023
1 parent e0498f6 commit 9bed146
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/swiftest/swiftest_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,7 @@ module subroutine swiftest_io_netcdf_write_info_body(self, nc, param)
! Internals
integer(I4B) :: i, j, idslot, old_mode
integer(I4B), dimension(:), allocatable :: ind
character(len=:), allocatable :: charstring
character(len=NAMELEN) :: charstring

! This string of spaces of length NAMELEN is used to clear out any old data left behind inside the string variables
call netcdf_io_check( nf90_set_fill(nc%id, NF90_NOFILL, old_mode), "netcdf_io_write_info_body nf90_set_fill NF90_NOFILL" )
Expand Down

0 comments on commit 9bed146

Please sign in to comment.