Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
sll_k_hdf5_ser_write_array.F90
Go to the documentation of this file.
1 integer(hsize_t) :: array_dims(rank)
2 integer(hid_t) :: dataset_id
3 integer(hid_t) :: dataspace_id
4 
5 array_dims = int(shape(array), hsize_t)
6 
7 ! Create dataspace
8 call h5screate_simple_f(rank, array_dims, dataspace_id, error)
9 sll_assert_always(error == 0)
10 
11 ! Create dataset
12 call h5dcreate_f(handle%file_id, dsetname, datatype, dataspace_id, &
13  dataset_id, error)
14 sll_assert_always(error == 0)
15 
16 ! Write dataset
17 call h5dwrite_f(dataset_id, datatype, array, array_dims, error)
18 sll_assert_always(error == 0)
19 
20 ! Close dataspace
21 call h5sclose_f(dataspace_id, error)
22 sll_assert_always(error == 0)
23 
24 ! Close dataset
25 call h5dclose_f(dataset_id, error)
26 sll_assert_always(error == 0)
    Report Typos and Errors