c---------------------------------------------------------------------- c Author: Matthew W. Choptuik c Institution: The University of Texas at Austin c Date: June 1994 c---------------------------------------------------------------------- c----------------------------------------------------------------------- c c Test driver for gf3_write_hdf_f77() and c gf3_write_brief_hdf_f77() c c----------------------------------------------------------------------- program w0 implicit none integer gf3_write_hdf_f77, gf3_write_brief_hdf_f77 integer rc integer maxn parameter ( maxn = 10 000 ) character*64 gf3_name integer gf3_dshape(3), gf3_cshape(3) real*8 gf3_c1(maxn), gf3_c2(maxn), & gf3_c3(maxn) real*8 gf3_data(maxn) data gf3_dshape / 3, 4, 5 /, * gf3_cshape / 3, 4, 5 / c c Define (test) coordinate and data information ... c call dvramp(gf3_c1,0.0d0, 1.0d0,gf3_cshape(1)) call dvramp(gf3_c2,0.0d0, 10.0d0,gf3_cshape(2)) call dvramp(gf3_c3,0.0d0,100.0d0,gf3_cshape(3)) call d3ramp(gf3_data,gf3_dshape(1),gf3_dshape(2),gf3_dshape(3), & 0.0d0,1.0d0,0.0d0,10.0d0,0.0d0,100.0d0) gf3_name = 'Test data (multilinear)' rc = gf3_write_hdf_f77('foo0.hdf',gf3_name,gf3_cshape, & gf3_c1,gf3_c2,gf3_c3,gf3_dshape,gf3_data) if( rc .eq. 0 ) then write(*,*) 'gf3_write_hdf_f77(foo0.hdf,...) succeeds' else write(*,*) 'gf3_write_hdf_f77(foo0.hdf,...) fails' end if call gf3_ls(gf3_dshape,gf3_data,-1.0d0) gf3_name = 'Test data (constant)' rc = gf3_write_hdf_f77('foo1.hdf',gf3_name,gf3_cshape, & gf3_c1,gf3_c2,gf3_c3,gf3_dshape,gf3_data) if( rc .eq. 0 ) then write(*,*) 'gf3_write_hdf_f77(foo1.hdf,...) succeeds' else write(*,*) 'gf3_write_hdf_f77(foo1.hdf,...) fails' end if call d3ramp(gf3_data,gf3_dshape(1),gf3_dshape(2),gf3_dshape(3), & 0.0d0,1.0d0,0.0d0,10.0d0,0.0d0,100.0d0) rc = gf3_write_brief_hdf_f77('foo2.hdf',gf3_dshape,gf3_data) if( rc .eq. 0 ) then write(*,*) 'gf3_write_brief_hdf_f77(foo2.hdf,...) succeeds' else write(*,*) 'gf3_write_brief_hdf_f77(foo0.hdf,...) fails' end if stop end