do_convert
do_convert(input_path, output_path, *, input_grid=None, output_grid=None, it=1, attrs=None, dtype='f')
Read one format, write another -- convenience wrapper.
Combines read_file and write_file into a single call.
Formats are inferred from the file extensions. This is a pure format
conversion -- use cfd_ops for any data transformation (transpose,
cut, translate, ...).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_path
|
str | Path
|
Source file path (flow file for split formats). |
required |
output_path
|
str | Path
|
Destination file path. |
required |
input_grid
|
str | Path | None
|
Grid file for the source (split format input). |
None
|
output_grid
|
str | Path | None
|
Grid file for the destination (split format output). |
None
|
it
|
int
|
Timestep index, 1-based (split format input). |
1
|
attrs
|
dict[str, Any] | None
|
Extra metadata to merge into the output. These override any attributes already present in the source file. |
None
|
dtype
|
str
|
NumPy dtype for HDF5 output. |
'f'
|
Returns:
| Type | Description |
|---|---|
Path
|
Path to the created output file. |