1
c In this program we retrieve (1) information about the
2
c dimensions, (2) the dimension mappings
3
c (geolocation relations), and (3) the swath fields
5
program he5_sw_infoF_32
17
integer he5_swattrinfo
19
integer he5_swinqgfldalias
20
integer he5_swinqdfldalias
21
integer he5_swchunkinfo
29
integer*4 he5_swinqdims
30
integer*4 he5_swinqmaps
31
integer*4 he5_swinqgflds
32
integer*4 he5_swinqdflds
33
integer*4 he5_swdiminfo
34
integer*4 he5_swimapinfo
35
integer*4 he5_swinqimaps
53
character*72 maxdimlst
54
character*72 fieldlist
59
character*72 fldaliases
62
integer*4 chunkdims(32)
69
c Open the "swath.he5" file for "read only" access
70
c ------------------------------------------------
71
swfid = he5_swopen("swath.he5", HE5F_ACC_RDONLY)
72
write(*,*) 'File ID returned by he5_swopen(): ',swfid
74
if (swfid .NE. FAIL) then
78
swid = he5_swattach(swfid, "Swath1")
79
write(*,*) 'Swath ID returned by he5_swattach(): ',swid
81
if (swid .NE. FAIL) then
85
ndims = he5_swinqdims(swid, dimname, dims)
86
write(*,*) 'Dimension list: ', dimname
88
write(*,*) 'dim size: ', dims(i)
92
c Inquire Dimension Mappings
93
c --------------------------
94
nmaps = he5_swinqmaps(swid, dimmap, off, inc)
95
write(*,*) 'Dimension map: ', dimmap
97
write(*,*) 'offset increment: ', off(i), inc(i)
101
c Inquire Indexed Dimension Mappings
102
c ----------------------------------
103
nmaps = he5_swinqimaps(swid, dimmap, sizes)
104
write(*,*) 'Index Dimension map: ', dimmap
106
write(*,*) 'sizes: ', sizes(i)
110
c Inquire Geolocation Fields
111
c --------------------------
112
nflds = he5_swinqgflds(swid, fieldlist, rank, ntype)
113
write(*,*) 'Geolocation fieldlist: ', fieldlist
115
write(*,*) 'field rank & datatype: ',rank(i),ntype(i)
119
nfldalias = he5_swinqgfldalias(swid,fldaliases,strbufsize)
120
write(*,*) 'Fields & aliases list: ',fldaliases
121
write(*,*) 'Length of list is ',strbufsize
123
c Inquire Data Fields
124
c -------------------
125
nflds = he5_swinqdflds(swid, fieldlist, rank, ntype)
126
write(*,*) 'Data Fieldlist: ', fieldlist
128
write(*,*) 'field rank & datatype: ',rank(i),ntype(i)
132
nfldalias = he5_swinqdfldalias(swid,fldaliases,strbufsize)
133
write(*,*) 'Fields & aliases list: ',fldaliases
134
write(*,*) 'Length of list is ',strbufsize
137
c Get info on "GeoTrack" dim
138
c --------------------------
139
dimsize = he5_swdiminfo(swid, "GeoTrack")
140
write(*,*) 'Size of GeoTrack: ', dimsize
144
c Get info on "GeoTrack/Res2tr" mapping
145
c -------------------------------------
146
status = he5_swmapinfo(swid,"GeoTrack","Res2tr",
148
write(*,*) 'Mapping Offset: ', offset
149
write(*,*) 'Mapping Increment: ', incr
153
c Get info on "IndxTrack/Res2tr" indexed mapping
154
c ----------------------------------------------
155
n = he5_swimapinfo(swid, "IndxTrack", "Res2tr", indx)
157
write(*,*) 'Index Mapping Entry ', i, indx(i)
161
c Get info on "Longitude" Field
162
c -----------------------------
163
status = he5_swfldinfo(swid,"Longitude",rk,dims,nt,
165
write(*,*) 'Longitude Rank: ', rk
166
write(*,*) 'Longitude NumberType: ', nt
167
write(*,*) 'Longitude Dimlist: ', dimlist
168
write(*,*) 'Longitude Max Dimlist: ', maxdimlst
170
write(*,*) 'Dimension ',i,dims(i)
173
status = he5_swattrinfo(swid,"GLOBAL_CHAR_ATTR",nt,count)
174
write(*,*) 'GLOBAL_CHAR_ATTR NumberType: ', nt
175
write(*,*) 'GLOBAL_CHAR_ATTR size: ', count
177
status = he5_swchunkinfo(swid,"Spectra",chunkrank,
179
write(*,*) 'Spectra Chunking Rank: ', chunkrank
181
write(*,*) 'Chunking Dimension ',i,chunkdims(i)
190
status = he5_swdetach(swid)
191
write(*,*) 'Status returned by he5_swdetach(): ',status
195
status = he5_swclose(swfid)
196
write(*,*) 'Status returned by he5_swclose(): ',status