postgkyl.load¶
- postgkyl.load(file_name, *, tag='default', label='', ctx=None, value_form=None, basis_type=None, poly_order=None, z0=None, z1=None, z2=None, z3=None, z4=None, z5=None, component=None, read_options=None)¶
Read Gkeyll output into a fluent
GDataorGDataGroup.pg.load('elc_M0_0.gkyl').interpolate().select(z0=0.0).plot()Shell-style glob patterns (
*,?, and[]) load every matching file into aGDataGroup, naturally ordered by filename. The group broadcasts per-dataset verbs and supplies the multi-datasetcollectverb, so a frame series can be loaded and stacked in one chain:pg.load('elc_M0_*.gkyl').interpolate().collect().plot()
A pattern always returns a group, even if it matches only one file. A literal filename retains the original single-
GDatareturn type.basis_type,poly_order, andvalue_formare properties of the data itself, fixed here at load time (from the file’s header metadata, or the override below) – no downstream verb (interpolate,average, …) ever re-specifies them; they always readctx["basis_type"]/ctx["poly_order"]/ctx["value_form"]off the loaded dataset.value_formoverrides the"modal"/"nodal"/"quad"tag the file’s header metadata would otherwise imply – for files whose writer stamps DG basis metadata even though the stored values are already point values (e.g. a per-cell diagnostic like a CFL rate), not modal coefficients.basis_typeoverrides the"basis_type"(e.g."serendipity","tensor","gkhybrid") the file’s header metadata would otherwise imply – for files with no basis metadata at all, or metadata that mislabels the basis actually used. Setting it also defaultsvalue_formto"modal"(unlessvalue_formis given too), so downstream verbs that readctx["basis_type"]resolve the right basis.poly_orderoverrides the"poly_order"the file’s header metadata would otherwise imply. It is independent ofbasis_type/value_form– passing it alone corrects only the polynomial order and asserts nothing about whether the dataset is modal.- Parameters:
file_name – Literal filename or shell-style glob pattern to load.
tag – Tag assigned to every loaded dataset.
label – Optional display label assigned to every loaded dataset.
ctx – Initial metadata as repeated key/value entries.
value_form – Stored representation of the loaded values.
basis_type – DG basis name overriding file metadata.
poly_order – Polynomial order overriding file metadata.
z0 – Partial-load selector for coordinate direction 0.
z1 – Partial-load selector for coordinate direction 1.
z2 – Partial-load selector for coordinate direction 2.
z3 – Partial-load selector for coordinate direction 3.
z4 – Partial-load selector for coordinate direction 4.
z5 – Partial-load selector for coordinate direction 5.
component – Partial-load component selector.
read_options – Reader-specific options as repeated key/value entries.