2
! ----------------------------------------------------------------------------
3
! | Copyright (C) 2002 Emergent IT Inc. and Raytheon Systems Company |
4
! ----------------------------------------------------------------------------
7
program he5_za_rdexternaldataF_32
19
integer he5_ehrdwrfile
35
integer*4 num_elements
37
character filelist*256
42
!.....Use this for writing (only) to an existing file
43
integer WRITE_EXISTING_ONLY
44
parameter (WRITE_EXISTING_ONLY=0)
46
!.....Use this for reading (only) from an existing file
48
parameter (READ_ONLY=1)
50
!.....Use this for creating and writing to a file
52
parameter (WRITE_NEW=2)
56
! Create the external data sets
57
! -----------------------------
68
status = he5_ehrdwrfile("extf1.dat",WRITE_NEW,
69
1HE5T_NATIVE_INT,num_elements,datain1)
70
write(*,*) 'Status returned from he5_ehrdwrfile: ',status
72
status = he5_ehrdwrfile("extf2.dat",WRITE_NEW,
73
1HE5T_NATIVE_INT,num_elements,datain2)
74
write(*,*) 'Status returned from he5_ehrdwrfile: ',status
76
status = he5_ehrdwrfile("extf3.dat",WRITE_NEW,
77
1HE5T_NATIVE_INT,num_elements,datain3)
78
write(*,*) 'Status returned from he5_ehrdwrfile: ',status
80
! Open HDF-EOS za file, "za.he5"
81
! ------------------------------
82
zafid = he5_zaopen("za.he5", HE5F_ACC_RDWR)
83
write(*,*) 'File ID returned from he5_zaopen(): ',zafid
85
if (zafid .NE. FAIL) then
86
zaid = he5_zaattach(zafid, "ZA1")
87
write(*,*) 'ZA ID returned from he5_zaattach(): ',zaid
89
if (zaid .NE. FAIL) then
91
! Read the external data field
92
! ----------------------------
97
status = he5_zaread(zaid,"ExtData",
98
1 start,stride,count,dataout)
99
write(*,*) 'Status returned from he5_zaread(): ',status
105
write(*,*)'External data',dataout(i)
110
! Get the number of external files
111
! --------------------------------
112
nfiles = he5_zagetxdat(zaid,"ExtData",nmlgth,
113
1 filelist,offset,size)
115
write(*,*) 'Number of external files',nfiles
116
write(*,*) 'External files:',filelist
118
write(*,*) 'offsets:',offset(i)
119
write(*,*) 'sizes:',size(i)
127
status = he5_zadetach(zaid)
128
write(*,*) 'Status returned from he5_zadetach(): ',status
132
status = he5_zaclose(zafid)
133
write(*,*) 'Status returned from he5_zaclose(): ',status