Repository navigation
GPEC v1.6.1 hotfix: netcdf units and Jbgradpsi_rmatch - #366
Merged
Merged
Conversation
xigradpsi, xigradpsi_dpsi and xigradalpha are xi.grad(psi_N) and xi.grad(alpha) normalized by chi1, so they are dimensionless, not m. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE
…type bwpmns_rmatch was only set in the branch that reuses the working coordinates (jac_out == jac_type and tmag_out /= 0), so other runs wrote uninitialized memory to Jbgradpsi_rmatch. Convert the RMATCH solution to output coordinates the same way as Jbgradpsi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE
…notes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE
Contributor
Author
|
@matt-pharr this is just a few lines to check - lets get it in so we don't forget |
matt-pharr
approved these changes
Nov 13, 2026
matt-pharr
left a comment
Collaborator
There was a problem hiding this comment.
Looks good. Approving and releasing
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not urgent. Julia work still has priority; review whenever convenient.
Patch release on top of v1.6.0, following the usual hotfix workflow (branch from master; after approval, merge to master, tag v1.6.1, then merge into develop).
Fixes
xigradpsi,xigradpsi_dpsiandxigradalphaingpec_profile_output_n*.ncwere labeledm. They are ξ·∇ψ_N and ξ·∇α divided by χ₁, so they have no units. They are now labeledunitless, the spelling already used elsewhere ingpout.f. Only the attribute changes.Jbgradpsi_rmatchwas empty in most runs.gpout_xbnormalfilled it only whenjac_out == jac_typeandtmag_out /= 0. In every other run it was written without ever being set; this build happened to leave it zero. It is now converted to the output coordinates the same wayJbgradpsiis. I checked the units ofJbgradpsi,Jbgradpsi_pestandJbgradpsi_rmatch: all three are area-normalized, soTeslais correct and was left unchanged.release = '1.6.1'indocs/conf.py, and a v1.6.1 section indocs/releases.rst.Verification
regression_solovev_resistive_example(rdcon → rmatch → gpec). I built v1.6.0 and this branch with identical gfortran settings and compared every netCDF output variable by variable:Jbgradpsi_rmatchJbgradpsi_rmatchin v1.6.0Jbgradpsi_rmatchherejac_out="pest",tmag_out=1)jac_out="hamada"tmag_out=0unitschanges. I did not compare global attributes, which include the version string.Jbgradpsito about 1e-14, the same agreement as on the unchanged branch, is the expected result. The arrays are not bit-identical, which shows they come from the RMATCH data, not from a copy ofJbgradpsi.make_test.yml, started by hand because PRs to master don't trigger it): passed with gfortran and ifort, https://github.com/PrincetonUniversity/GPEC/actions/runs/42634301501🤖 Generated with Claude Code
https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE