Fix isw_calc_Er=2 MtOvR_spec bug, document Om_tE input, add roundtrip tests#83
Open
krystophny wants to merge 4 commits intomainfrom
Open
Fix isw_calc_Er=2 MtOvR_spec bug, document Om_tE input, add roundtrip tests#83krystophny wants to merge 4 commits intomainfrom
krystophny wants to merge 4 commits intomainfrom
Conversation
When isw_calc_Er=2, Om_tE was read from the profile but MtOvR_spec was never computed from it. The output path (isw_calc_Er >= 1) tried to write the unallocated MtOvR_spec array, which would crash. Also update the isw_calc_Er doc-comment to describe all three modes and fix the ambipolarity warning message for mode 2.
Add descriptions for isw_calc_Er=0/1/2 and the new Om_tE namelist parameter in DOC/neo2.in.ql-full.
Fortran: add mode1->mode2 roundtrip test (same Om_tE gives same MtOvR_spec) and half-Om_tE test (different input gives linearly different output). Python: add Om_tE HDF5 roundtrip (write/read/verify), absence test (no Om_tE key means no dataset), and half-profile comparison test.
Python script that runs NEO-2-QL three times using golden record data: 1) isw_calc_Er=1: self-consistent Er from ambipolarity 2) isw_calc_Er=2: feed the Om_tE from run 1 back via namelist 3) isw_calc_Er=2: feed half Om_tE as perturbation Verifies transport coefficients match between modes 1 and 2, that Om_tE/MtOvR are correctly passed through, and that different Om_tE input produces different MtOvR output. Uses reduced resolution for faster execution (NTV off, lag=2, leg=2).
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.
Summary
isw_calc_Er=2readOm_tEfrom the profile but never computedMtOvR_specfrom it. The output path (isw_calc_Er >= 1) would try to write an unallocated array. Nowwrite_multispec_output_ahas anELSE IF (isw_calc_Er .EQ. 2)branch that computesMtOvR_specviaOm_tE_to_MtOvR_spec.isw_calc_Erinntv_mod.f90now describes all three modes (0/1/2) instead of just "on/off".DOC/neo2.in.ql-fullnow documentsisw_calc_Er=0/1/2and theOm_tEnamelist parameter.Verification
Tests pass after fix
Test plan