# PetscDataTypeToHDF5DataType
Converts the PETSc name of a datatype to its HDF5 name. 
## Synopsis
```
#include "petscviewerhdf5.h" 
PetscErrorCode PetscDataTypeToHDF5DataType(PetscDataType ptype, hid_t *htype)
```
Not collective


## Input Parameter

- ***ptype -*** the PETSc datatype name (for example `PETSC_DOUBLE`)



## Output Parameter

- ***mtype -*** the HDF5  datatype





## See Also
 [](sec_viewers), `PetscDataType`, `PetscHDF5DataTypeToPetscDataType()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/hdf5/hdf5v.c.html#PetscDataTypeToHDF5DataType">src/sys/classes/viewer/impls/hdf5/hdf5v.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/hdf5/hdf5v.c)


[Index of all Viewer routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
