theta0_shift not saved to restart file
Issue #163
resolved
The quantity theta0_shift (relevant when g_exb != 0 and kt_grid_option != “box”) isn’t saved to the restart file. This means that when a simulation is restarted, GS2 “forgets” the value of theta0_shift, leading to an inconsistent simulation.
Proposed fix: save theta0_shift to restart file in the same way as kx_shift (relevant for kt_grid_option = “box” ) is.
Comments (4)
-
-
A workaround currently will be to run in box mode with nperiod > 1, naky = 2, ntheta0 = target value, jtwist >= ntheta0 and boundary_option = ‘zero’. This should give you something equivalent to the ballooning space setup plus you’ll have the zonal modes.
-
See PR #550 for a basic way to fix this (always save kx_shift and theta0_shift).
-
- changed status to resolved
Fixed in PR #550
- Log in to comment
Both
kx_shift
andtheta0_shift
are the same shape and size. We only ever use one or the other. As such, I think a reasonable fix here would to actually remove one of these arrays. We might risk confusion in some sense as the exact meaning of the data depends on the setup (the reason we have two different arrays here) but we could probably avoid this by renaming the array that we keep to something with a more general name.