File: setuppoint.f

package info (click to toggle)
hdf-eos4 3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,960 kB
  • sloc: ansic: 43,570; sh: 11,324; fortran: 9,649; makefile: 261
file content (49 lines) | stat: -rw-r--r-- 1,400 bytes parent folder | download | duplicates (3)
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
c
c  In this example we will (1) open an HDF file, and (2) create three point
c  interfaces within the file.
c

      program setuppoint

      integer*4          ptfid, ptid1, ptid2, ptid3, ptdetach, ptclose
      integer*4          ptopen, ptcreate
      
      integer DFACC_CREATE
      parameter (DFACC_CREATE=4)

c   
c      We first open the HDF swath point, "PointFile.hdf".  Because this
c      file does not already exist, we use the DFACC_CREATE access
c      code in the open statement.  The ehopen routine returns the point
c      file id, ptfid, which is used to identify the file in subsequent
c      routines in the library.
c
      ptfid = ptopen("PointFile_created_with_hadeos_sample_file_write"//
     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_CREATE)


      ptid1 = ptcreate(ptfid, "Simple Point")
      ptid2 = ptcreate(ptfid, "FixedBuoy Point")
      ptid3 = ptcreate(ptfid, "FloatBuoy Point")

c    
c     We now close the point interface with the ptdetach routine.  This step
c     is necessary to properly store the point information within the file.
c     

      status = ptdetach(ptid1)
      status = ptdetach(ptid2)
      status = ptdetach(ptid3)

c    
c     Finally, we close the point file using the ehclose routine.  This will
c     release the point file handles established by ptopen.
c     

      status = ptclose(ptfid)

      stop
      end