kharma icon indicating copy to clipboard operation
kharma copied to clipboard

Restart from phdf outputs

Open bprather opened this issue 11 months ago • 0 comments

Parthenon outputs dumps and restarts in basically the same format, so they can substitute for one another in a pinch. However, dumps generally lack face-centered or conserved magnetic fields, so they must be interpolated/multiplied appropriately, and in the case of face-centered fields must then be cleaned.

Luckily, we do all that stuff for iharm3d format restarts anyway, so I just re-use that code, and mark the cell-centered prims.B as Restart so that it gets read, instead of just cons.fB which won't exist. The whole thing ends up pretty clean.

Using this requires patching out Parthenon's type check, src/outputs/restart.hpp L125. If I'm not lazy I'll add that patch to the patchset before I merge this.

Restarting from phdfs is already documented on the wiki: https://github.com/AFD-Illinois/kharma/wiki/Running-KHARMA#restarting-simulations.

bprather avatar Feb 07 '25 21:02 bprather