diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-10-16 22:47:27 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2020-10-16 22:47:27 (GMT) |
commit | db30c2da68ece4a155e9e50c28ec16d6057509b2 (patch) | |
tree | 1d36f673c36dfee71c266bba39511da21ecc782e /fortran/examples/h5_cmprss.f90 | |
parent | 5b9cf732caab9daa6ed1e00f2df4f5a792340196 (diff) | |
parent | 2e2b87d1cbdee3b919e6e5cba6c5ecd1b9434434 (diff) | |
download | hdf5-db30c2da68ece4a155e9e50c28ec16d6057509b2.zip hdf5-db30c2da68ece4a155e9e50c28ec16d6057509b2.tar.gz hdf5-db30c2da68ece4a155e9e50c28ec16d6057509b2.tar.bz2 |
Merge HDF5 1.10.7 release files into 1.10/masterhdf5-1_10_7
Diffstat (limited to 'fortran/examples/h5_cmprss.f90')
-rw-r--r-- | fortran/examples/h5_cmprss.f90 | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fortran/examples/h5_cmprss.f90 b/fortran/examples/h5_cmprss.f90 index 61dd7b0..f543024 100644 --- a/fortran/examples/h5_cmprss.f90 +++ b/fortran/examples/h5_cmprss.f90 @@ -10,17 +10,17 @@ ! If you do not have access to either file, you may request a copy from * ! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! +! ! This example illustrates how to create a compressed dataset. ! It is used in the HDF5 Tutorial. -! +! PROGRAM h5_cmprss - USE HDF5 ! This module contains all necessary modules + USE HDF5 ! This module contains all necessary modules IMPLICIT NONE ! - ! The dataset is stored in file "h5_cmprss.h5" + ! The dataset is stored in file "h5_cmprss.h5" ! CHARACTER(LEN=12), PARAMETER :: filename = "h5_cmprss.h5" INTEGER, PARAMETER :: rank = 2 ! Rank of the data set @@ -33,7 +33,7 @@ PROGRAM h5_cmprss INTEGER :: error INTEGER(hsize_t), DIMENSION(1:rank) :: dims ! dimensions of data INTEGER(hsize_t), DIMENSION(1:rank) :: cdims ! sizes of chunked data - + INTEGER :: i,j, numfilt INTEGER, DIMENSION(1:dim0,1:dim1) :: buf ! write buffer INTEGER, DIMENSION(1:dim0,1:dim1) :: rbuf ! read buffer @@ -63,15 +63,15 @@ PROGRAM h5_cmprss CALL h5screate_simple_f(rank, dims, dataspace_id, error) CALL h5pcreate_f(H5P_DATASET_CREATE_F, plist_id, error) ! - ! Dataset must be chunked for compression + ! Dataset must be chunked for compression cdims(1:2) = 20 CALL h5pset_chunk_f(plist_id, 2, cdims, error) ! Set ZLIB / DEFLATE Compression using compression level 6. - ! To use SZIP Compression comment out these lines. + ! To use SZIP Compression comment out these lines. CALL h5pset_deflate_f(plist_id, 6, error) - ! Uncomment these lines to set SZIP Compression + ! Uncomment these lines to set SZIP Compression !szip_options_mask = H5_SZIP_NN_OM_F !szip_pixels_per_block = 16 !CALL H5Pset_szip_f(plist_id, szip_options_mask, szip_pixels_per_block, error) @@ -86,7 +86,7 @@ PROGRAM h5_cmprss ENDDO ENDDO - data_dims(1:2) = (/dim0,dim1/) + data_dims(1:2) = (/dim0,dim1/) CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, buf, data_dims, error) ! Close resources @@ -99,12 +99,12 @@ PROGRAM h5_cmprss CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error) CALL h5dopen_f(file_id, "Compressed_Data", dataset_id, error) - ! Retrieve filter information. + ! Retrieve filter information. CALL h5dget_create_plist_f(dataset_id, plist_id, error) - + CALL h5pget_nfilters_f(plist_id, numfilt, error) WRITE(*,'(A, I0)') "Number of filters associated with dataset: ", numfilt - + DO i = 1, numfilt nelmts = 1 CALL h5pget_filter_f(plist_id, 0, flags, nelmts, cd_values, & @@ -121,7 +121,7 @@ PROGRAM h5_cmprss ENDDO data_dims(1:2) = (/dim0,dim1/) CALL h5dread_f(dataset_id, H5T_NATIVE_INTEGER, rbuf, data_dims, error) - + CALL h5dclose_f(dataset_id, error) CALL h5pclose_f(plist_id, error) CALL h5fclose_f(file_id, error) |