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_filename
str The path to the 2D HDF5 (.h5) or HDF4 (.hdf) file to write.
- x
np.ndarray 1D array of scales in the X dimension.
- y
np.ndarray 1D array of scales in the Y dimension.
- f
np.ndarray 2D array of data, C-ordered as shape(ny,nx) for Python (see note 1).
- hdf_filename