Skip to content

Add diagnostics to print ASCII vector potential in cylinder and its g…#182

Draft
ysm1887 wants to merge 3 commits into
developfrom
A_cyl
Draft

Add diagnostics to print ASCII vector potential in cylinder and its g…#182
ysm1887 wants to merge 3 commits into
developfrom
A_cyl

Conversation

@ysm1887

@ysm1887 ysm1887 commented Nov 15, 2024

Copy link
Copy Markdown
Collaborator

@logan-nc and @parkjk, I just wanted to have ASCII vector potential in cylinder, and its gradient to give this result to other codes and compare. Is it okay?

I added "arzphicyl_flag" that prints out these variables.
image

Comment thread gpec/gpdiag.f
WRITE(out_unit,'(1x,a2,14(1x,a16))')"l","r","z",
$ "real(A_r)","imag(A_r)","real(A_z)","imag(A_z)",
$ "real(A_phi)","imag(A_phi)",
$ "real(dAr/dz)","imag(dAr/dz)",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep a consistent naming convention. ArA_r

@logan-nc

logan-nc commented Nov 26, 2024

Copy link
Copy Markdown
Contributor

I do not think this should be a diagnostic. It should just be directly in gpout. All the potentials are already computed on the cylindrical grid there, so this approach is doubling the work. The A_* are already output in the netcdf in gpout_xbrzphi, so just output them as an ascii there please. Just add a ~20 line section that starts with something like

      IF (arzphi_flag .AND. ascii_flag) THEN

or even just put it into the

      IF (brzphi_flag .AND. ascii_flag) THEN

Note also that the chebyshev vector potential is also available already, as are the b fields.

Am I missing something here that made you put it as a diagnostic instead of usual output?

@matt-pharr matt-pharr marked this pull request as draft June 8, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants