pycif.plugins.transforms.system.dump2format — API reference#
Configuration reference: dump2format plugin
- pycif.plugins.transforms.system.dump2format.adjoint.adjoint(transform, inout_datastore, controlvect, obsvect, mapper, di, df, mode, runsubdir, workdir, onlyinit=False, **kwargs)[source]#
Pass adjoint sensitivities through dump2format unchanged.
The adjoint of dump2format is a no-op for the data: sensitivities flow through the transform without modification (writing to disk only happens in the forward pass). This function simply copies the output datastore entries back into the input datastore so that the adjoint pipeline can continue.
- Parameters:
transform (Plugin) – dump2format instance.
inout_datastore (dict) – mutable datastore.
controlvect – unused.
obsvect – unused.
mapper (dict) – transform mapper.
di (datetime) – sub-simulation start date.
df (datetime) – sub-simulation end date.
mode (str) –
'adj'.runsubdir (str) – unused.
workdir (str) – unused.
onlyinit (bool) – unused.
**kwargs – unused.
- pycif.plugins.transforms.system.dump2format.forward.forward(transform, inout_datastore, controlvect, obsvect, mapper, di, df, mode, runsubdir, workdir, do_simu=True, onlyinit=False, **kwargs)[source]#
Write the current data field to a user-specified file format.
Passes the output data unchanged to
'outputs'(allowing downstream transforms to continue using it) and then calls the dump plugin’swritemethod to serialise the field to disk.The output file name is derived from the sub-simulation date
ddiviastrftime(transform.dump_file). If the file already exists andoverwrite = False, the write is skipped.- Parameters:
transform (Plugin) – dump2format instance (carries
dump_plg,dump_file,dump_dir, andoverwriteattributes).inout_datastore (dict) – mutable datastore;
'inputs'is forwarded to'outputs'and the'spec'field is written.controlvect – unused.
obsvect – unused.
mapper (dict) – transform mapper.
di (datetime) – sub-simulation start date.
df (datetime) – sub-simulation end date.
mode (str) –
'fwd'or'tl'.runsubdir (str) – default output directory when
dump_diris not configured.workdir (str) – unused.
do_simu (bool) – unused.
onlyinit (bool) – unused.
**kwargs – unused.