1
c In this program we (1) open the "swath.he5" file, (2) attach to
2
c the "Swath1" swath, and (3) read data from the "Longitude" field
3
c ================================================================
5
program he5_sw_readdataF_32
20
integer buffer_out(250)
40
c Open HDF-EOS swath file, "swath.he5"
41
c -----------------------------------
42
swfid = he5_swopen("swath.he5",HE5F_ACC_RDONLY)
43
write(*,*) 'File ID returned by he5_swopen(): ',swfid
45
if (swfid .NE. FAIL) then
46
swid = he5_swattach(swfid, "Swath1")
47
write(*,*) 'Swath ID returned by he5_swattach(): ',swid
49
if (swid .NE. FAIL) then
52
c Read the entire Longitude field
53
c -------------------------------
61
status = he5_swrdfld(swid,"Longitude",
62
1 start,stride,count,lng)
66
write(*,*)'i j Longitude ',i,j,lng(j,i)
77
status = he5_swrdfld(swid,"L2gpValue",
78
1 start,stride,count,temp)
82
write(*,*)'i j L2gpValue ',i,j,temp(j,i)
87
c Read data from the Profile
88
c --------------------------
93
status = he5_prread(swid,"Profile-2000",start,stride,count,
96
write(*,*) 'Status returned from he5_prread: ',status
98
c Display the Profile data
99
c ------------------------
101
write(*,*) 'len(',i,'): ',len(i)
105
write(*,*) 'buffer_out: '
106
write(*,*) buffer_out
111
element1(i) = buffer_out(i)
114
write(*,*) '1st element: '
120
element2(i) = buffer_out(j1 + i)
123
write(*,*) '2nd element: '
129
element3(i) = buffer_out(j1 + i)
132
write(*,*) '3rd element: '
138
element4(i) = buffer_out(j1 + i)
141
write(*,*) '4th element: '
147
status = he5_swrdattr(swid, "TestAttr", attr)
149
write(*,*) 'Attribute Element', i, ':', attr(i)
157
status = he5_swdetach(swid)
158
write(*,*) 'Status returned from he5_swdetach: ',status
162
status = he5_swclose(swfid)
163
write(*,*) 'Status returned from he5_swclose: ',status