Drop legacy chartmap file support; fix chartmap example and README#368
Merged
Conversation
PR 334 review follow-up. - read_boozer_chartmap now requires the rmajor attribute and the endpoint-included theta_field/zeta_field Bmod grid. Remove the has_rmajor flag, its 0.0 default consumers, and the geometry-grid Bmod fallback. GVEC-exported chartmaps always carry these fields; pre-converter legacy files are no longer supported. map2disc-based chartmaps go through the libneo coordinate reader and are unaffected. - Update the C test generator to emit rmajor and Bmod on the field grid. - examples/simple_chartmap.in: drop the forced startmode = 2. The default startmode = 1 samples the sbeg flux surface and needs no start.dat; the removed comment was also incorrect about startmode. - README: drop the incorrect "startmode = 2 means particle coordinates are in chartmap Boozer space" bullet (startmode is field-independent).
9b02923 to
191ba53
Compare
Contributor
|
Looks good to me! |
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.
Follow-up to the review comments on #334 (cc @Rykath — this is now changed).
Risk tier
Correctness contract
Intended behavior change
read_boozer_chartmapno longer supports legacy chartmap files. It now requires:rmajorglobal attribute (previously optional via ahas_rmajorflag that defaultedrmajorto0.0), andtheta_field/zeta_fieldBmod grid (previously fell back to the geometry grid).GVEC-exported chartmaps (
tools/gvec_to_boozer_chartmap.py) always write both, so current files are unaffected. Pre-converter legacy files now abort with a clear NetCDF error instead of being silently accepted withrmajor = 0.Behavior that must not change
make_chartmap_coordinate_system), notread_boozer_chartmap.Coordinate / unit conventions
Numerical invariants
Tests added
generate_test_boozer_chartmap.cto emit the current format (rmajor+ field-grid Bmod); updatedtest_chartmap_aphi_abscissa.f90(thermajor-present check is now covered by mandatory read + value assertion).Golden-record impact
Failure modes considered
NetCDF error at att rmajor/inq_dim theta_field, by design.Manual validation
Also addresses the two doc comments on #334:
examples/simple_chartmap.in: dropped the forcedstartmode = 2(the comment was incorrect, and it required astart.dat). The defaultstartmode = 1samples thesbegflux surface and needs nostart.dat.README.md: removed the incorrect "startmode = 2means particle coordinates are in chartmap Boozer space" bullet (startmode is field-type independent).Verification
Failing before (strict reader against the old legacy-format test generator):
Passing after (generator updated to current format):
Pre-existing, unrelated to this PR: the
*_map2discchartmap tests fail on a cleanmainin this environment because the optional libneo Python binding_efit_to_boozeris not built (ModuleNotFoundError: No module named '_efit_to_boozer'). This PR introduces no new failures relative to that baseline.