Skip to content

Guard first PENTRC pitch and energy recorder indices - #374

Draft
krystophny wants to merge 1 commit into
PrincetonUniversity:developfrom
itpplasma:fix/pentrc-recorder-indices-20261124
Draft

krystophny wants to merge 1 commit into
PrincetonUniversity:developfrom
itpplasma:fix/pentrc-recorder-indices-20261124

Conversation

@krystophny

Copy link
Copy Markdown
Collaborator

The Fortran PENTRC pitch and energy recorders can read index zero on the first surface because .or. does not guard array access. Check the indices before reading record labels and start each surface and harmonic at its first slot.

The synthetic regression calls the native pitch integrator with recording on and off. With GNU Fortran bounds checking, it stops at energy_record%psi(0) before the fix. After the fix, the integrals agree to within $10^{-6}$ relative, and the two NetCDF files carry the expected labels for two surfaces, three harmonics per surface and five energy-record pitches per harmonic.

The pitch endpoint still emits an LSODE interpolation warning.

Fixes #373.

Chris&AI

This branch has not been deployed

No deployments
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.

PENTRC reads index zero when saving the first pitch and energy records

1 participant