Repository navigation
Equilibrium - BUGFIX - Write gse.h5 and gsei.h5 when diagnose_src is set - #522
Open
StuartBenjamin wants to merge 2 commits into
Open
StuartBenjamin wants to merge 2 commits into
StuartBenjamin wants to merge 2 commits into
Conversation
equilibrium_gse! referred to an undefined `flux` for the psi and theta grids, so diagnose_src = true stopped with an UndefVarError before writing gse.h5 and gsei.h5. Use equil.rzphi_xs / rzphi_ys. New testset checks the three files and their grids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ψ column Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Release note
equilibrium_gse!crashed withUndefVarError: flux not definedwheneverdiagnose_src = true, sogse.h5andgsei.h5were never written; they now are.Regression report
regress --cases diiid_n1,solovev_n1 --refs bfc60610e,dc037fcd2 --force(julia 1.11.7, pinned manifest, 2 threads): diiid_n1 53 unchanged, solovev_n1 22 unchanged (diagnose_srcis off in every case). Full log:harness.log.Problem
The
gse.h5andgsei.h5writers inequilibrium_gse!took the grids fromflux.xs/flux.ys, a name carried over from the Fortranfluxbicube that does not exist in Julia GPEC. Every run withdiagnose_src = truestopped there after writinggsec.h5, so the GSE plots inAnalysis.Equilibriumhad nogse.h5to read.Fix
src/Equilibrium/Equilibrium.jl: the threeflux.xs/flux.ysreferences becomeequil.rzphi_xs(ψ) andequil.rzphi_ys(θ), the grids the GSE computation above already uses.Tests
New testset "equilibrium_gse! writes gse.h5 with diagnose_src" in
test/runtests_equil.jl: it runsEQDSK_COCOS_02in a temporary directory withdiagnose_src = trueand checks thatgsec.h5,gse.h5andgsei.h5are written and that the ψ column ofgse.h5is the equilibrium grid. It fails on develop with the UndefVarError.Notes for reviewers
gse.h5layout is unchanged and matches Fortranequil_out_gse(gse_data[:, :, 1]= θ,[:, :, 2]= ψ).Analysis.Equilibriumlooks forgse.h5next to the.h5output, but the writer puts it next to the equilibrium file. That mismatch is separate and unchanged here.🤖 Generated with Claude Code