~ubuntu-branches/ubuntu/lucid/hdf-eos5/lucid

« back to all changes in this revision

Viewing changes to testdrivers/swath/testswath32.f

  • Committer: Bazaar Package Importer
  • Author(s): Alastair McKinstry
  • Date: 2009-08-17 23:07:29 UTC
  • Revision ID: james.westby@ubuntu.com-20090817230729-gzbwp1ny01hv2nlk
Tags: upstream-5.1.12.dfsg.1
ImportĀ upstreamĀ versionĀ 5.1.12.dfsg.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
c----------------------------------------------------------------------------
 
2
c     Copyright (C) 2000   Emergent IT Inc. and Raytheon Systems Company    |
 
3
c----------------------------------------------------------------------------
 
4
c testswath32.f                                                             |
 
5
c In this program we create, define and write a simple swath hdfeos file    |
 
6
c using the swath interface                                                 |
 
7
c----------------------------------------------------------------------------
 
8
 
 
9
      program   testswath32
 
10
 
 
11
      implicit  none
 
12
 
 
13
      include   'hdfeos5.inc'
 
14
 
 
15
      integer   index1, index2, status
 
16
      integer   rank, n, dtype, classid, order
 
17
      integer   rdattr(4), global_attr(4)
 
18
      integer   compparm(5), cnkrank
 
19
      integer   rdcompparm(5), compcode
 
20
      integer   he5_swopen, he5_swcreate
 
21
      integer   swfid, swid, swid2
 
22
      integer   he5_swdefdim, he5_swdetach
 
23
      integer   he5_swdefgfld, he5_swdefdfld
 
24
      integer   he5_swdefmap, he5_swclose, he5_swdefimap
 
25
      integer   he5_swsetfill, he5_swwrlattr, he5_swwrattr
 
26
      integer   he5_swwrfld, he5_swwrgattr, he5_swdefvrtreg
 
27
      integer   he5_swgmapinfo, he5_swrdfld, he5_swfldinfo 
 
28
      integer   he5_swmapinfo, he5_swattrinfo, he5_swrdattr
 
29
      integer   he5_swgattrinfo, he5_swrdgattr, he5_swrdlattr
 
30
      integer   he5_swreginfo, he5_swextreg, he5_swregidx
 
31
      integer   he5_swperinfo, he5_swextper
 
32
      integer   he5_swlattrinfo, he5_swgetfill, he5_swidtype
 
33
      integer   he5_swdefchunk, he5_swdefcomp, he5_swcompinfo
 
34
      integer   regionid, regionid2, regionid3, he5_swupimap
 
35
      integer   rnkd(4), ntyped(4), rnk(3), ntype(3), nt
 
36
      integer   he5_swattach
 
37
      integer   he5_swdefboxreg, he5_swdeftmeper, he5_swdupreg
 
38
 
 
39
      integer*4 he5_swinqswath, he5_swnentries, he5_swinqmaps
 
40
      integer*4 he5_swinqimaps, he5_swinqdims, he5_swdiminfo
 
41
      integer*4 he5_swimapinfo, he5_swinqattrs, he5_swinqgattrs
 
42
      integer*4 he5_swinqlattrs, he5_swinqgflds, he5_swinqdflds
 
43
      integer*4 size, strbufsize, ndims, chunkdims(1)
 
44
      integer*4 start(2), stride(2), dataedge(2), geoedge(2)
 
45
      integer*4 geostart(2),istart(2),iedge(2),dedge(2)
 
46
      integer*4 sd_start(2), sd_stride(2), sd_edge(2)
 
47
      integer*4 rd_start(2), rd_stride(2), rd_edge(2)
 
48
      integer*4 indexmap(30), dimsize
 
49
      integer*4 nattr, nswath, idxsz, nmaps
 
50
      integer*4 tstart(1),tstride(1),tedge(1)
 
51
      integer*4 strbufsz2, nflds, idxrange(2)
 
52
      integer*4 count(1), offset, inc, zero, status4
 
53
      integer*4 ndxmap(2), dims(5),latdims(2)
 
54
      integer*4 idxmap(50), upidxmap(50)
 
55
      integer*4 dim1, dim2, dim3, dim4
 
56
 
 
57
      real      grpattr(3), locattr(3), rdgnlattr(3)
 
58
      real      ray1(100,40), ray2(40,100)
 
59
      real      lat(40,50), lon(40,50), ray4(40,100)
 
60
      real      ray3(40,40), temp(40,100)
 
61
      real      idxlat(30,30), idxlon(30,30)
 
62
      real      latcnt, loncnt, raycnt, idxlatcnt, idxloncnt    
 
63
      real      fillvalue, rdfilval, tempbuf(4200)
 
64
 
 
65
      real*8    cornerlon(2),cornerlat(2)
 
66
      real*8    twodtime(40,50)
 
67
      real*8    onedtime(40)
 
68
      real*8    range(2)
 
69
      real*8    tmcnt, starttime, endtime
 
70
 
 
71
      character*(256)  geodim
 
72
      character*(256)  idxdimmap
 
73
      character*(256)  dimmap, dimname, fieldlist
 
74
      character*(256)  attrlist, swathlist
 
75
      character*(256)  dimens, maxdims
 
76
 
 
77
      dim1          = 30
 
78
      dim2          = 40
 
79
      dim3          = 50
 
80
      dim4          = 100
 
81
      count(1)      = 3
 
82
      compparm(1)   = 6
 
83
      compparm(2)   = 0
 
84
      compparm(3)   = 0
 
85
      compparm(4)   = 0
 
86
      compparm(5)   = 0
 
87
 
 
88
      cnkrank       = 1
 
89
      chunkdims(1)  = 10
 
90
 
 
91
      rdcompparm(1) = 1
 
92
      rdcompparm(2) = 1
 
93
      rdcompparm(3) = 1
 
94
      rdcompparm(4) = 1
 
95
      rdcompparm(5) = 1
 
96
      compcode      = -1
 
97
      raycnt        = -799.0
 
98
      tmcnt         = 46353400.0d0
 
99
      starttime     = 46353450.0d0
 
100
      endtime       = 46500000.0d0
 
101
      range(1)      = 46353450.0d0
 
102
      range(2)      = 46500000.0d0
 
103
      latcnt        = 39.8
 
104
      loncnt        = 78.0
 
105
      global_attr(1)= 11
 
106
      global_attr(2)= 33
 
107
      global_attr(3)= 66
 
108
      global_attr(4)= 99
 
109
      grpattr(1)    = 21.7
 
110
      grpattr(2)    = 24.3
 
111
      grpattr(3)    = 26.3
 
112
      locattr(3)    = 21.7
 
113
      locattr(2)    = 24.3
 
114
      locattr(1)    = 26.3
 
115
      start(1)      = 10
 
116
      start(2)      = 10
 
117
      tstart(1)     = 0
 
118
      tstride(1)    = 1
 
119
      tedge(1)      = 40
 
120
      geostart(1)   = 0
 
121
      geostart(2)   = 0 
 
122
      stride(1)     = 1
 
123
      stride(2)     = 1
 
124
      sd_start(1)   = 0
 
125
      sd_start(2)   = 0
 
126
      sd_stride(1)  = 1
 
127
      sd_stride(2)  = 1
 
128
      sd_edge(1)    = 100
 
129
      sd_edge(2)    = 40
 
130
      rd_start(1)   = 0
 
131
      rd_start(2)   = 0
 
132
      rd_stride(1)  = 1
 
133
      rd_stride(2)  = 1
 
134
      rd_edge(1)    = 40
 
135
      rd_edge(2)    = 100
 
136
      dataedge(1)   = 20
 
137
      dataedge(2)   = 50
 
138
      geoedge(1)    = 40
 
139
      geoedge(2)    = 50
 
140
      idxlatcnt     = 39.8
 
141
      idxloncnt     = 78.0
 
142
      istart(1)     = 0
 
143
      istart(2)     = 0
 
144
      iedge(1)      = 30
 
145
      iedge(2)      = 30
 
146
      dedge(1)      = 40
 
147
      dedge(2)      = 40
 
148
      rank          = 2
 
149
      fillvalue     = 16.0
 
150
      cornerlon(1)  = 75.0
 
151
      cornerlon(2)  = 78.0
 
152
      cornerlat(1)  = 38.0
 
153
      cornerlat(2)  = 39.8
 
154
      indexmap(1)   = 1
 
155
      indexmap(2)   = 2
 
156
      indexmap(3)   = 3
 
157
      indexmap(4)   = 4
 
158
      indexmap(5)   = 6
 
159
      indexmap(6)   = 7
 
160
      indexmap(7)   = 8
 
161
      indexmap(8)   = 9
 
162
      indexmap(9)   = 11
 
163
      indexmap(10)  = 12
 
164
      indexmap(11)  = 13
 
165
      indexmap(12)  = 14
 
166
      indexmap(13)  = 16
 
167
      indexmap(14)  = 17
 
168
      indexmap(15)  = 18
 
169
      indexmap(16)  = 19
 
170
      indexmap(17)  = 21
 
171
      indexmap(18)  = 22
 
172
      indexmap(19)  = 23
 
173
      indexmap(20)  = 24
 
174
      indexmap(21)  = 26
 
175
      indexmap(22)  = 27
 
176
      indexmap(23)  = 28
 
177
      indexmap(24)  = 29
 
178
      indexmap(25)  = 31
 
179
      indexmap(26)  = 32
 
180
      indexmap(27)  = 33
 
181
      indexmap(28)  = 34
 
182
      indexmap(29)  = 36
 
183
      indexmap(30)  = 37
 
184
      zero          = 0
 
185
 
 
186
c
 
187
c This section of the program just fills some arrays with data that will be
 
188
c used later in the program
 
189
c
 
190
      do 110 index1=1,100
 
191
         do 100 index2=1,40
 
192
            ray1(index1, index2)=raycnt
 
193
            ray2(index2, index1)=raycnt + 1.0
 
194
            ray4(index2,index1) = raycnt
 
195
            raycnt = raycnt +1.
 
196
  100    continue
 
197
  110 continue
 
198
 
 
199
      do 130 index1=1,40
 
200
         do 120 index2=1,50
 
201
            lat(index1, index2)=latcnt
 
202
            lon(index1, index2)=loncnt
 
203
            twodtime(index1,index2)=tmcnt
 
204
            loncnt=loncnt-.1
 
205
            tmcnt=tmcnt+5.0
 
206
  120    continue
 
207
         onedtime(index1)=tmcnt
 
208
         latcnt=latcnt-0.1
 
209
         loncnt = 78.0
 
210
  130 continue
 
211
 
 
212
      do 150 index1=1,30
 
213
         do 140 index2=1,30
 
214
            idxlat(index1, index2)=idxlatcnt
 
215
            idxlon(index1, index2)=idxloncnt
 
216
            idxloncnt=idxloncnt-.1
 
217
  140    continue
 
218
         idxlatcnt=idxlatcnt-.1
 
219
         idxloncnt=78.0
 
220
  150 continue
 
221
 
 
222
 
 
223
      do 170 index1=1,40
 
224
         do 160 index2=1,40
 
225
            ray3(index1, index2)=raycnt
 
226
            raycnt = raycnt+1.25
 
227
  160    continue
 
228
  170 continue
 
229
 
 
230
      do 987 index1=1,50
 
231
         idxmap(index1)=zero
 
232
         upidxmap(index1)=zero
 
233
  987 continue
 
234
 
 
235
  230 format('********Error unexpected**********')
 
236
  240 format('***********Passed Test*********')
 
237
 
 
238
      open(unit=1, file="testswath.txt", status = "UNKNOWN")
 
239
 
 
240
      write(*,*)'Testing he5_swath FORTRAN 77 interface'
 
241
      write(*,*)'======================================'
 
242
      write(1,*)'Testing he5_swath FORTRAN 77 interface'
 
243
      write(1,*)'======================================'
 
244
      write(*,*)' '
 
245
      write(1,*)' '
 
246
 
 
247
c Test Case -- he5_swopen
 
248
c
 
249
      write(*,*)'Testing he5_swopen '
 
250
      write(*,*)'====================='
 
251
      write(1,*)'Testing he5_swopen '
 
252
      write(1,*)'====================='
 
253
      swfid=he5_swopen('swath.he5',HE5F_ACC_TRUNC)
 
254
      if (swfid .lt. 0) then
 
255
         write(*,230)
 
256
         write(1,230)
 
257
         
 
258
      else
 
259
         write(*,*)'  '
 
260
         write(*,240)
 
261
         write(1,*)'  '
 
262
         write(1,240)
 
263
         write(*,*)'swfid= he5_swopen("swath.he5",HE5F_ACC_TRUNC)'
 
264
         write(*,*)'Value returned by he5_swopen ', swfid
 
265
         write(1,*)'swfid= he5_swopen("swath.he5",HE5F_ACC_TRUNC)'
 
266
         write(1,*)'Value returned by he5_swopen ', swfid
 
267
      endif
 
268
      write(*,*)' '
 
269
      write(1,*)' '
 
270
 
 
271
c Test Case -- he5_swcreate
 
272
c
 
273
      write(1,27)
 
274
      write(*,*)'Testing he5_swcreate '
 
275
      write(*,*)'====================='
 
276
      write(1,*)'Testing he5_swcreate '
 
277
      write(1,*)'====================='
 
278
      swid=he5_swcreate(swfid,'Simplef')
 
279
      if (swid .lt. 0) then
 
280
         write(*,230)
 
281
         write(1,230)
 
282
         
 
283
      else
 
284
         write(*,*)'  '
 
285
         write(*,240)
 
286
         write(1,*)'  '
 
287
         write(1,240)
 
288
         write(*,*)'swid=he5_swcreate(swfid, "Simplef")'
 
289
         write(*,*)'Value returned by he5_swcreate ', swid
 
290
         write(1,*)'swid= he5_swcreate(swfid, "Simplef")'
 
291
         write(1,*)'Value returned by he5_swcreate ', swid
 
292
      endif
 
293
      write(*,*)' '
 
294
      write(1,*)' '
 
295
 
 
296
      swid2=he5_swcreate(swfid,'Indexedf')
 
297
      if (swid2 .lt. 0) then
 
298
         write(*,230)
 
299
         write(1,230)
 
300
         
 
301
      else
 
302
         write(*,*)'  '
 
303
         write(*,240)
 
304
         write(1,*)'  '
 
305
         write(1,240)
 
306
         write(*,*)'    swid2= he5_swcreate(swfid, "Indexedf")'
 
307
         write(*,*)'    Value returned by he5_swcreate ', swid2
 
308
         write(1,*)'    swid2= he5_swcreate(swfid, "Indexedf")'
 
309
         write(1,*)'    Value returned by he5_swcreate ', swid2
 
310
      endif
 
311
      write(*,*)' '
 
312
      write(1,*)' '
 
313
 
 
314
 
 
315
c Test Case -- he5_swdefdim
 
316
c
 
317
      write(1,27)
 
318
      write(*,*)'Testing he5_swdefdim '
 
319
      write(*,*)'====================='
 
320
      write(1,*)'Testing he5_swdefdim '
 
321
      write(1,*)'====================='
 
322
      status=he5_swdefdim(swid,'DataTrack',dim4)
 
323
      if (status .lt. 0) then
 
324
         write(*,230)
 
325
         write(1,230)
 
326
      else
 
327
         write(*,*)'  '
 
328
         write(*,240)
 
329
         write(1,*)'  '
 
330
         write(1,240)
 
331
         write(*,*)'    status= he5_swdefdim(swid, "DataTrack", 100)'
 
332
         write(*,*)'    Value returned by he5_swdefdim ',status
 
333
         write(1,*)'    status= he5_swdefdim(swid, "DataTrack", 100)'
 
334
         write(1,*)'    Value returned by he5_swdefdim ',status
 
335
      endif
 
336
      write(*,*)' '
 
337
      write(1,*)' '
 
338
 
 
339
      status=he5_swdefdim(swid,'DataXtrack',dim2)
 
340
      if (status .lt. 0) then
 
341
         write(*,230)
 
342
         write(1,230)
 
343
      else
 
344
         write(*,*)'  '
 
345
         write(*,240)
 
346
         write(1,*)'  '
 
347
         write(1,240)
 
348
         write(*,*)'    status= he5_swdefdim(swid, "DataXtrack", 40)'
 
349
         write(*,*)'    Value returned by he5_swdefdim ',status
 
350
         write(1,*)'    status= he5_swdefdim(swid, "DataXtrack", 40)'
 
351
         write(1,*)'    Value returned by he5_swdefdim ',status
 
352
      endif
 
353
      write(*,*)' '
 
354
      write(1,*)' '
 
355
 
 
356
      status=he5_swdefdim(swid,'GeoTrack',dim3) 
 
357
      if (status .lt. 0) then
 
358
         write(*,230)
 
359
         write(1,230)
 
360
      else
 
361
         write(*,*)'  '
 
362
         write(*,240)
 
363
         write(1,*)'  '
 
364
         write(1,240)
 
365
         write(*,*)'    status= he5_swdefdim(swid, "GeoTrack", 50)'
 
366
         write(*,*)'    Value returned by he5_swdefdim ',status
 
367
         write(1,*)'    status= he5_swdefdim(swid, "GeoTrack", 50)'
 
368
         write(1,*)'    Value returned by he5_swdefdim ',status
 
369
      endif
 
370
      write(*,*)' '
 
371
      write(1,*)' '
 
372
 
 
373
      status=he5_swdefdim(swid,'GeoXtrack',dim2)
 
374
      if (status .lt. 0) then
 
375
         write(*,230)
 
376
         write(1,230)
 
377
      else
 
378
         write(*,*)'  '
 
379
         write(*,240)
 
380
         write(1,*)'  '
 
381
         write(1,240)
 
382
         write(*,*)'    status= he5_swdefdim(swid, "GeoXtrack", 40)'
 
383
         write(*,*)'    Value returned by he5_swdefdim ',status
 
384
         write(1,*)'    status= he5_swdefdim(swid, "GeoXtrack", 40)'
 
385
         write(1,*)'    Value returned by he5_swdefdim ',status
 
386
      endif
 
387
      write(*,*)' '
 
388
      write(1,*)' '
 
389
 
 
390
      status=he5_swdefdim(swid2,'DataTrack',dim2)
 
391
      if (status .lt. 0) then
 
392
         write(*,230)
 
393
         write(1,230)
 
394
      else
 
395
         write(*,*)'  '
 
396
         write(*,240)
 
397
         write(1,*)'  '
 
398
         write(1,240)
 
399
         write(*,*)'    status= he5_swdefdim(swid2, "DataTrack", 40)'
 
400
         write(*,*)'    Value returned by he5_swdefdim ', status
 
401
         write(1,*)'    status= he5_swdefdim(swid2, "DataTrack", 40)'
 
402
         write(1,*)'    Value returned by he5_swdefdim ', status
 
403
      endif
 
404
      write(*,*)' '
 
405
      write(1,*)' '
 
406
 
 
407
      status=he5_swdefdim(swid2,'DataXtrack',dim2)
 
408
      if (status .lt. 0) then
 
409
         write(*,230)
 
410
         write(1,230)
 
411
      else
 
412
         write(*,*)'  '
 
413
         write(*,240)
 
414
         write(1,*)'  '
 
415
         write(1,240)
 
416
         write(*,*)'    status= he5_swdefdim(swid2, "DataXtrack", 40)'
 
417
         write(*,*)'    Value returned by he5_swdefdim ', status
 
418
         write(1,*)'    status= he5_swdefdim(swid2, "DataXtrack", 40)'
 
419
         write(1,*)'    Value returned by he5_swdefdim ', status
 
420
      endif
 
421
      write(*,*)' '
 
422
      write(1,*)' '
 
423
 
 
424
      status=he5_swdefdim(swid2,'GeoTrack',dim1)
 
425
      if (status .lt. 0) then
 
426
         write(*,230)
 
427
         write(1,230)
 
428
      else
 
429
         write(*,*)'  '
 
430
         write(*,240)
 
431
         write(1,*)'  '
 
432
         write(1,240)
 
433
         write(*,*)'    status= he5_swdefdim(swid2, "GeoTrack", 30)'
 
434
         write(*,*)'    Value returned by he5_swdefdim ', status
 
435
         write(1,*)'    status= he5_swdefdim(swid2, "GeoTrack", 30)'
 
436
         write(1,*)'    Value returned by he5_swdefdim ', status
 
437
      endif
 
438
      write(*,*)' '
 
439
      write(1,*)' '
 
440
 
 
441
      status=he5_swdefdim(swid2,'GeoXtrack',dim1)
 
442
      if (status .lt. 0) then
 
443
         write(*,230)
 
444
         write(1,230)
 
445
      else
 
446
         write(*,*)'  '
 
447
         write(*,240)
 
448
         write(1,*)'  '
 
449
         write(1,240)
 
450
         write(*,*)'    status= he5_swdefdim(swid2, "GeoXtrack", 30)'
 
451
         write(*,*)'    Value returned by he5_swdefdim ', status
 
452
         write(1,*)'    status= he5_swdefdim(swid2, "GeoXtrack", 30)'
 
453
         write(1,*)'    Value returned by he5_swdefdim ', status
 
454
      endif
 
455
      write(*,*)' '
 
456
      write(1,*)' '
 
457
 
 
458
      status=he5_swdefdim(swid2,'Timedim',dim2)
 
459
      if (status .lt. 0) then
 
460
         write(*,230)
 
461
         write(1,230)
 
462
      else
 
463
         write(*,*)'  '
 
464
         write(*,240)
 
465
         write(1,*)'  '
 
466
         write(1,240)
 
467
         write(*,*)'Define dimension Timedim '
 
468
         write(*,*)'    Value returned by he5_swdefdim ', status
 
469
         write(1,*)'Define dimension Timedim '
 
470
         write(1,*)'    Value returned by he5_swdefdim ', status
 
471
      endif
 
472
 
 
473
      write(*,*)' '
 
474
      write(1,*)' '
 
475
 
 
476
c Test Case -- he5_swdefgfld
 
477
c
 
478
      write(1,27)
 
479
      write(*,*)'Testing he5_swdefgfld '
 
480
      write(*,*)'====================='
 
481
      write(1,*)'Testing he5_swdefgfld '
 
482
      write(1,*)'====================='
 
483
      status=he5_swdefgfld(swid,'Latitude','GeoXtrack,GeoTrack',
 
484
     1' ',HE5T_NATIVE_FLOAT,0)
 
485
      if (status .lt. 0) then
 
486
         write(*,230)
 
487
         write(1,230)
 
488
         
 
489
      else
 
490
         write(*,*)'  '
 
491
         write(*,240)
 
492
         write(1,*)'  '
 
493
         write(1,240)
 
494
         write(*,*)'status= he5_swdefgfld(swid,"Latitude",
 
495
     1"GeoXtrack,GeoTrack"," ", HE5T_NATIVE_FLOAT, 0)'
 
496
         write(1,*)'status= he5_swdefgfld(swid,"Latitude",
 
497
     1"GeoXtrack,GeoTrack"," ", HE5T_NATIVE_FLOAT, 0)'
 
498
         write(1,*)'Value returned by he5_swdefgfld ',status
 
499
         write(*,*)'Value returned by he5_swdefgfld ',status
 
500
      endif
 
501
      write(*,*)' '
 
502
      write(1,*)' '
 
503
 
 
504
      status=he5_swdefgfld(swid,'Longitude','GeoXtrack,GeoTrack',
 
505
     1' ',HE5T_NATIVE_FLOAT, 0)
 
506
      if (status .lt. 0) then
 
507
         write(*,230)
 
508
         write(1,230)
 
509
         
 
510
      else
 
511
         write(*,*)'  '
 
512
         write(*,240)
 
513
         write(1,*)'  '
 
514
         write(1,240)
 
515
         write(*,*)'Value returned by he5_swdefgfld ',status
 
516
         write(1,*)'Value returned by he5_swdefgfld ',status
 
517
      endif
 
518
      write(*,*)' '
 
519
      write(1,*)' '
 
520
 
 
521
      status=he5_swdefgfld(swid2,'Latitude','GeoXtrack,GeoTrack',
 
522
     1' ',HE5T_NATIVE_FLOAT, 0)
 
523
      if (status .lt. 0) then
 
524
         write(*,230)
 
525
         write(1,230)
 
526
         
 
527
      else
 
528
         write(*,*)'  '
 
529
         write(*,240)
 
530
         write(1,*)'  '
 
531
         write(1,240)
 
532
         write(*,*)'Value returned by he5_swdefgfld ', status
 
533
         write(1,*)'Value returned by he5_swdefgfld ', status
 
534
      endif
 
535
      write(*,*)' '
 
536
      write(1,*)' '
 
537
 
 
538
      status=he5_swdefgfld(swid2,'Longitude','GeoXtrack,GeoTrack',
 
539
     1' ',HE5T_NATIVE_FLOAT, 0)
 
540
      if (status .lt. 0) then
 
541
         write(*,230)
 
542
         write(1,230)
 
543
         
 
544
      else
 
545
         write(*,*)'  '
 
546
         write(*,240)
 
547
         write(1,*)'  '
 
548
         write(1,240)
 
549
         write(*,*)'Value returned by he5_swdefgfld ', status
 
550
         write(1,*)'Value returned by he5_swdefgfld ', status
 
551
      endif
 
552
      write(*,*)' '
 
553
      write(1,*)' '
 
554
 
 
555
      status=he5_swdefgfld(swid2,'Time','Timedim',' ',
 
556
     1HE5T_NATIVE_DOUBLE, 0)
 
557
      if (status .lt. 0) then
 
558
         write(*,230)
 
559
         write(1,230)
 
560
         
 
561
      else
 
562
         write(*,*)'  '
 
563
         write(*,240)
 
564
         write(1,*)'  '
 
565
         write(1,240)
 
566
         write(*,*)'Define field Time for swath Indexedf '
 
567
         write(*,*)'Status returned from call to he5_swdefgfld ',status
 
568
         write(1,*)'Define field Time for swath Indexedf '
 
569
         write(1,*)'Status returned from call to he5_swdefgfld ',status
 
570
      endif
 
571
      write(*,*)' '
 
572
      write(1,*)' '
 
573
 
 
574
      status=he5_swdefgfld(swid,'Time','GeoXtrack,GeoTrack',
 
575
     1' ', HE5T_NATIVE_DOUBLE, 0)
 
576
      if (status .lt. 0) then
 
577
         write(*,230)
 
578
         write(1,230)
 
579
         
 
580
      else
 
581
         write(*,*)'  '
 
582
         write(*,240)
 
583
         write(1,*)'  '
 
584
         write(1,240)
 
585
         write(*,*)'status= he5_swdefgfld(swid, "Time","GeoXtrack,GeoTrack",
 
586
     1"",HE5T_NATIVE_DOUBLE, 0)'
 
587
         write(*,*)'Value returned by he5_swdefgfld ',status
 
588
         write(1,*)'status= he5_swdefgfld(swid, "Time","GeoXtrack,GeoTrack",
 
589
     1"",HE5T_NATIVE_DOUBLE, 0)'
 
590
         write(1,*)'Value returned by he5_swdefgfld ',status
 
591
      endif
 
592
      write(*,*)' '
 
593
      write(1,*)' '
 
594
 
 
595
c Test Case -- he5_swdefdfld
 
596
c
 
597
      write(1,27)
 
598
      write(*,*)'Testing he5_swdefdfld '
 
599
      write(*,*)'====================='
 
600
      write(1,*)'Testing he5_swdefdfld '
 
601
      write(1,*)'====================='
 
602
 
 
603
      status=he5_swdefdfld(swid,'SideA','DataXtrack,DataTrack',
 
604
     1' ', HE5T_NATIVE_FLOAT, 0)
 
605
      if (status .lt. 0) then
 
606
         write(*,230)
 
607
         write(1,230)
 
608
        
 
609
      else
 
610
         write(*,*)'  '
 
611
         write(*,240)
 
612
         write(1,*)'  '
 
613
         write(1,240)
 
614
         write(*,*)'Define data field SideA '
 
615
         write(*,*)'Value returned by he5_swdefdfld ',status
 
616
         write(1,*)'Define data field SideA '
 
617
         write(1,*)'Value returned by he5_swdefdfld ',status
 
618
         write(*,*)' '
 
619
         write(1,*)' '
 
620
      endif
 
621
 
 
622
c Test Case  -- he5_swsetfill
 
623
c
 
624
      write(1,27)
 
625
      write(*,*)'Testing he5_swsetfill '
 
626
      write(*,*)'====================='
 
627
      write(1,*)'Testing he5_swsetfill '
 
628
      write(1,*)'====================='
 
629
      status= he5_swsetfill(swid,'Temperature',
 
630
     1HE5T_NATIVE_FLOAT, fillvalue)
 
631
      if (status .lt. 0) then
 
632
         write(*,230)
 
633
         write(1,230)
 
634
      else
 
635
         write(*,*)'  '
 
636
         write(*,240)
 
637
         write(1,*)'  '
 
638
         write(1,240)
 
639
         write(*,*)'status=he5_swsetfill(swid,"Temperature",
 
640
     1HE5T_NATIVE_FLOAT, fillvalue)'
 
641
         write(*,*)'Value returned by he5_swsetfill ',status
 
642
         write(1,*)'status=he5_swsetfill(swid,"Temperature",
 
643
     1HE5T_NATIVE_FLOAT, fillvalue)'
 
644
         write(1,*)'Value returned by he5_swsetfill ',status
 
645
      endif
 
646
      write(*,*)' '
 
647
      write(1,*)' '
 
648
 
 
649
      status=he5_swdefdfld(swid,'Temperature',
 
650
     1'DataXtrack,DataTrack',' ',HE5T_NATIVE_FLOAT, 0)
 
651
      if (status .lt. 0) then
 
652
         write(*,230)
 
653
         write(1,230)
 
654
      else
 
655
         write(*,*)'  '
 
656
         write(*,240)
 
657
         write(1,*)'  '
 
658
         write(1,240)
 
659
         write(*,*)'Define data field Temperature '
 
660
         write(*,*)'Value returned by he5_swdefdfld ',status
 
661
         write(1,*)'Define data field Temperature '
 
662
         write(1,*)'Value returned by he5_swdefdfld ',status
 
663
         write(*,*)' '
 
664
         write(1,*)' '
 
665
      endif
 
666
 
 
667
      status= he5_swsetfill(swid,'Conduction',
 
668
     1HE5T_NATIVE_FLOAT,fillvalue)
 
669
      if (status .lt. 0) then
 
670
         write(*,230)
 
671
         write(1,230)
 
672
      else
 
673
         write(*,*)'  '
 
674
         write(*,240)
 
675
         write(1,*)'  '
 
676
         write(1,240)
 
677
         write(*,*)'status=he5_swsetfill(swid,"Conduction",
 
678
     1HE5T_NATIVE_FLOAT,fillvalue)'
 
679
         write(*,*)'Value returned by he5_swsetfill ',status
 
680
         write(1,*)'status=he5_swsetfill(swid,"Conduction",
 
681
     1HE5T_NATIVE_FLOAT,fillvalue)'
 
682
         write(1,*)'Value returned by he5_swsetfill ',status
 
683
      endif
 
684
      write(*,*)' '
 
685
      write(1,*)' '
 
686
 
 
687
      status=he5_swdefdfld(swid,'Conduction',
 
688
     1'DataXtrack,DataTrack',' ',HE5T_NATIVE_FLOAT,0)
 
689
      if (status .lt. 0) then
 
690
         write(*,230)
 
691
         write(1,230)
 
692
      else
 
693
         write(*,*)'  '
 
694
         write(*,240)
 
695
         write(1,*)'  '
 
696
         write(1,240)
 
697
         write(*,*)'status= he5_swdefdfld(swid,"Conduction",
 
698
     1"DataXtrack,DataTrack","",HE5T_NATIVE_FLOAT, 0)'
 
699
         write(*,*)'Value returned by he5_swdefdfld ',status
 
700
         write(1,*)'status= he5_swdefdfld(swid,"Conduction",
 
701
     1"DataXtrack,DataTrack","",HE5T_NATIVE_FLOAT, 0)'
 
702
         write(1,*)'Value returned by he5_swdefdfld ',status
 
703
      endif
 
704
      write(*,*)' '
 
705
      write(1,*)' '
 
706
 
 
707
      status=he5_swdefdfld(swid2,'Sensor1',
 
708
     1'DataXtrack,DataTrack',' ',HE5T_NATIVE_FLOAT, 0)
 
709
      if (status .lt. 0) then
 
710
         write(*,230)
 
711
         write(1,230)
 
712
      else
 
713
         write(*,*)'  '
 
714
         write(*,240)
 
715
         write(1,*)'  '
 
716
         write(1,240)
 
717
         write(*,*)'status=he5_swdefdfld(swid2, "Sensor1",
 
718
     1"DataTrack,DataXtrack","",HE5T_NATIVE_FLOAT, 0)'
 
719
         write(*,*)'Value returned by he5_swdefdfld ',status
 
720
         write(1,*)'status= he5_swdefdfld(swid2, "Sensor1",
 
721
     1"DataTrack,DataXtrack","",HE5T_NATIVE_FLOAT, 0)'
 
722
         write(1,*)'Value returned by he5_swdefdfld ',status
 
723
      endif
 
724
      write(*,*)' '
 
725
      write(1,*)' '
 
726
 
 
727
c Test Case -- he5_swdefchunk
 
728
c
 
729
      write(1,27)
 
730
      write(*,*)'Testing he5_swdefchunk'
 
731
      write(*,*)'======================'
 
732
      write(1,*)'Testing he5_swdefchunk'
 
733
      write(1,*)'======================'
 
734
      status=he5_swdefchunk(swid,cnkrank,chunkdims)
 
735
      if (status .lt. 0) then
 
736
         write(*,230)
 
737
         write(1,230)
 
738
      else
 
739
         write(*,*)'  '
 
740
         write(*,240)
 
741
         write(1,*)'  '
 
742
         write(1,240)
 
743
         write(*,*)'status= he5_swdefchunk(swid, cnkrank, chunkdims)'
 
744
         write(*,*)'Value returned by he5_swdefchunk ',status
 
745
         write(1,*)'status= he5_swdefchunk(swid, cnkrank, chunkdims)'
 
746
         write(1,*)'Value returned by he5_swdefchunk ',status
 
747
      endif
 
748
      write(*,*)' '
 
749
      write(1,*)' '
 
750
    
 
751
c Test Case -- he5_swdefcomp
 
752
c
 
753
      write(1,27)
 
754
      write(*,*)'Testing he5_swdefcomp'
 
755
      write(*,*)'====================='
 
756
      write(1,*)'Testing he5_swdefcomp'
 
757
      write(1,*)'====================='
 
758
      status=he5_swdefcomp(swid,HE5_HDFE_COMP_DEFLATE,compparm)
 
759
      if (status .lt. 0) then
 
760
         write(*,230)
 
761
         write(1,230)
 
762
      else
 
763
         write(*,*)'  '
 
764
         write(*,240)
 
765
         write(1,*)'  '
 
766
         write(1,240)
 
767
         write(*,*)'status= he5_swdefcomp(swid,HE5_HDFE_COMP_DEFLATE,
 
768
     1compparm)'
 
769
         write(*,*)'Value returned by he5_swdefcomp ',status
 
770
         write(1,*)'status= he5_swdefcomp(swid,HE5_HDFE_COMP_DEFLATE,
 
771
     1compparm)'
 
772
         write(1,*)'Value returned by he5_swdefcomp ',status
 
773
      endif
 
774
      write(*,*)' '
 
775
      write(1,*)' '
 
776
 
 
777
 
 
778
      status=he5_swdefdfld(swid,'CompChunk','GeoTrack',
 
779
     1' ',HE5T_NATIVE_FLOAT, 0)
 
780
      if (status .lt. 0) then
 
781
         write(*,230)
 
782
         write(1,230) 
 
783
      else
 
784
         write(*,*)'  '
 
785
         write(*,240)
 
786
         write(1,*)'  '
 
787
         write(1,240)
 
788
         write(*,*)'Define data field CompChunk '
 
789
         write(*,*)'Value returned by he5_swdefdfld ',status
 
790
         write(1,*)'Define data field CompChunk '
 
791
         write(1,*)'Value returned by he5_swdefdfld ',status
 
792
         write(*,*)' '
 
793
         write(1,*)' '
 
794
      endif
 
795
 
 
796
c Test Case -- he5_swdetach
 
797
c
 
798
      write(1,27)
 
799
      write(*,*)'Testing he5_swdetach '
 
800
      write(*,*)'====================='
 
801
      write(1,*)'Testing he5_swdetach '
 
802
      write(1,*)'====================='
 
803
      status=he5_swdetach(swid)
 
804
      if (status .lt. 0) then
 
805
         write(*,230)
 
806
         write(1,230)
 
807
      else
 
808
         write(*,*)'  '
 
809
         write(*,240)
 
810
         write(1,*)'  '
 
811
         write(1,240)
 
812
         write(*,*)'status= he5_swdetach(swid)'
 
813
         write(*,*)'Value returned by he5_swdetach ',status
 
814
         write(1,*)'status= he5_swdetach(swid)'
 
815
         write(1,*)'Value returned by he5_swdetach ',status
 
816
      endif
 
817
      write(*,*)' '
 
818
      write(1,*)' '
 
819
 
 
820
      status=he5_swdetach(swid2)
 
821
      if (status .lt. 0) then
 
822
         write(*,230)
 
823
         write(1,230)
 
824
      else
 
825
         write(*,*)'  '
 
826
         write(*,240)
 
827
         write(1,*)'  '
 
828
         write(1,240)
 
829
         write(*,*)'status= he5_swdetach(swid2)'
 
830
         write(*,*)'Value returned by he5_swdetach ',status
 
831
         write(1,*)'status= he5_swdetach(swid2)'
 
832
         write(1,*)'Value returned by he5_swdetach ',status
 
833
      endif
 
834
      write(*,*)' '
 
835
      write(1,*)' '
 
836
 
 
837
      swid=he5_swattach(swfid,'Simplef')
 
838
      if (swid .lt. 0) then
 
839
         write(*,230)
 
840
         write(1,230)
 
841
      else
 
842
         write(*,*)'  '
 
843
         write(*,240)
 
844
         write(1,*)'  '
 
845
         write(1,240)
 
846
         write(*,*)'swid= he5_swattach(swfid, "Simplef")'
 
847
         write(*,*)'Value returned by he5_swattach ',swid
 
848
         write(1,*)'swid= he5_swattach(swfid, "Simplef")'
 
849
         write(1,*)'Value returned by he5_swattach ',swid
 
850
      endif
 
851
      write(*,*)' '
 
852
      write(1,*)' '
 
853
 
 
854
      swid2=he5_swattach(swfid,'Indexedf')
 
855
      if (swid2 .lt. 0) then
 
856
         write(*,230)
 
857
         write(1,230)
 
858
      else
 
859
         write(*,*)'  '
 
860
         write(*,240)
 
861
         write(1,*)'  '
 
862
         write(1,240)
 
863
         write(*,*)'swid2= he5_swattach(swfid, "Indexedf")'
 
864
         write(*,*)'Value returned by he5_swattach ',swid2
 
865
         write(1,*)'swid2= he5_swattach(swfid, "Indexedf")'
 
866
         write(1,*)'Value returned by he5_swattach ',swid2
 
867
      endif
 
868
      write(*,*)' '
 
869
      write(1,*)' '
 
870
 
 
871
c Test Case -- he5_swdefmap
 
872
c
 
873
      write(1,27)
 
874
      write(*,*)'Testing he5_swdefmap '
 
875
      write(*,*)'====================='
 
876
      write(1,*)'Testing he5_swdefmap '
 
877
      write(1,*)'====================='
 
878
 
 
879
      offset = 0
 
880
      inc    = 2
 
881
      status=he5_swdefmap(swid,'GeoTrack','DataTrack',offset,inc)
 
882
      if (status .lt. 0) then
 
883
         write(*,230)
 
884
         write(1,230)
 
885
      else
 
886
         write(*,*)'  '
 
887
         write(*,240)
 
888
         write(1,*)'  '
 
889
         write(1,240)
 
890
         write(*,*)'status= he5_swdefmap(swid,"GeoTrack",
 
891
     1"DataTrack", offset, inc)'
 
892
         write(*,*)'Value returned by he5_swdefmap ',status
 
893
         write(1,*)'status= he5_swdefmap(swid,"GeoTrack",
 
894
     1"DataTrack", offset, inc)'
 
895
         write(1,*)'Value returned by he5_swdefmap ',status
 
896
      endif
 
897
      write(*,*)' '
 
898
      write(1,*)' '
 
899
 
 
900
c Test Case -- he5_swdefimap
 
901
c
 
902
      write(1,27)
 
903
      write(*,*)'Testing he5_swdefimap '
 
904
      write(*,*)'====================='
 
905
      write(1,*)'Testing he5_swdefimap '
 
906
      write(1,*)'====================='
 
907
      status=he5_swdefimap(swid2,'GeoTrack','DataTrack',indexmap)
 
908
      if (status .lt. 0) then
 
909
         write(*,230)
 
910
         write(1,230)
 
911
      else
 
912
         write(*,*)'  '
 
913
         write(*,240)
 
914
         write(1,*)'  '
 
915
         write(1,240)
 
916
         write(*,*)'status= he5_swdefimap(swid2, "GeoTrack", 
 
917
     1"DataTrack",indexmap)'
 
918
         write(*,*)'Value returned by he5_swdefimap ',status
 
919
         write(1,*)'status= he5_swdefimap(swid2, "GeoTrack",
 
920
     1"DataTrack",indexmap)'
 
921
         write(1,*)'Value returned by he5_swdefimap ',status
 
922
      endif
 
923
      write(*,*)' '
 
924
      write(1,*)' '
 
925
 
 
926
      status=he5_swdefimap(swid2,'GeoXtrack','DataXtrack',
 
927
     1indexmap)
 
928
      if (status .lt. 0) then
 
929
         write(*,230)
 
930
         write(1,230)
 
931
      else
 
932
         write(*,*)'  '
 
933
         write(*,240)
 
934
         write(1,*)'  '
 
935
         write(1,240)
 
936
         write(*,*)'status=he5_swdefimap(swid2, "GeoXtrack",
 
937
     1"DataXtrack",indexmap)'
 
938
         write(*,*)'Value returned by he5_swdefimap ',status
 
939
         write(1,*)'status=he5_swdefimap(swid2, "GeoXtrack",
 
940
     1"DataXtrack",indexmap)'
 
941
         write(1,*)'Value returned by he5_swdefimap ',status
 
942
      endif
 
943
      write(*,*)' '
 
944
      write(1,*)' '
 
945
 
 
946
 
 
947
c Test Case -- he5_swdetach
 
948
c
 
949
      write(1,27)
 
950
      write(*,*)'Testing he5_swdetach '
 
951
      write(*,*)'====================='
 
952
      write(1,*)'Testing he5_swdetach '
 
953
      write(1,*)'====================='
 
954
      status= he5_swdetach(swid)
 
955
      if (status .lt. 0) then
 
956
         write(*,230)
 
957
         write(1,230)
 
958
      else
 
959
         write(*,*)'  '
 
960
         write(*,240)
 
961
         write(1,*)'  '
 
962
         write(1,240)
 
963
         write(*,*)'status= he5_swdetach(swid)'
 
964
         write(*,*)'Value returned by he5_swdetach ',status
 
965
         write(1,*)'status= he5_swdetach(swid)'
 
966
         write(1,*)'Value returned by he5_swdetach ',status
 
967
      endif
 
968
      write(*,*)' '
 
969
      write(1,*)' '
 
970
 
 
971
      status= he5_swdetach(swid2)
 
972
      if (status .lt. 0) then
 
973
         write(*,230)
 
974
         write(1,230)         
 
975
      else
 
976
         write(*,*)'  '
 
977
         write(*,240)
 
978
         write(1,*)'  '
 
979
         write(1,240)
 
980
         write(*,*)'status= he5_swdetach(swid2)'
 
981
         write(*,*)'Value returned by he5_swdetach ',status
 
982
         write(1,*)'status= he5_swdetach(swid2)'
 
983
         write(1,*)'Value returned by he5_swdetach ',status
 
984
      endif
 
985
      write(*,*)' '
 
986
      write(1,*)' '
 
987
 
 
988
      status=he5_swclose(swfid)
 
989
      if (status .lt. 0) then
 
990
         write(*,230)
 
991
         write(1,230)       
 
992
      else
 
993
         write(*,*)'  '
 
994
         write(*,240)
 
995
         write(1,*)'  '
 
996
         write(1,240)
 
997
         write(*,*)'status= he5_swclose(swfid)'
 
998
         write(*,*)'Value returned by he5_swclose ',status
 
999
         write(1,*)'status= he5_swclose(swfid)'
 
1000
         write(1,*)'Value returned by he5_swclose ',status
 
1001
      endif
 
1002
      write(*,*)' '
 
1003
      write(1,*)' '
 
1004
 
 
1005
 
 
1006
      swfid=he5_swopen('swath.he5',HE5F_ACC_RDWR)
 
1007
      if (swfid .lt. 0) then
 
1008
         write(*,230)
 
1009
         write(1,230)
 
1010
      else
 
1011
         write(*,*)'  '
 
1012
         write(*,240)
 
1013
         write(1,*)'  '
 
1014
         write(1,240)
 
1015
         write(*,*)'swfid=he5_swopen("swath.he5",HE5F_ACC_RDWR)'
 
1016
         write(*,*)'Value returned by he5_swopen ',swfid
 
1017
         write(1,*)'swfid=he5_swopen("swath.he5",HE5F_ACC_RDWR)'
 
1018
         write(1,*)'Value returned by he5_swopen ',swfid
 
1019
      endif
 
1020
      write(*,*)' '
 
1021
      write(1,*)' '
 
1022
 
 
1023
 
 
1024
c Test Case -- he5_swattach
 
1025
c
 
1026
      write(1,27)
 
1027
      write(*,*)'Testing he5_swattach '
 
1028
      write(*,*)'====================='
 
1029
      write(1,*)'Testing he5_swattach '
 
1030
      write(1,*)'====================='
 
1031
 
 
1032
      swid=he5_swattach(swfid,'Simplef')
 
1033
      if (swid .lt. 0) then
 
1034
         write(*,230)
 
1035
         write(1,230)
 
1036
      else
 
1037
         write(*,*)'  '
 
1038
         write(*,240)
 
1039
         write(1,*)'  '
 
1040
         write(1,240)
 
1041
         write(*,*)'swid= he5_swattach(swfid, "Simplef")'
 
1042
         write(*,*)'Value returned by he5_swattach ',swid
 
1043
         write(1,*)'swid= he5_swattach(swfid, "Simplef")'
 
1044
         write(1,*)'Value returned by he5_swattach ',swid
 
1045
      endif
 
1046
      write(*,*)' '
 
1047
      write(1,*)' '
 
1048
 
 
1049
      swid2=he5_swattach(swfid,'Indexedf')
 
1050
      if (swid2 .lt. 0) then
 
1051
         write(*,230)
 
1052
         write(1,230)
 
1053
      else
 
1054
         write(*,*)'  '
 
1055
         write(*,240)
 
1056
         write(1,*)'  '
 
1057
         write(1,240)
 
1058
         write(*,*)'swid2= he5_swattach(swfid, "Indexedf")'
 
1059
         write(*,*)'Value returned by he5_swattach ',swid2
 
1060
         write(1,*)'swid2= he5_swattach(swfid, "Indexedf")'
 
1061
         write(1,*)'Value returned by he5_swattach ',swid2
 
1062
      endif
 
1063
      write(*,*)' '
 
1064
      write(1,*)' '
 
1065
 
 
1066
c Test Case -- he5_swwrfld
 
1067
c
 
1068
      write(1,27)
 
1069
      write(*,*)'Testing he5_swwrfld '
 
1070
      write(*,*)'==================='
 
1071
      write(1,*)'Testing he5_swwrfld '
 
1072
      write(1,*)'==================='
 
1073
 
 
1074
      status=he5_swwrfld(swid,'SideA',sd_start,stride, 
 
1075
     1rd_edge, ray4)
 
1076
      if (status .lt. 0) then
 
1077
         write(*,230)
 
1078
         write(1,230)
 
1079
      else
 
1080
         write(*,*)'  '
 
1081
         write(*,240)
 
1082
         write(1,*)'  '
 
1083
         write(1,240)
 
1084
         write(*,*)'Write data field SideA '
 
1085
         write(*,*)'Value returned by he5_swwrfld ',status
 
1086
         write(1,*)'Write data field SideA '
 
1087
         write(1,*)'Value returned by he5_swwrfld ',status
 
1088
      endif
 
1089
      write(*,*)' '
 
1090
      write(1,*)' '
 
1091
 
 
1092
      status=he5_swwrfld(swid,'Temperature',start,stride, 
 
1093
     1dataedge, ray4)
 
1094
      if (status .lt. 0) then
 
1095
         write(*,230)
 
1096
         write(1,230)
 
1097
      else
 
1098
         write(*,*)'  '
 
1099
         write(*,240)
 
1100
         write(1,*)'  '
 
1101
         write(1,240)
 
1102
         write(*,*)'status=he5_swwrfld(swid,"Temperature",start, 
 
1103
     1stride,dataedge, ray1)'
 
1104
         write(*,*)'Value returned by he5_swwrfld ',status
 
1105
         write(1,*)'status=he5_swwrfld(swid,"Temperature",start, 
 
1106
     1stride,dataedge, ray1)'
 
1107
         write(1,*)'Value returned by he5_swwrfld ',status
 
1108
      endif
 
1109
      write(*,*)' '
 
1110
      write(1,*)' '
 
1111
 
 
1112
      status=he5_swwrfld(swid,'Conduction',start,stride, 
 
1113
     1dataedge, ray2)
 
1114
      if (status .lt. 0) then
 
1115
         write(*,230)
 
1116
         write(1,230)
 
1117
      else
 
1118
         write(*,*)'  '
 
1119
         write(*,240)
 
1120
         write(1,*)'  '
 
1121
         write(1,240)
 
1122
         write(*,*)'status=he5_swwrfld(swid,"Conduction",start, 
 
1123
     1stride,dataedge, ray2)'
 
1124
         write(*,*)'Value returned by he5_swwrfld ',status
 
1125
         write(1,*)'status=he5_swwrfld(swid,"Conduction",start, 
 
1126
     1stride,dataedge, ray2)'
 
1127
         write(1,*)'Value returned by he5_swwrfld ',status
 
1128
      endif
 
1129
      write(*,*)' '
 
1130
      write(1,*)' '
 
1131
 
 
1132
      status=he5_swwrfld(swid,'Latitude',geostart,stride,
 
1133
     1geoedge,lat)
 
1134
      if (status .lt. 0) then
 
1135
         write(*,230)
 
1136
         write(1,230)
 
1137
      else
 
1138
         write(*,*)'  '
 
1139
         write(*,240)
 
1140
         write(1,*)'  '
 
1141
         write(1,240)
 
1142
         write(*,*)'status= he5_swwrfld(swid, "Latitude", geostart, 
 
1143
     1stride, geoedge, lat)'
 
1144
         write(*,*)'Value returned by he5_swwrfld ',status
 
1145
         write(1,*)'status= he5_swwrfld(swid, "Latitude", geostart, 
 
1146
     1stride, geoedge, lat)'
 
1147
         write(1,*)'Value returned by he5_swwrfld ',status
 
1148
      endif
 
1149
      write(*,*)' '
 
1150
      write(1,*)' '
 
1151
 
 
1152
      status=he5_swwrfld(swid,'Longitude',geostart,stride, 
 
1153
     1geoedge,lon)
 
1154
      if (status .lt. 0) then
 
1155
         write(*,230)
 
1156
         write(1,230)
 
1157
      else
 
1158
         write(*,*)'  '
 
1159
         write(*,240)
 
1160
         write(1,*)'  '
 
1161
         write(1,240)
 
1162
         write(*,*)'status= he5_swwrfld(swid,"Longitude",geostart,
 
1163
     1stride,geoedge, lon)'
 
1164
         write(*,*)'Value returned by he5_swwrfld ',status
 
1165
         write(1,*)'status= he5_swwrfld(swid,"Longitude",geostart,
 
1166
     1stride,geoedge, lon)'
 
1167
         write(1,*)'Value returned by he5_swwrfld ',status
 
1168
      endif
 
1169
      write(*,*)' '
 
1170
      write(1,*)' '
 
1171
 
 
1172
      status=he5_swwrfld(swid,'Time',geostart,stride,geoedge,
 
1173
     1twodtime)
 
1174
      if (status .lt. 0) then
 
1175
         write(*,230)
 
1176
         write(1,230)         
 
1177
      else
 
1178
         write(*,*)'  '
 
1179
         write(*,240)
 
1180
         write(1,*)'  '
 
1181
         write(1,240)
 
1182
         write(*,*)'status=he5_swwrfld(swid,"Time",geostart,stride, 
 
1183
     1geoedge, twodtime)'
 
1184
         write(*,*)'Value returned by he5_swwrfld for Time ',status
 
1185
         write(1,*)'status= he5_swwrfld(swid, "Time", geostart, stride, 
 
1186
     1geoedge, twodtime)'
 
1187
         write(1,*)'Value returned by he5_swwrfld for Time ',status
 
1188
      endif
 
1189
      write(*,*)' '
 
1190
      write(1,*)' '
 
1191
 
 
1192
      status=he5_swwrfld(swid2,'Latitude',istart,stride,
 
1193
     1iedge,idxlat)
 
1194
      if (status .lt. 0) then
 
1195
         write(*,230)
 
1196
         write(1,230)       
 
1197
      else
 
1198
         write(*,*)'  '
 
1199
         write(*,240)
 
1200
         write(1,*)'  '
 
1201
         write(1,240)
 
1202
         write(*,*)'status= he5_swwrfld(swid2,"Latitude", 
 
1203
     1istart,stride,iedge,idxlat)'
 
1204
         write(*,*)'Value returned by he5_swwrfld ',status
 
1205
         write(1,*)'status= he5_swwrfld(swid2,"Latitude",
 
1206
     1istart,stride,iedge,lat)'
 
1207
         write(1,*)'Value returned by he5_swwrfld ',status
 
1208
      endif
 
1209
      write(*,*)' '
 
1210
      write(1,*)' '
 
1211
 
 
1212
      status=he5_swwrfld(swid2,'Longitude',istart,stride, 
 
1213
     1iedge,idxlon)
 
1214
      if (status .lt. 0) then
 
1215
         write(*,230)
 
1216
         write(1,230)
 
1217
      else
 
1218
         write(*,*)'  '
 
1219
         write(*,240)
 
1220
         write(1,*)'  '
 
1221
         write(1,240)
 
1222
         write(*,*)'status=he5_swwrfld(swid2,"Longitude", 
 
1223
     1istart,stride,iedge,idxlon)'
 
1224
         write(*,*)'Value returned by he5_swwrfld ',status
 
1225
         write(1,*)'status= he5_swwrfld(swid2,"Longitude",
 
1226
     1istart,stride,iedge,idxlon)'
 
1227
         write(1,*)'Value returned by he5_swwrfld ',status
 
1228
      endif
 
1229
      write(*,*)' '
 
1230
      write(1,*)' '
 
1231
 
 
1232
      status=he5_swwrfld(swid2,'Time',tstart,tstride,
 
1233
     1tedge,onedtime)
 
1234
      if (status .lt. 0) then
 
1235
         write(*,230)
 
1236
         write(1,230)
 
1237
      else
 
1238
         write(*,*)'  '
 
1239
         write(*,240)
 
1240
         write(1,*)'  '
 
1241
         write(1,240)
 
1242
         write(*,*)'Write field Time '
 
1243
         write(*,*)'Status returned by he5_swwrfld ',status
 
1244
         write(1,*)'Write field Time '
 
1245
         write(1,*)'Status returned by he5_swwrfld ',status
 
1246
         write(*,*)' '
 
1247
         write(1,*)' '
 
1248
      endif
 
1249
 
 
1250
      iedge(1)=40
 
1251
      iedge(2)=40
 
1252
      status=he5_swwrfld(swid2,'Sensor1',istart,stride, 
 
1253
     1iedge,ray3)
 
1254
      if (status .lt. 0) then
 
1255
         write(*,230)
 
1256
         write(1,230)
 
1257
      else
 
1258
         write(*,*)'  '
 
1259
         write(*,240)
 
1260
         write(1,*)'  '
 
1261
         write(1,240)
 
1262
         write(*,*)'status= he5_swwrfld(swid2, "Sensor1", 
 
1263
     1istart, stride, iedge, ray3)'
 
1264
         write(*,*)'Value returned by he5_swwrfld ',status
 
1265
         write(1,*)'status= he5_swwrfld(swid2, "Sensor1", 
 
1266
     1istart, stride, iedge, ray3)'
 
1267
         write(1,*)'Value returned by he5_swwrfld ',status
 
1268
      endif
 
1269
      write(*,*)' '
 
1270
      write(1,*)' '
 
1271
 
 
1272
c Test Case -- he5_swwrlattr
 
1273
c
 
1274
      write(1,27)
 
1275
      write(*,*)'Testing he5_swwrlattr, Local Attribute '
 
1276
      write(*,*)'================================== '
 
1277
      write(1,*)'Testing he5_swwrlattr, Local Attribute '
 
1278
      write(1,*)'================================== '
 
1279
      status=he5_swwrlattr(swid2,'Sensor1','local',
 
1280
     1HE5T_NATIVE_FLOAT,count,locattr)
 
1281
      if (status .lt. 0) then
 
1282
         write(*,230)
 
1283
         write(1,230)
 
1284
      else
 
1285
         write(*,*)'  '
 
1286
         write(*,240)
 
1287
         write(1,*)'  '
 
1288
         write(1,240)
 
1289
         write(*,*)'status=he5_swwrlattr(swid2,"Sensor1","local",
 
1290
     1HE5T_NATIVE_FLOAT,count,locattr)'
 
1291
         write(*,*)'Value returned by he5_swwrlattr ',status
 
1292
         write(1,*)'status=he5_swwrlattr(swid2,"Sensor1", "local", 
 
1293
     1HE5T_NATIVE_FLOAT,count,locattr)'
 
1294
         write(1,*)'Value returned by he5_swwrlattr ',status
 
1295
      endif
 
1296
      write(*,*)' '
 
1297
      write(1,*)' '
 
1298
 
 
1299
 
 
1300
c Test Case -- he5_swwrattr
 
1301
c
 
1302
      count(1) = 4
 
1303
 
 
1304
      write(1,27)
 
1305
      write(*,*)'Testing he5_swwrattr, Global Attribute '
 
1306
      write(*,*)'====================================== '
 
1307
      write(1,*)'Testing he5_swwrattr, Global Attribute '
 
1308
      write(1,*)'======================================= '
 
1309
      status=he5_swwrattr(swid,'Drift',HE5T_NATIVE_INT,count, 
 
1310
     1global_attr)
 
1311
      if (status .lt. 0) then
 
1312
         write(*,230)
 
1313
         write(1,230)
 
1314
      else
 
1315
         write(*,*)'  '
 
1316
         write(*,240)
 
1317
         write(1,*)'  '
 
1318
         write(1,240)
 
1319
         write(*,*)'status=he5_swwrattr(swid, "Drift", 
 
1320
     1HE5T_NATIVE_INT, count, global_attr)'
 
1321
         write(*,*)'Value returned by he5_swwrattr ',status
 
1322
         write(1,*)'status=he5_swwrattr(swid, "Drift", 
 
1323
     1HE5T_NATIVE_INT, count, global_attr)'
 
1324
         write(1,*)'Value returned by he5_swwrattr ',status
 
1325
      endif
 
1326
      write(*,*)' '
 
1327
      write(1,*)' '
 
1328
 
 
1329
c Test Case -- he5_swwrgattr
 
1330
c
 
1331
      count(1) = 3
 
1332
     
 
1333
      write(1,27)
 
1334
      write(*,*)'Testing he5_swwrgattr, Group Attribute '
 
1335
      write(*,*)'====================================== '
 
1336
      write(1,*)'Testing he5_swwrgattr, Group Attribute '
 
1337
      write(1,*)'====================================== '
 
1338
      status=he5_swwrgattr(swid,'group',HE5T_NATIVE_FLOAT, 
 
1339
     1count,grpattr)
 
1340
      if (status .lt. 0) then
 
1341
         write(*,230)
 
1342
         write(1,230)
 
1343
      else
 
1344
         write(*,*)'  '
 
1345
         write(*,240)
 
1346
         write(1,*)'  '
 
1347
         write(1,240)
 
1348
         write(*,*)'status=he5_swwrgattr(swid, "group", 
 
1349
     1HE5T_NATIVE_FLOAT,count,grpgattr)'
 
1350
         write(*,*)'Value returned by he5_swwrgattr ',status
 
1351
         write(1,*)'status=he5_swwrgattr(swid, "group", 
 
1352
     1HE5T_NATIVE_FLOAT,count,grpattr)'
 
1353
         write(1,*)'Value returned by he5_swwrgattr ',status
 
1354
      endif
 
1355
      write(*,*)' '
 
1356
      write(1,*)' '
 
1357
 
 
1358
      status= he5_swdetach(swid)
 
1359
      if (status .lt. 0) then
 
1360
         write(*,230)
 
1361
         write(1,230)
 
1362
      else
 
1363
         write(*,*)'  '
 
1364
         write(*,240)
 
1365
         write(1,*)'  '
 
1366
         write(1,240)
 
1367
      write(*,*)'status= he5_swdetach(swid)'
 
1368
      write(*,*)'Value returned by he5_swdetach ',status
 
1369
      write(1,*)'status= he5_swdetach(swid)'
 
1370
      write(1,*)'Value returned by he5_swdetach ',status
 
1371
      endif
 
1372
      write(*,*)' '
 
1373
      write(1,*)' '
 
1374
 
 
1375
      status= he5_swdetach(swid2)
 
1376
      if (status .lt. 0) then
 
1377
         write(*,230)
 
1378
         write(1,230)
 
1379
         
 
1380
      else
 
1381
         write(*,*)'  '
 
1382
         write(*,240)
 
1383
         write(1,*)'  '
 
1384
         write(1,240)
 
1385
         write(*,*)'status= he5_swdetach(swid2)'
 
1386
         write(*,*)'Value returned by he5_swdetach ',status
 
1387
         write(1,*)'status= he5_swdetach(swid2)'
 
1388
         write(1,*)'Value returned by he5_swdetach ',status
 
1389
      endif
 
1390
      write(*,*)' '
 
1391
      write(1,*)' '
 
1392
 
 
1393
 
 
1394
c Test Case -- he5_swclose
 
1395
c
 
1396
      write(1,27)
 
1397
      write(*,*)'Testing he5_swclose '
 
1398
      write(*,*)'==================='
 
1399
      write(1,*)'Testing he5_swclose '
 
1400
      write(1,*)'==================='
 
1401
      status= he5_swclose(swfid)
 
1402
      if (status .lt. 0) then
 
1403
         write(*,230)
 
1404
         write(1,230)
 
1405
      else
 
1406
         write(*,*)'  '
 
1407
         write(*,240)
 
1408
         write(1,*)'  '
 
1409
         write(1,240)
 
1410
         write(*,*)'Value returned by he5_swclose ',status
 
1411
         write(1,*)'status= he5_swclose(swfid)'
 
1412
         write(1,*)'Value returned by he5_swclose ',status
 
1413
      endif
 
1414
      write(*,*)' '
 
1415
      write(1,*)' '
 
1416
 
 
1417
 
 
1418
      swfid= he5_swopen('swath.he5',HE5F_ACC_RDWR)
 
1419
      if (swfid .lt. 0) then
 
1420
         write(*,230)
 
1421
         write(1,230)
 
1422
      else
 
1423
         write(*,*)'  '
 
1424
         write(*,240)
 
1425
         write(1,*)'  '
 
1426
         write(1,240)
 
1427
         write(*,*)'swfid= he5_swopen("swath.he5",HE5F_ACC_RDWR)'
 
1428
         write(*,*)'Value returned by he5_swopen ', swfid
 
1429
         write(1,*)'swfid= he5_swopen("swath.he5",HE5F_ACC_RDWR)'
 
1430
         write(1,*)'Value returned by he5_swopen ', swfid
 
1431
      endif
 
1432
      write(*,*)' '
 
1433
      write(1,*)' '
 
1434
 
 
1435
      swid= he5_swattach(swfid,'Simplef')
 
1436
      if (swid .lt. 0) then
 
1437
         write(*,230)
 
1438
         write(1,230)
 
1439
      else
 
1440
         write(*,*)'  '
 
1441
         write(*,240)
 
1442
         write(1,*)'  '
 
1443
         write(1,240)
 
1444
         write(*,*)'swid= he5_swattach(swfid, "Simplef")'
 
1445
         write(*,*)'Value returned by he5_swattach ',swid
 
1446
         write(1,*)'swid= he5_swattach(swfid, "Simplef")'
 
1447
         write(1,*)'Value returned by he5_swattach ',swid
 
1448
      endif
 
1449
      write(*,*)' '
 
1450
      write(1,*)' '
 
1451
 
 
1452
      status= he5_swdetach(swid)
 
1453
      if (status .lt. 0) then
 
1454
         write(*,230)
 
1455
         write(1,230)
 
1456
      else
 
1457
         write(*,*)'  '
 
1458
         write(*,240)
 
1459
         write(1,*)'  '
 
1460
         write(1,240)
 
1461
         write(*,*)'status= he5_swdetach(swid)'
 
1462
         write(*,*)'Value returned by he5_swdetach ',status
 
1463
         write(1,*)'status= he5_swdetach(swid)'
 
1464
         write(1,*)'Value returned by he5_swdetach ',status
 
1465
      endif
 
1466
      write(*,*)' '
 
1467
      write(1,*)' '
 
1468
 
 
1469
      status= he5_swclose(swfid)
 
1470
      if (status .lt. 0) then
 
1471
         write(*,230)
 
1472
         write(1,230)
 
1473
      else
 
1474
         write(*,*)'  '
 
1475
         write(*,240)
 
1476
         write(1,*)'  '
 
1477
         write(1,240)
 
1478
         write(*,*)'status= he5_swclose(swfid)'
 
1479
         write(*,*)'Value returned by he5_swclose ',status
 
1480
         write(1,*)'status= he5_swclose(swfid)'
 
1481
         write(1,*)'Value returned by he5_swclose ',status
 
1482
      endif
 
1483
      write(*,*)' '
 
1484
      write(1,*)' '
 
1485
 
 
1486
 
 
1487
      swfid= he5_swopen('swath.he5',HE5F_ACC_RDWR)
 
1488
      if (swfid .lt. 0) then
 
1489
         write(*,230)
 
1490
         write(1,230)
 
1491
      else
 
1492
         write(*,*)'  '
 
1493
         write(*,240)
 
1494
         write(1,*)'  '
 
1495
         write(1,240)
 
1496
         write(*,*)'swfid= he5_swopen("swath.he5",HE5F_ACC_RDWR)'
 
1497
         write(*,*)'Value returned by he5_swopen ',swfid
 
1498
         write(1,*)'swfid= he5_swopen("swath.he5",HE5F_ACC_RDWR)'
 
1499
         write(1,*)'Value returned by he5_swopen ',swfid
 
1500
      endif
 
1501
      write(*,*)' '
 
1502
      write(1,*)' '
 
1503
 
 
1504
      swid=he5_swattach(swfid,'Simplef')
 
1505
      if (swid .lt. 0) then
 
1506
         write(*,230)
 
1507
         write(1,230)
 
1508
      else
 
1509
         write(*,*)'  '
 
1510
         write(*,240)
 
1511
         write(1,*)'  '
 
1512
         write(1,240)
 
1513
         write(*,*)'swid= he5_swattach(swfid, "Simplef")'
 
1514
         write(*,*)'Value returned by he5_swattach ',swid
 
1515
         write(1,*)'swid= he5_swattach(swfid, "Simplef")'
 
1516
         write(1,*)'Value returned by he5_swattach ',swid
 
1517
      endif
 
1518
      write(*,*)' '
 
1519
      write(1,*)' '
 
1520
 
 
1521
      swid2=he5_swattach(swfid,'Indexedf')
 
1522
      if (swid2 .lt. 0) then
 
1523
         write(*,230)
 
1524
         write(1,230)
 
1525
      else
 
1526
         write(*,*)'  '
 
1527
         write(*,240)
 
1528
         write(1,*)'  '
 
1529
         write(1,240)
 
1530
         write(*,*)'swid2= he5_swattach(swfid, "Indexedf")'
 
1531
         write(*,*)'Value returned by he5_swattach ',swid2
 
1532
         write(1,*)'swid2= he5_swattach(swfid, "Indexedf")'
 
1533
         write(1,*)'Value returned by he5_swattach ',swid2
 
1534
      endif
 
1535
      write(*,*)' '
 
1536
      write(1,*)' '
 
1537
 
 
1538
c Test Case -- he5_swdefvrtreg
 
1539
c
 
1540
      write(1,27)
 
1541
      write(*,*)'Testing he5_swdefvrtreg'
 
1542
      write(*,*)'======================='
 
1543
      write(1,*)'Testing he5_swdefvrtreg'
 
1544
      write(1,*)'======================='
 
1545
 
 
1546
      regionid=he5_swdefvrtreg(swid2,HE5_HDFE_NOPREVSUB,'Time',range)
 
1547
      if (regionid .lt. 0) then
 
1548
         write(*,230)
 
1549
         write(1,230)
 
1550
      else
 
1551
         write(*,*)'  '
 
1552
         write(*,240)
 
1553
         write(1,*)'  '
 
1554
         write(1,240)
 
1555
         write(*,*)'Define region id for field Time '
 
1556
         write(*,*)'Region id returned by he5_swdefvrtreg ',
 
1557
     1regionid
 
1558
         write(1,*)'Define region id for field Time '
 
1559
         write(1,*)'Region id returned by he5_swdefvrtreg ',
 
1560
     1regionid
 
1561
      endif
 
1562
      write(*,*)' '
 
1563
      write(1,*)' '
 
1564
 
 
1565
c Test Case -- he5_swnentries
 
1566
c
 
1567
      write(1,27)
 
1568
      write(*,*)'Testing he5_swnentries '
 
1569
      write(*,*)'====================='
 
1570
      write(1,*)'Testing he5_swnentries '
 
1571
      write(1,*)'====================='
 
1572
 
 
1573
      nmaps=he5_swnentries(swid,1,strbufsize)
 
1574
      if (nmaps .lt. 0) then
 
1575
         write(*,230)
 
1576
         write(1,230)
 
1577
      else
 
1578
         write(*,*)'  '
 
1579
         write(*,240)
 
1580
         write(1,*)'  '
 
1581
         write(1,240)
 
1582
         write(*,*)'nmaps= he5_swnentries(swid, 1, strbufsize)'
 
1583
         write(*,*)'Number of dimension mappings ',nmaps
 
1584
         write(*,*)'Size of strbufsize ',strbufsize
 
1585
         write(1,*)'nmaps= he5_swnentries(swid, 1, strbufsize)'
 
1586
         write(1,*)'Number of dimension mappings ',nmaps
 
1587
         write(1,*)'Size of strbufsize ',strbufsize
 
1588
      endif
 
1589
      write(*,*)' '
 
1590
      write(1,*)' '
 
1591
 
 
1592
c Test Case -- he5_swinqmaps
 
1593
c
 
1594
      write(1,27)
 
1595
      write(*,*)'Testing he5_swinqmaps '
 
1596
      write(*,*)'====================='
 
1597
      write(1,*)'Testing he5_swinqmaps '
 
1598
      write(1,*)'====================='
 
1599
      nmaps=he5_swinqmaps(swid, dimmap, offset, inc)
 
1600
      if (nmaps .lt. 0) then
 
1601
         write(*,230)
 
1602
         write(1,230)
 
1603
      else
 
1604
         write(*,*)'  '
 
1605
         write(*,240)
 
1606
         write(1,*)'  '
 
1607
         write(1,240)
 
1608
         write(*,*)'nmaps=he5_swinqmaps(swid,dimmap,offset,inc)'
 
1609
         write(*,*)'Dimension mappings ',dimmap
 
1610
         write(*,*)'offset ',offset
 
1611
         write(*,*)'increment ',inc
 
1612
         write(1,*)'nmaps=he5_swinqmaps(swid,dimmap,offset,inc)'
 
1613
         write(1,*)'Dimension mappings ',dimmap
 
1614
         write(1,*)'offset ',offset
 
1615
         write(1,*)'increment ',inc
 
1616
      endif
 
1617
      write(*,*)' '
 
1618
      write(1,*)' '
 
1619
 
 
1620
c Test Case -- he5_swgmapinfo
 
1621
c
 
1622
      write(1,27)
 
1623
      write(*,*)'Testing he5_swgmapinfo '
 
1624
      write(*,*)'======================'
 
1625
      write(1,*)'Testing he5_swgmapinfo '
 
1626
      write(1,*)'======================'
 
1627
      status = he5_swgmapinfo(swid2,'GeoTrack')
 
1628
      if (status .lt. 0) then
 
1629
         write(*,230)
 
1630
         write(1,230)
 
1631
      else
 
1632
         write(*,*)'  '
 
1633
         write(*,240)
 
1634
         write(1,*)'  '
 
1635
         write(1,240)
 
1636
         write(*,*)'status = he5_swgmapinfo(swid2, "GeoTrack")'
 
1637
         write(1,*)'status = he5_swgmapinfo(swid2, "GeoTrack")'
 
1638
         write(*,*)'Status returned by he5_swgmapinfo ',status
 
1639
         write(1,*)'Status returned by he5_swgmapinfo ',status
 
1640
      endif
 
1641
      write(*,*)' '
 
1642
      write(1,*)' '
 
1643
 
 
1644
c Test Case -- he5_swinqimaps
 
1645
c
 
1646
      write(1,27)
 
1647
      write(*,*)'Testing he5_swinqimaps '
 
1648
      write(*,*)'====================='
 
1649
      write(1,*)'Testing he5_swinqimaps '
 
1650
      write(1,*)'====================='
 
1651
      nmaps=he5_swinqimaps(swid2, idxdimmap, ndxmap)
 
1652
      if (nmaps .lt. 0) then
 
1653
         write(*,230)
 
1654
         write(1,230)
 
1655
      else
 
1656
         write(*,*)'  '
 
1657
         write(*,240)
 
1658
         write(1,*)'  '
 
1659
         write(1,240)
 
1660
         write(*,*)'nmaps=he5_swinqimaps(swid2,idxdimmap,ndxmap)'
 
1661
         write(*,*)'Number of indexed mappings ',nmaps
 
1662
         write(*,*)'Indexed Dimension mappings ',idxdimmap
 
1663
         write(*,*)'Index size ',ndxmap
 
1664
         write(1,*)'nmaps=he5_swinqimaps(swid2,idxdimmap,ndxmap)'
 
1665
         write(1,*)'Number of indexed mappings ',nmaps
 
1666
         write(1,*)'Indexed Dimension mappings ',idxdimmap
 
1667
         write(1,*)'Index size ',ndxmap
 
1668
      endif
 
1669
      write(*,*)' '
 
1670
      write(1,*)' '
 
1671
 
 
1672
c Test Case -- he5_swinqdims
 
1673
c
 
1674
      write(1,27)
 
1675
      write(*,*)'Testing he5_swinqdims '
 
1676
      write(*,*)'====================='
 
1677
      write(1,*)'Testing he5_swinqdims '
 
1678
      write(1,*)'====================='
 
1679
      ndims=he5_swinqdims(swid,dimname,dims)
 
1680
      if (ndims .lt. 0) then
 
1681
         write(*,230)
 
1682
         write(1,230)
 
1683
      else
 
1684
         write(*,*)'  '
 
1685
         write(*,240)
 
1686
         write(1,*)'  '
 
1687
         write(1,240)
 
1688
         write(*,*)'ndims= he5_swinqdims(swid, dimname, dims)'
 
1689
         write(*,*)'Number of dimesions ',ndims
 
1690
         write(*,*)'Names of dimensions ',dimname
 
1691
         write(*,*)'Size of dimensions ',dims
 
1692
         write(1,*)'ndims= he5_swinqdims(swid, dimname, dims)'
 
1693
         write(1,*)'Number of dimesions ',ndims
 
1694
         write(1,*)'Names of dimensions ',dimname
 
1695
         write(1,*)'Size of dimensions ',dims
 
1696
      endif
 
1697
      write(*,*)' '
 
1698
      write(1,*)' '
 
1699
 
 
1700
      ndims= he5_swinqdims(swid2, dimname, dims)
 
1701
      if (ndims .lt. 0) then
 
1702
         write(*,230)
 
1703
         write(1,230)
 
1704
      else
 
1705
         write(*,*)'  '
 
1706
         write(*,240)
 
1707
         write(1,*)'  '
 
1708
         write(1,240)
 
1709
         write(*,*)'ndims=he5_swinqdims(swid2,dimname,dims)'
 
1710
         write(*,*)'Number of dimesions ',ndims
 
1711
         write(*,*)'Names of dimensions ',dimname
 
1712
         write(*,*)'Size of dimensions ',dims
 
1713
         write(1,*)'ndims=he5_swinqdims(swid2,dimname,dims)'
 
1714
         write(1,*)'Number of dimesions ',ndims
 
1715
         write(1,*)'Names of dimensions ',dimname
 
1716
         write(1,*)'Size of dimensions ',dims
 
1717
      endif
 
1718
      write(*,*)' '
 
1719
      write(1,*)' '
 
1720
 
 
1721
c Test Case -- he5_swinqgflds
 
1722
c
 
1723
      write(1,27)
 
1724
      write(*,*)'Testing he5_swinqgflds '
 
1725
      write(*,*)'======================'
 
1726
      write(1,*)'Testing he5_swinqgflds '
 
1727
      write(1,*)'======================'
 
1728
 
 
1729
      nflds= he5_swinqgflds(swid,fieldlist,rnk,ntype)
 
1730
      if (nflds .lt. 0) then
 
1731
         write(*,230)
 
1732
         write(1,230)
 
1733
      else
 
1734
         write(*,*)'  '
 
1735
         write(*,240)
 
1736
         write(1,*)'  '
 
1737
         write(1,240)
 
1738
         write(*,*)'nflds=he5_swinqgflds(swid,fieldlist,rnk,ntype)'
 
1739
         write(*,*)'Number of geolocation fields in swath ',nflds
 
1740
         write(*,*)'Names of geolocation fields ',fieldlist
 
1741
         write(*,*)'Rank of fields ',rnk
 
1742
         write(*,*)'Number type of fields ',ntype
 
1743
         write(1,*)'nflds=he5_swinqgflds(swid,fieldlist,rnk,ntype)'
 
1744
         write(1,*)'Number of geolocation fields in swath ',nflds
 
1745
         write(1,*)'Names of geolocation fields ',fieldlist
 
1746
         write(1,*)'Rank of fields ',rnk
 
1747
         write(1,*)'Number type of fields ',ntype
 
1748
      endif
 
1749
      write(*,*)' '
 
1750
      write(1,*)' '
 
1751
 
 
1752
c Test Case -- he5_swinqdflds
 
1753
c
 
1754
      write(1,27)
 
1755
      write(*,*)'Testing he5_swinqdflds '
 
1756
      write(*,*)'======================'
 
1757
      write(1,*)'Testing he5_swinqdflds '
 
1758
      write(1,*)'======================'
 
1759
      nflds=he5_swinqdflds(swid,fieldlist,rnkd,ntyped)
 
1760
      if (nflds .lt. 0) then
 
1761
         write(*,230)
 
1762
         write(1,230)
 
1763
      else
 
1764
         write(*,*)'  '
 
1765
         write(*,240)
 
1766
         write(1,*)'  '
 
1767
         write(1,240)
 
1768
         write(*,*)'nflds=he5_swinqdflds(swid,fieldlist,rnkd,ntyped)'
 
1769
         write(*,*)'Number of data fields in swath ',nflds
 
1770
         write(*,*)'Names of data fields ',fieldlist
 
1771
         write(*,*)'Rank of fields ',rnkd
 
1772
         write(*,*)'Number type of fields ',ntyped
 
1773
         write(1,*)'nflds=he5_swinqdflds(swid,fieldlist,rnkd,ntyped)'
 
1774
         write(1,*)'Number of data fields in swath ',nflds
 
1775
         write(1,*)'Names of data fields ',fieldlist
 
1776
         write(1,*)'Rank of fields ',rnkd
 
1777
         write(1,*)'Number type of fields ',ntyped
 
1778
      endif
 
1779
      write(*,*)' '
 
1780
      write(1,*)' '
 
1781
 
 
1782
c Test Case -- he5_swdiminfo
 
1783
c
 
1784
      write(1,27)
 
1785
      write(*,*)'Testing he5_swdiminfo '
 
1786
      write(*,*)'====================='
 
1787
      write(1,*)'Testing he5_swdiminfo '
 
1788
      write(1,*)'====================='
 
1789
      dimsize= he5_swdiminfo(swid,'DataTrack')
 
1790
      if (dimsize .lt. 0) then
 
1791
         write(*,230)
 
1792
         write(1,230)
 
1793
      else
 
1794
         write(*,*)'  '
 
1795
         write(*,240)
 
1796
         write(1,*)'  '
 
1797
         write(1,240)
 
1798
         write(*,*)'dimsize= he5_swdiminfo(swid, "DataTrack")'
 
1799
         write(*,*)'Size of dimension DataTrack ',dimsize
 
1800
         write(1,*)'dimsize= he5_swdiminfo(swid, "DataTrack")'
 
1801
         write(1,*)'Size of dimension DataTrack ',dimsize
 
1802
         write(*,*)' '
 
1803
         write(1,*)' '
 
1804
      endif
 
1805
 
 
1806
c Test Case -- he5_swrdfld
 
1807
c
 
1808
      write(1,27)
 
1809
      write(*,*)'Testing he5_swrdfld '
 
1810
      write(*,*)'==================='
 
1811
      write(1,*)'Testing he5_swrdfld '
 
1812
      write(1,*)'==================='
 
1813
 
 
1814
      rd_start(1)=0
 
1815
      rd_start(2)=0
 
1816
      rd_stride(1)=1
 
1817
      rd_stride(2)=1
 
1818
      rd_edge(1)=40
 
1819
      rd_edge(2)=100
 
1820
      status= he5_swrdfld(swid,'Conduction',rd_start,
 
1821
     1rd_stride,rd_edge,temp)
 
1822
      if (status .lt. 0) then
 
1823
         write(*,230)
 
1824
         write(1,230)
 
1825
      else
 
1826
         write(*,*)'  '
 
1827
         write(*,240)
 
1828
         write(1,*)'  '
 
1829
         write(1,240)
 
1830
         write(*,*)'Value returned by he5_swrdfld ',status
 
1831
         write(*,*)'status= he5_swrdfld(swid, "Conduction", 
 
1832
     1rd_start,rd_stride, rd_edge, temp)'
 
1833
         write(1,*)'status= he5_swrdfld(swid, "Conduction", 
 
1834
     1rd_start,rd_stride, rd_edge, temp)'
 
1835
         write(1,*)'Value returned by he5_swrdfld ',status
 
1836
         do 190 index1=10,15
 
1837
            do 180 index2=10,15
 
1838
               write(*,*)'value of conduction ',temp(index1,index2)
 
1839
               write(1,*)'value of conduction ',temp(index1,index2)
 
1840
  180       continue
 
1841
  190    continue
 
1842
      endif
 
1843
 
 
1844
      write(*,*)' '
 
1845
      write(1,*)' '
 
1846
 
 
1847
c Test Case -- he5_swfldinfo
 
1848
c
 
1849
      write(1,27)
 
1850
      write(*,*)'Testing he5_swfldinfo '
 
1851
      write(*,*)'====================='
 
1852
      write(1,*)'Testing he5_swfldinfo '
 
1853
      write(1,*)'====================='
 
1854
      status=he5_swfldinfo(swid,'Latitude',rank,latdims,nt,
 
1855
     1dimens,maxdims)
 
1856
      if (status .lt. 0) then
 
1857
         write(*,230)
 
1858
         write(1,230)
 
1859
      else
 
1860
         write(*,*)'  '
 
1861
         write(*,240)
 
1862
         write(1,*)'  '
 
1863
         write(1,240)
 
1864
         write(*,*)'status= he5_swfldinfo(swid, "Latitude", 
 
1865
     1rank, latdims, nt, dimens, maxdims)'
 
1866
         write(*,*)'Value returned by he5_swfldinfo ',status
 
1867
         write(*,*)'Rank of field latitude ',rank
 
1868
         write(*,*)'dimension list of field latitude ',dimens
 
1869
         write(*,*)'Size of latitude dimensions ',latdims
 
1870
         write(*,*)'number type of field latitude ',nt
 
1871
         write(1,*)'status= he5_swfldinfo(swid, "Latitude", 
 
1872
     1rank, latdims, nt, dimens, maxdims)'
 
1873
         write(1,*)'Value returned by he5_swfldinfo ',status
 
1874
         write(1,*)'Rank of field latitude ',rank
 
1875
         write(1,*)'dimension list of field latitude ',dimens
 
1876
         write(1,*)'Size of latitude dimensions ',latdims
 
1877
         write(1,*)'number type of field latitude ',nt
 
1878
      endif
 
1879
      write(*,*)' '
 
1880
      write(1,*)' '
 
1881
 
 
1882
c Test Case -- he5_swmapinfo
 
1883
c
 
1884
      write(1,27)
 
1885
      write(*,*)'Testing he5_swmapinfo '
 
1886
      write(*,*)'====================='
 
1887
      write(1,*)'Testing he5_swmapinfo '
 
1888
      write(1,*)'====================='
 
1889
      status=he5_swmapinfo(swid,'GeoTrack','DataTrack',offset,inc)
 
1890
      if (status .lt. 0) then
 
1891
         write(*,230)
 
1892
         write(1,230)
 
1893
      else
 
1894
         write(*,*)'  '
 
1895
         write(*,240)
 
1896
         write(1,*)'  '
 
1897
         write(1,240)
 
1898
         write(*,*)'status=he5_swmapinfo(swid,"GeoTrack","DataTrack", 
 
1899
     1offset,inc)'
 
1900
         write(*,*)'Value returned by he5_swmapinfo ',status
 
1901
         write(*,*)'Offset ',offset,' Increment ',inc
 
1902
         write(1,*)'status=he5_swmapinfo(swid,"GeoTrack","DataTrack", 
 
1903
     1offset,inc)'
 
1904
         write(1,*)'Value returned by he5_swmapinfo ',status
 
1905
         write(1,*)'Offset ',offset,' Increment ',inc
 
1906
      endif
 
1907
      write(*,*)' '
 
1908
      write(1,*)' '
 
1909
 
 
1910
c Test Case -- he5_swimapinfo
 
1911
c
 
1912
      write(1,27)
 
1913
      write(*,*)'Testing he5_swimapinfo '
 
1914
      write(*,*)'======================'
 
1915
      write(1,*)'Testing he5_swimapinfo '
 
1916
      write(1,*)'======================'
 
1917
      status4=he5_swimapinfo(swid2,'GeoXtrack','DataXtrack',idxmap)
 
1918
      if (status4 .lt. 0) then
 
1919
         write(*,230)
 
1920
         write(1,230)
 
1921
      else
 
1922
         write(*,*)'  '
 
1923
         write(*,240)
 
1924
         write(1,*)'  '
 
1925
         write(1,240)
 
1926
         write(*,*)'status4= he5_swimapinfo(swid2,"GeoXtrack",
 
1927
     1"DataXtrack", idxmap)'
 
1928
         write(*,*)'Value returned by he5_swimapinfo ',status4
 
1929
         do 980 index1=1,30
 
1930
            write(*,*)' Value of index array ',idxmap(index1)
 
1931
            write(1,*)' Value of index array ',idxmap(index1)
 
1932
  980    continue
 
1933
         write(1,*)'status4= he5_swimapinfo(swid2, "GeoXtrack", 
 
1934
     1"DataXtrack",idxmap)'
 
1935
         write(1,*)'Value returned by he5_swimapinfo ',status4
 
1936
         write(1,*)'Indexed map values ',idxmap
 
1937
      endif
 
1938
      write(*,*)' '
 
1939
      write(1,*)' '
 
1940
 
 
1941
c Test Case -- he5_swinqattrs
 
1942
c
 
1943
      write(1,27)
 
1944
      write(*,*)'Testing he5_swinqattrs Global attributes '
 
1945
      write(*,*)'==================================== '
 
1946
      write(1,*)'Testing he5_swinqattrs Global attributes '
 
1947
      write(1,*)'==================================== '
 
1948
 
 
1949
      nattr = he5_swinqattrs(swid,attrlist,strbufsz2)
 
1950
      if (nattr .lt. 0) then
 
1951
         write(*,230)
 
1952
         write(1,230)
 
1953
      else
 
1954
         write(*,*)'  '
 
1955
         write(*,240)
 
1956
         write(1,*)'  '
 
1957
         write(1,240)
 
1958
         write(*,*)'Number of global attributes in swath ',nattr
 
1959
         write(*,*)'Attribute list of swath ',attrlist
 
1960
         write(1,*)'Number of global attributes in swath ',nattr
 
1961
         write(1,*)'Attribute list of swath ',attrlist
 
1962
         write(*,*)' '
 
1963
         write(1,*)' '
 
1964
      endif
 
1965
 
 
1966
c Test Case -- he5_swattrinfo
 
1967
c
 
1968
      write(1,27)
 
1969
      write(*,*)'Testing he5_swattrinfo Global attribute'
 
1970
      write(*,*)'======================================='
 
1971
      write(1,*)'Testing he5_swattrinfo Global attribute'
 
1972
      write(1,*)'======================================='
 
1973
      status= he5_swattrinfo(swid, attrlist, n, size)
 
1974
      if (status .lt. 0) then
 
1975
         write(*,230)
 
1976
         write(1,230)
 
1977
      else
 
1978
         write(*,*)'  '
 
1979
         write(*,240)
 
1980
         write(1,*)'  '
 
1981
         write(1,240)
 
1982
         write(*,*)'status=he5_swattrinfo(swid,attrlist,n,size)'
 
1983
         write(*,*)'Value returned by he5_swattrinfo ',status
 
1984
         write(*,*)'Number type of attributes ',n,' Size ',size
 
1985
         write(1,*)'status=he5_swattrinfo(swid,attrlist,n,size)'
 
1986
         write(1,*)'Value returned by he5_swattrinfo ',status
 
1987
         write(1,*)'Number type of attributes ',n,' Size ',size
 
1988
      endif
 
1989
      write(*,*)' '
 
1990
      write(1,*)' '
 
1991
 
 
1992
c Test Case -- he5_swrdattr
 
1993
c
 
1994
      write(1,27)
 
1995
      write(*,*)'Testing he5_swrdattr, Global attribute '
 
1996
      write(*,*)'======================================'
 
1997
      write(1,*)'Testing he5_swrdattr, Global attribute '
 
1998
      write(1,*)'======================================'
 
1999
 
 
2000
      status= he5_swrdattr(swid, attrlist, rdattr)
 
2001
      if (status .lt. 0) then
 
2002
         write(*,230)
 
2003
         write(1,230)
 
2004
      else
 
2005
         write(*,*)'  '
 
2006
         write(*,240)
 
2007
         write(1,*)'  '
 
2008
         write(1,240)
 
2009
         write(*,*)'status=he5_swrdattr(swid,attrlist,rdattr)'
 
2010
         write(*,*)'Value returned by he5_swrdattr ',status
 
2011
         write(*,*)'attribute ',rdattr
 
2012
         write(1,*)'status=he5_swrdattr(swid,attrlist,rdattr)'
 
2013
         write(1,*)'Value returned by he5_swrdattr ',status
 
2014
         write(1,*)'attribute ',rdattr
 
2015
      endif
 
2016
      write(*,*)' '
 
2017
      write(1,*)' '
 
2018
 
 
2019
c     Test Case -- he5_swinqgattrs
 
2020
c
 
2021
      write(1,27)
 
2022
      write(*,*)'Testing he5_swinqgattrs Group attributes '
 
2023
      write(*,*)'==================================== '
 
2024
      write(1,*)'Testing he5_swinqgattrs Group attributes '
 
2025
      write(1,*)'==================================== '
 
2026
 
 
2027
      nattr = he5_swinqgattrs(swid,attrlist,strbufsz2)
 
2028
      if (nattr .lt. 0) then
 
2029
         write(*,230)
 
2030
         write(1,230)
 
2031
      else
 
2032
         write(*,*)'  '
 
2033
         write(*,240)
 
2034
         write(1,*)'  '
 
2035
         write(1,240)
 
2036
         write(*,*)'Number of group attributes in swath ',nattr
 
2037
         write(*,*)'Attribute list of swath ',attrlist
 
2038
         write(1,*)'Number of group attributes in swath ',nattr
 
2039
         write(1,*)'Attribute list of swath ',attrlist
 
2040
         write(*,*)' '
 
2041
         write(1,*)' '
 
2042
      endif
 
2043
 
 
2044
c Test Case -- he5_swgattrinfo
 
2045
c
 
2046
      write(1,27)
 
2047
      write(*,*)'Testing he5_swgattrinfo Group attribute'
 
2048
      write(*,*)'======================================='
 
2049
      write(1,*)'Testing he5_swgattrinfo Group attribute'
 
2050
      write(1,*)'======================================='
 
2051
      status= he5_swgattrinfo(swid, attrlist, n, size)
 
2052
      if (status .lt. 0) then
 
2053
         write(*,230)
 
2054
         write(1,230)
 
2055
      else
 
2056
         write(*,*)'  '
 
2057
         write(*,240)
 
2058
         write(1,*)'  '
 
2059
         write(1,240)
 
2060
         write(*,*)'status=he5_swgattrinfo(swid,attrlist,n,size)'
 
2061
         write(*,*)'Value returned by he5_swgattrinfo ',status
 
2062
         write(*,*)'Number type of attributes ',n,' Size ',size
 
2063
         write(1,*)'status=he5_swgattrinfo(swid,attrlist,n,size)'
 
2064
         write(1,*)'Value returned by he5_swgattrinfo ',status
 
2065
         write(1,*)'Number type of attributes ',n,' Size ',size
 
2066
      endif
 
2067
      write(*,*)' '
 
2068
      write(1,*)' '
 
2069
 
 
2070
c Test Case -- he5_swrdgattr
 
2071
c
 
2072
      write(1,27)
 
2073
      write(*,*)'Testing he5_swrdgattr, Group attribute '
 
2074
      write(*,*)'======================================'
 
2075
      write(1,*)'Testing he5_swrdgattr, Group attribute '
 
2076
      write(1,*)'======================================'
 
2077
 
 
2078
       status= he5_swrdgattr(swid,'group',rdgnlattr)
 
2079
       if (status .lt. 0) then
 
2080
          write(*,230)
 
2081
          write(1,230)
 
2082
       else
 
2083
          write(*,*)'  '
 
2084
          write(*,240)
 
2085
          write(1,*)'  '
 
2086
          write(1,240)
 
2087
          write(*,*)'status=he5_swrdgattr(swid,attrlist,rdgnlattr)'
 
2088
          write(*,*)'Value returned by he5_swrdgattr ',status
 
2089
          write(*,*)'attribute ',rdgnlattr
 
2090
          write(1,*)'status=he5_swrdgattr(swid,attrlist,rdgnlattr)'
 
2091
          write(1,*)'Value returned by he5_swrdgattr ',status
 
2092
          write(1,*)'attribute ',rdgnlattr
 
2093
       endif
 
2094
       write(*,*)' '
 
2095
       write(1,*)' '
 
2096
 
 
2097
c Test Case -- he5_swinqlattrs
 
2098
c
 
2099
      write(1,27)
 
2100
      write(*,*)'Testing he5_swinqlattrs Local attributes '
 
2101
      write(*,*)'==================================== '
 
2102
      write(1,*)'Testing he5_swinqlattrs Local attributes '
 
2103
      write(1,*)'==================================== '
 
2104
 
 
2105
      nattr=he5_swinqlattrs(swid2,'Sensor1',attrlist,strbufsz2)
 
2106
      if (nattr .lt. 0) then
 
2107
         write(*,230)
 
2108
         write(1,230)         
 
2109
      else
 
2110
         write(*,*)'  '
 
2111
         write(*,240)
 
2112
         write(1,*)'  '
 
2113
         write(1,240)
 
2114
         write(*,*)'swinqlattrs(... "Sensor1" ...)'
 
2115
         write(*,*)'Number of local attributes in field',nattr
 
2116
         write(*,*)'Attribute list of field ',attrlist
 
2117
         write(1,*)'swinqlattrs(... "Sensor1" ...)'
 
2118
         write(1,*)'Number of local attributes in field',nattr
 
2119
         write(1,*)'Attribute list of field ',attrlist
 
2120
         write(*,*)' '
 
2121
         write(1,*)' '
 
2122
      endif
 
2123
 
 
2124
c Test Case -- he5_swlattrinfo
 
2125
c
 
2126
      write(1,27)
 
2127
      write(*,*)'Testing he5_swlattrinfo Local attribute'
 
2128
      write(*,*)'======================================='
 
2129
      write(1,*)'Testing he5_swlattrinfo Local attribute'
 
2130
      write(1,*)'======================================='
 
2131
      status=he5_swlattrinfo(swid2,'Sensor1','local',n,size)
 
2132
      if (status .lt. 0) then
 
2133
         write(*,230)
 
2134
         write(1,230)
 
2135
      else
 
2136
         write(*,*)'  '
 
2137
         write(*,240)
 
2138
         write(1,*)'  '
 
2139
         write(1,240)
 
2140
         write(*,*)'swlattrinfo(... "Sensor1" ...)'
 
2141
         write(*,*)'Value returned by he5_swlattrinfo ',status
 
2142
         write(*,*)'Number type of attributes ',n,' Size ',size
 
2143
         write(1,*)'swlattrinfo(... "Sensor1" ...)'
 
2144
         write(1,*)'Value returned by he5_swlattrinfo ',status
 
2145
         write(1,*)'Number type of attributes ',n,' Size ',size
 
2146
      endif
 
2147
      write(*,*)' '
 
2148
      write(1,*)' '
 
2149
 
 
2150
c Test Case -- he5_swidtype
 
2151
c
 
2152
      write(1,27)
 
2153
      write(*,*)'Testing he5_swidtype, Inquire Datatype '
 
2154
      write(*,*)'======================================='
 
2155
      write(1,*)'Testing he5_swidtype, Inquire Datatype '
 
2156
      write(1,*)'======================================='
 
2157
 
 
2158
      status= he5_swidtype(swid2,'Sensor1','local', 
 
2159
     1HE5_HDFE_LOCATTRGROUP,dtype,classid, order, size)
 
2160
      if (status .lt. 0) then
 
2161
         write(*,230)
 
2162
         write(1,230)
 
2163
      else
 
2164
         write(*,*)'  '
 
2165
         write(*,240)
 
2166
         write(1,*)'  '
 
2167
         write(1,240)
 
2168
         write(*,*)'status= he5_swidtype(swid2,"Sensor1","local", 
 
2169
     1HE5_HDFE_LOCATTRGROUP,dtype, classid, order, size)'
 
2170
         write(*,*)'Value returned by he5_swidtype ',status
 
2171
         write(*,*)'Datatype of local attribute ',dtype
 
2172
         write(*,*)'Class id and order ',classid, order
 
2173
         write(*,*)'Size of attribute ',size
 
2174
         write(1,*)'status= he5_swidtype(swid2,"Sensor1","local", 
 
2175
     1HE5_HDFE_LOCATTRGROUP,dtype, classid, order, size)'
 
2176
         write(1,*)'Value returned by he5_swidtype ',status
 
2177
         write(1,*)'Datatype of local attribute ',dtype
 
2178
         write(1,*)'Class id and order ',classid, order
 
2179
         write(1,*)'Size of attribute ',size
 
2180
      endif
 
2181
      write(*,*)' '
 
2182
      write(1,*)' '
 
2183
 
 
2184
 
 
2185
c Test Case -- he5_swrdlattr
 
2186
c
 
2187
      write(1,27)
 
2188
      write(*,*)'Testing he5_swrdlattr, Local attribute '
 
2189
      write(*,*)'======================================'
 
2190
      write(1,*)'Testing he5_swrdlattr, Local attribute '
 
2191
      write(1,*)'======================================'
 
2192
 
 
2193
      status=he5_swrdlattr(swid2,'Sensor1','local',rdgnlattr)
 
2194
      if (status .lt. 0) then
 
2195
         write(*,230)
 
2196
         write(1,230)
 
2197
      else
 
2198
         write(*,*)'  '
 
2199
         write(*,240)
 
2200
         write(1,*)'  '
 
2201
         write(1,240)
 
2202
         write(*,*)'status=he5_swrdlattr(swid2,"Sensor1","local", 
 
2203
     1rdgnlattr)'
 
2204
         write(*,*)'Value returned by he5_swrdlattr ',status
 
2205
         write(*,*)'attribute ',rdgnlattr
 
2206
         write(1,*)'status=he5_swrdlattr(swid2,"Sensor1","local", 
 
2207
     1rdgnlattr)'
 
2208
         write(1,*)'Value returned by he5_swrdlattr ',status
 
2209
         write(1,*)'attribute ',rdgnlattr
 
2210
      endif
 
2211
      write(*,*)' '
 
2212
      write(1,*)' '
 
2213
 
 
2214
c Test Case -- he5_swgetfill
 
2215
c
 
2216
      write(1,27)
 
2217
      write(*,*)'Testing he5_swgetfill '
 
2218
      write(*,*)'====================='
 
2219
      write(1,*)'Testing he5_swgetfill '
 
2220
      write(1,*)'====================='
 
2221
      status= he5_swgetfill(swid,'Conduction', rdfilval)
 
2222
      if (status .lt. 0) then
 
2223
         write(*,230)
 
2224
         write(1,230)
 
2225
      else
 
2226
         write(*,*)'  '
 
2227
         write(*,240)
 
2228
         write(1,*)'  '
 
2229
         write(1,240)
 
2230
         write(*,*)'status=he5_swgetfill(swid,"Conduction",rdfilval)'
 
2231
         write(*,*)'Value returned by he5_swgetfill ',status
 
2232
         write(*,*)'Value of fill ',rdfilval
 
2233
         write(1,*)'status=he5_swgetfill(swid,"Conduction",rdfilval)'
 
2234
         write(1,*)'Value returned by he5_swgetfill ',status
 
2235
         write(1,*)'Value of fill ',rdfilval
 
2236
      endif
 
2237
      write(*,*)' '
 
2238
      write(1,*)' '
 
2239
 
 
2240
c Test Case -- he5_swdefboxreg
 
2241
c
 
2242
      write(1,27)
 
2243
      write(*,*)'Testing he5_swdefboxreg '
 
2244
      write(*,*)'======================='
 
2245
      write(1,*)'Testing he5_swdefboxreg '
 
2246
      write(1,*)'======================='
 
2247
 
 
2248
      regionid= he5_swdefboxreg(swid, cornerlon, cornerlat, 
 
2249
     1HE5_HDFE_ENDPOINT)
 
2250
      if (regionid .lt. 0) then
 
2251
         write(*,230)
 
2252
         write(1,230)
 
2253
      else
 
2254
         write(*,*)'  '
 
2255
         write(*,240)
 
2256
         write(1,*)'  '
 
2257
         write(1,240)
 
2258
         write(*,*)'regionid= he5_swdefboxreg(swid,cornerlon,
 
2259
     1cornerlat, HE5_HDFE_ENDPOINT)'
 
2260
         write(*,*)'Value returned by he5_swdefboxreg ',regionid
 
2261
         write(1,*)'regionid= he5_swdefboxreg(swid, cornerlon, 
 
2262
     1cornerlat, HE5_HDFE_ENDPOINT)'
 
2263
         write(1,*)'Value returned by he5_swdefboxreg ',regionid
 
2264
      endif
 
2265
      write(*,*)' '
 
2266
      write(1,*)' '
 
2267
 
 
2268
c Test Case -- he5_swregidx
 
2269
c
 
2270
      write(1,27)
 
2271
      write(*,*)'Testing he5_swregidx '
 
2272
      write(*,*)'===================='
 
2273
      write(1,*)'Testing he5_swregidx '
 
2274
      write(1,*)'===================='
 
2275
 
 
2276
      idxrange(1)=0
 
2277
      idxrange(2)=0
 
2278
      regionid3=he5_swregidx(swid,cornerlon,cornerlat, 
 
2279
     1HE5_HDFE_ENDPOINT,geodim,idxrange)
 
2280
      if (regionid3 .lt. 0) then
 
2281
         write(*,230)
 
2282
         write(1,230)
 
2283
      else
 
2284
         write(*,*)'  '
 
2285
         write(*,240)
 
2286
         write(1,*)'  '
 
2287
         write(1,240)
 
2288
         write(*,*)'regionid3=he5_swregidx(swid,cornerlon, 
 
2289
     1cornerlat,HE5_HDFE_ENDPOINT,geodim,idxrange)'
 
2290
         write(*,*)'Region ID returned by he5_swregdex ',regionid3
 
2291
         write(*,*)'Geodim of region ',geodim
 
2292
         write(*,*)'indicies of region ',idxrange(1),idxrange(2)
 
2293
         write(1,*)'regionid3=he5_swregidx(swid, cornerlon, 
 
2294
     1cornerlat, HE5_HDFE_ENDPOINT, geodim, idxrange)'
 
2295
         write(1,*)'Region ID returned by he5_swregdex ',regionid3
 
2296
         write(1,*)'Geodim of region ',geodim
 
2297
         write(1,*)'indicies of region ',idxrange(1),idxrange(2)
 
2298
      endif
 
2299
      write(*,*)' '
 
2300
      write(1,*)' '
 
2301
 
 
2302
 
 
2303
c Test Case -- he5_swdupreg
 
2304
c
 
2305
      write(1,27)
 
2306
      write(*,*)'Testing he5_swdupreg '
 
2307
      write(*,*)'====================='
 
2308
      write(1,*)'Testing he5_swdupreg '
 
2309
      write(1,*)'====================='
 
2310
 
 
2311
      regionid2= he5_swdupreg(regionid)
 
2312
      if (regionid2 .lt. 0) then
 
2313
         write(*,230)
 
2314
         write(1,230)
 
2315
      else
 
2316
         write(*,*)'  '
 
2317
         write(*,240)
 
2318
         write(1,*)'  '
 
2319
         write(1,240)
 
2320
         write(*,*)'Duplicate region id information '
 
2321
         write(*,*)'Region ID returned by he5_swdupreg ',regionid2
 
2322
         write(1,*)'Duplicate region id information '
 
2323
         write(1,*)'Region ID returned by he5_swdupreg ',regionid2
 
2324
         write(*,*)' '
 
2325
         write(1,*)' '
 
2326
      endif
 
2327
 
 
2328
c Test Case -- he5_swreginfo
 
2329
c
 
2330
      write(1,27)
 
2331
      write(*,*)'Testing he5_swreginfo '
 
2332
      write(*,*)'====================='
 
2333
      write(1,*)'Testing he5_swreginfo '
 
2334
      write(1,*)'====================='
 
2335
      status=he5_swreginfo(swid,regionid,'Temperature',nt,rank, 
 
2336
     1dims,size)      
 
2337
      if (status .lt. 0) then
 
2338
         write(*,230)
 
2339
         write(1,230)
 
2340
      else
 
2341
         write(*,*)'  '
 
2342
         write(*,240)
 
2343
         write(1,*)'  '
 
2344
         write(1,240)
 
2345
         write(*,*)'status=he5_swreginfo(swid,regionid,"Temperature", 
 
2346
     1nt, rank, dims, size)'
 
2347
         write(*,*)'Value returned by he5_swreginfo ',status
 
2348
         write(*,*)'Number type of region ',nt,' Rank of region ',rank
 
2349
         write(*,*)'Dimensions of region ',dims(1),' ',dims(2)
 
2350
         write(*,*)'Value of size ',size
 
2351
         write(1,*)'status=he5_swreginfo(swid,regionid,"Temperature", 
 
2352
     1nt, rank, dims, size)'
 
2353
         write(1,*)'Value returned by he5_swreginfo ',status
 
2354
         write(1,*)'Number type of region ',nt,' Rank of region ',rank
 
2355
         write(1,*)'Value of size ',size
 
2356
         write(1,*)'Dimensions of region ',dims(1),' ',dims(2)
 
2357
      endif
 
2358
      write(*,*)' '
 
2359
      write(1,*)' '
 
2360
 
 
2361
c Test Case -- he5_swextreg
 
2362
c
 
2363
      write(1,27)
 
2364
      write(*,*)'Testing he5_swextreg '
 
2365
      write(*,*)'====================='
 
2366
      write(1,*)'Testing he5_swextreg '
 
2367
      write(1,*)'====================='
 
2368
      status=he5_swextreg(swid,regionid,'Temperature', 
 
2369
     1HE5_HDFE_INTERNAL, tempbuf) 
 
2370
      if (status .lt. 0) then
 
2371
         write(*,230)
 
2372
         write(1,230)
 
2373
      else
 
2374
         write(*,*)'  '
 
2375
         write(*,240)
 
2376
         write(1,*)'  '
 
2377
         write(1,240)
 
2378
         write(*,*)'status = he5_swextreg(swid, regionid, 
 
2379
     1"Temperature", HE5_HDFE_INTERNAL, tempbuf)'
 
2380
         write(*,*)'Value returned by he5_swextreg ', status
 
2381
         write(1,*)'status = he5_swextreg(swid, regionid, 
 
2382
     1"Temperature", HE5_HDFE_INTERNAL,tempbuf)'
 
2383
         write(1,*)'Value returned by he5_swextreg ', status
 
2384
         do 210 index1=100,115
 
2385
            write(*,*)'region value at position ',tempbuf(index1)
 
2386
            write(1,*)'region value at position ',tempbuf(index1)
 
2387
  210    continue
 
2388
      endif
 
2389
 
 
2390
      write(*,*)' '
 
2391
      write(1,*)' '
 
2392
 
 
2393
c Test Case -- he5_swdeftmeper
 
2394
c
 
2395
      write(1,27)
 
2396
      write(*,*)'Testing he5_swdeftmeper '
 
2397
      write(*,*)'====================='
 
2398
      write(1,*)'Testing he5_swdeftmeper '
 
2399
      write(1,*)'====================='
 
2400
      regionid = he5_swdeftmeper(swid, starttime, endtime, 
 
2401
     1HE5_HDFE_ENDPOINT)
 
2402
      if (regionid .lt. 0) then
 
2403
         write(*,230)
 
2404
         write(1,230)
 
2405
      else
 
2406
         write(*,*)'  '
 
2407
         write(*,240)
 
2408
         write(1,*)'  '
 
2409
         write(1,240)
 
2410
         write(*,*)'regionid= he5_swdeftmeper(swid, starttime, 
 
2411
     1endtime, HE5_HDFE_ENDPOINT)'
 
2412
         write(*,*)'Value returned by he5_swdeftmeper ',regionid
 
2413
         write(1,*)'regionid= he5_swdeftmeper(swid, starttime, 
 
2414
     1endtime, HE5_HDFE_ENDPOINT)'
 
2415
         write(1,*)'Value returned by he5_swdeftmeper ',regionid
 
2416
      endif
 
2417
      write(*,*)' '
 
2418
      write(1,*)' '
 
2419
 
 
2420
c Test Case -- he5_swperinfo
 
2421
c
 
2422
      write(1,27)
 
2423
      write(*,*)'Testing he5_swperinfo '
 
2424
      write(*,*)'====================='
 
2425
      write(1,*)'Testing he5_swperinfo '
 
2426
      write(1,*)'====================='
 
2427
      status = he5_swperinfo(swid,regionid,'Temperature',nt,rank,
 
2428
     1dims,size)
 
2429
      if (status .lt. 0) then
 
2430
         write(*,230)
 
2431
         write(1,230)
 
2432
      else
 
2433
         write(*,*)'  '
 
2434
         write(*,240)
 
2435
         write(1,*)'  '
 
2436
         write(1,240)
 
2437
         write(*,*)'status = he5_swperinfo(swid, regionid,
 
2438
     1"Temperature",nt, rank, dims, size)'
 
2439
         write(*,*)'Value returned by he5_swperinfo ',status
 
2440
         write(*,*)'Rank of field ',rank,' Number type of region ',nt
 
2441
         write(*,*)'Dimensions of region ',dims(1),' ',dims(2)
 
2442
         write(*,*)'Value of size ',size
 
2443
         write(1,*)'status = he5_swperinfo(swid, regionid,
 
2444
     1"Temperature",nt, rank, dims, size)'
 
2445
         write(1,*)'Value returned by he5_swperinfo ',status
 
2446
         write(1,*)'Rank of field ',rank,' Number type of region ',nt
 
2447
         write(1,*)'Dimensions of region ',dims(1),' ',dims(2)
 
2448
         write(1,*)'Value of size ',size
 
2449
      endif
 
2450
      write(*,*)' '
 
2451
      write(1,*)' '
 
2452
 
 
2453
c Test Case -- he5_swextper
 
2454
c
 
2455
      write(1,27)
 
2456
      write(*,*)'Testing he5_swextper '
 
2457
      write(*,*)'===================='
 
2458
      write(1,*)'Testing he5_swextper '
 
2459
      write(1,*)'===================='
 
2460
      status= he5_swextper(swid,regionid,'Temperature', 
 
2461
     1HE5_HDFE_INTERNAL,tempbuf)
 
2462
      if (status .lt. 0) then
 
2463
         write(*,230)
 
2464
         write(1,230)
 
2465
      else
 
2466
         write(*,*)'  '
 
2467
         write(*,240)
 
2468
         write(1,*)'  '
 
2469
         write(1,240)
 
2470
         write(*,*)'status= he5_swextper(swid, regionid, 
 
2471
     1"Temperature", HE5_HDFE_INTERNAL, tempbuf)'
 
2472
         write(*,*)'Value returned by he5_swextper swath ',status
 
2473
         write(1,*)'status= he5_swextper(swid, regionid, 
 
2474
     1"Temperature", HE5_HDFE_INTERNAL, tempbuf) '
 
2475
         write(1,*)'Value returned by he5_swextper swath ',status
 
2476
         do 220 index1=1000,1015
 
2477
            write(*,*)'region value at position ',tempbuf(index1)
 
2478
            write(1,*)'region value at position ',tempbuf(index1)
 
2479
  220    continue
 
2480
      endif
 
2481
      write(*,*)' '
 
2482
      write(1,*)' '
 
2483
 
 
2484
c Test Case -- he5_swupimap
 
2485
c
 
2486
      write(1,27)
 
2487
      write(*,*)'Testing he5_swupimap '
 
2488
      write(*,*)'====================='
 
2489
      write(1,*)'Testing he5_swupimap '
 
2490
      write(1,*)'====================='
 
2491
      idxsz=he5_swupimap(swid2,regionid,idxmap,upidxmap,ndxmap)
 
2492
      if (idxsz .lt. 0) then
 
2493
         write(*,230)
 
2494
         write(1,230)
 
2495
      else
 
2496
         write(*,*)'  '
 
2497
         write(*,240)
 
2498
         write(1,*)'  '
 
2499
         write(1,240)
 
2500
         write(*,*)'Size of index array in region ',idxsz
 
2501
         write(1,*)'Size of index array in region ',idxsz
 
2502
         write(*,*)'Indicies of updated index ',ndxmap(1),ndxmap(2)
 
2503
         write(1,*)'Indicies of updated index ',ndxmap(1),ndxmap(2)
 
2504
         do 380 index1=1,idxsz
 
2505
            write(*,*)' Value of index array ',upidxmap(index1)
 
2506
            write(1,*)' Value of index array ',upidxmap(index1)
 
2507
  380    continue
 
2508
      endif
 
2509
 
 
2510
 
 
2511
 
 
2512
c Test Case -- he5_swcompinfo
 
2513
c
 
2514
      write(1,27)
 
2515
      write(*,*)'Testing he5_swcompinfo '
 
2516
      write(*,*)'======================='
 
2517
      write(1,*)'Testing he5_swcompinfo '
 
2518
      write(1,*)'======================='
 
2519
      status=he5_swcompinfo(swid,'CompChunk',compcode,rdcompparm)
 
2520
      if (status .lt. 0) then
 
2521
         write(*,230)
 
2522
         write(1,230)
 
2523
      else
 
2524
         write(*,*)'  '
 
2525
         write(*,240)
 
2526
         write(1,*)'  '
 
2527
         write(1,240)
 
2528
         write(*,*)'status=he5_swcompinfo(swid,"CompChunk",compcode, 
 
2529
     1rdcompparm)'
 
2530
         write(*,*)'Status returned by he5_swcompinfo ',status
 
2531
         write(*,*)'Compression code ',compcode
 
2532
         write(*,*)'Compression parameter ',rdcompparm(1)
 
2533
         write(1,*)'status=he5_swcompinfo(swid,"CompChunk",compcode, 
 
2534
     1rdcompparm)'
 
2535
         write(1,*)'Status returned by he5_swcompinfo ',status
 
2536
         write(1,*)'Compression code ',compcode
 
2537
         write(1,*)'Compression parameter ',rdcompparm(1)
 
2538
      endif
 
2539
      write(*,*)' '
 
2540
      write(1,*)' '
 
2541
 
 
2542
 
 
2543
 
 
2544
      status= he5_swdetach(swid)
 
2545
      if (status .lt. 0) then
 
2546
         write(*,230)
 
2547
         write(1,230)
 
2548
      else
 
2549
         write(*,*)'  '
 
2550
         write(*,240)
 
2551
         write(1,*)'  '
 
2552
         write(1,240)
 
2553
         write(*,*)'status= he5_swdetach(swid)'
 
2554
         write(*,*)'Value returned by he5_swdetach ',status
 
2555
         write(1,*)'status= he5_swdetach(swid)'
 
2556
         write(1,*)'Value returned by he5_swdetach ',status
 
2557
      endif
 
2558
      write(*,*)' '
 
2559
      write(1,*)' '
 
2560
 
 
2561
      status= he5_swdetach(swid2)
 
2562
      if (status .lt. 0) then
 
2563
         write(*,230)
 
2564
         write(1,230)         
 
2565
      else
 
2566
         write(*,*)'  '
 
2567
         write(*,240)
 
2568
         write(1,*)'  '
 
2569
         write(1,240)
 
2570
         write(*,*)'status= he5_swdetach(swid2)'
 
2571
         write(*,*)'Value returned by he5_swdetach ',status
 
2572
         write(1,*)'status= he5_swdetach(swid2)'
 
2573
         write(1,*)'Value returned by he5_swdetach ',status
 
2574
      endif
 
2575
      write(*,*)' '
 
2576
      write(1,*)' '
 
2577
 
 
2578
      status= he5_swclose(swfid)
 
2579
      if (status .lt. 0) then
 
2580
         write(*,230)
 
2581
         write(1,230)
 
2582
      else
 
2583
         write(*,*)'  '
 
2584
         write(*,240)
 
2585
         write(1,*)'  '
 
2586
         write(1,240)
 
2587
         write(*,*)'status= he5_swclose(swfid)'
 
2588
         write(*,*)'Value returned by he5_swclose ',status
 
2589
         write(1,*)'status= he5_swclose(swfid)'
 
2590
         write(1,*)'Value returned by he5_swclose ',status
 
2591
      endif
 
2592
      write(*,*)' '
 
2593
      write(1,*)' '
 
2594
 
 
2595
 
 
2596
      swfid=he5_swopen('swath.he5',HE5F_ACC_RDWR)
 
2597
      if (swfid .lt. 0) then
 
2598
         write(*,230)
 
2599
         write(1,230)
 
2600
      else
 
2601
         write(*,*)'  '
 
2602
         write(*,240)
 
2603
         write(1,*)'  '
 
2604
         write(1,240)
 
2605
         write(*,*)'swfid=he5_swopen("swath.he5",HE5F_ACC_RDWR)'
 
2606
         write(*,*)'Value returned by he5_swopen ',swfid
 
2607
         write(1,*)'swfid=he5_swopen("swath.he5",HE5F_ACC_RDWR)'
 
2608
         write(1,*)'Value returned by he5_swopen ',swfid
 
2609
      endif
 
2610
      write(*,*)' '
 
2611
      write(1,*)' '
 
2612
 
 
2613
 
 
2614
c Test Case -- he5_swinqswath
 
2615
c
 
2616
      write(1,27)
 
2617
      write(*,*)'Testing he5_swinqswath '
 
2618
      write(*,*)'======================'
 
2619
      write(1,*)'Testing he5_swinqswath '
 
2620
      write(1,*)'======================'
 
2621
 
 
2622
      nswath=he5_swinqswath('swath.he5',swathlist,strbufsz2)
 
2623
      if (nswath .lt. 0) then
 
2624
         write(*,230)
 
2625
         write(1,230)
 
2626
      else
 
2627
         write(*,*)'  '
 
2628
         write(*,240)
 
2629
         write(1,*)'  '
 
2630
         write(1,240)
 
2631
         write(*,*)'Retrieve information on swaths in 
 
2632
     1file swath.he5'
 
2633
         write(*,*)'Number of swaths in file ', nswath
 
2634
         write(*,*)'List of swaths ',swathlist
 
2635
         write(1,*)'Retrieve information on swaths in 
 
2636
     1file swath.he5'
 
2637
         write(1,*)'Number of swaths in file ', nswath
 
2638
         write(1,*)'List of swaths ',swathlist
 
2639
      endif
 
2640
      write(*,*)' '
 
2641
      write(1,*)' '
 
2642
 
 
2643
      status=he5_swclose(swfid)
 
2644
      if (status .lt. 0) then
 
2645
         write(*,230)
 
2646
         write(1,230)       
 
2647
      else
 
2648
         write(*,*)'  '
 
2649
         write(*,240)
 
2650
         write(1,*)'  '
 
2651
         write(1,240)
 
2652
         write(*,*)'status= he5_swclose(swfid)'
 
2653
         write(*,*)'Value returned by he5_swclose ',status
 
2654
         write(1,*)'status= he5_swclose(swfid)'
 
2655
         write(1,*)'Value returned by he5_swclose ',status
 
2656
      endif
 
2657
      write(*,*)' '
 
2658
      write(1,*)' '
 
2659
 
 
2660
      close(unit=1)
 
2661
   27 format(' ')
 
2662
      stop
 
2663
      end
 
2664
 
 
2665
 
 
2666
 
 
2667
 
 
2668
 
 
2669
 
 
2670
 
 
2671
 
 
2672
 
 
2673
 
 
2674
 
 
2675