2
c ----------------------------------------------------------------------------
3
c | Copyright (C) 1999 Emergent IT Inc. and Raytheon Systems Company |
4
c ----------------------------------------------------------------------------
7
program he5_sw_wrexternaldataF_32
18
integer he5_ehrdwrfile
23
integer data_out_1(100)
24
integer data_out_2(100)
25
integer data_out_3(100)
31
integer*4 num_elements
36
c.....Use this for writing (only) to an existing file
37
integer WRITE_EXISTING_ONLY
38
parameter (WRITE_EXISTING_ONLY=0)
40
c.....Use this for reading (only) from an existing file
42
parameter (READ_ONLY=1)
44
c.....Use this for creating and writing to a file
46
parameter (WRITE_NEW=2)
49
c Create the new data buffer
50
c --------------------------
55
c Open HDF-EOS swath file, "swath.he5"
56
c ------------------------------------
57
swfid = he5_swopen("swath.he5", HE5F_ACC_RDWR)
58
write(*,*) 'File ID returned from he5_swopen(): ',swfid
60
if (swfid .NE. FAIL) then
61
swid = he5_swattach(swfid, "Swath1")
62
write(*,*) 'Swath ID returned from he5_swattach(): ',swid
64
if (swid .NE. FAIL) then
66
c Write new data to the external files
67
c ------------------------------------
72
status = he5_swwrfld(swid,"ExtData",
73
1 start,stride,count,data)
74
write(*,*) 'Status returned from he5_swrdfld(): ',status
78
status = he5_ehrdwrfile("extf1.dat",READ_ONLY,
79
1HE5T_NATIVE_INT,num_elements,data_out_1)
80
write(*,*) 'Status returned from he5_ehrdwrfile: ',status
82
status = he5_ehrdwrfile("extf2.dat",READ_ONLY,
83
1HE5T_NATIVE_INT,num_elements,data_out_2)
84
write(*,*) 'Status returned from he5_ehrdwrfile: ',status
86
status = he5_ehrdwrfile("extf3.dat",READ_ONLY,
87
1HE5T_NATIVE_INT,num_elements,data_out_3)
88
write(*,*) 'Status returned from he5_ehrdwrfile: ',status
90
write(*,*)'External file extf1.dat:'
94
write(*,*)'External file extf2.dat:'
98
write(*,*)'External file extf3.dat:'
107
status = he5_swdetach(swid)
108
write(*,*) 'Status returned from he5_swdetach(): ',status
112
status = he5_swclose(swfid)
113
write(*,*) 'Status returned from he5_swclose(): ',status