File: he5_za_definefieldsF_32.f

package info (click to toggle)
hdf-eos5 2%3A2.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,692 kB
  • sloc: ansic: 92,051; fortran: 31,463; sh: 11,395; makefile: 492
file content (93 lines) | stat: -rwxr-xr-x 2,830 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
!     In this program we (1) open the "za.he5" HDF-EOS file, 
!     (2) attach to the "ZA1" za, and (3) define the za fields
!     ========================================================

      program     he5_za_definefieldsF_32

      implicit    none

      include     'hdfeos5.inc'

      integer     status
      integer     he5_zaopen
      integer     he5_zaattach
      integer     he5_zadefine
      integer     he5_zadefchunk
      integer     he5_zadefcomp
      integer     he5_zadetach
      integer     he5_zaclose
      integer     zafid, zaid

      integer     chunkrank
      integer*4   chunkdims(3)
      integer     compparm(1)

      integer     FAIL
      parameter   (FAIL=-1)

!     Open the HDF-EOS file, "za.he5" using "READ/WRITE" access code
!     --------------------------------------------------------------
      zafid = he5_zaopen("za.he5",HE5F_ACC_RDWR)
      write(*,*) 'File ID returned by he5_zaopen():  ',zafid 
      if (zafid .NE. FAIL) then

         zaid = he5_zaattach(zafid, "ZA1")
         write(*,*) 'ZA ID  returned by he5_zaattach():  ',zaid 
         if (zaid .NE. FAIL) then
            
!     Define Data fields
!     ------------------
            
            status = he5_zadefine(zaid, "Density", 
     1           "MyTrack1"," ", HE5T_NATIVE_FLOAT)
            write(*,*) 'Status returned by he5_zadefine():  ',status 

            status = he5_zadefine(zaid, "Temperature",
     1           "MyTrack2,MyTrack1",
     2           " ", HE5T_NATIVE_FLOAT)	      
            write(*,*) 'Status returned by he5_zadefine():  ',status 
	      
            status = he5_zadefine(zaid, "Pressure", 
     1           "Res2xtr,Res2tr",
     2           " ", HE5T_NATIVE_FLOAT)
            write(*,*) 'Status returned by he5_zadefine():  ',status 
	      
                chunkrank = 3
                chunkdims(1) = 20
                chunkdims(2) = 40
                chunkdims(3) = 15
                compparm(1) = 6
 
            status = he5_zadefchunk(zaid,chunkrank,chunkdims)
            write(*,*) 'Status returned by he5_zadefchunk(): ',status
 
            status = he5_zadefcomp(zaid,HE5_HDFE_COMP_DEFLATE,compparm)
            write(*,*) 'Status returned by he5_zadefcomp():  ',status

            status = he5_zadefine(zaid, "Spectra", 
     1           "Res2xtr,Res2tr,Bands",
     2           " ", HE5T_NATIVE_DOUBLE)	      
            write(*,*) 'Status returned by he5_zadefine():  ',status 



         endif
      endif
      
!     Detach from the za
!     ------------------      
      status = he5_zadetach(zaid)
      write(*,*) 'Status returned by he5_zadetach():  ',status 
      
!     Close the file
!     --------------      
      status = he5_zaclose(zafid)
      write(*,*) 'Status returned by he5_zaclose():  ',status 

      stop
      end