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

Commit

Permalink
Merge branch 'debug'
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Oct 29, 2021
2 parents 61fa4a4 + 1ef9812 commit f62cf8a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/netcdf/netcdf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ module subroutine netcdf_initialize_output(self, param)
end select

!! Define the variables
!! Disabled chunking for now, as it was causing uncontrolled memory growth in some runs
call check( nf90_def_var(self%ncid, TIME_DIMNAME, self%out_type, self%time_dimid, self%time_varid) )
!call check( nf90_def_var_chunking(self%ncid, self%time_varid, NF90_CHUNKED, [self%time_chunk]) )
call check( nf90_def_var(self%ncid, ID_DIMNAME, NF90_INT, self%id_dimid, self%id_varid) )
Expand Down Expand Up @@ -736,7 +737,7 @@ module subroutine netcdf_read_particle_info_system(self, iu, param, plmask, tpma
pl%id(:) = pack(itemp, plmask)
tp%id(:) = pack(itemp, tpmask)

call check( nf90_get_var(iu%ncid, iu%name_varid, ctemp, count=[NAMELEN, 1]) )
call check( nf90_get_var(iu%ncid, iu%name_varid, ctemp, count=[NAMELEN, idmax]) )
call cb%info%set_value(name=ctemp(1))
do i = 1, npl
call pl%info(i)%set_value(name=ctemp(plind(i)))
Expand All @@ -745,7 +746,7 @@ module subroutine netcdf_read_particle_info_system(self, iu, param, plmask, tpma
call tp%info(i)%set_value(name=ctemp(tpind(i)))
end do

call check( nf90_get_var(iu%ncid, iu%ptype_varid, ctemp, count=[NAMELEN, 1]) )
call check( nf90_get_var(iu%ncid, iu%ptype_varid, ctemp, count=[NAMELEN, idmax]) )
call cb%info%set_value(particle_type=ctemp(1))
do i = 1, npl
call pl%info(i)%set_value(particle_type=ctemp(plind(i)))
Expand All @@ -754,7 +755,7 @@ module subroutine netcdf_read_particle_info_system(self, iu, param, plmask, tpma
call tp%info(i)%set_value(particle_type=ctemp(tpind(i)))
end do

call check( nf90_get_var(iu%ncid, iu%status_varid, ctemp, count=[NAMELEN, 1]) )
call check( nf90_get_var(iu%ncid, iu%status_varid, ctemp, count=[NAMELEN, idmax]) )
call cb%info%set_value(status=ctemp(1))
do i = 1, npl
call pl%info(i)%set_value(status=ctemp(plind(i)))
Expand All @@ -764,7 +765,7 @@ module subroutine netcdf_read_particle_info_system(self, iu, param, plmask, tpma
end do

if (param%lclose) then
call check( nf90_get_var(iu%ncid, iu%origin_type_varid, ctemp, count=[NAMELEN, 1]) )
call check( nf90_get_var(iu%ncid, iu%origin_type_varid, ctemp, count=[NAMELEN, idmax]) )
call cb%info%set_value(origin_type=ctemp(1))
do i = 1, npl
call pl%info(i)%set_value(origin_type=ctemp(plind(i)))
Expand Down

0 comments on commit f62cf8a

Please sign in to comment.