Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/netcdf_results_output.f90
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ subroutine write_results_netcdf(filename)
canonical_grid_nr, canonical_grid_ntheta, &
canonical_grid_nphi, canonical_ode_relerr, &
ntimstep, startmode, num_surf, sbeg, &
contr_pp, notrace_passing, &
isw_field_type, swcoll, deterministic, ran_seed, &
netcdffile, field_input, coord_input, &
wall_input, wall_units, wall_hit, wall_hit_cart, &
Expand Down Expand Up @@ -336,6 +337,11 @@ subroutine write_results_netcdf(filename)
call check_nc(status, 'put_att num_surf')
status = nf90_put_att(ncid, nf90_global, 'sbeg', sbeg)
call check_nc(status, 'put_att sbeg')
status = nf90_put_att(ncid, nf90_global, 'contr_pp', contr_pp)
call check_nc(status, 'put_att contr_pp')
status = nf90_put_att(ncid, nf90_global, 'notrace_passing', &
notrace_passing)
call check_nc(status, 'put_att notrace_passing')
status = nf90_put_att(ncid, nf90_global, 'isw_field_type', isw_field_type)
call check_nc(status, 'put_att isw_field_type')
status = nf90_put_att(ncid, nf90_global, 'swcoll', merge(1, 0, swcoll))
Expand Down
4 changes: 4 additions & 0 deletions test/python/test_netcdf_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def test_results_netcdf_created(self, vmec_file: str, tmp_path: Path):
ntestpart=8,
output_results_netcdf=True,
isw_field_type=3,
contr_pp=-1e10,
notrace_passing=0,
)
particles = pysimple.sample_surface(8, s=0.5)
pysimple.trace_parallel(particles)
Expand Down Expand Up @@ -89,6 +91,8 @@ def test_results_netcdf_created(self, vmec_file: str, tmp_path: Path):
assert ds.canonical_grid_nphi == 64
assert ds.canonical_ode_relerr == 1e-11
assert ds.multharm == 5
assert ds.contr_pp == -1e10
assert ds.notrace_passing == 0

finally:
os.chdir(original_dir)
Expand Down
Loading