1
c----------------------------------------------------------------------------
2
c Copyright (C) 2000 Emergent IT Inc. and Raytheon Systems Company |
3
c----------------------------------------------------------------------------
5
c In this program we create, define and write a simple swath hdfeos file |
6
c using the swath interface |
7
c----------------------------------------------------------------------------
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
37
integer he5_swdefboxreg, he5_swdeftmeper, he5_swdupreg
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
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)
65
real*8 cornerlon(2),cornerlat(2)
66
real*8 twodtime(40,50)
69
real*8 tmcnt, starttime, endtime
71
character*(256) geodim
72
character*(256) idxdimmap
73
character*(256) dimmap, dimname, fieldlist
74
character*(256) attrlist, swathlist
75
character*(256) dimens, maxdims
99
starttime = 46353450.0d0
100
endtime = 46500000.0d0
101
range(1) = 46353450.0d0
102
range(2) = 46500000.0d0
187
c This section of the program just fills some arrays with data that will be
188
c used later in the program
192
ray1(index1, index2)=raycnt
193
ray2(index2, index1)=raycnt + 1.0
194
ray4(index2,index1) = raycnt
201
lat(index1, index2)=latcnt
202
lon(index1, index2)=loncnt
203
twodtime(index1,index2)=tmcnt
207
onedtime(index1)=tmcnt
214
idxlat(index1, index2)=idxlatcnt
215
idxlon(index1, index2)=idxloncnt
216
idxloncnt=idxloncnt-.1
218
idxlatcnt=idxlatcnt-.1
225
ray3(index1, index2)=raycnt
232
upidxmap(index1)=zero
235
230 format('********Error unexpected**********')
236
240 format('***********Passed Test*********')
238
open(unit=1, file="testswath.txt", status = "UNKNOWN")
240
write(*,*)'Testing he5_swath FORTRAN 77 interface'
241
write(*,*)'======================================'
242
write(1,*)'Testing he5_swath FORTRAN 77 interface'
243
write(1,*)'======================================'
247
c Test Case -- he5_swopen
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
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
271
c Test Case -- he5_swcreate
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
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
296
swid2=he5_swcreate(swfid,'Indexedf')
297
if (swid2 .lt. 0) then
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
315
c Test Case -- he5_swdefdim
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
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
339
status=he5_swdefdim(swid,'DataXtrack',dim2)
340
if (status .lt. 0) then
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
356
status=he5_swdefdim(swid,'GeoTrack',dim3)
357
if (status .lt. 0) then
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
373
status=he5_swdefdim(swid,'GeoXtrack',dim2)
374
if (status .lt. 0) then
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
390
status=he5_swdefdim(swid2,'DataTrack',dim2)
391
if (status .lt. 0) then
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
407
status=he5_swdefdim(swid2,'DataXtrack',dim2)
408
if (status .lt. 0) then
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
424
status=he5_swdefdim(swid2,'GeoTrack',dim1)
425
if (status .lt. 0) then
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
441
status=he5_swdefdim(swid2,'GeoXtrack',dim1)
442
if (status .lt. 0) then
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
458
status=he5_swdefdim(swid2,'Timedim',dim2)
459
if (status .lt. 0) then
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
476
c Test Case -- he5_swdefgfld
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
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
504
status=he5_swdefgfld(swid,'Longitude','GeoXtrack,GeoTrack',
505
1' ',HE5T_NATIVE_FLOAT, 0)
506
if (status .lt. 0) then
515
write(*,*)'Value returned by he5_swdefgfld ',status
516
write(1,*)'Value returned by he5_swdefgfld ',status
521
status=he5_swdefgfld(swid2,'Latitude','GeoXtrack,GeoTrack',
522
1' ',HE5T_NATIVE_FLOAT, 0)
523
if (status .lt. 0) then
532
write(*,*)'Value returned by he5_swdefgfld ', status
533
write(1,*)'Value returned by he5_swdefgfld ', status
538
status=he5_swdefgfld(swid2,'Longitude','GeoXtrack,GeoTrack',
539
1' ',HE5T_NATIVE_FLOAT, 0)
540
if (status .lt. 0) then
549
write(*,*)'Value returned by he5_swdefgfld ', status
550
write(1,*)'Value returned by he5_swdefgfld ', status
555
status=he5_swdefgfld(swid2,'Time','Timedim',' ',
556
1HE5T_NATIVE_DOUBLE, 0)
557
if (status .lt. 0) then
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
574
status=he5_swdefgfld(swid,'Time','GeoXtrack,GeoTrack',
575
1' ', HE5T_NATIVE_DOUBLE, 0)
576
if (status .lt. 0) then
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
595
c Test Case -- he5_swdefdfld
598
write(*,*)'Testing he5_swdefdfld '
599
write(*,*)'====================='
600
write(1,*)'Testing he5_swdefdfld '
601
write(1,*)'====================='
603
status=he5_swdefdfld(swid,'SideA','DataXtrack,DataTrack',
604
1' ', HE5T_NATIVE_FLOAT, 0)
605
if (status .lt. 0) then
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
622
c Test Case -- he5_swsetfill
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
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
649
status=he5_swdefdfld(swid,'Temperature',
650
1'DataXtrack,DataTrack',' ',HE5T_NATIVE_FLOAT, 0)
651
if (status .lt. 0) then
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
667
status= he5_swsetfill(swid,'Conduction',
668
1HE5T_NATIVE_FLOAT,fillvalue)
669
if (status .lt. 0) then
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
687
status=he5_swdefdfld(swid,'Conduction',
688
1'DataXtrack,DataTrack',' ',HE5T_NATIVE_FLOAT,0)
689
if (status .lt. 0) then
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
707
status=he5_swdefdfld(swid2,'Sensor1',
708
1'DataXtrack,DataTrack',' ',HE5T_NATIVE_FLOAT, 0)
709
if (status .lt. 0) then
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
727
c Test Case -- he5_swdefchunk
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
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
751
c Test Case -- he5_swdefcomp
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
767
write(*,*)'status= he5_swdefcomp(swid,HE5_HDFE_COMP_DEFLATE,
769
write(*,*)'Value returned by he5_swdefcomp ',status
770
write(1,*)'status= he5_swdefcomp(swid,HE5_HDFE_COMP_DEFLATE,
772
write(1,*)'Value returned by he5_swdefcomp ',status
778
status=he5_swdefdfld(swid,'CompChunk','GeoTrack',
779
1' ',HE5T_NATIVE_FLOAT, 0)
780
if (status .lt. 0) then
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
796
c Test Case -- he5_swdetach
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
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
820
status=he5_swdetach(swid2)
821
if (status .lt. 0) then
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
837
swid=he5_swattach(swfid,'Simplef')
838
if (swid .lt. 0) then
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
854
swid2=he5_swattach(swfid,'Indexedf')
855
if (swid2 .lt. 0) then
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
871
c Test Case -- he5_swdefmap
874
write(*,*)'Testing he5_swdefmap '
875
write(*,*)'====================='
876
write(1,*)'Testing he5_swdefmap '
877
write(1,*)'====================='
881
status=he5_swdefmap(swid,'GeoTrack','DataTrack',offset,inc)
882
if (status .lt. 0) then
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
900
c Test Case -- he5_swdefimap
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
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
926
status=he5_swdefimap(swid2,'GeoXtrack','DataXtrack',
928
if (status .lt. 0) then
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
947
c Test Case -- he5_swdetach
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
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
971
status= he5_swdetach(swid2)
972
if (status .lt. 0) then
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
988
status=he5_swclose(swfid)
989
if (status .lt. 0) then
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
1006
swfid=he5_swopen('swath.he5',HE5F_ACC_RDWR)
1007
if (swfid .lt. 0) then
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
1024
c Test Case -- he5_swattach
1027
write(*,*)'Testing he5_swattach '
1028
write(*,*)'====================='
1029
write(1,*)'Testing he5_swattach '
1030
write(1,*)'====================='
1032
swid=he5_swattach(swfid,'Simplef')
1033
if (swid .lt. 0) then
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
1049
swid2=he5_swattach(swfid,'Indexedf')
1050
if (swid2 .lt. 0) then
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
1066
c Test Case -- he5_swwrfld
1069
write(*,*)'Testing he5_swwrfld '
1070
write(*,*)'==================='
1071
write(1,*)'Testing he5_swwrfld '
1072
write(1,*)'==================='
1074
status=he5_swwrfld(swid,'SideA',sd_start,stride,
1076
if (status .lt. 0) then
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
1092
status=he5_swwrfld(swid,'Temperature',start,stride,
1094
if (status .lt. 0) then
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
1112
status=he5_swwrfld(swid,'Conduction',start,stride,
1114
if (status .lt. 0) then
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
1132
status=he5_swwrfld(swid,'Latitude',geostart,stride,
1134
if (status .lt. 0) then
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
1152
status=he5_swwrfld(swid,'Longitude',geostart,stride,
1154
if (status .lt. 0) then
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
1172
status=he5_swwrfld(swid,'Time',geostart,stride,geoedge,
1174
if (status .lt. 0) then
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
1192
status=he5_swwrfld(swid2,'Latitude',istart,stride,
1194
if (status .lt. 0) then
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
1212
status=he5_swwrfld(swid2,'Longitude',istart,stride,
1214
if (status .lt. 0) then
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
1232
status=he5_swwrfld(swid2,'Time',tstart,tstride,
1234
if (status .lt. 0) then
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
1252
status=he5_swwrfld(swid2,'Sensor1',istart,stride,
1254
if (status .lt. 0) then
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
1272
c Test Case -- he5_swwrlattr
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
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
1300
c Test Case -- he5_swwrattr
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,
1311
if (status .lt. 0) then
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
1329
c Test Case -- he5_swwrgattr
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,
1340
if (status .lt. 0) then
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
1358
status= he5_swdetach(swid)
1359
if (status .lt. 0) then
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
1375
status= he5_swdetach(swid2)
1376
if (status .lt. 0) then
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
1394
c Test Case -- he5_swclose
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
1410
write(*,*)'Value returned by he5_swclose ',status
1411
write(1,*)'status= he5_swclose(swfid)'
1412
write(1,*)'Value returned by he5_swclose ',status
1418
swfid= he5_swopen('swath.he5',HE5F_ACC_RDWR)
1419
if (swfid .lt. 0) then
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
1435
swid= he5_swattach(swfid,'Simplef')
1436
if (swid .lt. 0) then
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
1452
status= he5_swdetach(swid)
1453
if (status .lt. 0) then
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
1469
status= he5_swclose(swfid)
1470
if (status .lt. 0) then
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
1487
swfid= he5_swopen('swath.he5',HE5F_ACC_RDWR)
1488
if (swfid .lt. 0) then
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
1504
swid=he5_swattach(swfid,'Simplef')
1505
if (swid .lt. 0) then
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
1521
swid2=he5_swattach(swfid,'Indexedf')
1522
if (swid2 .lt. 0) then
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
1538
c Test Case -- he5_swdefvrtreg
1541
write(*,*)'Testing he5_swdefvrtreg'
1542
write(*,*)'======================='
1543
write(1,*)'Testing he5_swdefvrtreg'
1544
write(1,*)'======================='
1546
regionid=he5_swdefvrtreg(swid2,HE5_HDFE_NOPREVSUB,'Time',range)
1547
if (regionid .lt. 0) then
1555
write(*,*)'Define region id for field Time '
1556
write(*,*)'Region id returned by he5_swdefvrtreg ',
1558
write(1,*)'Define region id for field Time '
1559
write(1,*)'Region id returned by he5_swdefvrtreg ',
1565
c Test Case -- he5_swnentries
1568
write(*,*)'Testing he5_swnentries '
1569
write(*,*)'====================='
1570
write(1,*)'Testing he5_swnentries '
1571
write(1,*)'====================='
1573
nmaps=he5_swnentries(swid,1,strbufsize)
1574
if (nmaps .lt. 0) then
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
1592
c Test Case -- he5_swinqmaps
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
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
1620
c Test Case -- he5_swgmapinfo
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
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
1644
c Test Case -- he5_swinqimaps
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
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
1672
c Test Case -- he5_swinqdims
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
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
1700
ndims= he5_swinqdims(swid2, dimname, dims)
1701
if (ndims .lt. 0) then
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
1721
c Test Case -- he5_swinqgflds
1724
write(*,*)'Testing he5_swinqgflds '
1725
write(*,*)'======================'
1726
write(1,*)'Testing he5_swinqgflds '
1727
write(1,*)'======================'
1729
nflds= he5_swinqgflds(swid,fieldlist,rnk,ntype)
1730
if (nflds .lt. 0) then
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
1752
c Test Case -- he5_swinqdflds
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
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
1782
c Test Case -- he5_swdiminfo
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
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
1806
c Test Case -- he5_swrdfld
1809
write(*,*)'Testing he5_swrdfld '
1810
write(*,*)'==================='
1811
write(1,*)'Testing he5_swrdfld '
1812
write(1,*)'==================='
1820
status= he5_swrdfld(swid,'Conduction',rd_start,
1821
1rd_stride,rd_edge,temp)
1822
if (status .lt. 0) then
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
1838
write(*,*)'value of conduction ',temp(index1,index2)
1839
write(1,*)'value of conduction ',temp(index1,index2)
1847
c Test Case -- he5_swfldinfo
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,
1856
if (status .lt. 0) then
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
1882
c Test Case -- he5_swmapinfo
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
1898
write(*,*)'status=he5_swmapinfo(swid,"GeoTrack","DataTrack",
1900
write(*,*)'Value returned by he5_swmapinfo ',status
1901
write(*,*)'Offset ',offset,' Increment ',inc
1902
write(1,*)'status=he5_swmapinfo(swid,"GeoTrack","DataTrack",
1904
write(1,*)'Value returned by he5_swmapinfo ',status
1905
write(1,*)'Offset ',offset,' Increment ',inc
1910
c Test Case -- he5_swimapinfo
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
1926
write(*,*)'status4= he5_swimapinfo(swid2,"GeoXtrack",
1927
1"DataXtrack", idxmap)'
1928
write(*,*)'Value returned by he5_swimapinfo ',status4
1930
write(*,*)' Value of index array ',idxmap(index1)
1931
write(1,*)' Value of index array ',idxmap(index1)
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
1941
c Test Case -- he5_swinqattrs
1944
write(*,*)'Testing he5_swinqattrs Global attributes '
1945
write(*,*)'==================================== '
1946
write(1,*)'Testing he5_swinqattrs Global attributes '
1947
write(1,*)'==================================== '
1949
nattr = he5_swinqattrs(swid,attrlist,strbufsz2)
1950
if (nattr .lt. 0) then
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
1966
c Test Case -- he5_swattrinfo
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
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
1992
c Test Case -- he5_swrdattr
1995
write(*,*)'Testing he5_swrdattr, Global attribute '
1996
write(*,*)'======================================'
1997
write(1,*)'Testing he5_swrdattr, Global attribute '
1998
write(1,*)'======================================'
2000
status= he5_swrdattr(swid, attrlist, rdattr)
2001
if (status .lt. 0) then
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
2019
c Test Case -- he5_swinqgattrs
2022
write(*,*)'Testing he5_swinqgattrs Group attributes '
2023
write(*,*)'==================================== '
2024
write(1,*)'Testing he5_swinqgattrs Group attributes '
2025
write(1,*)'==================================== '
2027
nattr = he5_swinqgattrs(swid,attrlist,strbufsz2)
2028
if (nattr .lt. 0) then
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
2044
c Test Case -- he5_swgattrinfo
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
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
2070
c Test Case -- he5_swrdgattr
2073
write(*,*)'Testing he5_swrdgattr, Group attribute '
2074
write(*,*)'======================================'
2075
write(1,*)'Testing he5_swrdgattr, Group attribute '
2076
write(1,*)'======================================'
2078
status= he5_swrdgattr(swid,'group',rdgnlattr)
2079
if (status .lt. 0) then
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
2097
c Test Case -- he5_swinqlattrs
2100
write(*,*)'Testing he5_swinqlattrs Local attributes '
2101
write(*,*)'==================================== '
2102
write(1,*)'Testing he5_swinqlattrs Local attributes '
2103
write(1,*)'==================================== '
2105
nattr=he5_swinqlattrs(swid2,'Sensor1',attrlist,strbufsz2)
2106
if (nattr .lt. 0) then
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
2124
c Test Case -- he5_swlattrinfo
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
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
2150
c Test Case -- he5_swidtype
2153
write(*,*)'Testing he5_swidtype, Inquire Datatype '
2154
write(*,*)'======================================='
2155
write(1,*)'Testing he5_swidtype, Inquire Datatype '
2156
write(1,*)'======================================='
2158
status= he5_swidtype(swid2,'Sensor1','local',
2159
1HE5_HDFE_LOCATTRGROUP,dtype,classid, order, size)
2160
if (status .lt. 0) then
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
2185
c Test Case -- he5_swrdlattr
2188
write(*,*)'Testing he5_swrdlattr, Local attribute '
2189
write(*,*)'======================================'
2190
write(1,*)'Testing he5_swrdlattr, Local attribute '
2191
write(1,*)'======================================'
2193
status=he5_swrdlattr(swid2,'Sensor1','local',rdgnlattr)
2194
if (status .lt. 0) then
2202
write(*,*)'status=he5_swrdlattr(swid2,"Sensor1","local",
2204
write(*,*)'Value returned by he5_swrdlattr ',status
2205
write(*,*)'attribute ',rdgnlattr
2206
write(1,*)'status=he5_swrdlattr(swid2,"Sensor1","local",
2208
write(1,*)'Value returned by he5_swrdlattr ',status
2209
write(1,*)'attribute ',rdgnlattr
2214
c Test Case -- he5_swgetfill
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
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
2240
c Test Case -- he5_swdefboxreg
2243
write(*,*)'Testing he5_swdefboxreg '
2244
write(*,*)'======================='
2245
write(1,*)'Testing he5_swdefboxreg '
2246
write(1,*)'======================='
2248
regionid= he5_swdefboxreg(swid, cornerlon, cornerlat,
2250
if (regionid .lt. 0) then
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
2268
c Test Case -- he5_swregidx
2271
write(*,*)'Testing he5_swregidx '
2272
write(*,*)'===================='
2273
write(1,*)'Testing he5_swregidx '
2274
write(1,*)'===================='
2278
regionid3=he5_swregidx(swid,cornerlon,cornerlat,
2279
1HE5_HDFE_ENDPOINT,geodim,idxrange)
2280
if (regionid3 .lt. 0) then
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)
2303
c Test Case -- he5_swdupreg
2306
write(*,*)'Testing he5_swdupreg '
2307
write(*,*)'====================='
2308
write(1,*)'Testing he5_swdupreg '
2309
write(1,*)'====================='
2311
regionid2= he5_swdupreg(regionid)
2312
if (regionid2 .lt. 0) then
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
2328
c Test Case -- he5_swreginfo
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,
2337
if (status .lt. 0) then
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)
2361
c Test Case -- he5_swextreg
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
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)
2393
c Test Case -- he5_swdeftmeper
2396
write(*,*)'Testing he5_swdeftmeper '
2397
write(*,*)'====================='
2398
write(1,*)'Testing he5_swdeftmeper '
2399
write(1,*)'====================='
2400
regionid = he5_swdeftmeper(swid, starttime, endtime,
2402
if (regionid .lt. 0) then
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
2420
c Test Case -- he5_swperinfo
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,
2429
if (status .lt. 0) then
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
2453
c Test Case -- he5_swextper
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
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)
2484
c Test Case -- he5_swupimap
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
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)
2512
c Test Case -- he5_swcompinfo
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
2528
write(*,*)'status=he5_swcompinfo(swid,"CompChunk",compcode,
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,
2535
write(1,*)'Status returned by he5_swcompinfo ',status
2536
write(1,*)'Compression code ',compcode
2537
write(1,*)'Compression parameter ',rdcompparm(1)
2544
status= he5_swdetach(swid)
2545
if (status .lt. 0) then
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
2561
status= he5_swdetach(swid2)
2562
if (status .lt. 0) then
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
2578
status= he5_swclose(swfid)
2579
if (status .lt. 0) then
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
2596
swfid=he5_swopen('swath.he5',HE5F_ACC_RDWR)
2597
if (swfid .lt. 0) then
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
2614
c Test Case -- he5_swinqswath
2617
write(*,*)'Testing he5_swinqswath '
2618
write(*,*)'======================'
2619
write(1,*)'Testing he5_swinqswath '
2620
write(1,*)'======================'
2622
nswath=he5_swinqswath('swath.he5',swathlist,strbufsz2)
2623
if (nswath .lt. 0) then
2631
write(*,*)'Retrieve information on swaths in
2633
write(*,*)'Number of swaths in file ', nswath
2634
write(*,*)'List of swaths ',swathlist
2635
write(1,*)'Retrieve information on swaths in
2637
write(1,*)'Number of swaths in file ', nswath
2638
write(1,*)'List of swaths ',swathlist
2643
status=he5_swclose(swfid)
2644
if (status .lt. 0) then
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