mpas_tools.viz.mpas_to_xdmf.mpas_to_xdmf.MpasToXdmf.convert_to_xdmf
- MpasToXdmf.convert_to_xdmf(out_dir, extra_dims=None, quiet=False, float32=False, max_read_bytes=2147483648)[source]
Convert the loaded xarray Dataset to XDMF + HDF5 format.
- Parameters:
out_dir (str) – Directory where XDMF and HDF5 files will be saved.
extra_dims (dict, optional) – Dictionary mapping extra dimensions to their selected indices. Example -
{'nVertLevels': [0, 1, 2]}. If None, all indices are included.quiet (bool, optional) – If True, suppress progress output.
float32 (bool, optional) – If True, write floating-point fields in single precision, halving the size of the HDF5 files (the mesh geometry stays in double precision).
max_read_bytes (int, optional) – Approximate limit on the number of bytes read from the input dataset at a time. Larger values allow more indices of an extra dimension (e.g.
nVertLevels) to be read in a single pass over a variable, which is faster but uses more memory.Output
------
directory. (- XDMF files (.xdmf) and HDF5 files (.h5) in the specified)
- Raises:
ValueError – If required files or variables are missing.