@@ -23,20 +23,20 @@ program deflate_test
2323big2 = 0
2424big3 = 0
2525
26- call h% initialize (fn1, status= ' replace' , comp_lvl= 1 , debug= .true. )
26+ call h% open (fn1, status= ' replace' , comp_lvl= 1 , debug= .true. )
2727call h% write (' big2' , big2, dims= [' x' ,' y' ])
2828call h% flush()
2929! > turn compression off for following variables (must flush first)
3030h% comp_lvl = 0
3131call h% write (' small_contig' , big2(:5 ,:5 ), dims= [' q' ,' r' ])
32- call h% finalize ()
32+ call h% close ()
3333
3434inquire (file= fn1, size= fsize)
3535crat = (N* N* storage_size(big2)/ 8 ) / fsize
3636print ' (A,F6.2,A,I6)' ,' #1 filesize (Mbytes): ' ,fsize/ 1e6 , ' 2D compression ratio:' ,crat
3737if (crat < 10 ) error stop ' #1 2D low compression'
3838
39- call h% initialize (fn1, status= ' old' , action= ' r' , debug= .false. )
39+ call h% open (fn1, status= ' old' , action= ' r' , debug= .false. )
4040
4141if (.not. h% is_chunked(' big2' )) error stop ' #1 not chunked layout'
4242
@@ -50,11 +50,11 @@ program deflate_test
5050call h% chunks(' small_contig' , chunks(:2 ))
5151if (any (chunks(:2 ) /= - 1 )) error stop ' #1 get_chunk mismatch'
5252
53- call h% finalize ()
53+ call h% close ()
5454
5555! ======================================
5656
57- call h% initialize (fn2, status= ' replace' ,comp_lvl= 1 , debug= .true. )
57+ call h% open (fn2, status= ' replace' ,comp_lvl= 1 , debug= .true. )
5858call h% write (' big3' , big3)
5959
6060call h% write (' big3_autochunk' , big3)
@@ -64,7 +64,7 @@ program deflate_test
6464 write (stderr,* ) ' #2 chunk size' , chunks
6565 error stop ' #2 auto chunk unexpected chunk size'
6666endif
67- call h% finalize ()
67+ call h% close ()
6868
6969inquire (file= fn2, size= fsize)
7070crat = (2 * N* N* storage_size(big3)/ 8 ) / fsize
@@ -73,25 +73,25 @@ program deflate_test
7373
7474! ======================================
7575
76- call h% initialize (fn3, status= ' replace' ,comp_lvl= 1 , debug= .true. )
76+ call h% open (fn3, status= ' replace' ,comp_lvl= 1 , debug= .true. )
7777
7878call h% write (' ibig3' , ibig3(:N-10 ,:N-20 ,:))
7979call h% chunks(' ibig3' , chunks)
8080if (any (chunks(:2 ) /= [N-10 , N-20 ])) then
8181 write (stderr,* ) ' #3 chunk size' , chunks
8282 error stop ' #3 auto chunk unexpected chunk size'
8383endif
84- call h% finalize ()
84+ call h% close ()
8585
8686inquire (file= fn3, size= fsize)
8787crat = (N* N* storage_size(ibig3)/ 8 ) / fsize
8888print ' (A,F6.2,A,I6)' ,' #3 filesize (Mbytes): ' ,fsize/ 1e6 , ' 3D compression ratio:' ,crat
8989if (h% comp_lvl > 0 .and. crat < 10 ) error stop ' #3 3D low compression'
9090! !======================================
9191
92- call h% initialize (fn4, status= ' replace' , comp_lvl= 1 , debug= .true. )
92+ call h% open (fn4, status= ' replace' , comp_lvl= 1 , debug= .true. )
9393call h% write (' ibig2' , ibig2)
94- call h% finalize ()
94+ call h% close ()
9595
9696inquire (file= fn4, size= fsize)
9797crat = (N* N* storage_size(ibig2)/ 8 ) / fsize
0 commit comments