postgkyl.save¶
- postgkyl.save(data, out_name='', extension='gkyl', var_name='CartGridField')¶
Write
datatoout_namein the requestedextension.The
gkylformat preserves all dataset metadata, includingvalue_form,num_quad, and simulation identity. Structural fields are stored in the binary header; the private load-history snapshot is omitted. Current metadata takes precedence over the output filename when reloading. Its field header supports uniform Cartesian cell edges only: nonuniform, mapped, and point-coordinate grids are rejected before the output is opened, since the format cannot preserve those coordinates.- Parameters:
data – a dataset exposing
num_dims/num_comps/num_cells/bounds/values/grid/ctx(aGDataStateor subclass).out_name – output path; when empty a name is derived from the source file.
extension – one of
"gkyl"(default),"txt","npy","vtk".var_name – unused placeholder kept for interface symmetry.
- Returns:
The path actually written.