In the lasym branch of Compute_Currents (read_wout_mod.f:788), bu0 is taken at the wrong half-grid surface:
bu0 = bsubumns_i(:,js )/shalf(js+1)
bu1 = bsubumns_i(:,js+1)/shalf(js+1)
t2 = ohs*(bu1-bu0)*sfull(js) + 0.25_dp*(bu0+bu1)/sfull(js)
bv0 = bsubvmns_i(:,js )/shalf(js)
bv1 = bsubvmns_i(:,js+1)/shalf(js+1)
bv0 two lines below, and bu0 in the stellarator-symmetric branch above, both divide by shalf(js). ORNL-Fusion/LIBSTELL read_wout_mod.f90 carries shalf(js) here; the copy vendored in this repository predates that.
bu0 enters t2, and t2 enters only currvmns_o(:,js) = xm_nyq_i(:)*t1 + t2, so the odd-m asymmetric toroidal current harmonics are the only quantity affected. Two builds differing in nothing but this index, on input.cth_like_fixed_bdy_asym: currvmns in the wout changes by 0.72 of its own maximum, and every other variable in the file is unchanged.
In the
lasymbranch ofCompute_Currents(read_wout_mod.f:788),bu0is taken at the wrong half-grid surface:bv0two lines below, andbu0in the stellarator-symmetric branch above, both divide byshalf(js). ORNL-Fusion/LIBSTELLread_wout_mod.f90carriesshalf(js)here; the copy vendored in this repository predates that.bu0enterst2, andt2enters onlycurrvmns_o(:,js) = xm_nyq_i(:)*t1 + t2, so the odd-m asymmetric toroidal current harmonics are the only quantity affected. Two builds differing in nothing but this index, oninput.cth_like_fixed_bdy_asym:currvmnsin the wout changes by 0.72 of its own maximum, and every other variable in the file is unchanged.