wrhdf_2d

Contents

wrhdf_2d#

wrhdf_2d(hdf_filename, x, y, f)[source]#

Write a 2D PSI-style HDF5 or HDF4 file.

The data in the HDF file will appear as X,Y in Fortran order.

Each dimension requires a 1D “scale” associated with it that describes the rectilinear grid coordinates in each dimension.

Parameters:
hdf_filenamestr

The path to the 2D HDF5 (.h5) or HDF4 (.hdf) file to write.

xnp.ndarray

1D array of scales in the X dimension.

ynp.ndarray

1D array of scales in the Y dimension.

fnp.ndarray

2D array of data, C-ordered as shape(ny,nx) for Python (see note 1).