read_bifrost_meshfile

PlasmaCalcs.hookups.bifrost.bifrost_io_tools.read_bifrost_meshfile(meshfile)

returns dict of mesh coords from a Bifrost mesh file.

Mesh file format looks like:

x size (int)
x coords
x “down” coords
dx values when taking “up derivative”
dx values when taking “down derivative”
then similar for y and z.
The “down” and “up” refer to interpolation / staggering.
result will have keys:

x_size: int, number of points in x x: x coords list (as numpy array) x_down: x “down” coords dxup: dx when taking “up derivative” dxdn: dx when taking “down derivative”